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

Disassembly:
jmp 0x140005be0
push rbx
push rsi
push r12
push r14
mov eax, 0x41b8
call fcn.14000a0e0
sub rsp, rax
mov rax, qword [0x140013018]
xor rax, rsp
mov qword [rsp + 0x4190], rax
mov rsi, rcx
lea rcx, str.__ReadSidPekData_n
xor r12d, r12d
mov r14, rdx
mov dword [rsp + 0x64], 0x3fff
mov dword [rsp + 0x6c], r12d
call fcn.14000107d
test r14, r14
je 0x14000608a
test rsi, rsi
je 0x14000608a
lea rax, [rsp + 0x80]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x7c]
xor edx, edx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x74]
mov rcx, rsi
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x41b0], rdi
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
mov edi, eax
je 0x140005cc5
lea rcx, str.ReadSidPekData_:_RegQueryInfoKey_failed_n
call fcn.14000107d
mov eax, edi
jmp 0x140005e16
mov eax, dword [rsp + 0x6c]
test eax, eax
je 0x140005d25
test eax, eax
mov edi, r12d
je 0x140005d25
nop
nop
nop
lea rax, [rsp + 0x80]
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x90]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov edx, edi
mov rcx, rsi
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x70], 0xff
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
add edi, 1
cmp edi, dword [rsp + 0x6c]
jb 0x140005ce0
mov eax, dword [rsp + 0x60]
mov qword [rsp + 0x41f0], rbp
mov qword [rsp + 0x41a8], r13
test eax, eax
mov qword [rsp + 0x41a0], r15
je 0x140006066
xor bl, bl
test eax, eax
mov edi, r12d
je 0x140006042
nop
nop
nop
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
lea r9, [rsp + 0x64]
lea r8, [rsp + 0x190]
mov edx, edi
mov rcx, rsi
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x64], 0x3fff
mov byte [rsp + 0x190], r12b
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x140005dc0
lea r8d, [rax + 2]
lea rdx, [0x14000fd48]
lea rcx, [rsp + 0x190]
call qword [sym.imp.MSVCR80.dll__mbsnbicmp]
test eax, eax
jne 0x140005dc0
add bl, 1
add edi, 1
cmp edi, dword [rsp + 0x60]
jb 0x140005d60
test bl, bl
je 0x140006042
movzx eax, bl
xor r15b, r15b
lea rcx, [rax + rax*2]
shl rcx, 3
call qword [sym.imp.MSVCR80.dll_malloc]
test rax, rax
mov qword [r14], rax
jne 0x140005e3c
lea rcx, str.ReadSidPekData_:_Failed_to_allocate_memory_pstPekSidInfoObj__pSidPekData_n
call fcn.14000107d
mov eax, 1
mov r13, qword [rsp + 0x41a8]
mov rbp, qword [rsp + 0x41f0]
mov r15, qword [rsp + 0x41a0]
mov rdi, qword [rsp + 0x41b0]
mov rcx, qword [rsp + 0x4190]
xor rcx, rsp
call fcn.1400083c0
add rsp, 0x41b8
pop r14
pop r12
pop rsi
pop rbx
ret
mov byte [r14 + 8], bl
mov ebx, r12d
mov ebp, r12d
cmp dword [rsp + 0x60], ebx
jbe 0x140006077
lea rcx, [rsp + 0x190]
xor edx, edx
mov r8d, 0x3fff
mov dword [rsp + 0x64], 0x3fff
call sub.MSVCR80.dll_memset
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
lea r9, [rsp + 0x64]
lea r8, [rsp + 0x190]
mov edx, ebp
mov rcx, rsi
mov qword [rsp + 0x28], r12
mov byte [rsp + 0x190], 0
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
mov ebx, eax
jne 0x140005fda
lea r8d, [rax + 2]
lea rdx, [0x14000fd48]
lea rcx, [rsp + 0x190]
call qword [sym.imp.MSVCR80.dll__mbsnbicmp]
test eax, eax
jne 0x140005fda
lea rax, [rsp + 0x68]
lea rdx, [rsp + 0x190]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x20], r12
mov dword [rsp + 0x68], r12d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, 0xea
je 0x140005fda
mov ecx, dword [rsp + 0x68]
call qword [sym.imp.MSVCR80.dll_malloc]
test rax, rax
mov r12, rax
je 0x14000602c
lea rax, [rsp + 0x68]
lea rdx, [rsp + 0x190]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov edi, eax
jne 0x140006019
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x190]
repne scasb al, byte [rdi]
movzx eax, r15b
not rcx
lea r13, [rax + rax*2]
lea rdi, [rcx - 1]
call qword [sym.imp.MSVCR80.dll_malloc]
mov rcx, qword [r14]
mov qword [rcx + r13*8], rax
mov rax, qword [r14]
mov rcx, qword [rax + r13*8]
test rcx, rcx
je 0x140005ffa
lea r8, [rdi + 1]
xor edx, edx
call sub.MSVCR80.dll_memset
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x190]
lea r8, [rsp + 0x190]
repne scasb al, byte [rdi]
mov rax, qword [r14]
not rcx
lea r9, [rcx - 1]
lea rdx, [rcx - 1]
mov rcx, qword [rax + r13*8]
call qword [sym.imp.MSVCR80.dll_memcpy_s]
mov eax, dword [rsp + 0x68]
mov rdx, qword [r14]
mov dword [rdx + r13*8 + 0x10], eax
mov rax, qword [r14]
add r15b, 1
mov qword [rax + r13*8 + 8], r12
mov byte [r14 + 8], r15b
xor r12d, r12d
add ebp, 1
cmp ebp, dword [rsp + 0x60]
jb 0x140005e50
lea rcx, str._ReadSidPekData__n
call fcn.14000107d
mov eax, ebx
jmp 0x140005dfe
mov rcx, r12
call qword [sym.imp.MSVCR80.dll_free]
lea rcx, str.ReadSidPekData_:_Failed_to_allocate_memory_pstPekSidInfoObj__pSidPekData_ucSidIndex_.Sid_n
call fcn.14000107d
mov eax, 1
jmp 0x140005dfe
lea rcx, str.ReadSidPekData_:_Failed_to_query_reg_key_value_n
call fcn.14000107d
mov eax, edi
jmp 0x140005dfe
lea rcx, str.ReadSidPekData_:_Failed_to_allocate_memory___data_n
call fcn.14000107d
mov eax, 1
jmp 0x140005dfe
lea rcx, str.ReadSidPekData_:_No_SID_data_to_read_n
mov ebx, 1
call fcn.14000107d
lea rcx, str._ReadSidPekData__n
call fcn.14000107d
mov eax, ebx
jmp 0x140005dfe
lea rcx, str.ReadSidPekData_:_Enumeration_did_not_find_any_key_n
call fcn.14000107d
mov ebx, 1
lea rcx, str._ReadSidPekData__n
call fcn.14000107d
mov eax, ebx
jmp 0x140005dfe
lea rcx, str.ReadSidPekData_:_Invalid_input__n
call fcn.14000107d
mov eax, 1
jmp 0x140005e1e