Function at 0x40bd30
Capabilities:
Check if file exists
Delete directory
Delete file
Delete registry key
Get common file path
Move file
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x830
push ebx
lea eax, [ecx + 0x210]
xor ebx, ebx
mov dword [ebp - 8], eax
cmp word [eax], bx
jne 0x40bd51
xor eax, eax
jmp 0x40bfd0
push esi
push edi
call fcn.0040bfd3
mov esi, 0x81
xor eax, eax
mov ecx, esi
lea edi, [ebp - 0x626]
mov word [ebp - 0x628], bx
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x628]
push 0x1a
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x628]
push 0x42b2d4
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, dword [sym.imp.MSVCRT.dll__snwprintf]
test eax, eax
je 0x40be94
lea eax, [ebp - 0x628]
push 0x1388
push eax
call fcn.0040f16b
and word [ebp - 0x420], 0
mov ecx, esi
xor eax, eax
lea edi, [ebp - 0x41e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x628]
push eax
push 0x42b2a8
lea eax, [ebp - 0x420]
push 0x104
push eax
call ebx
lea eax, [ebp - 4]
xor edi, edi
push eax
push 0xbb8
lea eax, [ebp - 0x420]
push edi
push eax
mov dword [ebp - 4], 1
call fcn.0040f65e
add esp, 0x28
test eax, eax
je 0x40be94
cmp dword [ebp - 4], edi
jne 0x40be94
mov word [ebp - 0x218], di
mov ecx, esi
xor eax, eax
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x10]
mov edi, SysReAllocString
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x42b290
push 0x42b264
push edi
mov dword [ebp - 0x10], 0x104
mov dword [ebp - 0xc], 2
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
cmp word [ebp - 0x218], 0
jne 0x40be94
push 0x42b264
push edi
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x628]
push eax
call fcn.0040ff68
pop ecx
mov dword [ebp - 4], 0x424b48
xor eax, eax
cmp dword [ebp - 4], eax
je 0x40bfae
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x208], eax
je 0x40bf71
push dword [ebp - 4]
mov ecx, esi
lea edi, [ebp - 0x41e]
mov word [ebp - 0x420], ax
push dword [ebp - 8]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x4225d8
lea eax, [ebp - 0x420]
push 0x103
push eax
call ebx
add esp, 0x14
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40bfae
and word [ebp - 0x218], ax
push dword [ebp - 4]
mov ecx, esi
lea edi, [ebp - 0x216]
push dword [ebp - 8]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x42b250
lea eax, [ebp - 0x218]
push 0x103
push eax
call ebx
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40bf46
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40bfae
push 4
lea eax, [ebp - 0x218]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x40bfae
push dword [ebp - 4]
mov word [ebp - 0x830], ax
mov ecx, esi
xor eax, eax
push dword [ebp - 8]
lea edi, [ebp - 0x82e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x4225d8
lea eax, [ebp - 0x830]
push 0x103
push eax
call ebx
lea eax, [ebp - 0x830]
push eax
call fcn.0040ff68
add esp, 0x18
add dword [ebp - 4], 0x20c
cmp dword [ebp - 4], 0x42ab7c
jl 0x40be9b
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret