Function at 0x180001570
Capabilities:
Set console window title

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x180049a38]
mov rax, qword gs:[0x58]
mov edx, 4
mov rax, qword [rax + rcx*8]
mov ecx, dword [rdx + rax]
cmp dword [0x180049cf0], ecx
jle 0x1800015e4
lea rcx, [0x180049cf0]
call fcn.1800399ac
cmp dword [0x180049cf0], 0xffffffff
jne 0x1800015e4
xorps xmm0, xmm0
mov dword [0x180049d0b], 0
lea rcx, [0x180049cf0]
mov byte [0x180049d0f], 0
movdqu xmmword [0x180049cf8], xmm0
mov word [0x180049d08], 0
mov byte [0x180049d0a], 1
call fcn.180039940
cmp byte [0x180049d09], 0
jne 0x18000171c
cmp qword [0x180049cf8], 0
je 0x180001609
cmp qword [0x180049d00], 0
jne 0x180001715
cmp byte [0x180049d08], 0
je 0x18000162a
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Console_already_allocated__n
call fcn.180001e70
jmp 0x180001715
call qword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
jne 0x18000167a
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.AllocConsole___Error:
mov qword [rsp + 0x20], rbx
call fcn.180001e70
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x180002040]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rbx, qword [rsp + 0x20]
jmp 0x180001715
lea rcx, str.Helldivers_2_Debug_Console
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rax
lea r8, [0x18003c950]
lea rdx, str.CONOUT_
lea rcx, [0x180049cf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen_s]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rax
lea r8, [0x18003c960]
lea rdx, str.CONIN_
lea rcx, [0x180049d00]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen_s]
mov rdx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
xor r8d, r8d
mov rax, qword [rdx]
movsxd rcx, dword [rax + 4]
add rcx, rdx
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov rdx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
xor r8d, r8d
mov rax, qword [rdx]
movsxd rcx, dword [rax + 4]
add rcx, rdx
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov byte [0x180049d08], 1
mov byte [0x180049d09], 1
mov byte [0x180049d0a], 1
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov rcx, rax
mov edx, 5
call qword [sym.imp.USER32.dll_ShowWindow]
lea rax, [0x180049cf8]
add rsp, 0x28
ret