Function at 0x404c10
Capabilities:
Create thread

Disassembly:
mov eax, 0x50b8
call fcn.00406cc0
mov eax, 0x2000
mov word [esp + 0x10b0], ax
mov word [esp + 0x30b4], ax
call sym.test_usbprog.exe__string_cmline_init_0
push dword [esp + 0x50c0]
lea eax, [esp + 0x10b4]
push dword [esp + 0x50c0]
push eax
call sym.test_usbprog.exe__string_vstring_12
cmp word [esp + 0x10b2], 0
jne 0x404c9c
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x10b4]
push eax
call sym.test_usbprog.exe__string_cmline_token_8
lea eax, [esp]
mov dword [esp], 1
push eax
lea eax, [esp + 0x40]
push eax
call sym.test_usbprog.exe__sys_msg_parm_int_8
push 1
lea eax, [esp + 0x40]
push eax
push str.cmline_arg_error
push 0x433368
lea eax, [esp + 0x58]
push eax
call sym.test_usbprog.exe__sys_error_abort_20
push esi
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x30bc]
push eax
call sym.test_usbprog.exe__string_cmline_token_8
lea eax, [esp + 0x4c]
push eax
call sym.test_usbprog.exe__string_eos_4
test al, al
jne 0x404d8d
push edi
push 0
push 0x4377e4
push str.cmline_opt_err
push 0x433368
lea eax, [esp + 0x60]
push eax
call sym.test_usbprog.exe__sys_error_abort_20
push 0x20
lea eax, [esp + 0x10bc]
push eax
call sym.test_usbprog.exe__string_append1_8
mov cx, word [esp + 0x30be]
test cx, cx
jg 0x404d15
movzx eax, word [0x433510]
push eax
push 0x43350c
lea eax, [esp + 0x10c0]
push eax
call sym.test_usbprog.exe__string_appendn_12
jmp 0x404d68
cmp cx, 2
jl 0x404d32
cmp byte [esp + 0x30c0], 0x22
jne 0x404d32
movsx eax, cx
cmp byte [esp + eax + 0x30bf], 0x22
je 0x404d53
mov eax, 1
movsx ecx, cx
cmp ecx, eax
jl 0x404d53
nop
cmp byte [esp + eax + 0x30bf], 0x20
je 0x404f05
inc eax
cmp eax, ecx
jle 0x404d40
lea eax, [esp + 0x30bc]
push eax
lea eax, [esp + 0x10bc]
push eax
call sym.test_usbprog.exe__string_append_8
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x30c0]
push eax
call sym.test_usbprog.exe__string_cmline_token_8
lea eax, [esp + 0x50]
push eax
call sym.test_usbprog.exe__string_eos_4
test al, al
je 0x404cc2
pop edi
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x34]
push eax
push 2
lea eax, [esp + 0x10cc]
push eax
call sym.test_usbprog.exe__sys_run_28
lea eax, [esp + 0x10b4]
push eax
lea eax, [esp + 0x44]
push eax
call sym.test_usbprog.exe__sys_msg_parm_vstr_8
push 1
lea eax, [esp + 0x44]
push eax
push str.run_talk
push 0x433458
lea eax, [esp + 0x5c]
push eax
call sym.test_usbprog.exe__sys_error_abort_20
push dword [0x4334f8]
call sub.KERNEL32.dll_GetStdHandle
push dword [0x4334fc]
mov dword [esp + 0x24], eax
call sub.KERNEL32.dll_GetStdHandle
push dword [0x433500]
mov dword [esp + 0x1c], eax
call sub.KERNEL32.dll_GetStdHandle
mov dword [esp + 0x30], eax
lea eax, [esp + 8]
push eax
push 0
lea eax, [esp + 0x28]
push eax
push 0x404b10
push dword [0x4377ec]
push dword [0x4377e8]
call sub.KERNEL32.dll_CreateThread
mov dword [esp + 0x28], eax
lea eax, [esp + 8]
push eax
push 0
lea eax, [esp + 0x1c]
push eax
push 0x404b10
push dword [0x4377ec]
push dword [0x4377e8]
call sub.KERNEL32.dll_CreateThread
mov dword [esp + 0x1c], eax
lea eax, [esp + 8]
push eax
push 0
lea eax, [esp + 0x34]
push eax
push 0x404b10
push dword [0x4377ec]
push dword [0x4377e8]
call sub.KERNEL32.dll_CreateThread
mov esi, dword [esp + 0x1c]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x34], eax
mov dword [esp + 4], ecx
test esi, esi
je 0x404ea0
mov ecx, 1
mov dword [esp + 0x38], esi
mov dword [esp + 4], ecx
mov edx, ecx
pop esi
test eax, eax
je 0x404eb1
lea ecx, [edx + 1]
mov dword [esp], ecx
mov edx, ecx
mov dword [esp + ecx*4 + 0x30], eax
test edx, edx
je 0x404ec8
push dword [0x433504]
lea eax, [esp + 0x38]
push 1
push eax
push ecx
call sub.KERNEL32.dll_WaitForMultipleObjects
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x10]
push eax
push 1
push dword [esp + 0x14]
call sym.test_usbprog.exe__sys_proc_status_16
push dword [esp + 0x24]
call sub.KERNEL32.dll_CloseHandle
push dword [esp + 0x18]
call sub.KERNEL32.dll_CloseHandle
push dword [esp + 0x30]
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [esp + 0xc]
add esp, 0x50b8
ret 8
push 0x22
lea eax, [esp + 0x10bc]
push eax
call sym.test_usbprog.exe__string_append1_8
movsx edi, word [esp + 0x30be]
mov esi, 1
cmp edi, esi
jl 0x404f5f
mov al, byte [esp + esi + 0x30bf]
cmp al, 0x22
jne 0x404f4c
movzx eax, word [0x433510]
push eax
push 0x433514
lea eax, [esp + 0x10c0]
push eax
call sym.test_usbprog.exe__string_appendn_12
jmp 0x404f5a
push eax
lea eax, [esp + 0x10bc]
push eax
call sym.test_usbprog.exe__string_append1_8
inc esi
cmp esi, edi
jle 0x404f25
push 0x22
lea eax, [esp + 0x10bc]
push eax
call sym.test_usbprog.exe__string_append1_8
jmp 0x404d68