Function at 0x4023de
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x160
mov eax, dword [0x43b080]
xor eax, esp
mov dword [esp + 0x15c], eax
push esi
push edi
mov edi, ecx
push 0
push 0
mov dword [esp + 0x28], edi
mov eax, dword [edi + 0x168]
push eax
mov dword [esp + 0x1c], eax
call fcn.00414f22
push dword [esp + 0x1c]
lea esi, [edi + 0x18]
push 1
push 0x40
push esi
call fcn.00415212
mov eax, 0x5a4d
add esp, 0x1c
cmp word [esi], ax
jne 0x4027bd
push 0
push dword [edi + 0x54]
push dword [esp + 0x18]
call fcn.00414f22
push dword [esp + 0x1c]
lea esi, [edi + 0x58]
push 1
push 0xf8
push esi
call fcn.00415212
add esp, 0x1c
cmp dword [esi], 0x4550
jne 0x4027bd
lea esi, [edi + 0x150]
mov dword [esp + 0xc], 0x28
mov eax, dword [esi + 4]
mov dword [esp + 0x14], eax
sub eax, dword [esi]
cdq
idiv dword [esp + 0xc]
movzx ecx, word [edi + 0x5e]
mov dword [esp + 0x1c], eax
cmp ecx, eax
jae 0x402496
imul eax, ecx, 0x28
add eax, dword [esi]
jmp 0x4024db
jbe 0x4024de
mov eax, dword [esi + 8]
sub eax, dword [esi]
cdq
idiv dword [esp + 0xc]
cmp ecx, eax
jbe 0x4024b1
push ecx
push ecx
mov ecx, esi
call fcn.00402c05
jmp 0x4024de
sub ecx, dword [esp + 0x1c]
je 0x4024d7
imul esi, ecx, 0x28
push esi
push 0
push dword [esp + 0x1c]
call fcn.0040e450
mov eax, dword [esp + 0x20]
add esp, 0xc
add eax, esi
lea esi, [edi + 0x150]
jmp 0x4024db
mov eax, dword [esp + 0x14]
mov dword [esi + 4], eax
lea ecx, [edi + 0x150]
mov esi, dword [esp + 0x10]
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
cdq
idiv dword [esp + 0xc]
push esi
push eax
push dword [esp + 0x14]
push dword [ecx]
call fcn.00415212
add esp, 0x10
cmp dword [edi + 0xdc], 0
je 0x4025cd
push 0
push dword [edi + 0xd8]
mov ecx, edi
call fcn.004023b1
push eax
push esi
call fcn.00414f22
push esi
push 1
lea eax, [esp + 0x60]
push 0x14
push eax
call fcn.00415212
add esp, 0x1c
cmp dword [esp + 0x4c], 0
je 0x4025cd
lea eax, [edi + 0x15c]
mov dword [esp + 0x18], eax
push 5
pop ecx
lea esi, [esp + 0x4c]
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [eax + 4]
cmp esi, dword [eax + 8]
je 0x402595
push 0x38
push 0
push esi
call fcn.0040e450
add esp, 0xc
xor eax, eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], 0xf
mov byte [esi + 0x14], al
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov ecx, dword [esp + 0x18]
mov edi, dword [ecx + 4]
lea eax, [edi + 0x38]
mov dword [ecx + 4], eax
jmp 0x40259f
push esi
mov ecx, eax
call fcn.004029df
mov edi, eax
push 5
pop ecx
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x4c]
push esi
push 1
push 0x14
push eax
call fcn.00415212
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp dword [esp + 0x4c], 0
jne 0x40254c
mov edi, dword [esp + 0x20]
mov ecx, dword [edi + 0x160]
mov eax, dword [edi + 0x15c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x1c], eax
cmp eax, ecx
je 0x4027b9
add eax, 0x30
mov dword [esp + 0xc], eax
push 0
push dword [eax - 0x24]
mov ecx, edi
call fcn.004023b1
push eax
push esi
call fcn.00414f22
push esi
lea eax, [esp + 0x70]
push 0x100
push eax
call fcn.0041502e
lea ecx, [esp + 0x78]
add esp, 0x18
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40261d
sub ecx, edx
lea eax, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x10]
push eax
add ecx, 0xffffffe4
call fcn.00402904
mov eax, dword [esp + 0xc]
mov ecx, edi
push 0
push dword [eax - 0x20]
call fcn.004023b1
push eax
push esi
call fcn.00414f22
push esi
push 1
lea eax, [esp + 0x2c]
push 4
push eax
call fcn.00415212
mov esi, dword [esp + 0x34]
add esp, 0x1c
test esi, esi
je 0x4026da
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
cmp eax, dword [edx + 4]
je 0x4026ac
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], ecx
mov dword [eax + 0x28], ecx
lea ecx, [eax + 0x10]
xor eax, eax
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
mov byte [ecx], 0
mov ecx, dword [edx]
lea eax, [ecx + 0x2c]
mov dword [edx], eax
jmp 0x4026b7
push eax
lea ecx, [edx - 4]
call fcn.00402aed
mov ecx, eax
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
mov dword [ecx], esi
push 1
push 4
push eax
call fcn.00415212
mov esi, dword [esp + 0x28]
add esp, 0x10
test esi, esi
jne 0x402669
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0xc]
mov esi, dword [eax]
mov ecx, dword [eax - 4]
mov edx, dword [eax - 0x20]
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], ecx
cmp ecx, esi
je 0x402799
mov eax, edx
add edx, 4
mov dword [esp + 0x28], edx
mov edx, dword [ecx]
mov dword [ecx + 8], eax
mov eax, edx
shr eax, 0x1f
mov byte [ecx + 4], al
test al, al
je 0x402718
movzx eax, dx
mov dword [ecx + 0xc], eax
jmp 0x402782
push 0
push edx
mov ecx, edi
call fcn.004023b1
mov esi, dword [esp + 0x14]
push eax
push esi
call fcn.00414f22
mov eax, dword [esp + 0x20]
push esi
push 1
add eax, 0x28
push 2
push eax
call fcn.00415212
push esi
lea eax, [esp + 0x80]
push 0x100
push eax
call fcn.0041502e
lea ecx, [esp + 0x88]
add esp, 0x28
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40275f
sub ecx, edx
lea eax, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x18]
push eax
lea ecx, [ecx + 0x10]
call fcn.00402904
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
add ecx, 0x2c
mov dword [esp + 0x14], ecx
cmp ecx, esi
jne 0x4026f6
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x1c]
add eax, 0x38
mov esi, dword [esp + 0x10]
add ecx, 0x38
mov dword [esp + 0x1c], ecx
mov dword [esp + 0xc], eax
cmp ecx, dword [esp + 0x2c]
jne 0x4025f0
mov al, 1
jmp 0x4027bf
xor al, al
mov ecx, dword [esp + 0x164]
pop edi
pop esi
xor ecx, esp
call fcn.0040c9a4
mov esp, ebp
pop ebp
ret