Function at 0x4064ac
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 0x406767
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 2], 0
cmp byte [ebp - 1], 0
je 0x4064f6
mov ebx, 0x406bcc
sub ebx, 0x406b98
jmp 0x406501
mov ebx, 0x406b94
sub ebx, 0x406b6c
lea eax, [ebp - 0x20]
mov edx, esi
call fcn.00403374
mov eax, dword [ebp - 0x20]
call fcn.00405efc
mov esi, eax
push esi
push 0
push 0x1f0fff
call sub.kernel32.dll_OpenProcess
mov dword [0x4136e0], eax
cmp dword [0x4136e0], 0
je 0x40674c
push 0x40
push 0x1000
push ebx
push 0
mov eax, dword [0x4136e0]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [0x4136ec], eax
push 4
push 0x1000
mov eax, dword [0x4137c0]
call fcn.004047f0
inc eax
push eax
push 0
mov eax, dword [0x4136e0]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [0x4136f0], eax
cmp dword [0x4136f0], 0
je 0x406748
cmp dword [0x4136ec], 0
je 0x406748
lea edx, [ebp - 0x24]
mov eax, 0x406780
call fcn.00404d28
mov eax, dword [ebp - 0x24]
call fcn.004035bc
push eax
call sub.kernel32.dll_GetModuleHandleA_1
mov esi, eax
lea edx, [ebp - 0x28]
mov eax, 0x406798
call fcn.00404d28
mov eax, dword [ebp - 0x28]
call fcn.004035bc
push eax
call sub.kernel32.dll_GetModuleHandleA_1
mov edi, eax
lea edx, [ebp - 0x2c]
mov eax, 0x4067ac
call fcn.00404d28
mov eax, dword [ebp - 0x2c]
call fcn.004035bc
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.004060d0
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x30]
mov eax, 0x4067c4
call fcn.00404d28
mov eax, dword [ebp - 0x30]
call fcn.004035bc
push eax
push edi
call sub.kernel32.dll_GetProcAddress
call fcn.004060d0
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x34]
mov eax, 0x4067dc
call fcn.00404d28
mov eax, dword [ebp - 0x34]
call fcn.004035bc
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.004060d0
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x38]
mov eax, 0x4067f8
call fcn.00404d28
mov eax, dword [ebp - 0x38]
call fcn.004035bc
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.004060d0
mov dword [ebp - 0x18], eax
mov eax, dword [0x4136e8]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
push eax
mov eax, dword [0x4137c0]
call fcn.004047f0
inc eax
push eax
mov eax, dword [0x4137c0]
push eax
mov eax, dword [0x4136f0]
push eax
mov eax, dword [0x4136e0]
push eax
call sub.kernel32.dll_WriteProcessMemory
push ebx
push 0
call sub.kernel32.dll_GlobalAlloc
mov esi, eax
test esi, esi
je 0x406748
cmp byte [ebp - 1], 0
je 0x4066ae
mov edx, esi
mov eax, 0x406b98
mov ecx, ebx
call fcn.00402598
jmp 0x4066bc
mov edx, esi
mov eax, 0x406b6c
mov ecx, ebx
call fcn.00402598
mov edx, ebx
sub edx, 5
test edx, edx
jl 0x40672b
inc edx
xor ecx, ecx
mov eax, esi
add eax, ecx
mov edi, dword [eax]
cmp edi, 0x11111111
jne 0x4066ea
cmp byte [ebp - 1], 0
je 0x4066e3
mov edi, dword [ebp - 0x14]
mov dword [eax], edi
jmp 0x406727
mov edi, dword [ebp - 0xc]
mov dword [eax], edi
jmp 0x406727
cmp edi, 0x22222222
jne 0x4066fc
mov edi, dword [0x4136f0]
mov dword [eax], edi
jmp 0x406727
cmp edi, 0x33333333
jne 0x40670b
mov edi, dword [ebp - 0x10]
mov dword [eax], edi
jmp 0x406727
cmp edi, 0x44444444
jne 0x40671a
mov edi, dword [ebp - 0x1c]
mov dword [eax], edi
jmp 0x406727
cmp edi, 0x55555555
jne 0x406727
mov edi, dword [ebp - 0x18]
mov dword [eax], edi
inc ecx
dec edx
jne 0x4066c8
lea eax, [ebp - 8]
push eax
push ebx
push esi
mov eax, dword [0x4136ec]
push eax
mov eax, dword [0x4136e0]
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 0x40676e
lea eax, [ebp - 0x38]
mov edx, 7
call fcn.004031a0
ret