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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x59b530
push 0x49dd40
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x59ece0]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0x15c], 0
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x41d561
push 0
lea eax, [ebp - 0x158]
push eax
push 0x40
lea ecx, [ebp - 0x154]
push ecx
push esi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
je 0x41d55a
cmp dword [ebp - 0x158], 0x40
jne 0x41d55a
mov edx, 0x5a4d
cmp word [ebp - 0x154], dx
jne 0x41d55a
push 0
push 0
mov eax, dword [ebp - 0x118]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x118]
jne 0x41d55a
push 0
lea ecx, [ebp - 0x158]
push ecx
push 0xf8
lea edx, [ebp - 0x114]
push edx
push esi
call edi
test eax, eax
je 0x41d55a
cmp dword [ebp - 0x158], 0xf8
jne 0x41d55a
cmp dword [ebp - 0x114], 0x4550
jne 0x41d55a
cmp word [ebp - 0x10e], 0
je 0x41d55a
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x168], eax
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x164], ecx
test eax, eax
je 0x41d55a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x158], eax
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x170], ebx
test ebx, ebx
je 0x41d55a
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x158]
push edx
mov eax, dword [ebp - 0x158]
push eax
push ebx
push esi
call edi
test eax, eax
jne 0x41d57f
push 0x8000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0049d4b1
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x118]
lea edi, [ebx + ecx]
mov edx, dword [ebp - 0x168]
push edx
push edi
call fcn.0041d340
add esp, 8
add eax, ebx
lea edx, [eax + 0x10]
movzx ecx, word [eax + 0xe]
movzx esi, word [eax + 0xc]
add ecx, esi
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 0x160], edx
mov esi, ecx
dec ecx
mov dword [ebp - 0x16c], ecx
test esi, esi
je 0x41d6b2
test dword [edx], 0x80000000
jne 0x41d6c3
cmp word [edx], 0xa
jne 0x41d6c3
mov ecx, dword [edx + 4]
and ecx, 0x7fffffff
lea esi, [ecx + eax + 0x10]
movzx edx, word [ecx + eax + 0xe]
movzx ecx, word [ecx + eax + 0xc]
add edx, ecx
mov dword [ebp - 0x178], edx
mov dword [ebp - 0x174], esi
mov ecx, edx
dec edx
mov dword [ebp - 0x178], edx
test ecx, ecx
je 0x41d6b2
mov ecx, 0x360
cmp word [esi], cx
jne 0x41d6bb
mov ecx, dword [esi + 4]
test ecx, ecx
jns 0x41d641
and ecx, 0x7fffffff
mov esi, dword [ecx + eax + 0x14]
add esi, eax
jmp 0x41d644
lea esi, [ecx + eax]
xor eax, eax
mov dword [edi + 0x58], eax
mov dword [edi + 0x98], eax
mov dword [edi + 0x9c], eax
mov dword [ebp - 0x190], 0x18
mov dword [ebp - 0x18c], ebx
mov edx, dword [ebp - 0x168]
push edx
push edi
call fcn.0041d340
mov dword [ebp - 0x188], eax
mov eax, 0x596fd8
mov dword [ebp - 0x184], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x17c], eax
mov ecx, dword [esi]
push ecx
push edi
call fcn.0041d340
add eax, ebx
mov dword [ebp - 0x180], eax
lea edx, [ebp - 0x190]
push edx
call fcn.0041d700
add esp, 0x14
mov dword [ebp - 0x15c], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x41d6e1
add esi, 8
jmp 0x41d607
add edx, 8
jmp 0x41d5bb
test ebx, ebx
je 0x41d6f3
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x15c]
jmp 0x41d563