Function at 0x41ab10
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xb8
push ebx
mov ebx, dword [esp + 0xc4]
mov eax, 0x84
push ebp
push esi
push edi
mov word [esp + 0x40], ax
mov eax, 0x20
push ebx
mov word [esp + 0x20], ax
call sym.test_usbprog.exe__sys_error_none_4
mov ebp, dword [esp + 0xd4]
mov edi, dword [ebp]
cmp byte [edi + 0x298a], 0
jne 0x41ae5f
mov eax, dword [esp + 0xcc]
lea ecx, [esp + 0x40]
push ebx
push ecx
mov byte [esp + 0x1b], 0
mov byte [eax], 0
lea eax, [edi + 0x5c]
push eax
call sym.test_usbprog.exe__file_read_env_12
mov esi, dword [esp + 0xd8]
lea ecx, [edi + 0x568]
mov eax, dword [esi]
add eax, 0x50c
push eax
push ecx
call sym.test_usbprog.exe__string_copy_8
mov ecx, dword [esi]
mov eax, dword [edi + 0x970]
push ebx
mov dword [ecx + 0x914], eax
call sym.test_usbprog.exe__file_eof_4
test al, al
jne 0x41ae5f
push ebx
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x41ae70
cmp word [esp + 0x42], 5
jl 0x41ae5f
mov eax, 1
nop word [eax + eax]
cmp byte [esp + eax + 0x43], 0x20
jne 0x41ae5f
inc eax
cmp eax, 4
jle 0x41abd0
cmp byte [esp + 0x48], 0x2e
jne 0x41ae7d
push ebx
lea eax, [esp + 0x20]
mov dword [esp + 0x18], 6
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x4c]
push eax
call sym.test_usbprog.exe__string_token_16
push ebx
call sym.test_usbprog.exe__sys_error_4
test al, al
je 0x41ac41
push 1
call fcn.0040a39c
push eax
push 0x15
push 1
push str.Missing_command_name.
call fcn.0040a631
push 0x434420
call fcn.00401f00
add esp, 0x18
push ebp
call fcn.00419ff0
jmp 0x41ae20
lea eax, [esp + 0x1c]
push eax
call sym.test_usbprog.exe__string_upcase_4
lea eax, [esp + 0x18]
push eax
push str.FILL_NFILL_BLANK
lea eax, [esp + 0x24]
push eax
call sym.test_usbprog.exe__string_tkpick80_12
mov eax, dword [esp + 0x18]
sub eax, 1
je 0x41ad51
sub eax, 1
je 0x41ad31
sub eax, 1
je 0x41ad21
push 1
call fcn.0040a39c
push eax
push 0x16
push 1
push 0x434424
call fcn.0040a631
mov ax, word [esp + 0x32]
add esp, 0x14
cmp ax, 0x20
jle 0x41acbe
cwde
push 0x43830c
sub eax, 0x20
push eax
push 0x43443c
call fcn.00401f00
mov ax, word [esp + 0x2a]
add esp, 0xc
test ax, ax
jle 0x41acd5
cmp ax, 0x20
jge 0x41acce
movsx esi, ax
jmp 0x41acd7
mov esi, 0x20
jmp 0x41acd7
xor esi, esi
push 1
call fcn.0040a39c
push eax
push esi
lea eax, [esp + 0x2c]
push 1
push eax
call fcn.0040a631
push 1
call fcn.0040a39c
push eax
push 2
push 1
push 0x434440
call fcn.0040a631
push 0x434444
call fcn.00401f00
add esp, 0x2c
push ebp
call fcn.00419ff0
mov esi, dword [esp + 0xd8]
jmp 0x41ae20
xor eax, eax
mov byte [esp + 0x13], 1
mov word [edi + 0x986], ax
jmp 0x41ad58
cmp byte [edi + 0x298b], 0
je 0x41ad48
xor eax, eax
mov byte [esp + 0x13], 1
mov word [edi + 0x986], ax
mov byte [edi + 0x298b], 0
jmp 0x41ad58
mov byte [edi + 0x298b], 1
push ebx
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x4c]
push eax
call sym.test_usbprog.exe__string_token_16
push ebx
call sym.test_usbprog.exe__string_eos_4
test al, al
jne 0x41ae19
push 1
call fcn.0040a39c
push eax
push 0x25
push 1
push str.Too_many_cmds.__First_excess_cmd_is__
call fcn.0040a631
mov ax, word [esp + 0x32]
add esp, 0x14
cmp ax, 0x20
jle 0x41adbb
cwde
push 0x43830d
sub eax, 0x20
push eax
push 0x434470
call fcn.00401f00
mov ax, word [esp + 0x2a]
add esp, 0xc
test ax, ax
jle 0x41add2
cmp ax, 0x20
jge 0x41adcb
movsx esi, ax
jmp 0x41add4
mov esi, 0x20
jmp 0x41add4
xor esi, esi
push 1
call fcn.0040a39c
push eax
push esi
lea eax, [esp + 0x2c]
push 1
push eax
call fcn.0040a631
push 1
call fcn.0040a39c
push eax
push 2
push 1
push 0x434474
call fcn.0040a631
push 0x434478
call fcn.00401f00
add esp, 0x2c
push ebp
call fcn.00419ff0
mov esi, dword [esp + 0xd8]
cmp byte [esp + 0x13], 0
jne 0x41ae96
push ebx
lea eax, [esp + 0x44]
push eax
lea eax, [edi + 0x5c]
push eax
call sym.test_usbprog.exe__file_read_env_12
mov eax, dword [esi]
add eax, 0x50c
push eax
lea eax, [edi + 0x568]
push eax
call sym.test_usbprog.exe__string_copy_8
mov ecx, dword [esi]
mov eax, dword [edi + 0x970]
push ebx
mov dword [ecx + 0x914], eax
call sym.test_usbprog.exe__file_eof_4
test al, al
je 0x41aba7
mov eax, dword [esp + 0xcc]
mov byte [eax], 1
mov byte [edi + 0x298a], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret 0x14
push dword [esp + 0xdc]
lea eax, [edi + 0x984]
push ebp
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.0041a3e0
mov eax, 1
mov word [edi + 0x2988], ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret 0x14