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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
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 - 8], edi
jne 0x10a4338
push edi
push 0x800
call dword [sym.imp.msvcrt.dll_calloc]
test eax, eax
pop ecx
pop ecx
mov dword [esi + 0x388], eax
je 0x10a43bd
mov word [esi + 0x38c], 0x800
mov eax, dword [esi + 0x388]
push 0x1011f2c
push dword [0x10dd26c]
mov dword [ebp - 4], eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push dword [0x10dd268]
call fcn.010ab721
test eax, eax
je 0x10a43bd
push 0x1011f0c
push dword [0x10dd268]
call dword [sym.imp.msvcrt.dll_wcscat]
push dword [0x10dd26c]
lea eax, [esi + 0x134]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
add esp, 0x10
push 0
push dword [0x10dd268]
call fcn.01078e38
xor ecx, ecx
cmp eax, ecx
mov dword [ebp + 8], eax
mov dword [esi + 0xf4], eax
jne 0x10a43ad
push edi
push ecx
jmp 0x10a44a2
push ecx
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10a440f
push edi
push 0
jmp 0x10a44a2
movzx eax, word [esi + 0x38c]
push ebx
push eax
push edi
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test byte [ebx + 0xc], 0x20
mov dword [ebp - 0xc], eax
jne 0x10a43bd
test eax, eax
je 0x10a4404
push dword [ebp + 8]
push eax
push edi
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, dword [ebp - 0xc]
jne 0x10a43bd
and dword [ebp - 8], 0
jmp 0x10a440f
cmp word [ebp - 8], 0
jne 0x10a44af
test byte [ebx + 0xc], 0x10
je 0x10a43c5
xor ebx, ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x10a44a0
push dword [esi + 0xf0]
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
push esi
mov dword [esi + 0xf0], ebx
call fcn.010a22c4
test ax, ax
jne 0x10a44a0
push dword [ebp + 8]
mov eax, dword [esi + 0xf0]
push edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x30]
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x10a44a0
mov eax, dword [esi + 0x3a0]
mov dword [eax], ebx
mov eax, dword [ebp + 8]
mov word [esi + 0x3a4], bx
mov word [esi + 0x3a6], bx
test byte [eax + 0xc], 0x10
je 0x10a44bb
mov eax, dword [ebp + 8]
test byte [eax + 0xc], 0x10
jne 0x10a44af
push edi
push 0xffffffffffffffdc
push eax
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10a44af
push edi
push ebx
push esi
call fcn.010a2357
mov word [esi + 0xd4], di
pop edi
pop esi
xor ax, ax
pop ebx
leave
ret 8
xor ebx, ebx
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp + 0xc]
jae 0x10a4486
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov ax, word [esi + 0x38c]
add ecx, 0xffffffdc
cmp ax, cx
mov dword [ebp - 8], ecx
jae 0x10a450a
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 0x10a43bd
mov dword [esi + 0x388], eax
mov word [esi + 0x38c], bx
mov dword [ebp - 4], eax
movzx eax, word [ebp - 8]
push dword [ebp + 8]
mov ebx, dword [ebp - 4]
push eax
push edi
push ebx
mov dword [ebp - 8], eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 8]
jne 0x10a43bd
lea ecx, [ebp - 0x2e]
mov ecx, dword [ecx]
mov eax, 0x1011b74
cmp ecx, dword [eax]
jne 0x10a4558
movzx eax, word [ebx + 0x1a]
lea ecx, [eax + ebx - 0x24]
lea eax, [ebp - 0x30]
push eax
mov ax, word [ebx + 0x18]
call fcn.010a3f63
test ax, ax
jne 0x10a43bd
push dword [ebp - 0xc]
mov ebx, dword [sym.imp.msvcrt.dll_fwrite]
push edi
lea eax, [ebp - 0x30]
push 0x24
push eax
call ebx
add esp, 0x10
cmp eax, edi
jne 0x10a43bd
push dword [ebp - 0xc]
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call ebx
add esp, 0x10
cmp eax, dword [ebp - 8]
jne 0x10a43bd
mov ebx, dword [ebp + 8]
push ebx
push edi
lea eax, [ebp - 0x30]
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10a45af
test byte [ebx + 0xc], 0x10
je 0x10a43bd
test byte [ebx + 0xc], 0x10
je 0x10a44b9
xor ebx, ebx
jmp 0x10a4486