Function at 0x10b703b
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x10e607c]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 0xf0]
push edi
xor edi, edi
inc edi
cmp dword [esi + 0x388], 0
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], edi
jne 0x10b708b
push edi
push 0x800
call dword [sym.imp.msvcrt.dll_calloc]
test eax, eax
pop ecx
pop ecx
mov dword [esi + 0x388], eax
je 0x10b7110
mov word [esi + 0x38c], 0x800
mov eax, dword [esi + 0x388]
push 0x10128f4
push dword [0x10f5eac]
mov dword [ebp - 0x34], eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push dword [0x10f5ea8]
call fcn.010bf31c
test eax, eax
je 0x10b7110
push 0x10128d4
push dword [0x10f5ea8]
call dword [sym.imp.msvcrt.dll_wcscat]
push dword [0x10f5eac]
lea eax, [esi + 0x134]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
add esp, 0x10
push 0
push dword [0x10f5ea8]
call fcn.01085761
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0x30], eax
mov dword [esi + 0xf4], eax
jne 0x10b7100
push edi
push ecx
jmp 0x10b71f5
push ecx
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10b7162
push edi
push 0
jmp 0x10b71f5
movzx eax, word [esi + 0x38c]
push ebx
push eax
push edi
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test byte [ebx + 0xc], 0x20
mov dword [ebp - 0x38], eax
jne 0x10b7110
test eax, eax
je 0x10b7157
push dword [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, dword [ebp - 0x38]
jne 0x10b7110
and dword [ebp - 0x2c], 0
jmp 0x10b7162
cmp word [ebp - 0x2c], 0
jne 0x10b7202
test byte [ebx + 0xc], 0x10
je 0x10b7118
xor ebx, ebx
push ebx
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x10b71f3
push dword [esi + 0xf0]
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
push esi
mov dword [esi + 0xf0], ebx
call fcn.010b4e1d
test ax, ax
jne 0x10b71f3
push dword [ebp - 0x30]
mov eax, dword [esi + 0xf0]
push edi
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x28]
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x10b71f3
mov eax, dword [esi + 0x3a0]
mov dword [eax], ebx
mov eax, dword [ebp - 0x30]
mov word [esi + 0x3a4], bx
mov word [esi + 0x3a6], bx
test byte [eax + 0xc], 0x10
je 0x10b7216
mov eax, dword [ebp - 0x30]
test byte [eax + 0xc], 0x10
jne 0x10b7202
push edi
push 0xffffffffffffffdc
push eax
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10b7202
push edi
push ebx
push esi
call fcn.010b4ebf
mov word [esi + 0xd4], di
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ax, ax
pop ebx
call fcn.01078836
leave
ret 8
xor ebx, ebx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0xc]
jae 0x10b71d9
mov ecx, dword [ebp - 0x28]
xor eax, eax
mov ax, word [esi + 0x38c]
add ecx, 0xffffffdc
cmp ax, cx
mov dword [ebp - 0x2c], ecx
jae 0x10b7265
lea ebx, [eax + 0x200]
movzx eax, bx
push eax
push dword [esi + 0x388]
call dword [sym.imp.msvcrt.dll_realloc]
test eax, eax
pop ecx
pop ecx
je 0x10b7110
mov dword [esi + 0x388], eax
mov word [esi + 0x38c], bx
mov dword [ebp - 0x34], eax
movzx eax, word [ebp - 0x2c]
push dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
push eax
push edi
push ebx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 0x2c]
jne 0x10b7110
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1012540
cmp ecx, dword [eax]
jne 0x10b72b3
movzx eax, word [ebx + 0x1a]
lea ecx, [eax + ebx - 0x24]
lea eax, [ebp - 0x28]
push eax
mov ax, word [ebx + 0x18]
call fcn.010b6c70
test ax, ax
jne 0x10b7110
push dword [ebp - 0x38]
mov ebx, dword [sym.imp.msvcrt.dll_fwrite]
push edi
lea eax, [ebp - 0x28]
push 0x24
push eax
call ebx
add esp, 0x10
cmp eax, edi
jne 0x10b7110
push dword [ebp - 0x38]
push dword [ebp - 0x2c]
push edi
push dword [ebp - 0x34]
call ebx
add esp, 0x10
cmp eax, dword [ebp - 0x2c]
jne 0x10b7110
mov ebx, dword [ebp - 0x30]
push ebx
push edi
lea eax, [ebp - 0x28]
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10b730a
test byte [ebx + 0xc], 0x10
je 0x10b7110
test byte [ebx + 0xc], 0x10
je 0x10b7214
xor ebx, ebx
jmp 0x10b71d9