Function at 0x140004c70
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x50
cmp dword [rcx + 0x74], 0
mov rbp, r8
mov r14, rdx
mov rdi, rcx
je 0x140004cb8
mov eax, dword [rcx + 0x8c]
shr eax, 2
not eax
test al, 1
je 0x140004cec
nop
or r8d, 0xffffffff
xor edx, edx
xor ecx, ecx
call fcn.1400059b0
cmp eax, 0xffffffff
je 0x140004cf7
cmp dword [rdi + 0x74], 0
jne 0x140004ca0
mov qword [rsp + 0x60], rbx
mov ebx, dword [rdi + 0x78]
test ebx, ebx
je 0x140004db7
cmp ebx, 0x32
jg 0x140004d12
je 0x140004d0b
cmp ebx, 1
je 0x140004d0b
jle 0x140004d37
cmp ebx, 3
jle 0x140004d2b
cmp ebx, 5
je 0x140004d24
cmp ebx, 0xe
jne 0x140004d37
mov ebx, 0xc
jmp 0x140004d37
call fcn.140020434
mov dword [rax], 0xb
or eax, 0xffffffff
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x50
pop r14
ret
mov ebx, 0x82
jmp 0x140004d37
cmp ebx, 0x50
je 0x140004d32
cmp ebx, 0x7b
je 0x140004d2b
cmp ebx, 0x522
jne 0x140004d37
mov ebx, 0xd
jmp 0x140004d37
mov ebx, 2
jmp 0x140004d37
mov ebx, 0x11
call fcn.140020434
mov dword [rax], ebx
call fcn.140020434
mov qword [rsp + 0x40], rdi
lea rdx, str.fileio_write
xor ebx, ebx
lea rcx, str.C:OpenSSHcontribwin32openssh......contribwin32win32compat_fileio.c
xor r9d, r9d
mov r8d, 0x2dc
mov eax, dword [rax]
mov dword [rsp + 0x38], eax
lea rax, str.write___ERROR:_d_on_prior_unblocking_write__io:_p
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 7
call fcn.140008ef0
mov rcx, qword [rdi + 0x90]
mov dword [rdi + 0x78], ebx
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 3
jne 0x140004daf
call fcn.140020434
cmp dword [rax], 0x6d
jne 0x140004daf
call fcn.140020434
mov dword [rax], 0x20
or eax, 0xffffffff
jmp 0x140004e96
cmp qword [rdi + 0x60], 0
jne 0x140004e30
mov ecx, 0x19000
call fcn.140020374
mov qword [rdi + 0x60], rax
test rax, rax
jne 0x140004e29
call fcn.140020434
mov ebx, 0xc
mov dword [rax], ebx
call fcn.140020434
mov qword [rsp + 0x40], rdi
lea rdx, str.fileio_write
xor ebx, ebx
lea rcx, str.C:OpenSSHcontribwin32openssh......contribwin32win32compat_fileio.c
xor r9d, r9d
mov r8d, 0x2e9
mov eax, dword [rax]
mov dword [rsp + 0x38], eax
lea rax, str.write___ERROR:_d__io:_p
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 7
call fcn.140008ef0
or eax, 0xffffffff
jmp 0x140004e96
mov dword [rdi + 0x68], 0x19000
mov rcx, qword [rdi + 0x60]
mov r8, r14
mov qword [rsp + 0x68], rsi
mov rdx, rbp
mov esi, dword [rdi + 0x68]
cmp ebp, esi
cmovb esi, ebp
movsxd r9, esi
call fcn.140002a70
test eax, eax
je 0x140004eac
mov dword [rsp + 0x38], eax
lea rdx, str.fileio_write
lea rax, str.memcpy_s_failed_with_error:__d.
xor ebx, ebx
mov qword [rsp + 0x30], rax
lea rcx, str.C:OpenSSHcontribwin32openssh......contribwin32win32compat_fileio.c
mov qword [rsp + 0x28], rbx
xor r9d, r9d
mov r8d, 0x2f1
mov dword [rsp + 0x20], 7
call fcn.140008ef0
or eax, 0xffffffff
mov rsi, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x50
pop r14
ret
cmp dword [rdi + 0x84], 3
je 0x140004fbe
mov rcx, qword [rdi + 0x90]
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x140004fbe
mov rdx, qword [rdi + 0x60]
lea rax, [0x140004b20]
mov rcx, qword [rdi + 0x90]
lea r9, [rdi + 0x20]
mov r8d, esi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFileEx]
test eax, eax
jne 0x140004fd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140004ad0
mov ebx, eax
call fcn.140020434
mov dword [rax], ebx
mov rcx, qword [rdi + 0x90]
call qword [sym.imp.KERNEL32.dll_GetFileType]
xor ebx, ebx
cmp eax, 3
jne 0x140004f74
call fcn.140020434
cmp dword [rax], 0x6d
jne 0x140004f74
mov qword [rsp + 0x38], rdi
lea rax, str.write___ERROR:read_end_of_the_pipe_closed__io:_p
mov qword [rsp + 0x30], rax
lea rdx, str.fileio_write
mov qword [rsp + 0x28], rbx
lea rcx, str.C:OpenSSHcontribwin32openssh......contribwin32win32compat_fileio.c
xor r9d, r9d
mov dword [rsp + 0x20], 7
mov r8d, 0x304
call fcn.140008ef0
call fcn.140020434
mov dword [rax], 0x20
call fcn.140020434
mov qword [rsp + 0x40], rdi
lea rdx, str.fileio_write
xor r9d, r9d
lea rcx, str.C:OpenSSHcontribwin32openssh......contribwin32win32compat_fileio.c
mov r8d, 0x307
mov eax, dword [rax]
mov dword [rsp + 0x38], eax
lea rax, str.write_ERROR_from_cb_2_:_d__io:_p
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 7
call fcn.140008ef0
jmp 0x140004e8e
mov edx, esi
mov rcx, rdi
call fcn.140006150
test eax, eax
jne 0x140004e8e
mov eax, dword [rdi + 0x8c]
xor ebx, ebx
shr eax, 2
not eax
mov dword [rdi + 0x6c], esi
mov dword [rdi + 0x74], 1
test al, 1
je 0x140005025
nop dword [rax + rax]
or r8d, 0xffffffff
xor edx, edx
xor ecx, ecx
call fcn.1400059b0
cmp eax, 0xffffffff
jne 0x140005020
call fcn.140020434
cmp dword [rax], 4
jne 0x140004e8e
cmp dword [rdi + 0x74], ebx
jne 0x140004e8e
call fcn.140020434
mov dword [rax], ebx
cmp dword [rdi + 0x74], ebx
jne 0x140004ff0
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SleepEx]
cmp dword [rdi + 0x74], ebx
jne 0x140005098
mov ebp, dword [rdi + 0x78]
test ebp, ebp
je 0x140005098
call fcn.140020434
mov ecx, ebp
mov rdx, rax
call fcn.140004ad0
mov dword [rdx], eax
lea rcx, str.C:OpenSSHcontribwin32openssh......contribwin32win32compat_fileio.c
mov eax, dword [rdi + 0x78]
lea rdx, str.fileio_write
mov qword [rsp + 0x40], rdi
xor r9d, r9d
mov dword [rsp + 0x38], eax
mov r8d, 0x31d
lea rax, str.write___ERROR_from_cb:_d__io:_p
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 7
call fcn.140008ef0
mov dword [rdi + 0x78], ebx
jmp 0x140004e8e
mov eax, esi
jmp 0x140004e91