Function at 0x180016e10
Capabilities:
Delete file
Get common file path
Set registry value

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x3d0]
sub rsp, 0x4d0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x3b0], rax
cmp qword [r8 + 0x18], 8
mov r14, r9
mov rsi, r8
mov r15, rdx
mov rdi, rcx
jb 0x180016e50
mov rcx, qword [r8]
jmp 0x180016e53
mov rcx, r8
xor eax, eax
xor r8d, r8d
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
movzx edx, word [rcx]
lea eax, [rdx - 0x30]
cmp ax, 9
ja 0x180016e71
movzx eax, dl
jmp 0x180016e8d
lea eax, [rdx - 0x61]
cmp ax, 5
jbe 0x180016e88
sub dx, 0x41
cmp dx, 5
ja 0x18001719b
movzx eax, byte [rcx]
sub al, 7
movzx r9d, word [rcx + 2]
shl al, 4
lea rdx, [rbp - 0x80]
add rdx, r8
mov byte [rdx], al
lea eax, [r9 - 0x30]
cmp ax, 9
ja 0x180016eb0
movzx eax, r9b
sub al, 0x30
jmp 0x180016ed8
lea eax, [r9 - 0x61]
cmp ax, 5
ja 0x180016ec2
movzx eax, byte [rcx + 2]
sub al, 0x57
jmp 0x180016ed8
sub r9w, 0x41
cmp r9w, 5
ja 0x18001719b
movzx eax, byte [rcx + 2]
sub al, 0x37
or byte [rdx], al
inc r8
add rcx, 4
cmp r8, 0x10
jb 0x180016e60
cmp qword [rdi + 0x18], 8
mov qword [rsp + 0x4c8], rbx
jb 0x180016eff
mov rbx, qword [rdi]
jmp 0x180016f02
mov rbx, rdi
mov r8, qword [0x180027ed0]
lea rdx, str.tkupdate_s
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rbp - 0x70]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x1a0]
xor r8d, r8d
mov edx, 0x801c
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
test eax, eax
jne 0x180017193
lea rcx, [rbp - 0x70]
mov rdx, rbx
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x180017193
lea rcx, [rsp + 0x60]
mov r8, rdi
mov rdx, r14
call fcn.1800025e0
cmp qword [rsp + 0x78], 8
lea rcx, [rsp + 0x60]
cmovae rcx, qword [rsp + 0x60]
lea rdx, [rbp - 0x70]
call fcn.180017af0
test eax, eax
je 0x180017181
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x70]
call fcn.180017680
test al, al
jne 0x180016fc0
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, str.download_file:_bad_md5
mov ecx, 0x133
jmp 0x18001717c
mov r8, qword [0x180027ed0]
lea rdx, [0x180020c08]
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rsp + 0x58]
lea rdx, [rbp + 0x1a0]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
xor r8d, r8d
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x28], 0x2001f
mov qword [rbp - 0x80], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x180017170
cmp qword [r15 + 0x18], 8
mov r14, qword [rbp - 0x80]
jb 0x18001703f
mov r15, qword [r15]
or rbx, 0xffffffffffffffff
test r15, r15
je 0x180017086
mov rax, rbx
nop dword [rax + rax]
cmp word [r15 + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x180017050
lea eax, [rax*2 + 2]
lea rdx, [0x180020c78]
mov r9d, 1
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov rcx, r14
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp qword [rsi + 0x18], 8
jb 0x180017090
mov rsi, qword [rsi]
test rsi, rsi
je 0x1800170d5
mov rax, rbx
nop dword [rax + rax]
cmp word [rsi + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x1800170a0
lea eax, [rax*2 + 2]
lea rdx, [0x180020c88]
mov r9d, 1
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov rcx, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp qword [rdi + 0x18], 8
jb 0x1800170df
mov rdi, qword [rdi]
test rdi, rdi
je 0x180017119
cmp word [rdi + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x1800170e4
lea eax, [rbx*2 + 2]
lea rdx, [0x180020c90]
mov r9d, 1
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov rcx, r14
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor ecx, ecx
call fcn.1800040f8
lea rdx, [0x180020ca0]
mov r9d, 4
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov rcx, r14
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea rdx, str.download_file:_finished
mov ecx, 0x144
call fcn.180017f30
test r14, r14
je 0x180017181
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x180017181
lea rdx, str.download_file:_failed_to_create_registry
mov ecx, 0x13c
call fcn.180017f30
cmp qword [rsp + 0x78], 8
jb 0x180017193
mov rcx, qword [rsp + 0x60]
call fcn.180002980
mov rbx, qword [rsp + 0x4c8]
mov rcx, qword [rbp + 0x3b0]
xor rcx, rsp
call fcn.180002960
add rsp, 0x4d0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret