Function at 0x401f10
Capabilities:
Create process on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
xor eax, eax
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x258]
push ebx
push ecx
sub esp, 0x2b8
mov esi, dword [ecx + 8]
mov ecx, 0x10
mov dword [ebp - 0x25c], 0x44
rep stosd dword es:[edi], eax
mov eax, 0x403068
cmp word [esi], 0
mov dword [esp + 0x1c], 0
cmove esi, eax
lea eax, [ebp - 0x280]
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x25c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x4021e0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x288], eax
test byte [0x403024], 4
jne 0x402000
call dword [sym.imp.kernel32.dll_FreeConsole]
call dword [sym.imp.kernel32.dll_AllocConsole]
test eax, eax
jne 0x402030
mov ebx, 1
test byte [0x403024], 2
jne 0x402248
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.CreateProcess__ls_failed:__lu_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x403024
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401fc7
mov ebx, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.CONIN_
call ebx
sub esp, 0x1c
mov dword [ebp - 0x28c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.CONOUT_
call ebx
lea ebx, [ebp - 0x218]
sub esp, 0x1c
mov dword [ebp - 0x294], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], 0x100
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x304
mov dword [esp], eax
call dword [0x4061d8]
mov edx, dword [sym.imp.ucrtbase.dll_wcslen]
sub esp, 0x10
mov dword [ebp - 0x290], edx
mov dword [esp], ebx
call edx
mov edx, dword [ebp - 0x290]
mov dword [esp], esi
mov edi, eax
call edx
lea edx, [edi + eax]
lea eax, [edx + edx]
mov dword [ebp - 0x284], edx
mov dword [ebp - 0x298], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x4021c4
mov edx, dword [ebp - 0x298]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x284]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._swprintf
mov dword [esp], edi
mov edx, dword [ebp - 0x290]
call edx
mov dword [esp + 4], edi
lea edi, [ebp - 0x270]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x294]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteConsoleW]
mov esi, dword [sym.imp.kernel32.dll_ReadConsoleInputW]
sub esp, 0x14
jmp 0x4021a2
cmp word [ebp - 0x270], 2
jne 0x4021c4
mov eax, dword [ebp - 0x28c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], eax
call esi
sub esp, 0x10
test eax, eax
jne 0x402198
mov ebx, dword [ebp - 0x288]
lea esp, [ebp - 0x10]
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov eax, dword [ebp - 0x27c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x280]
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
lea eax, [ebp - 0x288]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x280]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
sub esp, 8
test eax, eax
jne 0x4021c4
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
lea esp, [ebp - 0x10]
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_allocate_console:__lu_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403024
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10