Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _declspec(naked) NTSTATUS callgatex86(int id, ...) {
  2.     DWORD savedEBP;
  3.     DWORD savedESP;
  4.  
  5.     __asm {
  6.         pop     ecx;
  7.  
  8.         mov     savedEBP, ebp;
  9.         mov     savedESP, esp;
  10.  
  11.         pop     eax;
  12.         mov[esp + 0x4], ecx;
  13.         pop     ecx;
  14.         push    ecx;
  15.         push    ecx;
  16.         add     esp, 0x8;
  17.         xor     ecx, ecx;
  18.         mov     edx, __FINAL;
  19.         push    edx;
  20.         mov     edx, esp;
  21.  
  22.         _emit   0x0f;       //sysenter
  23.         _emit   0x34;
  24.  
  25. __FINAL:
  26.         mov     ebx, dword ptr[esp];
  27.         //push  ebx;
  28.         //push  ebx;
  29.  
  30.         mov     ebp, savedEBP;
  31.         mov     esp, savedESP;
  32.  
  33.         push    ebx;
  34.         ret;
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement