Function at 0x401b00
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1478
call fcn.00404890
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x144c], edx
mov ebx, eax
mov dword [esp], eax
call sub.cygwin1.dll_fileno
mov dword [esp + 4], 0x10000
mov dword [esp], eax
call sub.cygwin1.dll_setmode
add eax, 1
je 0x401da0
mov eax, dword [ebp - 0x144c]
mov dword [esp], eax
call sub.cygwin1.dll_fileno
mov dword [esp + 4], 0x10000
mov dword [esp], eax
call sub.cygwin1.dll_setmode
add eax, 1
je 0x401da0
test byte [ebx + 0xc], 0x40
jne 0x401da0
mov edx, dword [ebp - 0x144c]
test byte [edx + 0xc], 0x40
jne 0x401da0
mov eax, dword [0x4089d8]
sub eax, 2
cmp eax, 1
jbe 0x401e20
fldz
fstp qword [ebp - 0x1438]
mov eax, dword [0x4085ac]
lea edx, [ebp - 0x24]
mov dword [esp], edx
mov dword [esp + 0x10], eax
mov eax, dword [0x4089d0]
mov dword [esp + 0xc], eax
mov eax, dword [0x4089e0]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x144c]
mov dword [esp + 4], eax
call sub.cygbz2_1.dll_BZ2_bzWriteOpen
mov dword [ebp - 0x143c], eax
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x401da5
cmp dword [0x4089d0], 1
jle 0x401bf9
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
lea eax, [ebp - 0x2c]
mov dword [esp], eax
lea esi, [ebp - 0x1408]
call sub.cygwin1.dll_time
lea edi, [ebp - 0x30]
lea esi, [esi]
mov eax, ebx
call fcn.00401a20
test al, al
jne 0x401d40
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x1388
mov dword [esp + 4], 1
mov dword [esp], esi
call sub.cygwin1.dll_fread
test byte [ebx + 0xc], 0x40
jne 0x401da0
test eax, eax
jle 0x401c66
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x143c]
lea edx, [ebp - 0x24]
mov dword [esp + 8], esi
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.cygbz2_1.dll_BZ2_bzWrite
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x401da5
mov eax, dword [0x4089d8]
sub eax, 2
cmp eax, 1
ja 0x401c10
cmp byte [0x40818c], 1
jne 0x401c10
mov dword [esp], edi
call sub.cygwin1.dll_time
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x2c]
sub eax, 1
jle 0x401c10
mov dword [esp], ebx
call sub.cygwin1.dll__ftello64
push edx
push eax
mov eax, dword [ebp - 0x144c]
fild qword [esp]
add esp, 8
fstp qword [ebp - 0x1430]
mov dword [esp], eax
call sub.cygwin1.dll__ftello64
mov dword [ebp - 0x1448], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x1444], edx
mov dword [ebp - 0x2c], eax
call sub.cygwin1.dll___getreent
mov dword [esp + 4], str._.2f___done
fld qword [0x406ce8]
fmul qword [ebp - 0x1430]
fdiv qword [ebp - 0x1438]
fstp qword [esp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
cmp dword [0x4089d8], 3
je 0x4020c1
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 5
mov dword [esp + 4], 1
mov dword [esp], str._____r
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
jmp 0x401c10
lea edx, [ebp - 0x20]
mov dword [ebp - 0x1454], edx
lea eax, [ebp - 0x1c]
mov dword [esp + 0x18], edx
mov edx, dword [ebp - 0x143c]
lea edi, [ebp - 0x18]
mov dword [ebp - 0x1450], eax
lea esi, [ebp - 0x14]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x24]
mov dword [esp], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], edx
call sub.cygbz2_1.dll_BZ2_bzWriteClose64
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x401dbd
mov edx, dword [ebp - 0x144c]
test byte [edx + 0xc], 0x40
je 0x401ebe
lea esi, [esi]
call fcn.00401a60
lea eax, [ebp - 0x20]
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x1454], eax
lea edi, [ebp - 0x18]
mov dword [ebp - 0x1450], edx
lea esi, [ebp - 0x14]
mov eax, dword [ebp - 0x1454]
mov edx, dword [ebp - 0x1450]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x143c]
mov dword [esp + 0x14], edx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sub.cygbz2_1.dll_BZ2_bzWriteClose64
mov eax, dword [ebp - 0x24]
cmp eax, 0xfffffffa
je 0x401da0
cmp eax, 0xfffffffd
je 0x401e16
cmp eax, 0xfffffff7
je 0x401eb9
mov eax, str.compress:unexpected_error
call fcn.004017a0
call fcn.00401600
nop
lea esi, [esi]
cmp byte [0x40818c], 1
jne 0x401b8f
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.cygwin1.dll_fseek
mov dword [esp], ebx
call sub.cygwin1.dll__ftello64
push edx
push eax
fild qword [esp]
add esp, 8
fstp qword [ebp - 0x1438]
mov dword [esp], ebx
call sub.cygwin1.dll_rewind
mov eax, dword [0x4089d0]
test eax, eax
jle 0x401b97
call sub.cygwin1.dll___getreent
mov dword [esp + 4], str.Input_file_size:__ld_n
fnstcw word [ebp - 0x1412]
fld qword [ebp - 0x1438]
movzx edx, word [ebp - 0x1412]
mov dh, 0xc
mov word [ebp - 0x1414], dx
fldcw word [ebp - 0x1414]
fistp dword [esp + 8]
fldcw word [ebp - 0x1412]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x401b97
call fcn.004012f0
mov dword [esp], edx
call sub.cygwin1.dll_fflush
add eax, 1
je 0x401da0
call sub.cygwin1.dll___getreent
mov edx, dword [ebp - 0x144c]
cmp dword [eax + 8], edx
je 0x401f15
mov dword [esp], edx
call sub.cygwin1.dll_fileno
test eax, eax
js 0x401da0
call fcn.00401ab0
mov eax, dword [ebp - 0x144c]
mov dword [esp], eax
call sub.cygwin1.dll_fclose
mov dword [0x409234], 0
add eax, 1
je 0x401da0
test byte [ebx + 0xc], 0x40
mov dword [0x409234], 0
jne 0x401da0
mov dword [esp], ebx
call sub.cygwin1.dll_fclose
add eax, 1
je 0x401da0
mov ecx, dword [0x4089d0]
test ecx, ecx
jle 0x4020b6
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jne 0x401f5a
mov edx, dword [ebp - 0x18]
test edx, edx
je 0x4020f4
mov edx, dword [ebp - 0x18]
fld1
mov byte [ebp - 0x38], cl
lea ebx, [ebp - 0x38]
fldz
fstp qword [ebp - 0x1428]
mov eax, edx
shr eax, 0x18
mov byte [ebp - 0x31], al
mov eax, edx
shr eax, 0x10
mov byte [ebp - 0x32], al
mov eax, edx
shr eax, 8
mov byte [ebp - 0x33], al
mov eax, ecx
shr eax, 0x18
mov byte [ebp - 0x34], dl
mov edx, dword [ebp - 0x20]
mov byte [ebp - 0x35], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x36], al
mov eax, ecx
mov ecx, dword [ebp - 0x1c]
shr eax, 8
mov byte [ebp - 0x37], al
mov eax, edx
shr eax, 0x18
mov byte [ebp - 0x39], al
mov eax, edx
shr eax, 0x10
mov byte [ebp - 0x3a], al
mov eax, edx
shr eax, 8
mov byte [ebp - 0x3b], al
mov eax, ecx
shr eax, 0x18
mov byte [ebp - 0x3d], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x3e], al
mov eax, ecx
shr eax, 8
mov byte [ebp - 0x3c], dl
mov edx, ebx
mov byte [ebp - 0x40], cl
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x3f], al
movzx eax, byte [edx]
add edx, 1
push eax
fild word [esp]
add esp, 4
cmp edx, ecx
fmul st(1)
fadd qword [ebp - 0x1428]
fstp qword [ebp - 0x1428]
fmul dword [0x406ce0]
jne 0x401fe1
fstp st(0)
fld1
lea edi, [ebp - 0x40]
fldz
mov edx, edi
fstp qword [ebp - 0x1420]
movzx eax, byte [edx]
add edx, 1
push eax
fild word [esp]
add esp, 4
cmp edx, ebx
fmul st(1)
fadd qword [ebp - 0x1420]
fstp qword [ebp - 0x1420]
fmul dword [0x406ce0]
jne 0x402017
fstp st(0)
lea esi, [ebp - 0x60]
mov eax, esi
lea ebx, [ebp - 0x80]
call fcn.00401180
mov edx, edi
mov eax, ebx
call fcn.00401180
call sub.cygwin1.dll___getreent
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], esi
mov dword [esp + 4], str._6.3f:1___6.3f_bits_byte___5.2f___saved___s_in___s_out._n
fld qword [ebp - 0x1420]
fdiv qword [ebp - 0x1428]
fsubr dword [0x406cdc]
fmul dword [0x406cd8]
fstp qword [esp + 0x18]
fld qword [ebp - 0x1420]
fmul dword [0x406ce4]
fdiv qword [ebp - 0x1428]
fstp qword [esp + 0x10]
fld qword [ebp - 0x1428]
fdiv qword [ebp - 0x1420]
fstp qword [esp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
add esp, 0x147c
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.cygwin1.dll___getreent
mov dword [esp + 4], str.__new_size:__.2f__
fild qword [ebp - 0x1448]
fmul qword [0x406ce8]
fdiv qword [ebp - 0x1430]
fstp qword [esp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x401d0f
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x15
mov dword [esp + 4], 1
mov dword [esp], str._no_data_compressed._n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
jmp 0x4020b6