Holland

Untitled

Jun 2nd, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void JmpFunction::operator() ()
  2. {
  3. g_CurrJmpFunc = this;
  4.  
  5. if(!m_PreparedArguments) PrepareArguments(); // Not important
  6.  
  7. DWORD t_Addy;
  8. if(m_Offset==0) // Are we supposed to start at the function start (0) or somewhere else (m_Offset)?
  9. t_Addy = (DWORD)m_Function;
  10. else t_Addy = m_Offset; // If this happens, we called StartHere()
  11.  
  12. int t_StackSize = m_Stack.size(); // Number of arguments
  13. int t_StackSizeBytes = t_StackSize*sizeof(void*); // byte size
  14.  
  15. for(int i = t_StackSize-1; i>=0; i--) // For each argument
  16. {
  17. DWORD t_Argument = (m_Arguments[i]);
  18. __asm
  19. {
  20. mov eax, t_Argument // push onto stack
  21. push eax
  22. }
  23. }
  24.  
  25. __asm // call and stack inc
  26. {
  27. call t_Addy
  28. add esp, t_StackSizeBytes
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment