Function at 0x1400217bd
Capabilities:
Write file on windows

Disassembly:
mov r9, rcx
mov ecx, 0xfffffff5
jmp 0x140021804
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0xd0
test r8, r8
je 0x140021934
mov rbx, r9
mov r15, r8
mov r14, rdx
call fcn.140021b90
mov rsi, rdx
mov edi, 1
test rax, rax
jne 0x140021938
mov rcx, rsi
call fcn.140021bd4
test al, al
je 0x14002194d
movzx eax, byte [rbx + 4]
test rax, rax
je 0x1400219c1
cmp al, 4
jae 0x140021a95
mov cl, byte [r14]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x140021a3d
mov byte [rbx + rax], cl
mov al, byte [rbx + 4]
inc al
mov byte [rbx + 4], al
movzx ecx, byte [rbx]
lea rdx, [0x14003d200]
movzx r14d, byte [rcx + rdx]
mov qword [rsp + 0x80], r14
cmp r14b, al
ja 0x140021a7a
movzx edx, al
mov rcx, rbx
call fcn.140021dcd
mov r8, rdx
lea rdi, [rsp + 0x50]
mov rcx, rdi
mov rdx, rax
call fcn.14001525e
mov byte [rbx + 4], 0
cmp qword [rdi], 0
jne 0x140021a84
mov rdx, qword [rsp + 0x58]
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x88], rax
cmp rax, r14
jne 0x140021b14
mov rcx, rsi
mov r8, r14
call fcn.140021bf0
mov rdi, rax
mov rsi, rdx
test rax, rax
jne 0x140021938
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x90], r14
cmp r14, rsi
mov esi, 1
je 0x140021938
lea r8, [rsp + 0xa0]
and qword [r8], 0
lea r9, str._redacted_
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x90]
call fcn.14002fd70
xor esi, esi
xor edi, edi
mov rax, rdi
mov rdx, rsi
add rsp, 0xd0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
movups xmm0, xmmword [0x14003e518]
lea rax, [rsp + 0x50]
movaps xmmword [rax], xmm0
mov ecx, 0xffffffff
cmp r15, rcx
cmovb rcx, r15
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], ecx
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
mov rcx, rsi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x1400219b3
mov rcx, rsi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x50]
cmp eax, 0x103
je 0x140021b3c
test eax, eax
js 0x140021a26
mov rsi, qword [rsp + 0x58]
jmp 0x140021936
mov r8d, 0x1000
cmp r15, r8
cmovb r8, r15
lea rdi, [rsp + 0x50]
mov rcx, rdi
mov rdx, r14
call fcn.14001525e
cmp qword [rdi], 0
je 0x140021a43
mov r8, qword [rsp + 0x58]
test r8, r8
je 0x140021a60
cmp r8, r15
ja 0x140021aca
lea rdi, [rsp + 0xa0]
mov rcx, rdi
mov rdx, r14
call fcn.14001525e
cmp qword [rdi], 0
jne 0x140021adf
mov rdx, qword [rsp + 0xa8]
mov r8, qword [rsp + 0xb0]
jmp 0x140021a4d
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov esi, eax
shl rsi, 0x20
or rsi, 2
jmp 0x140021938
mov byte [rbx + 4], 0
jmp 0x140021a89
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x60]
mov rcx, rsi
call fcn.140021bf0
mov rdi, rax
mov rsi, rdx
jmp 0x140021938
movzx eax, byte [r14]
lea rcx, [0x14003d200]
movzx ecx, byte [rax + rcx]
cmp rcx, r15
jbe 0x140021a84
mov byte [rbx], al
mov byte [rbx + 4], 1
mov esi, 1
jmp 0x140021936
mov edi, 1
lea rsi, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
jmp 0x140021938
lea rax, str.Unexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.
lea rcx, [rsp + 0xa0]
mov qword [rcx], rax
mov qword [rcx + 8], 1
mov qword [rcx + 0x10], 8
xorps xmm0, xmm0
movups xmmword [rcx + 0x18], xmm0
lea rdx, str._redacted_
call fcn.14002f942
lea rax, str._redacted_
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.14002f9dc
movups xmm0, xmmword [rsp + 0xa8]
lea r8, [rsp + 0x70]
movaps xmmword [r8], xmm0
lea rax, str._redacted_
mov qword [rsp + 0x20], rax
lea rcx, str.called__Result::unwrap____on_an__Err__value
lea r9, [0x14003d3b0]
mov edx, 0x2b
call fcn.14002fc13
lea r8, [rsp + 0xa0]
and qword [r8], 0
lea r9, str._redacted_
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x88]
call fcn.14002fd70
lea rcx, [rsp + 0x98]
mov byte [rcx + 4], 0
and dword [rcx], 0
lea rax, [0x14003e588]
lea rdx, [rsp + 0xa0]
mov qword [rdx], rax
mov qword [rdx + 8], 1
lea rax, [rsp + 0x48]
mov qword [rdx + 0x10], rax
xorps xmm0, xmm0
movups xmmword [rdx + 0x18], xmm0
call fcn.140021f3c
lea rcx, [rsp + 0x70]
mov qword [rcx], rax
call fcn.140001a63
mov ecx, 7
int 0x29
ud2