Function at 0x4217a8
Capabilities:
Check if file exists
Delete file
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4c257c]
lea ecx, [ebp - 0xc]
push ebx
push esi
push edi
xor edx, edx
or eax, 0x2001b
push ecx
push eax
push edx
push dword [0x4c2578]
mov dword [ebp - 0x24], edx
mov ebx, edx
push dword [0x4c2574]
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], edx
mov byte [ebp - 1], dl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x4219ae
mov esi, dword [ebp - 0xc]
test esi, esi
jne 0x4217fc
push 0x57
pop edi
jmp 0x4219b1
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 8]
push eax
xor ecx, ecx
lea eax, [ebp - 0x18]
push ecx
push eax
push ecx
push str.PendingFileDeleteOperations
push esi
call edi
test eax, eax
jne 0x421890
cmp dword [ebp - 0x18], 7
jne 0x421890
mov eax, dword [ebp - 8]
add eax, 4
push eax
call fcn.004640c6
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x42183b
push 8
pop edi
jmp 0x4219ae
mov eax, dword [ebp - 8]
add eax, 4
push eax
xor eax, eax
push eax
push ebx
call fcn.00457e10
add esp, 0xc
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
xor eax, eax
push eax
push str.PendingFileDeleteOperations
push esi
call edi
mov edi, eax
test edi, edi
jne 0x4219a7
mov eax, dword [ebp - 8]
test al, 1
je 0x421877
inc eax
mov dword [ebp - 8], eax
xor ecx, ecx
cmp word [ebx + eax], cx
jne 0x42188b
sub eax, 2
mov dword [ebp - 8], eax
cmp word [eax + ebx], cx
je 0x42187f
add eax, 4
jmp 0x421896
xor ecx, ecx
mov edi, ecx
mov eax, ecx
mov dword [ebp - 8], eax
mov edx, ebx
mov esi, edi
test eax, eax
je 0x4219a3
mov dword [ebp - 0x10], ecx
lea esi, [ecx + ebx]
mov ecx, esi
mov dword [ebp - 0x20], esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x24]
jne 0x4218b3
sub ecx, edx
mov dword [ebp - 0x1c], 9
sar ecx, 1
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x14], eax
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x42192c
cmp eax, 0x20
je 0x4218f1
cmp eax, 5
jne 0x421905
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub dword [ebp - 0x1c], 1
mov esi, dword [ebp - 0x20]
jns 0x4218d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x42192c
cmp eax, 3
je 0x42192c
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
lea edx, [esi + ecx]
test eax, eax
je 0x421935
mov eax, dword [ebp - 8]
mov ecx, edx
mov dword [ebp - 0x10], ecx
jmp 0x42195b
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
lea edx, [esi + ecx]
mov eax, dword [ebp - 8]
sub eax, esi
mov byte [ebp - 1], 1
sub eax, ecx
push eax
lea eax, [edx + ebx]
push eax
push dword [ebp - 0x20]
call fcn.00457890
mov eax, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x10]
sub eax, esi
mov dword [ebp - 8], eax
cmp ecx, eax
jb 0x4218a8
cmp byte [ebp - 1], 0
je 0x4219a3
test eax, eax
jne 0x42197d
push str.PendingFileDeleteOperations
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x4219a1
xor ecx, ecx
mov word [ebx + eax], cx
mov eax, dword [ebp - 8]
add eax, 2
push eax
push ebx
push 7
mov dword [ebp - 8], eax
xor eax, eax
push eax
push str.PendingFileDeleteOperations
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test ebx, ebx
je 0x4219ae
push ebx
call fcn.0045f917
pop ecx
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x4219bc
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret