Function at 0x10046f6
Capabilities:
Delete directory
Delete registry key
Get common file path
Query or enumerate registry key
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x63c
mov eax, dword [0x1014004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp - 0x414], ax
xor esi, esi
lea eax, [ebp - 0x412]
mov ebx, ecx
push esi
push eax
mov dword [ebp - 0x634], ebx
mov dword [ebp - 0x638], 0x80004005
call fcn.010059c0
push 0x1001678
add ebx, 8
push ebx
push 0x1001320
mov ebx, 0x104
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.010034d3
add esp, 0x20
lea eax, [ebp - 0x624]
push eax
push 0x2001b
push esi
lea eax, [ebp - 0x414]
push eax
push 0x80000001
mov dword [ebp - 0x624], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1004946
push esi
push esi
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x628]
push eax
push esi
push esi
push esi
push dword [ebp - 0x624]
mov dword [ebp - 0x628], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x100493a
push edi
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push esi
push eax
mov dword [ebp - 0x620], esi
call fcn.010059c0
add esp, 0xc
mov dword [ebp - 0x62c], esi
cmp dword [ebp - 0x628], esi
jbe 0x100493a
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x63c]
push eax
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0x62c]
mov dword [ebp - 0x63c], ebx
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x10048f8
mov ecx, dword [ebp - 0x634]
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0x624]
call fcn.01002e05
test eax, eax
jl 0x10048f8
lea eax, [ebp - 0x630]
push eax
push esi
push esi
push 0x1002b6c
mov dword [ebp - 0x630], esi
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jl 0x10048f8
xor eax, eax
push edi
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push esi
push eax
call fcn.010059c0
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0x630]
lea eax, [ebp - 0x20c]
push 0x1001668
push ebx
push eax
call fcn.010034d3
add esp, 0x20
test eax, eax
jl 0x10048ec
cmp dword [ebp + 8], esi
je 0x10048e6
mov ecx, dword [ebp - 0x634]
push 1
lea eax, [ebp - 0x20c]
push eax
call fcn.010043b7
test eax, eax
je 0x10048e6
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHELL32.dll_SHRemoveLocalizedName]
push 0x80
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x10048ec
inc dword [ebp - 0x620]
push dword [ebp - 0x630]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x620]
cmp eax, dword [ebp - 0x628]
jne 0x1004922
lea eax, [ebp - 0x414]
push eax
push 0x80000001
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
test eax, eax
jne 0x1004922
mov dword [ebp - 0x638], esi
inc dword [ebp - 0x62c]
mov eax, dword [ebp - 0x62c]
cmp eax, dword [ebp - 0x628]
jb 0x10047e9
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x638]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100597b
leave
ret 4