Function at 0x51af50
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x238
mov qword [rsp + 0x1d0], 0xfffffffffffffffe
mov rax, qword [0x006835c0]
xor rax, rsp
mov qword [rsp + 0x228], rax
cmp qword [rsp + 0x240], 0
jne 0x51afac
mov edx, 0x1c9
lea rcx, [0x00620658]
call fcn.00422700
test eax, eax
je 0x51afac
int3
cmp dword [rsp + 0x250], 0
je 0x51afd9
cmp qword [rsp + 0x248], 0
jne 0x51afd9
mov edx, 0x1ca
lea rcx, [0x00620690]
call fcn.00422700
test eax, eax
je 0x51afd9
int3
lea rcx, [rsp + 0x48]
call fcn.0044b5b0
nop
lea rcx, [rsp + 0x40]
call fcn.0044b5b0
nop
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0x260], 0xffffffff80000000
jne 0x51b02d
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.CLSID
mov rcx, 0xffffffff80000000
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.0049c100
nop
mov dword [rsp + 0x50], 1
mov rax, qword [rsp + 0x240]
cmp qword [rax], 0
je 0x51b3ca
mov rax, qword [rsp + 0x240]
mov rax, qword [rax]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x240]
add rax, 8
mov qword [rsp + 0x240], rax
cmp qword [rsp + 0x260], 0xffffffff80000000
jne 0x51b097
mov rax, qword [rsp + 0x60]
movsx eax, byte [rax]
test eax, eax
jne 0x51b097
jmp 0x51b045
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
cdqe
mov rcx, qword [rsp + 0x60]
lea rax, [rcx + rax + 1]
mov qword [rsp + 0x58], rax
mov r9d, dword [rsp + 0x250]
mov r8, qword [rsp + 0x248]
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x48]
call fcn.004f2f30
mov r9d, dword [rsp + 0x250]
mov r8, qword [rsp + 0x248]
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x40]
call fcn.004f2f30
cmp qword [rsp + 0x260], 0xffffffff80000000
jne 0x51b16a
lea rcx, [rsp + 0x48]
call fcn.0040abd0
movzx eax, al
test eax, eax
je 0x51b16a
lea rcx, [0x00688c28]
call fcn.00406080
mov qword [rsp + 0x1d8], rax
mov r8d, 0x1e5
lea rdx, [0x006206d0]
lea rcx, [rsp + 0x188]
call fcn.00406030
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x20], rcx
lea r9, str.Warning:_skipping_empty_key__s._n
xor r8d, r8d
mov rcx, qword [rsp + 0x1d8]
mov rdx, rcx
mov rcx, rax
call fcn.00406040
jmp 0x51b045
cmp dword [rsp + 0x258], 0
jne 0x51b2b9
mov dword [rsp + 0x180], 0x100
lea rcx, [rsp + 0x48]
call fcn.004c1cf0
lea r9, [rsp + 0x180]
lea r8, [rsp + 0x80]
mov rdx, rax
mov rcx, qword [rsp + 0x260]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x51b2b9
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x40]
call fcn.004ab190
movzx eax, al
test eax, eax
je 0x51b2b4
lea rcx, [rsp + 0x48]
call fcn.004c1cf0
mov qword [rsp + 0x1e0], rax
lea rcx, [0x00688c28]
call fcn.00406080
mov qword [rsp + 0x1e8], rax
mov r8d, 0x1f3
lea rdx, [0x00620730]
lea rcx, [rsp + 0x198]
call fcn.00406030
mov rcx, qword [rsp + 0x1e0]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x20], rcx
lea r9, str.Warning:_Leaving_value__s_for_key__s_in_registry_n
xor r8d, r8d
mov rcx, qword [rsp + 0x1e8]
mov rdx, rcx
mov rcx, rax
call fcn.00406040
lea rcx, [rsp + 0x40]
call fcn.004c1cf0
mov qword [rsp + 0x1f0], rax
lea rcx, [0x00688c28]
call fcn.00406080
mov qword [rsp + 0x1f8], rax
mov r8d, 0x1f5
lea rdx, [0x006207a0]
lea rcx, [rsp + 0x1a8]
call fcn.00406030
mov rcx, qword [rsp + 0x1f0]
mov qword [rsp + 0x20], rcx
lea r9, str._tintended_value_was__s._n
xor r8d, r8d
mov rcx, qword [rsp + 0x1f8]
mov rdx, rcx
mov rcx, rax
call fcn.00406040
jmp 0x51b045
lea rcx, [rsp + 0x40]
call fcn.004c1cf0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [rsp + 0x200], eax
lea rcx, [rsp + 0x40]
call fcn.004c1cf0
mov qword [rsp + 0x208], rax
lea rcx, [rsp + 0x48]
call fcn.004c1cf0
mov ecx, dword [rsp + 0x200]
mov dword [rsp + 0x20], ecx
mov rcx, qword [rsp + 0x208]
mov r9, rcx
mov r8d, 1
mov rdx, rax
mov rcx, qword [rsp + 0x260]
call qword [sym.imp.ADVAPI32.dll_RegSetValueA]
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
je 0x51b3c5
lea rcx, [rsp + 0x40]
call fcn.004c1cf0
mov qword [rsp + 0x210], rax
lea rcx, [rsp + 0x48]
call fcn.004c1cf0
mov qword [rsp + 0x218], rax
lea rcx, [0x00688c28]
call fcn.00406080
mov qword [rsp + 0x220], rax
mov r8d, 0x200
lea rdx, [0x006207f8]
lea rcx, [rsp + 0x1b8]
call fcn.00406030
mov rcx, qword [rsp + 0x210]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x218]
mov qword [rsp + 0x20], rcx
lea r9, str.Error:_failed_setting_key__s_to_value__s._n
xor r8d, r8d
mov rcx, qword [rsp + 0x220]
mov rdx, rcx
mov rcx, rax
call fcn.00406040
cmp dword [rsp + 0x68], 5
je 0x51b3c3
mov dword [rsp + 0x50], 0
jmp 0x51b3ca
jmp 0x51b045
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x1c8], eax
lea rcx, [rsp + 0x30]
call fcn.00411d30
nop
lea rcx, [rsp + 0x40]
call fcn.00407d10
nop
lea rcx, [rsp + 0x48]
call fcn.00407d10
mov eax, dword [rsp + 0x1c8]
mov rcx, qword [rsp + 0x228]
xor rcx, rsp
call fcn.0054ec60
add rsp, 0x238
ret