Function at 0x180017d80
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 [0x18009a1c0]
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 0x180017db7
call fcn.18004b9ec
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x28], rbx
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.180014690
nop
lea rdx, [rsp + 0x38]
lea rcx, [0x180097c00]
call fcn.180017700
nop
lea rcx, [rsp + 0x38]
call fcn.180011990
call fcn.18004b9ec
lea rcx, str.Blade
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], 5
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.180014690
nop
lea rdx, [rsp + 0x38]
lea rcx, [0x180097c00]
call fcn.180017700
nop
lea rcx, [rsp + 0x38]
call fcn.180011990
lea rcx, [0x180097c00]
cmp qword [0x180097c18], 7
cmova rcx, qword [0x180097c00]
mov r9d, 0xffffffff
mov r8d, 3
lea rdx, [rsp + 0x38]
call fcn.18004bba0
mov edx, eax
test eax, eax
jne 0x180017ec5
mov eax, dword [rsp + 0x48]
test al, 1
mov ecx, 0x1ff
mov r8d, 0x16d
cmovne ecx, r8d
mov dword [rsp + 0x24], ecx
bt eax, 0xa
jae 0x180017eb7
mov ecx, dword [rsp + 0x4c]
cmp ecx, 0xa000000c
jne 0x180017ea8
lea edi, [rdx + 4]
jmp 0x180017ee6
cmp ecx, 0xa0000003
jne 0x180017eb7
mov edi, 0xa
jmp 0x180017ee6
movzx edi, al
and edi, 0x10
or edi, 0x20
shr edi, 4
jmp 0x180017ee6
mov dword [rsp + 0x24], 0xffff
sub eax, 2
je 0x180017ee1
sub eax, 1
je 0x180017ee1
sub eax, 0x32
je 0x180017ee1
cmp eax, 0x46
jne 0x180017ee6
mov edi, 1
mov dword [rsp + 0x20], edx
lea rax, [0x180097be8]
mov qword [rsp + 0x28], rax
movaps xmm0, xmmword [rsp + 0x20]
movdqa xmmword [rsp + 0x20], xmm0
test edi, edi
jne 0x180017f0f
test edx, edx
jne 0x1800180bb
jmp 0x180017f14
cmp edi, 1
jne 0x180017f3f
lea rcx, [0x180097c00]
cmp qword [0x180097c18], 7
cmova rcx, qword [0x180097c00]
call fcn.18004bb28
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x1800180d3
call fcn.18004b9ec
lea rcx, str.Blade.log
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], 9
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.180014690
nop
lea rdx, [rsp + 0x38]
lea rcx, [0x180097c00]
call fcn.180017700
nop
lea rcx, [rsp + 0x38]
call fcn.180011990
nop
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_AttachConsole]
test eax, eax
jne 0x180017fa0
call qword [sym.imp.KERNEL32.dll_AllocConsole]
lea rcx, [0x180050ab8]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov ebx, 0xc
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, bx
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 r9d, [rbx + 0x34]
lea r8d, [rbx - 0xa]
lea rdx, str.CONOUT_
lea rcx, [0x1800abb28]
call fcn.180018640
xor r8d, r8d
test rax, rax
mov rax, qword [0x1800abb20]
movsxd rcx, dword [rax + 4]
lea rax, [0x1800abb20]
je 0x180018021
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 0x18001802f
add rcx, rax
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov r9d, 0x40
lea r8d, [r9 - 0x3f]
lea rdx, str.CONIN_
lea rcx, [0x180097c30]
call fcn.180018640
xor r8d, r8d
test rax, rax
mov rax, qword [0x180097c20]
movsxd rcx, dword [rax + 4]
lea rax, [0x180097c20]
je 0x180018073
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 0x180018081
add rcx, rax
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov r9d, 0x40
lea r8d, [r9 - 0x36]
lea rdx, [0x180097c00]
lea rcx, [0x1800aba10]
call fcn.1800170c0
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.18004c430
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
lea r8, [0x180097c00]
lea rdx, [rsp + 0x20]
lea rcx, str.exists
call fcn.180014b20
shr rdx, 0x20
lea r8, [0x180097c00]
lea rcx, str.create_directory
call fcn.1800185b0
int3