Function at 0x4101ca
Capabilities:
Check if file exists
Delete directory
Delete file
Get common file path
Get file attributes
Get session user name
Persist via run registry key
Query or enumerate registry value

Disassembly:
mov eax, 0x41155c
call fcn.00410d60
sub esp, 0x7bc
push ebx
push esi
push edi
mov esi, 0x114
mov dword [ebp - 0x10], esp
xor ebx, ebx
push esi
lea eax, [ebp - 0x3b8]
push ebx
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x3b8]
mov dword [ebp - 0x3b8], esi
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x410389
cmp dword [ebp - 0x3a8], 2
jne 0x410389
push str.shell32
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
je 0x4102d8
push str.SHGetFolderPathW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x4102c8
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x224]
push eax
push ebx
push ebx
push 0x1a
push ebx
call esi
cmp eax, ebx
jne 0x4102c2
lea eax, [ebp - 0x224]
push eax
call sub.MSVCRT.dll_wcslen
dec eax
pop ecx
mov dword [ebp - 0x18], eax
cmp word [ebp + eax*2 - 0x224], 0x5c
mov eax, 0x41c4f4
je 0x41028c
mov eax, 0x4150b8
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x5c0]
push str._s_sDMCache
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x5c0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4102c2
mov dword [ebp - 0x14], 1
call dword [sym.imp.ole32.dll_CoUninitialize]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x14], ebx
jne 0x410467
lea eax, [ebp - 0x1c]
push eax
push 1
pop esi
push esi
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x410389
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x104
push eax
lea eax, [ebp - 0x224]
push eax
push ebx
push ebx
push str.AppData
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410377
lea eax, [ebp - 0x224]
push eax
call sub.MSVCRT.dll_wcslen
dec eax
pop ecx
mov dword [ebp - 0x18], eax
cmp word [ebp + eax*2 - 0x224], 0x5c
mov eax, 0x41c4f4
je 0x410345
mov eax, 0x4150b8
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x5c0]
push str._s_sDMCache
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x5c0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x410377
mov dword [ebp - 0x14], esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], ebx
jne 0x410467
lea eax, [ebp - 0x224]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x4104af
lea eax, [ebp - 0x224]
push eax
call sub.MSVCRT.dll_wcslen
dec eax
pop ecx
mov dword [ebp - 0x18], eax
cmp word [ebp + eax*2 - 0x224], 0x5c
mov eax, 0x41c4f4
je 0x4103c9
mov eax, 0x4150b8
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x5c0]
push str._s_sDMCache
push eax
call esi
add esp, 0x10
cmp dword [ebp - 0x3a8], 2
jne 0x410455
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x40
push eax
lea eax, [ebp - 0x2a4]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x41041d
lea eax, [ebp - 0x2a4]
push str.default_user
push eax
call esi
pop ecx
pop ecx
mov eax, dword [ebp - 0x18]
cmp word [ebp + eax*2 - 0x224], 0x5c
mov eax, 0x41c4f4
je 0x410435
mov eax, 0x4150b8
lea ecx, [ebp - 0x2a4]
push ecx
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x5c0]
push str._s_sDMCache_s
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x5c0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4104af
lea eax, [ebp - 0x5c0]
push eax
lea eax, [ebp - 0x7c8]
push str._s_settings.bak
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x7c8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4104a2
lea eax, [ebp - 0x7c8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x5c0]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret