Function at 0x401780
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xac
cmp dword [ebp + 8], 1
mov edx, dword [ebp + 0xc]
jle 0x401ab1
mov esi, edx
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
mov edi, 1
mov edx, dword [ebp + 8]
jmp 0x4017d1
test ax, ax
je 0x4017c6
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x401a20
mov dword [ebp - 0x74], ebx
add edi, 1
cmp edx, edi
je 0x401880
mov ebx, dword [esi + edi*4]
movzx eax, word [ebx]
cmp ax, 0x2f
jne 0x4017b3
mov ecx, 0x74
mov eax, str._trustlevel:
jmp 0x4017f4
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4017f0
sub eax, str._trustlevel:
mov ecx, eax
mov dword [ebp - 0x7c], eax
mov eax, ebx
sar ecx, 1
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401810
sub eax, ebx
sar eax, 1
cmp ecx, eax
ja 0x4019b6
mov dword [ebp - 0x80], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str._trustlevel:
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcsncmp]
test eax, eax
mov edx, dword [ebp - 0x80]
jne 0x4019b3
add ebx, dword [ebp - 0x7c]
je 0x4019b3
mov dword [esp + 8], 0
mov dword [esp + 4], 0
add edi, 1
mov dword [esp], ebx
mov dword [ebp - 0x7c], edx
call sym._wcstoul
mov edx, dword [ebp - 0x7c]
mov dword [ebp - 0x70], eax
cmp edx, edi
jne 0x4017d1
lea esi, [esi]
mov edx, dword [ebp - 0x74]
test edx, edx
je 0x401a20
mov eax, dword [ebp - 0x70]
test eax, 0xfffdffff
jne 0x401994
cmp eax, 0x20000
je 0x401a5c
xor esi, esi
lea ebx, [ebp - 0x5c]
xor eax, eax
mov ecx, 0x11
mov dword [ebp - 0x7c], edx
mov edi, ebx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x6c]
mov dword [esp + 0x24], ebx
mov dword [esp + 8], edx
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [ebp - 0x5c], 0x44
call sym._CreateProcessAsUserW_44
sub esp, 0x2c
test eax, eax
mov ebx, eax
mov edx, dword [ebp - 0x7c]
jne 0x401a3b
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
lea eax, [ebp - 0x78]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0
mov dword [esp + 8], edi
mov dword [esp], 0x1300
mov dword [ebp - 0x7c], edx
call sym._FormatMessageW_28
sub esp, 0x1c
test eax, eax
mov edx, dword [ebp - 0x7c]
jne 0x401ac9
test byte [section..data], 1
jne 0x401af7
test esi, esi
je 0x4019a9
mov dword [esp], esi
call sym._CloseHandle_4
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], eax
mov dword [esp], 0x66
mov ebx, 1
call dbg.output_message
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esi + edi*4]
mov dword [esp + 4], str._showtrustlevels
mov dword [esp], ebx
mov dword [ebp - 0x7c], edx
call sym._lstrcmpW_8
sub esp, 8
test eax, eax
mov edx, dword [ebp - 0x7c]
je 0x401b24
test byte [section..data], 1
je 0x4017c6
mov eax, dword [esi + edi*4]
mov dword [ebp - 0x7c], edx
call sym._wine_dbgstr_wn.constprop.1
mov dword [esp + 0xc], str.Ignoring_parameter__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x4040f4
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.2
mov edx, dword [ebp - 0x7c]
jmp 0x4017c6
mov dword [esp], 0x65
mov ebx, 1
call dbg.output_message
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._CloseHandle_4
mov eax, dword [ebp - 0x68]
sub esp, 4
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
jmp 0x40197b
mov dword [esp], 0
mov dword [ebp - 0x7c], edx
call sym.___wine_create_default_token
test eax, eax
mov esi, eax
mov edx, dword [ebp - 0x7c]
jne 0x4018a6
test byte [section..data], 2
je 0x4018a4
mov dword [esp + 0xc], str.Failed_to_create_limited_token_n
mov dword [esp + 8], str.start_process
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.2
mov edx, dword [ebp - 0x7c]
jmp 0x4018a6
mov dword [esp], 0x65
xor ebx, ebx
call dbg.output_message
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x78]
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov dword [esp], 0x68
mov dword [esp + 0xc], eax
call dbg.output_message
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sym._LocalFree_4
sub esp, 4
jmp 0x40197b
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.Failed_to_format_error:__u_n
mov dword [esp + 8], str.start_process
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.2
jmp 0x40197b
mov dword [esp], 0x67
call dbg.output_message
mov dword [esp], 0
call sym._ExitProcess_4
nop
nop
nop
nop