Function at 0x40f7b0
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
sub esp, 0xa34
mov eax, dword [0x47edd4]
xor eax, esp
mov dword [esp + 0xa30], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x206
lea eax, [esp + 0x226]
push ebx
push eax
mov ebp, ecx
mov word [esp + 0x22c], bx
call fcn.00420780
push 0x206
lea ecx, [esp + 0x2a]
push ebx
push ecx
mov word [esp + 0x30], bx
call fcn.00420780
add esp, 0x18
push ebx
push 0x2b
lea edx, [esp + 0x228]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x220]
add edi, 0xfffffffe
jmp 0x40f820
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40f820
mov edx, dword [0x46b018]
lea eax, [esp + 0x220]
mov dword [edi], edx
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f840
mov ecx, dword [str.7654Soft]
mov dword [eax], ecx
mov ecx, dword [0x46b72c]
mov dword [eax + 4], ecx
mov ecx, dword [0x46b730]
mov dword [eax + 8], ecx
mov ecx, dword [0x46b734]
mov dword [eax + 0xc], ecx
mov cx, word [0x46b738]
lea edi, [esp + 0x220]
mov word [eax + 0x10], cx
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40f884
mov dword [edi], edx
lea edi, [esp + 0x220]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40f8a0
mov ecx, 0xb
mov esi, str.7654Setup_1.0.0_00252
lea eax, [esp + 0x220]
rep movsd dword es:[edi], dword [esi]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f8c2
mov edx, dword [str..ini]
mov ecx, dword [0x46b804]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [eax], edx
mov dx, word [0x46b808]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x220]
push eax
push 0x104
lea ecx, [esp + 0x20]
push ecx
push 0x46a7dc
push str.CfgRootPath
push str.Globals
call edi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea edx, [esp + 0x18]
push edx
call esi
test eax, eax
je 0x40f956
lea eax, [esp + 0x18]
lea edx, [eax + 2]
jmp 0x40f930
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f930
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [ebp + 0x20]
call fcn.00401d60
mov byte [ebp], 1
jmp 0x40fb16
push 0x206
lea ecx, [esp + 0x42e]
push ebx
push ecx
mov word [esp + 0x434], bx
call fcn.00420780
add esp, 0xc
xor eax, eax
jmp 0x40f980
movzx ecx, word [eax + str.SOFTWARE_]
mov word [esp + eax + 0x428], cx
add eax, 2
cmp cx, bx
jne 0x40f980
lea eax, [esp + 0x428]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f9a1
mov edx, dword [str.7654Soft]
mov ecx, dword [0x46b72c]
mov dword [eax], edx
mov edx, dword [0x46b730]
mov dword [eax + 4], ecx
mov ecx, dword [0x46b734]
mov dword [eax + 8], edx
mov dx, word [0x46b738]
mov dword [eax + 0xc], ecx
mov word [eax + 0x10], dx
lea eax, [esp + 0x10]
push eax
push 0xf003f
push ebx
lea ecx, [esp + 0x434]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40fa51
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
push str.CfgRootPath
push ecx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40fa51
lea edx, [esp + 0x18]
push edx
call esi
test eax, eax
je 0x40fa51
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebp + 0x20]
call fcn.00401fd0
mov byte [ebp], 1
jmp 0x40fb16
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [esp + 0x83c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x838]
push 0x5c
push ecx
call fcn.004206b5
push 0x206
lea edx, [esp + 0x63e]
push ebx
mov word [eax + 2], bx
push edx
mov word [esp + 0x644], bx
call fcn.00420780
lea eax, [esp + 0x84c]
push eax
lea ecx, [esp + 0x648]
push str._sSoftApp.ini
push ecx
call fcn.004206e5
add esp, 0x20
lea edx, [esp + 0x630]
push edx
push 0x104
lea eax, [esp + 0x20]
push eax
push 0x46a7dc
push str.CfgRootPath
push str.AppInfo
call edi
lea ecx, [esp + 0x18]
push ecx
call esi
test eax, eax
je 0x40fb13
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40faf0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x1c]
push edx
lea ecx, [ebp + 0x20]
call fcn.00401d60
mov byte [ebp], 1
jmp 0x40fb16
mov byte [ebp], bl
mov ecx, dword [esp + 0xa40]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004206a6
add esp, 0xa34
ret