Function at 0x401ed0
Capabilities:
Create process on windows
Query environment variable
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x318
mov eax, dword [esp + 0x324]
push ebx
push esi
push eax
call fcn.00401b40
mov eax, dword [esp + 0x328]
mov esi, 0x30
mov edx, 8
mov ecx, 0x66
xor ebx, ebx
push str.Launch
push 0x410ff8
mov dword [0x410fe8], eax
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], 0x67
mov dword [esp + 0x68], ecx
mov dword [esp + 0x70], 0x401510
mov dword [esp + 0x6c], 0x4103d4
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], 0x65
mov dword [esp + 0x98], ecx
mov dword [esp + 0xa0], 0x4015e0
mov dword [esp + 0x9c], 0x4103cc
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xb8], esi
mov dword [esp + 0xbc], edx
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], 0x6a
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xd0], 0x401760
mov dword [esp + 0xcc], 0x4103c0
mov dword [esp + 0xd4], ebx
mov dword [esp + 0xd8], ebx
mov dword [esp + 0x24], 0x34
mov dword [esp + 0x28], 0x188
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ebx
call fcn.0040ae90
add esp, 0xc
mov dword [esp + 0x2c], 0x4103b8
test eax, eax
je 0x40200a
mov dword [esp + 0x2c], 0x4103a0
lea ecx, [esp + 0x4c]
push str.Launch
push 0x410ff8
mov dword [esp + 0x38], 3
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0x401870
call fcn.0040ae90
mov esi, eax
mov al, byte [0x40f618]
add esp, 8
neg esi
sbb esi, esi
inc esi
cmp al, bl
jne 0x40204c
cmp esi, ebx
jne 0x40205f
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.COMCTL32.dll_PropertySheetA]
test eax, eax
je 0x402190
call fcn.00401bf0
cmp esi, ebx
je 0x402190
xor eax, eax
push ebp
mov dword [esp + 0xc], eax
push edi
mov dword [esp + 0x14], eax
mov ecx, 0x11
mov dword [esp + 0x18], eax
lea edi, [esp + 0xe4]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x128]
push 0x100
push ecx
push ebx
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edi, [esp + 0x128]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
dec ecx
js 0x4020cd
mov al, 0x5c
cmp byte [esp + ecx + 0x128], al
je 0x4020c6
dec ecx
jns 0x4020b8
jmp 0x4020cd
mov byte [esp + ecx + 0x129], bl
mov edi, str.Game3D_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x128]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0xff
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [0x411078]
mov ecx, ebp
and ecx, 3
mov byte [esp + 0x22c], al
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x22d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x22c]
push ecx
push str.Executable
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
pop edi
pop ebp
test eax, eax
je 0x402190
lea edx, [esp + 8]
lea eax, [esp + 0xdc]
push edx
lea ecx, [esp + 0x124]
push eax
push ecx
push ebx
push 0x20
push ebx
push ebx
lea edx, [esp + 0x23c]
push ebx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp eax, ebx
je 0x40217c
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
push 0xffffffffffffffff
push eax
call esi
test eax, eax
jne 0x40216f
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 8]
push edx
call esi
pop esi
xor eax, eax
pop ebx
add esp, 0x318
ret 0x10