Function at 0x4064a8
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 0x406763
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 2], 0
cmp byte [ebp - 1], 0
je 0x4064f2
mov ebx, 0x406bc8
sub ebx, 0x406b94
jmp 0x4064fd
mov ebx, 0x406b90
sub ebx, 0x406b68
lea eax, [ebp - 0x20]
mov edx, esi
call fcn.00403374
mov eax, dword [ebp - 0x20]
call fcn.00405ef8
mov esi, eax
push esi
push 0
push 0x1f0fff
call sub.kernel32.dll_OpenProcess
mov dword [0x40f6e0], eax
cmp dword [0x40f6e0], 0
je 0x406748
push 0x40
push 0x1000
push ebx
push 0
mov eax, dword [0x40f6e0]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [0x40f6ec], eax
push 4
push 0x1000
mov eax, dword [0x40f7c0]
call fcn.004047c8
inc eax
push eax
push 0
mov eax, dword [0x40f6e0]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [0x40f6f0], eax
cmp dword [0x40f6f0], 0
je 0x406744
cmp dword [0x40f6ec], 0
je 0x406744
lea edx, [ebp - 0x24]
mov eax, 0x40677c
call fcn.00404d24
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, 0x406794
call fcn.00404d24
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, 0x4067a8
call fcn.00404d24
mov eax, dword [ebp - 0x2c]
call fcn.004035bc
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.004060cc
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x30]
mov eax, 0x4067c0
call fcn.00404d24
mov eax, dword [ebp - 0x30]
call fcn.004035bc
push eax
push edi
call sub.kernel32.dll_GetProcAddress
call fcn.004060cc
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x34]
mov eax, 0x4067d8
call fcn.00404d24
mov eax, dword [ebp - 0x34]
call fcn.004035bc
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.004060cc
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x38]
mov eax, 0x4067f4
call fcn.00404d24
mov eax, dword [ebp - 0x38]
call fcn.004035bc
push eax
push esi
call sub.kernel32.dll_GetProcAddress
call fcn.004060cc
mov dword [ebp - 0x18], eax
mov eax, dword [0x40f6e8]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
push eax
mov eax, dword [0x40f7c0]
call fcn.004047c8
inc eax
push eax
mov eax, dword [0x40f7c0]
push eax
mov eax, dword [0x40f6f0]
push eax
mov eax, dword [0x40f6e0]
push eax
call sub.kernel32.dll_WriteProcessMemory
push ebx
push 0
call sub.kernel32.dll_GlobalAlloc
mov esi, eax
test esi, esi
je 0x406744
cmp byte [ebp - 1], 0
je 0x4066aa
mov edx, esi
mov eax, 0x406b94
mov ecx, ebx
call fcn.00402598
jmp 0x4066b8
mov edx, esi
mov eax, 0x406b68
mov ecx, ebx
call fcn.00402598
mov edx, ebx
sub edx, 5
test edx, edx
jl 0x406727
inc edx
xor ecx, ecx
mov eax, esi
add eax, ecx
mov edi, dword [eax]
cmp edi, 0x11111111
jne 0x4066e6
cmp byte [ebp - 1], 0
je 0x4066df
mov edi, dword [ebp - 0x14]
mov dword [eax], edi
jmp 0x406723
mov edi, dword [ebp - 0xc]
mov dword [eax], edi
jmp 0x406723
cmp edi, 0x22222222
jne 0x4066f8
mov edi, dword [0x40f6f0]
mov dword [eax], edi
jmp 0x406723
cmp edi, 0x33333333
jne 0x406707
mov edi, dword [ebp - 0x10]
mov dword [eax], edi
jmp 0x406723
cmp edi, 0x44444444
jne 0x406716
mov edi, dword [ebp - 0x1c]
mov dword [eax], edi
jmp 0x406723
cmp edi, 0x55555555
jne 0x406723
mov edi, dword [ebp - 0x18]
mov dword [eax], edi
inc ecx
dec edx
jne 0x4066c4
lea eax, [ebp - 8]
push eax
push ebx
push esi
mov eax, dword [0x40f6ec]
push eax
mov eax, dword [0x40f6e0]
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 0x40676a
lea eax, [ebp - 0x38]
mov edx, 7
call fcn.004031a0
ret