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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov byte [ebp - 5], 0
xor eax, eax
mov dword [ebx + 0x1c], eax
xor eax, eax
mov dword [ebx + 0x18], eax
xor eax, eax
mov dword [ebx + 0x20], eax
mov byte [ebx + 0x17], 0
push 0
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_GetFileSize_1
test eax, eax
jns 0x7f01b5
call fcn.004089ac
mov dword [ebx + 8], eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00424b18
push 0
lea eax, [ebp - 0x18]
push eax
push 0x7d0
lea eax, [ebx + 0x34]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile_1
test eax, eax
je 0x7f05f2
cmp byte [ebx + 0x34], 0x4d
jne 0x7f01f0
cmp byte [ebx + 0x35], 0x5a
je 0x7f0200
cmp byte [ebx + 0x34], 0x5a
jne 0x7f01fc
cmp byte [ebx + 0x35], 0x4d
je 0x7f0200
xor eax, eax
jmp 0x7f0202
mov al, 1
mov byte [ebx + 0x14], al
test al, al
je 0x7f0314
lea edx, [ebp - 0xc]
lea eax, [ebx + 0x70]
mov ecx, 4
call fcn.00407394
cmp dword [ebp - 0xc], 0x1001
jae 0x7f025e
mov eax, dword [ebp - 0xc]
cmp eax, 0x1000
jbe 0x7f0235
call fcn.004089ac
cmp byte [ebx + eax + 0x34], 0x50
jne 0x7f0253
mov eax, dword [ebp - 0xc]
inc eax
cmp eax, 0x1000
jbe 0x7f024c
call fcn.004089ac
cmp byte [ebx + eax + 0x34], 0x45
je 0x7f0257
xor eax, eax
jmp 0x7f0259
mov al, 1
mov byte [ebx + 0x15], al
jmp 0x7f0262
mov byte [ebx + 0x15], 0
cmp byte [ebx + 0x15], 0
je 0x7f02f8
cmp dword [ebp - 0xc], 0xfed
jae 0x7f029d
mov eax, dword [ebp - 0xc]
add eax, 4
cmp eax, 0x1000
jbe 0x7f0287
call fcn.004089ac
lea eax, [ebx + eax + 0x34]
lea edx, [ebx + 0x603a]
mov ecx, 0x14
call fcn.00407394
jmp 0x7f02af
lea eax, [ebx + 0x603a]
xor ecx, ecx
mov edx, 0x14
call fcn.00407f88
mov eax, dword [ebp - 0xc]
add eax, 0xe0
cmp eax, 0x1001
jae 0x7f02e6
mov eax, dword [ebp - 0xc]
add eax, 0x18
cmp eax, 0x1000
jbe 0x7f02d0
call fcn.004089ac
lea eax, [ebx + eax + 0x34]
lea edx, [ebx + 0x604e]
mov ecx, 0xe0
call fcn.00407394
jmp 0x7f02f8
lea eax, [ebx + 0x604e]
xor ecx, ecx
mov edx, 0xe0
call fcn.00407f88
test word [ebx + 0x603a], 0x200
seta al
mov byte [ebx + 0x17], al
test byte [ebx + 0x604d], 0x20
setne al
mov byte [ebx + 0x16], al
cmp byte [ebx + 0x34], 0xd0
jne 0x7f033f
cmp byte [ebx + 0x35], 0xcf
jne 0x7f033f
cmp byte [ebx + 0x36], 0x11
jne 0x7f033f
cmp byte [ebx + 0x37], 0xe0
jne 0x7f033f
cmp byte [ebx + 0x38], 0xa1
jne 0x7f033f
cmp byte [ebx + 0x39], 0xb1
jne 0x7f033f
mov dword [ebx + 0x18], 1
xor eax, eax
cmp dword [ebp - 0x18], 0
jbe 0x7f0360
mov edi, dword [ebp - 0x18]
dec edi
test edi, edi
jl 0x7f0360
inc edi
xor esi, esi
movzx edx, byte [ebx + esi + 0x34]
imul edx, esi
add eax, edx
inc esi
dec edi
jne 0x7f0352
mov dword [ebx + 0x24], eax
mov ecx, 2
mov edx, 0xfffff830
mov eax, dword [ebp - 4]
call fcn.00424b18
push 0
lea eax, [ebp - 0x18]
push eax
push 0x7d0
lea eax, [ebx + 0x1035]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile_1
xor eax, eax
cmp dword [ebp - 0x18], 0
jbe 0x7f03b4
mov edi, dword [ebp - 0x18]
dec edi
test edi, edi
jl 0x7f03b4
inc edi
xor esi, esi
movzx edx, byte [ebx + esi + 0x1035]
imul edx, esi
add eax, edx
inc esi
dec edi
jne 0x7f03a3
mov dword [ebx + 0x28], eax
xor ecx, ecx
mov edx, 0x1388
mov eax, dword [ebp - 4]
call fcn.00424b18
push 0
lea eax, [ebp - 0x18]
push eax
push 0xc8
lea eax, [ebx + 0x2036]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile_1
xor eax, eax
cmp dword [ebp - 0x18], 0
jbe 0x7f0405
mov edi, dword [ebp - 0x18]
dec edi
test edi, edi
jl 0x7f0405
inc edi
xor esi, esi
movzx edx, byte [ebx + esi + 0x2036]
imul edx, esi
add eax, edx
inc esi
dec edi
jne 0x7f03f4
mov dword [ebx + 0x2c], eax
xor ecx, ecx
mov edx, 0x2710
mov eax, dword [ebp - 4]
call fcn.00424b18
push 0
lea eax, [ebp - 0x18]
push eax
push 0xc8
lea eax, [ebx + 0x3037]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile_1
xor eax, eax
cmp dword [ebp - 0x18], 0
jbe 0x7f0456
mov edi, dword [ebp - 0x18]
dec edi
test edi, edi
jl 0x7f0456
inc edi
xor esi, esi
movzx edx, byte [ebx + esi + 0x3037]
imul edx, esi
add eax, edx
inc esi
dec edi
jne 0x7f0445
mov dword [ebx + 0x30], eax
cmp byte [ebx + 0x15], 0
je 0x7f05ee
mov eax, dword [ebp - 0xc]
lea eax, [ebx + eax + 0x5c]
lea edx, [ebp - 0x10]
mov ecx, 4
call fcn.00407394
mov eax, dword [ebp - 0xc]
lea eax, [ebx + eax + 0x48]
lea edx, [ebp - 0x12]
mov ecx, 2
call fcn.00407394
mov eax, dword [ebp - 0xc]
lea eax, [ebx + eax + 0x3a]
lea edx, [ebp - 0x14]
mov ecx, 2
call fcn.00407394
cmp word [ebp - 0x14], 0x32
jae 0x7f05ee
movzx edi, word [ebp - 0x14]
dec edi
test edi, edi
jl 0x7f0539
inc edi
xor esi, esi
mov eax, dword [ebp - 0xc]
add eax, 0x18
movzx edx, word [ebp - 0x12]
add eax, edx
xor edx, edx
push edx
push eax
mov eax, esi
add eax, eax
add eax, eax
add eax, eax
lea eax, [eax + eax*4]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
lea eax, [ebx + eax + 0x34]
lea edx, [ebp - 0x40]
mov ecx, 0x28
call fcn.00407394
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x10]
ja 0x7f0535
mov edx, eax
add edx, dword [ebp - 0x38]
cmp edx, dword [ebp - 0x10]
jbe 0x7f0535
mov edx, dword [ebp - 0x10]
sub edx, eax
add edx, dword [ebp - 0x2c]
mov dword [ebx + 0x1c], edx
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.00424b18
push 0
lea eax, [ebp - 0x18]
push eax
push 0x1000
lea eax, [ebx + 0x4038]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile_1
jmp 0x7f0539
inc esi
dec edi
jne 0x7f04ba
xor eax, eax
mov dword [ebx + 0x20], eax
movzx edi, word [ebp - 0x14]
dec edi
test edi, edi
jl 0x7f05ab
inc edi
xor esi, esi
mov eax, dword [ebp - 0xc]
add eax, 0x18
movzx edx, word [ebp - 0x12]
add eax, edx
xor edx, edx
push edx
push eax
mov eax, esi
add eax, eax
add eax, eax
add eax, eax
lea eax, [eax + eax*4]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
lea eax, [ebx + eax + 0x34]
lea edx, [ebp - 0x40]
mov ecx, 0x28
call fcn.00407394
mov eax, dword [ebx + 0x20]
cdq
push edx
push eax
mov ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x2c]
mov eax, ecx
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x7f05a0
cmp eax, dword [esp]
pop edx
pop eax
jbe 0x7f05a7
jmp 0x7f05a4
pop edx
pop eax
jle 0x7f05a7
mov dword [ebx + 0x20], ecx
inc esi
dec edi
jne 0x7f054a
mov eax, dword [ebx + 0x20]
cmp eax, dword [ebx + 8]
jge 0x7f05dc
mov edx, eax
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.00424b18
push 0
lea eax, [ebp - 0x18]
push eax
push 0x80
lea eax, [ebx + 0x5039]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile_1
jmp 0x7f05ee
lea eax, [ebx + 0x5039]
xor ecx, ecx
mov edx, 0x80
call fcn.00407f88
mov byte [ebp - 5], 1
movzx eax, byte [ebp - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret