Function at 0x14000c4f0
Capabilities:
Write file on windows

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x88
test r8, r8
je 0x14000c530
mov r14, r9
mov rdi, r8
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
je 0x14000c536
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14000c552
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
shl rdx, 0x20
or rdx, 2
jmp 0x14000c540
xor edx, edx
xor eax, eax
jmp 0x14000c545
movabs rdx, 0x600000002
mov eax, 1
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
ret
mov dword [rsp + 0x48], 0
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x14000c652
movzx eax, byte [r14 + 4]
test rax, rax
je 0x14000c699
cmp al, 4
jae 0x14000c760
mov cl, byte [rbx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x14000c6ef
mov byte [r14 + rax], cl
mov al, byte [r14 + 4]
add al, 1
mov byte [r14 + 4], al
movzx ecx, byte [r14]
lea rdx, [0x14001ec93]
movzx edi, byte [rcx + rdx]
mov qword [rsp + 0x78], rdi
cmp dil, al
ja 0x14000c754
movzx r8d, al
cmp al, 5
jae 0x14000c7a6
lea rcx, [rsp + 0x30]
mov rdx, r14
call fcn.140017dd0
mov byte [r14 + 4], 0
cmp qword [rsp + 0x30], 0
jne 0x14000c6f4
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x28], rax
cmp rax, rdi
jne 0x14000c7ce
mov rcx, rsi
mov r8, rdi
call fcn.14000c800
mov rcx, rax
mov eax, 1
test rcx, rcx
jne 0x14000c545
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0x28], rdi
cmp rdi, rdx
je 0x14000c754
mov qword [rsp + 0x48], 0
lea r9, str.library_std_src_syswindows_stdio.rsUnexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.
lea rcx, [rsp + 0x80]
jmp 0x14000c7e3
mov dword [rsp + 0x48], 0
mov eax, 0xffffffff
cmp rdi, rax
mov r8d, 0xffffffff
cmovb r8d, edi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov rcx, rsi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000c51e
mov edx, dword [rsp + 0x48]
xor eax, eax
jmp 0x14000c545
cmp rdi, 0x1000
mov r8d, 0x1000
cmovb r8, rdi
lea rcx, [rsp + 0x30]
mov rdx, rbx
call fcn.140017dd0
cmp qword [rsp + 0x30], 0
je 0x14000c705
mov r8, qword [rsp + 0x38]
test r8, r8
je 0x14000c71f
cmp r8, rdi
ja 0x14000c7b7
lea rdi, [rsp + 0x48]
mov rcx, rdi
mov rdx, rbx
call fcn.140017dd0
mov rcx, rdi
call fcn.140007ce0
mov r8, rdx
jmp 0x14000c70f
mov byte [r14 + 4], 0
mov eax, 1
lea rdx, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
jmp 0x14000c545
mov rax, qword [rsp + 0x38]
mov r8, qword [rsp + 0x40]
mov rcx, rsi
mov rdx, rax
call fcn.14000c800
jmp 0x14000c545
movzx ecx, byte [rbx]
lea rax, [0x14001ec93]
movzx ebx, byte [rcx + rax]
mov eax, 1
lea rdx, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
cmp rbx, 2
jb 0x14000c545
cmp rbx, rdi
jbe 0x14000c545
mov byte [r14], cl
mov byte [r14 + 4], 1
mov edx, 1
xor eax, eax
jmp 0x14000c545
lea rax, [0x14001f2f0]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], 1
mov qword [rsp + 0x58], 0
lea rax, str.AccessErrorcannot_access_a_Thread_Local_Storage_value_during_or_after_destructionlibrary_std_src_threadlocal.rs_
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], 0
lea rdx, str.library_std_src_syswindows_stdio.rsUnexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.
lea rcx, [rsp + 0x48]
call fcn.14001bee0
ud2
lea rax, str.library_std_src_syswindows_stdio.rsUnexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.
mov edx, 4
mov rcx, r8
jmp 0x14000c7c4
lea rax, str.library_std_src_syswindows_stdio.rsUnexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.
mov rcx, r8
mov rdx, rdi
mov r8, rax
call fcn.14001c040
ud2
mov qword [rsp + 0x48], 0
lea r9, str.library_std_src_syswindows_stdio.rsUnexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.
lea rcx, [rsp + 0x78]
lea rdx, [rsp + 0x28]
lea r8, [rsp + 0x48]
call fcn.14001baf0
ud2