Function at 0x4158a0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push ebx
push esi
push edi
lea edi, [ebp - 0x9c]
mov ecx, 0x27
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov esi, esp
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
cmp esi, esp
call fcn.00419880
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x4158e8
mov eax, 0x200
jmp 0x415b57
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x3c]
and eax, 1
test eax, eax
je 0x415908
mov ecx, dword [ebp - 0x40]
or ecx, 1
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x3c]
and edx, 2
test edx, edx
je 0x41591a
mov eax, dword [ebp - 0x40]
or al, 2
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x3c]
and ecx, 4
test ecx, ecx
je 0x41592d
mov edx, dword [ebp - 0x40]
or edx, 4
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x3c]
and eax, 0x10
test eax, eax
je 0x415940
mov ecx, dword [ebp - 0x40]
or ecx, 0x10
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x3c]
and edx, 0x20
test edx, edx
je 0x415952
mov eax, dword [ebp - 0x40]
or al, 0x20
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x3c]
and ecx, 0x10
test ecx, ecx
je 0x41596a
mov edx, dword [ebp - 0x40]
or edx, 0x40000000
mov dword [ebp - 0x40], edx
jmp 0x415975
mov eax, dword [ebp - 0x40]
or eax, 0x80000000
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
or ecx, 0x1000000
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x3c]
and edx, 1
test edx, edx
je 0x41598d
jmp 0x415998
mov eax, dword [ebp - 0x40]
or eax, 0x800000
mov dword [ebp - 0x40], eax
mov esi, esp
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, esp
call fcn.00419880
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0x28
jbe 0x415ab0
mov esi, esp
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, esp
call fcn.00419880
mov esi, esp
push 0
lea eax, [ebp - 0x44]
push eax
push 2
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00419880
mov esi, esp
push 0
push 0
push 0x24
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, esp
call fcn.00419880
mov esi, esp
push 0
lea ecx, [ebp - 0x44]
push ecx
push 4
lea edx, [ebp - 0x50]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00419880
mov ecx, dword [ebp - 0x4c]
and ecx, 0xffff
cmp ecx, 0x54ad
jne 0x415ab0
mov edx, dword [ebp - 0x50]
add edx, 0x34
cmp dword [ebp - 0x48], edx
jbe 0x415ab0
mov esi, esp
push 0
push 0
mov eax, dword [ebp - 0x50]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, esp
call fcn.00419880
mov esi, esp
push 0
lea edx, [ebp - 0x44]
push edx
push 4
lea eax, [ebp - 0x54]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00419880
cmp dword [ebp - 0x54], 0x5a4d
je 0x415aa4
cmp dword [ebp - 0x54], 0x454e
je 0x415aa4
cmp dword [ebp - 0x54], 0x454c
je 0x415aa4
cmp dword [ebp - 0x54], 0x4550
jne 0x415ab0
mov edx, dword [ebp - 0x40]
or edx, 0x400000
mov dword [ebp - 0x40], edx
cmp dword [ebp + 0xc], 0
je 0x415abe
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x40]
mov dword [eax], ecx
cmp dword [ebp + 0x10], 0
je 0x415acc
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x48]
mov dword [edx], eax
cmp dword [ebp + 0x14], 0
je 0x415b1c
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.00401244
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.00401244
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x30]
push eax
call fcn.00401244
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], edx
cmp dword [ebp + 0x18], 0
je 0x415b55
lea edx, [ebp - 0x5c]
push edx
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.004013f7
add esp, 0x10
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
mov ecx, dword [ebp - 0x58]
and ecx, 0xffff
shl ecx, 0x10
or eax, ecx
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x9c
cmp ebp, esp
call fcn.00419880
mov esp, ebp
pop ebp
ret