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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
xor edi, edi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0x14]
mov dword [ebp - 8], edi
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
call fcn.0108df5e
mov esi, eax
cmp esi, edi
je 0x10a0888
push esi
push 0x6ac0197
call fcn.0108c503
jmp 0x10a09e5
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0108df5e
mov esi, eax
cmp esi, edi
je 0x10a08a6
push esi
push 0x6af0197
jmp 0x10a087e
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.010a0386
mov esi, eax
cmp esi, edi
je 0x10a08c1
push esi
push 0x6b20197
jmp 0x10a087e
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
push edi
push 3
push edi
push edi
push SysReAllocString
push dword [ebp - 8]
call esi
mov dword [ebp + 0x10], eax
cmp eax, 0xffffffff
jne 0x10a08f9
call fcn.01091f1e
mov esi, eax
push esi
push 0x6bf0197
push dword [ebp - 8]
call fcn.0108c53e
jmp 0x10a09e5
xor eax, eax
cmp dword [ebp + 8], edi
push edi
setne al
push edi
inc eax
push eax
push edi
push edi
push 0x40000000
push dword [ebp - 4]
call esi
mov dword [ebp + 0x14], eax
cmp eax, 0xffffffff
jne 0x10a0933
call fcn.01091f1e
mov esi, eax
push esi
push 0x6cc0197
push dword [ebp - 4]
call fcn.0108c53e
jmp 0x10a09dc
mov esi, dword [ebp + 0x24]
xor ecx, ecx
cmp ebx, edi
mov ebx, dword [ebp + 0x28]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
jl 0x10a09c3
jg 0x10a094c
cmp dword [ebp + 0x1c], edi
jbe 0x10a09c3
push edi
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10a0a1c
push edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0xc]
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10a0a30
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x14], eax
jne 0x10a0a3f
add dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
adc dword [ebp - 0x18], edi
push dword [ebp - 0x18]
call fcn.010a035b
mov ecx, eax
mov eax, dword [esi]
add eax, ecx
imul eax, eax, 0x64
xor edx, edx
div dword [ebp + 0x20]
mov dword [ebx], eax
mov eax, dword [ebp + 0x18]
cmp dword [ebp - 0x18], eax
jl 0x10a094c
jg 0x10a09c3
mov eax, dword [ebp + 0x1c]
cmp dword [ebp - 0x1c], eax
jb 0x10a094c
add dword [esi], ecx
mov eax, dword [esi]
imul eax, eax, 0x64
xor edx, edx
div dword [ebp + 0x20]
xor esi, esi
mov dword [ebx], eax
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], edi
je 0x10a09f5
push dword [ebp - 8]
call ebx
cmp dword [ebp - 4], edi
je 0x10a09ff
push dword [ebp - 4]
call ebx
cmp dword [ebp - 0xc], edi
je 0x10a0a13
push 0x8000
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x24
call fcn.01091f1e
mov esi, eax
push esi
push 0x6d60197
call fcn.0108c503
jmp 0x10a09d3
call fcn.01091f1e
mov esi, eax
push esi
push 0x6dd0197
jmp 0x10a0a4a
mov esi, 0x80070026
push esi
push 0x6e20197
push dword [ebp - 4]
call fcn.0108c53e
jmp 0x10a09d3