Function at 0x510200
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x536090
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x57f578]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x44]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
mov eax, dword [esi + 4]
push ecx
or eax, 0x20019
mov dword [ebp - 0x44], 0
push eax
push edi
push ebx
mov ecx, esi
call fcn.00510620
test al, al
je 0x51043c
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [esi], 0
mov dword [ebp - 0x48], 0
je 0x510298
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x48]
push ecx
or eax, 0x20019
mov ecx, esi
push eax
push edi
push ebx
call fcn.00510620
test al, al
jne 0x510337
xor al, al
jmp 0x51043e
test ebx, ebx
je 0x510291
mov eax, dword [esi + 4]
or eax, 0x2001f
cmp ebx, 0x80000001
jne 0x510310
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
jne 0x510291
cmp byte [esi], 0
mov eax, dword [esi + 4]
jne 0x5102d1
or eax, 0x2001f
jmp 0x5102d6
or eax, 0x20019
cmp dword [edi + 0x14], 8
jb 0x5102de
mov edi, dword [edi]
push 0
lea ecx, [ebp - 0x48]
push ecx
push 0
push eax
push 0
push 0
push 0
push edi
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push dword [ebp - 0x44]
test eax, eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x51030c
call eax
xor al, al
jmp 0x51043e
call eax
jmp 0x510337
cmp dword [edi + 0x14], 8
jb 0x510318
mov edi, dword [edi]
push 0
lea ecx, [ebp - 0x48]
push ecx
push 0
push eax
push 0
push 0
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x510291
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x44], ebx
test ebx, ebx
je 0x510291
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
mov edi, dword [ebp - 0x4c]
mov edx, edi
cmp dword [edi + 0x14], 8
jb 0x510377
mov edx, dword [edi]
mov ecx, edx
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x40], ax
mov dword [ebp - 0x30], 0
lea eax, [ecx + 2]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x4c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5103a1
sub ecx, dword [ebp - 0x4c]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.004092c0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
push ebx
call fcn.00510720
mov bl, al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.00408080
test bl, bl
je 0x5103ea
cmp byte [esi], 0
je 0x510408
mov byte [esi + 1], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00408080
push dword [ebp - 0x48]
mov bl, 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x51043e
cmp dword [edi + 0x14], 8
jb 0x510410
mov edi, dword [edi]
push edi
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x5103ea
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00408080
push dword [ebp - 0x48]
xor bl, bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x51043e
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e679a
mov esp, ebp
pop ebp
ret 0xc