Function at 0x805f10
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
push esi
cmp dword [ebp + 0xc], 0x40
jae 0x805f27
xor eax, eax
jmp 0x806518
cmp dword [ebp + 8], 0
jne 0x805f34
xor eax, eax
jmp 0x806518
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x5a4d
je 0x805f51
xor eax, eax
jmp 0x806518
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
add ecx, 0xf8
cmp dword [ebp + 0xc], ecx
jae 0x805f69
xor eax, eax
jmp 0x806518
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx], 0x4550
je 0x805f87
xor eax, eax
jmp 0x806518
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov ax, word [edx + 0x16]
and eax, 0x2000
test eax, eax
jne 0x805fa0
xor eax, eax
jmp 0x806518
mov ecx, dword [ebp - 0x1c]
xor edx, edx
mov dx, word [ecx + 0x16]
and edx, 2
test edx, edx
jne 0x805fb7
xor eax, eax
jmp 0x806518
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov cx, word [eax + 0x14]
cmp ecx, 0xe0
je 0x805fcf
xor eax, eax
jmp 0x806518
mov edx, dword [ebp - 0x1c]
add edx, 0xf8
mov dword [ebp - 8], edx
mov dword [ebp - 0x14], 0
jmp 0x805fed
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x1c]
xor edx, edx
mov dx, word [ecx + 6]
cmp dword [ebp - 0x14], edx
jge 0x806023
mov eax, dword [ebp - 0x14]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax + 0x14]
mov edx, dword [ebp - 8]
add eax, dword [edx + ecx + 0x10]
cmp eax, dword [ebp + 0xc]
jbe 0x806021
xor eax, eax
jmp 0x806518
jmp 0x805fe4
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x54]
mov ecx, dword [ebp - 4]
lea eax, [eax + ecx - 1]
xor edx, edx
div dword [ebp - 4]
imul eax, dword [ebp - 4]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], 0
jmp 0x806057
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov cx, word [eax + 6]
cmp dword [ebp - 0x14], ecx
jge 0x8060e0
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [eax + edx + 8]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [eax + edx + 0x10]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
cmp edx, dword [ebp - 0x30]
jle 0x806098
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x278], eax
jmp 0x8060a1
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x278], ecx
mov edx, dword [ebp - 0x278]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x14]
imul eax, eax, 0x28
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax + 0xc]
add edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 4]
lea eax, [edx + eax - 1]
xor edx, edx
div dword [ebp - 4]
imul eax, dword [ebp - 4]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x34]
jge 0x8060db
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x2c], edx
jmp 0x80604e
cmp dword [ebp - 0x2c], 0
jne 0x8060ed
xor eax, eax
jmp 0x806518
push 0x40
push 0x3000
mov eax, dword [ebp - 0x2c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc_1]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x806110
xor eax, eax
jmp 0x806518
mov ecx, dword [ebp - 0x1c]
xor edx, edx
mov dx, word [ecx + 6]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x54]
add ecx, edx
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.0083b040
add esp, 0xc
mov dword [ebp - 0x14], 0
jmp 0x806147
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov ax, word [edx + 6]
cmp dword [ebp - 0x14], eax
jge 0x8061b7
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 8]
cmp dword [edx + ecx + 0xc], 0
je 0x806175
mov eax, dword [ebp - 0x14]
imul eax, eax, 0x28
mov ecx, dword [ebp - 8]
cmp dword [ecx + eax + 0x10], 0
jne 0x806177
jmp 0x80613e
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax + edx + 0xc]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [eax + edx + 0x10]
push ecx
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + edx + 0x14]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call fcn.0083b040
add esp, 0xc
jmp 0x80613e
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
add eax, 0xf8
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx + 0xa0], 0
jbe 0x8062ac
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0xa4], 0
jbe 0x8062ac
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
add eax, dword [edx + 0xa0]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x44]
add edx, dword [eax + 4]
test edx, edx
je 0x8062ac
mov ecx, dword [ebp - 0x44]
add ecx, 8
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 4]
sub eax, 8
shr eax, 1
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x54], 0
jmp 0x80624b
mov ecx, dword [ebp - 0x54]
add ecx, 1
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x54]
cmp edx, dword [ebp - 0x4c]
jge 0x80629b
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
xor edx, edx
mov dx, word [ecx + eax*2]
and edx, 0xf000
cmp edx, 0x3000
jne 0x806299
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax]
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
xor esi, esi
mov si, word [eax + edx*2]
and esi, 0xfff
add ecx, esi
mov dword [ebp - 0x58], ecx
mov ecx, dword [ebp - 0x58]
mov edx, dword [ecx]
add edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x58]
mov dword [eax], edx
jmp 0x806242
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x44]
add edx, dword [ecx + 4]
mov dword [ebp - 0x44], edx
jmp 0x80620f
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x80]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
je 0x8064b1
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x20]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
cmp dword [eax], 0
je 0x8064b1
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x18]
add edx, dword [ecx + 0x10]
mov dword [ebp - 0x264], edx
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax]
mov dword [ebp - 0x26c], ecx
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x18]
add eax, dword [edx + 0xc]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x14], 0
jmp 0x806312
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0x100
jge 0x806342
mov edx, dword [ebp - 0x60]
add edx, dword [ebp - 0x14]
xor eax, eax
mov al, byte [edx]
test eax, eax
jne 0x80632b
jmp 0x806342
mov ecx, dword [ebp - 0x60]
add ecx, dword [ebp - 0x14]
movzx dx, byte [ecx]
mov eax, dword [ebp - 0x14]
mov word [ebp + eax*2 - 0x260], dx
jmp 0x806309
cmp dword [ebp - 0x14], 0x100
jl 0x806363
push 0x8000
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree_1]
xor eax, eax
jmp 0x806518
mov edx, dword [ebp - 0x14]
mov word [ebp + edx*2 - 0x260], 0
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x268], eax
cmp dword [ebp - 0x268], 0
jne 0x80639f
lea ecx, [ebp - 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x268], eax
cmp dword [ebp - 0x268], 0
jne 0x8063c0
push 0x8000
push 0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree_1]
xor eax, eax
jmp 0x806518
mov dword [ebp - 0x14], 0
jmp 0x8063d2
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x26c]
cmp dword [edx + ecx*4], 0
jne 0x8063e6
jmp 0x8064a3
mov dword [ebp - 0x270], 0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x26c]
mov edx, dword [ecx + eax*4]
and edx, 0x80000000
test edx, edx
je 0x80642e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x26c]
mov edx, dword [ecx + eax*4]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress_1]
mov dword [ebp - 0x270], eax
jmp 0x806460
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x26c]
mov eax, dword [ebp - 0x18]
add eax, dword [edx + ecx*4]
mov dword [ebp - 0x274], eax
mov ecx, dword [ebp - 0x274]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x268]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress_1]
mov dword [ebp - 0x270], eax
cmp dword [ebp - 0x270], 0
je 0x806489
push 4
lea eax, [ebp - 0x270]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x264]
lea eax, [edx + ecx*4]
push eax
call fcn.0083b040
add esp, 0xc
jmp 0x80649e
push 0x8000
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree_1]
xor eax, eax
jmp 0x806518
jmp 0x8063c9
mov edx, dword [ebp - 0x5c]
add edx, 0x14
mov dword [ebp - 0x5c], edx
jmp 0x8062cb
lea eax, [ebp - 0x28]
push eax
push 0x40
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x34], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x28]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
push 0
push 1
mov ecx, dword [ebp - 0x18]
push ecx
call dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x806515
push 0
push 0
mov edx, dword [ebp - 0x18]
push edx
call dword [ebp - 0xc]
push 0x8000
push 0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree_1]
mov dword [ebp - 0xc], 0
xor eax, eax
jmp 0x806518
mov eax, dword [ebp - 0x18]
pop esi
mov esp, ebp
pop ebp
ret 8