Function at 0x14002f264
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Get geographical location
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x5f0]
sub rsp, 0x6f0
mov rax, qword [0x1400592a0]
xor rax, rsp
mov qword [rbp + 0x5e0], rax
mov rdx, qword [rcx]
xor r12d, r12d
mov rbx, rcx
mov r14d, 1
test rdx, rdx
je 0x14002f2af
mov rax, rdx
jmp 0x14002f2cb
call fcn.14002fff4
test rax, rax
jne 0x14002f2c3
mov eax, 0x80004005
jmp 0x14002f732
mov rcx, rbx
call fcn.14002fff4
cmp dword [rax + 0x130], r12d
je 0x14002f2db
xor eax, eax
jmp 0x14002f732
test rdx, rdx
je 0x14002f2e5
mov rax, rdx
jmp 0x14002f2ed
mov rcx, rbx
call fcn.14002fff4
cmp qword [rax + 0x50], r12
je 0x14002f72f
test rdx, rdx
jne 0x14002f307
mov rcx, rbx
call fcn.14002fff4
mov rdx, rax
mov rax, qword [rdx + 0x50]
cmp word [rax], r12w
je 0x14002f72f
lea rax, [rbp + 0x3d0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x801c
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
nop dword [rax + rax]
test eax, eax
js 0x14002f72f
lea rax, [0x140047128]
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x58]
lea rax, vtable.qYah.0
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x58], r12
call fcn.140043534
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
nop dword [rax + rax]
xor r9d, r9d
xor r8d, r8d
mov ecx, eax
mov edi, eax
lea r15d, [r9 + 0x5c]
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
nop dword [rax + rax]
mov edx, eax
lea rcx, [rsp + 0x58]
mov esi, eax
call fcn.140043e38
test eax, eax
js 0x14002f6fb
mov r9d, esi
mov edx, r15d
mov rsi, qword [rsp + 0x58]
mov ecx, edi
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
nop dword [rax + rax]
test eax, eax
jne 0x14002f3ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x14002f3e9
movzx eax, ax
or eax, 0x80070000
test eax, eax
js 0x14002f6fb
mov rcx, qword [rbx]
test rcx, rcx
jne 0x14002f402
mov rcx, rbx
call fcn.14002fff4
mov rcx, rax
cmp qword [rcx], r12
lea r15, [0x1400486c8]
mov rax, r15
lea r9, [rbp + 0x3d0]
cmovne rax, qword [rcx]
lea r8, str._sMicrosoftMedia_Player_s
mov edi, 0x208
mov qword [rsp + 0x20], rax
lea rcx, [rbp - 0x50]
mov edx, edi
call fcn.140010c94
test eax, eax
js 0x14002f6fb
xor edx, edx
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
nop dword [rax + rax]
mov rcx, qword [rbx]
test rcx, rcx
jne 0x14002f463
mov rcx, rbx
call fcn.14002fff4
mov rcx, rax
cmp qword [rcx], r12
lea r9, [rbp + 0x3d0]
mov rax, r15
mov qword [rsp + 0x28], rsi
cmovne rax, qword [rcx]
lea r8, str._sMicrosoftMedia_Player_s_s
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x20], rax
mov rdx, rdi
call fcn.140010c94
test eax, eax
js 0x14002f6fb
xor edx, edx
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
nop dword [rax + rax]
or rdi, 0xffffffffffffffff
test eax, eax
jne 0x14002f5ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov esi, eax
test eax, eax
jne 0x14002f4ce
lea esi, [rdi + 0x58]
jmp 0x14002f4d9
cmp eax, 0xb7
je 0x14002f5ab
lea r8, [rbp - 0x50]
mov edx, 0x104
lea rax, [rbp + 0x1c0]
sub r8, rax
lea rcx, [rbp + 0x1c0]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x14002f515
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14002f515
mov word [rcx], ax
add rcx, 2
sub rdx, r14
jne 0x14002f4f3
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r12w
je 0x14002f58e
mov edx, 0x5c
lea rcx, [rbp + 0x1c0]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], r12w
jne 0x14002f535
test rax, rax
je 0x14002f572
cmp word [rbp + rax*2 + 0x1be], dx
jne 0x14002f572
lea rcx, [rbp + 0x1c0]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], r12w
jne 0x14002f558
test rax, rax
je 0x14002f572
mov word [rbp + rax*2 + 0x1be], r12w
jmp 0x14002f52b
lea rcx, [rbp + 0x1c0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14002f58e
test al, 0x10
jne 0x14002f5ab
mov r9d, esi
lea r8, [rbp - 0x50]
lea rdx, str.ERROR:_Catalog_download_failed_because__S_could_not_be_created.__Error_0x_x._r_n
mov ecx, 2
call fcn.140019b1c
jmp 0x14002f6fb
mov esi, 0x208
lea r8, str.catalog.wmdb.lz
mov edx, esi
lea rcx, [rbp - 0x50]
call fcn.140010b58
test eax, eax
js 0x14002f6fb
mov rax, qword [rbx]
test rax, rax
jne 0x14002f5da
mov rcx, rbx
call fcn.14002fff4
mov rdx, qword [rax + 0x50]
lea r8, [rbp - 0x50]
mov rcx, rbx
call fcn.14002e938
mov r14d, eax
test eax, eax
js 0x14002f6e7
mov rax, qword [rbx]
test rax, rax
jne 0x14002f605
mov rcx, rbx
call fcn.14002fff4
cmp qword [rax], r12
lea r8, str.SoftwareMicrosoftMediaPlayerPreferencesContentPartners_s
mov rdx, rsi
lea rcx, [rbp + 0x1c0]
cmovne r15, qword [rax]
mov r9, r15
call fcn.140010c94
test eax, eax
js 0x14002f6cb
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 0x1c0]
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], 2
xor r8d, r8d
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x20], r12d
mov qword [rsp + 0x50], r12
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x14002f6cb
lea rax, [rbp - 0x50]
inc rdi
cmp word [rax + rdi*2], r12w
jne 0x14002f67b
mov rcx, qword [rsp + 0x50]
lea eax, [rdi*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.CatalogPath
lea rax, [rbp - 0x50]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov rax, qword [rbx]
test rax, rax
jne 0x14002f6db
mov rcx, rbx
call fcn.14002fff4
mov dword [rax + 0x130], 1
jmp 0x14002f6fb
mov r8d, eax
lea rdx, str.ERROR:_Catalog_download_failed:_0x_x._r_n
mov ecx, 2
call fcn.140019b1c
lea rcx, [rsp + 0x58]
call fcn.140043af4
lea rcx, [rbp - 0x68]
call fcn.14002dda4
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14002f72f
mov rax, qword [rcx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
call qword [0x140048188]
mov eax, r14d
mov rcx, qword [rbp + 0x5e0]
xor rcx, rsp
call fcn.1400017f0
lea r11, [rsp + 0x6f0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret