Function at 0x14001b4f0
Capabilities:
Set console window title

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x1e8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x160], 0xfffffffffffffffe
mov qword [rbp + 0x158], r8
mov rsi, rcx
mov byte [rcx + 0x20], dl
mov r14, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor ecx, ecx
call r14
lea rdx, str.CONIN_
lea r8, [0x140040cab]
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen_s]
mov rcx, rsi
mov r9, rax
call r15
mov ecx, 1
call r14
lea rcx, [rsi + 8]
lea rdi, str.CONOUT_
lea rbx, [0x140040b6b]
mov rdx, rdi
mov r8, rbx
mov r9, rax
call r15
mov ecx, 2
call r14
lea rcx, [rsi + 0x10]
mov rdx, rdi
mov r8, rbx
mov r9, rax
call r15
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsi + 0x18], rax
cmp rax, 0xffffffffffffffff
je 0x14001ba2c
mov rax, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
xor edx, edx
xor r8d, r8d
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov rax, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
xor edx, edx
xor r8d, r8d
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov rax, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
xor edx, edx
xor r8d, r8d
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
cmp byte [rsi + 0x20], 0
je 0x14001b90a
lea rdi, [rbp + 0xe0]
mov rcx, rdi
call fcn.14001b3b0
mov rdx, qword [rbp + 0x158]
mov rax, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 0x10
mov rcx, rdx
jb 0x14001b625
mov rcx, qword [rdx]
mov qword [rbp - 0x40], rcx
mov qword [rbp - 0x38], rax
movabs rax, 0xc000000000000000
mov qword [rbp - 0x50], rax
mov rax, qword [rbp + 0xf0]
cmp qword [rbp + 0xf8], 0x10
jb 0x14001b653
mov rdi, qword [rbp + 0xe0]
mov qword [rbp - 0x30], rdi
mov qword [rbp - 0x28], rax
movabs rax, 0xc000000000000010
mov qword [rbp - 0x48], rax
mov qword [rbp + 0x100], 2
lea rax, [rbp - 0x50]
mov qword [rbp + 0x108], rax
lea rax, str.LogsLog_.txt
mov qword [rbp + 0xd0], rax
mov qword [rbp + 0xd8], 0x11
lea rdi, [rbp + 0x110]
lea rdx, [rbp + 0xd0]
lea r8, [rbp + 0x100]
mov rcx, rdi
call fcn.140001ec0
mov rax, qword [rbp + 0xf8]
cmp rax, 0x10
jb 0x14001b6fa
mov rcx, qword [rbp + 0xe0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14001b6f5
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14001ba76
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14001dc5c
cmp qword [rbp + 0x128], 0x10
jb 0x14001b70b
mov rdi, qword [rbp + 0x110]
mov dword [rsp + 0x20], 1
lea rcx, [rbp - 0x50]
mov rdx, rdi
mov r8d, 2
mov r9d, 0x40
call fcn.14001c760
lea rcx, [rsi + 0x28]
lea rdx, [rbp - 0x50]
call fcn.14001c990
lea rdi, [rbp + 0x58]
mov rax, qword [rbp - 0x50]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rax - 0x50], rcx
mov rax, qword [rbp - 0x50]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0xa8]
mov dword [rbp + rax - 0x54], ecx
lea rcx, [rbp - 0x48]
call fcn.140015060
mov rcx, rdi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::ios_base::destructor_void____ptr64]
cmp qword [rsi + 0xb0], 0
jne 0x14001b8c5
xorps xmm0, xmm0
movaps xmmword [rbp + 0x140], xmm0
movaps xmmword [rbp + 0x130], xmm0
mov rsi, qword [rbp + 0x120]
cmp qword [rbp + 0x128], 0x10
jb 0x14001b7ad
mov rdi, qword [rbp + 0x110]
jmp 0x14001b7b4
lea rdi, [rbp + 0x110]
test rsi, rsi
js 0x14001ba7c
cmp rsi, 0xf
ja 0x14001b7e1
mov qword [rbp + 0x140], rsi
mov qword [rbp + 0x148], 0xf
movups xmm0, xmmword [rdi]
movaps xmmword [rbp + 0x130], xmm0
jmp 0x14001b847
mov rax, rsi
or rax, 0xf
cmp rax, 0x17
mov ebx, 0x16
cmovae rbx, rax
cmp rbx, 0xfff
jb 0x14001b818
lea rcx, [rbx + 0x28]
call fcn.14001dc18
mov rcx, rax
add rcx, 0x27
and rcx, 0xffffffffffffffe0
mov qword [rcx - 8], rax
jmp 0x14001b824
lea rcx, [rbx + 1]
call fcn.14001dc18
mov rcx, rax
mov qword [rbp + 0x130], rcx
mov qword [rbp + 0x140], rsi
mov qword [rbp + 0x148], rbx
inc rsi
mov rdx, rdi
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [0x1406058a8]
lea r8, str.Failed_to_create_file_
lea r9, [rbp + 0x130]
mov dl, 2
call fcn.14001bc10
mov rax, qword [rbp + 0x148]
cmp rax, 0x10
jb 0x14001b8a8
mov rcx, qword [rbp + 0x130]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14001b8a3
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14001ba76
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14001dc5c
mov qword [rbp + 0x140], 0
mov qword [rbp + 0x148], 0xf
mov byte [rbp + 0x130], 0
mov rax, qword [rbp + 0x128]
cmp rax, 0x10
jb 0x14001b90a
mov rcx, qword [rbp + 0x110]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14001b905
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14001ba76
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14001dc5c
lea rax, str.Fri_Mar_15_13:47:00_2024
mov qword [rbp + 0xe8], rax
movabs rax, 0xb000000000000000
mov qword [rbp + 0xe0], rax
mov qword [rbp + 0x110], 1
lea rax, [rbp + 0xe0]
mov qword [rbp + 0x118], rax
lea rax, str.Enigma_server_
mov qword [rbp + 0x100], rax
mov qword [rbp + 0x108], 0x10
lea rsi, [rbp - 0x50]
lea rdx, [rbp + 0x100]
lea r8, [rbp + 0x110]
mov rcx, rsi
call fcn.140001ec0
cmp qword [rbp - 0x38], 0x10
jb 0x14001b980
mov rsi, qword [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov rax, qword [rbp - 0x38]
cmp rax, 0x10
mov rsi, qword [rbp + 0x158]
jb 0x14001b9cf
mov rcx, qword [rbp - 0x50]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14001b9ca
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14001ba76
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14001dc5c
mov rax, qword [rsi + 0x18]
cmp rax, 0x10
jb 0x14001ba09
mov rcx, qword [rsi]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14001ba04
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14001ba76
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14001dc5c
mov qword [rsi + 0x10], 0
mov qword [rsi + 0x18], 0xf
mov byte [rsi], 0
add rsp, 0x1e8
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
lea rax, vtable.std::exception.0
mov qword [rbp + 0xb8], rax
lea rdx, [rbp + 0xc0]
xorps xmm0, xmm0
movups xmmword [rbp + 0xc0], xmm0
lea rax, str.Unable_to_get_console_handle_n
mov qword [rbp - 0x50], rax
mov byte [rbp - 0x48], 1
lea rcx, [rbp - 0x50]
call sub.VCRUNTIME140.dll___std_exception_copy
lea rdx, [0x140045988]
lea rcx, [rbp + 0xb8]
call sub.VCRUNTIME140.dll__CxxThrowException
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.140002d10
int3