Function at 0x518490
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2250
call fcn.0051d7f0
mov eax, dword [0x594ccc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [ebp - 0x2210], ecx
mov dword [ebp - 0x2220], eax
mov dword [ebp - 0x221c], ebx
mov dword [ebp - 0x2218], ebx
mov dword [ebp - 0x2238], edx
call fcn.00516a00
mov esi, eax
cmp esi, ebx
jl 0x518b73
cmp word [edi], 0x7d
je 0x518b71
lea ecx, [ecx]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str.Delete
push edi
mov dword [ebp - 0x222c], 1
call esi
mov ebx, eax
neg ebx
push str.ForceRemove
sbb ebx, ebx
push edi
inc ebx
call esi
test eax, eax
je 0x518523
test ebx, ebx
je 0x51863b
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x51863d
push 0x5c
push edi
mov dword [ebp - 0x2228], esi
mov dword [ebp - 0x2224], esi
call fcn.005168e0
add esp, 8
test eax, eax
jne 0x518ac7
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516b80
test eax, eax
je 0x51859d
mov eax, dword [ebp - 0x2220]
push edi
lea ecx, [ebp - 0x2228]
mov dword [ebp - 0x2228], eax
mov dword [ebp - 0x2224], esi
call fcn.00516fc0
mov dword [ebp - 0x2228], esi
mov dword [ebp - 0x2224], esi
cmp ebx, esi
je 0x518633
mov ebx, dword [ebp - 0x2210]
push edi
mov ecx, ebx
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518af5
push edi
mov ecx, ebx
call fcn.00516c10
mov esi, eax
test esi, esi
jl 0x518af5
mov dword [ebp - 0x2224], 0
cmp word [edi], 0x7b
jne 0x518624
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x518624
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x221c]
mov ecx, dword [ebp - 0x2210]
push 0
push edx
push eax
push edi
call fcn.00518490
mov esi, eax
test esi, esi
jl 0x518b60
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
cmp word [edi], 0x7d
jne 0x5184f0
jmp 0x518b60
mov dword [ebp - 0x2224], esi
jmp 0x51863d
xor esi, esi
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x51866b
mov ecx, dword [ebp - 0x2210]
push edi
mov dword [ebp - 0x222c], eax
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
xor esi, esi
push 0x56d6b8
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x518795
lea ecx, [ebp - 0x220c]
push ecx
mov ecx, dword [ebp - 0x2210]
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
cmp word [edi], 0x3d
jne 0x518ad2
xor ebx, ebx
cmp dword [ebp + 0x10], ebx
je 0x51870f
mov edx, dword [ebp - 0x2220]
push edi
lea eax, [ebp - 0x220c]
push eax
lea ecx, [ebp - 0x2240]
push ecx
mov ecx, dword [ebp - 0x2210]
mov dword [ebp - 0x2240], edx
mov dword [ebp - 0x223c], ebx
call fcn.00518130
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x2240], ebx
mov dword [ebp - 0x223c], ebx
jl 0x518afd
mov dword [ebp - 0x223c], ebx
jmp 0x5185d9
cmp dword [ebp + 0x14], ebx
jne 0x518780
cmp dword [ebp - 0x222c], ebx
je 0x518780
mov edx, dword [ebp - 0x2220]
push 0x20006
push ebx
push edx
lea ecx, [ebp - 0x2234]
mov dword [ebp - 0x2234], ebx
mov dword [ebp - 0x2230], ebx
call fcn.00415210
cmp eax, ebx
jne 0x518b15
mov esi, dword [ebp - 0x2234]
lea eax, [ebp - 0x220c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
cmp eax, ebx
je 0x518769
cmp eax, 2
jne 0x518b15
cmp esi, ebx
je 0x51877a
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x2234], ebx
mov dword [ebp - 0x2230], ebx
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516c10
mov esi, eax
cmp esi, ebx
jmp 0x51861e
push 0x5c
push edi
call fcn.005168e0
add esp, 8
test eax, eax
jne 0x518ad2
cmp dword [ebp + 0x10], esi
je 0x5188b9
mov ebx, dword [ebp - 0x2220]
lea ecx, [ebp - 0x2214]
push ecx
push 0x2001f
push esi
push edi
push ebx
mov dword [ebp - 0x2214], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x5187ff
mov ecx, dword [ebp - 0x221c]
xor eax, eax
cmp ecx, esi
je 0x5187e9
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x2214]
mov dword [ebp - 0x2218], esi
mov dword [ebp - 0x221c], edx
cmp eax, esi
je 0x518875
push 0x20019
push edi
push ebx
lea ecx, [ebp - 0x221c]
call fcn.00415210
test eax, eax
je 0x518875
lea eax, [ebp - 0x2250]
push eax
lea ecx, [ebp - 0x2214]
push ecx
push esi
push 0x2001f
push esi
push esi
push esi
push edi
mov edx, ebx
push edx
mov dword [ebp - 0x2214], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
cmp ebx, esi
jne 0x518b23
mov ecx, dword [ebp - 0x221c]
xor eax, eax
cmp ecx, esi
je 0x518859
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x2214]
mov dword [ebp - 0x2218], esi
mov ebx, eax
mov dword [ebp - 0x221c], ecx
cmp eax, esi
jne 0x518b23
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
cmp word [edi], 0x3d
jne 0x5185d9
mov ecx, dword [ebp - 0x2210]
push edi
push 0
lea edx, [ebp - 0x221c]
push edx
call fcn.00518130
mov esi, eax
test esi, esi
jl 0x518b60
jmp 0x5185d9
cmp dword [ebp + 0x14], esi
jne 0x5189b9
mov eax, dword [ebp - 0x2220]
push 0x20019
push edi
push eax
lea ecx, [ebp - 0x221c]
call fcn.00415210
mov ebx, eax
mov dword [ebp - 0x2214], ebx
cmp ebx, esi
je 0x5188ed
mov dword [ebp + 0x14], 1
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x20c]
push 0x104
push ecx
call fcn.0051f901
push eax
call fcn.00414860
mov ecx, dword [ebp - 0x2210]
add esp, 0x14
push edi
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516c10
mov esi, eax
test esi, esi
jl 0x518b60
cmp word [edi], 0x7b
jne 0x51898b
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x51898b
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x221c]
mov ecx, dword [ebp - 0x2210]
push ebx
push 0
push edx
push edi
call fcn.00518490
mov esi, eax
test esi, esi
jge 0x51896f
test ebx, ebx
je 0x518b60
mov ecx, dword [ebp - 0x2210]
push edi
call fcn.00516a00
mov esi, eax
test esi, esi
jl 0x518b60
mov ebx, dword [ebp - 0x2214]
mov eax, dword [ebp - 0x2238]
mov dword [ebp + 0x14], eax
cmp ebx, 2
je 0x518624
test ebx, ebx
je 0x5189ce
test eax, eax
jne 0x518624
push ebx
call fcn.00516380
add esp, 4
mov esi, eax
jmp 0x518b60
mov dword [ebp - 0x2214], 2
mov ebx, dword [ebp - 0x2214]
jmp 0x5188e6
mov ebx, dword [ebp - 0x221c]
test eax, eax
je 0x518a26
mov ecx, dword [ebp - 0x2210]
push ebx
call fcn.00516bc0
test eax, eax
je 0x518a26
lea ecx, [ebp - 0x20c]
push ecx
mov ecx, dword [ebp - 0x2210]
call fcn.00516b80
test eax, eax
je 0x518624
cmp dword [ebp - 0x222c], 0
je 0x518624
lea edx, [ebp - 0x20c]
push edx
lea ecx, [ebp - 0x221c]
call fcn.00516fc0
jmp 0x518624
mov ecx, dword [ebp - 0x2210]
push ebx
call fcn.00516bc0
mov dword [ebp - 0x224c], eax
mov dword [ebp - 0x2214], 0
test ebx, ebx
je 0x518a5d
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x2214], eax
mov dword [ebp - 0x221c], 0
mov ebx, dword [ebp - 0x2214]
mov dword [ebp - 0x2218], 0
test ebx, ebx
jne 0x518b23
cmp dword [ebp - 0x222c], ebx
je 0x518624
cmp dword [ebp - 0x224c], ebx
jne 0x518624
mov ecx, dword [ebp - 0x2220]
lea eax, [ebp - 0x20c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
xor ecx, ecx
mov dword [ebp - 0x2248], ecx
mov dword [ebp - 0x2244], ecx
cmp eax, ecx
jne 0x518b4a
lea ecx, [ebp - 0x2248]
call fcn.00436120
jmp 0x518624
lea ecx, [ebp - 0x2228]
call fcn.00436120
lea ecx, [ebp - 0x221c]
call fcn.00436120
pop edi
pop esi
mov eax, 0x80020009
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [ebp - 0x2228]
jmp 0x518b5b
lea ecx, [ebp - 0x2240]
call fcn.00436120
lea ecx, [ebp - 0x221c]
call fcn.00436120
jmp 0x518b71
push eax
call fcn.00516380
lea ecx, [ebp - 0x2234]
jmp 0x518b56
lea ecx, [ebp - 0x221c]
call fcn.00436120
push ebx
call fcn.00516380
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10
push eax
call fcn.00516380
lea ecx, [ebp - 0x2248]
add esp, 4
mov esi, eax
call fcn.00436120
mov eax, dword [ebp - 0x221c]
test eax, eax
je 0x518b71
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10