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

Disassembly:
push 0x190
push 0x60d8a8
call fcn.005b3940
xor esi, esi
mov dword [ebp - 0x170], esi
push esi
push esi
push 3
push esi
push 1
push accept
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x41eca3
push esi
lea eax, [ebp - 0x160]
push eax
push 0x40
lea eax, [ebp - 0x15c]
push eax
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
call ebx
test eax, eax
je 0x41ec9c
cmp dword [ebp - 0x160], 0x40
jne 0x41ec9c
mov eax, 0x5a4d
cmp word [ebp - 0x15c], ax
jne 0x41ec9c
push esi
push esi
push dword [ebp - 0x120]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x120]
jne 0x41ec9c
push esi
lea eax, [ebp - 0x160]
push eax
push 0xf8
lea eax, [ebp - 0x11c]
push eax
push edi
call ebx
test eax, eax
je 0x41ec9c
cmp dword [ebp - 0x160], 0xf8
jne 0x41ec9c
cmp dword [ebp - 0x11c], 0x4550
jne 0x41ec9c
cmp word [ebp - 0x116], si
je 0x41ec9c
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x168], ecx
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x184], eax
test ecx, ecx
je 0x41ec9c
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x160], eax
push 4
push 0x1000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x184], ebx
test ebx, ebx
je 0x41ec9c
push esi
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x160]
push eax
push dword [ebp - 0x160]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41ecb5
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
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
leave
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], esi
mov edx, dword [ebp - 0x120]
add edx, ebx
mov dword [ebp - 0x16c], edx
push dword [ebp - 0x168]
call fcn.0041ead8
pop ecx
add eax, ebx
mov dword [ebp - 0x164], eax
lea edx, [eax + 0x10]
movzx edi, word [eax + 0xe]
movzx ecx, word [eax + 0xc]
add edi, ecx
mov dword [ebp - 0x174], edi
mov dword [ebp - 0x180], edx
mov eax, edi
dec edi
mov dword [ebp - 0x174], edi
test eax, eax
je 0x41edf4
cmp dword [edx], esi
jl 0x41ee05
cmp word [edx], 0xa
jne 0x41ee05
mov eax, dword [edx + 4]
and eax, 0x7fffffff
add eax, dword [ebp - 0x164]
lea ecx, [eax + 0x10]
movzx edx, word [eax + 0xe]
movzx eax, word [eax + 0xc]
add edx, eax
mov dword [ebp - 0x178], edx
mov dword [ebp - 0x17c], ecx
mov eax, edx
dec edx
mov dword [ebp - 0x178], edx
test eax, eax
je 0x41edf4
mov eax, 0x360
cmp word [ecx], ax
jne 0x41edfd
mov edi, dword [ecx + 4]
test edi, edi
jns 0x41ed79
and edi, 0x7fffffff
add edi, dword [ebp - 0x164]
mov edi, dword [edi + 0x14]
mov eax, dword [ebp - 0x16c]
mov dword [eax + 0x58], esi
mov dword [eax + 0x98], esi
mov dword [eax + 0x9c], esi
mov dword [ebp - 0x1a0], 0x18
mov dword [ebp - 0x19c], ebx
push dword [ebp - 0x168]
mov edx, eax
call fcn.0041ead8
mov dword [ebp - 0x198], eax
mov dword [ebp - 0x194], 0x5f47e8
mov ecx, dword [ebp - 0x164]
mov eax, dword [ecx + edi + 4]
mov dword [ebp - 0x18c], eax
push dword [ecx + edi]
mov edx, dword [ebp - 0x16c]
call fcn.0041ead8
pop ecx
pop ecx
add eax, ebx
mov dword [ebp - 0x190], eax
lea ecx, [ebp - 0x1a0]
call fcn.0041ee3f
mov dword [ebp - 0x170], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x41ee23
add ecx, 8
jmp 0x41ed3e
add edx, 8
jmp 0x41ecf4
test ebx, ebx
je 0x41ee34
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x170]
jmp 0x41eca5