Function at 0x1400047cc
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 [0x140015018]
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 0x14000485d
cmp dword [rsi], 0
mov edi, 1
je 0x1400049e4
lea rcx, [rsi + 8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [rsi + 0x30], 7
jge 0x14000488e
mov ebx, 0x8007139f
jmp 0x1400049c0
test rbx, rbx
je 0x1400049bb
test r13, r13
je 0x1400049bb
mov rdx, qword [rsi + 0x40]
sub rdx, rbx
movzx eax, word [rbx]
movzx ecx, word [rbx + rdx]
sub eax, ecx
jne 0x1400048ba
add rbx, 2
test ecx, ecx
jne 0x1400048a7
test eax, eax
je 0x1400048c8
mov ebx, 0x80070005
jmp 0x1400049c0
lea rcx, [rsp + 0x50]
call fcn.140009d14
mov ebx, eax
test eax, eax
jne 0x1400049c0
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]
test eax, eax
je 0x140004924
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x48]
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionModuleUsage
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x140004af3
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]
test eax, eax
je 0x140004964
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x38]
mov rdx, r13
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x140004af3
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]
test eax, eax
jne 0x140004a2b
mov rdx, r15
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x140004a70
test byte [rsp + 0x40], dil
je 0x140004a70
mov ebx, 0x80070057
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400049d0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400049e0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x1400049f0
mov rdx, qword [rsp + 0x60]
call fcn.1400023fc
mov ebx, eax
cmp dword [rsi], 0
je 0x1400049ff
lea rcx, [rsi + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.14000e250
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]
test eax, eax
jne 0x140004af3
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]
test eax, eax
jne 0x140004aad
xor edi, edi
jmp 0x1400049c0
mov rcx, qword [rsp + 0x58]
lea rax, [0x140011cf0]
test rcx, rcx
cmovne rax, rcx
inc r14
cmp byte [rax + r14], 0
jne 0x140004ac0
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]
test eax, eax
je 0x1400049c0
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1400049c0