Function at 0x1400496b0
Capabilities:
Get common file path
Set console window title

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x270]
sub rsp, 0x370
mov rax, qword [0x140155080]
xor rax, rsp
mov qword [rbp + 0x260], rax
xor edi, edi
mov qword [0x140157698], rdi
mov qword [0x1401573f0], rdi
mov word [0x1401576a0], di
mov word [0x1401573f8], di
mov byte [0x1401576a2], dil
mov byte [0x1401573fa], dil
xorps xmm0, xmm0
xor eax, eax
movups xmmword [0x1401576b0], xmm0
movups xmmword [0x1401576c0], xmm0
movups xmmword [0x1401576d0], xmm0
movups xmmword [0x1401576e0], xmm0
mov byte [0x1401576f0], al
mov dword [0x1401573e8], eax
movups xmmword [0x140157400], xmm0
mov qword [0x140157410], rax
mov dword [0x140157418], eax
mov byte [0x14015741c], al
movsd xmm0, qword [str.dHPHRHj_M_A]
movsd qword [rsp + 0x40], xmm0
movzx ecx, word [0x140133b38]
mov word [rsp + 0x48], cx
movzx eax, byte [0x140133b3a]
mov byte [rsp + 0x40], 0x53
xor byte [rsp + 0x41], 0x38
xor byte [rsp + 0x42], 0x39
xor byte [rsp + 0x43], 0x3a
xor byte [rsp + 0x44], 0x3b
xor byte [rsp + 0x45], 0x3c
xor byte [rsp + 0x46], 0x3d
xor byte [rsp + 0x47], 0x3e
xor cl, 0x3f
mov byte [rsp + 0x48], cl
xor byte [rsp + 0x49], 0x40
xor al, 0x41
mov byte [rsp + 0x4a], al
xorps xmm0, xmm0
movups xmmword [rbp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x40], xmm1
lea rax, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp byte [rax + r8], dil
jne 0x1400497d0
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x30]
call fcn.140002370
nop
lea rcx, [rbp + 0x30]
cmp qword [rbp + 0x48], 0xf
cmova rcx, qword [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
lea rcx, [0x140157420]
call fcn.1400c25e0
cmp byte [0x140157630], 0
jne 0x140049829
lea rdx, str.Failed_to_initialize_KeyAuth._Exiting_program._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14004be60
jmp 0x140049d2a
lea rax, [rbp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x1a]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xorps xmm0, xmm0
test eax, eax
js 0x1400498af
movups xmmword [rbp - 0x10], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp], xmm1
lea rax, [rbp + 0x50]
nop dword [rax + rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140049860
mov r8, rbx
lea rdx, [rbp + 0x50]
lea rcx, [rbp - 0x10]
call fcn.14004c350
nop
lea rdx, [rbp - 0x10]
cmp qword [rbp + 8], 7
cmova rdx, qword [rbp - 0x10]
mov rax, qword [rbp]
lea r8, [rdx + rax*2]
lea rdx, [rbp - 0x10]
cmova rdx, qword [rbp - 0x10]
lea rcx, [rbp - 0x30]
call fcn.14004bb40
nop
lea rcx, [rbp - 0x10]
call fcn.14004b870
jmp 0x1400498cf
movups xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x18], rdi
xor r8d, r8d
lea rdx, [0x140129a18]
lea rcx, [rbp - 0x30]
call fcn.140002370
nop
movabs rsi, 0x7fffffffffffffff
mov rax, rsi
mov rcx, qword [rbp - 0x20]
sub rax, rcx
cmp rax, 0xf
jb 0x14004a1cc
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova r9, qword [rbp - 0x30]
mov qword [rsp + 0x30], reloc.WS2_32.dll_ntohs
lea rax, str.SpiritWareKey
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp + 0x10]
call fcn.14004cb90
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x10], xmm0
movdqa xmm1, xmmword [0x14013a2e0]
movdqu xmmword [rbp], xmm1
mov byte [rbp - 0x10], 0
mov rdi, qword [rbp + 0x20]
lea rbx, [rbp + 0x10]
cmp qword [rbp + 0x28], 0xf
cmova rbx, qword [rbp + 0x10]
call fcn.140114c60
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rdi
lea r8, [rsp + 0x50]
mov edx, eax
lea rcx, [rsp + 0x70]
call fcn.140048a70
nop
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x50]
call fcn.1400491a0
movsd xmm0, qword [rax]
movsd qword [rsp + 0x40], xmm0
mov ecx, dword [rax + 8]
mov dword [rsp + 0x50], ecx
lea r15, [0x140155250]
mov qword [rsp + 0x58], r15
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rbp - 0x50], xmm0
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140049c89
cmp eax, 1
setne bl
lea rcx, [rsp + 0x70]
call fcn.14004b870
lea r14, str.SpiritWare
test bl, bl
je 0x140049cb0
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rbp + 0x50]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp + 0x10]
lea rcx, [rbp + 0x50]
call fcn.14004afb0
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
movdqa xmm1, xmmword [0x14013a2e0]
movdqu xmmword [rbp - 0x40], xmm1
mov byte [rbp - 0x50], 0
cmp qword [rbp + 0xe0], 0
je 0x140049a5e
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x50]
add rcx, rax
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
movzx r8d, al
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0x50]
call fcn.14004d1b0
lea rcx, [rbp + 0x60]
call fcn.14004b7b0
test rax, rax
jne 0x140049a5e
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x50]
call fcn.140005560
nop
lea rcx, [rbp - 0x50]
call fcn.140005990
nop
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x50], rax
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx + 0x4c], edx
lea rcx, [rbp + 0x60]
call fcn.14004af40
lea rcx, [rbp + 0x68]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x100]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [rbp - 0x10], xmm0
movups xmm1, xmmword [rsp + 0x60]
movups xmmword [rbp], xmm1
movdqa xmm0, xmmword [0x14013a2e0]
movdqu xmmword [rsp + 0x60], xmm0
mov byte [rsp + 0x50], 0
lea rcx, [rsp + 0x50]
call fcn.140005990
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x70]
call fcn.140005560
mov rdx, rax
lea rcx, [0x140157420]
call fcn.1400c3cd0
cmp byte [0x140157630], 0
jne 0x140049c98
lea rdx, str.Invalid_key._Please_enter_a_new_key._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14004be60
mov rdi, qword [rbp + 0x20]
lea rbx, [rbp + 0x10]
cmp qword [rbp + 0x28], 0xf
cmova rbx, qword [rbp + 0x10]
call fcn.140114c60
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rdi
lea r8, [rsp + 0x50]
mov edx, eax
lea rcx, [rbp - 0x50]
call fcn.140048a70
nop
lea rcx, [rbp - 0x50]
cmp qword [rbp - 0x38], 7
cmova rcx, qword [rbp - 0x50]
call fcn.14011536c
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x14004a1d2
lea rcx, [rbp - 0x50]
call fcn.14004b870
lea rdx, str.Enter__key:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14004be60
lea rdx, [rbp - 0x10]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call fcn.14004c030
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x70]
call fcn.140005560
mov rdx, rax
lea rcx, [0x140157420]
call fcn.1400c3cd0
cmp byte [0x140157630], 0
je 0x140049cf8
lea rdx, str.Key_system_successful._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14004be60
mov rax, rsi
mov rcx, qword [rbp - 0x20]
sub rax, rcx
cmp rax, 0xb
jb 0x14004a1e7
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova r9, qword [rbp - 0x30]
mov qword [rsp + 0x30], ntohs
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x70]
call fcn.14004cb90
nop
mov rdi, qword [rbp - 0x80]
lea rbx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0xf
cmova rbx, qword [rsp + 0x70]
call fcn.140114c60
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rdi
lea r8, [rsp + 0x50]
mov edx, eax
lea rcx, [rbp - 0x50]
call fcn.140048a70
nop
lea rcx, [rbp - 0x50]
cmp qword [rbp - 0x38], 7
cmova rcx, qword [rbp - 0x50]
call fcn.140114ec0
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x14004a1ed
lea rcx, [rbp - 0x50]
call fcn.14004b870
nop
jmp 0x140049df0
xor bl, bl
test ecx, ecx
jne 0x14004a1a1
jmp 0x1400499b2
lea rdx, str.Key_system_successful._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14004be60
jmp 0x140049e07
lea rdx, str.Enter_key:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14004be60
lea rdx, [rbp - 0x10]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call fcn.14004c030
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x70]
call fcn.140005560
mov rdx, rax
lea rcx, [0x140157420]
call fcn.1400c3cd0
cmp byte [0x140157630], 0
jne 0x140049d3d
lea rdx, str.Invalid_key._Exiting_program._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14004be60
nop
lea rcx, [rbp - 0x10]
call fcn.140005990
nop
lea rcx, [rbp + 0x10]
call fcn.140005990
nop
lea rcx, [rbp - 0x30]
call fcn.140005990
nop
lea rcx, [rbp + 0x30]
call fcn.140005990
mov eax, 1
jmp 0x14004a149
lea rdx, str.Key_system_successful._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14004be60
mov rax, rsi
mov rcx, qword [rbp - 0x20]
sub rax, rcx
cmp rax, 0xb
jb 0x14004a202
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova r9, qword [rbp - 0x30]
mov qword [rsp + 0x30], ntohs
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x70]
call fcn.14004cb90
nop
mov rdi, qword [rbp - 0x80]
lea rbx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0xf
cmova rbx, qword [rsp + 0x70]
call fcn.140114c60
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rdi
lea r8, [rsp + 0x50]
mov edx, eax
lea rcx, [rbp - 0x50]
call fcn.140048a70
nop
lea rcx, [rbp - 0x50]
cmp qword [rbp - 0x38], 7
cmova rcx, qword [rbp - 0x50]
call fcn.140114ec0
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x14004a208
lea rcx, [rbp - 0x50]
call fcn.14004b870
nop
lea rcx, [rsp + 0x70]
call fcn.140005990
lea rdx, [rbp - 0x10]
lea rcx, [rbp + 0x10]
call fcn.140049580
mov rax, rsi
mov rcx, qword [rbp - 0x20]
sub rax, rcx
cmp rax, 0xb
jb 0x14004a21d
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova r9, qword [rbp - 0x30]
mov qword [rsp + 0x30], ntohs
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x70]
call fcn.14004cb90
nop
mov rdi, qword [rbp - 0x80]
lea rbx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0xf
cmova rbx, qword [rsp + 0x70]
call fcn.140114c60
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rdi
lea r8, [rsp + 0x50]
mov edx, eax
lea rcx, [rbp - 0x70]
call fcn.140048a70
nop
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x50]
call fcn.1400491a0
movsd xmm0, qword [rax]
movsd qword [rsp + 0x40], xmm0
mov ecx, dword [rax + 8]
mov dword [rbp - 0x50], ecx
mov qword [rbp - 0x48], r15
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x14004a175
cmp eax, 1
sete bl
lea rcx, [rbp - 0x70]
call fcn.14004b870
nop
lea rcx, [rsp + 0x70]
call fcn.140005990
test bl, bl
je 0x140049f80
mov rax, rsi
mov rcx, qword [rbp - 0x20]
sub rax, rcx
cmp rax, 0xb
jb 0x14004a223
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova r9, qword [rbp - 0x30]
mov qword [rsp + 0x30], ntohs
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x70]
call fcn.14004cb90
nop
mov rdi, qword [rbp - 0x80]
lea rbx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0xf
cmova rbx, qword [rsp + 0x70]
call fcn.140114c60
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x48], rdi
lea r8, [rbp - 0x50]
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.140048a70
nop
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 7
cmova rcx, qword [rsp + 0x50]
call fcn.140114ec0
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x14004a229
lea rcx, [rsp + 0x50]
call fcn.14004b870
nop
lea rcx, [rsp + 0x70]
call fcn.140005990
mov rax, rsi
mov rcx, qword [rbp - 0x20]
sub rax, rcx
cmp rax, 0x13
jb 0x14004a23f
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova r9, qword [rbp - 0x30]
mov qword [rsp + 0x30], reloc.WS2_32.dll_send
lea r14, str.SpiritWareconfigs
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x70]
call fcn.14004cb90
nop
mov rdi, qword [rbp - 0x80]
lea rbx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0xf
cmova rbx, qword [rsp + 0x70]
call fcn.140114c60
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x48], rdi
lea r8, [rbp - 0x50]
mov edx, eax
lea rcx, [rbp - 0x70]
call fcn.140048a70
nop
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x50]
call fcn.1400491a0
movsd xmm0, qword [rax]
movsd qword [rsp + 0x40], xmm0
mov ecx, dword [rax + 8]
mov dword [rbp - 0x50], ecx
mov qword [rbp - 0x48], r15
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x14004a180
cmp eax, 1
sete bl
lea rcx, [rbp - 0x70]
call fcn.14004b870
nop
lea rcx, [rsp + 0x70]
call fcn.140005990
test bl, bl
je 0x14004a0fa
mov rax, qword [rbp - 0x20]
sub rsi, rax
cmp rsi, 0x13
jb 0x14004a245
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova r9, qword [rbp - 0x30]
mov qword [rsp + 0x30], reloc.WS2_32.dll_send
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x70]
call fcn.14004cb90
nop
mov rdi, qword [rbp - 0x80]
lea rbx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0xf
cmova rbx, qword [rsp + 0x70]
call fcn.140114c60
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x48], rdi
lea r8, [rbp - 0x50]
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.140048a70
nop
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 7
cmova rcx, qword [rsp + 0x50]
call fcn.140114ec0
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x14004a18b
lea rcx, [rsp + 0x50]
call fcn.14004b870
nop
lea rcx, [rsp + 0x70]
call fcn.140005990
call fcn.140050680
lea rdx, str.Press_enter_to_close
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14004be60
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_istream_char__struct_std::char_traits_char__::get_void____ptr64]
nop
lea rcx, [rbp - 0x10]
call fcn.140005990
nop
lea rcx, [rbp + 0x10]
call fcn.140005990
nop
lea rcx, [rbp - 0x30]
call fcn.140005990
nop
lea rcx, [rbp + 0x30]
call fcn.140005990
xor eax, eax
mov rcx, qword [rbp + 0x260]
xor rcx, rsp
call fcn.140115700
lea r11, [rsp + 0x370]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov bl, 1
test ecx, ecx
jne 0x14004a1b0
jmp 0x140049eb8
mov bl, 1
test ecx, ecx
jne 0x14004a1be
jmp 0x14004a035
shr rdx, 0x20
lea r8, [rsp + 0x50]
lea rcx, str.create_directory
call fcn.1400490d0
nop
lea r8, [rsp + 0x70]
lea rdx, [rbp - 0x50]
call fcn.140049140
nop
lea r8, [rbp - 0x70]
lea rdx, [rbp - 0x50]
call fcn.140049140
nop
lea r8, [rbp - 0x70]
lea rdx, [rbp - 0x50]
call fcn.140049140
nop
call fcn.1400022f0
nop
shr rdx, 0x20
lea r8, [rbp - 0x50]
lea rcx, [0x140132c38]
call fcn.1400490d0
nop
call fcn.1400022f0
nop
shr rdx, 0x20
lea r8, [rbp - 0x50]
lea rcx, str.create_directory
call fcn.1400490d0
nop
call fcn.1400022f0
nop
shr rdx, 0x20
lea r8, [rbp - 0x50]
lea rcx, str.create_directory
call fcn.1400490d0
nop
call fcn.1400022f0
int3
call fcn.1400022f0
nop
shr rdx, 0x20
lea r8, [rsp + 0x50]
lea rcx, str.create_directory
call fcn.1400490d0
nop
call fcn.1400022f0
int3
call fcn.1400022f0
int3