Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _declspec(naked) NTSTATUS callgatex86(int id, ...) {
- DWORD savedEBP;
- DWORD savedESP;
- __asm {
- pop ecx;
- mov savedEBP, ebp;
- mov savedESP, esp;
- pop eax;
- mov[esp + 0x4], ecx;
- pop ecx;
- push ecx;
- push ecx;
- add esp, 0x8;
- xor ecx, ecx;
- mov edx, __FINAL;
- push edx;
- mov edx, esp;
- _emit 0x0f; //sysenter
- _emit 0x34;
- __FINAL:
- mov ebx, dword ptr[esp];
- //push ebx;
- //push ebx;
- mov ebp, savedEBP;
- mov esp, savedESP;
- push ebx;
- ret;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement