Function at 0x40b216
Capabilities:
Create directory
Get common file path
Get disk information
Get program files directory
Get startup folder
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43b243
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x660
mov dword [ebp - 0x634], ecx
push 1
mov ecx, dword [ebp - 0x634]
call sub.MFC42.DLL_CWnd::UpdateData
mov eax, dword [ebp - 0x634]
add eax, 0x6d0
push eax
lea ecx, [ebp - 0x21c]
call fcn.00431d2a
mov dword [ebp - 4], 0
push 0x44f23c
mov ecx, dword [ebp - 0x634]
add ecx, 0x6e0
push ecx
call fcn.00408540
and eax, 0xff
test eax, eax
je 0x40b44a
mov edx, dword [ebp - 0x634]
cmp dword [edx + 0x704], 0
je 0x40b2be
mov eax, dword [ebp - 0x634]
cmp dword [eax + 0x704], 0
je 0x40b44a
mov ecx, dword [ebp - 0x634]
cmp dword [ecx + 0x700], 0
je 0x40b44a
push 0x44f240
mov edx, dword [ebp - 0x634]
add edx, 0x6d0
push edx
call fcn.00408540
and eax, 0xff
test eax, eax
je 0x40b44a
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.00402c80
sub eax, 1
push eax
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.00408520
movsx eax, al
cmp eax, 0x5c
jne 0x40b3dc
push 0
mov ecx, dword [ebp - 0x634]
add ecx, 0x6e0
call fcn.00408520
movsx ecx, al
cmp ecx, 0x5c
jne 0x40b3bd
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.00402c80
sub eax, 1
push eax
lea edx, [ebp - 0x610]
push edx
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::Left
mov dword [ebp - 0x638], eax
mov eax, dword [ebp - 0x638]
mov dword [ebp - 0x63c], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x63c]
push ecx
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::operator
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x610]
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x634]
add edx, 0x6e0
push edx
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::operator_1
jmp 0x40b3da
mov eax, dword [ebp - 0x634]
add eax, 0x6e0
push eax
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::operator_1
jmp 0x40b44a
push 0
mov ecx, dword [ebp - 0x634]
add ecx, 0x6e0
call fcn.00408520
movsx ecx, al
cmp ecx, 0x5c
jne 0x40b417
mov edx, dword [ebp - 0x634]
add edx, 0x6e0
push edx
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::operator_1
jmp 0x40b44a
push 0x4498d4
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.00431d84
mov eax, dword [ebp - 0x634]
add eax, 0x6e0
push eax
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::operator_1
push 0x44f244
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
push ecx
call fcn.0040ccb0
and eax, 0xff
test eax, eax
je 0x40b4a0
push 0
push 0
push 0x4498d8
call sub.MFC42.DLL_AfxMessageBox
mov ecx, dword [ebp - 0x634]
add ecx, 0x330
call sub.MFC42.DLL_CWnd::SetFocus
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call sub.MFC42.DLL_CString::CString
jmp 0x40ba54
mov ecx, dword [ebp - 0x634]
add ecx, 0x330
call sub.MFC42.DLL_CWnd::GetStyle
and eax, 0x800
test eax, eax
jne 0x40b580
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.0040cdc0
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
jne 0x40b580
push 2
lea edx, [ebp - 0x618]
push edx
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::Left
mov dword [ebp - 0x640], eax
mov eax, dword [ebp - 0x640]
mov dword [ebp - 0x644], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x644]
call fcn.0040cdc0
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x614], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x618]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x614]
and ecx, 0xff
test ecx, ecx
je 0x40b580
push 0
push 0
push 0x4498e8
call sub.MFC42.DLL_AfxMessageBox
mov ecx, dword [ebp - 0x634]
add ecx, 0x330
call sub.MFC42.DLL_CWnd::SetFocus
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call sub.MFC42.DLL_CString::CString
jmp 0x40ba54
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.0040cdc0
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
jne 0x40b6d8
mov dword [ebp - 0x224], 0
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.00402c80
mov dword [ebp - 0x220], eax
mov edx, dword [ebp - 0x224]
push edx
push 0x5c
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::Find
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0
jge 0x40b5ef
jmp 0x40b6d8
mov eax, dword [ebp - 0x228]
push eax
lea ecx, [ebp - 0x620]
push ecx
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::Left
mov dword [ebp - 0x648], eax
mov edx, dword [ebp - 0x648]
mov dword [ebp - 0x64c], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x64c]
call fcn.0040cdc0
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x61c], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x620]
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x61c]
and eax, 0xff
test eax, eax
je 0x40b6b7
push 0
mov ecx, dword [ebp - 0x228]
push ecx
lea edx, [ebp - 0x624]
push edx
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::Left
mov dword [ebp - 0x650], eax
mov eax, dword [ebp - 0x650]
mov dword [ebp - 0x654], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x654]
call fcn.0040cdc0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x624]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x228]
add ecx, 1
mov dword [ebp - 0x224], ecx
mov edx, dword [ebp - 0x224]
cmp edx, dword [ebp - 0x220]
jl 0x40b5c1
push 2
lea eax, [ebp - 0x628]
push eax
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call sub.MFC42.DLL_CString::Left
mov dword [ebp - 0x658], eax
mov ecx, dword [ebp - 0x658]
mov dword [ebp - 0x65c], ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x65c]
call fcn.0040cdc0
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x628]
call sub.MFC42.DLL_CString::CString
cmp dword [ebp - 0x14], 4
je 0x40b73e
cmp dword [ebp - 0x14], 5
je 0x40b73e
cmp dword [ebp - 0x14], 6
jne 0x40b774
push 0
push 0
push 0x4498f4
call sub.MFC42.DLL_AfxMessageBox
mov ecx, dword [ebp - 0x634]
add ecx, 0x330
call sub.MFC42.DLL_CWnd::SetFocus
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call sub.MFC42.DLL_CString::CString
jmp 0x40ba54
mov edx, dword [ebp - 0x634]
cmp dword [edx + 0x6fc], 0
je 0x40b7d8
push 0x44f248
mov eax, dword [ebp - 0x634]
add eax, 0x6e0
push eax
call fcn.00408540
and eax, 0xff
test eax, eax
je 0x40b7ba
lea ecx, [ebp - 0x21c]
call fcn.0040cdc0
push eax
call fcn.004085c0
mov ecx, eax
call fcn.00413d0a
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.0040cdc0
push eax
call fcn.004085c0
mov ecx, eax
call fcn.00413d47
mov dword [ebp - 0x10], 1
lea ecx, [ebp - 0x18]
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x40b7fe
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
je 0x40b996
mov dword [ebp - 0x2f8], 0xc8
lea edx, [ebp - 0x2f8]
push edx
lea eax, [ebp - 0x2f0]
push eax
lea ecx, [ebp - 0x2f4]
push ecx
push 0
push str.Local_AppData
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40b843
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
je 0x40b996
lea eax, [ebp - 0x2f0]
push eax
lea ecx, [ebp - 0x504]
call fcn.0040cc60
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2f0]
mov dword [ebp - 0x2fc], ecx
push 0
push 0x26
lea edx, [ebp - 0x608]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x608]
push eax
lea ecx, [ebp - 0x300]
call sub.MFC42.DLL_CString::CString_1
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x300]
call fcn.00402c80
sub eax, 2
push eax
lea ecx, [ebp - 0x62c]
push ecx
lea ecx, [ebp - 0x300]
call sub.MFC42.DLL_CString::Right
mov dword [ebp - 0x660], eax
mov edx, dword [ebp - 0x660]
mov dword [ebp - 0x664], edx
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x664]
push eax
lea ecx, [ebp - 0x300]
call sub.MFC42.DLL_CString::operator
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x62c]
call sub.MFC42.DLL_CString::CString
push 0x44f24c
lea ecx, [ebp - 0x60c]
call sub.MFC42.DLL_CString::CString_1
mov byte [ebp - 4], 9
push str.VirtualStore
mov ecx, dword [ebp - 0x2fc]
push ecx
push 0x449974
lea edx, [ebp - 0x60c]
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x100
lea ecx, [ebp - 0x500]
push ecx
push 0xffffffffffffffff
lea ecx, [ebp - 0x60c]
call fcn.0040cdc0
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x44997c
lea edx, [ebp - 0x500]
push edx
mov ecx, dword [ebp - 0x634]
call fcn.0040c656
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x60c]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x300]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x504]
call sub.MFC42.DLL_CString::CString
push 0x100
lea eax, [ebp - 0x218]
push eax
push 0xffffffffffffffff
push str.ourfriend
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
push ecx
lea edx, [ebp - 0x630]
push edx
call sub.MFC42.DLL_operator_1
mov dword [ebp - 0x668], eax
mov eax, dword [ebp - 0x668]
mov dword [ebp - 0x66c], eax
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x66c]
call fcn.0040cdc0
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x630]
call sub.MFC42.DLL_CString::CString
push 0x44f250
lea ecx, [ebp - 0x218]
push ecx
mov ecx, dword [ebp - 0x634]
call fcn.0040c656
mov ecx, dword [ebp - 0x634]
add ecx, 0x6d0
call fcn.0040cdc0
push eax
mov edx, dword [ebp - 0x634]
mov ecx, dword [edx + 0x6ec]
mov eax, dword [ebp - 0x634]
mov edx, dword [eax + 0x6ec]
mov eax, dword [edx]
call dword [eax]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret