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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2254
call fcn.00421ad0
mov eax, dword [0x433024]
xor eax, esp
mov dword [esp + 0x2250], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x14]
push esi
push edi
xor edi, edi
mov dword [esp + 0x34], eax
mov eax, ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
call fcn.00405052
mov esi, eax
cmp esi, edi
jl 0x405dfd
cmp word [ebx], 0x7d
je 0x405dfb
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x42cae4
push ebx
mov dword [esp + 0x2c], 1
call esi
neg eax
push str.ForceRemove
sbb edi, edi
push ebx
inc edi
call esi
test eax, eax
je 0x405a3d
test edi, edi
je 0x405b39
mov ecx, dword [esp + 0xc]
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x405b39
push 0x5c
mov eax, ebx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call fcn.00405003
pop ecx
test eax, eax
jne 0x405eb5
push ebx
call fcn.00405509
test eax, eax
je 0x405aab
mov eax, dword [esp + 0x1c]
push ebx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call fcn.0040498a
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
cmp edi, esi
je 0x405b35
mov ecx, dword [esp + 0xc]
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
mov ecx, dword [esp + 0xc]
mov edi, ebx
call fcn.0040556d
mov esi, eax
test esi, esi
js 0x405dea
and dword [esp + 0x2c], 0
cmp word [ebx], 0x7b
jne 0x405b26
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x405b26
mov ecx, dword [esp + 0xc]
push 0
push dword [ebp + 0x10]
push dword [esp + 0x18]
push ebx
call fcn.004059af
mov esi, eax
test esi, esi
js 0x405dea
mov ecx, dword [esp + 0xc]
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
cmp word [ebx], 0x7d
jne 0x405a0e
jmp 0x405dea
mov dword [esp + 0x2c], esi
push 0x42caf4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405b62
and dword [esp + 0x24], eax
mov ecx, dword [esp + 0xc]
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
push 0x42cb20
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405c72
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x258]
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
mov ecx, dword [esp + 0xc]
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
cmp word [ebx], 0x3d
jne 0x405ecf
xor edi, edi
cmp dword [ebp + 0x10], edi
je 0x405bfb
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x44], eax
push ebx
lea eax, [esp + 0x25c]
push eax
lea edx, [esp + 0x4c]
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
call fcn.00405178
mov esi, eax
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
cmp esi, edi
jl 0x405f10
mov dword [esp + 0x48], edi
jmp 0x405ae2
cmp dword [ebp + 0x14], edi
jne 0x405c62
cmp dword [esp + 0x24], edi
je 0x405c62
xor esi, esi
push 0x20006
push esi
push dword [esp + 0x24]
lea edi, [esp + 0x44]
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
call fcn.004048db
cmp eax, esi
jne 0x405ee8
mov edi, dword [esp + 0x38]
lea eax, [esp + 0x258]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
cmp eax, esi
je 0x405c4f
cmp eax, 2
jne 0x405ed6
cmp edi, esi
je 0x405c5e
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov ecx, dword [esp + 0xc]
mov edi, ebx
call fcn.0040556d
jmp 0x405b1c
push 0x5c
mov eax, ebx
call fcn.00405003
pop ecx
test eax, eax
jne 0x405ecf
cmp dword [ebp + 0x10], eax
je 0x405d05
push 0x2001f
push ebx
push dword [esp + 0x24]
lea edi, [esp + 0x1c]
call fcn.004048db
test eax, eax
je 0x405cc7
push 0x20019
push ebx
push dword [esp + 0x24]
call fcn.004048db
test eax, eax
je 0x405cc7
push ebx
push dword [esp + 0x20]
mov eax, edi
call fcn.00404887
test eax, eax
jne 0x405de3
mov ecx, dword [esp + 0xc]
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
cmp word [ebx], 0x3d
jne 0x405ae2
mov ecx, dword [esp + 0xc]
push ebx
push 0
lea edx, [esp + 0x18]
call fcn.00405178
mov esi, eax
test esi, esi
js 0x405dea
jmp 0x405ae2
cmp dword [ebp + 0x14], 0
jne 0x405d24
push 0x20019
push ebx
push dword [esp + 0x24]
lea edi, [esp + 0x1c]
call fcn.004048db
mov dword [esp + 0x20], eax
jmp 0x405d2c
mov dword [esp + 0x20], 2
cmp dword [esp + 0x20], 0
je 0x405d3a
mov dword [ebp + 0x14], 1
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x58]
push 0x104
push eax
call fcn.0041738e
push eax
call fcn.0040177f
mov ecx, dword [esp + 0x20]
add esp, 0x14
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
mov ecx, dword [esp + 0xc]
mov edi, ebx
call fcn.0040556d
mov esi, eax
test esi, esi
js 0x405dea
cmp word [ebx], 0x7b
jne 0x405dbd
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x405dbd
push dword [ebp + 0x14]
mov ecx, dword [esp + 0x10]
push 0
push dword [esp + 0x18]
push ebx
call fcn.004059af
mov esi, eax
test esi, esi
jns 0x405dac
cmp dword [ebp + 0x14], 0
je 0x405dea
mov ecx, dword [esp + 0xc]
mov eax, ebx
call fcn.00405052
mov esi, eax
test esi, esi
js 0x405dea
cmp dword [esp + 0x20], 2
mov eax, dword [esp + 0x34]
mov dword [ebp + 0x14], eax
je 0x405b26
mov eax, dword [esp + 0x20]
xor edi, edi
cmp eax, edi
je 0x405e14
cmp dword [esp + 0x34], edi
jne 0x405b26
call fcn.004041ee
mov esi, eax
cmp dword [esp + 0x10], 0
je 0x405dfb
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [esp + 0x225c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00416201
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esp + 0x34], edi
je 0x405e56
push dword [esp + 0x10]
call fcn.00405538
test eax, eax
je 0x405e56
lea eax, [esp + 0x50]
push eax
call fcn.00405509
test eax, eax
je 0x405b26
cmp dword [esp + 0x24], edi
je 0x405b26
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x14]
call fcn.0040498a
jmp 0x405b26
push dword [esp + 0x10]
call fcn.00405538
mov dword [esp + 0x20], eax
xor eax, eax
cmp dword [esp + 0x10], edi
je 0x405e79
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
cmp eax, edi
jne 0x405f09
cmp dword [esp + 0x24], edi
je 0x405b26
cmp dword [esp + 0x20], edi
jne 0x405b26
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x405de3
jmp 0x405b26
cmp dword [esp + 0x10], esi
je 0x405ec5
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x80020009
jmp 0x405dfd
cmp dword [esp + 0x10], 0
jmp 0x405eb9
call fcn.004041ee
mov esi, eax
test edi, edi
je 0x405dea
push edi
jmp 0x405efe
call fcn.004041ee
cmp dword [esp + 0x38], 0
mov esi, eax
je 0x405dea
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405dea
call fcn.004041ee
mov esi, eax
cmp dword [esp + 0x10], edi
jmp 0x405def