Function at 0x140004670
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0xd0
mov qword [rbp - 9], 0xfffffffffffffffe
mov qword [rsp + 0x108], rbx
mov rax, qword [0x140040008]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov qword [rbp - 0x11], r8
mov rbx, rdx
mov qword [rbp - 0x21], rdx
mov qword [rbp - 0x19], rcx
xor eax, eax
mov qword [rbp + 0x2f], rax
lea rcx, [rbp + 0x2f]
call qword [sym.imp.ac1st22.dll_public:_void___cdecl_AcString::constructor_void____ptr64]
nop
xor ecx, ecx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x50], rcx
lea rax, [rbp + 3]
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x1b]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x23]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
lea rax, [rbp - 1]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x27]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140026490
mov ebx, eax
test eax, eax
je 0x140004725
mov edx, eax
lea rcx, str.ERROR:_RegQueryInfoKey_fails__result_d_._n
call fcn.1400100c0
jmp 0x1400049f3
mov ecx, dword [rbp - 1]
inc ecx
mov eax, dword [rbp + 0x1b]
inc eax
mov dword [rbp + 0x1b], eax
cmp eax, ecx
cmova ecx, eax
mov dword [rbp - 1], ecx
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call qword [sym.imp.mfc140u.dll_operator]
mov rbx, rax
mov qword [rbp - 0x29], rax
test rax, rax
jne 0x140004779
lea ebx, [rax + 8]
mov edx, dword [rbp - 1]
lea rcx, str.ERROR:_Out_of_memory__maxkeyname_d_._n
call fcn.1400100c0
jmp 0x1400049f3
mov ecx, dword [rbp + 3]
test ecx, ecx
je 0x1400047a7
call qword [sym.imp.mfc140u.dll_operator]
mov rsi, rax
test rax, rax
jne 0x1400047a0
lea ebx, [rax + 8]
mov edx, dword [rbp + 3]
lea rcx, str.ERROR:_Out_of_memory__maxdata_d_._n
jmp 0x1400049c6
mov ecx, dword [rbp + 3]
xor edx, edx
jmp 0x1400047ab
xor edx, edx
mov esi, edx
mov edi, edx
cmp dword [rbp + 0x23], 0
jbe 0x140004895
nop word [rax + rax]
mov eax, dword [rbp - 1]
mov dword [rbp + 0x17], eax
mov dword [rbp + 7], ecx
lea rax, [rbp + 7]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
lea r9, [rbp + 0x17]
mov r8, rbx
mov edx, edi
mov rcx, qword [rbp - 0x21]
call sub.ADVAPI32.dll_RegEnumValueW
mov ebx, eax
test eax, eax
jne 0x140004887
mov rbx, rsi
mov eax, dword [rbp + 0x1f]
dec eax
cmp eax, 1
ja 0x14000483e
lea r8, [rbp + 0x2f]
mov rdx, qword [rbp - 0x11]
mov rcx, rsi
call fcn.140004550
test al, al
je 0x14000483e
lea rcx, [rbp + 0x2f]
call qword [sym.imp.ac1st22.dll_public:_wchar_t_const____ptr64___cdecl_AcString::kwszPtr_void_const___ptr64]
mov rbx, rax
lea rcx, [rbp + 0x2f]
call qword [sym.imp.ac1st22.dll_public:_unsigned_int___cdecl_AcString::length_void_const___ptr64]
add eax, eax
mov dword [rbp + 7], eax
mov ecx, dword [rbp + 7]
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rbx
mov r9d, dword [rbp + 0x1f]
xor r8d, r8d
mov rdx, qword [rbp - 0x29]
mov rcx, qword [rbp - 0x19]
call sub.ADVAPI32.dll_RegSetValueExW
mov ebx, eax
test eax, eax
jne 0x140004879
inc edi
mov rbx, qword [rbp - 0x29]
xor edx, edx
cmp edi, dword [rbp + 0x23]
jae 0x140004895
mov ecx, dword [rbp + 3]
jmp 0x1400047c0
mov edx, eax
lea rcx, str.ERROR:_RegSetValueEx_fails__result_d_._n
jmp 0x1400049c6
mov edx, eax
lea rcx, str.ERROR:_RegEnumValue_fails__result_d_._n
jmp 0x1400049c6
test rsi, rsi
je 0x1400048a7
mov rcx, rsi
call qword [sym.imp.mfc140u.dll_operator_1]
xor edx, edx
mov esi, edx
mov edi, edx
cmp dword [rbp + 0x27], 0
jbe 0x1400049e5
jmp 0x1400048c6
mov rbx, qword [rbp - 0x29]
xor edx, edx
mov eax, dword [rbp - 1]
mov dword [rbp + 0x17], eax
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], rdx
lea r9, [rbp + 0x17]
mov r8, rbx
mov edx, edi
mov rcx, qword [rbp - 0x21]
call sub.ADVAPI32.dll_RegEnumKeyExW
lea rax, [rbp + 7]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rbx
mov rcx, qword [rbp - 0x21]
call fcn.140026410
mov ebx, eax
cmp qword [rbp - 0x21], 0xffffffff80000002
jne 0x140004944
test eax, eax
je 0x140004948
lea rax, [rbp + 7]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, qword [rbp - 0x29]
mov rcx, 0xffffffff80000001
call fcn.140026410
mov ebx, eax
test ebx, ebx
jne 0x1400049bd
xor ecx, ecx
mov qword [rsp + 0x40], rcx
lea rax, [rbp + 0xf]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], ecx
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rbp - 0x29]
mov rcx, qword [rbp - 0x19]
call fcn.1400262e0
mov ebx, eax
test eax, eax
jne 0x1400049b2
mov r8, qword [rbp - 0x11]
mov rdx, qword [rbp + 7]
mov rcx, qword [rbp + 0xf]
call fcn.140004670
mov rcx, qword [rbp + 7]
call sub.ADVAPI32.dll_RegCloseKey
mov rcx, qword [rbp + 0xf]
call sub.ADVAPI32.dll_RegCloseKey
inc edi
cmp edi, dword [rbp + 0x27]
jb 0x1400048c0
jmp 0x1400049e5
mov edx, eax
lea rcx, str.ERROR:_RegCreateKeyEx_fails__result_d_._n
jmp 0x1400049c6
mov edx, ebx
lea rcx, str.ERROR:_RegOpenKeyEx_fails__result_d_._n
call fcn.1400100c0
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.mfc140u.dll_operator_1]
test rsi, rsi
je 0x1400049f3
mov rcx, rsi
call qword [sym.imp.mfc140u.dll_operator_1]
jmp 0x1400049f3
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.mfc140u.dll_operator_1]
xor ecx, ecx
mov ebx, ecx
lea rcx, [rbp + 0x2f]
call qword [sym.imp.ac1st22.dll_public:_void___cdecl_AcString::destructor_void____ptr64]
mov eax, ebx
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.140024e80
mov rbx, qword [rsp + 0x108]
add rsp, 0xd0
pop rdi
pop rsi
pop rbp
ret