Function at 0x40aa43
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 [0x50db70]
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.004221d0
push edi
lea eax, [ebp + 0x39e]
push ebx
push eax
mov word [ebp + 0x39c], bx
call fcn.004221d0
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, 0x4eaef0
lea eax, [ebp + 0x194]
push edi
push eax
call fcn.00422334
lea eax, [ebp + 0x194]
push 0x4c7ad4
push eax
call fcn.00422334
lea eax, [ebp + 0x194]
push edi
push eax
call fcn.00422334
lea eax, [ebp + 0x194]
push str.DongFang
push eax
call fcn.00422334
lea eax, [ebp + 0x194]
push str..ini
push eax
call fcn.00422334
add esp, 0x28
lea eax, [ebp + 0x194]
push eax
push 0x104
lea eax, [ebp + 0x39c]
push eax
push 0x4eaf10
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 0x40ab72
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 0x40acd1
push 0x206
lea eax, [ebp - 0x72]
push ebx
push eax
mov word [ebp - 0x74], bx
call fcn.004221d0
lea eax, [ebp - 0x74]
push str.SOFTWARE_
push eax
call fcn.0042235e
lea eax, [ebp - 0x74]
push 0x4c7ad4
push eax
call fcn.00422334
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 0x40ac2e
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 0x40ac2e
lea eax, [ebp + 0x39c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ac2e
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 0x40acd1
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.00403af0
push 0xffffffffffffffff
push ebx
lea eax, [esi + 0x28]
push eax
lea ecx, [esi + 0x60]
call fcn.00403f40
push edi
lea edi, [esi + 0x60]
mov ecx, edi
call fcn.00403af0
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esi + 0x44]
call fcn.004023a0
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esi + 0x7c]
call fcn.004023a0
lea eax, [ebp + 0x194]
push eax
call fcn.00417304
cmp dword [edi + 0x18], 8
pop ecx
jb 0x40acb6
mov edi, dword [edi + 4]
jmp 0x40acb9
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.004221b5
add ebp, 0x5a8
leave
ret