BugInTheSYS

Untitled

May 12th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TestMethode:
  2. 013911E0  jmp         TestMethode (13915C0h) ; Zur Testmethode springen, s. Z. 5
  3.  
  4. ;int TestMethode( int a, int b, const char *d ) {
  5. 013915C0  push        ebp             ; Irgendne Scheiße die er braucht. Irrelevant
  6. 013915C1  mov         ebp,esp         ; da dieser Part eh von Delphi kompiliert wird
  7. 013915C3  sub         esp,0C0h  
  8. 013915C9  push        ebx  
  9. 013915CA  push        esi  
  10. 013915CB  push        edi  
  11. 013915CC  lea         edi,[ebp-0C0h]  
  12. 013915D2  mov         ecx,30h  
  13. 013915D7  mov         eax,0CCCCCCCCh  
  14. 013915DC  rep stos    dword ptr es:[edi]  
  15. ;  return a;
  16. 013915DE  mov         eax,dword ptr [a] ; a in eax als ergebnis schreiben
  17. ;}
  18. 013915E1  pop         edi  
  19. 013915E2  pop         esi  
  20. 013915E3  pop         ebx  
  21. 013915E4  mov         esp,ebp  
  22. 013915E6  pop         ebp  
  23. 013915E7  ret  
  24.  
  25. ;Aus der TESTERFUNKTION:
  26. ;  int r;                         // Result-Variable
  27. ;  r = TestMethode( Ta, Tb, Tc ); //Aufruf der getesteten Methode
  28. 0139397E  mov         eax,dword ptr [Tc]  ; Letztes argument in eax
  29. 01393981  push        eax                 ; eax pushen
  30. 01393982  mov         ecx,dword ptr [Tb]  ; Vorletztes Argument in eax
  31. 01393985  push        ecx                 ; eax pushen
  32. 01393986  mov         edx,dword ptr [Ta]  ; erstes Argument in eax
  33. 01393989  push        edx                 ; eax pushen
  34. 0139398A  call        TestMethode (13911E0h)  ; Testmethode aufrufen, s. Z. 2
  35. 0139398F  add         esp,0Ch             ; Das braucht er hier anscheinend
  36. 01393992  mov         dword ptr [r],eax   ; Das Ergebnis aus eax wieder rausholen
  37. ;}
  38. 01393995  pop         edi                 ; Alles wegpoppen. Ebenfalls irrelevant.
  39. 01393996  pop         esi  
  40. 01393997  pop         ebx  
  41. 01393998  add         esp,0CCh  
  42. 0139399E  cmp         ebp,esp  
  43. 013939A0  call        @ILT+325(__RTC_CheckEsp) (139114Ah)  ;C++-Spezifische sache
  44. 013939A5  mov         esp,ebp  
  45. 013939A7  pop         ebp  
  46. 013939A8  ret                             ; Hinter die jmp-Anweisung zurückspringen, die die Testerfunktion aufgerufen hat
Advertisement
Add Comment
Please, Sign In to add comment