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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2a8]
sub rsp, 0x380
mov rax, qword [0x140181080]
xor rax, rsp
mov qword [rbp + 0x270], rax
xor r14d, r14d
xorps xmm0, xmm0
movups xmmword [rbp], xmm0
lea ecx, [r14 + 8]
mov qword [rbp + 0x10], rcx
lea esi, [rcx + 7]
mov qword [rbp + 0x18], rsi
movabs rax, 0x32343a36333a3232
mov qword [rbp], rax
mov byte [rbp + 8], r14b
movups xmmword [rbp - 0x40], xmm0
lea ebx, [rcx + 3]
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], rsi
movsd xmm0, qword [str.Sep__1_2024]
movsd qword [rbp - 0x40], xmm0
movzx eax, word [0x140157e48]
mov word [rbp - 0x38], ax
mov al, byte [0x140157e4a]
mov byte [rbp - 0x36], al
mov byte [rbp - 0x35], r14b
mov qword [rsp + 0x30], rcx
lea rax, [rbp]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], reloc.WS2_32.dll_recv
lea r9, str.moon___built_at
lea rcx, [rsp + 0x60]
call fcn.140002788
nop
lea r8d, [r14 + 1]
lea rdx, [0x140157e4c]
lea rcx, [rsp + 0x60]
call fcn.1400019f4
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x50], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], rsi
mov byte [rax], r14b
lea rdx, [rbp - 0x40]
mov r8d, ebx
lea rcx, [rsp + 0x40]
call fcn.1400019f4
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x10], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x20], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x10], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], rsi
mov byte [rax], r14b
mov r15d, 0x1000
mov rdx, qword [rsp + 0x58]
cmp rdx, rsi
jbe 0x140004a84
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, r15
jb 0x140004a7f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004a7f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140127f74
movdqa xmm0, xmmword [0x140169df0]
movdqu xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x40], r14b
mov rdx, qword [rsp + 0x78]
cmp rdx, rsi
jbe 0x140004ad2
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, r15
jb 0x140004acd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004acd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140127f74
lea rcx, [rbp - 0x20]
cmp qword [rbp - 8], rsi
cmova rcx, qword [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
xorps xmm0, xmm0
movups xmmword [rbp + 0x20], xmm0
movdqa xmm1, xmmword [0x140169df0]
movdqu xmmword [rbp + 0x30], xmm1
mov byte [rbp + 0x20], r14b
movups xmmword [rbp + 0x40], xmm0
movdqu xmmword [rbp + 0x50], xmm1
mov byte [rbp + 0x40], r14b
lea rax, [rbp + 0x60]
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 0x140004bd5
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
lea rax, [rbp + 0x60]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r14w
jne 0x140004b46
lea rdx, [rbp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.140006450
nop
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 7
cmova rcx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x50]
lea r8, [rcx + rax*2]
lea rdx, [rsp + 0x40]
cmova rdx, qword [rsp + 0x40]
lea rcx, [rbp - 0x60]
call fcn.14000615c
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x140004bcf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, r15
jb 0x140004bca
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004bca
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140127f74
mov rcx, qword [rbp - 0x50]
jmp 0x140004be8
movups xmmword [rbp - 0x60], xmm0
mov rcx, r14
mov qword [rbp - 0x50], rcx
mov qword [rbp - 0x48], rsi
mov byte [rbp - 0x60], r14b
movabs rbx, 0x7fffffffffffffff
mov rax, rbx
sub rax, rcx
mov r12d, 5
cmp rax, r12
jae 0x140004c09
call fcn.140001734
int3
lea r9, [rbp - 0x60]
cmp qword [rbp - 0x48], rsi
cmova r9, qword [rbp - 0x60]
mov qword [rsp + 0x30], r12
lea r13, [0x140157e64]
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 0x80]
call fcn.140002788
nop
lea rax, [rbp - 0x80]
cmp qword [rbp - 0x68], rsi
cmova rax, qword [rbp - 0x80]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x70]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140006754
nop
mov dword [rsp + 0x40], r14d
lea rax, [0x140181118]
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.1400047a4
mov dil, al
cmp dword [rsp + 0x40], r14d
je 0x140004cad
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x40]
lea rcx, str.exists
call fcn.1400046d0
nop
lea rcx, [rsp + 0x60]
call fcn.140005b10
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, rsi
jbe 0x140004cf1
inc rdx
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, r15
jb 0x140004cec
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004cec
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140127f74
test dil, dil
jne 0x140004de7
mov rax, rbx
mov rcx, qword [rbp - 0x50]
sub rax, rcx
cmp rax, r12
jae 0x140004d0f
call fcn.140001734
int3
lea r9, [rbp - 0x60]
cmp qword [rbp - 0x48], rsi
cmova r9, qword [rbp - 0x60]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x60]
call fcn.140002788
nop
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], rsi
cmova rax, qword [rsp + 0x60]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x80]
call fcn.140006754
nop
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 7
cmova rcx, qword [rbp - 0x80]
call fcn.140127324
mov qword [rsp + 0x40], rax
shr rax, 0x20
test eax, eax
je 0x140004da2
lea r8, [rbp - 0x80]
mov edx, eax
lea rcx, str.create_directory
call fcn.140004670
nop
lea rcx, [rbp - 0x80]
call fcn.140005b10
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, rsi
jbe 0x140004de7
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, r15
jb 0x140004de2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004de2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140127f74
mov rax, rbx
mov rcx, qword [rbp - 0x50]
sub rax, rcx
mov r12d, reloc.WS2_32.dll_listen
cmp rax, r12
jae 0x140004e02
call fcn.140001734
int3
lea r9, [rbp - 0x60]
cmp qword [rbp - 0x48], rsi
cmova r9, qword [rbp - 0x60]
mov qword [rsp + 0x30], r12
lea r13, str.moonconfigs
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x60]
call fcn.140002788
nop
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], rsi
cmova rax, qword [rsp + 0x60]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x80]
call fcn.140006754
nop
mov dword [rsp + 0x40], r14d
lea rax, [0x140181118]
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x80]
call fcn.1400047a4
mov dil, al
cmp dword [rsp + 0x40], r14d
je 0x140004ea8
lea r8, [rbp - 0x80]
lea rdx, [rsp + 0x40]
lea rcx, str.exists
call fcn.1400046d0
nop
lea rcx, [rbp - 0x80]
call fcn.140005b10
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, rsi
jbe 0x140004eed
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, r15
jb 0x140004ee8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004ee8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140127f74
test dil, dil
jne 0x140004fdf
mov rax, qword [rbp - 0x50]
sub rbx, rax
cmp rbx, r12
jae 0x140004f08
call fcn.140001734
int3
lea r9, [rbp - 0x60]
cmp qword [rbp - 0x48], rsi
cmova r9, qword [rbp - 0x60]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rax
lea rcx, [rbp - 0x80]
call fcn.140002788
nop
lea rax, [rbp - 0x80]
cmp qword [rbp - 0x68], rsi
cmova rax, qword [rbp - 0x80]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x70]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140006754
nop
lea rcx, [rsp + 0x60]
cmp qword [rsp + 0x78], 7
cmova rcx, qword [rsp + 0x60]
call fcn.140127324
mov qword [rsp + 0x40], rax
shr rax, 0x20
test eax, eax
je 0x140004f9b
lea r8, [rsp + 0x60]
mov edx, eax
lea rcx, str.create_directory
call fcn.140004670
nop
lea rcx, [rsp + 0x60]
call fcn.140005b10
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, rsi
jbe 0x140004fdf
inc rdx
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, r15
jb 0x140004fda
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004fda
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140127f74
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rsi
movsd xmm0, qword [str.initializing...]
movsd qword [rsp + 0x40], xmm0
mov eax, dword [0x140157e88]
mov dword [rsp + 0x48], eax
movzx eax, word [0x140157e8c]
mov word [rsp + 0x4c], ax
mov al, byte [reloc.WLDAP32.dll_Ordinal_46]
mov byte [rsp + 0x4e], al
mov byte [rsp + 0x4f], r14b
lea rcx, [rsp + 0x40]
call fcn.14000924c
call fcn.14000d750
jmp 0x14000502b