Skip to content

Commit

Permalink
Fix a color slot problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Eiton committed Nov 17, 2021
1 parent 6d308ee commit 941babe
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion hitbox overlay/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ signed int* cameraPosX;
signed int* cameraPosY;
float* cameraZoom;

DWORD palNumAddress[2];
DWORD palNumAddress[3];

// asm codes to patch the exe

Expand Down Expand Up @@ -470,8 +470,14 @@ DWORD WINAPI MainThread(LPVOID hModule)
L"MBTL.exe",
"\x0A\x7C\x41\x8D",
"xxxx");
palNumAddress[2] = sigscan(
L"MBTL.exe",
"\x0A\x1B\xC0\xEB",
"xxxx");
WriteProcessMemory(phandle, (LPVOID)(palNumAddress[0]), pal_a, 1, 0);
WriteProcessMemory(phandle, (LPVOID)(palNumAddress[1]), pal_a, 1, 0);
WriteProcessMemory(phandle, (LPVOID)(palNumAddress[2]), pal_a, 1, 0);
WriteProcessMemory(phandle, (LPVOID)(palNumAddress[2]+7), pal_a, 1, 0);
}
TCHAR szDllPath[MAX_PATH] = { 0 };
GetSystemDirectory(szDllPath, MAX_PATH);
Expand All @@ -480,10 +486,30 @@ DWORD WINAPI MainThread(LPVOID hModule)
while (!vtable)
{
Sleep(1000);
/*
DWORD* ptr = (DWORD*)(sigscan(L"MBTL.exe", "\x89\x7d\xf8\x8b\x47", "xxxxx"));
if (ptr != nullptr) {
ptr = (DWORD*)*(ptr - 1);
if (ptr != nullptr) {
ptr = (DWORD*)*(ptr);
ptr = (DWORD*)*(ptr + 1);
if (ptr != nullptr) {
ptr = (DWORD*)*(ptr + 1);
}
}
}
if (ptr != nullptr) {
vtable = *(void***)ptr;
}
*/


vtable = *(void***)(sigscan(
sPath + L"\\d3d9.dll",
"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86",
"xx????xx????xx") + 0x2);

}

// Hook Present
Expand Down

0 comments on commit 941babe

Please sign in to comment.