Function at 0x402617
Capabilities:
Allocate or change rwx memory
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 0x40264c
mov ax, word [ebx + 0xa]
and ax, 0x11
mov ecx, 0x111
cmp ax, cx
je 0x40264c
push ecx
push 0x401624
jmp 0x4027ae
push 0x40
push 0x1000
push dword [edi + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x402687
push ecx
push 0x401634
call fcn.0040249a
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, 0x406048
call fcn.00402433
jmp 0x4027b3
push dword [edi + 0x54]
push ebx
push esi
call dword [0x406020]
movzx edx, word [edi + 6]
movzx eax, word [edi + 0x14]
add esp, 0xc
mov dword [ebp - 0xc], edx
test edx, edx
je 0x4026fb
movzx edx, word [edi + 0x14]
lea ecx, [edi + 0x24]
add ecx, eax
add eax, 0x2c
add eax, edi
add edi, 0x28
add edi, edx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
cmp dword [eax], 0
mov ecx, dword [ebp - 4]
je 0x4026e6
mov eax, dword [eax]
push dword [edi]
add eax, ebx
push eax
mov eax, dword [ecx]
add eax, esi
push eax
call dword [0x406020]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add esp, 0xc
add eax, 0x28
add ecx, 0x28
add edi, 0x28
dec edx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
jne 0x4026c0
mov edi, dword [esi + 0x3c]
add edi, esi
mov dword [ebp - 0xc], edi
call fcn.00403526
sub eax, dword [0x406040]
cmp eax, 0x7fff
jbe 0x40271c
xor eax, eax
jmp 0x4027a3
mov edx, dword [edi + 0xa4]
test edx, edx
je 0x402787
mov ecx, dword [edi + 0xa0]
mov eax, esi
sub eax, dword [edi + 0x34]
add ecx, esi
mov dword [ebp - 8], eax
test edx, edx
je 0x402787
mov edi, dword [ecx]
lea eax, [ecx + 4]
mov dword [ebp - 0x10], edi
mov ebx, dword [eax]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
lea ecx, [ecx + 8]
sub ebx, 8
je 0x402783
movzx eax, word [ecx]
mov dword [ebp - 4], eax
shr dword [ebp - 4], 0xc
cmp dword [ebp - 4], 0
je 0x402779
cmp dword [ebp - 4], 3
jne 0x4027a8
mov edi, dword [ebp - 8]
and eax, 0xfff
add eax, dword [ebp - 0x10]
add dword [eax + esi], edi
mov edi, dword [ebp - 0xc]
dec ebx
add ecx, 2
dec ebx
jne 0x402752
mov eax, dword [ebp - 0x14]
sub edx, dword [eax]
jne 0x40273a
xor ebx, ebx
cmp dword [edi + 0x84], ebx
je 0x40279f
mov edi, dword [edi + 0x80]
add edi, esi
jne 0x402852
mov ebx, esi
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
push ecx
push 0x401648
call fcn.0040249a
xor ebx, ebx
jmp 0x4027a1
add eax, esi
mov dword [ebp - 0x14], eax
call fcn.00403526
sub eax, dword [0x406040]
cmp eax, 0x7fff
ja 0x402715
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x402872
mov eax, dword [edi]
mov edx, dword [edi + 0x10]
add eax, esi
add edx, esi
mov dword [ebp - 4], edx
jmp 0x402846
mov edx, ebx
test ecx, ecx
js 0x402819
lea eax, [esi + 2]
add eax, ecx
push eax
mov dword [ebp - 0x18], eax
call dword [0x406018]
mov word [ebp - 0x1c], ax
mov word [ebp - 0x1a], ax
pop ecx
lea edx, [ebp - 0x1c]
mov eax, ebx
jmp 0x40281c
movzx eax, word [eax]
lea ecx, [ebp - 0xc]
push ecx
push eax
push edx
push dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
call dword [0x406034]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x402862
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
add eax, 4
add ecx, 4
mov dword [ebp - 4], ecx
mov ecx, dword [eax]
mov dword [ebp - 8], eax
test ecx, ecx
jne 0x4027f4
add edi, 0x14
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x4027b7
jmp 0x40279f
push ecx
push 0x401668
call fcn.0040249a
jmp 0x4027a1
push ecx
push 0x401658
jmp 0x402868