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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xe0]
sub rsp, 0x1e0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov rax, qword [0x14006f0d0]
xor rax, rsp
mov qword [rbp + 0xd0], rax
mov rsi, r9
mov r12d, r8d
mov r15, rdx
mov rdi, rcx
mov r14, qword [rbp + 0x140]
mov dword [rsp + 0x34], 0
mov rcx, qword [rcx + 8]
cmp rcx, 0xffffffffffffffff
jne 0x14001f0fc
lea rdx, str.HECI_not_connected
lea rcx, [rsp + 0x58]
call fcn.14001e630
lea rdx, [0x14006c810]
lea rcx, [rsp + 0x58]
call fcn.14002a780
int3
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov rax, qword [rdi + 0x18]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x14001f16c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x3e5
je 0x14001f16c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, [0x14004f0f0]
lea rcx, [rbp + 0x80]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rbp + 0x80]
call fcn.14002a780
int3
mov edx, dword [rbp + 0x148]
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14001f1a6
lea rdx, str.HECI_send_timeout
lea rcx, [rsp + 0x58]
call fcn.140002690
lea rdx, [0x14006c4d0]
lea rcx, [rsp + 0x58]
call fcn.14002a780
int3
test eax, eax
je 0x14001f1da
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.WaitForSingleObject_after_WriteFile
lea rcx, [rbp + 0x80]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rbp + 0x80]
call fcn.14002a780
int3
mov r9d, 1
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x38]
mov rcx, qword [rdi + 8]
call qword [sym.imp.api_ms_win_core_io_l1_1_0.dll_GetOverlappedResult]
test eax, eax
jne 0x14001f228
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.GetOverlappedResult_from_WriteFile
lea rcx, [rbp + 0x80]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rbp + 0x80]
call fcn.14002a780
int3
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e00
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.Heci::SendMsg_WriteFile_bytesWritten
call fcn.140001350
mov rcx, rax
mov edx, dword [rsp + 0x34]
call fcn.14000ec70
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140008970
movzx edx, ax
mov rcx, rbx
call fcn.1400083b0
mov rcx, rbx
call fcn.140007dd0
nop
lea rcx, [rbp + 0x18]
call fcn.14000e980
nop
lea rbx, vtable.std::ios_base.0
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.14002695c
nop
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e00
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
mov r8d, r12d
mov rdx, r15
call fcn.140010070
nop
lea rcx, [rbp + 0x18]
call fcn.14000e980
nop
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.14002695c
nop
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov rax, qword [rdi + 0x18]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x30], 0
test rsi, rsi
je 0x14001f500
test r14, r14
je 0x14001f500
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
mov r8d, dword [rdi + 0x10]
mov rdx, rsi
mov rcx, qword [rdi + 8]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x14001f37c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x3e5
je 0x14001f37c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, [0x14004f190]
lea rcx, [rbp + 0x80]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rbp + 0x80]
call fcn.14002a780
int3
mov edx, dword [rbp + 0x150]
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14001f3b6
lea rdx, str.HECI_recv_timeout
lea rcx, [rsp + 0x58]
call fcn.140002690
lea rdx, [0x14006c4d0]
lea rcx, [rsp + 0x58]
call fcn.14002a780
int3
test eax, eax
je 0x14001f3ea
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.WaitForSingleObject_after_ReadFile
lea rcx, [rbp + 0x80]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rbp + 0x80]
call fcn.14002a780
int3
mov r9d, 1
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rdi + 8]
call qword [sym.imp.api_ms_win_core_io_l1_1_0.dll_GetOverlappedResult]
test eax, eax
jne 0x14001f438
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.GetOverlappedResult_from_ReadFile
lea rcx, [rbp + 0x80]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rbp + 0x80]
call fcn.14002a780
int3
mov eax, dword [rsp + 0x30]
mov dword [r14], eax
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e00
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.Heci::SendMsg_ReadFile_bytesRead
call fcn.140001350
mov rcx, rax
mov edx, dword [rsp + 0x30]
call fcn.14000ec70
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140008970
movzx edx, ax
mov rcx, rbx
call fcn.1400083b0
mov rcx, rbx
call fcn.140007dd0
nop
lea rcx, [rbp + 0x18]
call fcn.14000e980
nop
lea rbx, vtable.std::ios_base.0
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.14002695c
nop
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e00
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
mov r8d, dword [rsp + 0x30]
mov rdx, rsi
call fcn.140010070
nop
lea rcx, [rbp + 0x18]
call fcn.14000e980
nop
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.14002695c
nop
mov rcx, qword [rbp + 0xd0]
xor rcx, rsp
call fcn.140027e60
add rsp, 0x1e0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret