Function at 0x51cf80
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x542650
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x58a87c]
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.0051d3a0
test al, al
je 0x51d1bc
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [esi], 0
mov dword [ebp - 0x48], 0
je 0x51d018
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.0051d3a0
test al, al
jne 0x51d0b7
xor al, al
jmp 0x51d1be
test ebx, ebx
je 0x51d011
mov eax, dword [esi + 4]
or eax, 0x2001f
cmp ebx, 0x80000001
jne 0x51d090
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
jne 0x51d011
cmp byte [esi], 0
mov eax, dword [esi + 4]
jne 0x51d051
or eax, 0x2001f
jmp 0x51d056
or eax, 0x20019
cmp dword [edi + 0x14], 8
jb 0x51d05e
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 0x51d08c
call eax
xor al, al
jmp 0x51d1be
call eax
jmp 0x51d0b7
cmp dword [edi + 0x14], 8
jb 0x51d098
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 0x51d011
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x44], ebx
test ebx, ebx
je 0x51d011
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 0x51d0f7
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 0x51d121
sub ecx, dword [ebp - 0x4c]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00407120
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
push ebx
call fcn.0051d4a0
mov bl, al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.00406de0
test bl, bl
je 0x51d16a
cmp byte [esi], 0
je 0x51d188
mov byte [esi + 1], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00406de0
push dword [ebp - 0x48]
mov bl, 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x51d1be
cmp dword [edi + 0x14], 8
jb 0x51d190
mov edi, dword [edi]
push edi
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x51d16a
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00406de0
push dword [ebp - 0x48]
xor bl, bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x51d1be
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.004ef136
mov esp, ebp
pop ebp
ret 0xc