Function at 0x51be80
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x582738
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5eabd8]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x1c], edi
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebx
mov byte [esp + 0x3c], 1
call fcn.0047cfdc
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x51bedc
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 eax, dword [esp + 0x48]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x4c]
push edx
push ebx
push 0x2001f
push ebx
push ebx
neg eax
push ebx
sbb eax, eax
add eax, reloc.OLEAUT32.dll_SysReAllocString
push ecx
push eax
mov byte [esp + 0x60], 2
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x6c], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
jne 0x51bf37
mov ebp, dword [esp + 0x48]
xor eax, eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebx
xor edx, edx
cmp eax, ebx
sete dl
mov esi, edx
mov dword [esp + 0x24], esi
cmp esi, ebx
je 0x51c02e
mov eax, dword [edi + 0x10]
neg eax
sbb eax, eax
mov dword [esp + 0x48], eax
cmp eax, ebx
je 0x51c019
nop
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x50]
push edx
lea ecx, [edi + 4]
call fcn.0048eca0
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x51c00b
call fcn.0051aa40
test eax, eax
je 0x51bfb7
mov eax, dword [esp + 0x14]
push ecx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x30], esp
mov esi, esp
push eax
call fcn.004151c0
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [esp + 0x34]
push eax
mov ecx, edi
call fcn.0051bc20
jmp 0x51c00b
lea edx, [esp + 0x20]
push edx
call fcn.00507d00
mov esi, dword [eax]
mov edi, dword [esp + 0x14]
xor eax, eax
cmp esi, ebx
setne al
cmp eax, ebx
je 0x51bfe7
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push esi
push 1
push ebx
push edi
push ebp
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51c007
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x48], ebx
jne 0x51bf60
mov esi, dword [esp + 0x24]
cmp ebp, ebx
je 0x51c02a
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebp, ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51c053
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebp, ebx
je 0x51c05e
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov dword [esp + 0x3c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51c086
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 8