Function at 0x40393c
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1cc
push edi
push esi
push ebx
add esp, 0xfffffff4
mov eax, dword [ebp + 8]
push eax
call fcn.00409c90
mov dword [ebp - 0x18c], eax
and al, 0xfe
add esp, 0xfffffff4
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00409c98
mov dword [ebp - 0x190], 0xffffffff
mov dword [ebp - 0x194], 0
add esp, 0xfffffff4
push 0x14
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x198], eax
push eax
call fcn.00409c30
mov dword [ebp - 0x19c], 0
mov byte [ebp - 0x19d], 0
add esp, 0x30
jmp 0x404050
add esp, 0xfffffff8
lea eax, [ebp - 0x161]
push eax
push edi
call fcn.004038a8
add esp, 0x10
test al, al
je 0x4040a7
cmp byte [ebp - 0x161], 0
jne 0x4040a7
push 0
push 0
push 0
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
lea edx, [ebp - 0x168]
mov dword [ebp - 0x1a8], edx
push edx
push 0x40
lea eax, [ebp - 0x60]
push eax
push edi
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
cmp word [ebp - 0x60], 0x5a4d
jne 0x4040a7
push 0
push 0
push dword [ebp - 0x24]
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x1a8]
push eax
push 4
lea eax, [ebp - 0x16c]
push eax
push edi
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
cmp dword [ebp - 0x16c], 0x4550
jne 0x4040a7
add esp, 0xfffffff4
push 0
mov edx, dword [ebp - 0x1a8]
push edx
push 0x14
lea eax, [ebp - 0x80]
push eax
push edi
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
cmp word [ebp - 0x80], 0x14c
jne 0x4040a7
mov eax, dword [ebp - 0x70]
and eax, 0x2012ffff
cmp eax, 0x200e0
jne 0x4040a7
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x1a8]
push eax
push 0xe0
lea eax, [ebp - 0x160]
push eax
push edi
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
cmp word [ebp - 0x160], 0x10b
jne 0x4040a7
cmp word [ebp - 0x11c], 2
jne 0x4040a7
movzx eax, word [ebp - 0x7e]
lea ebx, [eax + eax*4]
shl ebx, 3
add esp, 0xfffffff4
push ebx
call fcn.00409c48
mov dword [ebp - 0x194], eax
add esp, 0x10
test eax, eax
je 0x4040c2
add esp, 0xfffffff4
push 0
mov edx, dword [ebp - 0x1a8]
push edx
push ebx
push eax
push edi
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
movzx eax, word [ebp - 0x7e]
push eax
mov edx, dword [ebp - 0x194]
push edx
push dword [ebp - 0xf8]
push edi
call fcn.00403754
add esp, 0x10
test al, al
je 0x4040a7
add esp, 0xfffffff4
mov eax, dword [ebp - 0x198]
push eax
movzx eax, word [ebp - 0x7e]
push eax
mov edx, dword [ebp - 0x194]
push edx
push dword [ebp - 0xf0]
push edi
call fcn.00403670
add esp, 0x20
test al, al
je 0x4040a7
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x403c97
push 0xc000
push dword [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call fcn.00403650
add esp, 0x10
test al, al
je 0x4040a7
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x403c97
mov dword [ebp - 0x1a4], esi
push 2
push 0
mov eax, esi
neg eax
push eax
push edi
call fcn.00409c80
mov ebx, eax
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x14]
cmp edx, ebx
jbe 0x403bd8
mov eax, edx
sub eax, ebx
sub esi, eax
mov dword [ebp - 0x1a4], esi
mov ebx, edx
add esp, 0xfffffff4
mov eax, dword [ebp - 0x1a4]
push eax
call fcn.00409c48
mov dword [ebp - 0x19c], eax
add esp, 0x10
test eax, eax
je 0x4040a7
push 0
push 0
push ebx
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
mov edx, dword [ebp - 0x1a8]
push edx
mov eax, dword [ebp - 0x1a4]
push eax
mov edx, dword [ebp - 0x19c]
push edx
push edi
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
push 0
push 0
push dword [ebp - 0x14]
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x1a8]
push eax
mov edx, dword [ebp - 0x1a4]
push edx
mov eax, dword [ebp - 0x19c]
push eax
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
add esp, 0xfffffff4
mov edx, dword [ebp - 0x19c]
push edx
call fcn.00409c40
push 2
push 0
mov eax, dword [ebp - 0x18]
neg eax
push eax
push edi
call fcn.00409c80
add esp, 0xfffffff4
push edi
call fcn.00409ca8
push edi
call fcn.00409cb0
add esp, 0x1c
mov eax, dword [ebp - 0x18]
add eax, 0x8a00
mov dword [ebp - 0x1a4], eax
push 2
push 0
push 0
push edi
call fcn.00409c80
mov ebx, eax
cmp ebx, dword [ebp - 0x1a4]
jae 0x403cc9
mov eax, dword [ebp - 0x1a4]
mov dword [ebp - 0x1a4], ebx
mov ebx, eax
add esp, 0xfffffff4
mov edx, dword [ebp - 0x1a4]
push edx
call fcn.00409c48
mov dword [ebp - 0x19c], eax
add esp, 0x10
test eax, eax
je 0x4040a7
push 0
push 0
push 0
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
lea esi, [ebp - 0x168]
push esi
mov eax, dword [ebp - 0x1a4]
push eax
mov edx, dword [ebp - 0x19c]
push edx
push edi
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
add esp, 0xfffffff8
mov eax, dword [ebp - 0x1a4]
push eax
mov edx, dword [ebp - 0x19c]
push edx
call fcn.00403448
push 0
push 0
push ebx
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
mov eax, dword [ebp - 0x1a4]
push eax
mov edx, dword [ebp - 0x19c]
push edx
push edi
call fcn.00409ca0
add esp, 0x1c
test eax, eax
je 0x4040a7
add esp, 0xfffffff4
mov eax, dword [ebp - 0x19c]
push eax
call fcn.00409c40
mov dword [ebp - 0x19c], 0
add esp, 0xfffffffc
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [0x40a034]
call fcn.00409cb8
mov dword [ebp - 0x190], eax
add esp, 0x14
cmp eax, 0xffffffff
je 0x4040a7
add esp, 0xfffffff4
push 0x8a00
call fcn.00409c48
mov dword [ebp - 0x19c], eax
add esp, 0x10
test eax, eax
je 0x4040a7
add esp, 0xfffffff4
push 0
push esi
push 0x8a00
mov edx, eax
push edx
mov eax, dword [ebp - 0x190]
push eax
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
push 0
push 0
push 0
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 0x8a00
mov edx, dword [ebp - 0x19c]
push edx
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
add esp, 0xfffffff4
mov eax, dword [ebp - 0x19c]
push eax
call fcn.00409c40
mov dword [ebp - 0x19c], 0
add esp, 0x10
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x403e5e
add esp, 0xfffffff4
push 0
push esi
push eax
push dword [ebp - 0x10]
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
mov edx, dword [ebp - 0x18]
add edx, 0xc000
mov dword [ebp - 0x1b8], edx
mov dword [ebp - 0x170], edx
mov eax, dword [ebp - 0x140]
mov dword [ebp - 0x1b4], eax
mov eax, edx
xor edx, edx
div dword [ebp - 0x1b4]
mov ecx, edx
test ecx, ecx
je 0x403ea7
sub dword [ebp - 0x1b4], ecx
mov eax, dword [ebp - 0x1b8]
add eax, dword [ebp - 0x1b4]
mov dword [ebp - 0x170], eax
push 0
push 0
push 0xd0
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 4
lea eax, [ebp - 0x170]
push eax
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
push 0
push 0
push 0x10c
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 4
mov edx, dword [ebp - 0x198]
push edx
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
push 0
push 0
push 0x220
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 4
mov eax, dword [ebp - 0x198]
push eax
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
push 0
push 0
push 0x228
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 4
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
push 0
push 0
push 0x7c0c
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 4
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
add esp, 0xfffffff4
push 0
push esi
push 4
lea eax, [ebp - 0x1c]
push eax
push edi
call fcn.00409ca0
add esp, 0xc
test eax, eax
je 0x4040a7
add esp, 0xfffffff4
push 0x400
call fcn.00409c48
mov dword [ebp - 0x19c], eax
add esp, 0x10
test eax, eax
je 0x4040a7
push 2
push 0
push 0xfffffc00
mov edx, dword [ebp - 0x190]
push edx
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 0x400
mov eax, dword [ebp - 0x19c]
push eax
mov edx, dword [ebp - 0x190]
push edx
call fcn.00409c88
add esp, 0xc
test eax, eax
je 0x4040a7
add esp, 0xfffffff8
push 0x400
mov eax, dword [ebp - 0x19c]
push eax
call fcn.00403448
push 2
push 0
push 0
push edi
call fcn.00409c80
add esp, 0xfffffff4
push 0
push esi
push 0x400
mov edx, dword [ebp - 0x19c]
push edx
push edi
call fcn.00409ca0
add esp, 0x1c
test eax, eax
je 0x4040a7
mov byte [ebp - 0x19d], 1
jmp 0x4040a7
add esp, 0xfffffffc
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call fcn.00409cb8
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x4040a7
lea eax, [ebp - 0x178]
push eax
lea eax, [ebp - 0x180]
push eax
lea eax, [ebp - 0x188]
push eax
push edi
call fcn.00409cc0
push 2
push 0
push 0
push edi
call fcn.00409c80
cmp eax, 0x18fff
ja 0x4039b0
cmp dword [ebp - 0x194], 0
je 0x4040c2
add esp, 0xfffffff4
mov edx, dword [ebp - 0x194]
push edx
call fcn.00409c40
add esp, 0x10
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4040d5
add esp, 0xfffffff4
push eax
call fcn.00409c40
add esp, 0x10
cmp dword [ebp - 0x19c], 0
je 0x4040f0
add esp, 0xfffffff4
mov eax, dword [ebp - 0x19c]
push eax
call fcn.00409c40
add esp, 0x10
cmp edi, 0xffffffff
je 0x40411c
lea eax, [ebp - 0x178]
push eax
lea eax, [ebp - 0x180]
push eax
lea eax, [ebp - 0x188]
push eax
push edi
call fcn.00409cc8
add esp, 0xfffffff4
push edi
call fcn.00409cd0
add esp, 0xc
add esp, 0xfffffff8
mov edx, dword [ebp - 0x18c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00409c98
add esp, 8
cmp dword [ebp - 0x190], 0xffffffff
je 0x40414a
add esp, 0xfffffff4
mov edx, dword [ebp - 0x190]
push edx
call fcn.00409cd0
mov al, byte [ebp - 0x19d]
lea esp, [ebp - 0x1d8]
pop ebx
pop esi
pop edi
leave
ret