Function at 0x401ea0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x4c
mov dword [ebp - 0x40], ecx
mov ecx, dword [0x405054]
mov dword [ebp - 0x3c], edx
test ecx, ecx
jle 0x402090
mov edx, dword [0x405058]
xor ebx, ebx
mov eax, dword [edx + 4]
cmp esi, eax
jb 0x401edc
mov edi, dword [edx + 8]
add eax, dword [edi + 8]
cmp esi, eax
jb 0x401fb0
add ebx, 1
add edx, 0xc
cmp ebx, ecx
jne 0x401ec7
mov dword [esp], esi
call fcn.00402920
test eax, eax
mov edi, eax
je 0x4020b7
lea ecx, [ebx + ebx*2]
shl ecx, 2
mov ebx, ecx
add ebx, dword [0x405058]
mov dword [ebp - 0x44], ecx
mov dword [ebx + 8], eax
mov dword [ebx], 0
call fcn.00402a10
mov ecx, dword [ebp - 0x44]
lea edx, [ebp - 0x34]
mov dword [ebp - 0x48], edx
add eax, dword [edi + 0xc]
mov dword [ebx + 4], eax
mov eax, dword [0x405058]
mov dword [esp + 4], edx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + ecx + 4]
mov dword [esp], eax
call ebx
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
sub esp, 0xc
test eax, eax
je 0x402097
mov eax, dword [ebp - 0x20]
cmp eax, 4
jne 0x402034
add dword [0x405054], 1
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], esi
call ebx
sub esp, 0xc
test eax, eax
je 0x4020c7
mov eax, dword [ebp - 0x20]
cmp eax, 4
jne 0x401fc0
mov eax, dword [ebp - 0x40]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call sub.msvcr90.dll_memcpy
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ebp - 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualQuery]
jmp 0x401f6a
cmp eax, 0x40
je 0x401f8e
mov eax, dword [ebp - 0x28]
lea edi, [ebp - 0x38]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x40]
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcr90.dll_memcpy
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
je 0x401fa4
cmp eax, 4
je 0x401fa4
mov eax, dword [ebp - 0x38]
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call ebx
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x40
je 0x401f63
mov eax, dword [ebp - 0x28]
add ecx, dword [0x405058]
mov dword [ebp - 0x44], edx
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 0x44]
sub esp, 0x10
test eax, eax
jne 0x401f63
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00401e40
lea esi, [esi]
xor ebx, ebx
jmp 0x401ee6
mov eax, dword [0x405058]
mov eax, dword [eax + ecx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00401e40
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00401e40
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00401e40
nop
mov eax, dword [0x405050]
test eax, eax
je 0x4020f0
ret
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [0x405050], 1
call fcn.00402970
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x1e]
and eax, 0xfffffff0
call fcn.00402b48
mov dword [0x405054], 0
sub esp, eax
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [0x405058], eax
mov eax, 0x404550
sub eax, 0x404550
cmp eax, 7
jle 0x4021e1
cmp eax, 0xb
jle 0x4022b3
mov eax, dword [0x404550]
test eax, eax
jne 0x4021e9
mov eax, dword [0x404554]
test eax, eax
jne 0x4021e9
mov edi, dword [0x404558]
mov ebx, 0x40455c
test edi, edi
je 0x4022b8
mov ebx, 0x404550
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x4023a3
add ebx, 0xc
cmp ebx, 0x404550
jae 0x4021e1
mov edx, dword [ebx]
mov edi, dword [ebx + 4]
mov ecx, dword [edx + 0x400000]
lea eax, [edi + 0x400000]
mov dword [ebp - 0x3c], ecx
movzx ecx, byte [ebx + 8]
cmp ecx, 0x10
je 0x4022d2
cmp ecx, 0x20
je 0x402359
cmp ecx, 8
je 0x402321
mov dword [esp + 4], ecx
mov dword [esp], str.__Unknown_pseudo_relocation_bit_size__d._n
mov dword [ebp - 0x34], 0
call fcn.00401e40
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, 0x404550
cmp ebx, 0x404550
jae 0x4021e1
lea eax, [ebp - 0x34]
mov dword [ebp - 0x3c], eax
lea esi, [esi]
mov edx, dword [ebx + 4]
mov ecx, 4
add ebx, 8
lea eax, [edx + 0x400000]
mov edx, dword [edx + 0x400000]
add edx, dword [ebx - 8]
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x3c]
call fcn.00401ea0
cmp ebx, 0x404550
jb 0x402200
mov eax, dword [0x405054]
xor ebx, ebx
test eax, eax
jg 0x40224b
jmp 0x4021e1
add ebx, 1
cmp ebx, dword [0x405054]
jge 0x4021e1
mov eax, dword [0x405058]
lea esi, [ebx + ebx*2]
lea edi, [esi*4]
add eax, edi
mov edx, dword [eax]
test edx, edx
je 0x402240
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], ecx
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40237e
lea eax, [ebp - 0x38]
mov dword [esp + 0xc], eax
mov eax, dword [0x405058]
mov eax, dword [eax + esi*4]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
jmp 0x402240
mov ebx, 0x404550
mov esi, dword [ebx]
test esi, esi
jne 0x4021ee
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x402180
jmp 0x4021ee
movzx ecx, word [edi + 0x400000]
movzx edi, cx
mov esi, edi
or esi, 0xffff0000
test cx, cx
cmovs edi, esi
mov esi, dword [ebp - 0x3c]
sub edi, edx
lea ecx, [ebp - 0x34]
sub edi, 0x400000
mov dword [ebp - 0x3c], ecx
lea edx, [ebp - 0x34]
mov ecx, 2
add esi, edi
mov dword [ebp - 0x34], esi
call fcn.00401ea0
add ebx, 0xc
cmp ebx, 0x404550
jb 0x402197
jmp 0x40222d
movzx ecx, byte [eax]
movzx edi, cl
mov esi, edi
or esi, 0xffffff00
test cl, cl
cmovs edi, esi
mov esi, dword [ebp - 0x3c]
sub edi, 0x400000
sub edi, edx
lea ecx, [ebp - 0x34]
add esi, edi
mov dword [ebp - 0x3c], ecx
lea edx, [ebp - 0x34]
mov ecx, 1
mov dword [ebp - 0x34], esi
call fcn.00401ea0
jmp 0x40230d
mov esi, dword [ebp - 0x3c]
add edx, 0x400000
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x3c], ecx
mov ecx, 4
sub esi, edx
add esi, dword [eax]
lea edx, [ebp - 0x34]
mov dword [ebp - 0x34], esi
call fcn.00401ea0
jmp 0x40230d
mov ecx, dword [0x405058]
add ecx, edi
mov eax, dword [ecx + 4]
mov dword [esp + 8], eax
mov eax, dword [ecx + 8]
mov eax, dword [eax + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00401e40
mov dword [esp + 4], eax
mov dword [esp], str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.00401e40
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop