Function at 0x10017eb0
Capabilities:
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf8
mov eax, dword [0x100a0f80]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x60], ecx
mov ecx, dword [ebp - 0x60]
add ecx, 0x24
call fcn.100062a0
mov dword [ebp - 0x94], eax
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0xffffffff
jne 0x10017f27
lea ecx, [ebp - 0x5c]
push ecx
mov ecx, dword [ebp - 0x60]
call fcn.10017e10
push eax
mov ecx, dword [ebp - 0x60]
add ecx, 0x3c
call fcn.100048d0
lea ecx, [ebp - 0x5c]
call fcn.10006840
nop
xor eax, eax
jmp 0x10018398
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x60]
add eax, 0x5c
push eax
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp - 0x60]
mov dword [edx + 0x58], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x90]
mov edx, dword [ebp - 0x90]
mov eax, dword [ecx + 0x58]
or eax, dword [edx + 0x5c]
jne 0x10017ff9
mov dword [ebp - 0x7c], str.bad_file_size
mov ecx, dword [ebp - 0x7c]
add ecx, 2
mov dword [ebp - 0x98], ecx
mov edx, dword [ebp - 0x7c]
mov ax, word [edx]
mov word [ebp - 0x8c], ax
add dword [ebp - 0x7c], 2
cmp word [ebp - 0x8c], 0
jne 0x10017f78
mov ecx, dword [ebp - 0x7c]
sub ecx, dword [ebp - 0x98]
sar ecx, 1
mov dword [ebp - 0x9c], ecx
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
push ecx
push str.bad_file_size
mov ecx, dword [ebp - 0x60]
add ecx, 0x3c
call fcn.10006ca0
mov dword [ebp - 0xf0], eax
mov dword [ebp - 0xa8], 0
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xa8]
jmp 0x10018398
xorps xmm0, xmm0
movlpd qword [ebp - 0x68], xmm0
push 0x3e
push 0
lea eax, [ebp - 0x44]
push eax
call fcn.1004bd80
add esp, 0xc
mov ecx, dword [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x68]
push edx
push 0x3e
lea eax, [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x70]
push ecx
mov ecx, dword [ebp - 0x60]
call fcn.100183b0
test eax, eax
jne 0x1001804f
mov dword [ebp - 0xe8], 0
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xe8]
jmp 0x10018398
mov ax, word [ebp - 0x44]
mov word [ebp - 0x80], ax
movzx ecx, word [ebp - 0x80]
cmp ecx, 0x5a4d
je 0x100180fb
mov dword [ebp - 0x74], str.is_not_MZ
mov edx, dword [ebp - 0x74]
add edx, 2
mov dword [ebp - 0xe4], edx
mov eax, dword [ebp - 0x74]
mov cx, word [eax]
mov word [ebp - 0x82], cx
add dword [ebp - 0x74], 2
cmp word [ebp - 0x82], 0
jne 0x1001807a
mov edx, dword [ebp - 0x74]
sub edx, dword [ebp - 0xe4]
sar edx, 1
mov dword [ebp - 0xec], edx
mov eax, dword [ebp - 0xec]
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp - 0xac]
mov dword [ebp - 0xb0], ecx
mov edx, dword [ebp - 0xb0]
push edx
push str.is_not_MZ
mov ecx, dword [ebp - 0x60]
add ecx, 0x3c
call fcn.10006ca0
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xb4], 0
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xb4]
jmp 0x10018398
movzx eax, word [ebp - 8]
cdq
add eax, dword [ebp - 0x68]
adc edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
push 0x3e
push 0
lea ecx, [ebp - 0x44]
push ecx
call fcn.1004bd80
add esp, 0xc
mov edx, dword [ebp - 0x64]
push edx
mov eax, dword [ebp - 0x68]
push eax
push 0x18
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x70]
push edx
mov ecx, dword [ebp - 0x60]
call fcn.100183b0
test eax, eax
jne 0x1001815a
mov dword [ebp - 0xb8], 0
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xb8]
jmp 0x10018398
mov ecx, dword [ebp - 0x68]
add ecx, 0x18
mov edx, dword [ebp - 0x64]
adc edx, 0
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], edx
mov ax, word [ebp - 0x44]
mov word [ebp - 0x88], ax
movzx ecx, word [ebp - 0x88]
cmp ecx, 0x4550
je 0x1001821e
mov dword [ebp - 0x78], str.is_not_PE
mov edx, dword [ebp - 0x78]
add edx, 2
mov dword [ebp - 0xbc], edx
mov eax, dword [ebp - 0x78]
mov cx, word [eax]
mov word [ebp - 0x8a], cx
add dword [ebp - 0x78], 2
cmp word [ebp - 0x8a], 0
jne 0x1001819d
mov edx, dword [ebp - 0x78]
sub edx, dword [ebp - 0xbc]
sar edx, 1
mov dword [ebp - 0xc0], edx
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xc4], eax
mov ecx, dword [ebp - 0xc4]
mov dword [ebp - 0xc8], ecx
mov edx, dword [ebp - 0xc8]
push edx
push str.is_not_PE
mov ecx, dword [ebp - 0x60]
add ecx, 0x3c
call fcn.10006ca0
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xcc], 0
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xcc]
jmp 0x10018398
lea ecx, [ebp - 0x40]
mov edx, dword [ebp - 0x60]
add edx, 0xc
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov eax, dword [ecx + 0xc]
mov dword [edx + 0xc], eax
mov ecx, dword [ecx + 0x10]
mov dword [edx + 0x10], ecx
mov edx, dword [ebp - 0x60]
movzx eax, word [edx + 0x1c]
push eax
call fcn.1003a71e
add esp, 4
mov dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0xd0]
mov dword [ecx + 0x20], edx
mov eax, dword [ebp - 0x60]
movzx ecx, word [eax + 0x1c]
push ecx
push 0
mov edx, dword [ebp - 0x60]
mov eax, dword [edx + 0x20]
push eax
call fcn.1004bd80
add esp, 0xc
mov ecx, dword [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x68]
push edx
mov eax, dword [ebp - 0x60]
movzx ecx, word [eax + 0x1c]
push ecx
mov edx, dword [ebp - 0x60]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0x70]
push ecx
mov ecx, dword [ebp - 0x60]
call fcn.100183b0
test eax, eax
jne 0x100182c5
mov dword [ebp - 0xd4], 0
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xd4]
jmp 0x10018398
mov eax, dword [ebp - 0x60]
movzx eax, word [eax + 0x1c]
cdq
add eax, dword [ebp - 0x68]
adc edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
mov ecx, dword [ebp - 0x60]
mov edx, dword [ecx + 0x20]
mov eax, dword [ebp - 0x60]
mov cx, word [edx]
mov word [eax + 8], cx
mov edx, dword [ebp - 0x60]
movzx eax, word [edx + 0xe]
mov ecx, 0x28
mul ecx
mov edx, 0xffffffff
cmovb eax, edx
push eax
call fcn.1003a71e
add esp, 4
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0xd8]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x60]
movzx eax, word [edx + 0xe]
imul ecx, eax, 0x28
push ecx
push 0
mov edx, dword [ebp - 0x60]
mov eax, dword [edx + 4]
push eax
call fcn.1004bd80
add esp, 0xc
mov ecx, dword [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x68]
push edx
mov eax, dword [ebp - 0x60]
movzx ecx, word [eax + 0xe]
imul edx, ecx, 0x28
push edx
mov eax, dword [ebp - 0x60]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x70]
push edx
mov ecx, dword [ebp - 0x60]
call fcn.100183b0
test eax, eax
jne 0x1001837d
mov dword [ebp - 0xdc], 0
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xdc]
jmp 0x10018398
mov dword [ebp - 0xe0], 1
mov ecx, dword [ebp - 0x6c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 0xe0]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003a6b5
mov esp, ebp
pop ebp
ret