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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2238
call fcn.00542080
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
and dword [ebp - 0xc], ebx
mov eax, ecx
and dword [ebp - 8], ebx
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], ebx
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bd7
jmp 0x522b9a
push 0x5fb838
push edi
mov dword [ebp + 8], 1
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
push 0x5fb80c
sbb ebx, ebx
push edi
inc ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x52278b
test ebx, ebx
je 0x52281a
mov ecx, dword [ebp - 4]
push edi
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
cmp dword [ebp + 0x10], 0
je 0x52281a
and dword [ebp - 0x20], 0
and dword [ebp - 0x18], 0
push 0x5c
push edi
call fcn.00522fb7
pop ecx
pop ecx
test eax, eax
jne 0x522bc4
mov ecx, dword [ebp - 4]
push edi
call fcn.00521c7b
test eax, eax
je 0x5227e2
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x20]
and dword [ebp - 0x1c], 0
push edi
mov dword [ebp - 0x20], eax
call fcn.00522469
and dword [ebp - 0x20], 0
test ebx, ebx
je 0x522816
mov ebx, dword [ebp - 4]
mov ecx, ebx
push edi
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
push edi
mov ecx, ebx
call fcn.00522f44
mov esi, eax
test esi, esi
js 0x522bc9
and dword [ebp - 0x1c], 0
jmp 0x5229f6
and dword [ebp - 0x1c], 0
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov ebx, dword [ebp - 4]
test eax, eax
jne 0x522842
and dword [ebp + 8], eax
mov ecx, ebx
push edi
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
push 0x5fb804
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x52292c
lea eax, [ebp - 0x2238]
mov ecx, ebx
push eax
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
push edi
mov ecx, ebx
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
push 0x3d
pop eax
cmp word [edi], ax
jne 0x522bc4
cmp dword [ebp + 0x10], 0
je 0x5228bc
mov eax, dword [ebp + 0xc]
mov ecx, ebx
and dword [ebp - 0x2c], 0
and dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2238]
push edi
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.005217a5
and dword [ebp - 0x30], 0
jmp 0x5229ec
cmp dword [ebp + 0x14], 0
jne 0x522915
cmp dword [ebp + 8], 0
je 0x522915
lea eax, [ebp + 8]
xor ecx, ecx
push eax
push 0x20006
push ecx
push ecx
push dword [ebp + 0xc]
mov dword [ebp + 8], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x522bbe
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x2238]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x522907
cmp eax, 2
jne 0x522ba8
test ebx, ebx
je 0x522912
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 4]
push edi
mov ecx, ebx
call fcn.00522f44
mov esi, eax
test esi, esi
js 0x522bc9
jmp 0x522b9a
push 0x5c
push edi
call fcn.00522fb7
pop ecx
pop ecx
test eax, eax
jne 0x522bc4
cmp dword [ebp + 0x10], eax
je 0x522a39
mov esi, dword [ebp + 0xc]
lea ecx, [ebp - 0x10]
push 0x2001f
push edi
push esi
call fcn.0044a590
test eax, eax
je 0x5229c4
push 0x20019
push edi
push esi
lea ecx, [ebp - 0x10]
call fcn.0044a590
test eax, eax
je 0x5229c4
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x24]
push eax
xor edx, edx
lea eax, [ebp + 8]
mov dword [ebp + 8], edx
push eax
push edx
push 0x2001f
push edx
push edx
push edx
push edi
push esi
test ecx, ecx
je 0x522996
call fcn.004b5c5f
jmp 0x52299c
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x522bbe
cmp dword [ebp - 0x10], eax
je 0x5229b2
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0xc], 0
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
test eax, eax
jne 0x522bbe
push edi
mov ecx, ebx
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
push 0x3d
pop eax
cmp word [edi], ax
jne 0x5229f6
push edi
push 0
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
call fcn.005217a5
mov esi, eax
test esi, esi
js 0x522bc9
push 0x7b
pop eax
cmp word [edi], ax
jne 0x522b9a
push edi
call fcn.00553a47
pop ecx
cmp eax, 1
jne 0x522b9a
push 0
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp - 0x10]
push edi
call fcn.00522723
mov esi, eax
test esi, esi
js 0x522bc9
push edi
mov ecx, ebx
call fcn.0052205f
jmp 0x52291d
cmp dword [ebp + 0x14], 0
jne 0x522a54
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x10]
call fcn.0044a590
mov ebx, eax
jmp 0x522a57
push 2
pop ebx
xor eax, eax
inc eax
test ebx, ebx
push 0xffffffffffffffff
cmove eax, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x238]
push 0x104
push eax
call fcn.00579f61
push eax
call fcn.00412b7d
mov ecx, dword [ebp - 4]
add esp, 0x14
push edi
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
mov ecx, dword [ebp - 4]
push edi
call fcn.00522f44
mov esi, eax
test esi, esi
js 0x522bc9
push 0x7b
pop eax
cmp word [edi], ax
jne 0x522aee
push edi
call fcn.00553a47
pop ecx
cmp eax, 1
jne 0x522aee
push dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
push 0
push dword [ebp - 0x10]
push edi
call fcn.00522723
mov esi, eax
test esi, esi
jns 0x522adb
cmp dword [ebp - 0x14], 0
je 0x522bc9
mov ecx, dword [ebp - 4]
push edi
call fcn.0052205f
mov esi, eax
test esi, esi
js 0x522bc9
cmp ebx, 2
je 0x522b9a
test ebx, ebx
je 0x522b13
cmp dword [ebp + 0x14], 0
jne 0x522b9a
push ebx
call fcn.00521c48
pop ecx
mov esi, eax
jmp 0x522bc9
cmp dword [ebp + 0x14], 0
mov ebx, dword [ebp - 0x10]
je 0x522b53
mov ecx, dword [ebp - 4]
push ebx
call fcn.00521ed4
test eax, eax
je 0x522b53
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x238]
push eax
call fcn.00521c7b
test eax, eax
je 0x522b9a
cmp dword [ebp + 8], 0
je 0x522b9a
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x10]
call fcn.00522469
jmp 0x522b9a
mov ecx, dword [ebp - 4]
push ebx
call fcn.00521ed4
mov ecx, eax
xor eax, eax
mov dword [ebp - 0x14], ecx
test ebx, ebx
je 0x522b75
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0x14]
and dword [ebp - 0xc], 0
test eax, eax
jne 0x522bbe
cmp dword [ebp + 8], eax
je 0x522b9a
test ecx, ecx
jne 0x522b9a
lea eax, [ebp - 0x238]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x522bbe
push 0x7d
pop eax
cmp word [edi], ax
jne 0x52275b
jmp 0x522bc9
push eax
call fcn.00521c48
mov esi, eax
pop ecx
test ebx, ebx
je 0x522bc9
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x522bc9
push eax
jmp 0x522b06
mov esi, 0x80020009
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x522bd7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10