Function at 0x1403a5ec0
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x140
mov rax, qword [0x1404e41f8]
xor rax, rsp
mov qword [rsp + 0x130], rax
xor ebx, ebx
mov rsi, r8
mov edi, edx
lea ebp, [rbx + 0x63]
lea rcx, [rsp + 0x51]
xor edx, edx
mov r8, rbp
mov qword [rsp + 0x38], rbx
call sub.MSVCR90.dll_memset
lea rcx, [rsp + 0xc1]
mov r8, rbp
xor edx, edx
mov byte [rsp + 0xc0], bl
call sub.MSVCR90.dll_memset
lea rax, [rsp + 0x38]
lea ebp, [rbx + 1]
mov r14, 0xffffffff80000002
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersion
mov r9d, ebp
xor r8d, r8d
mov rcx, r14
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x30], ebx
mov byte [rsp + 0x50], bl
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x1403a6026
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
lea rdx, str.ProductId
xor r8d, r8d
mov dword [rsp + 0x30], 0x64
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x1403a5fa8
lea rcx, [rsp + 0x50]
mov rdx, rsi
call fcn.1403a5e74
jmp 0x1403a6122
cmp edi, 0xb
jle 0x1403a601b
call fcn.1403a3c88
cmp eax, ebx
je 0x1403a601b
lea rax, [rsp + 0x38]
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersion
mov r9d, SerializeElements<class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > >
xor r8d, r8d
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x1403a601b
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
lea rdx, str.ProductId
xor r8d, r8d
mov dword [rsp + 0x30], 0x64
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
je 0x1403a5f96
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x38]
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersion
mov r9d, ebp
xor r8d, r8d
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov rcx, qword [rsp + 0x38]
cmp rcx, rbx
jne 0x1403a6057
xor eax, eax
jmp 0x1403a612f
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x40]
lea rdx, str.ProductId
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov byte [rsp + 0x50], bl
mov dword [rsp + 0x30], 0x64
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x1403a609d
lea rcx, [rsp + 0x50]
mov rdx, rsi
call fcn.1403a5e74
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
lea rdx, str.ProductKey
xor r8d, r8d
mov byte [rsp + 0xc0], bl
mov dword [rsp + 0x30], 0x64
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x1403a6122
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0xc0]
repne scasb al, byte [rdi]
not rcx
sub rcx, rbp
movsxd rdx, ecx
mov dword [rsp + 0x30], ecx
cmp rdx, rbx
jl 0x1403a6122
lea rcx, [rsp + 0xc0]
sub rcx, rbp
mov al, byte [rcx + rdx]
or byte [rbx + rsi], al
add rbx, rbp
cmp rbx, 0x13
jg 0x1403a6122
sub rdx, rbp
jns 0x1403a610e
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebp
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1403addc0
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret