Function at 0x140002b50
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 8], rcx
push rbp
push rsi
push rdi
sub rsp, 0x8b0
mov rdi, rcx
xor ecx, ecx
mov rsi, rdx
lea rax, [rsp + 0x70]
mov ebp, r8d
mov ebx, ecx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rcx
mov byte [rsp + 0x4b0], cl
lea r9, [r11 + 0x20]
lea r8, [r11 - 0x418]
mov rcx, rsi
xor edx, edx
mov dword [r11 + 0x20], 0x3ff
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x140002f0e
nop
nop
lea rax, [rsp + 0x60]
lea rdx, [rsp + 0x4b0]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140002ec2
mov rdx, qword [rsp + 0x60]
lea r8d, [rbp + 1]
mov rcx, rdi
call fcn.140002b50
test ebp, ebp
js 0x140002eb7
lea rax, [0x140029610]
lea rcx, [rsp + 0x88]
xor edx, edx
mov r8d, 0x428
mov word [rsp + 0x88], 0
mov word [rsp + 0x8a], 0
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x8c], 0
call sub.msvcrt.dll_memset
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x8e8]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x192]
lea rdx, str.SerialNumber
xor r8d, r8d
mov dword [rsp + 0x8e8], 0x80
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140002ca6
mov eax, dword [rsp + 0x8e8]
add eax, 0xffffffff
mov byte [rsp + rax + 0x192], 0
cmp byte [rsp + 0x192], 0
je 0x140002eb7
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x8e8]
lea r9, [rsp + 0x6c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x111]
lea rdx, str.ProductCode
xor r8d, r8d
mov dword [rsp + 0x8e8], 0x80
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140002d09
mov eax, dword [rsp + 0x8e8]
add eax, 0xffffffff
mov byte [rsp + rax + 0x111], 0
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x8e8]
lea r9, [rsp + 0x7c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x90]
lea rdx, [0x140029088]
xor r8d, r8d
mov dword [rsp + 0x8e8], 0x80
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140002d5e
mov eax, dword [rsp + 0x8e8]
add eax, 0xffffffff
mov byte [rsp + rax + 0x90], 0
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x8e8]
lea r9, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x294]
lea rdx, str.Location
xor r8d, r8d
mov dword [rsp + 0x8e8], 0x104
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140002db3
mov eax, dword [rsp + 0x8e8]
add eax, 0xffffffff
mov byte [rsp + rax + 0x294], 0
cmp byte [rsp + 0x90], 0
jne 0x140002e0d
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x4b0]
repne scasb al, byte [rdi]
mov eax, 0x7f
lea rdx, [rsp + 0x4b0]
not rcx
sub rcx, 1
cmp ecx, 0x80
cmovge ecx, eax
movsxd rdi, ecx
lea rcx, [rsp + 0x90]
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov byte [rsp + rdi + 0x90], 0
mov rdi, qword [rsp + 0x8d0]
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x49c]
xor r9d, r9d
mov qword [rsp + 0x58], rax
xor eax, eax
xor r8d, r8d
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x4ac], 8
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
or rcx, 0xffffffffffffffff
lea rdx, [rdi + 0xc78]
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
mov eax, 0x7f
not rcx
sub rcx, 1
cmp ecx, 0x80
cmovge ecx, eax
movsxd rdi, ecx
lea rcx, [rsp + 0x213]
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov byte [rsp + rdi + 0x213], 0
mov rdi, qword [rsp + 0x8d0]
lea rdx, [rsp + 0x80]
mov rcx, rdi
call fcn.140016c40
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x70]
add ebx, 1
lea r9, [rsp + 0x8e8]
mov qword [rsp + 0x38], rax
xor eax, eax
lea r8, [rsp + 0x4b0]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov edx, ebx
mov rcx, rsi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x8e8], 0x3ff
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x140002bc0
mov rbx, qword [rsp + 0x8d8]
add rsp, 0x8b0
pop rdi
pop rsi
pop rbp
ret