c0dycode před 4 roky
rodič
revize
a87c5ba017
13 změnil soubory, kde provedl 67 přidání a 3 odebrání
  1. +13
    -0
      .idea/.idea.BL3ProxySettings/.idea/.gitignore
  2. +3
    -0
      .idea/.idea.BL3ProxySettings/.idea/dictionaries/c0dycode.xml
  3. +4
    -0
      .idea/.idea.BL3ProxySettings/.idea/encodings.xml
  4. +8
    -0
      .idea/.idea.BL3ProxySettings/.idea/indexLayout.xml
  5. +6
    -0
      .idea/.idea.BL3ProxySettings/.idea/vcs.xml
  6. +27
    -2
      BL3ProxySettings.cpp
  7. +2
    -0
      BL3ProxySettings.sln.DotSettings.user
  8. +3
    -0
      BL3ProxySettings.vcxproj
  9. +1
    -1
      x64/Debug/BL3ProxySettings.tlog/BL3ProxySettings.lastbuildstate
  10. binární
      x64/Debug/BL3ProxySettings.tlog/CL.command.1.tlog
  11. binární
      x64/Debug/BL3ProxySettings.tlog/CL.read.1.tlog
  12. binární
      x64/Debug/BL3ProxySettings.tlog/link.command.1.tlog
  13. binární
      x64/Debug/BL3ProxySettings.tlog/link.read.1.tlog

+ 13
- 0
.idea/.idea.BL3ProxySettings/.idea/.gitignore Zobrazit soubor

@@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/.idea.BL3ProxySettings.iml
/projectSettingsUpdater.xml
/modules.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

+ 3
- 0
.idea/.idea.BL3ProxySettings/.idea/dictionaries/c0dycode.xml Zobrazit soubor

@@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="c0dycode" />
</component>

+ 4
- 0
.idea/.idea.BL3ProxySettings/.idea/encodings.xml Zobrazit soubor

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

+ 8
- 0
.idea/.idea.BL3ProxySettings/.idea/indexLayout.xml Zobrazit soubor

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

+ 6
- 0
.idea/.idea.BL3ProxySettings/.idea/vcs.xml Zobrazit soubor

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 27
- 2
BL3ProxySettings.cpp Zobrazit soubor

@@ -36,7 +36,7 @@ using json = nlohmann::json;
#include "include/easywsclient.cpp"

using easywsclient::WebSocket;
WebSocket::pointer ws = NULL;
WebSocket::pointer ws = nullptr;

//#include <map>
//#include <fstream>
@@ -91,6 +91,8 @@ auto getNewsServicePattern = xorstr("45 8B C7 48 8D 15 ?? ?? ?? ?? 48 8D 8D ?? ?
auto mallocPattern = xorstr("48 89 5C 24 ?? 57 48 83 EC 20 48 8B F9 8B DA 48 8B 0D ?? ?? ?? ?? 48 85 C9 75 0C E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? 48 8B 01 44 8B C3 48 8B D7 48 8B 5C 24 ?? 48 83 C4 20 5F 48 FF 60 10");
auto reallocPattern = xorstr("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B F1 41 8B D8 48 8B 0D ?? ?? ?? ?? 48 8B FA 48 85 C9 75 0C E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? 48 8B 01 44 8B CB 4C 8B C7 48 8B D6 48 8B 5C 24 ?? 48 8B 74 24 ?? 48 83 C4 20 5F 48 FF 60 18");

auto hardcodedHotfixCallPattern = xorstr("40 55 53 56 57 41 54 41 56 41 57 48 8D AC 24 ?? ?? ?? ?? 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 85 ?? ?? ?? ?? 48 8B BD");

CRITICAL_SECTION critsec;

static bool isInInternalMode = false;
@@ -333,6 +335,11 @@ tRealloc oRealloc;
typedef void (__fastcall* tGetNewsItems)(void*);
tGetNewsItems oGetNewsItems = NULL;

using EMicropatchOperation = uintptr_t;

typedef bool (__fastcall* tHardcodedHotfixes)(EMicropatchOperation, const wchar_t* patchString, const wchar_t*, bool, void* pFunc, void* someObject);
tHardcodedHotfixes oHardcodedHotfixes = NULL;

template<class T>
struct TArray
{
@@ -1228,6 +1235,12 @@ void hkGetNewsItems(void* newsWidget) {
return;
}

bool hkHardcodedHotfixes(EMicropatchOperation unknown, const wchar_t* patchString, const wchar_t* unknown_2, bool unknown_3, void* pFunc, void* someObject)
{
pFunc = 0;
return false;
}

//typedef DNS_STATUS(WINAPI* DNSQUERYEX)(PDNS_QUERY_REQUEST pQueryRequest, PDNS_QUERY_RESULT pQueryResults, PDNS_QUERY_CANCEL pCancelHandle);
//DNSQUERYEX fpDnsQueryEx = NULL;
//
@@ -1381,6 +1394,17 @@ DWORD WINAPI MainThread(LPVOID param)
Sleep(100);
}

uintptr_t hardcodedHotfixesProcessingAddress = PatternScan::FindSignature(NULL, hardcodedHotfixCallPattern.crypt_get());
while(hardcodedHotfixesProcessingAddress == NULL)
{
hardcodedHotfixesProcessingAddress = PatternScan::FindSignature(NULL, hardcodedHotfixCallPattern.crypt_get());
Sleep(100);
}
/*
int32_t hardcodedHotfixOffset = *(int32_t*)(hardcodedHotfixesProcessingAddress + 35);
uintptr_t finalHardcodedHotfixAddress = hardcodedHotfixesProcessingAddress + 34 + hardcodedHotfixOffset + 5;*/

uintptr_t sparkModuleAddress = PatternScan::FindSignature(NULL, FGbxSparkModuleStartupModulePattern.crypt_get());
while (sparkModuleAddress == NULL) {
sparkModuleAddress = PatternScan::FindSignature(NULL, FGbxSparkModuleStartupModulePattern.crypt_get());
@@ -1427,6 +1451,8 @@ DWORD WINAPI MainThread(LPVOID param)
Sleep(200);
while (MH_CreateHookEx((LPVOID)areMicropatchesDifferentAddress, &hkAreMicropatchesDifferent, &oAreMicropatchesDifferent) != MH_OK)
Sleep(200);
// while (MH_CreateHookEx((LPVOID)hardcodedHotfixesProcessingAddress, &hkHardcodedHotfixes, &oHardcodedHotfixes) != MH_OK)
// Sleep(200);
std::cout << "Placed 5/7 hooks" << std::endl;
std::cout << "Placed 7/7 hooks" << std::endl;
@@ -1444,7 +1470,6 @@ struct ArgStruct {
bool boolValue;
};

// TODO: Send log messages on success/errors
extern "C" __declspec(dllexport) DWORD __stdcall ToggleOperationalMode(ArgStruct* argStruct)
{
EnterCriticalSection(&critsec);


+ 2
- 0
BL3ProxySettings.sln.DotSettings.user Zobrazit soubor

@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/PencilsConfiguration/ActualSeverity/@EntryValue">ERROR</s:String></wpf:ResourceDictionary>

+ 3
- 0
BL3ProxySettings.vcxproj Zobrazit soubor

@@ -31,6 +31,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -78,6 +79,7 @@
<LanguageStandard>stdcpp17</LanguageStandard>
<BufferSecurityCheck>false</BufferSecurityCheck>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -102,6 +104,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<BufferSecurityCheck>false</BufferSecurityCheck>
<DebugInformationFormat>None</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>


+ 1
- 1
x64/Debug/BL3ProxySettings.tlog/BL3ProxySettings.lastbuildstate Zobrazit soubor

@@ -1,2 +1,2 @@
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0:
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:
Debug|x64|F:\Programmieren\C++\BL3\BL3ProxySettings\|

binární
x64/Debug/BL3ProxySettings.tlog/CL.command.1.tlog Zobrazit soubor


binární
x64/Debug/BL3ProxySettings.tlog/CL.read.1.tlog Zobrazit soubor


binární
x64/Debug/BL3ProxySettings.tlog/link.command.1.tlog Zobrazit soubor


binární
x64/Debug/BL3ProxySettings.tlog/link.read.1.tlog Zobrazit soubor


Načítá se…
Zrušit
Uložit