Function at 0x140001d10
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push r13
push r14
push r15
sub rsp, 0x220
movaps xmmword [rax - 0x28], xmm6
movaps xmmword [rax - 0x38], xmm7
mov rax, qword [0x140009010]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
xor r15d, r15d
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r15 + 0x1c]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x1400026b4
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], r15
lea rax, [rsp + 0xe0]
mov rdi, 0xffffffffffffffff
mov rbx, rdi
nop dword [rax + rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x140001da0
movabs rax, 0x7fffffffffffffff
cmp rbx, rax
ja 0x1400026f2
mov esi, 0xf
mov qword [rsp + 0x48], rsi
cmp rbx, 0x10
jae 0x140001dfa
mov qword [rsp + 0x40], rbx
mov r8, rbx
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsp + rbx + 0x30], 0
movabs r13, 0x8000000000000000
jmp 0x140001eac
mov r14, rbx
or r14, rsi
cmp r14, rax
jbe 0x140001e18
mov r14, rax
movabs r13, 0x8000000000000000
lea rax, [r13 + 0x27]
jmp 0x140001e49
mov r12d, 0x16
cmp r14, r12
cmovb r14, r12
lea rcx, [r14 + 1]
cmp rcx, 0x1000
jb 0x140001e6b
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400026f8
movabs r13, 0x8000000000000000
mov rcx, rax
call fcn.140003fb0
test rax, rax
je 0x140001e64
lea r15, [rax + 0x27]
and r15, 0xffffffffffffffe0
mov qword [r15 - 8], rax
jmp 0x140001e82
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x140001e78
call fcn.140003fb0
mov r15, rax
movabs r13, 0x8000000000000000
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], r14
mov r8, rbx
lea rdx, [rsp + 0xe0]
mov rcx, r15
call sub.VCRUNTIME140.dll_memcpy
mov byte [r15 + rbx], 0
xor r15d, r15d
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov rax, rdx
sub rax, rcx
cmp rax, 8
jb 0x140001ef4
lea rax, [rcx + 8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x30]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0x30]
movabs rdx, 0x64726f637369445c
mov qword [rax + rcx], rdx
mov byte [rax + rcx + 8], 0
lea rax, [rsp + 0x30]
jmp 0x140001f13
mov qword [rsp + 0x20], 8
lea r9, str.Discord
mov edx, 8
lea rcx, [rsp + 0x30]
call fcn.140003d60
xorps xmm0, xmm0
movups xmmword [rsp + 0x98], xmm0
mov qword [rsp + 0xa8], r15
mov qword [rsp + 0xb0], r15
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x98], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0xa8], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], rsi
mov byte [rax], 0
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x140001f90
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001f8b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001f8b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003fec
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], rsi
mov byte [rsp + 0x30], 0
lea rcx, [rsp + 0x98]
cmp qword [rsp + 0xb0], 0x10
cmovae rcx, qword [rsp + 0x98]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov r12, qword [rsp + 0xa8]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r12
cmp rax, 0xb
jb 0x1400026fe
lea rax, [rsp + 0x98]
cmp qword [rsp + 0xb0], 0x10
cmovae rax, qword [rsp + 0x98]
mov qword [rsp + 0x50], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x88], xmm1
lea r15, [r12 + 0xb]
mov rbx, rsi
lea r14, [rsp + 0x78]
cmp r15, 0xf
jbe 0x1400020a5
mov rbx, r15
or rbx, 0xf
cmp rbx, rcx
jbe 0x140002060
mov rbx, rcx
lea rax, [r13 + 0x27]
mov rcx, rax
call fcn.140003fb0
test rax, rax
je 0x14000264b
lea r14, [rax + 0x27]
and r14, 0xffffffffffffffe0
mov qword [r14 - 8], rax
mov rax, qword [rsp + 0x50]
jmp 0x1400020a0
cmp rbx, 0x16
mov ecx, 0x16
cmovb rbx, rcx
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x140002089
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002703
jmp 0x14000203c
test rcx, rcx
je 0x14000209d
call fcn.140003fb0
mov r14, rax
mov rax, qword [rsp + 0x50]
jmp 0x1400020a0
xor r14d, r14d
mov qword [rsp + 0x78], r14
mov qword [rsp + 0x88], r15
mov qword [rsp + 0x90], rbx
mov r8, r12
mov rdx, rax
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
movsd xmm0, qword [str.update.zip]
movsd qword [r14 + r12], xmm0
movzx eax, word [0x1400065f0]
mov word [r14 + r12 + 8], ax
movzx eax, byte [0x1400065f2]
mov byte [r14 + r12 + 0xa], al
mov byte [r14 + r15], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xor r14d, r14d
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], rsi
lea ecx, [r14 + 0x50]
call fcn.140003fb0
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x68], 0x48
mov qword [rsp + 0x70], 0x4f
movaps xmm0, xmmword [str.https:__github.com_discord_discord_open_source_files_15368919_update.zip]
movups xmmword [rax], xmm0
movaps xmm1, xmmword [0x140006610]
movups xmmword [rax + 0x10], xmm1
movaps xmm0, xmmword [0x140006620]
movups xmmword [rax + 0x20], xmm0
movaps xmm1, xmmword [0x140006630]
movups xmmword [rax + 0x30], xmm1
movsd xmm0, qword [0x140006640]
movsd qword [rax + 0x40], xmm0
mov byte [rax + 0x48], r14b
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x58]
call fcn.140001290
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
jb 0x1400021b0
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400021ab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400021ab
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003fec
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x78]
call fcn.140001760
lea rcx, [rsp + 0x78]
cmp qword [rsp + 0x90], 0x10
cmovae rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x140002203
lea rdx, str.Failed_to_delete_update.zip
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400038e0
lea rdx, [0x140003ab0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x20]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x1400025f7
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], r14
lea rax, [rsp + 0xe0]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140002244
movabs r15, 0x7fffffffffffffff
cmp rdi, r15
ja 0x140002709
mov qword [rsp + 0x48], rsi
cmp rdi, 0x10
jae 0x14000228f
mov qword [rsp + 0x40], rdi
mov r8, rdi
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsp + rdi + 0x30], 0
jmp 0x140002324
mov rbx, rdi
or rbx, 0xf
cmp rbx, r15
jbe 0x1400022bd
mov rbx, r15
lea rax, [r13 + 0x27]
mov rcx, rax
call fcn.140003fb0
test rax, rax
je 0x1400022e6
lea r14, [rax + 0x27]
and r14, 0xffffffffffffffe0
mov qword [r14 - 8], rax
jmp 0x1400022fa
cmp rbx, 0x16
mov eax, 0x16
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x1400022ed
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14000270e
jmp 0x1400022a2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x1400022fa
call fcn.140003fb0
mov r14, rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], rbx
mov r8, rdi
lea rdx, [rsp + 0xe0]
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
mov byte [r14 + rdi], 0
xor r14d, r14d
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov rax, rdx
sub rax, rcx
cmp rax, 0xc
jb 0x140002375
lea rax, [rcx + 0xc]
mov qword [rsp + 0x40], rax
lea rbx, [rsp + 0x30]
cmp rdx, 0x10
cmovae rbx, qword [rsp + 0x30]
add rbx, rcx
mov r8d, 0xc
lea rdx, str.Content.IE5
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + 0xc], 0
lea rax, [rsp + 0x30]
jmp 0x140002394
mov qword [rsp + 0x20], 0xc
lea r9, str.Content.IE5
mov edx, 0xc
lea rcx, [rsp + 0x30]
call fcn.140003d60
movups xmm7, xmmword [rax]
movups xmmword [rsp + 0xb8], xmm7
movups xmm6, xmmword [rax + 0x10]
movups xmmword [rsp + 0xc8], xmm6
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], rsi
mov byte [rax], 0
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x1400023f6
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400023f1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400023f1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003fec
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], rsi
mov byte [rsp + 0x30], 0
mov rax, r15
movq r15, xmm6
sub rax, r15
cmp rax, 0xb
jb 0x140002714
lea rax, [rsp + 0xb8]
movq rdi, xmm7
psrldq xmm6, 8
movq r14, xmm6
cmp r14, 0x10
cmovae rax, rdi
mov qword [rsp + 0x50], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
lea r12, [r15 + 0xb]
lea rbx, [rsp + 0x58]
cmp r12, 0xf
jbe 0x1400024e7
mov rsi, r12
or rsi, 0xf
movabs rcx, 0x7fffffffffffffff
cmp rsi, rcx
jbe 0x1400024a3
mov rsi, rcx
lea rax, [r13 + 0x27]
mov rcx, rax
call fcn.140003fb0
test rax, rax
je 0x14000259e
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
mov rax, qword [rsp + 0x50]
jmp 0x1400024e2
cmp rsi, 0x16
mov ecx, 0x16
cmovb rsi, rcx
lea rcx, [rsi + 1]
cmp rcx, 0x1000
jb 0x1400024cc
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002719
jmp 0x14000247f
test rcx, rcx
je 0x1400024e0
call fcn.140003fb0
mov rbx, rax
mov rax, qword [rsp + 0x50]
jmp 0x1400024e2
xor ebx, ebx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], rsi
mov r8, r15
mov rdx, rax
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
movsd xmm0, qword [str.update.zip]
movsd qword [r15 + rbx], xmm0
movzx eax, word [0x1400065f0]
mov word [r15 + rbx + 8], ax
movzx eax, byte [0x1400065f2]
mov byte [r15 + rbx + 0xa], al
mov byte [rbx + r12], 0
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0x10
cmovae rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x14000256a
lea rdx, str.Failed_to_delete_update.zip_from_INetCache
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400038e0
lea rdx, [0x140003ab0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
jb 0x1400025aa
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400025a5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400025a5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003fec
movdqa xmm0, xmmword [0x1400067b0]
movdqu xmmword [rsp + 0x68], xmm0
mov byte [rsp + 0x58], 0
cmp r14, 0x10
jb 0x1400025f7
lea rdx, [r14 + 1]
mov rax, rdi
cmp rdx, 0x1000
jb 0x1400025ef
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400025ef
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.140003fec
mov r9d, 0x10
lea r8, str.Error
lea rdx, str.DirectX_12_is_missing
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
nop
mov rdx, qword [rsp + 0x90]
cmp rdx, 0x10
jb 0x140002657
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002652
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002652
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003fec
movdqa xmm0, xmmword [0x1400067b0]
movdqu xmmword [rsp + 0x88], xmm0
mov byte [rsp + 0x78], 0
mov rdx, qword [rsp + 0xb0]
cmp rdx, 0x10
jb 0x1400026b4
inc rdx
mov rcx, qword [rsp + 0x98]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400026ae
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400026ae
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003fec
nop
xor eax, eax
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.140003f90
lea r11, [rsp + 0x220]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r13
ret
call fcn.1400011b0
nop
call fcn.140001110
nop
call fcn.1400011b0
call fcn.140001110
nop
call fcn.1400011b0
call fcn.140001110
nop
call fcn.1400011b0
call fcn.140001110
int3