Function at 0x140039990
Capabilities:
Delete registry value
Query or enumerate registry key

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov rax, qword [0x1400922d0]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov rbx, qword [0x140092f78]
mov rcx, qword [rbx + 0x88]
xor r15d, r15d
test rcx, rcx
jne 0x1400399d8
mov eax, r15d
jmp 0x1400399ed
call qword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov edx, eax
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.OLEAUT32.dll_DllRegisterServer]
mov qword [rbp + 0x17], rax
cmp qword [rbx + 0x88], r15
je 0x140039a03
test rax, rax
je 0x140039c41
mov qword [rbp + 0x27], r15
mov dword [rbp + 0x23], r15d
lea rdx, str.Packages
or rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], r15w
jne 0x140039a16
mov r8d, eax
lea rcx, [rbp + 0x17]
call fcn.140004b50
test eax, eax
js 0x140039c31
mov r9d, 9
mov r8, qword [rbp + 0x17]
mov rdx, 0xffffffff80000001
lea rcx, [rbp + 0x27]
call fcn.140004698
mov rbx, qword [rbp + 0x27]
test eax, eax
js 0x140039bdf
test rbx, rbx
je 0x140039bdf
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
lea rax, [rbp + 0x23]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
js 0x140039bdf
mov r14d, r15d
cmp dword [rbp + 0x23], r15d
jbe 0x140039bdf
mov rsi, r15
mov qword [rbp + 0x2f], r15
mov rdi, r15
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
lea rax, [rbp + 0x27]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x140039b73
mov edx, dword [rbp + 0x1f]
xor ecx, ecx
call qword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov rdi, rax
xor ecx, ecx
test rax, rax
je 0x140039c21
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
inc dword [rbp + 0x1f]
mov dword [rbp + 0x27], r15d
mov qword [rsp + 0x38], r15
lea rax, [rbp + 0x27]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x1f]
mov r8, rdi
mov edx, r14d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140039b73
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rsi, rax
xor ecx, ecx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
test rsi, rsi
je 0x140039bc9
mov r9d, 2
mov r8, rsi
mov rdx, rbx
lea rcx, [rbp + 0x2f]
call fcn.140004698
mov rdi, qword [rbp + 0x2f]
test eax, eax
js 0x140039bbb
test rdi, rdi
je 0x140039bc9
lea rdx, str.SkipLoading
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test rdi, rdi
je 0x140039bc9
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
inc r14d
cmp r14d, dword [rbp + 0x23]
jb 0x140039ac3
test rbx, rbx
je 0x140039bee
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.140001020
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
xor ecx, ecx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x140039bc9
lfence
mov ecx, eax
call fcn.1400327c0
nop
jmp 0x140039c40
nop
mov ecx, 0x8007000e
call fcn.1400327c0
int3