Function at 0x405f8c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov esi, edx
mov byte [ebp - 1], al
xor eax, eax
push ebp
push 0x406247
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 2], 0
cmp byte [ebp - 1], 0
je 0x405fd6
mov ebx, 0x4066ac
sub ebx, 0x406678
jmp 0x405fe1
mov ebx, 0x406674
sub ebx, 0x40664c
lea eax, [ebp - 0x20]
mov edx, esi
call fcn.004032c0
mov eax, dword [ebp - 0x20]
call fcn.004059dc
mov esi, eax
push esi
push 0
push 0x1f0fff
call sub.kernel32.dll_OpenProcess
mov dword [0x4126c0], eax
cmp dword [0x4126c0], 0
je 0x40622c
push 0x40
push 0x1000
push ebx
push 0
mov eax, dword [0x4126c0]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [0x4126cc], eax
push 4
push 0x1000
mov eax, dword [0x4127a0]
call fcn.00404740
inc eax
push eax
push 0
mov eax, dword [0x4126c0]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [0x4126d0], eax
cmp dword [0x4126d0], 0
je 0x406228
cmp dword [0x4126cc], 0
je 0x406228
lea edx, [ebp - 0x24]
mov eax, 0x406260
call fcn.00404cc0
mov eax, dword [ebp - 0x24]
call fcn.00403508
push eax
call sub.kernel32.dll_GetModuleHandleA_1
mov esi, eax
lea edx, [ebp - 0x28]
mov eax, 0x406278
call fcn.00404cc0
mov eax, dword [ebp - 0x28]
call fcn.00403508
push eax
call sub.kernel32.dll_GetModuleHandleA_1
mov edi, eax
lea edx, [ebp - 0x2c]
mov eax, 0x40628c
call fcn.00404cc0
mov eax, dword [ebp - 0x2c]
call fcn.00403508
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.00405bb0
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x30]
mov eax, 0x4062a4
call fcn.00404cc0
mov eax, dword [ebp - 0x30]
call fcn.00403508
push eax
push edi
call sub.kernel32.dll_GetProcAddress
call fcn.00405bb0
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x34]
mov eax, 0x4062bc
call fcn.00404cc0
mov eax, dword [ebp - 0x34]
call fcn.00403508
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.00405bb0
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x38]
mov eax, 0x4062d8
call fcn.00404cc0
mov eax, dword [ebp - 0x38]
call fcn.00403508
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.00405bb0
mov dword [ebp - 0x18], eax
mov eax, dword [0x4126c8]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
push eax
mov eax, dword [0x4127a0]
call fcn.00404740
inc eax
push eax
mov eax, dword [0x4127a0]
push eax
mov eax, dword [0x4126d0]
push eax
mov eax, dword [0x4126c0]
push eax
call sub.kernel32.dll_WriteProcessMemory
push ebx
push 0
call sub.kernel32.dll_GlobalAlloc
mov esi, eax
test esi, esi
je 0x406228
cmp byte [ebp - 1], 0
je 0x40618e
mov edx, esi
mov eax, 0x406678
mov ecx, ebx
call fcn.00402590
jmp 0x40619c
mov edx, esi
mov eax, 0x40664c
mov ecx, ebx
call fcn.00402590
mov edx, ebx
sub edx, 5
test edx, edx
jl 0x40620b
inc edx
xor ecx, ecx
mov eax, esi
add eax, ecx
mov edi, dword [eax]
cmp edi, 0x11111111
jne 0x4061ca
cmp byte [ebp - 1], 0
je 0x4061c3
mov edi, dword [ebp - 0x14]
mov dword [eax], edi
jmp 0x406207
mov edi, dword [ebp - 0xc]
mov dword [eax], edi
jmp 0x406207
cmp edi, 0x22222222
jne 0x4061dc
mov edi, dword [0x4126d0]
mov dword [eax], edi
jmp 0x406207
cmp edi, 0x33333333
jne 0x4061eb
mov edi, dword [ebp - 0x10]
mov dword [eax], edi
jmp 0x406207
cmp edi, 0x44444444
jne 0x4061fa
mov edi, dword [ebp - 0x1c]
mov dword [eax], edi
jmp 0x406207
cmp edi, 0x55555555
jne 0x406207
mov edi, dword [ebp - 0x18]
mov dword [eax], edi
inc ecx
dec edx
jne 0x4061a8
lea eax, [ebp - 8]
push eax
push ebx
push esi
mov eax, dword [0x4126cc]
push eax
mov eax, dword [0x4126c0]
push eax
call sub.kernel32.dll_WriteProcessMemory
push esi
call sub.kernel32.dll_GlobalFree
mov byte [ebp - 2], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40624e
lea eax, [ebp - 0x38]
mov edx, 7
call fcn.00403198
ret