Function at 0x14001dba0
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 [0x14006d0e0]
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 0x14001dc1c
lea rdx, str.HECI_not_connected
lea rcx, [rsp + 0x58]
call fcn.14001d500
lea rdx, [0x14006afb0]
lea rcx, [rsp + 0x58]
call fcn.140029aa0
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.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14001dc8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x14001dc8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x14004dc60]
lea rcx, [rbp + 0x80]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rbp + 0x80]
call fcn.140029aa0
int3
mov edx, dword [rbp + 0x148]
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14001dcc6
lea rdx, str.HECI_send_timeout
lea rcx, [rsp + 0x58]
call fcn.1400026d0
lea rdx, [0x14006ac70]
lea rcx, [rsp + 0x58]
call fcn.140029aa0
int3
test eax, eax
je 0x14001dcfa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WaitForSingleObject_after_WriteFile
lea rcx, [rbp + 0x80]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rbp + 0x80]
call fcn.140029aa0
int3
mov r9d, 1
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x38]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x14001dd48
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.GetOverlappedResult_from_WriteFile
lea rcx, [rbp + 0x80]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rbp + 0x80]
call fcn.140029aa0
int3
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e50
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.Heci::SendMsg_WriteFile_bytesWritten
call fcn.140001390
mov rcx, rax
mov edx, dword [rsp + 0x34]
call fcn.14000ecc0
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140008ac0
movzx edx, ax
mov rcx, rbx
call fcn.1400084a0
mov rcx, rbx
call fcn.140007ec0
nop
lea rcx, [rbp + 0x18]
call fcn.14000e9d0
nop
lea rbx, vtable.std::ios_base.0
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.140025c9c
nop
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e50
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
mov r8d, r12d
mov rdx, r15
call fcn.1400100c0
nop
lea rcx, [rbp + 0x18]
call fcn.14000e9d0
nop
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.140025c9c
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 0x14001e020
test r14, r14
je 0x14001e020
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.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14001de9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x14001de9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x14004dd00]
lea rcx, [rbp + 0x80]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rbp + 0x80]
call fcn.140029aa0
int3
mov edx, dword [rbp + 0x150]
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14001ded6
lea rdx, str.HECI_recv_timeout
lea rcx, [rsp + 0x58]
call fcn.1400026d0
lea rdx, [0x14006ac70]
lea rcx, [rsp + 0x58]
call fcn.140029aa0
int3
test eax, eax
je 0x14001df0a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WaitForSingleObject_after_ReadFile
lea rcx, [rbp + 0x80]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rbp + 0x80]
call fcn.140029aa0
int3
mov r9d, 1
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x14001df58
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.GetOverlappedResult_from_ReadFile
lea rcx, [rbp + 0x80]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rbp + 0x80]
call fcn.140029aa0
int3
mov eax, dword [rsp + 0x30]
mov dword [r14], eax
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e50
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.Heci::SendMsg_ReadFile_bytesRead
call fcn.140001390
mov rcx, rax
mov edx, dword [rsp + 0x30]
call fcn.14000ecc0
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140008ac0
movzx edx, ax
mov rcx, rbx
call fcn.1400084a0
mov rcx, rbx
call fcn.140007ec0
nop
lea rcx, [rbp + 0x18]
call fcn.14000e9d0
nop
lea rbx, vtable.std::ios_base.0
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.140025c9c
nop
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140011e50
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
mov r8d, dword [rsp + 0x30]
mov rdx, rsi
call fcn.1400100c0
nop
lea rcx, [rbp + 0x18]
call fcn.14000e9d0
nop
mov qword [rbp + 0x18], rbx
lea rcx, [rbp + 0x18]
call fcn.140025c9c
nop
mov rcx, qword [rbp + 0xd0]
xor rcx, rsp
call fcn.1400271a0
add rsp, 0x1e0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret