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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [eax], edi
xor ebx, ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
call fcn.0102aef6
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x106ba5b
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x106ba40
call esi
mov ebx, eax
jmp 0x106ba50
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x106ba9c
mov ebx, 0x80004005
jmp 0x106ba9c
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x106ba96
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x106ba7d
call esi
mov ebx, eax
jmp 0x106ba8d
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x106ba96
mov ebx, 0x80004005
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, edi
mov byte [ebp + 0xb], 1
jl 0x106bdea
cmp dword [ebp - 0xc], 2
jbe 0x106bbae
push edi
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 6]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106baef
call esi
test eax, eax
jg 0x106bad6
call esi
mov ebx, eax
jmp 0x106bae6
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x106baef
mov ebx, 0x80004005
push 2
pop ecx
cmp dword [ebp - 0x14], ecx
je 0x106bafc
mov ebx, 0x80004005
cmp ebx, edi
jl 0x106bdea
cmp word [ebp - 6], 0xfeff
jne 0x106bb18
sub dword [ebp - 0xc], ecx
mov byte [ebp + 0xb], 0
jmp 0x106bbae
cmp dword [ebp - 0xc], 3
jbe 0x106bc57
mov edi, 0x10126c0
lea esi, [ebp - 6]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x106bb35
sbb eax, eax
sbb eax, 0xffffffff
xor edi, edi
test eax, eax
jne 0x106bc51
push edi
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 0x106bb82
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x106bb69
call esi
mov ebx, eax
jmp 0x106bb79
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x106bb82
mov ebx, 0x80004005
cmp dword [ebp - 0x14], 1
je 0x106bb8d
mov ebx, 0x80004005
cmp ebx, edi
jl 0x106bdea
cmp byte [ebp - 1], 0xbf
jne 0x106bc0c
sub dword [ebp - 0xc], 3
mov dword [ebp + 0x14], 0xfde9
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
cmp ebx, edi
jl 0x106bdea
cmp byte [ebp + 0xb], 0
mov eax, dword [ebp - 0xc]
je 0x106bd6a
inc eax
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, edi
pop ecx
mov dword [ebp - 8], eax
jne 0x106bbd7
mov ebx, 0x8007000e
cmp ebx, edi
jl 0x106bdea
push edi
lea ecx, [ebp + 8]
push ecx
push dword [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106bcb7
call esi
test eax, eax
jg 0x106bc9a
call esi
mov ebx, eax
jmp 0x106bcaa
push edi
push edi
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x106bba6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x106bc2f
call esi
mov ebx, eax
jmp 0x106bc3f
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
jl 0x106bdea
mov ebx, 0x80004005
jmp 0x106bba6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push edi
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x106bbae
call esi
test eax, eax
jg 0x106bc78
call esi
mov ebx, eax
jmp 0x106bc88
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x106bdea
mov ebx, 0x80004005
jmp 0x106bbae
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x106bd5c
mov ebx, 0x80004005
cmp ebx, edi
jl 0x106bd5c
push edi
push edi
push dword [ebp + 8]
push dword [ebp - 8]
push edi
push dword [ebp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
call edi
mov dword [ebp - 0xc], eax
inc eax
push eax
call fcn.0102d893
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
xor ecx, ecx
cmp eax, ecx
jne 0x106bced
mov ebx, 0x8007000e
cmp ebx, ecx
jl 0x106bd5c
cmp dword [ebp + 8], ecx
mov dword [ebp - 0x18], ecx
jbe 0x106bd35
push dword [ebp - 0xc]
push eax
push dword [ebp + 8]
push dword [ebp - 8]
push ecx
push dword [ebp + 0x14]
call edi
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x106bd35
call esi
test eax, eax
jg 0x106bd1c
call esi
mov ebx, eax
jmp 0x106bd2c
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
jl 0x106bd54
mov ebx, 0x80004005
test ebx, ebx
jl 0x106bd54
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
and word [eax + ecx*2], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x106bd5c
mov ecx, dword [ebp - 0x18]
mov dword [eax], ecx
jmp 0x106bd5c
push dword [ebp + 0xc]
call fcn.0102d8ec
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x106bdea
shr eax, 1
inc eax
push eax
call fcn.0102d893
cmp eax, edi
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
jne 0x106bd81
mov ebx, 0x8007000e
cmp ebx, edi
jl 0x106bdea
push edi
lea ecx, [ebp + 0x14]
push ecx
push dword [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106bdc0
call esi
test eax, eax
jg 0x106bda7
call esi
mov ebx, eax
jmp 0x106bdb7
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x106bde2
mov ebx, 0x80004005
cmp ebx, edi
jl 0x106bde2
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
shr eax, 1
mov word [ecx + eax*2], di
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x106bdea
mov ecx, dword [ebp + 0x14]
shr ecx, 1
mov dword [eax], ecx
jmp 0x106bdea
push dword [ebp + 0xc]
call fcn.0102d8ec
cmp dword [ebp - 0x10], 0xffffffff
je 0x106bdf9
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x10