Function at 0x416640
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
mov ebx, edx
sub esp, 0x5c
mov eax, dword [eax + 4]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
mov eax, ecx
and eax, 4
mov dword [esp + 0x30], 0
cmp eax, 1
sbb eax, eax
and eax, 6
mov dword [esp + 0x24], eax
movsx eax, byte [0x522d73]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x416ab8
mov ebp, dword [ebx]
lea eax, [ebx + 4]
mov dword [edi + 4], eax
mov eax, ebp
and eax, 0x1f
cmp eax, 5
jne 0x416860
lea esi, [esi]
nop
lea eax, [esp + 0x30]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.0045be20
mov esi, eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4166ce
cmp byte [esi], 0
je 0x4166ce
mov eax, esi
call fcn.004165a0
mov eax, dword [esp + 0x24]
test ebp, 0x40
je 0x416958
or eax, 1
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x416707
mov eax, 0x4f1d87
mov dword [esp + 4], eax
mov eax, dword [0x523b74]
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov ebx, ebp
and ebx, 0x20
jne 0x416870
lea eax, [esp + 0x44]
mov dword [esp + 4], 2
lea ebp, [esp + 0x38]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x30]
mov dword [esp + 8], eax
mov dword [esp], edi
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], ebp
call fcn.0045be20
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4167b3
mov eax, 6
lea ecx, [esp + 0x34]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp], ebp
mov dword [esp + 0x34], 0
call sym.zsh.exe_prefork
mov eax, dword [sym.zsh.exe_errflag]
test eax, eax
jne 0x416860
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
mov ecx, edx
or ecx, 0x10
test al, 0x80
cmove ecx, edx
mov dword [esp + 0x18], ecx
test ebx, ebx
jne 0x416a00
cmp byte [0x522d00], 0
jne 0x416a50
mov eax, dword [ebp]
test eax, eax
je 0x416aa0
mov ebx, dword [eax]
test ebx, ebx
je 0x416978
mov dword [esp], ebp
call sym.zsh.exe_countlinknodes
lea eax, [eax*4 + 4]
mov dword [esp], eax
call sym.zsh.exe_zalloc
mov edx, dword [ebp]
mov dword [esp + 0x20], eax
test edx, edx
je 0x416b70
mov ebx, eax
mov dword [esp], ebp
add ebx, 4
call sym.zsh.exe_ugetnode
mov dword [esp], eax
call sym.zsh.exe_ztrdup
mov dword [ebx - 4], eax
mov eax, dword [ebp]
test eax, eax
jne 0x4167f0
mov ebp, dword [esp + 0x1c]
mov dword [ebx], 0
test ebp, ebp
jne 0x4168c6
mov eax, dword [esp + 0x18]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
call sym.zsh.exe_assignaparam
mov esi, dword [sym.zsh.exe_errflag]
test esi, esi
jne 0x416860
mov eax, dword [edi + 4]
mov ebp, dword [eax]
lea edx, [eax + 4]
mov dword [edi + 4], edx
mov eax, ebp
and eax, 0x1f
cmp eax, 5
je 0x4166a0
lea esi, [esi]
mov eax, dword [esp + 0x2c]
mov dword [edi + 4], eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x30]
shr ebp, 7
mov dword [esp + 8], 2
mov dword [esp + 4], ebp
mov dword [esp + 0xc], eax
mov dword [esp], edi
call fcn.0045c070
mov ebp, eax
mov eax, dword [sym.zsh.exe_errflag]
test eax, eax
jne 0x416860
test ebp, ebp
jne 0x4169e0
mov dword [esp], 4
call sym.zsh.exe_zalloc
mov ebp, dword [esp + 0x1c]
mov ebx, eax
mov dword [esp + 0x20], eax
mov dword [ebx], 0
test ebp, ebp
je 0x41681f
mov eax, dword [0x523b74]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], 0x4f1da4
call sub.cygwin1.dll_fwrite
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx]
test eax, eax
je 0x416928
lea esi, [esi]
mov edx, dword [0x523b74]
mov dword [esp], eax
add ebx, 4
mov dword [esp + 4], edx
call sym.zsh.exe_quotedzputs
mov eax, dword [0x523b74]
mov dword [esp], 0x20
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov eax, dword [ebx]
test eax, eax
jne 0x4168f8
mov eax, dword [0x523b74]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], 0x4f1da7
call sub.cygwin1.dll_fwrite
jmp 0x41681f
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x416707
mov eax, 0x4f1d8c
jmp 0x4166f2
mov eax, dword [eax + 8]
cmp byte [eax], 0
je 0x416985
call fcn.004165a0
mov dword [esp], ebp
call sym.zsh.exe_ugetnode
mov dword [esp], eax
call sym.zsh.exe_ztrdup
mov ebp, eax
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x416a20
test byte [esp + 0x28], 1
je 0x4169c2
mov dword [esp + 4], 0x5b
mov dword [esp], esi
call sub.cygwin1.dll_strchr
test eax, eax
je 0x416ad0
mov eax, dword [esp + 0x18]
mov dword [esp + 4], ebp
mov dword [esp], esi
mov dword [esp + 8], eax
call sym.zsh.exe_assignsparam
jmp 0x416837
mov edx, dword [esp + 0x30]
mov eax, 2
test edx, edx
jne 0x41675f
jmp 0x4167c8
mov dword [esp + 4], eax
mov dword [esp], ebp
call sym.zsh.exe_globlist
mov ebx, dword [sym.zsh.exe_errflag]
test ebx, ebx
jne 0x416860
jmp 0x4167c8
mov eax, dword [0x523b74]
mov dword [esp], ebp
mov dword [esp + 4], eax
call sym.zsh.exe_quotedzputs
mov eax, dword [0x523b74]
mov dword [esp], 0x20
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
jmp 0x4169a3
mov eax, dword [ebp]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sym.zsh.exe_haswilds
test eax, eax
je 0x4167b3
mov eax, dword [esp + 0x34]
mov dword [esp], ebp
mov dword [esp + 4], eax
call sym.zsh.exe_globlist
cmp byte [0x522d00], 0
je 0x416a87
mov dword [esp], esi
call sym.zsh.exe_unsetparam
mov eax, dword [sym.zsh.exe_errflag]
test eax, eax
jne 0x416860
mov eax, dword [ebp]
test eax, eax
jne 0x4167be
nop
mov dword [esp], 0x4f1bc5
call sym.zsh.exe_ztrdup
mov ebp, eax
jmp 0x416997
call fcn.0047a5b0
mov dword [0x5212f4], 1
jmp 0x416682
test byte [esp + 0x28], 2
je 0x416b20
cmp byte [0x522d5c], 0
je 0x416b20
mov eax, dword [sym.zsh.exe_paramtab]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [eax + 0x2c]
test eax, eax
je 0x416b20
test byte [eax + 0xa], 0x80
je 0x416b20
mov eax, dword [eax + 4]
mov dword [esp], 0x4f1d90
mov dword [esp + 4], eax
call sym.zsh.exe_zerr
mov dword [esp], ebp
call sym.zsh.exe_zsfree
mov eax, dword [esp + 0x2c]
mov dword [edi + 4], eax
jmp 0x416867
mov dword [esp + 4], str.STTY
mov dword [esp], esi
call sub.cygwin1.dll_strcmp
test eax, eax
je 0x416b83
cmp byte [0x522d21], 0
movzx ebx, byte [0x522cc3]
mov byte [0x522cc3], 1
jne 0x416b79
mov eax, dword [esp + 0x18]
mov dword [esp + 4], ebp
mov dword [esp], esi
mov dword [esp + 8], eax
call sym.zsh.exe_assignsparam
mov byte [0x522cc3], bl
jmp 0x416837
mov ebx, dword [esp + 0x20]
jmp 0x41680d
mov dword [esp], esi
call sym.zsh.exe_unsetparam
jmp 0x416b4b
mov eax, dword [0x5212f0]
mov dword [esp], eax
call sym.zsh.exe_zsfree
mov dword [esp], ebp
call sym.zsh.exe_ztrdup
mov dword [0x5212f0], eax
jmp 0x416b34