Function at 0x407410
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc78
mov eax, dword [0x5ef220]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor eax, eax
mov ebx, ecx
push 0x206
push eax
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push eax
mov dword [ebp - 0xc38], ebx
call fcn.0055c960
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0055c960
add esp, 0x18
lea eax, [ebp - 0x20c]
mov ecx, ebx
push eax
call fcn.00402a30
mov esi, dword [sym.imp.SHLWAPI.dll_StrCatW]
lea eax, [ebp - 0x20c]
push str.Config.ini
push eax
call esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00558864
add esp, 0xc
lea eax, [ebp - 0x824]
push eax
push 0
push str.substFlag
push str.action_first
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
jle 0x40779f
push edi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x414]
push eax
call ebx
push str.subst.exe
lea eax, [ebp - 0x414]
push eax
call esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x414]
push eax
call edi
test eax, eax
jne 0x40754e
mov ecx, dword [ebp - 0xc38]
lea eax, [ebp - 0x414]
push eax
call fcn.00402a30
lea eax, [ebp - 0x414]
push eax
call ebx
push str.subst.exe
lea eax, [ebp - 0x414]
push eax
call esi
push 0x3c
lea eax, [ebp - 0xc78]
push 0
push eax
call fcn.0055c960
mov ebx, dword [sym.imp.SHELL32.dll_ShellExecuteExW]
lea eax, [ebp - 0x414]
add esp, 0xc
mov dword [ebp - 0xc78], 0x3c
mov dword [ebp - 0xc74], 0x40
mov esi, 0x43
mov dword [ebp - 0xc70], 0
mov dword [ebp - 0xc6c], 0
mov dword [ebp - 0xc68], eax
mov dword [ebp - 0xc60], 0
mov dword [ebp - 0xc5c], 0
mov dword [ebp - 0xc58], 0
mov edi, edi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.0055c960
push esi
lea eax, [ebp - 0x61c]
push str._c:__D
push eax
call fcn.0040e0a0
add esp, 0x18
lea eax, [ebp - 0x61c]
mov dword [ebp - 0xc64], eax
lea eax, [ebp - 0xc78]
push eax
call ebx
push 0xffffffffffffffff
push dword [ebp - 0xc40]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc esi
cmp esi, 0x5a
jle 0x4075c0
call fcn.00403830
mov esi, eax
mov dword [ebp - 0xc3c], esi
test esi, esi
jle 0x4076be
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.0055c960
mov eax, dword [ebp - 0xc38]
add eax, 4
push eax
lea eax, [ebp - 0x61c]
push 0x104
push eax
call fcn.00558864
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xc34], ax
lea eax, [ebp - 0xc32]
push eax
call fcn.0055c960
lea eax, [ebp - 0x61c]
push eax
push esi
lea eax, [ebp - 0xc34]
push str._c:___s_
push eax
call fcn.0040e0a0
add esp, 0x34
lea eax, [ebp - 0xc34]
mov dword [ebp - 0xc64], eax
lea eax, [ebp - 0xc78]
push eax
call ebx
push 0xffffffffffffffff
push dword [ebp - 0xc40]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
xor esi, esi
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0055c960
push dword [ebp - 0xc3c]
lea eax, [ebp - 0x20c]
push str._c:CheckExist.rungame
push eax
call fcn.0040e0a0
add esp, 0x18
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x407741
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp esi, 0x28
jae 0x407741
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
lea eax, [ebp - 0x20c]
inc esi
push eax
call ebx
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x407708
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xa2c], ax
lea eax, [ebp - 0xa2a]
push eax
call fcn.0055c960
push dword [ebp - 0xc3c]
lea eax, [ebp - 0xa2c]
push 0x5c4374
push eax
call fcn.0040e0a0
lea eax, [ebp - 0xa2c]
push eax
mov eax, dword [ebp - 0xc38]
add eax, 4
push 0x104
push eax
call fcn.00558864
add esp, 0x24
pop edi
mov ecx, dword [ebp - 4]
mov al, 1
pop esi
xor ecx, ebp
pop ebx
call fcn.00557f7f
mov esp, ebp
pop ebp
ret