MichaelPetch

masm memcpy 2

Apr 2nd, 2021 (edited)
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. .MODEL FLAT, STDCALL
  2. OPTION NOKEYWORD:<size>
  3. OPTION PROLOGUE:NONE
  4. OPTION EPILOGUE:NONE
  5.  
  6. .CODE
  7.  
  8. __MyMemcpy PROC _dest : DWORD, _source : DWORD, _size : DWORD
  9. PUSH ESI
  10. PUSH EDI
  11. MOV EDI, DWORD PTR [ESP + 0CH]
  12. MOV ESI, DWORD PTR [ESP + 10H]
  13. MOV ECX, DWORD PTR [ESP + 14H]
  14. __AGAIN:
  15. LODSB
  16. STOSB
  17. LOOP __AGAIN
  18. POP EDI
  19. POP ESI
  20. RETN 0CH
  21. __MyMemcpy ENDP
  22.  
  23. END
Add Comment
Please, Sign In to add comment