Function at 0x140004ca4
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov rax, qword [0x140016018]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0xf8]
xor edi, edi
mov r15, qword [rbp + 0xf0]
mov r13, r8
mov qword [rsp + 0x58], rax
mov rbx, rdx
mov eax, dword [rbp + 0x100]
mov rsi, rcx
mov r14d, 0x104
mov dword [rsp + 0x40], eax
mov r8d, r14d
mov qword [rsp + 0x60], r9
xor edx, edx
mov qword [rsp + 0x50], rdi
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x44], edi
call sub.msvcrt.dll_memset
mov dword [rsp + 0x30], r14d
or r14, 0xffffffffffffffff
mov r12, r14
inc r12
cmp byte [r15 + r12], dil
jne 0x140004d35
cmp dword [rsi], 0
mov edi, 1
je 0x140004ef2
lea rcx, [rsi + 8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop dword [rax + rax]
cmp dword [rsi + 0x30], 7
jge 0x140004d6c
mov ebx, 0x8007139f
jmp 0x140004ec2
test rbx, rbx
je 0x140004ebd
test r13, r13
je 0x140004ebd
mov rdx, qword [rsi + 0x40]
sub rdx, rbx
movzx eax, word [rbx]
movzx ecx, word [rbx + rdx]
sub eax, ecx
jne 0x140004d98
add rbx, 2
test ecx, ecx
jne 0x140004d85
test eax, eax
je 0x140004da6
mov ebx, 0x80070005
jmp 0x140004ec2
lea rcx, [rsp + 0x50]
call fcn.14000ab1c
mov ebx, eax
test eax, eax
jne 0x140004ec2
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x48]
mov r9d, 0x2001f
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionModuleUsage
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x140004e0e
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x48]
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionModuleUsage
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
nop dword [rax + rax]
test eax, eax
jne 0x14000501a
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x38]
mov r9d, 0x2001f
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdx, r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
nop dword [rax + rax]
test eax, eax
je 0x140004e5a
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x38]
mov rdx, r13
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
nop dword [rax + rax]
test eax, eax
jne 0x14000501a
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x44]
lea rax, [rsp + 0x70]
xor r8d, r8d
lea rdx, str..Owner
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
nop dword [rax + rax]
test eax, eax
jne 0x140004f40
mov rdx, r15
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
nop dword [rax + rax]
test eax, eax
je 0x140004f8b
test byte [rsp + 0x40], dil
je 0x140004f8b
mov ebx, 0x80070057
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140004ed8
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140004eee
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
test edi, edi
je 0x140004efe
mov rdx, qword [rsp + 0x60]
call fcn.140002578
mov ebx, eax
cmp dword [rsi], 0
je 0x140004f13
lea rcx, [rsi + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.14000f1e0
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x190
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, dword [rsp + 0x40]
lea rax, str.Unknown_Owner
and edx, edi
mov ecx, 0xe
mov r9d, edi
cmovne ecx, r12d
test edx, edx
mov dword [rsp + 0x28], ecx
lea rdx, str..Owner
mov rcx, qword [rsp + 0x38]
cmovne rax, r15
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
nop dword [rax + rax]
test eax, eax
jne 0x14000501a
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x44]
lea rax, [rsp + 0x70]
mov dword [rsp + 0x30], 0x104
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
nop dword [rax + rax]
test eax, eax
jne 0x140004fce
xor edi, edi
jmp 0x140004ec2
mov rcx, qword [rsp + 0x58]
lea rax, [0x140012ce0]
test rcx, rcx
cmovne rax, rcx
inc r14
cmp byte [rax + r14], 0
jne 0x140004fe1
mov rcx, qword [rsp + 0x38]
add r14d, edi
mov dword [rsp + 0x28], r14d
mov r9d, edi
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, r15
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
nop dword [rax + rax]
test eax, eax
je 0x140004ec2
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140004ec2