Function at 0x40aa40
Capabilities:
Create thread

Disassembly:
mov eax, 0x50b8
call fcn.0040dab0
mov eax, 0x2000
mov word [esp + 0x10b0], ax
mov word [esp + 0x30b4], ax
call sym.ptapdl.exe__string_cmline_init_0
mov eax, dword [esp + 0x50c0]
mov ecx, dword [esp + 0x50bc]
push eax
push ecx
lea edx, [esp + 0x10b8]
push edx
call sym.ptapdl.exe__string_vstring_12
cmp word [esp + 0x10b2], 0
jne 0x40aad0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x10b4]
push ecx
call sym.ptapdl.exe__string_cmline_token_8
lea edx, [esp]
push edx
lea eax, [esp + 0x40]
push eax
mov dword [esp + 8], 1
call sym.ptapdl.exe__sys_msg_parm_int_8
push 1
lea ecx, [esp + 0x40]
push ecx
push str.cmline_arg_error
push 0x420294
lea edx, [esp + 0x58]
push edx
call sym.ptapdl.exe__sys_error_abort_20
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x30b8]
push ecx
call sym.ptapdl.exe__string_cmline_token_8
lea edx, [esp + 0x48]
push edx
call sym.ptapdl.exe__string_eos_4
test al, al
jne 0x40ab40
push 0
push 0x4288cc
push str.cmline_opt_err
push 0x420294
lea eax, [esp + 0x58]
push eax
call sym.ptapdl.exe__sys_error_abort_20
lea ecx, [esp + 0x30b4]
push ecx
lea edx, [esp + 0x10b4]
push edx
call fcn.0040adb0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x30b8]
push ecx
call sym.ptapdl.exe__string_cmline_token_8
lea edx, [esp + 0x48]
push edx
call sym.ptapdl.exe__string_eos_4
test al, al
je 0x40aaf0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x3c]
push ecx
push 2
lea edx, [esp + 0x10c8]
push edx
call sym.ptapdl.exe__sys_run_28
lea eax, [esp + 0x10b0]
push eax
lea ecx, [esp + 0x40]
push ecx
call sym.ptapdl.exe__sys_msg_parm_vstr_8
push 1
lea edx, [esp + 0x40]
push edx
push str.run_talk
push 0x420384
lea eax, [esp + 0x58]
push eax
call sym.ptapdl.exe__sys_error_abort_20
mov ecx, dword [0x420424]
push ecx
call sub.KERNEL32.dll_GetStdHandle
mov edx, dword [0x420428]
push edx
mov dword [esp + 0x2c], eax
call sub.KERNEL32.dll_GetStdHandle
mov dword [esp + 0xc], eax
mov eax, dword [0x42042c]
push eax
call sub.KERNEL32.dll_GetStdHandle
lea ecx, [esp + 4]
push ecx
mov ecx, dword [0x4288d0]
push 0
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x2c], eax
mov eax, dword [0x4288d4]
push 0x40ad00
push eax
push ecx
call sub.KERNEL32.dll_CreateThread
mov ecx, dword [0x4288d4]
lea edx, [esp + 4]
push edx
mov edx, dword [0x4288d0]
push 0
mov dword [esp + 0x38], eax
lea eax, [esp + 0x10]
push eax
push 0x40ad00
push ecx
push edx
call sub.KERNEL32.dll_CreateThread
mov edx, dword [0x4288d4]
mov dword [esp + 0x10], eax
lea eax, [esp + 4]
push eax
mov eax, dword [0x4288d0]
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x40ad00
push edx
push eax
call sub.KERNEL32.dll_CreateThread
mov edx, dword [esp + 0x10]
xor ecx, ecx
test edx, edx
mov dword [esp + 0x24], eax
mov dword [esp], ecx
je 0x40ac55
mov ecx, 1
mov dword [esp], ecx
mov dword [esp + 0x34], edx
test eax, eax
je 0x40ac62
inc ecx
mov dword [esp], ecx
mov dword [esp + ecx*4 + 0x30], eax
test ecx, ecx
jle 0x40ac7a
mov edx, dword [0x420430]
push edx
push 1
lea eax, [esp + 0x3c]
push eax
push ecx
call sub.KERNEL32.dll_WaitForMultipleObjects
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x18]
push edx
push 1
push eax
call sym.ptapdl.exe__sys_proc_status_16
mov ecx, dword [esp + 0x30]
push ecx
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [esp + 0x10]
push edx
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [esp + 0x24]
push eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [esp + 0x14]
add esp, 0x50b8
ret 8