Function at 0x140051490
Capabilities:
Check if file exists
Create directory
Download url
Receive data

Disassembly:
mov r11, rsp
push rbp
push r12
push r14
lea rbp, [r11 - 0x5f]
sub rsp, 0xa0
mov rax, qword [0x140278eb8]
xor rax, rsp
mov qword [rbp + 0x17], rax
cmp qword [rdx + 0x18], 8
mov r12, rcx
mov qword [r11 - 0x20], rbx
mov rcx, rdx
mov qword [r11 - 0x28], rsi
mov rsi, rdx
mov qword [r11 - 0x38], r15
mov r15, r8
jb 0x1400514d3
mov rcx, qword [rdx]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1400514f5
cmp qword [rsi + 0x18], 8
mov rdx, rsi
jb 0x1400514ea
mov rdx, qword [rsi]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov rdx, qword [rsi + 0x10]
lea rbx, [rsi + 0x10]
movdqa xmm0, xmmword [0x14020c430]
lea rcx, [rbp - 0x29]
xor r14d, r14d
inc rdx
movdqu xmmword [rbp - 0x19], xmm0
mov word [rbp - 0x29], r14w
call fcn.14004c490
cmp qword [rsi + 0x18], 8
jb 0x140051528
mov rsi, qword [rsi]
mov r8, qword [rbp - 0x11]
mov rcx, qword [rbp - 0x19]
mov rax, r8
mov rdx, qword [rbx]
sub rax, rcx
mov qword [rsp + 0x88], rdi
cmp rdx, rax
ja 0x140051572
lea rdi, [rcx + rdx]
cmp r8, 8
lea r8, [rdx + rdx]
mov qword [rbp - 0x19], rdi
lea rbx, [rbp - 0x29]
mov rdx, rsi
cmovae rbx, qword [rbp - 0x29]
lea rcx, [rbx + rcx*2]
call fcn.140187470
mov word [rbx + rdi*2], r14w
jmp 0x140051589
lfence
mov r9, rsi
mov qword [rsp + 0x20], rdx
xor r8d, r8d
lea rcx, [rbp - 0x29]
call fcn.140037d80
mov r8, qword [rbp - 0x11]
mov rdx, qword [rbp - 0x19]
mov rax, r8
mov rsi, qword [rsp + 0x90]
sub rax, rdx
cmp rax, 1
jb 0x1400515cc
cmp r8, 8
lea rcx, [rdx + 1]
mov qword [rbp - 0x19], rcx
lea rax, [rbp - 0x29]
cmovae rax, qword [rbp - 0x29]
mov r8d, 0x5c
mov word [rax + rdx*2], r8w
mov word [rax + rcx*2], r14w
jmp 0x1400515ef
lfence
xor r8d, r8d
mov qword [rsp + 0x20], 1
lea r9, [0x14020cbec]
lea rcx, [rbp - 0x29]
lea edx, [r8 + 1]
call fcn.140037d80
cmp qword [r15 + 0x18], 8
mov r9, r15
jb 0x1400515fc
mov r9, qword [r15]
mov rdx, qword [r15 + 0x10]
mov r8, qword [rbp - 0x11]
mov rcx, qword [rbp - 0x19]
mov rax, r8
mov r15, qword [rsp + 0x80]
sub rax, rcx
cmp rdx, rax
ja 0x14005164b
lea rdi, [rcx + rdx]
cmp r8, 8
lea r8, [rdx + rdx]
mov qword [rbp - 0x19], rdi
lea rbx, [rbp - 0x29]
mov rdx, r9
cmovae rbx, qword [rbp - 0x29]
lea rcx, [rbx + rcx*2]
call fcn.140187470
lea rax, [rbp - 0x29]
mov word [rbx + rdi*2], r14w
jmp 0x14005165f
lfence
xor r8d, r8d
mov qword [rsp + 0x20], rdx
lea rcx, [rbp - 0x29]
call fcn.140037d80
movups xmm0, xmmword [rax]
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x98]
movups xmmword [rbp - 9], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 7], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], 7
mov word [rax], r14w
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x1400516ce
mov rcx, qword [rbp - 0x29]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400516c9
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005177c
call fcn.1401574cc
cmp qword [rbp + 0xf], 8
lea rcx, [rbp - 9]
cmovae rcx, qword [rbp - 9]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x140051715
cmp qword [rbp + 0xf], 8
lea r8, [rbp - 9]
cmovae r8, qword [rbp - 9]
cmp qword [r12 + 0x18], 8
jb 0x140051700
mov r12, qword [r12]
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov rdx, r12
xor ecx, ecx
call sub.urlmon.dll_URLDownloadToFileW
mov r14d, eax
mov rdx, qword [rbp + 0xf]
shr r14d, 0x1f
xor r14b, 1
cmp rdx, 8
jb 0x140051759
mov rcx, qword [rbp - 9]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140051754
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140051776
call fcn.1401574cc
movzx eax, r14b
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140157570
add rsp, 0xa0
pop r14
pop r12
pop rbp
ret
call fcn.14019598c
int3
call fcn.14019598c
int3