Function at 0x140039a50
Capabilities:
Set console window title

Disassembly:
push rbp
sub rsp, 0x240
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1b8], 0xfffffffffffffffe
mov qword [rbp - 0x50], r8
mov qword [rbp + 0x1b0], r8
and dl, 1
mov byte [rbp + 0x1af], dl
mov qword [rbp + 0x1a0], rcx
mov rax, qword [rbp + 0x1a0]
mov qword [rbp - 0x48], rax
mov cl, byte [rbp + 0x1af]
and cl, 1
mov byte [rax + 0x20], cl
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov rcx, qword [rbp - 0x48]
mov r9, rax
lea rdx, str.CONIN_
lea r8, [0x140058212]
call qword [sym.imp.ucrtbased.dll_freopen_s]
mov ecx, 1
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov rcx, qword [rbp - 0x48]
mov r9, rax
add rcx, 8
lea rdx, str.CONOUT_
lea r8, [0x14005822c]
call qword [sym.imp.ucrtbased.dll_freopen_s]
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov rcx, qword [rbp - 0x48]
mov r9, rax
add rcx, 0x10
lea rdx, str.CONOUT_
lea r8, [0x14005822c]
call qword [sym.imp.ucrtbased.dll_freopen_s]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
mov rax, qword [rbp - 0x48]
mov qword [rax + 0x18], rcx
mov rcx, 0xffffffffffffffff
cmp qword [rax + 0x18], rcx
jne 0x140039b67
lea rdx, str.Unable_to_get_console_handle_n
lea rcx, [rbp + 0x188]
mov qword [rbp - 0x58], rcx
call fcn.14000c470
mov rcx, qword [rbp - 0x58]
lea rdx, [0x140083e00]
call sub.VCRUNTIME140D.dll__CxxThrowException
jmp 0x140039d33
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov rax, qword [rcx]
movsxd rax, dword [rax + 4]
add rcx, rax
mov rax, qword [sym.imp.MSVCP140D.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
xor edx, edx
mov r8b, dl
call rax
jmp 0x140039b8b
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
mov rax, qword [rcx]
movsxd rax, dword [rax + 4]
add rcx, rax
mov rax, qword [sym.imp.MSVCP140D.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
xor edx, edx
mov r8b, dl
call rax
jmp 0x140039baf
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov rax, qword [rcx]
movsxd rax, dword [rax + 4]
add rcx, rax
mov rax, qword [sym.imp.MSVCP140D.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
xor edx, edx
mov r8b, dl
call rax
jmp 0x140039bd3
mov rax, qword [rbp - 0x48]
test byte [rax + 0x20], 1
je 0x140039cd9
lea rcx, [rbp + 0x138]
call fcn.140039930
jmp 0x140039bf2
mov r8, qword [rbp - 0x50]
lea rax, str.LogsLog_.txt
mov qword [rbp + 0x128], rax
mov qword [rbp + 0x130], 0x11
lea rcx, [rbp + 0x160]
lea rdx, [rbp + 0x128]
lea r9, [rbp + 0x138]
call fcn.140039f40
jmp 0x140039c2e
lea rcx, [rbp + 0x138]
call fcn.140006bd0
mov rax, rsp
mov dword [rax + 0x20], 1
lea rcx, [rbp + 0x20]
lea rdx, [rbp + 0x160]
mov r8d, 2
mov r9d, 0x40
call fcn.140039ff0
jmp 0x140039c65
mov rcx, qword [rbp - 0x48]
add rcx, 0x28
lea rdx, [rbp + 0x20]
call fcn.14003a070
jmp 0x140039c7b
lea rcx, [rbp + 0x20]
call fcn.1400377c0
mov rcx, qword [rbp - 0x48]
add rcx, 0x28
call fcn.14003a0a0
test al, 1
jne 0x140039cc8
lea rcx, [rbp - 8]
lea rdx, [rbp + 0x160]
call fcn.14002c4b0
jmp 0x140039cae
lea rcx, str.Failed_to_create_file_
lea rdx, [rbp - 8]
call fcn.14003a0d0
jmp 0x140039cc3
jmp 0x140039cc8
lea rcx, [rbp + 0x160]
call fcn.140006bd0
jmp 0x140039cd9
lea rax, str.Enigma_server_
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], 0x10
lea r8, str.Fri_Mar_15_13:47:00_2024
lea rcx, [rbp - 0x30]
lea rdx, [rbp - 0x40]
call fcn.14003a150
jmp 0x140039d05
lea rcx, [rbp - 0x30]
call fcn.140009040
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
lea rcx, [rbp - 0x30]
call fcn.140006bd0
mov rcx, qword [rbp - 0x50]
call fcn.140006bd0
nop
add rsp, 0x240
pop rbp
ret
int3