Created
June 18, 2022 18:41
-
-
Save josephcsible/6cee041b524ca89d4d4671dfc04cab22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global memcpy64, _memcpy64 | |
section .text | |
memcpy64: | |
_memcpy64: | |
push edi | |
push esi | |
call 0x33:.heavensgate | |
pop esi | |
pop edi | |
ret | |
BITS 64 | |
.heavensgate: | |
mov rdi, [esp + 20] | |
mov rsi, [esp + 28] | |
mov rcx, [esp + 36] | |
mov eax, edi | |
mov rdx, rdi | |
shr rdx, 32 | |
rep movsb | |
retf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#ifdef __cplusplus | |
extern "C" | |
#endif | |
uint64_t memcpy64(uint64_t dest, uint64_t src, uint64_t n); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment