Function at 0x41d310
Capabilities:
Create pipe
Create process on windows
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x3168
call fcn.004054e0
push ebx
push ebp
mov ebp, dword [esp + 0x318c]
mov eax, 0x10
push esi
push edi
mov word [esp + 0x8c], ax
mov eax, 0x50
push ebp
mov word [esp + 0xc0], ax
call sym.test_embusb.exe__sys_error_none_4
push 0x2000
lea eax, [esp + 0x117c]
xor esi, esi
push eax
push dword [esp + 0x3184]
call sym.test_embusb.exe__string_t_c_12
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp + 0x10], eax
lea eax, [esp + 0x110]
push eax
lea eax, [esp + 0xc0]
push eax
push 0x42f668
call sym.test_embusb.exe__sys_envvar_get_12
lea eax, [esp + 0x110]
push eax
lea ebx, [esi + 5]
call sym.test_embusb.exe__sys_error_4
test al, al
jne 0x41d413
lea eax, [esp + 0x110]
mov dword [esp + 0x1c], 1
push eax
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0xc8]
push eax
call sym.test_embusb.exe__string_token_16
lea eax, [esp + 0x110]
push eax
call sym.test_embusb.exe__sys_error_4
test al, al
jne 0x41d413
lea eax, [esp + 0x8c]
push eax
call sym.test_embusb.exe__string_upcase_4
lea eax, [esp + 0x20]
push eax
push str.LOW_NORMAL_HIGH
lea eax, [esp + 0x94]
push eax
call sym.test_embusb.exe__string_tkpick80_12
mov eax, dword [esp + 0x20]
sub eax, 1
je 0x41d40e
sub eax, 1
je 0x41d413
sub eax, 1
jne 0x41d413
lea ebx, [esi + 7]
jmp 0x41d413
mov ebx, 6
mov eax, 1
mov dword [esp + 0x28], 0x44
mov edi, eax
mov dword [esp + 0x58], eax
movzx eax, byte [esp + 0x3180]
mov ecx, ebx
shl edi, cl
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], 0x50
mov dword [esp + 0x4c], 0x14
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], esi
mov byte [esp + 0x18], 0
cmp eax, 3
ja case.default.0x41d484
jmp dword [eax*4 + 0x41d710]
or edi, 8
jmp 0x41d695
lea eax, [esp + 0x10]
push eax
push dword [0x42f694]
call sub.KERNEL32.dll_GetStdHandle
push eax
call fcn.0041d960
mov dword [esp + 0x60], eax
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x10]
push eax
push dword [0x42f6e8]
call sub.KERNEL32.dll_GetStdHandle
push eax
call fcn.0041d960
mov dword [esp + 0x64], eax
mov dword [esp + 0x70], eax
lea eax, [esp + 0x10]
push eax
push dword [0x42f6ec]
call sub.KERNEL32.dll_GetStdHandle
push eax
call fcn.0041d960
or dword [esp + 0x54], 0x100
mov esi, 3
mov dword [esp + 0x68], eax
mov dword [esp + 0x74], eax
mov byte [esp + 0x18], 1
jmp 0x41d695
push dword [0x431ee8]
lea eax, [esp + 0x18]
push dword [0x431ee4]
push dword [esp + 0x318c]
push eax
call sub.KERNEL32.dll_CreatePipe
test al, al
je 0x41d6c5
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x18]
call fcn.0041d960
mov dword [esp + 0x60], eax
test eax, eax
je 0x41d6c5
push dword [0x431ee8]
mov dword [esp + 0x70], eax
mov esi, 2
mov eax, dword [esp + 0x18]
push dword [0x431ee4]
mov dword [esp + 0x78], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x3194]
call sub.KERNEL32.dll_CreatePipe
test al, al
je 0x41d6c5
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x18]
call fcn.0041d960
mov dword [esp + 0x64], eax
test eax, eax
je 0x41d6c5
push dword [0x431ee8]
mov dword [esp + 0x78], eax
mov esi, 4
mov eax, dword [esp + 0x18]
push dword [0x431ee4]
mov dword [esp + 0x80], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x3198]
call sub.KERNEL32.dll_CreatePipe
test al, al
je 0x41d6c5
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x18]
call fcn.0041d960
mov dword [esp + 0x68], eax
test eax, eax
je 0x41d6c5
or dword [esp + 0x54], 0x100
mov esi, 6
mov dword [esp + 0x7c], eax
or edi, 8
mov eax, dword [esp + 0x14]
mov dword [esp + 0x80], eax
mov byte [esp + 0x18], 1
jmp 0x41d695
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x3188]
push dword [eax]
call fcn.0041d960
mov dword [esp + 0x60], eax
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x318c]
push dword [eax]
call fcn.0041d960
mov dword [esp + 0x64], eax
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x3190]
push dword [eax]
call fcn.0041d960
or dword [esp + 0x54], 0x100
or edi, 8
mov dword [esp + 0x68], eax
mov byte [esp + 0x18], 1
jmp 0x41d695
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0xb4]
push eax
call sym.test_embusb.exe__sys_msg_parm_int_8
push 1
lea eax, [esp + 0xb4]
push eax
push str.proc_stdio_method_unknown
push 0x42f6f0
call sym.test_embusb.exe__sys_message_bomb_16
lea eax, [esp + 0xa0]
push eax
lea eax, [esp + 0x2c]
push eax
mov eax, dword [0x431ee4]
push 0
push 0
push edi
push dword [esp + 0x2c]
push eax
push eax
lea eax, [esp + 0x1198]
push eax
push 0
call sub.KERNEL32.dll_CreateProcessA
test al, al
jne 0x41d6cf
call sub.KERNEL32.dll_GetLastError
mov dword [ebp + 0xc], eax
jmp 0x41d6eb
mov ecx, dword [esp + 0x3190]
mov eax, dword [esp + 0xa0]
push dword [esp + 0xa4]
mov dword [ecx], eax
call fcn.00405e0a
test esi, esi
je 0x41d702
lea edi, [esp + esi*4 + 0x68]
push dword [edi]
call fcn.00405e0a
dec esi
lea edi, [edi - 4]
test esi, esi
jg 0x41d6f3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3168
ret 0x1c