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

Disassembly:
sub esp, 0x628
mov eax, dword [0x464380]
xor eax, esp
mov dword [esp + 0x624], eax
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x206
lea eax, [esp + 0x22a]
push ebp
push eax
mov ebx, ecx
mov word [esp + 0x230], bp
call fcn.00413220
push 0x206
lea ecx, [esp + 0x2e]
push ebp
push ecx
mov word [esp + 0x34], bp
call fcn.00413220
add esp, 0x18
push ebp
push 0x2b
lea edx, [esp + 0x22c]
push edx
push ebp
mov dword [esp + 0x24], ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x224]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x408d30
mov edx, dword [0x4574ac]
mov dword [edi], edx
lea edi, [esp + 0x224]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x408d50
mov ecx, 7
mov esi, 0x457420
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x224]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x408d72
lea eax, [esp + 0x224]
mov dword [edi], edx
add eax, 0xfffffffe
lea ebx, [ebx]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x408d90
mov ecx, dword [str.DongFang]
mov edx, dword [0x45749c]
mov dword [eax], ecx
mov ecx, dword [0x4574a0]
mov dword [eax + 4], edx
mov edx, dword [0x4574a4]
mov dword [eax + 8], ecx
mov cx, word [0x4574a8]
mov dword [eax + 0xc], edx
mov word [eax + 0x10], cx
lea eax, [esp + 0x224]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x408dd4
mov edx, dword [str..ini]
mov ecx, dword [0x457490]
mov dword [eax], edx
mov dx, word [0x457494]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x224]
push eax
push 0x104
lea ecx, [esp + 0x24]
push ecx
push 0x457504
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea edx, [esp + 0x1c]
push edx
call ebp
test eax, eax
je 0x408eb2
lea eax, [esp + 0x1c]
mov dword [ebx + 8], 1
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408e42
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x20]
push eax
lea ecx, [ebx + 0x44]
call fcn.00408320
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408e66
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [ebx + 0x60]
call fcn.00408320
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408e90
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x20]
push edx
lea ecx, [ebx + 0x7c]
call fcn.00408320
jmp 0x409079
push 0x206
lea eax, [esp + 0x432]
push 0
push eax
mov word [esp + 0x438], 0
call fcn.00413220
add esp, 0xc
xor eax, eax
jmp 0x408ee0
movzx ecx, word [eax + str.SOFTWARE_]
mov word [esp + eax + 0x42c], cx
add eax, 2
test cx, cx
jne 0x408ee0
lea edi, [esp + 0x42c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x408f01
mov ecx, 7
mov esi, 0x457420
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x438]
push edx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov edi, 1
jne 0x408fa4
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0
push 0
push str.InstallPath
push edx
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408fa4
lea eax, [esp + 0x1c]
push eax
call ebp
test eax, eax
je 0x408fa4
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [ebx + 0x44]
mov dword [ebx + 8], edi
mov dword [esp + 0x18], edi
call fcn.004084f0
lea edx, [esp + 0x1c]
push edx
lea ecx, [ebx + 0x60]
call fcn.004084f0
lea eax, [esp + 0x1c]
push eax
lea ecx, [ebx + 0x7c]
call fcn.004084f0
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x14], 0
jne 0x409079
push 0
push 0x26
lea edx, [esp + 0x24]
push edx
push 0
mov dword [ebx + 8], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408fe0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x20]
lea esi, [ebx + 0x60]
push eax
mov ecx, esi
call fcn.00408320
push edi
push 0x4574ac
mov ecx, esi
call fcn.00408220
push 0xffffffffffffffff
push 0
lea ecx, [ebx + 0x28]
push ecx
mov ecx, esi
call fcn.00408110
push edi
push 0x4574ac
mov ecx, esi
call fcn.00408220
push 0xffffffffffffffff
push 0
push esi
lea ecx, [ebx + 0x44]
call fcn.00408020
push 0xffffffffffffffff
push 0
push esi
lea ecx, [ebx + 0x7c]
call fcn.00408020
lea edx, [esp + 0x224]
push edx
call fcn.0040aeb0
add esp, 4
cmp dword [esi + 0x18], 8
jb 0x40905d
mov esi, dword [esi + 4]
jmp 0x409060
add esi, 4
lea eax, [esp + 0x224]
push eax
push esi
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov ecx, dword [esp + 0x634]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00413205
add esp, 0x628
ret