Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WillPlus,add new hook #781

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update engine.cc
  • Loading branch information
DDWSdwqdq authored Mar 29, 2022
commit 66fbff28ba3ddd2431307317b0b7fe587e6a404a
18 changes: 18 additions & 0 deletions texthook/engine/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9470,6 +9470,24 @@ void SpecialHookWillPlusA(DWORD esp_base, HookParam *, BYTE index, DWORD *data,

bool InsertWillPlusAHook()
{
//by iov
const BYTE bytes2[] = { 0x8B,0x00,0xFF,0x76,0xFC,0x8B,0xCF,0x50 };
ULONG range2 = min(processStopAddress - processStartAddress, MAX_REL_ADDR);
ULONG addr2 = MemDbg::findBytes(bytes2, sizeof(bytes2), processStartAddress, processStartAddress + range2);
if (addr2) {
HookParam myhp = {};
myhp.address = addr2 + 2;

myhp.type = USING_UNICODE | NO_CONTEXT | USING_STRING;

myhp.offset = pusha_eax_off - 4;//esp+4

char nameForUser[HOOK_NAME_SIZE] = "WillPlus3_memcpy";
NewHook(myhp, nameForUser);
ConsoleOutput("Insert: WillPlus3_memcpy Hook");
return true;
}

const BYTE bytes[] = {
0x81,0xec, 0x14,0x08,0x00,0x00 // 0042B5E0 81EC 14080000 SUB ESP,0x814 ; jichi: text in eax, name in eax - 1024, able to copy
};
Expand Down