Function at 0x403d90
Capabilities:
Get common file path
Get startup folder
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x407608
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x528
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
mov ebx, dword [esi + 0xb0]
lea ebp, [esi + 0xb0]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x540], 0
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x238]
push pe_nt_image_headers32
push eax
push 0
mov byte [esp + 0x54c], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x238]
push ecx
lea ecx, [esp + 0x14]
call fcn.004068c8
lea edx, [esp + 0x30]
push edx
push 7
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edi, eax
test edi, edi
jl 0x403e31
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov edi, eax
jmp 0x403e5a
mov edx, dword [esp + 0x10]
push edi
lea eax, [esp + 0x38]
push edx
push eax
push str.Crt_lnk_sfl_:_s_s__X_
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov ecx, esi
push 0x40aab0
call fcn.00405750
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_1
test edi, edi
mov byte [esp + 0x540], 2
jl 0x403f2f
push ebp
lea edx, [esp + 0x20]
push 0x40a64c
push edx
call sub.MFC42.DLL_operator_2
push str..lnk
push eax
lea eax, [esp + 0x30]
mov byte [esp + 0x548], 3
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
mov byte [esp + 0x54c], 4
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x28]
mov byte [esp + 0x540], 7
call fcn.004068bc
lea ecx, [esp + 0x1c]
mov byte [esp + 0x540], 6
call fcn.004068bc
mov eax, dword [esi + 0x90]
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x28]
push ebx
push eax
push ecx
mov ecx, esi
call fcn.00406330
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
push edx
push eax
push str.clnk:_s_s__X_
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov ecx, esi
push 0x40aab0
call fcn.00405750
lea ecx, [esp + 0x24]
mov byte [esp + 0x540], 2
call fcn.004068bc
jmp 0x403f58
mov ecx, dword [esp + 0x10]
push edi
lea edx, [esp + 0x38]
push ecx
push edx
push str.clnk_pfi_:_s_s__X_
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov ecx, esi
push 0x40aab0
call fcn.00405750
lea ebp, [esi + 0x90]
lea eax, [esp + 0x1c]
push ebp
push 0x40a614
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x544], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x540], 2
call fcn.004068bc
mov ecx, dword [esi + 0x8c]
lea edi, [esi + 0xd8]
push ecx
push str._sDW
push edi
mov dword [esp + 0x38], pe_nt_image_headers32
call sub.MFC42.DLL_CString::Format
mov edi, dword [edi]
add esp, 0xc
lea edx, [esp + 0x138]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edx
call edi
mov eax, dword [esi + 0xac]
lea ecx, [esp + 0x20]
push 0
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push eax
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4041d1
lea edx, [esp + 0x2c]
lea eax, [esp + 0x438]
push edx
mov edx, dword [esp + 0x24]
push eax
push 0
lea ecx, [esp + 0x144]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
or ebx, 0xffffffff
test eax, eax
jne 0x40410a
lea eax, [esp + 0x438]
lea ecx, [esp + 0x14]
push eax
call fcn.004068c8
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find
cmp eax, ebx
je 0x4040aa
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0xb8]
push eax
push ecx
push str.uid:_s_svi:_s
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov ecx, esi
push 0x40aab0
call fcn.00405750
lea ecx, [esp + 0x18]
mov byte [esp + 0x540], 1
call fcn.004068bc
lea ecx, [esp + 0x14]
mov byte [esp + 0x540], 0
call fcn.004068bc
mov dword [esp + 0x540], ebx
jmp 0x4041fe
push 0x20
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReverseFind
inc eax
lea edx, [esp + 0x1c]
push eax
push edx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Mid
push eax
mov ecx, ebp
mov byte [esp + 0x544], 9
call fcn.004069d0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x540], 2
call fcn.004068bc
mov eax, dword [ebp]
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0xb8]
push eax
push ecx
push edx
push str.uid:_s_oapf:_s_ref:__s_
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0x14
jmp 0x404124
push eax
mov eax, dword [esi + 0xb8]
push eax
push str.uid:_s_frre:__d_
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0x10
push 0x40aab0
mov ecx, esi
call fcn.00405750
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0xb8]
push ecx
push edx
push str.uid:_s_nap:_s
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov ecx, esi
push 0x40aab0
call fcn.00405750
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x338]
push eax
push ecx
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x138]
mov eax, dword [edx - 8]
mov edx, dword [esp + 0x20]
push eax
lea eax, [esp + 0x33c]
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
mov byte [esp + 0x540], 1
call fcn.004068bc
lea ecx, [esp + 0x14]
mov byte [esp + 0x540], 0
call fcn.004068bc
lea ecx, [esp + 0x10]
mov dword [esp + 0x540], ebx
call fcn.004068bc
mov al, 1
jmp 0x404209
lea ecx, [esp + 0x18]
mov byte [esp + 0x540], 1
call fcn.004068bc
lea ecx, [esp + 0x14]
mov byte [esp + 0x540], 0
call fcn.004068bc
mov dword [esp + 0x540], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.004068bc
xor al, al
mov ecx, dword [esp + 0x538]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x534
ret