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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x10de03c]
push ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [eax + 0x54]
mov ecx, dword [esi + 0xf0]
mov edx, dword [esi + 0xf8]
push edi
mov dword [ebp - 0x90], ecx
mov ecx, dword [esi + 0xf4]
xor edi, edi
mov dword [ebp - 0x94], ecx
mov ecx, dword [esi + 0x15c]
inc edi
cmp word [eax + 0x70], di
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x88], edx
mov dword [ebp - 0x8c], ecx
jne 0x10b1c0f
mov ebx, dword [eax + 0x20]
test ebx, ebx
je 0x10b1c0f
cmp dword [ebx + 0x50], 0x400
je 0x10b1e30
test byte [eax], 8
jne 0x10b1e30
mov ebx, dword [sym.imp.msvcrt.dll_fseek]
push 0
push ecx
push edx
call ebx
add esp, 0xc
test eax, eax
jne 0x10b1d3a
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push edi
push 0x5b
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10b1c61
push edi
push 2
push esi
call fcn.010af70e
mov word [esi + 0xd6], di
jmp 0x10b20c0
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x60], 0
push 0
push dword [ebp - 0x8c]
mov dword [ebp - 0x64], eax
push dword [ebp - 0x88]
call ebx
add esp, 0xc
test eax, eax
jne 0x10b1d3a
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push edi
push 0x5b
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x10b1d3a
movzx eax, word [ebp - 0x84]
add dword [ebp - 0x8c], eax
push 0
push dword [ebp - 0x8c]
push dword [ebp - 0x88]
call ebx
add esp, 0xc
test eax, eax
jne 0x10b1d3a
push dword [ebp - 0x88]
lea eax, [ebp - 0x28]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x10b1d3a
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x18], 0
push 0
push dword [ebp - 0x8c]
inc eax
push dword [ebp - 0x88]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x1c], eax
call ebx
add esp, 0xc
test eax, eax
jne 0x10b1d3a
push dword [ebp - 0x88]
lea eax, [ebp - 0x28]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x10b1d3a
push 2
push 0
push dword [ebp - 0x88]
call ebx
add esp, 0xc
test eax, eax
je 0x10b1d56
push edi
push 2
push esi
call fcn.010af70e
mov word [esi + 0xd4], di
mov word [esi + 0xd6], di
jmp 0x10b1f08
cmp word [esi + 0xd2], 2
jne 0x10b1e2a
cmp word [esi + 0xd4], 0
jne 0x10b1e2a
mov eax, dword [esi + 0x3ac]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x88], eax
push 0
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
call ebx
add esp, 0xc
test eax, eax
jne 0x10b20b7
push dword [ebp - 0x90]
lea eax, [ebp - 0x28]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x10b1e1a
mov eax, dword [ebp - 0x88]
and dword [ebp - 0x18], 0
inc dword [ebp - 0x88]
push 0
push dword [ebp - 0x8c]
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x90]
call ebx
add esp, 0xc
test eax, eax
jne 0x10b20b7
push dword [ebp - 0x90]
lea eax, [ebp - 0x28]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x10b20b7
movzx eax, word [ebp - 0x28]
add dword [ebp - 0x8c], eax
jmp 0x10b1d8a
mov eax, dword [ebp - 0x90]
test byte [eax + 0xc], 0x10
je 0x10b20b7
mov eax, dword [ebp - 0x9c]
cmp word [esi + 0xd2], 2
jne 0x10b1f08
xor ebx, ebx
cmp word [esi + 0xd4], bx
jne 0x10b1f08
test byte [eax], 8
jne 0x10b1f08
cmp dword [esi + 0x388], ebx
jne 0x10b1e86
push edi
push 0x800
call dword [sym.imp.msvcrt.dll_calloc]
cmp eax, ebx
pop ecx
pop ecx
mov dword [esi + 0x388], eax
jne 0x10b1e7d
push edi
push ebx
jmp 0x10b20ba
mov word [esi + 0x38c], 0x800
push dword [ebp - 0x94]
mov ebx, dword [esi + 0x388]
push edi
lea eax, [ebp - 0x28]
push 0x24
push eax
mov dword [ebp - 0x88], ebx
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10b1ebc
mov eax, dword [ebp - 0x94]
test byte [eax + 0xc], 0x10
je 0x10b20b7
mov eax, dword [ebp - 0x94]
test byte [eax + 0xc], 0x10
je 0x10b1f20
push dword [esi + 0xf4]
call dword [sym.imp.msvcrt.dll_fflush]
push dword [esi + 0xf4]
call dword [sym.imp.msvcrt.dll_fclose]
and dword [esi + 0xf4], 0
add esi, 0x134
push esi
push dword [0x10ecabc]
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [0x10ecab8]
call fcn.010828ea
add esp, 0x14
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ax, ax
pop ebx
call fcn.01075bbb
leave
ret 8
mov ebx, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x28]
xor eax, eax
mov ax, word [esi + 0x38c]
add ecx, 0xffffffdc
cmp ax, cx
mov dword [ebp - 0x98], ecx
jae 0x10b1f6f
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 0x10b20b7
mov word [esi + 0x38c], bx
mov dword [esi + 0x388], eax
mov dword [ebp - 0x88], eax
mov ebx, eax
movzx eax, word [ebp - 0x98]
push dword [ebp - 0x94]
mov dword [ebp - 0x8c], eax
push eax
push edi
push ebx
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 0x8c]
jne 0x10b20b7
inc word [ebp - 0x22]
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1011bec
cmp ecx, dword [eax]
jne 0x10b1fca
movzx eax, word [ebx + 0x1a]
lea ecx, [eax + ebx - 0x24]
lea eax, [ebp - 0x28]
push eax
mov ax, word [ebx + 0x18]
call fcn.010b14f0
test ax, ax
jne 0x10b20b7
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1011be4
cmp ecx, dword [eax]
jne 0x10b1feb
movzx eax, word [esi + 0x3a4]
mov ecx, dword [esi + 0x3a0]
mov eax, dword [ecx + eax*4]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x90]
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 0x10b20b7
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1011bec
cmp ecx, dword [eax]
jne 0x10b2024
mov word [esi + 0x154], 2
jmp 0x10b2054
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1011bb4
cmp ecx, dword [eax]
jne 0x10b203d
mov word [esi + 0x154], 5
jmp 0x10b2054
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1011be4
cmp ecx, dword [eax]
jne 0x10b2067
mov word [esi + 0x154], 3
push dword [ebp - 0x90]
call dword [sym.imp.msvcrt.dll_ftell]
pop ecx
mov dword [esi + 0x150], eax
push dword [ebp - 0x90]
push dword [ebp - 0x8c]
push edi
push dword [ebp - 0x88]
call ebx
add esp, 0x10
cmp eax, dword [ebp - 0x8c]
jne 0x10b20b7
mov ebx, dword [ebp - 0x94]
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 0x10b20a8
test byte [ebx + 0xc], 0x10
je 0x10b20b7
test byte [ebx + 0xc], 0x10
je 0x10b1f1a
jmp 0x10b1ec8
push edi
push 0
push esi
call fcn.010af70e
mov word [esi + 0xd4], di
jmp 0x10b1f08