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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x60
mov rax, qword [0x1800e23b0]
xor rax, rsp
mov qword [rsp + 0x58], rax
xor edi, edi
lea rcx, str.appdata
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rsi, rax
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x18005c717
call fcn.180070974
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x28], rbx
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.18005d690
nop
lea rdx, [rsp + 0x38]
lea rbx, [0x1800fbab0]
mov rcx, rbx
call fcn.18005de80
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x18005c79b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18005c796
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18005c796
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800714d0
call fcn.180070974
lea rcx, str.KaitoITSUKI
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], 0xb
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.18005d690
nop
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.18005de80
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x18005c81a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18005c815
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18005c815
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800714d0
mov rcx, rbx
cmp qword [0x1800fbac8], 8
cmovae rcx, qword [0x1800fbab0]
mov r9d, 0xffffffff
mov r8d, 3
lea rdx, [rsp + 0x38]
call fcn.180070d00
mov r8d, eax
test eax, eax
jne 0x18005c895
mov edx, dword [rsp + 0x48]
test dl, 1
mov ecx, 0x1ff
mov eax, 0x16d
cmovne ecx, eax
mov dword [rsp + 0x24], ecx
bt edx, 0xa
jae 0x18005c887
mov eax, dword [rsp + 0x4c]
cmp eax, 0xa000000c
jne 0x18005c879
lea edi, [r8 + 4]
jmp 0x18005c8b6
cmp eax, 0xa0000003
jne 0x18005c887
mov edi, 0xa
jmp 0x18005c8b6
movzx edi, dl
and edi, 0x10
or edi, 0x20
shr edi, 4
jmp 0x18005c8b6
mov dword [rsp + 0x24], 0xffff
sub eax, 2
je 0x18005c8b1
sub eax, 1
je 0x18005c8b1
sub eax, 0x32
je 0x18005c8b1
cmp eax, 0x46
jne 0x18005c8b6
mov edi, 1
mov dword [rsp + 0x20], r8d
lea rax, [0x1800fbd70]
mov qword [rsp + 0x28], rax
movaps xmm0, xmmword [rsp + 0x20]
movdqa xmmword [rsp + 0x20], xmm0
test edi, edi
jne 0x18005c8e1
test r8d, r8d
jne 0x18005caf1
jmp 0x18005c8e6
cmp edi, 1
jne 0x18005c90a
mov rcx, rbx
cmp qword [0x1800fbac8], 8
cmovae rcx, qword [0x1800fbab0]
call fcn.180070bd4
shr rax, 0x20
test eax, eax
jne 0x18005cafb
call fcn.180070974
lea rcx, str.KaitoITSUKI.log
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], 0xf
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.18005d690
nop
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.18005de80
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x18005c98a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18005c984
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18005c984
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800714d0
nop
jmp 0x18005c993
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_AttachConsole]
test eax, eax
jne 0x18005c9ab
call qword [sym.imp.KERNEL32.dll_AllocConsole]
lea rcx, [0x1800773d8]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov edi, 2
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, di
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, edi
lea rdx, str.CONOUT_
lea rcx, [0x1801007e8]
call fcn.1800528b0
xor r8d, r8d
test rax, rax
mov rax, qword [0x1801007e0]
movsxd rcx, dword [rax + 4]
lea rax, [0x1801007e0]
je 0x18005ca27
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 0x18005ca32
add rcx, rax
mov edx, edi
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, [0x1800fbae0]
call fcn.1800528b0
xor r8d, r8d
test rax, rax
mov rax, qword [0x1800fbad0]
movsxd rcx, dword [rax + 4]
lea rax, [0x1800fbad0]
je 0x18005ca72
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 0x18005ca7d
add rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
cmp qword [0x1800fbac8], 8
cmovae rbx, qword [0x1800fbab0]
mov r8d, 0xa
mov rdx, rbx
lea rcx, [0x1801006c8]
call fcn.18005d150
xor r8d, r8d
test rax, rax
mov rax, qword [0x1801006c0]
movsxd rcx, dword [rax + 4]
lea rax, [0x1801006c0]
je 0x18005cac9
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 0x18005cad4
add rcx, rax
mov edx, edi
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 + 0x58]
xor rcx, rsp
call fcn.180071130
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
lea rdx, [rsp + 0x20]
call fcn.18005f4a0
mov r8, rbx
mov edx, eax
lea rcx, str.create_directory
call fcn.18005e110
int3