Function at 0x4027d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x3c
cmp dword [0x412064], 1
mov dword [esp + 0x1c], edx
jle 0x40283d
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp], 0xd
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
mov edi, dword [0x412498]
mov esi, dword [0x412458]
test edi, edi
jne 0x402b71
call sub.cygwin1.dll___getreent
lea edx, [esi + 7]
test esi, esi
mov dword [esp + 8], esi
mov dword [esp + 4], str.Xmodem_sectors_kbytes_sent:__3d__2dk
cmovns edx, esi
sar edx, 3
mov dword [esp + 0xc], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov eax, dword [esp + 0x1c]
movzx edi, bl
not ebx
mov dword [esp + 0x20], edi
movzx edi, bl
mov dword [esp + 0x28], 0xb
mov dword [esp + 0x24], edi
sub eax, 1
mov dword [esp + 0x18], eax
xor eax, eax
mov byte [0x412450], al
call sub.cygwin1.dll___getreent
cmp dword [esp + 0x1c], 0x400
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
je 0x402b30
mov dword [esp], 1
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.cygwin1.dll_putc
mov ecx, dword [esp + 0x18]
test ecx, ecx
js 0x402bf3
mov esi, dword [esp + 0x18]
xor edi, edi
xor ebx, ebx
mov ebp, 0x4124c0
lea esi, [esi]
lea edi, [edi]
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
add ebp, 1
mov dword [esp + 4], eax
movzx eax, byte [ebp - 1]
mov dword [esp], eax
call sub.cygwin1.dll_putc
movsx edx, byte [ebp - 1]
movzx eax, bh
shl ebx, 8
movzx ecx, word [eax + eax + 0x40c440]
movzx eax, dl
add edi, edx
xor ebx, eax
xor ebx, ecx
sub esi, 1
jns 0x4028e0
cmp byte [0x412474], 0
je 0x402ae5
movzx eax, bh
shl ebx, 8
movzx eax, word [eax + eax + 0x40c440]
xor eax, ebx
movzx edx, ah
shl eax, 8
movzx ebx, word [edx + edx + 0x40c440]
xor ebx, eax
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
movzx eax, bh
movzx ebx, bl
mov dword [esp], eax
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.cygwin1.dll_fflush
mov ebx, dword [0x412494]
test ebx, ebx
jne 0x402bfc
sub dword [0x4120d8], 1
js 0x402be1
mov eax, dword [0x4144dc]
lea edx, [eax + 1]
mov dword [0x4144dc], edx
movzx eax, byte [eax]
cmp eax, 6
je 0x402bc0
jle 0x402b03
cmp eax, 0x18
je 0x402a40
cmp eax, 0x43
je 0x402ab0
cmp eax, 0x15
je 0x402ac1
mov dword [esp + 4], eax
mov dword [esp], str.Got__02x_for_sector_ACK
mov dword [esp + 0x2c], eax
call fcn.00404390
sub dword [0x4120d8], 1
mov eax, dword [esp + 0x2c]
mov byte [0x412450], al
jns 0x402a5e
nop
mov eax, dword [0x40c640]
mov dword [esp], eax
call fcn.00404510
cmp eax, 0xfffffffe
jne 0x402a6f
sub dword [esp + 0x28], 1
jne 0x402862
mov dword [esp], str.Retry_Count_Exceeded
mov ebx, 0xffffffff
call fcn.00404390
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [0x412450], 0x18
je 0x402a8f
lea esi, [esi]
sub dword [0x4120d8], 1
mov byte [0x412450], al
js 0x402a00
mov eax, dword [0x4144dc]
lea edx, [eax + 1]
mov dword [0x4144dc], edx
movzx eax, byte [eax]
cmp eax, 0x43
je 0x4029b2
cmp eax, 0x15
je 0x4029b2
cmp eax, 0x18
jne 0x402a50
cmp byte [0x412450], 0x18
jne 0x402a50
mov dword [esp], str.Cancelled
mov ebx, 0xffffffff
call fcn.00404390
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [0x412480]
test edx, edx
je 0x402ac1
mov byte [0x412474], 1
mov dword [esp], str.NAK_on_sector
mov dword [esp + 0x2c], eax
call fcn.00404390
mov eax, dword [esp + 0x2c]
sub dword [esp + 0x28], 1
jne 0x402862
jmp 0x402a1d
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, edi
movzx edi, al
mov dword [esp], edi
call sub.cygwin1.dll_putc
jmp 0x402976
cmp eax, 0xfffffffe
je 0x402ba1
cmp eax, 0xffffffff
jne 0x4029d8
mov dword [esp], str.Got_burst_for_sector_ACK
mov dword [esp + 0x2c], eax
call fcn.00404390
mov eax, dword [esp + 0x2c]
jmp 0x402a50
mov dword [esp], 2
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.cygwin1.dll_putc
jmp 0x4028c9
call sub.cygwin1.dll___getreent
lea edx, [esi + 7]
test esi, esi
mov dword [esp + 8], esi
mov dword [esp + 4], str.Ymodem_sectors_kbytes_sent:__3d__2dk
cmovns edx, esi
sar edx, 3
mov dword [esp + 0xc], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x40283d
mov dword [esp], str.Timeout_on_sector_ACK
mov dword [esp + 0x2c], eax
call fcn.00404390
mov eax, dword [esp + 0x2c]
jmp 0x402ad5
mov eax, dword [esp + 0x1c]
mov dword [0x412480], 0
shr eax, 7
add dword [0x412458], eax
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x40c640]
mov dword [esp], eax
call fcn.00404510
jmp 0x4029b2
xor edi, edi
xor ebx, ebx
jmp 0x40291b
mov dword [0x412480], 0
xor ebx, ebx
jmp 0x402a2e