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

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x1b0
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov rax, qword [0x1402ba4e0]
xor rax, rsp
mov qword [rsp + 0x1a0], rax
mov esi, r8d
mov r15, rdx
mov r14, rcx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x78], rdx
xor ebx, ebx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x60], rbx
mov byte [rsp + 0x90], bl
add rcx, 0x278
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, r15
lea rdx, [rsp + 0x90]
movzx eax, byte [rcx]
mov byte [rdx], al
inc rcx
inc rdx
test al, al
jne 0x1400a86d0
lea rdi, [rsp + 0x90]
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov eax, dword [0x1402284cc]
mov dword [rdi - 1], eax
lea rcx, [rsp + 0x90]
call fcn.1400a7160
call fcn.1400a6820
lea rdx, [rsp + 0x90]
mov rcx, r15
call qword [0x1402c1e60]
call fcn.1400a67a0
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, [rsp + 0x90]
call qword [0x1402c1e50]
mov rdi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
je 0x1400a88df
call fcn.1400a67a0
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, r15
call qword [0x1402c1e50]
mov r13, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
je 0x1400a88d6
mov dword [rsp + 0x44], ebx
mov r12d, 1
mov dword [rsp + 0x58], r12d
mov dword [rsp + 0x40], 0x8000
neg esi
lea r9d, [r12 + 1]
xor r8d, r8d
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, 0x8001
call fcn.14010a204
mov rsi, rax
nop dword [rax]
cmp dword [rsp + 0x40], 0x8000
jne 0x1400a88aa
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x8000
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400a881c
mov ebx, 1
mov dword [rsp + 0x44], ebx
jmp 0x1400a88aa
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x1400a88aa
mov edi, eax
mov qword [rsp + 0x70], rax
mov rdx, rsi
mov byte [rax + rsi], 0
test r12d, r12d
je 0x1400a886b
lea rdx, [0x1402065d0]
mov rcx, rsi
call fcn.14010d30c
mov rdx, rax
test rax, rax
je 0x1400a889c
add rdx, 2
mov rax, rsi
sub rax, rdx
add rdi, rax
mov qword [rsp + 0x70], rdi
mov r12d, ebx
mov dword [rsp + 0x58], ebx
mov dword [rsp + 0x48], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
mov r8d, edi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400a889c
mov eax, dword [rsp + 0x48]
cmp rdi, rax
jne 0x1400a889c
mov rdi, qword [rsp + 0x50]
jmp 0x1400a87e0
mov ebx, 1
mov dword [rsp + 0x44], ebx
mov rdi, qword [rsp + 0x50]
mov rcx, rsi
call fcn.140085540
cmp dword [r14 + 0x60], 0
je 0x1400a88c1
mov rcx, r13
call fcn.1400a8540
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1400a88d6
mov rcx, r15
call fcn.1400a7160
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x90]
call fcn.1400a7160
nop
jmp 0x1400a88f4
lea rcx, [r14 + 0x278]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x1a0]
xor rcx, rsp
call fcn.14010d170
add rsp, 0x1b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret