Function at 0x4a7d20
Capabilities:
Allocate or change rwx memory
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4a7f03
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [eax + 5], edx
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
xor ecx, ecx
mov edx, 6
mov eax, dword [ebp - 4]
call fcn.004a7c0c
test al, al
je 0x4a7d94
mov eax, dword [0x568f50]
cmp byte [eax], 0
je 0x4a7d85
mov ecx, 0x405a
mov edx, 0x4a7f1c
mov eax, 0x4a7f98
call fcn.00405398
push 0x4a7fdc
call sub.kernel32.dll_OutputDebugStringW
jmp 0x4a7ee8
mov eax, dword [ebp - 4]
call fcn.004a782c
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push 5
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_ReadProcessMemory
test eax, eax
je 0x4a7ee8
mov byte [ebp - 0x19], 0xe9
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 4]
sub eax, 5
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov al, byte [eax]
cmp al, byte [ebp - 0x19]
jne 0x4a7e88
push 0x4a8004
call sub.kernel32.dll_OutputDebugStringW
mov eax, dword [ebp - 0xc]
mov al, byte [eax]
mov byte [ebp - 0x19], al
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0x20], eax
cmp byte [ebp - 0x19], 0xe9
jne 0x4a7e2e
mov eax, dword [ebp - 4]
add eax, 5
mov edx, dword [ebp - 0xc]
add eax, dword [edx + 1]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_ReadProcessMemory
lea eax, [ebp - 0x2c]
push eax
xor eax, eax
mov al, byte [ebp - 0x19]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0
lea edx, [ebp - 0x44]
mov ecx, 2
mov eax, 0x4a8040
call fcn.0040e4ec
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 0x4a8078
call fcn.004066c0
mov eax, dword [ebp - 0x28]
mov ecx, 0x4081
mov edx, 0x4a7f1c
call fcn.00405398
jmp 0x4a7ee8
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [eax + 5], edx
lea eax, [ebp - 0x20]
push eax
push 0x40
push 5
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_VirtualProtect
lea eax, [ebp - 0x10]
push eax
push 5
lea eax, [ebp - 0x19]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_WriteProcessMemory
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
push 5
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_VirtualProtect
cmp dword [ebp - 0x24], 0
je 0x4a7ee8
push 5
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_FlushInstructionCache
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a7f0a
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004061e4
ret