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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x579258]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x50], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x58], ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
mov dword [ebp - 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x41d6f0
mov eax, 0x200
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00460412
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [ebp - 0x38]
mov eax, ebx
push esi
mov esi, ebx
and esi, 1
mov ecx, esi
or ecx, 2
and al, 2
mov eax, ebx
cmove ecx, esi
mov edx, ecx
or edx, 4
and al, 4
push edi
cmove edx, ecx
mov edi, 0x41000000
mov ecx, ebx
mov eax, edx
and ecx, 0x10
or eax, 0x10
test ecx, ecx
mov dword [ebp - 0x40], ecx
cmove eax, edx
mov edx, 0x81000000
mov ecx, eax
or ecx, 0x20
and bl, 0x20
cmove ecx, eax
mov eax, dword [ebp - 0x40]
test eax, eax
cmove edi, edx
or edi, ecx
test esi, esi
jne 0x41d759
test eax, eax
mov edi, 0x41800000
mov edx, 0x81800000
cmove edi, edx
or edi, ecx
mov ebx, dword [ebp - 0x3c]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x28
jbe 0x41d809
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 2
lea eax, [ebp - 0x3c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 0x3c], ax
jne 0x41d809
mov ecx, dword [ebp - 0x40]
lea eax, [ecx + 0x34]
cmp esi, eax
jbe 0x41d809
push 0
push 0
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x48]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x48]
cmp eax, 0x5a4d
je 0x41d803
cmp eax, 0x454e
je 0x41d803
cmp eax, 0x454c
je 0x41d803
cmp eax, 0x4550
jne 0x41d809
or edi, 0x400000
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x41d812
mov dword [eax], edi
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x41d81b
mov dword [eax], esi
mov ebx, dword [ebp - 0x54]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x41d894
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
sub ecx, 0xd53e8000
push 0
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.004604a0
mov dword [ebx], eax
mov ecx, edi
sub ecx, 0xd53e8000
mov dword [ebx + 4], edx
push 0
mov eax, esi
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.004604a0
mov ecx, dword [ebp - 0x34]
mov dword [ebx + 8], eax
sub ecx, 0xd53e8000
mov eax, dword [ebp - 0x30]
push 0
push 0x989680
sbb eax, 0x19db1de
mov dword [ebx + 0xc], edx
push eax
push ecx
call fcn.004604a0
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov ebx, dword [ebp - 0x58]
test ebx, ebx
je 0x41d8bc
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x3c]
push eax
push esi
push edi
call fcn.0041d620
movzx ecx, word [ebp - 0x3c]
add esp, 0x10
movzx eax, word [ebp - 0x40]
shl ecx, 0x10
or ecx, eax
mov dword [ebx], ecx
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00460412
mov esp, ebp
pop ebp
ret