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

Disassembly:
push ebp
lea ebp, [esp - 0x5a8]
sub esp, 0x628
mov eax, dword [0x50cb30]
xor eax, ebp
mov dword [ebp + 0x5a4], eax
push ebx
push esi
push edi
mov edi, 0x206
xor ebx, ebx
push edi
lea eax, [ebp + 0x196]
push ebx
push eax
mov esi, ecx
mov word [ebp + 0x194], bx
call fcn.004203a0
push edi
lea eax, [ebp + 0x39e]
push ebx
push eax
mov word [ebp + 0x39c], bx
call fcn.004203a0
add esp, 0x18
push ebx
push 0x2b
lea eax, [ebp + 0x194]
push eax
push ebx
mov dword [ebp - 0x7c], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edi, 0x4e9b70
lea eax, [ebp + 0x194]
push edi
push eax
call fcn.00420504
lea eax, [ebp + 0x194]
push 0x4c6ac4
push eax
call fcn.00420504
lea eax, [ebp + 0x194]
push edi
push eax
call fcn.00420504
lea eax, [ebp + 0x194]
push str.DongFang
push eax
call fcn.00420504
lea eax, [ebp + 0x194]
push str..ini
push eax
call fcn.00420504
add esp, 0x28
lea eax, [ebp + 0x194]
push eax
push 0x104
lea eax, [ebp + 0x39c]
push eax
push 0x4e9b90
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x39c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ab42
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x44]
mov dword [esi + 8], 1
call fcn.00401df0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x60]
call fcn.00401df0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x7c]
call fcn.00401df0
jmp 0x40aca1
push 0x206
lea eax, [ebp - 0x72]
push ebx
push eax
mov word [ebp - 0x74], bx
call fcn.004203a0
lea eax, [ebp - 0x74]
push str.SOFTWARE_
push eax
call fcn.0042052e
lea eax, [ebp - 0x74]
push 0x4c6ac4
push eax
call fcn.00420504
add esp, 0x1c
lea eax, [ebp - 0x78]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x74]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40abfe
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp + 0x39c]
push eax
push ebx
push ebx
push str.InstallPath
push dword [ebp - 0x78]
mov dword [ebp - 0x80], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40abfe
lea eax, [ebp + 0x39c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40abfe
xor eax, eax
inc eax
mov dword [esi + 8], eax
mov dword [ebp - 0x7c], eax
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x44]
call fcn.00401df0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x60]
call fcn.00401df0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x7c]
call fcn.00401df0
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x7c], ebx
jne 0x40aca1
push ebx
push 0x26
lea eax, [ebp + 0x39c]
push eax
push ebx
mov dword [esi + 8], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp + 0x39c]
lea ecx, [esi + 0x60]
push eax
call fcn.00401df0
push edi
lea ecx, [esi + 0x60]
call fcn.00403ac0
push 0xffffffffffffffff
push ebx
lea eax, [esi + 0x28]
push eax
lea ecx, [esi + 0x60]
call fcn.00403f10
push edi
lea edi, [esi + 0x60]
mov ecx, edi
call fcn.00403ac0
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esi + 0x44]
call fcn.00402370
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esi + 0x7c]
call fcn.00402370
lea eax, [ebp + 0x194]
push eax
call fcn.004159cb
cmp dword [edi + 0x18], 8
pop ecx
jb 0x40ac86
mov edi, dword [edi + 4]
jmp 0x40ac89
add edi, 4
lea eax, [ebp + 0x194]
push eax
push edi
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov ecx, dword [ebp + 0x5a4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00420385
add ebp, 0x5a8
leave
ret