Function at 0x402707
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
mov edi, dword [ebx + 0x3c]
add edi, ebx
cmp dword [edi], 0x4550
je 0x402737
push 0xffffffffffffffff
push 0x40158c
mov ecx, 0x406044
call fcn.00402568
xor ebx, ebx
jmp 0x402861
push 0x40
push 0x1000
push dword [edi + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x402774
push 0xffffffffffffffff
mov esi, 0x406044
push 0x40159c
mov ecx, esi
call fcn.00402568
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.004024ea
jmp 0x402730
push dword [edi + 0x54]
push ebx
push esi
call dword [0x40601c]
movzx eax, word [edi + 0x14]
lea ecx, [edi + 0x18]
movzx edi, word [edi + 6]
add esp, 0xc
add ecx, eax
test edi, edi
je 0x4027bf
mov eax, dword [ecx + 0x14]
lea edx, [ecx + 0x28]
mov dword [ebp - 0xc], edx
test eax, eax
je 0x4027b8
push dword [ecx + 0x10]
add eax, ebx
push eax
mov eax, dword [ecx + 0xc]
add eax, esi
push eax
call dword [0x40601c]
mov edx, dword [ebp - 0xc]
add esp, 0xc
mov ecx, edx
sub edi, 1
jne 0x402793
mov edi, dword [esi + 0x3c]
add edi, esi
mov dword [ebp - 8], edi
call fcn.004036e3
sub eax, dword [0x406040]
cmp eax, 0x7fff
ja 0x402944
mov ebx, dword [edi + 0xa4]
test ebx, ebx
je 0x402847
mov eax, esi
sub eax, dword [edi + 0x34]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0xa0]
add eax, esi
mov edi, dword [eax]
lea ecx, [eax + 4]
mov edx, dword [ecx]
lea eax, [eax + 8]
mov dword [ebp - 0xc], edi
mov edi, dword [ebp - 8]
mov dword [ebp - 0x14], ecx
sub edx, 8
je 0x402843
movzx ecx, word [eax]
mov dword [ebp - 4], ecx
shr dword [ebp - 4], 0xc
cmp dword [ebp - 4], 0
je 0x402837
cmp dword [ebp - 4], 3
jne 0x402868
mov edi, dword [ebp - 0x10]
and ecx, 0xfff
add ecx, dword [ebp - 0xc]
add dword [ecx + esi], edi
mov edi, dword [ebp - 8]
dec edx
add eax, 2
sub edx, 1
jne 0x40280f
mov ecx, dword [ebp - 0x14]
sub ebx, dword [ecx]
jne 0x4027f7
xor ebx, ebx
cmp dword [edi + 0x84], ebx
je 0x40285f
mov edi, dword [edi + 0x80]
add edi, esi
jne 0x402915
mov ebx, esi
mov eax, ebx
jmp 0x402946
push 0xffffffffffffffff
push 0x4015b0
jmp 0x402726
add eax, esi
mov dword [ebp - 0x14], eax
call fcn.004036e3
sub eax, dword [0x406040]
cmp eax, 0x7fff
ja 0x402944
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40292e
mov eax, dword [edi]
mov edx, dword [edi + 0x10]
add eax, esi
add edx, esi
mov dword [ebp - 0xc], edx
jmp 0x402909
mov dword [ebp - 0x14], ebx
mov edx, ebx
test ecx, ecx
js 0x4028d9
lea eax, [esi + 2]
add eax, ecx
push eax
mov dword [ebp - 0x18], eax
call dword [0x406014]
mov word [ebp - 0x1c], ax
lea edx, [ebp - 0x1c]
mov word [ebp - 0x1a], ax
mov eax, ebx
pop ecx
jmp 0x4028dc
movzx eax, word [eax]
lea ecx, [ebp - 8]
movzx eax, ax
push ecx
push eax
push edx
push dword [ebp - 0x10]
mov dword [ebp - 8], ebx
call dword [0x406038]
mov eax, dword [ebp - 8]
test eax, eax
je 0x402925
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
add eax, 4
add ecx, 4
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax]
mov dword [ebp - 4], eax
test ecx, ecx
jne 0x4028b1
add edi, 0x14
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x402874
jmp 0x40285f
push 0xffffffffffffffff
push 0x4015d0
jmp 0x402935
push 0xffffffffffffffff
push 0x4015c0
mov ecx, 0x406044
call fcn.00402568
jmp 0x402861
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret