All pastes #794018 Raw Edit

x0r

public text v1 · immutable
·published 2007-11-22 20:34 UTC
rendered paste body
procedure PostMessageTrampoline(hWnd : HWND; UINT : Msg; WPARAM : wParam; LPARAM : lParam);
    var
        DLLFunc : TDLLFunc;
    begin
        DLLFunc := GetProcAddress(GetModuleHandle('user32.dll'), 'PostMessageA') + 5;
        asm
            push dword ptr ss:[lParam]
            push dword ptr ss:[wParam]
            push dword ptr ss:[Msg]
            push dword ptr ss:[hWnd]
            push @@return
            mov  edi, edi
            push ebp
            mov  ebp, esp
            jmp dword ptr ss:[DLLFunc]
          @@return:
        end;
 end;