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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x10e607c]
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 0x10b738f
mov ebx, dword [eax + 0x20]
test ebx, ebx
je 0x10b738f
cmp dword [ebx + 0x50], 0x400
je 0x10b75b0
test byte [eax], 8
jne 0x10b75b0
mov ebx, dword [sym.imp.msvcrt.dll_fseek]
push 0
push ecx
push edx
call ebx
add esp, 0xc
test eax, eax
jne 0x10b74ba
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 0x10b73e1
push edi
push 2
push esi
call fcn.010b4ebf
mov word [esi + 0xd6], di
jmp 0x10b7840
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 0x10b74ba
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 0x10b74ba
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 0x10b74ba
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 0x10b74ba
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 0x10b74ba
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 0x10b74ba
push 2
push 0
push dword [ebp - 0x88]
call ebx
add esp, 0xc
test eax, eax
je 0x10b74d6
push edi
push 2
push esi
call fcn.010b4ebf
mov word [esi + 0xd4], di
mov word [esi + 0xd6], di
jmp 0x10b7688
cmp word [esi + 0xd2], 2
jne 0x10b75aa
cmp word [esi + 0xd4], 0
jne 0x10b75aa
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 0x10b7837
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 0x10b759a
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 0x10b7837
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 0x10b7837
movzx eax, word [ebp - 0x28]
add dword [ebp - 0x8c], eax
jmp 0x10b750a
mov eax, dword [ebp - 0x90]
test byte [eax + 0xc], 0x10
je 0x10b7837
mov eax, dword [ebp - 0x9c]
cmp word [esi + 0xd2], 2
jne 0x10b7688
xor ebx, ebx
cmp word [esi + 0xd4], bx
jne 0x10b7688
test byte [eax], 8
jne 0x10b7688
cmp dword [esi + 0x388], ebx
jne 0x10b7606
push edi
push 0x800
call dword [sym.imp.msvcrt.dll_calloc]
cmp eax, ebx
pop ecx
pop ecx
mov dword [esi + 0x388], eax
jne 0x10b75fd
push edi
push ebx
jmp 0x10b783a
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 0x10b763c
mov eax, dword [ebp - 0x94]
test byte [eax + 0xc], 0x10
je 0x10b7837
mov eax, dword [ebp - 0x94]
test byte [eax + 0xc], 0x10
je 0x10b76a0
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 [0x10f5eac]
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [0x10f5ea8]
call fcn.010856a8
add esp, 0x14
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ax, ax
pop ebx
call fcn.01078836
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 0x10b76ef
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 0x10b7837
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 0x10b7837
inc word [ebp - 0x22]
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1012540
cmp ecx, dword [eax]
jne 0x10b774a
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 0x10b7837
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1012538
cmp ecx, dword [eax]
jne 0x10b776b
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 0x10b7837
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1012540
cmp ecx, dword [eax]
jne 0x10b77a4
mov word [esi + 0x154], 2
jmp 0x10b77d4
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1012508
cmp ecx, dword [eax]
jne 0x10b77bd
mov word [esi + 0x154], 5
jmp 0x10b77d4
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1012538
cmp ecx, dword [eax]
jne 0x10b77e7
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 0x10b7837
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 0x10b7828
test byte [ebx + 0xc], 0x10
je 0x10b7837
test byte [ebx + 0xc], 0x10
je 0x10b769a
jmp 0x10b7648
push edi
push 0
push esi
call fcn.010b4ebf
mov word [esi + 0xd4], di
jmp 0x10b7688