Function at 0x410066
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, 0x4113f0
call fcn.00410c00
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 0x410225
cmp dword [ebp - 0x3a8], 2
jne 0x410225
push str.shell32
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
je 0x410174
push str.SHGetFolderPathW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x410164
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 0x41015e
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 0x410128
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 0x41015e
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 0x410303
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 0x410225
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 0x410213
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 0x4101e1
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 0x410213
mov dword [ebp - 0x14], esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], ebx
jne 0x410303
lea eax, [ebp - 0x224]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x41034b
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 0x410265
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 0x4102f1
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 0x4102b9
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 0x4102d1
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 0x41034b
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 0x41033e
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