Function at 0x180015840
Capabilities:
Delete file
Delete registry key
Get common file path
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x670]
sub rsp, 0x770
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x7b0], rbx
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x660], rax
mov rbx, rdx
mov r14, rcx
mov qword [rbp - 0x70], 7
xor r15d, r15d
mov qword [rbp - 0x78], r15
mov word [rsp + 0x78], r15w
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], r15
mov word [rsp + 0x58], r15w
mov esi, r15d
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x48], r15
mov r8, qword [0x180027ed0]
lea rdx, [0x180020f58]
lea rcx, [rbp + 0x450]
call qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rbp - 0x68], r15
lea rax, [rbp - 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp + 0x450]
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
or rdi, 0xffffffffffffffff
test eax, eax
jne 0x180015c89
mov rsi, qword [rbp - 0x68]
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x34], r15d
mov dword [rsp + 0x30], 0x208
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x68]
xor r8d, r8d
lea rdx, str.version
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x180015c89
mov eax, dword [rbp - 0x68]
dec eax
cmp eax, 1
ja 0x180015c89
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x180015986
test al, 1
jne 0x180015c89
shr rax, 1
cmp word [rbp + rax*2 + 0x2e], r15w
je 0x18001598b
jmp 0x180015c89
mov word [rbp + 0x30], r15w
mov dword [rsp + 0x30], 0x7e
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x68]
xor r8d, r8d
lea rdx, [0x180020fa8]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x180015c89
mov eax, dword [rbp - 0x68]
dec eax
cmp eax, 1
ja 0x180015c89
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x1800159f3
test al, 1
jne 0x180015c89
shr rax, 1
cmp word [rbp + rax*2 - 0x52], 0
je 0x1800159f8
jmp 0x180015c89
mov word [rbp - 0x50], r15w
lea rcx, [rbp - 0x50]
mov rax, rdi
nop
inc rax
cmp word [rcx + rax*2], 0
jne 0x180015a00
cmp rax, 0x20
jne 0x180015c89
mov dword [rsp + 0x30], 0x208
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x240]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x68]
xor r8d, r8d
lea rdx, str.setup
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x180015c89
mov eax, dword [rbp - 0x68]
dec eax
cmp eax, 1
ja 0x180015c89
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x180015a82
test al, 1
jne 0x180015c89
shr rax, 1
cmp word [rbp + rax*2 + 0x23e], 0
je 0x180015a8a
jmp 0x180015c89
mov word [rbp + 0x240], r15w
mov dword [rbp - 0x68], 4
lea rax, [rbp - 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.time
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x180015c89
cmp dword [rsp + 0x30], 4
jne 0x180015c89
xor ecx, ecx
call fcn.1800040f8
mov ecx, dword [rsp + 0x34]
sub rax, rcx
cmp rax, 0x31380
jge 0x180015c89
lea rax, [rbp + 0x240]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x50]
lea r8, [rbp + 0x30]
lea rdx, str.check_exist:_open_registry_ok__version___S__md5___S__setup___S
mov ecx, 0x243
call fcn.180017f30
lea rdx, [rbp + 0x240]
mov rcx, rbx
call fcn.180017a40
test eax, eax
je 0x180015c89
xor eax, eax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
lea rcx, [rbp - 0x50]
mov r8, r15
nop word [rax + rax]
movzx edx, word [rcx]
lea eax, [rdx - 0x30]
cmp ax, 9
ja 0x180015b51
movzx eax, dl
jmp 0x180015b6d
lea eax, [rdx - 0x61]
cmp ax, 5
jbe 0x180015b68
sub dx, 0x41
cmp dx, 5
ja 0x180015c6c
movzx eax, byte [rcx]
sub al, 7
lea rdx, [rbp - 0x68]
add rdx, r8
shl al, 4
mov byte [rdx], al
movzx r9d, word [rcx + 2]
lea eax, [r9 - 0x30]
cmp ax, 9
ja 0x180015b90
movzx eax, r9b
sub al, 0x30
jmp 0x180015bb8
lea eax, [r9 - 0x61]
cmp ax, 5
ja 0x180015ba2
movzx eax, byte [rcx + 2]
sub al, 0x57
jmp 0x180015bb8
sub r9w, 0x41
cmp r9w, 5
ja 0x180015c6c
movzx eax, byte [rcx + 2]
sub al, 0x37
or byte [rdx], al
add rcx, 4
inc r8
cmp r8, 0x10
jb 0x180015b40
lea rdx, [rbp - 0x68]
mov rcx, rbx
call fcn.180017680
test al, al
je 0x180015c6c
cmp word [rbp + 0x30], 0
jne 0x180015beb
mov r8, r15
jmp 0x180015bfd
lea rax, [rbp + 0x30]
mov r8, rdi
inc r8
cmp word [rax + r8*2], 0
jne 0x180015bf2
lea rdx, [rbp + 0x30]
mov rcx, r14
call fcn.180001710
cmp word [rbp + 0x240], 0
jne 0x180015c18
mov r8, r15
jmp 0x180015c2d
lea rax, [rbp + 0x240]
mov r8, rdi
inc r8
cmp word [rax + r8*2], 0
jne 0x180015c22
lea rdx, [rbp + 0x240]
lea rcx, [rsp + 0x78]
call fcn.180001710
cmp word [rbp - 0x50], 0
jne 0x180015c4a
mov r8, r15
jmp 0x180015c5c
lea rax, [rbp - 0x50]
mov r8, rdi
inc r8
cmp word [rax + r8*2], 0
jne 0x180015c51
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x58]
call fcn.180001710
jmp 0x180015c89
mov r8, rbx
lea rdx, str.check_exist:_check_md5_failed___S
mov ecx, 0x24f
call fcn.180017f30
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [r14 + 0x10], 0
jne 0x180015ccb
test rsi, rsi
je 0x180015cb5
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, r15
lea rdx, [rbp + 0x450]
mov rcx, 0xffffffff80000001
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
lea rdx, str.check_exist:_clear_all
mov ecx, 0x25c
call fcn.180017f30
jmp 0x180015d93
mov rdx, r14
lea rcx, [0x1800268e0]
call fcn.1800171c0
test al, al
je 0x180015d93
lea rbx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rbx, qword [rsp + 0x78]
mov r8, qword [0x180027ed0]
lea rdx, str.tkupdate_s
lea rcx, [rbp + 0x240]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rbp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x240]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x801c
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
test eax, eax
jne 0x180015d93
mov rdx, rbx
lea rcx, [rbp + 0x30]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x180015d93
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae rcx, qword [rsp + 0x58]
lea rdx, [rbp - 0x68]
call fcn.1800178d0
test al, al
je 0x180015d93
lea rdx, [rbp - 0x68]
lea rcx, [rbp + 0x30]
call fcn.180017680
test al, al
je 0x180015d93
lea r8, [rbp + 0x30]
lea rdx, str.check_exist:_ok___S
mov ecx, 0x269
call fcn.180017f30
mov edi, 1
test rsi, rsi
je 0x180015da2
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
cmp qword [rsp + 0x70], 8
jb 0x180015db4
mov rcx, qword [rsp + 0x58]
call fcn.180002980
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], r15
mov word [rsp + 0x58], r15w
cmp qword [rbp - 0x70], 8
jb 0x180015dd9
mov rcx, qword [rsp + 0x78]
call fcn.180002980
mov eax, edi
mov rcx, qword [rbp + 0x660]
xor rcx, rsp
call fcn.180002960
mov rbx, qword [rsp + 0x7b0]
add rsp, 0x770
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret