Function at 0x140050ef0
Capabilities:
Query or enumerate registry value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov esi, edx
mov rbx, rcx
mov dword [rsp + 0x3c], 0
mov dword [rsp + 0x38], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea rdx, [0x140261322]
xor ebp, ebp
mov rcx, 0xffffffff80000002
xor r8d, r8d
mov r9d, 1
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov r14d, eax
test eax, eax
jne 0x140050f8c
mov dword [rsp + 0x34], esi
mov rcx, qword [rsp + 0x40]
lea rdi, [rsp + 0x38]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], 0
lea rdx, str.SMBiosData
lea r9, [rsp + 0x3c]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r14d, eax
test eax, eax
je 0x140050fa8
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebp, dword [rsp + 0x34]
mov ecx, r14d
call qword [sym.imp.KERNEL32.DLL_SetLastError]
mov eax, ebp
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp dword [rsp + 0x38], 0
mov r14d, 0x3f2
je 0x140050f7d
cmp dword [rsp + 0x3c], 3
jne 0x140050f7d
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r14, rax
mov r8d, dword [rsp + 0x38]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapAlloc]
test rax, rax
je 0x140051037
mov r15, rax
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
lea rdx, str.SMBiosData
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
mov dword [rsp + 0x54], edi
mov qword [rsp + 0x70], r14
je 0x140051042
mov rcx, qword [rsp + 0x70]
xor edx, edx
mov r8, r15
call qword [sym.imp.KERNEL32.DLL_HeapFree]
mov ebp, dword [rsp + 0x34]
mov r14d, dword [rsp + 0x54]
jmp 0x140050f8c
mov r14d, 8
jmp 0x140050f7d
movzx ecx, word [r15 + 6]
cmp byte [r15 + rcx + 8], 0x7f
je 0x140051019
movzx esi, word [r15 + 4]
cmp cx, si
jae 0x140051019
add esi, 8
lea rax, [r15 + rcx]
add rax, 8
mov qword [rsp + 0x68], rax
add rcx, 8
xor edi, edi
nop
mov eax, ecx
movzx r12d, byte [rax + r15 + 1]
add r12d, ecx
lea eax, [rcx + 5]
mov qword [rsp + 0x48], rax
lea eax, [rcx + 4]
mov qword [rsp + 0x60], rax
add ecx, 6
mov qword [rsp + 0x58], rcx
mov r13d, 1
nop dword [rax]
mov rax, qword [rsp + 0x68]
movzx eax, byte [rax]
cmp al, 1
jne 0x140051120
test edi, edi
jne 0x140051120
mov rax, qword [rsp + 0x60]
movzx eax, byte [r15 + rax]
cmp r13d, eax
je 0x1400510f0
mov rax, qword [rsp + 0x48]
movzx eax, byte [r15 + rax]
cmp r13d, eax
je 0x1400510f0
mov rax, qword [rsp + 0x58]
movzx eax, byte [r15 + rax]
xor edi, edi
cmp r13d, eax
jne 0x1400511c0
nop word cs:[rax + rax]
mov ebp, r12d
add rbp, r15
mov rcx, rbp
lea rdx, str.System_manufacturer
call qword [sym.imp.KERNEL32.DLL_lstrcmpiA]
xor edi, edi
test eax, eax
jne case.0x140051225.5
mov edi, 1
jmp 0x1400511c0
cmp al, 2
jne 0x1400511f0
cmp edi, 1
jne 0x1400511f0
mov rax, qword [rsp + 0x60]
movzx eax, byte [r15 + rax]
cmp r13d, eax
je 0x140051170
mov rax, qword [rsp + 0x48]
movzx eax, byte [r15 + rax]
cmp r13d, eax
je 0x140051170
mov rax, qword [rsp + 0x58]
movzx eax, byte [r15 + rax]
mov edi, 1
cmp r13d, eax
jne 0x1400511c0
nop word cs:[rax + rax]
mov ebp, r12d
add rbp, r15
mov edi, 1
mov rcx, rbp
call sub.msvcrt.dll_strlen
mov r14, rax
add eax, 2
mov ecx, dword [rsp + 0x34]
cmp ecx, eax
jbe 0x1400511b0
mov rcx, rbx
lea rdx, [0x140261421]
mov r8, rbp
call qword [sym.imp.USER32.dll_wsprintfA]
cdqe
add rbx, rax
mov eax, dword [rsp + 0x34]
jmp 0x1400511b2
mov eax, ecx
not r14d
add eax, r14d
mov dword [rsp + 0x34], eax
nop dword [rax]
mov eax, r12d
inc r12d
cmp byte [r15 + rax], 0
jne 0x1400511c0
mov eax, r12d
cmp byte [r15 + rax], 0
je 0x1400512a0
inc r13d
cmp r12d, esi
jb 0x1400510a0
jmp 0x1400512a0
cmp al, 3
jne 0x1400511c0
cmp r13d, 1
jne 0x1400511c0
mov rax, qword [rsp + 0x48]
movzx eax, byte [r15 + rax]
add eax, 0xfffffffe
cmp eax, 0xc
ja case.default.0x140051225
lea rcx, [0x1400512c8]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
lea rbp, str._Other_
jmp rax
lea rbp, str._Unknown_
jmp case.0x140051225.5
lea rbp, str._Desktop_
jmp case.0x140051225.5
lea rbp, str._Low_Profile_Desktop_
jmp case.0x140051225.5
lea rbp, str._Mini_Tower_
jmp case.0x140051225.5
lea rbp, str._Tower_
jmp case.0x140051225.5
lea rbp, str._Portable_
jmp case.0x140051225.5
lea rbp, str._Laptop_
jmp case.0x140051225.5
lea rbp, str._Notebook_
jmp case.0x140051225.5
lea rbp, str._Sub_Notebook_
jmp case.0x140051225.5
lea rbp, str._Other_
jmp case.0x140051225.5
inc r12d
cmp byte [r15 + r12], 0x7f
je 0x140051019
lea rax, [r15 + r12]
mov qword [rsp + 0x68], rax
mov ecx, r12d
cmp r12d, esi
jb 0x140051070
jmp 0x140051019