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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [edi], ebx
mov dword [esi], ebx
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 0x10], eax
cmp eax, 0xffffffff
jne 0x10f1be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10f1bcb
test byte [eax + 0x1c], 1
je 0x10f1bcb
cmp byte [eax + 0x19], 2
jb 0x10f1bcb
push esi
push dword [ebp + 8]
push 0x10128f8
push 0xa
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
mov eax, dword [0x111124c]
cmp esi, ebx
jle 0x10f1d64
and esi, 0xffff
or esi, 0x80070000
jmp 0x10f1d62
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10f1c3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10f1c26
test byte [eax + 0x1c], 1
je 0x10f1c26
cmp byte [eax + 0x19], 2
jb 0x10f1c26
push esi
push dword [ebp + 8]
push 0x10128f8
push 0xb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
cmp esi, ebx
jle 0x10f1d52
and esi, 0xffff
or esi, 0x80070000
jmp 0x10f1d52
cmp dword [esi + 4], ebx
je 0x10f1c4e
mov esi, 0x80780028
jmp 0x10f1d52
mov ebx, dword [esi]
test bl, 1
jne 0x10f1c44
and dword [ebp + 0xc], 0
lea eax, [ebp + 0xc]
push eax
push 2
push ebx
call fcn.010e5924
mov esi, eax
test esi, esi
jge 0x10f1ca2
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10f1c98
test byte [eax + 0x1c], 1
je 0x10f1c98
cmp byte [eax + 0x19], 2
jb 0x10f1c98
push 2
push ebx
push 0x10128f8
push 0xc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0109ba57
mov esi, 0x80070216
jmp 0x10f1d52
push dword [ebp + 0xc]
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x10f1cbc
mov esi, 0x8007000e
jmp 0x10f1d43
push 0
lea ecx, [ebp - 4]
push ecx
push ebx
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10f1d19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10f1d07
test byte [eax + 0x1c], 1
je 0x10f1d07
cmp byte [eax + 0x19], 2
jb 0x10f1d07
push esi
push dword [ebp + 8]
push 0x10128f8
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
test esi, esi
jle 0x10f1d43
and esi, 0xffff
or esi, 0x80070000
jmp 0x10f1d43
cmp dword [ebp - 4], ebx
je 0x10f1d32
push 0x1012938
push 0x8a
push 0x1012908
call fcn.0107b4be
mov eax, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
shr ebx, 1
xor ecx, ecx
mov dword [edi], eax
mov word [eax + ebx*2], cx
cmp dword [ebp + 0xc], 0
je 0x10f1d52
push dword [ebp + 0xc]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111124c]
xor ebx, ebx
cmp esi, ebx
jge 0x10f1d8f
cmp eax, 0x111124c
je 0x10f1d8f
test byte [eax + 0x1c], 1
je 0x10f1d8f
cmp byte [eax + 0x19], 2
jb 0x10f1d8f
push esi
push dword [ebp + 8]
push 0x10128f8
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc