Function at 0x421346
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 [0x4a74a4]
lea ecx, [ebp - 0xc]
push ebx
push esi
push edi
xor edx, edx
or eax, 0x2001b
push ecx
push eax
push edx
push dword [0x4a74a0]
mov dword [ebp - 0x20], edx
mov ebx, edx
push dword [0x4a749c]
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 0x42154d
mov esi, dword [ebp - 0xc]
test esi, esi
jne 0x42139a
push 0x57
pop edi
jmp 0x421550
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 0x42142e
cmp dword [ebp - 0x18], 7
jne 0x42142e
mov eax, dword [ebp - 8]
add eax, 4
push eax
call fcn.00461b84
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4213d9
push 8
pop edi
jmp 0x42154d
mov eax, dword [ebp - 8]
add eax, 4
push eax
xor eax, eax
push eax
push ebx
call fcn.004557e0
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 0x421546
mov eax, dword [ebp - 8]
test al, 1
je 0x421415
inc eax
mov dword [ebp - 8], eax
xor ecx, ecx
cmp word [ebx + eax], cx
jne 0x421429
sub eax, 2
mov dword [ebp - 8], eax
cmp word [eax + ebx], cx
je 0x42141d
add eax, 4
jmp 0x421434
xor ecx, ecx
mov edi, ecx
mov eax, ecx
mov dword [ebp - 8], eax
mov edx, ebx
mov esi, edi
test eax, eax
je 0x421542
mov dword [ebp - 0x10], ecx
lea esi, [ecx + ebx]
mov ecx, esi
mov dword [ebp - 0x24], esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x20]
jne 0x421451
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 0x4214ca
cmp eax, 0x20
je 0x42148f
cmp eax, 5
jne 0x4214a3
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub dword [ebp - 0x1c], 1
mov esi, dword [ebp - 0x24]
jns 0x421472
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4214ca
cmp eax, 3
je 0x4214ca
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
lea edx, [esi + ecx]
test eax, eax
je 0x4214d3
mov eax, dword [ebp - 8]
mov ecx, edx
mov dword [ebp - 0x10], ecx
jmp 0x4214fa
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
lea eax, [ecx + ebx]
push eax
call fcn.00455260
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 0x421446
cmp byte [ebp - 1], 0
je 0x421542
test eax, eax
jne 0x42151c
push str.PendingFileDeleteOperations
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x421540
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 0x42154d
push ebx
call fcn.0045d3d7
pop ecx
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x42155b
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret