Function at 0x1087507
Capabilities:
Get file size
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, eax
mov esi, ecx
mov dword [ebp - 4], eax
cmp edi, eax
jne 0x108754b
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1087541
test byte [eax + 0x1c], 1
je 0x1087541
push 0x1012400
push 0x21
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01015b76
mov eax, 0x80070057
jmp 0x1087722
push ebx
push eax
push 0x80
push 3
push eax
xor ebx, ebx
inc ebx
push ebx
push 0x80010000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
jne 0x10875a4
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1087591
test byte [eax + 0x1c], bl
je 0x1087591
push edi
push 0x1012400
push 0x22
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01015b9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0107f957
mov edi, eax
jmp 0x1087705
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0xc], eax
cmp eax, 0x78
jae 0x10875e3
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x10875d9
test byte [eax + 0x1c], bl
je 0x10875d9
push edi
push 0x1012400
push 0x23
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01015b9c
mov edi, 0x8007000b
jmp 0x10876fc
push eax
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [esi + 8], eax
test eax, eax
jne 0x1087621
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1087617
test byte [eax + 0x1c], bl
je 0x1087617
push dword [esi + 0xc]
push 0x1012400
push 0x24
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010160ad
mov edi, 0x8007000e
jmp 0x10876fc
push 0
lea ecx, [ebp - 4]
push ecx
push dword [esi + 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x108766e
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x108765b
test byte [eax + 0x1c], bl
je 0x108765b
push 0x1012400
push 0x25
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01015b76
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0107f957
mov edi, eax
jmp 0x10876fc
mov eax, dword [esi + 0xc]
cmp dword [ebp - 4], eax
je 0x1087690
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x10876f3
test byte [eax + 0x1c], bl
je 0x10876f3
push 0x1012400
push 0x26
jmp 0x10876e8
push eax
push dword [esi + 8]
call fcn.0108c1f1
mov edi, eax
test edi, edi
jge 0x10876c4
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x10876fc
test byte [eax + 0x1c], bl
je 0x10876fc
push 0x1012400
push 0x27
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01015b76
jmp 0x10876fc
push dword [esi + 8]
call fcn.0108c287
test eax, eax
jne 0x10876fa
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x10876f3
test byte [eax + 0x1c], bl
je 0x10876f3
push 0x1012400
push 0x28
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01015b76
mov edi, 0x80004005
jmp 0x10876fc
xor edi, edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
test edi, edi
jge 0x1087720
mov eax, dword [esi + 8]
test eax, eax
je 0x1087720
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
and dword [esi + 8], 0
and dword [esi + 0xc], 0
pop ecx
mov eax, edi
pop edi
pop esi
leave
ret 4