Function at 0x51bc20
Capabilities:
Delete registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x582700
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5eabd8]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
xor edi, edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov byte [esp + 0x2c], 1
call fcn.0047cfdc
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x51bc78
push 0x80004005
call fcn.00414da0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x3c]
mov ecx, ebx
mov byte [esp + 0x2c], 2
call fcn.0051aa50
push eax
lea ecx, [esp + 0x18]
push 0x5a13b4
push ecx
call fcn.00415480
mov edx, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
mov eax, dword [esi]
add esp, 0xc
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0x38]
push ecx
mov ecx, esi
call fcn.0051a9e0
mov ecx, dword [esp + 0x38]
mov esi, dword [esi]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x40]
push eax
push edi
push 0x2001f
push edi
push edi
push edi
push ecx
push esi
mov dword [esp + 0x60], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebp, dword [esp + 0x14]
cmp eax, edi
jne 0x51be09
mov esi, dword [esp + 0x3c]
xor eax, eax
cmp ebp, edi
setne al
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
cmp eax, edi
je 0x51bd2a
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push ebp
push 1
push edi
push 0x5b0960
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, ebx
call fcn.0051aa50
test eax, eax
jle 0x51bdeb
lea esp, [esp]
push edi
lea edx, [esp + 0x18]
push 0x5a13b8
push edx
call fcn.00415480
add esp, 0xc
call fcn.0047cfdc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x51bc6e
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
lea ecx, [esp + 0x34]
push ecx
push edi
mov ecx, ebx
mov byte [esp + 0x34], 3
call fcn.0051b5d0
mov esi, dword [esp + 0x34]
mov ebp, dword [esp + 0x14]
xor eax, eax
test esi, esi
setne al
test eax, eax
je 0x51bdb6
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x3c]
inc eax
push eax
push esi
push 1
push 0
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [esi - 0x10]
mov byte [esp + 0x2c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51bdd7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, ebx
inc edi
call fcn.0051aa50
cmp edi, eax
jl 0x51bd40
mov esi, dword [esp + 0x3c]
xor edi, edi
cmp esi, edi
je 0x51bdfc
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov esi, 1
xor edi, edi
jmp 0x51be0d
mov esi, dword [esp + 0x18]
lea eax, [ebp - 0x10]
mov byte [esp + 0x2c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51be2e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x51be3d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51be65
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc