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

Disassembly:
push 0x16c
push 0x1018860
call fcn.01010fac
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x84], eax
or dword [ebp - 0x64], 0xffffffff
xor eax, eax
mov word [ebp - 0x5c], ax
push 0x3e
xor ebx, ebx
push ebx
lea eax, [ebp - 0x5a]
push eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x17c], ebx
push 0xf4
push ebx
lea eax, [ebp - 0x178]
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x78], ebx
xor eax, eax
lea edi, [ebp - 0x74]
stosd dword es:[edi], eax
cmp esi, ebx
jne 0x1006310
mov ecx, 0x80070057
mov dword [ebp - 0x60], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x10067d4
test byte [eax + 0x1c], 1
je 0x10067d4
push ecx
push 0x10014c4
push 0xa
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002fd5
jmp 0x10067d4
push 0
push 0x80
push 3
push 0
push 7
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x64], ebx
cmp ebx, 0xffffffff
jne 0x1006378
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0xffff
mov esi, 0x80070000
test eax, eax
jle 0x100634b
and eax, edi
or eax, esi
mov dword [ebp - 0x60], eax
test eax, eax
jge 0x1006382
mov eax, dword [section..data]
cmp eax, section..data
je 0x10067d4
test byte [eax + 0x1c], 1
je 0x10067d4
push dword [ebp - 0x60]
push 0x10014c4
push 0xb
jmp 0x1006300
mov edi, 0xffff
mov esi, 0x80070000
lea eax, [ebp - 0x78]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10063cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100639f
and eax, edi
or eax, esi
mov dword [ebp - 0x60], eax
test eax, eax
jge 0x10063cf
mov eax, dword [section..data]
cmp eax, section..data
je 0x10067d4
test byte [eax + 0x1c], 1
je 0x10067d4
push dword [ebp - 0x60]
push 0x10014c4
push 0xc
jmp 0x1006300
and dword [ebp - 4], 0
push 0
lea eax, [ebp - 0x68]
push eax
push 0x40
lea eax, [ebp - 0x5c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006432
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10063f8
and eax, edi
or eax, esi
mov dword [ebp - 0x60], eax
test eax, eax
jge 0x1006432
mov eax, dword [section..data]
cmp eax, section..data
je 0x1006426
test byte [eax + 0x1c], 1
je 0x1006426
push dword [ebp - 0x60]
push 0x10014c4
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002fd5
mov dword [ebp - 4], 0xfffffffe
jmp 0x10067d4
cmp dword [ebp - 0x68], 0x40
je 0x1006464
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0xe
push dword [ecx + 0x14]
push dword [ecx + 0x10]
jmp 0x1006421
mov eax, 0x5a4d
cmp word [ebp - 0x5c], ax
jne 0x100647d
mov eax, dword [ebp - 0x20]
test eax, eax
jle 0x100647d
cmp eax, 0x10000000
jb 0x10064a3
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0xf
jmp 0x100645c
cdq
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], edx
push 0
push 0
push edx
push eax
push dword [ebp - 0x64]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
call ebx
test eax, eax
jne 0x10064f0
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0x10
jmp 0x100645c
push 0
lea eax, [ebp - 0x68]
push eax
push 0xf8
lea eax, [ebp - 0x17c]
push eax
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100654d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100651d
and eax, edi
or eax, esi
mov dword [ebp - 0x60], eax
test eax, eax
jge 0x100654d
mov eax, dword [section..data]
cmp eax, section..data
je 0x1006426
test byte [eax + 0x1c], 1
je 0x1006426
push dword [ebp - 0x60]
push 0x10014c4
push 0x11
jmp 0x100641b
cmp dword [ebp - 0x68], 0xf8
je 0x1006587
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0x12
jmp 0x100645c
cmp dword [ebp - 0x17c], 0x4550
je 0x10065c4
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0x13
jmp 0x100645c
movzx ecx, word [ebp - 0x176]
imul ecx, ecx, 0x28
movzx eax, word [ebp - 0x168]
lea eax, [ebp + eax - 0x164]
add eax, ecx
lea ecx, [ebp - 0x17c]
cmp eax, ecx
ja 0x1006619
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0x14
jmp 0x100645c
lea ecx, [ebp - 0x17c]
sub eax, ecx
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
jbe 0x100665a
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0x15
jmp 0x100645c
mov eax, dword fs:[0x18]
push dword [ebp - 0x70]
push 8
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x6c], eax
test eax, eax
jne 0x10066a7
mov ecx, 0x8007000e
mov dword [ebp - 0x60], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1006426
test byte [eax + 0x1c], 1
je 0x1006426
push ecx
push 0x10014c4
push 0x16
jmp 0x100641b
push 0
push 0
push dword [ebp - 0x7c]
push dword [ebp - 0x80]
push dword [ebp - 0x64]
call ebx
test eax, eax
jne 0x10066eb
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0x17
jmp 0x100645c
push 0
lea eax, [ebp - 0x68]
push eax
mov ebx, dword [ebp - 0x70]
push ebx
push dword [ebp - 0x6c]
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006743
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1006713
and eax, edi
or eax, esi
mov dword [ebp - 0x60], eax
test eax, eax
jge 0x1006743
mov eax, dword [section..data]
cmp eax, section..data
je 0x1006426
test byte [eax + 0x1c], 1
je 0x1006426
push dword [ebp - 0x60]
push 0x10014c4
push 0x18
jmp 0x100641b
cmp dword [ebp - 0x68], ebx
je 0x1006779
mov eax, 0x800700c1
mov dword [ebp - 0x60], eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1006426
test byte [ecx + 0x1c], 1
je 0x1006426
push eax
push 0x10014c4
push 0x19
jmp 0x100645c
mov eax, dword [ebp - 0x84]
lea ecx, [eax + 0x14]
push ecx
push eax
push dword [ebp - 0x74]
push dword [ebp - 0x78]
push dword [ebp - 0x6c]
call fcn.0101310b
test eax, eax
jge 0x10067c9
or eax, 0x10000000
mov dword [ebp - 0x60], eax
jge 0x10067c9
mov eax, dword [section..data]
cmp eax, section..data
je 0x1006426
test byte [eax + 0x1c], 1
je 0x1006426
push dword [ebp - 0x60]
push 0x10014c4
push 0x1a
jmp 0x100641b
mov dword [ebp - 4], 0xfffffffe
and dword [ebp - 0x60], 0
cmp dword [ebp - 0x6c], 0
je 0x10067f1
push dword [ebp - 0x6c]
push 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp dword [ebp - 0x64], 0xffffffff
je 0x1006800
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x60]
call fcn.01010ff4
ret 8