Function at 0x1401739b0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x2058
call fcn.14018e1f0
sub rsp, rax
mov rdi, r9
mov rsi, r8
mov r14, rcx
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
je 0x1401739f4
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x140173a25
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
jmp 0x1401739fe
movabs rax, 0x600000000
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], 0
mov qword [r14], 1
add rsp, 0x2058
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x58], 0
lea rdx, [rsp + 0x58]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140173aa3
cmp rdi, 0x1000
mov r8d, 0x1000
cmovb r8, rdi
lea rcx, [rsp + 0x28]
mov rdx, rsi
call fcn.140184b40
cmp dword [rsp + 0x28], 1
jne 0x140173aec
mov r8, qword [rsp + 0x30]
test r8, r8
je 0x140173e05
cmp r8, rdi
ja 0x140173e88
lea rcx, [rsp + 0x58]
mov rdx, rsi
call fcn.140184b40
cmp dword [rsp + 0x58], 1
je 0x140173e9f
mov r12, qword [rsp + 0x60]
mov r13, qword [rsp + 0x68]
jmp 0x140173af6
mov dword [rsp + 0x58], 0
mov eax, 0xffffffff
cmp rdi, rax
mov r8d, 0xffffffff
cmovb r8d, edi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
mov rcx, r15
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140173de4
mov eax, dword [rsp + 0x58]
xor ecx, ecx
xor edx, edx
jmp 0x140173df5
mov r12, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
xor ebp, ebp
lea rcx, [rsp + 0x58]
mov ebx, 0x2000
mov r8d, 0x2000
xor edx, edx
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x28]
mov rdx, r12
mov r8, r13
call fcn.14016b2f0
mov rsi, qword [rsp + 0x28]
mov r8, qword [rsp + 0x30]
movzx edx, word [rsp + 0x38]
test dx, dx
je 0x140173b50
nop word cs:[rax + rax]
nop dword [rax]
xor eax, eax
test rbx, rbx
jne 0x140173c40
jmp 0x140173c5d
cmp rsi, r8
je 0x140173c64
lea rax, [rsi + 1]
mov cl, byte [rsi]
movzx edx, cl
test dl, dl
js 0x140173b79
mov rsi, rax
xor eax, eax
test rbx, rbx
jne 0x140173c40
jmp 0x140173c5d
cmp rax, r8
je 0x140173bc4
movzx eax, byte [rsi + 1]
add rsi, 2
and eax, 0x3f
mov edi, edx
and edi, 0x1f
cmp dl, 0xdf
jbe 0x140173bd3
cmp rsi, r8
je 0x140173bd8
movzx edx, byte [rsi]
add rsi, 1
and edx, 0x3f
mov r9, rsi
shl eax, 6
or eax, edx
cmp cl, 0xf0
jb 0x140173be7
cmp r9, r8
je 0x140173bf0
movzx ecx, byte [r9]
add r9, 1
and ecx, 0x3f
mov rsi, r9
jmp 0x140173bf2
xor eax, eax
mov rsi, r8
mov edi, edx
and edi, 0x1f
cmp dl, 0xdf
ja 0x140173b93
shl edi, 6
jmp 0x140173bea
xor edx, edx
mov r9, r8
shl eax, 6
or eax, edx
cmp cl, 0xf0
jae 0x140173baf
shl edi, 0xc
or eax, edi
mov edx, eax
jmp 0x140173c08
xor ecx, ecx
and edi, 7
shl edi, 0x12
shl eax, 6
or eax, edi
or eax, ecx
mov edx, eax
cmp eax, 0x110000
je 0x140173c64
cmp edx, 0xffff
jbe 0x140173b40
add edx, 0xffff0000
mov ecx, edx
shr ecx, 0xa
or ecx, 0xd800
and edx, 0x3ff
or edx, 0xdc00
mov eax, edx
mov edx, ecx
test rbx, rbx
je 0x140173c5d
nop word [rax + rax]
mov word [rsp + rbp*2 + 0x58], dx
add rbp, 1
add rbx, 0xfffffffffffffffe
mov edx, eax
test dx, dx
jne 0x140173b40
jmp 0x140173b50
mov ebp, 0x1000
jmp 0x140173c71
cmp rbp, 0x1001
jae 0x140173ed4
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
lea rbx, [rsp + 0x58]
lea r9, [rsp + 0x28]
mov rcx, r15
mov rdx, rbx
mov r8d, ebp
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1401739e8
mov r12d, dword [rsp + 0x28]
cmp rbp, r12
je 0x140173e64
jbe 0x140173e74
movzx eax, word [rsp + r12*2 + 0x58]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x312
jae 0x140173d07
lea rdx, [rsp + r12*2]
add rdx, 0x58
add r12, 1
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x28]
mov rcx, r15
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x140173d07
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp r12, rbp
ja 0x140173eea
test r12, r12
je 0x140173e1d
lea rcx, [r12 + r12]
add rcx, 0xfffffffffffffffe
mov rax, rcx
shr rax, 1
add rax, 1
test rcx, rcx
je 0x140173e22
mov rcx, rax
and rcx, 0xfffffffffffffffe
neg rcx
lea rbx, [rsp + 0x58]
xor r13d, r13d
jmp 0x140173d61
add r13, rdx
add rbx, 4
add rcx, 2
je 0x140173e25
movzx ebp, word [rbx]
mov edx, 1
mov edi, 1
cmp bp, 0x7f
jbe 0x140173da0
movzx esi, bp
mov edi, 2
cmp esi, 0x800
jb 0x140173da0
add ebp, 0x2312
movzx ebp, bp
xor edi, edi
cmp ebp, 0x311
seta dil
add rdi, rdi
add rdi, 1
add r13, rdi
movzx ebp, word [rbx + 2]
cmp ebp, 0x80
jb 0x140173d50
movzx edi, bp
mov edx, 2
cmp edi, 0x800
jb 0x140173d50
add ebp, 0x2312
movzx edx, bp
xor ebp, ebp
cmp edx, 0x311
seta bpl
lea rdx, [rbp + 1]
add rdx, rbp
jmp 0x140173d50
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
xor ecx, ecx
mov edx, 1
mov qword [r14], rdx
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], rcx
jmp 0x140173a11
lea rax, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
mov qword [r14 + 0x10], rax
mov qword [r14 + 8], 0xc02
jmp 0x140173a0a
xor r13d, r13d
jmp 0x140173e64
xor r13d, r13d
test al, 1
je 0x140173e64
movzx eax, word [rbx]
mov ecx, 1
cmp eax, 0x80
jb 0x140173e61
movzx edx, ax
mov ecx, 2
cmp edx, 0x800
jb 0x140173e61
add eax, 0x2312
movzx eax, ax
xor ecx, ecx
cmp eax, 0x311
seta cl
add rcx, rcx
add rcx, 1
add r13, rcx
mov qword [r14 + 8], r13
mov qword [r14], 0
jmp 0x140173a11
lea r8, str.library_std_src_syswindows_stdio.rs
mov rcx, r12
mov rdx, rbp
call fcn.14019e3e0
ud2
lea rax, str.library_std_src_syswindows_stdio.rs
mov rcx, r8
mov rdx, rdi
mov r8, rax
call fcn.14019e630
ud2
movups xmm0, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0x40], xmm0
lea rax, str.library_std_src_syswindows_stdio.rs
mov qword [rsp + 0x20], rax
lea rcx, str.called__Result::unwrap____on_an__Err__value
lea r9, fcn.140163710
lea r8, [rsp + 0x40]
mov edx, 0x2b
call fcn.14019e510
ud2
lea r8, str.library_std_src_syswindows_stdio.rs
mov edx, 0x1000
mov rcx, rbp
call fcn.14019e630
ud2
lea r8, str.library_std_src_syswindows_stdio.rs
mov rcx, r12
mov rdx, rbp
call fcn.14019e630
ud2