Function at 0x401820
Capabilities:
Write file on windows

Disassembly:
push str.test_usbprog
push dword [esp + 0xc]
push dword [esp + 0xc]
call sym.test_usbprog.exe__string_cmline_set_12
call sym.test_usbprog.exe__string_cmline_init_0
push 0x435fd0
push 0x42c410
call sym.test_usbprog.exe__string_cmline_token_8
push 0x435fd0
call sym.test_usbprog.exe__string_eos_4
test al, al
jne 0x4018e9
nop dword [eax + eax]
push 0
push 0x437058
push 0x4308f8
push 0x4308a8
push 0x435fd0
call sym.test_usbprog.exe__sys_error_abort_20
push 0x42c410
call sym.test_usbprog.exe__string_upcase_4
push 0x435fc8
push 0x430948
push 0x42c410
call sym.test_usbprog.exe__string_tkpick80_12
mov eax, dword [0x435fc8]
sub eax, 1
je 0x4018aa
call sym.test_usbprog.exe__string_cmline_opt_bad_0
jmp 0x4018b9
push 0x435fd0
push 0x42e820
call sym.test_usbprog.exe__string_cmline_token_8
push 0x42c410
push 0x435fd0
call sym.test_usbprog.exe__string_cmline_parm_check_8
push 0x435fd0
push 0x42c410
call sym.test_usbprog.exe__string_cmline_token_8
push 0x435fd0
call sym.test_usbprog.exe__string_eos_4
test al, al
je 0x401860
push esi
push edi
push 0x435fd0
push 0x435fa6
push 0x435680
push 0x42e820
call sym.test_usbprog.exe__picprg_sys_name_open_16
push 0
push 0x437058
push 0x437060
push 0x437060
push 0x435fd0
call sym.test_usbprog.exe__sys_error_abort_20
push 0x435fd0
push 0x435fa8
call sym.test_usbprog.exe__sys_thread_lock_create_8
push 0
push 0x437058
push 0x437060
push 0x437060
push 0x435fd0
call sym.test_usbprog.exe__sys_error_abort_20
push 0x435fd0
push 0x435fcc
push dword [0x43705c]
mov byte [0x435fa4], 0
push 0x401430
mov byte [0x435fa5], 1
call sym.test_usbprog.exe__sys_thread_create_16
push 0
push 0x437058
push 0x437060
push 0x437060
push 0x435fd0
call sym.test_usbprog.exe__sys_error_abort_20
movzx eax, word [0x42c814]
push eax
push 0x42c40c
push section..data
call sym.test_usbprog.exe__string_vstring_12
mov edi, 1
nop dword [eax + eax]
movss xmm0, dword [0x42e81c]
push ecx
movss dword [esp], xmm0
call sym.test_usbprog.exe__sys_wait_4
push 0x435fa8
call sym.test_usbprog.exe__sys_thread_lock_enter_4
cmp byte [0x435fa5], 0
jne 0x4019e3
push 0x430be8
call fcn.00401f00
add esp, 4
push section..data
mov byte [0x435fa5], 1
call sym.test_usbprog.exe__string_prompt_4
push 0x435fa8
mov byte [0x435fa5], 0
call sym.test_usbprog.exe__sys_thread_lock_leave_4
push 0x42c818
call sym.test_usbprog.exe__string_readin_4
mov dx, word [0x42c81a]
mov byte [0x435fa5], 1
test dx, dx
jle 0x4019b0
cmp byte [0x42c81c], 0x20
mov eax, edi
mov word [0x437038], di
jne 0x401a5e
mov ecx, eax
cmp cx, dx
jge 0x4019b0
mov eax, dword [0x437038]
inc eax
movzx esi, ax
mov word [0x437038], ax
mov ecx, esi
movsx eax, si
cmp byte [eax + 0x42c81b], 0x20
je 0x401a36
mov eax, esi
cwde
xor ecx, ecx
mov word [0x42e87a], cx
mov al, byte [eax + 0x42c81b]
cmp al, 0x27
je 0x401d1a
cmp al, 0x22
je 0x401d1a
push 0x435fd0
push 0x42c410
push 0x437038
push 0x42c818
call sym.test_usbprog.exe__string_token_16
push 0x435fd0
call sym.test_usbprog.exe__string_eos_4
test al, al
jne 0x4019b0
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x401e6c
push 0x435fd0
push 0x437054
push 0x42c410
call sym.test_usbprog.exe__string_t_int_12
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
je 0x401d13
push 0x435fd0
call sym.test_usbprog.exe__sys_error_none_4
push 0x42c410
call sym.test_usbprog.exe__string_upcase_4
push 0x435fc8
push str.__HELP_Q_S_H
push 0x42c410
call sym.test_usbprog.exe__string_tkpick80_12
mov eax, dword [0x435fc8]
dec eax
cmp eax, 4
ja case.default.0x401b18
jmp dword [eax*4 + 0x401ed4]
push 0x435fa8
call sym.test_usbprog.exe__sys_thread_lock_enter_4
cmp byte [0x435fa5], 0
jne 0x401b3f
push 0x430be8
call fcn.00401f00
add esp, 4
push 0x42e874
mov byte [0x435fa5], 1
call fcn.00401f00
push 1
call fcn.0040a39c
push eax
push 0x28
push 1
push str.__or_HELP_____Show_this_list_of_commands
call fcn.0040a631
push 0x430a48
call fcn.00401f00
push 1
call fcn.0040a39c
push eax
push 0x1e
push 1
push str.Q_____________Quit_the_program
call fcn.0040a631
push 0x430a6c
call fcn.00401f00
push 1
call fcn.0040a39c
push eax
push 0x30
push 1
push str.S_chars_______Remaining_characters_sent_as_ASCII
call fcn.0040a631
add esp, 0x48
push 0x430aa4
call fcn.00401f00
push 1
call fcn.0040a39c
push eax
push 0x3d
push 1
push str.H_hex_..._hex___Data_bytes__tokens_interpreted_in_hexadecimal
call fcn.0040a631
push 0x430ae8
call fcn.00401f00
push 1
call fcn.0040a39c
push eax
push 0x48
push 1
push str.val_..._val___Integer_bytes_or_strings__strings_must_be_quoted_____or_
call fcn.0040a631
push 0x430aec
call fcn.00401f00
push 1
call fcn.0040a39c
push eax
push 0x42
push 1
push str.Integer_tokens_have_the_format:__base_value_with_decimal_default.
call fcn.0040a631
add esp, 0x48
push 0x430b3c
call fcn.00401f00
add esp, 4
push 0x435fa8
call sym.test_usbprog.exe__sys_thread_lock_leave_4
jmp 0x401e27
movzx eax, word [0x42c81a]
push 0x42e878
push eax
movzx eax, word [0x437038]
push eax
push 0x42c818
call sym.test_usbprog.exe__string_substr_16
jmp 0x401e27
push 0x435fd0
push 0x42c008
push 0x437038
push 0x42c818
call sym.test_usbprog.exe__string_token_16
push 0x435fd0
call sym.test_usbprog.exe__string_eos_4
test al, al
jne 0x401e27
nop word [eax + eax]
push 0x435fd0
push 0x437054
push 0x42c008
call sym.test_usbprog.exe__string_t_int32h_12
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x401e6c
movzx eax, byte [0x437054]
push eax
push 0x42e878
mov dword [0x437054], eax
call sym.test_usbprog.exe__string_append1_8
push 0x435fd0
push 0x42c008
push 0x437038
push 0x42c818
call sym.test_usbprog.exe__string_token_16
push 0x435fd0
call sym.test_usbprog.exe__string_eos_4
test al, al
je 0x401c80
jmp 0x401e27
push 0x42c410
push 0x43703c
call sym.test_usbprog.exe__sys_msg_parm_vstr_8
push 1
push 0x43703c
push str.err_command_bad
push 0x4308a8
call sym.test_usbprog.exe__sys_message_parms_16
jmp 0x4019b0
mov dx, word [0x42c81a]
mov cx, di
mov word [0x437038], cx
cmp di, dx
jg 0x401e27
nop dword [eax]
movsx eax, cx
cmp byte [eax + 0x42c81b], 0x20
jne 0x401d5f
nop dword [eax]
cmp cx, dx
jge 0x401e27
inc cx
mov ax, cx
mov word [0x437038], cx
cwde
cmp byte [eax + 0x42c81b], 0x20
je 0x401d40
movsx eax, cx
mov al, byte [eax + 0x42c81b]
cmp al, 0x22
je 0x401dda
cmp al, 0x27
je 0x401dda
push 0x435fd0
push 0x42c008
push 0x437038
push 0x42c818
call sym.test_usbprog.exe__string_token_16
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x401e6c
push 0x435fd0
push 0x437054
push 0x42c008
call sym.test_usbprog.exe__string_t_int_12
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x401e6c
movzx eax, byte [0x437054]
push eax
push 0x42e878
mov dword [0x437054], eax
call sym.test_usbprog.exe__string_append1_8
jmp 0x401e10
push 0x435fd0
push 0x42c008
push 0x437038
push 0x42c818
call sym.test_usbprog.exe__string_token_16
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x401e6c
push 0x42c818
push 0x42e878
call sym.test_usbprog.exe__string_append_8
mov cx, word [0x437038]
mov dx, word [0x42c81a]
cmp cx, dx
jle 0x401d30
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x401e6c
mov ax, word [0x42e87a]
test ax, ax
jle 0x4019b0
push 0x435fd0
cwde
push eax
push 0x42e87c
push 0x435680
call sym.test_usbprog.exe__picprg_sys_usb_write_16
push 0x435fd0
call sym.test_usbprog.exe__sys_error_4
test al, al
je 0x4019b0
push 0x435fa8
call sym.test_usbprog.exe__sys_thread_lock_enter_4
cmp byte [0x435fa5], 0
jne 0x401e8c
push 0x430be8
call fcn.00401f00
add esp, 4
push 0
push 0x437058
push 0x437060
push 0x437060
push 0x435fd0
mov byte [0x435fa5], 1
call sym.test_usbprog.exe__sys_error_print_20
push 0x435fa8
call sym.test_usbprog.exe__sys_thread_lock_leave_4
jmp 0x4019b0
push 0x435680
mov byte [0x435fa4], 1
call sym.test_usbprog.exe__file_close_4
pop edi
xor eax, eax
pop esi
ret