Function at 0x404880
Capabilities:
Check if file exists
Create process on windows
Create thread
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x4a4300]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x63
lea eax, [ebp - 0xd7]
mov dword [ebp - 0x7e4], ecx
push 0
push eax
mov byte [ebp - 0xd8], 0
call fcn.004523e0
add esp, 0xc
mov byte [ebp - 0x70], 0
lea eax, [ebp - 0x6f]
push 0x63
push 0
push eax
call fcn.004523e0
add esp, 0xc
mov byte [ebp - 0x330], 0
lea eax, [ebp - 0x32f]
push 0x257
push 0
push eax
call fcn.004523e0
add esp, 0xc
mov byte [ebp - 0x588], 0
lea eax, [ebp - 0x587]
push 0x257
push 0
push eax
call fcn.004523e0
add esp, 0xc
lea ecx, [ebp - 0xd8]
call fcn.00403be0
test eax, eax
je 0x404d1b
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x330]
push 0x4a8890
push 0x258
push eax
push 0
push str.GameX
push str.PATH
call esi
test eax, eax
je 0x4049be
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
jne 0x4049be
lea edx, [ebp - 0x70]
lea ecx, [ebp - 0x330]
call fcn.004024a0
cmp eax, 1
jne 0x4049c8
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xd8]
push eax
call fcn.00457453
add esp, 8
test eax, eax
jne 0x4049c8
lea ecx, [ebp - 0x330]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404984
sub ecx, edx
lea eax, [ebp - 0x330]
push ecx
push eax
lea eax, [ebp - 0x588]
push eax
call fcn.00451d90
add esp, 0xc
lea eax, [ebp - 0x588]
push 0x5c
push eax
call fcn.004578c0
add esp, 8
test eax, eax
je 0x4049c8
mov byte [eax], 0
jmp 0x4049c8
mov dword [ebp - 0x7e4], 1
lea ecx, [ebp - 0x588]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4049d1
sub ecx, edx
jne 0x404b92
call fcn.00403e70
call fcn.00403a70
push 0x4a8890
push 0x258
cmp eax, 1
lea eax, [ebp - 0x588]
push eax
push 0
jne 0x404a09
push str.Start
jmp 0x404a0e
push str.Game
push str.PATH
call esi
test eax, eax
je 0x404d1b
push 0x258
lea eax, [ebp - 0x330]
push 0
push eax
call fcn.004523e0
lea edx, [ebp - 0x588]
add esp, 0xc
mov esi, edx
jmp 0x404a40
mov al, byte [edx]
inc edx
test al, al
jne 0x404a40
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404a50
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x330]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404a70
mov ax, word [0x482998]
mov edx, 0x6b0810
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x404a90
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404aa0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x6b0874
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404ac0
sub ecx, edx
je 0x404b16
lea edi, [ebp - 0x330]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404ad2
mov ax, word [0x482a18]
mov edx, 0x6b0874
mov word [edi], ax
mov esi, edx
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x404af0
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404b00
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x404d1b
push 0x64
lea eax, [ebp - 0x70]
push 0
push eax
call fcn.004523e0
add esp, 0xc
lea edx, [ebp - 0x70]
lea ecx, [ebp - 0x330]
call fcn.004024a0
test eax, eax
je 0x404d1b
push 0x64
lea eax, [ebp - 0xd8]
push 0
push eax
call fcn.004523e0
add esp, 0xc
lea ecx, [ebp - 0xd8]
call fcn.00403be0
test eax, eax
je 0x404d1b
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xd8]
push eax
call fcn.00457453
add esp, 8
test eax, eax
jne 0x404d1b
push 0x40
lea eax, [ebp - 0x82c]
push 0
push eax
call fcn.004523e0
add esp, 0xc
mov dword [ebp - 0x830], 0x44
mov eax, 1
mov dword [ebp - 0x804], 0
mov word [ebp - 0x800], ax
lea eax, [ebp - 0x7df]
mov byte [ebp - 0x7e0], 0
push 0x257
push 0
push eax
call fcn.004523e0
lea edi, [ebp - 0x7e0]
add esp, 0xc
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404bf0
mov ax, word [0x482934]
lea edx, [ebp - 0x330]
mov word [edi], ax
mov esi, edx
jmp 0x404c10
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x404c10
lea edi, [ebp - 0x7e0]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404c20
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x7e0]
dec edi
lea ecx, [ecx]
mov cl, byte [edi + 1]
lea edi, [edi + 1]
test cl, cl
jne 0x404c40
mov word [edi], ax
lea esi, [ebp - 0x330]
lea eax, [ebp - 0x840]
mov ecx, 0x96
push eax
lea eax, [ebp - 0x830]
mov edi, 0x4ab4a0
push eax
lea eax, [ebp - 0x588]
xorps xmm0, xmm0
push eax
push 0
push 0x10
push 0
push 0
push 0
lea eax, [ebp - 0x7e0]
push eax
rep movsd dword es:[edi], dword [esi]
push 0
movdqu xmmword [ebp - 0x840], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x404d1b
mov eax, dword [ebp - 0x83c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x404cb9
push eax
call esi
mov dword [ebp - 0x83c], 0
cmp dword [ebp - 0x7e4], 1
jne 0x404d0e
lea eax, [ebp - 0x7e4]
mov dword [ebp - 0x7e4], 0
push eax
push 0
push 0
push 0x4043e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x404ced
push eax
call esi
mov edx, dword [ebp - 0x838]
mov ecx, dword [ebp - 0x840]
call fcn.00404800
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004516e1
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x840]
test eax, eax
je 0x404d1b
push eax
call esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004516e1
mov esp, ebp
pop ebp
ret