Function at 0x403700
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x2748
call fcn.00404890
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2734], 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 case.0x403810.6
mov eax, dword [ebp - 0x2734]
test byte [eax + 0xc], 0x40
jne case.0x403810.6
mov dword [ebp - 0x2730], 0
lea edi, [ebp - 0x272c]
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
movzx eax, byte [0x409239]
mov dword [esp + 0xc], eax
mov eax, dword [0x4089d0]
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x2734]
lea eax, [ebp - 0x10]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.cygbz2_1.dll_BZ2_bzReadOpen
test eax, eax
mov esi, eax
je 0x4037dd
mov ecx, dword [ebp - 0x10]
test ecx, ecx
jne 0x4037dd
add dword [ebp - 0x2730], 1
jmp 0x4037b4
test eax, eax
jne 0x403817
lea edx, [ebp - 0x13a4]
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], 0x1388
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.cygbz2_1.dll_BZ2_bzRead
mov eax, dword [ebp - 0x10]
cmp eax, 0xfffffffb
jne 0x4037b0
lea eax, [ebp - 0x14]
mov dword [esp], eax
mov dword [esp + 4], esi
call sub.cygbz2_1.dll_BZ2_bzReadClose
mov eax, dword [0x4089d0]
test eax, eax
je 0x4038f0
mov eax, dword [ebp - 0x10]
add eax, 9
cmp eax, 6
jbe switch.0x00403810
mov eax, str.test:unexpected_error
call fcn.004017a0
nop
jmp dword [eax*4 + 0x40695c]
cmp eax, 4
jne 0x4037dd
lea eax, [ebp - 0x1c]
lea edx, [ebp - 0x18]
mov dword [esp + 8], eax
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.cygbz2_1.dll_BZ2_bzReadGetUnused
mov edx, dword [ebp - 0x10]
test edx, edx
jne 0x403a2c
mov ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
test ecx, ecx
jle 0x40385e
xor edx, edx
movzx eax, byte [ebx + edx]
mov byte [edi + edx], al
add edx, 1
cmp edx, ecx
jl 0x403850
lea edx, [ebp - 0x10]
mov dword [esp + 4], esi
mov dword [esp], edx
call sub.cygbz2_1.dll_BZ2_bzReadClose
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x403a2c
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x403762
mov eax, dword [ebp - 0x2734]
call fcn.00401a20
test al, al
je 0x403762
mov eax, dword [ebp - 0x2734]
test byte [eax + 0xc], 0x40
jne case.0x403810.6
mov dword [esp], eax
call sub.cygwin1.dll_fclose
add eax, 1
je case.0x403810.6
cmp dword [0x4089d0], 1
jle 0x40398f
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 5
mov dword [esp + 4], 1
mov dword [esp], str._n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov eax, 1
jmp 0x40395a
mov ebx, dword [0x4089dc]
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], 0x4085c0
mov dword [esp + 4], str._s:__s:
mov dword [esp + 8], ebx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x4037f9
call fcn.00401a60
call fcn.004012f0
call fcn.00401600
nop
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x23
mov dword [esp + 4], 1
mov dword [esp], str.data_integrity__CRC__error_in_data_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
xor eax, eax
add esp, 0x274c
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.cygwin1.dll___getreent
mov edx, dword [ebp - 0x2734]
cmp dword [eax + 4], edx
je 0x40397d
mov dword [esp], edx
call sub.cygwin1.dll_fclose
cmp dword [ebp - 0x2730], 1
je 0x4039fd
cmp byte [0x4085b0], 0
jne 0x4039cb
mov eax, 1
jmp 0x40395a
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
mov dword [esp], str.file_ends_unexpectedly_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
add esp, 0x274c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x23
mov dword [esp + 4], 1
mov dword [esp], str.trailing_garbage_after_EOF_ignored_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov eax, 1
jmp 0x40395a
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x2d
mov dword [esp + 4], 1
mov dword [esp], str.bad_magic_number__file_not_created_by_bzip2__n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
xor eax, eax
jmp 0x40395a
mov eax, str.test:bzReadGetUnused
call fcn.004017a0
lea esi, [esi]
lea edi, [edi]