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

Disassembly:
push 0xffffffffffffffff
push 0x4091f8
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 + 0xd4]
lea ebp, [esi + 0xd4]
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 0x100
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.004084e8
lea edx, [esp + 0x30]
push edx
push 7
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edi, eax
test edi, edi
jl 0x403c21
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov edi, eax
jmp 0x403c4a
mov edx, dword [esp + 0x10]
push edi
lea eax, [esp + 0x38]
push edx
push eax
push str.Crt_lnk_sfl_:_s_s__X_
push 0x40dc40
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov ecx, esi
push 0x40dc40
call fcn.00405510
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 0x403d1f
push ebp
lea edx, [esp + 0x20]
push 0x40d60c
push edx
call sub.MFC42.DLL_operator
push str..lnk
push eax
lea eax, [esp + 0x30]
mov byte [esp + 0x548], 3
push eax
call sub.MFC42.DLL_operator_2
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
mov byte [esp + 0x54c], 4
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x28]
mov byte [esp + 0x540], 7
call fcn.004084dc
lea ecx, [esp + 0x1c]
mov byte [esp + 0x540], 6
call fcn.004084dc
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.00406100
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
push edx
push eax
push str.clnk:_s_s__X_
push 0x40dc40
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov ecx, esi
push 0x40dc40
call fcn.00405510
lea ecx, [esp + 0x24]
mov byte [esp + 0x540], 2
call fcn.004084dc
jmp 0x403d48
mov ecx, dword [esp + 0x10]
push edi
lea edx, [esp + 0x38]
push ecx
push edx
push str.clnk_pfi_:_s_s__X_
push 0x40dc40
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov ecx, esi
push 0x40dc40
call fcn.00405510
lea ebp, [esi + 0x90]
lea eax, [esp + 0x1c]
push ebp
push 0x40d5d4
push eax
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x544], 8
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x1c]
mov byte [esp + 0x540], 2
call fcn.004084dc
mov ecx, dword [esi + 0x8c]
lea edi, [esi + 0xd0]
push ecx
push str._sDW
push edi
mov dword [esp + 0x38], 0x100
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 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x403fc1
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 0x403efa
lea eax, [esp + 0x438]
lea ecx, [esp + 0x14]
push eax
call fcn.004084e8
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find
cmp eax, ebx
je 0x403e9a
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0xb0]
push eax
push ecx
push str.uid:_s_svi:_s
push 0x40dc40
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov ecx, esi
push 0x40dc40
call fcn.00405510
lea ecx, [esp + 0x18]
mov byte [esp + 0x540], 1
call fcn.004084dc
lea ecx, [esp + 0x14]
mov byte [esp + 0x540], 0
call fcn.004084dc
mov dword [esp + 0x540], ebx
jmp 0x403fee
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.004085f0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x540], 2
call fcn.004084dc
mov eax, dword [ebp]
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0xb0]
push eax
push ecx
push edx
push str.uid:_s_oapf:_s_ref:__s_
push 0x40dc40
call sub.MFC42.DLL_CString::Format
add esp, 0x14
jmp 0x403f14
push eax
mov eax, dword [esi + 0xb0]
push eax
push str.uid:_s_frre:__d_
push 0x40dc40
call sub.MFC42.DLL_CString::Format
add esp, 0x10
push 0x40dc40
mov ecx, esi
call fcn.00405510
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0xb0]
push ecx
push edx
push str.uid:_s_nap:_s
push 0x40dc40
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov ecx, esi
push 0x40dc40
call fcn.00405510
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.004084dc
lea ecx, [esp + 0x14]
mov byte [esp + 0x540], 0
call fcn.004084dc
lea ecx, [esp + 0x10]
mov dword [esp + 0x540], ebx
call fcn.004084dc
mov al, 1
jmp 0x403ff9
lea ecx, [esp + 0x18]
mov byte [esp + 0x540], 1
call fcn.004084dc
lea ecx, [esp + 0x14]
mov byte [esp + 0x540], 0
call fcn.004084dc
mov dword [esp + 0x540], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.004084dc
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