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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [eax], esi
xor ebx, ebx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
mov edi, 0x80070000
cmp eax, 0xffffffff
je 0x106f143
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x106f15f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x106f154
and eax, 0xffff
or eax, edi
mov ebx, eax
cmp ebx, esi
jl 0x106f15f
mov ebx, 0x80004005
cmp ebx, esi
mov byte [ebp + 0xb], 1
jl 0x106f463
push 2
pop esi
cmp dword [ebp - 0xc], esi
jbe 0x106f2be
push 0
lea eax, [ebp - 0x14]
push eax
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f1ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f1a3
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f1ae
mov ebx, 0x80004005
cmp dword [ebp - 0x14], esi
je 0x106f1b8
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f463
mov eax, 0xfeff
cmp word [ebp - 8], ax
jne 0x106f1d7
sub dword [ebp - 0xc], esi
mov byte [ebp + 0xb], 0
jmp 0x106f2be
cmp dword [ebp - 0xc], 3
jbe 0x106f288
mov ecx, esi
mov edi, 0x102ea78
lea esi, [ebp - 8]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x106f1f6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x106f288
xor esi, esi
push esi
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f237
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x106f22c
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
cmp ebx, esi
jl 0x106f237
mov ebx, 0x80004005
cmp dword [ebp - 0x14], 1
je 0x106f242
mov ebx, 0x80004005
cmp ebx, esi
jl 0x106f463
cmp byte [ebp - 1], 0xbf
jne 0x106f25d
sub dword [ebp - 0xc], 3
mov dword [ebp + 0x14], 0xfde9
jmp 0x106f2be
push esi
push esi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x106f2be
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x106f282
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
cmp ebx, esi
jmp 0x106f2b3
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x106f2be
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f2af
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f463
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f463
cmp byte [ebp + 0xb], 0
je 0x106f3e8
mov esi, dword [ebp - 0xc]
lea eax, [esi + 1]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x106f2e9
mov ebx, 0x8007000e
test ebx, ebx
jl 0x106f463
push 0
lea ecx, [ebp + 8]
push ecx
push esi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f329
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f31a
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f3dd
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f3dd
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
push eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
push eax
push dword [ebp + 0x14]
call esi
mov edi, eax
cmp edi, 0x7ffffffe
ja 0x106f361
lea eax, [edi + 1]
push eax
call fcn.0106d464
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
jmp 0x106f367
mov eax, dword [ebp + 0xc]
and dword [eax], 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
jne 0x106f375
mov ebx, 0x8007000e
test ebx, ebx
jl 0x106f3dd
and dword [ebp - 8], 0
cmp dword [ebp + 8], 0
jbe 0x106f3b8
push edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
push 0
push dword [ebp + 0x14]
call esi
mov dword [ebp - 8], eax
test eax, eax
jne 0x106f3b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f3ad
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f3d5
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f3d5
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
xor ecx, ecx
mov word [eax + edi*2], cx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x106f3dd
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
jmp 0x106f3dd
push dword [ebp + 0xc]
call fcn.0106d4cb
push dword [ebp - 0xc]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
jmp 0x106f463
mov eax, dword [ebp - 0xc]
shr eax, 1
inc eax
push eax
call fcn.0106d464
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
test eax, eax
jne 0x106f402
mov ebx, 0x8007000e
test ebx, ebx
jl 0x106f463
push 0
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f43c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f431
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f45d
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f45d
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi]
shr eax, 1
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x106f463
mov ecx, dword [ebp + 0xc]
shr ecx, 1
mov dword [eax], ecx
jmp 0x106f463
push esi
call fcn.0106d4cb
cmp dword [ebp - 0x10], 0xffffffff
je 0x106f472
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x10