Function at 0x40870f
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 - 0xfd0]
mov eax, 0x1050
call fcn.0042c620
mov eax, dword [0x4d8668]
xor eax, ebp
mov dword [ebp + 0xfcc], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, 0x206
push esi
mov word [ebp + 0x7ac], ax
xor edi, edi
lea eax, [ebp + 0x7ae]
push edi
push eax
mov dword [ebp - 0x78], ecx
call fcn.0042bd50
xor eax, eax
push esi
mov word [ebp + 0x39c], ax
lea eax, [ebp + 0x39e]
push edi
push eax
call fcn.0042bd50
xor eax, eax
push esi
mov word [ebp + 0x5a4], ax
lea eax, [ebp + 0x5a6]
push edi
push eax
call fcn.0042bd50
xor eax, eax
push esi
mov word [ebp + 0x194], ax
lea eax, [ebp + 0x196]
push edi
push eax
call fcn.0042bd50
xor eax, eax
push esi
mov word [ebp + 0xbbc], ax
lea eax, [ebp + 0xbbe]
push edi
push eax
call fcn.0042bd50
xor eax, eax
push esi
mov word [ebp + 0xdc4], ax
lea eax, [ebp + 0xdc6]
push edi
push eax
call fcn.0042bd50
add esp, 0x48
push edi
push 0x2b
lea eax, [ebp + 0x7ac]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edi, 0x4a4e2c
lea eax, [ebp + 0x7ac]
push edi
push eax
call fcn.0042bd02
mov ebx, str.PeopleCalendar
lea eax, [ebp + 0x7ac]
push ebx
push eax
call fcn.0042bd02
lea eax, [ebp + 0x7ac]
push edi
push eax
call fcn.0042bd02
lea eax, [ebp + 0x7ac]
push ebx
push eax
call fcn.0042bd02
lea eax, [ebp + 0x7ac]
push str..ini
push eax
call fcn.0042bd02
add esp, 0x28
lea eax, [ebp + 0x7ac]
push eax
push 0x104
lea eax, [ebp + 0x39c]
push eax
push 0x4a3fc4
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x39c]
push eax
lea eax, [ebp + 0xbbc]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xbbc]
push eax
lea eax, [ebp + 0xdc4]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xdc4]
push str.1.0.1.0528
push eax
call fcn.0042bd02
lea eax, [ebp + 0xdc4]
push edi
push eax
call fcn.0042bd02
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x20
lea eax, [ebp + 0xdc4]
push eax
call ebx
test eax, eax
je 0x4088fc
xor eax, eax
push esi
push eax
mov word [ebp + 0x9b4], ax
lea eax, [ebp + 0x9b6]
push eax
call fcn.0042bd50
lea eax, [ebp + 0xdc4]
push eax
lea eax, [ebp + 0x9b4]
push eax
call fcn.0042bd30
lea eax, [ebp + 0x9b4]
push str.PeopleCalendar.exe
push eax
call fcn.0042bd02
add esp, 0x1c
lea eax, [ebp + 0x9b4]
push eax
call ebx
test eax, eax
jne 0x408bab
xor eax, eax
push esi
push eax
mov word [ebp - 0x74], ax
lea eax, [ebp - 0x72]
push eax
call fcn.0042bd50
lea eax, [ebp - 0x74]
push str.SOFTWARE_
push eax
call fcn.0042bd30
lea eax, [ebp - 0x74]
push str.PeopleCalendar
push eax
call fcn.0042bd02
add esp, 0x1c
lea eax, [ebp - 0x7c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x74]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408a56
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp + 0x194]
push eax
push 0
push 0
push str.InstallPath
push dword [ebp - 0x7c]
mov dword [ebp - 0x80], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408a56
lea eax, [ebp + 0x194]
push eax
lea eax, [ebp + 0xbbc]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xbbc]
push eax
lea eax, [ebp + 0xdc4]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xdc4]
push str.1.0.1.0528
push eax
call fcn.0042bd02
lea eax, [ebp + 0xdc4]
push edi
push eax
call fcn.0042bd02
add esp, 0x20
lea eax, [ebp + 0xdc4]
push eax
call ebx
test eax, eax
je 0x408a56
xor eax, eax
push esi
push eax
mov word [ebp + 0x9b4], ax
lea eax, [ebp + 0x9b6]
push eax
call fcn.0042bd50
lea eax, [ebp + 0xdc4]
push eax
lea eax, [ebp + 0x9b4]
push eax
call fcn.0042bd30
lea eax, [ebp + 0x9b4]
push str.PeopleCalendar.exe
push eax
call fcn.0042bd02
add esp, 0x1c
lea eax, [ebp + 0x9b4]
push eax
call ebx
test eax, eax
je 0x408a56
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x78]
lea eax, [ebp + 0xbbc]
push eax
lea ecx, [esi + 0x74]
call fcn.00401c01
lea eax, [ebp + 0xdc4]
push eax
lea ecx, [esi + 0x90]
call fcn.00401c01
mov ecx, esi
call fcn.00407be5
jmp 0x408bcf
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x26
lea eax, [ebp + 0x5a4]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp + 0x5a4]
push edi
push eax
call fcn.0042bd02
lea eax, [ebp + 0x5a4]
push str.PeopleCalendar
push eax
call fcn.0042bd02
lea eax, [ebp + 0x5a4]
push edi
push eax
call fcn.0042bd02
lea eax, [ebp + 0x5a4]
push eax
lea eax, [ebp + 0xbbc]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xbbc]
push eax
lea eax, [ebp + 0xdc4]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xdc4]
push str.1.0.1.0528
push eax
call fcn.0042bd02
lea eax, [ebp + 0xdc4]
push edi
push eax
call fcn.0042bd02
add esp, 0x38
lea eax, [ebp + 0xdc4]
push eax
call ebx
test eax, eax
je 0x408b3c
xor eax, eax
push esi
push eax
mov word [ebp + 0x9b4], ax
lea eax, [ebp + 0x9b6]
push eax
call fcn.0042bd50
lea eax, [ebp + 0xdc4]
push eax
lea eax, [ebp + 0x9b4]
push eax
call fcn.0042bd30
lea eax, [ebp + 0x9b4]
push str.PeopleCalendar.exe
push eax
call fcn.0042bd02
add esp, 0x1c
lea eax, [ebp + 0x9b4]
push eax
call ebx
test eax, eax
jne 0x408bab
lea eax, [ebp + 0x39c]
push eax
call ebx
test eax, eax
je 0x408b51
lea eax, [ebp + 0x39c]
jmp 0x408b6a
lea eax, [ebp + 0x194]
push eax
call ebx
test eax, eax
lea eax, [ebp + 0x194]
jne 0x408b6a
lea eax, [ebp + 0x5a4]
push eax
lea eax, [ebp + 0xbbc]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xbbc]
push eax
lea eax, [ebp + 0xdc4]
push eax
call fcn.0042bd30
lea eax, [ebp + 0xdc4]
push str.1.0.1.0528
push eax
call fcn.0042bd02
lea eax, [ebp + 0xdc4]
push edi
push eax
call fcn.0042bd02
add esp, 0x20
mov esi, dword [ebp - 0x78]
lea eax, [ebp + 0xbbc]
push eax
lea ecx, [esi + 0x74]
call fcn.00401c01
lea eax, [ebp + 0xdc4]
push eax
lea ecx, [esi + 0x90]
call fcn.00401c01
mov ecx, dword [ebp + 0xfcc]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042b558
add ebp, 0xfd0
leave
ret