Function at 0x406f10
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff7c
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x407164
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x407174
call sub.kernel32.dll_LoadLibraryA
mov ebx, eax
lea eax, [ebp - 0x24]
mov edx, 0x105
call fcn.00402680
push 0x105
mov eax, dword [ebp - 0x24]
call fcn.00402554
push eax
push ebx
call sub.kernel32.dll_GetModuleFileNameA_1
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 0
lea eax, [ebp - 0x24]
call fcn.004025a8
push eax
call sub.IMAGEHLP.DLL_MapAndLoad
test eax, eax
je 0x40713e
xor ecx, ecx
push ebp
push 0x407137
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx + 0x78]
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp - 0x50]
push eax
push edx
call sub.IMAGEHLP.DLL_ImageRvaToVa
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x1c]
push eax
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x4c]
push eax
call sub.IMAGEHLP.DLL_ImageRvaToVa
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x20]
push eax
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x4c]
push eax
call sub.IMAGEHLP.DLL_ImageRvaToVa
mov dword [ebp - 0x14], eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x24]
push eax
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x4c]
push eax
call sub.IMAGEHLP.DLL_ImageRvaToVa
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
dec eax
test eax, eax
jl 0x407120
inc eax
mov dword [ebp - 0x28], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
test eax, eax
je 0x407116
mov eax, dword [ebp - 8]
mov esi, dword [eax + 0x18]
dec esi
test esi, esi
jl 0x407112
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x10]
movzx eax, word [eax + ebx*2]
cmp edi, eax
jne 0x40710a
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + ebx*4]
push eax
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x4c]
push eax
call sub.IMAGEHLP.DLL_ImageRvaToVa
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x78]
mov edx, dword [ebp - 0x18]
call fcn.004022e4
mov eax, dword [ebp - 0x78]
mov edx, 0x40718c
call fcn.004024a0
je 0x4070b3
lea eax, [ebp - 0x7c]
mov edx, dword [ebp - 0x18]
call fcn.004022e4
mov eax, dword [ebp - 0x7c]
mov edx, 0x4071a8
call fcn.004024a0
je 0x4070b3
lea eax, [ebp - 0x80]
mov edx, dword [ebp - 0x18]
call fcn.004022e4
mov eax, dword [ebp - 0x80]
mov edx, 0x4071c0
call fcn.004024a0
jne 0x40710a
push 0
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x84]
mov edx, dword [ebp - 0x18]
call fcn.004022e4
mov eax, dword [ebp - 0x84]
call fcn.0040235c
push eax
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_GetCurrentProcessId
push eax
call sub.kernel32.dll_VirtualProtectEx
push 0x1c
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_VirtualQuery
lea eax, [ebp - 0x20]
push eax
push 0x40
mov eax, dword [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_GetCurrentProcessId
push eax
call sub.kernel32.dll_VirtualProtectEx
inc ebx
dec esi
jne 0x40703b
add dword [ebp - 0xc], 4
inc edi
dec dword [ebp - 0x28]
jne 0x40701c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40713e
lea eax, [ebp - 0x58]
push eax
call sub.IMAGEHLP.DLL_UnMapAndLoad
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40716b
lea eax, [ebp - 0x84]
mov edx, 4
call fcn.004021dc
lea eax, [ebp - 0x24]
call fcn.004021b8
ret