Function at 0x402750
Capabilities:
Create process on windows
Delete directory
Get common file path
Set current directory
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x364
mov eax, dword [0x40e28c]
push ebx
mov dword [esp + 0x364], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov dword [0x40f6d4], eax
call fcn.00402110
test al, al
jne 0x402793
xor eax, eax
mov ecx, dword [esp + 0x36c]
call fcn.00403b0f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.00402060
cmp eax, 2
je 0x4027a6
cmp eax, 0xffffffff
jne 0x402959
lea ecx, [esp + 0x168]
push ecx
cmp eax, 0xffffffff
push 0x100
sete bl
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor eax, eax
mov cl, byte [esp + eax + 0x168]
mov byte [esp + eax + 0x68], cl
inc eax
test cl, cl
jne 0x4027c1
lea edi, [esp + 0x68]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4027d6
mov edx, dword [str.game]
mov ax, word [0x40c5c0]
mov dword [edi], edx
mov word [edi + 4], ax
mov dword [0x40eec4], 0
call fcn.004015b0
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call fcn.00401060
call dword [sym.imp.WINMM.dll_timeGetTime]
lea edx, [esp + 0x268]
push edx
push 0x100
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor eax, eax
test bl, bl
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov ecx, 0x11
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 0x44
jne 0x402874
push 0
push 0x40f9f8
call fcn.00403e55
add esp, 8
test eax, eax
jne 0x402874
push eax
push 0x40f9f8
call fcn.00401cd0
add esp, 8
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea edx, [esp + 0x68]
push edx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test bl, bl
jne 0x40289c
mov eax, dword [0x40f058]
test eax, eax
je 0x4028c6
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x70]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0x40f7e0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test bl, bl
jne 0x4028e6
mov eax, dword [0x40f058]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x10]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x4028f3
mov eax, dword [esp + 0x10]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x40f7e0
call fcn.0040b45e
add esp, 4
push 0x40f8e8
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x40f058]
sub eax, esi
sub ecx, eax
mov dword [0x40f058], ecx
mov dword [0x40eec4], ecx
call fcn.004015b0
call fcn.00401630
call fcn.00402060
cmp eax, 0xffffffff
sete bl
cmp eax, 0xffffffff
je 0x4027f0
cmp eax, 2
je 0x4027f0
lea ecx, [esp + 0x168]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [0x40f9ec]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.00402a10
push 0x4101f8
call fcn.00403e50
push 0x40fff8
call fcn.00403e50
push 0x40fdf8
call fcn.00403e50
push 0x40fbf8
call fcn.00403e50
push 0x40f9f8
call fcn.00403e50
mov ecx, dword [esp + 0x380]
add esp, 0x14
mov eax, 1
call fcn.00403b0f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10