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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov rax, qword [0x180073010]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rbx, rcx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x40], rcx
xor esi, esi
mov dword [rsp + 0x24], esi
mov r13d, 2
mov edx, r13d
call qword [sym.imp.MSVCP140.dll__Mtx_init_in_situ]
nop
mov qword [rbx + 0x50], rsi
mov qword [rbx + 0x58], rsi
mov qword [rbx + 0x60], rsi
lea rdi, [rbx + 0x68]
mov qword [rsp + 0x48], rdi
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], 7
mov word [rdi], si
lea rax, [rbx + 0x88]
mov qword [rsp + 0x58], rax
mov rcx, rax
call fcn.180032180
nop
lea r12, [rbx + 0x190]
mov qword [rsp + 0x30], r12
mov rcx, r12
call fcn.180032180
nop
lea r15, [rbx + 0x298]
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x60], r15
lea rax, [0x18005dc08]
mov qword [r15], rax
lea rcx, [r15 + 0xb0]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x24], 1
lea rbx, [r15 + 0x10]
mov qword [rsp + 0x50], rbx
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r15
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [r15]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rcx + r15], rax
mov rax, qword [r15]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rcx + r15 - 4], edx
mov qword [rsp + 0x70], rbx
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbx], rax
mov byte [rbx + 0x7c], sil
mov byte [rbx + 0x71], sil
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbx + 0x80], rsi
mov rax, qword [0x180096cf0]
mov qword [rbx + 0x74], rax
mov qword [rbx + 0x68], rsi
lea rcx, str.appdata
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r14, rax
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x180031ad0
call fcn.180050ba8
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], rbx
lea r8, [rsp + 0x70]
mov edx, eax
lea rcx, [rsp + 0x80]
call fcn.180032c30
nop
lea rdx, [rsp + 0x80]
mov rcx, rdi
call fcn.180033410
nop
mov rdx, qword [rsp + 0x98]
cmp rdx, 8
jb 0x180031b59
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180031b54
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180031b54
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180051570
call fcn.180050ba8
lea rcx, [0x18005db90]
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], 0xe
lea r8, [rsp + 0x70]
mov edx, eax
lea rcx, [rsp + 0x80]
call fcn.180032c30
nop
lea rdx, [rsp + 0x80]
mov rcx, rdi
call fcn.180033410
nop
mov rdx, qword [rsp + 0x98]
cmp rdx, 8
jb 0x180031be4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180031bdf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180031bdf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180051570
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x180031bf1
mov rcx, qword [rdi]
mov r9d, 0xffffffff
mov r8d, 3
lea rdx, [rsp + 0x80]
call fcn.180050d5c
mov ecx, eax
test eax, eax
jne 0x180031c62
mov edx, dword [rsp + 0x90]
test dl, 1
mov eax, 0x1ff
mov r8d, 0x16d
cmovne eax, r8d
mov dword [rsp + 0x74], eax
bt edx, 0xa
jae 0x180031c54
mov eax, dword [rsp + 0x94]
cmp eax, 0xa000000c
jne 0x180031c46
lea esi, [rcx + 4]
jmp 0x180031c83
cmp eax, 0xa0000003
jne 0x180031c54
mov esi, 0xa
jmp 0x180031c83
movzx esi, dl
and esi, 0x10
or esi, 0x20
shr esi, 4
jmp 0x180031c83
mov dword [rsp + 0x74], 0xffff
sub eax, 2
je 0x180031c7e
sub eax, 1
je 0x180031c7e
sub eax, 0x32
je 0x180031c7e
cmp eax, 0x46
jne 0x180031c83
mov esi, 1
mov dword [rsp + 0x70], ecx
lea rax, [0x1800733e0]
mov qword [rsp + 0x78], rax
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rsp + 0x70], xmm0
test esi, esi
jne 0x180031cac
test ecx, ecx
jne 0x180031e8e
jmp 0x180031cb1
cmp esi, 1
jne 0x180031cd2
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x180031cbe
mov rcx, qword [rdi]
call fcn.180050ce4
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x180031e9b
call fcn.180050ba8
lea rcx, str.Lucid_Mod_Menu.log
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], 0x12
lea r8, [rsp + 0x70]
mov edx, eax
lea rcx, [rsp + 0x80]
call fcn.180032c30
nop
lea rdx, [rsp + 0x80]
mov rcx, rdi
call fcn.180033410
nop
mov rdx, qword [rsp + 0x98]
cmp rdx, 8
jb 0x180031d5e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180031d58
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180031d58
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180051570
nop
mov rbx, qword [rsp + 0x28]
jmp 0x180031d7f
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_AttachConsole]
test eax, eax
jne 0x180031d97
call qword [sym.imp.KERNEL32.dll_AllocConsole]
lea rcx, str.Lucid_Mod_Menu
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, r13w
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]
lea rcx, [r12 + 8]
mov r8d, r13d
lea rdx, str.CONOUT_
call fcn.1800322f0
mov rcx, rax
mov rax, qword [r12]
movsxd rdx, dword [rax + 4]
xor r8d, r8d
test rcx, rcx
lea rcx, [r12 + rdx]
je 0x180031e07
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 0x180031e10
mov edx, r13d
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_
mov rcx, qword [rsp + 0x50]
call fcn.1800322f0
mov rcx, rax
mov rax, qword [r15]
movsxd rdx, dword [rax + 4]
xor r8d, r8d
test rcx, rcx
lea rcx, [r15 + rdx]
je 0x180031e47
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 0x180031e50
mov edx, r13d
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rdx, rdi
mov rcx, qword [rsp + 0x58]
call fcn.180032640
nop
mov rax, rbx
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.1800511d0
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov r8, rdi
lea rdx, [rsp + 0x70]
call fcn.180034e10
shr rdx, 0x20
mov r8, rdi
call fcn.1800336e0
int3