Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. /*
  2. sub rsp,28h - reserve stack space
  3. mov rcx,rdx - move incoming parameter to rcx (this pointer for the next call method in this case)
  4. mov r11,7FFABFEA0020h - move virtual stub address to r11
  5. cmp dword ptr [rcx],ecx - ensure that we weren't given null value
  6. call qword ptr [r11] - call the stub with the address of the interface impl obj
  7. nop
  8. add rsp,28h - free stack space
  9. ret
  10. */
  11. public void Run(IActor d)
  12. {
  13. d.Exec();
  14. }
  15.  
  16. /*
  17. rough C# code would be:
  18.  
  19. if(d == null) trap();
  20. StubCallFor_IActor(d); <-- will decide based on type of d how to run it
  21. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement