Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;unsigned __fastcall CaptureStackBackTrace(unsigned FramesToCapture, void** BackTrace);
  2.  
  3. ?CaptureStackBackTrace@@YIIIPAPAX@Z PROC
  4.     push edi
  5.     push ebx
  6.     push ebp
  7.     mov edi,edx
  8.     xor edx,edx    ; number of captured frames
  9.     mov ebx,fs:[4] ; StackBase
  10. @@0:
  11.     mov eax,[ebp]
  12.     cmp eax,ebp
  13.     jbe @@1
  14.     cmp eax,ebx
  15.     jae @@1
  16.     mov ebp,eax
  17.     mov eax,[eax+4]
  18.     stosd
  19.     inc edx
  20.     loop @@0
  21. @@1:
  22.     mov eax,edx
  23.     pop ebp
  24.     pop ebx
  25.     pop edi
  26.     ret
  27. ?CaptureStackBackTrace@@YIIIPAPAX@Z ENDP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement