Function at 0x18003ca40
Capabilities:
Query environment variable
Set console window title

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x1800a43c0]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor edi, edi
lea rcx, str.appdata
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov qword [rsp + 0x40], rax
mov rcx, 0xffffffffffffffff
nop
inc rcx
cmp byte [rax + rcx], 0
jne 0x18003ca80
mov qword [rsp + 0x48], rcx
call fcn.180074728
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea r8, [rsp + 0x40]
mov edx, eax
lea rcx, [rsp + 0x60]
call fcn.18003ba20
nop
lea rdx, [rsp + 0x60]
call fcn.18003bc90
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x18003cb00
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003cafb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18003cafb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180074cf0
lea rax, [0x18007acc0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 5
call fcn.180074728
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea r8, [rsp + 0x40]
mov edx, eax
lea rcx, [rsp + 0x60]
call fcn.18003ba20
nop
lea rdx, [rsp + 0x60]
call fcn.18003bc90
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x18003cb87
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003cb82
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18003cb82
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180074cf0
lea rbx, [0x1800bdbb0]
mov rcx, rbx
call fcn.18003c940
test al, al
jne 0x18003cbc1
mov rcx, rbx
cmp qword [0x1800bdbc8], 7
cmova rcx, qword [0x1800bdbb0]
call fcn.180074864
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x18003ced8
lea rax, str.Garth.log
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 9
call fcn.180074728
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea r8, [rsp + 0x40]
mov edx, eax
lea rcx, [rsp + 0x60]
call fcn.18003ba20
nop
lea rdx, [rsp + 0x60]
call fcn.18003bc90
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x18003cc49
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003cc43
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18003cc43
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180074cf0
nop
jmp 0x18003cc54
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_AttachConsole]
test eax, eax
jne 0x18003cc6c
call qword [sym.imp.KERNEL32.dll_AllocConsole]
lea rcx, str.Garth
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov esi, 2
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, si
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov r8d, esi
lea rdx, str.CONOUT_
lea rcx, [0x1800d7a08]
call fcn.18003e390
xor r8d, r8d
test rax, rax
mov rax, qword [0x1800d7a00]
movsxd rcx, dword [rax + 4]
lea rax, [0x1800d7a00]
je 0x18003cce8
add rcx, rax
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]
jmp 0x18003ccf3
add rcx, rax
mov edx, esi
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov r8d, 1
lea rdx, str.CONIN_
lea rcx, [0x1800bdab0]
call fcn.18003e390
xor r8d, r8d
test rax, rax
mov rax, qword [0x1800bdaa0]
movsxd rcx, dword [rax + 4]
lea rax, [0x1800bdaa0]
je 0x18003cd33
add rcx, rax
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]
jmp 0x18003cd3e
add rcx, rax
mov edx, esi
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
cmp qword [0x1800bdbc8], 7
cmova rbx, qword [0x1800bdbb0]
cmp qword [0x1800d7968], 0
jne 0x18003ce93
mov edx, 0xa
mov r8d, 0x40
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_struct__iobuf____ptr64___cdecl_std::_Fiopen_wchar_t_const____ptr64__int__int_]
mov rbx, rax
test rax, rax
je 0x18003ce93
mov byte [0x1800d7964], 1
mov byte [0x1800d7959], 0
lea rcx, [0x1800d78e8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], rdi
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_stream_buffer_pointers]
mov r9, qword [rsp + 0x50]
mov qword [rsp + 0x30], r9
mov r8, qword [rsp + 0x58]
mov qword [rsp + 0x28], r8
mov rdx, qword [rsp + 0x40]
mov qword [rsp + 0x20], rdx
lea rcx, [0x1800d78e8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_char____ptr64____ptr64__char____ptr64____ptr64__int____ptr64__char____ptr64____ptr64__char____ptr64____ptr64__int____ptr64____ptr64]
mov qword [0x1800d7968], rbx
mov rax, qword [0x1800d8ca8]
mov qword [0x1800d795c], rax
mov qword [0x1800d7950], rdi
lea rdx, [rsp + 0x40]
lea rcx, [0x1800d78e8]
call qword [sym.imp.MSVCP140.dll_public:_class_std::locale___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::getloc_void____ptr64]
nop
mov rcx, rax
call fcn.18003e750
mov rbx, rax
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::codecvt_base::always_noconv_void_const___ptr64]
test al, al
je 0x18003ce39
mov qword [0x1800d7950], rdi
jmp 0x18003ce4e
mov qword [0x1800d7950], rbx
lea rcx, [0x1800d78e8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x18003ce71
mov rax, qword [rcx]
call qword [rax + 0x10]
test rax, rax
je 0x18003ce71
mov r8, qword [rax]
mov edx, 1
mov rcx, rax
call qword [r8]
mov rax, qword [0x1800d78e0]
movsxd rcx, dword [rax + 4]
lea rax, [0x1800d78e0]
add rcx, rax
xor r8d, r8d
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]
jmp 0x18003ceb3
mov rax, qword [0x1800d78e0]
movsxd rcx, dword [rax + 4]
lea rax, [0x1800d78e0]
add rcx, rax
xor r8d, r8d
mov edx, esi
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.180074cd0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
shr rdx, 0x20
mov r8, rbx
call fcn.18003c870
int3