Function at 0x40aac4
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 [0x507a30]
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.0041d6a0
push edi
lea eax, [ebp + 0x39e]
push ebx
push eax
mov word [ebp + 0x39c], bx
call fcn.0041d6a0
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, 0x4e58a0
lea eax, [ebp + 0x194]
push edi
push eax
call fcn.0041d804
lea eax, [ebp + 0x194]
push 0x4c2ad4
push eax
call fcn.0041d804
lea eax, [ebp + 0x194]
push edi
push eax
call fcn.0041d804
lea eax, [ebp + 0x194]
push str.JiPin
push eax
call fcn.0041d804
lea eax, [ebp + 0x194]
push str..ini
push eax
call fcn.0041d804
add esp, 0x28
lea eax, [ebp + 0x194]
push eax
push 0x104
lea eax, [ebp + 0x39c]
push eax
push 0x4e58c0
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 0x40abf3
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x3c]
mov dword [esi + 8], 1
call fcn.004039b0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x58]
call fcn.004039b0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x74]
call fcn.004039b0
jmp 0x40ad52
push 0x206
lea eax, [ebp - 0x72]
push ebx
push eax
mov word [ebp - 0x74], bx
call fcn.0041d6a0
lea eax, [ebp - 0x74]
push str.SOFTWARE_
push eax
call fcn.0041d82e
lea eax, [ebp - 0x74]
push 0x4c2ad4
push eax
call fcn.0041d804
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 0x40acaf
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 0x40acaf
lea eax, [ebp + 0x39c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40acaf
xor eax, eax
inc eax
mov dword [esi + 8], eax
mov dword [ebp - 0x7c], eax
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x3c]
call fcn.004039b0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x58]
call fcn.004039b0
lea eax, [ebp + 0x39c]
push eax
lea ecx, [esi + 0x74]
call fcn.004039b0
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x7c], ebx
jne 0x40ad52
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 + 0x58]
push eax
call fcn.004039b0
push edi
lea ecx, [esi + 0x58]
call fcn.00403ac0
push 0xffffffffffffffff
push ebx
lea eax, [esi + 0x20]
push eax
lea ecx, [esi + 0x58]
call fcn.00403f10
push edi
lea edi, [esi + 0x58]
mov ecx, edi
call fcn.00403ac0
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esi + 0x3c]
call fcn.00402340
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esi + 0x74]
call fcn.00402340
lea eax, [ebp + 0x194]
push eax
call fcn.004134ee
cmp dword [edi + 0x18], 8
pop ecx
jb 0x40ad37
mov edi, dword [edi + 4]
jmp 0x40ad3a
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.0041d685
add ebp, 0x5a8
leave
ret