Function at 0x402360
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov ebp, eax
push esi
push ebx
mov edi, ecx
mov ebx, edx
sub esp, 0x3c
movzx eax, byte [0x435139]
test al, al
mov esi, eax
je 0x402680
mov edx, edi
movzx edi, byte [0x4350c8]
cmp dl, 0x3a
mov edx, dword [0x43513c]
sete byte [esp + 0x10]
movzx ecx, byte [esp + 0x10]
xor ecx, edi
test edx, edx
je 0x402432
shr edx, 0x1f
and edx, edi
cmp byte [esp + 0x10], dl
mov edx, dword [0x428020]
cmove edx, dword [0x42801c]
cmp byte [esp + 0x10], 0
mov dword [esp + 0x18], edx
mov edx, dword [str.01_31]
cmove edx, dword [str.01_31]
test al, al
mov dword [esp + 0x1c], edx
je 0x4023dc
test cl, cl
jne 0x402452
mov edx, dword [esp + 0x18]
cmp byte [edx], 0
je 0x4026a0
test cl, cl
jne 0x402790
test al, al
je 0x40256c
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
test byte [eax + 0xc], 0x40
jne 0x402635
cmp byte [0x435094], 0
mov dword [0x435080], ebx
je 0x40242a
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.cygwin1.dll_fflush
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
test al, al
je 0x4025f0
test cl, cl
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
je 0x4025f0
cmp ebp, ebx
jae 0x4023f9
mov eax, ebx
mov dword [esp + 0x10], ebx
xor esi, esi
sub eax, ebp
mov ebx, ebp
mov dword [esp + 0x14], eax
jmp 0x40248f
test esi, esi
mov dword [esp + 0x2c], 1
mov eax, 1
cmove esi, ebx
lea ebx, [edi + eax]
cmp dword [esp + 0x10], ebx
jbe 0x402550
lea eax, [esp + 0x2c]
mov dword [esp + 0xc], ebx
mov dword [esp], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
call dword [0x435114]
cmp eax, 0xffffffff
je 0x402550
lea edi, [ebp + eax]
cmp dword [esp + 0x10], edi
je 0x402550
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x402470
cmp byte [0x435139], 0
je 0x4026b2
cmp byte [0x4350c8], 1
mov edx, dword [esp + 0x10]
mov eax, edi
sbb ecx, ecx
and ecx, 0xd
add ecx, 0x2d
call fcn.00401f30
mov edx, dword [0x43513c]
test edx, edx
jne 0x4026f4
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
call sub.cygwin1.dll_fwrite
mov eax, dword [0x43513c]
test eax, eax
jne 0x402720
cmp byte [0x435139], 0
jne 0x402702
mov eax, dword [esp + 0x2c]
jmp 0x402482
movzx eax, byte [0x435139]
mov edx, ebx
mov ebx, dword [esp + 0x10]
test al, al
jne 0x402750
test esi, esi
cmovne edx, esi
mov ebp, edx
mov eax, dword [esp + 0x18]
cmp byte [eax], 0
je 0x402665
xor eax, eax
cmp ebx, ebp
ja 0x402760
xor edx, edx
add eax, edx
mov edi, ebx
sub edi, eax
mov esi, edi
sub esi, ebp
je 0x402665
mov eax, dword [esp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [str.e__sme_K]
mov dword [esp], eax
call fcn.004143c0
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], ebp
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov eax, dword [esp + 0x18]
cmp byte [eax], 0
je 0x4025e0
mov eax, dword [str.e_me_K]
mov dword [esp], eax
call fcn.004143d0
movzx esi, byte [0x435139]
mov ebp, edi
lea esi, [esi]
cmp ebp, ebx
mov edx, esi
setb al
cmp al, dl
jbe 0x4023f9
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp], ebp
mov dword [esp + 0xc], eax
mov eax, ebx
sub eax, ebp
mov dword [esp + 8], eax
call sub.cygwin1.dll_fwrite
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
test byte [eax + 0xc], 0x40
je 0x40240b
mov dword [esp], 0x42910a
mov byte [0x435120], 1
call sub.cygintl_8.dll_libintl_gettext
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 2
call sub.cygwin1.dll_error
jmp 0x40240b
xor esi, esi
cmp ebp, ebx
setb al
mov edx, esi
cmp al, dl
jbe 0x4023f9
jmp 0x4025ff
mov eax, ebp
movsx ecx, cl
call fcn.00401f30
movzx eax, byte [0x435139]
mov esi, eax
jmp 0x40237e
mov edi, dword [esp + 0x1c]
cmp byte [edi], 0
je 0x4025f0
jmp 0x4023e9
mov eax, dword [esp + 0x18]
cmp byte [eax], 0
jne 0x402730
test esi, esi
cmove esi, ebx
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], esi
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, edi
sub eax, esi
xor esi, esi
mov dword [esp + 8], eax
call sub.cygwin1.dll_fwrite
mov edx, dword [0x43513c]
test edx, edx
je 0x402500
mov eax, dword [esp + 0x1c]
call fcn.00401d40
jmp 0x402500
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
jmp 0x40253e
mov eax, dword [esp + 0x1c]
call fcn.00401d70
jmp 0x402531
mov dword [esp + 4], eax
mov eax, dword [str.e__sme_K]
mov dword [esp], eax
call fcn.004143c0
jmp 0x4026bb
mov ebp, ebx
jmp 0x4023f1
movzx edx, byte [0x435f64]
cmp byte [ebx - 1], dl
je 0x40277f
mov edx, eax
not edx
cmp byte [ebx + edx], 0xd
sete dl
movzx edx, dl
jmp 0x402585
lea eax, [ebx - 1]
cmp ebp, eax
mov eax, 1
jb 0x40276c
jmp 0x402583
test al, al
jne 0x402452
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0
je 0x40256c
cmp ebp, ebx
jb 0x402456
jmp 0x40256c