Function at 0x40dc90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ecx, 0x20
push edi
push esi
push ebx
sub esp, 0xdc
movzx eax, byte [0x522d73]
lea edi, [esp + 0x44]
mov ebx, dword [esp + 0xf0]
mov dword [esp + 0xc4], 0
mov byte [esp + 0x3f], al
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp], ebx
mov dword [esp + 0xcc], 0
mov dword [esp + 0xc8], 0
call sym.zsh.exe_ugetnode
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xf8]
mov esi, dword [eax + 0xc]
test esi, esi
je 0x40e1da
mov eax, dword [esp + 0xf8]
mov eax, dword [eax + 8]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xf8]
mov esi, dword [eax + 0x1c]
mov dword [esp], ebx
call sym.zsh.exe_countlinknodes
mov dword [esp + 0x38], eax
lea eax, [eax*4 + 4]
mov dword [esp], eax
call sym.zsh.exe_zhalloc
mov dword [esp + 0x34], eax
mov edi, eax
lea esi, [esi]
mov dword [esp], ebx
add edi, 4
call sym.zsh.exe_ugetnode
mov dword [edi - 4], eax
test eax, eax
jne 0x40dd38
test esi, esi
je 0x40e16f
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
mov edi, dword [eax]
lea esi, [esi]
test edi, edi
je 0x40e017
movzx eax, byte [edi]
mov byte [esp + 0x3e], al
cmp al, 0x2d
je 0x40dd86
test byte [esp + 0x28], 2
je 0x40e017
cmp al, 0x2b
jne 0x40e017
test dword [esp + 0x28], 0x2000
jne 0x40dda2
movzx eax, byte [edi + 1]
test byte [eax + eax + sym.zsh.exe_typtab], 1
jne 0x40e017
test dword [esp + 0x28], 0x4000
je 0x40ddb6
cmp byte [edi + 1], 0
je 0x40e017
test dword [esp + 0x28], 0x8000
je 0x40ddd0
cmp byte [edi], 0x2d
jne 0x40ddd0
cmp byte [edi + 1], 0x2d
je 0x40e121
nop
test dword [esp + 0x28], 0x1000
jne 0x40dff0
movzx ecx, byte [edi + 1]
cmp cl, 0x2d
jne 0x40ddee
movzx ecx, byte [edi + 2]
add edi, 1
lea ebx, [edi + 1]
test cl, cl
jne 0x40de12
cmp byte [esp + 0x3e], 0x2d
mov byte [esp + 0x71], 1
je 0x40de06
mov byte [esp + 0x6f], 1
movzx ecx, byte [edi + 1]
test cl, cl
je 0x40e25e
cmp byte [esp + 0x3e], 0x2d
mov edi, ecx
setne byte [esp + 0x20]
movzx eax, byte [esp + 0x20]
add eax, 1
mov byte [esp + 0x20], al
jmp 0x40de41
movzx edi, byte [ebx + 1]
add ebx, 1
mov eax, edi
test al, al
je 0x40def9
lea eax, [ebx - 1]
mov dword [esp], esi
mov dword [esp + 0x24], eax
mov eax, edi
movsx ebp, al
mov dword [esp + 4], ebp
call sub.cygwin1.dll_strchr
test eax, eax
je 0x40e480
movzx edx, byte [esp + 0x20]
mov byte [esp + ebp + 0x44], dl
cmp byte [eax + 1], 0x3a
jne 0x40de30
movzx eax, byte [eax + 2]
movzx ecx, byte [ebx + 1]
cmp al, 0x3a
je 0x40df60
cmp al, 0x25
je 0x40dfa8
mov edi, ebp
lea ebp, [ebx + 1]
test cl, cl
jne 0x40dea9
mov ecx, dword [esp + 0x2c]
mov ebx, dword [ecx + 4]
lea eax, [ecx + 4]
test ebx, ebx
je 0x40e21a
mov dword [esp + 0x2c], eax
mov ebp, ebx
mov eax, dword [esp + 0xc8]
cmp eax, 0x3f
je 0x40df7d
cmp eax, dword [esp + 0xcc]
je 0x40e0e8
mov edx, dword [esp + 0xc4]
lea ecx, [eax + 1]
mov dword [esp + 0xc8], ecx
shl ecx, 2
or byte [esp + edi + 0x44], cl
mov dword [edx + eax*4], ebp
cmp byte [ebx + 1], 0
je 0x40def9
lea esi, [esi]
nop
add ebx, 1
cmp byte [ebx + 1], 0
jne 0x40def0
mov ecx, dword [esp + 0x2c]
test byte [esp + 0x28], 4
movzx eax, byte [esp + 0x71]
lea edx, [ecx + 4]
mov edi, dword [ecx + 4]
mov dword [esp + 0x2c], edx
je 0x40df40
cmp byte [esp + 0x96], 0
je 0x40df40
cmp byte [esp + 0xaa], 0
mov dword [esp + 0x2c], edx
jne 0x40df40
or dword [esp + 0x28], 0x1000
mov esi, 0x4f0d81
lea esi, [esi]
nop
test al, al
je 0x40dd60
mov eax, edx
sub eax, dword [esp + 0x34]
mov dword [esp + 0x2c], edx
sar eax, 2
sub dword [esp + 0x38], eax
jmp 0x40e026
test cl, cl
je 0x40de30
mov eax, dword [esp + 0xc8]
mov edi, ebp
lea ebp, [ebx + 1]
cmp eax, 0x3f
jne 0x40deb9
mov eax, dword [esp + 0x30]
mov dword [esp + 4], str.too_many_option_arguments
mov dword [esp], eax
call sym.zsh.exe_zwarnnam
mov eax, 1
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
test cl, cl
je 0x40dfb6
test byte [ecx + ecx + sym.zsh.exe_typtab], 1
jne 0x40df68
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 4]
test edx, edx
je 0x40de30
movzx eax, byte [edx]
test byte [eax + eax + sym.zsh.exe_typtab], 1
je 0x40de30
add ecx, 4
mov edi, ebp
mov ebx, edx
mov ebp, edx
mov dword [esp + 0x2c], ecx
jmp 0x40dea9
mov ebx, edi
lea esi, [esi]
movsx eax, byte [ebx + 1]
add ebx, 1
test al, al
je 0x40ddde
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.cygwin1.dll_strchr
test eax, eax
jne 0x40dff8
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x34]
sar eax, 2
sub dword [esp + 0x38], eax
mov eax, dword [esp + 0xf8]
mov edx, dword [eax + 0x20]
test edx, edx
je 0x40e057
movsx eax, byte [edx]
test al, al
je 0x40e057
lea esi, [esi]
nop
cmp byte [esp + eax + 0x44], 0
jne 0x40e04c
mov byte [esp + eax + 0x44], 1
movsx eax, byte [edx + 1]
add edx, 1
test al, al
jne 0x40e040
mov eax, dword [sym.zsh.exe_errflag]
test eax, eax
jne 0x40e1c2
mov eax, dword [esp + 0xf8]
mov esi, dword [esp + 0x38]
cmp dword [eax + 0x10], esi
jg 0x40e1f5
mov eax, dword [eax + 0x14]
cmp eax, 0xffffffff
je 0x40e088
cmp eax, esi
jl 0x40e475
cmp byte [esp + 0x3f], 0
jne 0x40e28b
mov eax, dword [esp + 0xf8]
mov esi, dword [esp + 0xf8]
mov eax, dword [eax + 0xc]
mov edx, dword [esi + 0x18]
test dword [esp + 0x28], 0x80000
je 0x40e23c
lea esi, [esp + 0x44]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0xf4]
mov dword [esp + 8], esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 4], esi
mov esi, dword [esp + 0x30]
mov dword [esp], esi
call eax
jmp 0x40df96
lea eax, [eax*4 + 0x40]
mov dword [esp], eax
call sym.zsh.exe_zhalloc
mov edx, eax
mov eax, dword [esp + 0xcc]
test eax, eax
jne 0x40e144
add eax, 0x10
mov dword [esp + 0xc4], edx
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0xc8]
jmp 0x40decd
cmp byte [edi + 2], 0
jne 0x40ddd0
add dword [esp + 0x2c], 4
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x34]
sar eax, 2
sub dword [esp + 0x38], eax
jmp 0x40e026
shl eax, 2
mov dword [esp], edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0xc4]
mov dword [esp + 0x20], edx
mov dword [esp + 4], eax
call sub.cygwin1.dll_memcpy
mov eax, dword [esp + 0xcc]
mov edx, dword [esp + 0x20]
jmp 0x40e104
mov esi, dword [esp + 0x34]
mov dword [esp + 0x2c], esi
test dword [esp + 0x28], 0x40000
jne 0x40e026
mov eax, dword [esi]
test eax, eax
je 0x40e026
cmp byte [eax], 0x2d
jne 0x40e4c8
cmp byte [eax + 1], 0x2d
jne 0x40e4c8
cmp byte [eax + 2], 0
jne 0x40e4c8
lea eax, [esi + 4]
sub dword [esp + 0x38], 1
mov byte [esp + 0x71], 1
mov dword [esp + 0x2c], eax
jmp 0x40e026
and eax, 0xfffffffe
mov dword [sym.zsh.exe_errflag], eax
add esp, 0xdc
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.00446a40
add esp, 0xdc
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x4f017c
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call sym.zsh.exe_zwarnnam
add esp, 0xdc
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
mov dword [esp + 8], edi
mov dword [esp + 4], str.argument_expected:___c
mov dword [esp], eax
call sym.zsh.exe_zwarnnam
mov eax, 1
jmp 0x40df96
lea esi, [esp + 0x44]
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 4], esi
mov esi, dword [esp + 0x30]
mov dword [esp], esi
call eax
jmp 0x40df96
mov eax, dword [esp + 0x2c]
mov edi, dword [eax + 4]
lea edx, [eax + 4]
test byte [esp + 0x28], 4
je 0x40df48
cmp byte [esp + 0x96], 0
je 0x40df48
mov eax, 1
jmp 0x40df1d
call fcn.0047a5b0
mov eax, dword [0x523b74]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_fputs
mov eax, dword [esp + 0x34]
mov ebx, dword [eax]
test ebx, ebx
je 0x40e2e5
mov ebx, dword [esp + 0x34]
mov eax, dword [0x523b74]
mov dword [esp], 0x20
add ebx, 4
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov eax, dword [0x523b74]
mov dword [esp + 4], eax
mov eax, dword [ebx - 4]
mov dword [esp], eax
call sym.zsh.exe_quotedzputs
mov edx, dword [ebx]
test edx, edx
jne 0x40e2b3
mov ecx, dword [esp + 0xf4]
test ecx, ecx
je 0x40e44e
mov eax, dword [esp + 0xf4]
mov ebx, dword [eax]
test ebx, ebx
jne 0x40e34a
jmp 0x40e44e
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40e340
mov eax, dword [0x523b74]
mov dword [esp], 0x3d
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov eax, dword [0x523b74]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sym.zsh.exe_quotedzputs
mov ebx, dword [ebx]
test ebx, ebx
je 0x40e44e
mov eax, dword [0x523b74]
mov dword [esp], 0x20
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov eax, dword [0x523b74]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sym.zsh.exe_quotedzputs
test byte [ebx + 0x10], 1
je 0x40e310
mov eax, dword [0x523b74]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], 0x4f0db5
call sub.cygwin1.dll_fwrite
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40e424
mov esi, dword [eax]
test byte [ebx + 0x10], 2
je 0x40e500
jmp 0x40e420
mov edi, dword [esi]
mov eax, dword [0x523b74]
test edi, edi
je 0x40e429
mov dword [esp + 4], eax
mov dword [esp], 0x5b
call sub.cygwin1.dll_fputc
mov eax, dword [0x523b74]
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov dword [esp], eax
call sym.zsh.exe_quotedzputs
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], 0x4f0dbb
call sub.cygwin1.dll_fwrite
mov eax, dword [0x523b74]
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call sym.zsh.exe_quotedzputs
mov esi, dword [edi]
test esi, esi
jne 0x40e3b3
mov eax, dword [0x523b74]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x4f0db8
call sub.cygwin1.dll_fwrite
jmp 0x40e340
mov eax, dword [0x523b74]
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov eax, dword [0x523b74]
mov dword [esp], eax
call sub.cygwin1.dll_fflush
jmp 0x40e093
mov eax, 0x4f0561
jmp 0x40e1fa
mov ecx, edi
mov ebp, dword [esp + 0x24]
cmp cl, 0x83
je 0x40e509
movzx eax, byte [ebx]
movsx eax, al
mov dword [esp + 4], str.bad_option:__c_c
mov dword [esp + 0xc], eax
xor eax, eax
cmp byte [esp + 0x3e], 0x2d
sete al
movsx eax, byte [eax + 0x4f0dbe]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call sym.zsh.exe_zwarnnam
mov eax, 1
jmp 0x40df96
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
jmp 0x40e026
mov eax, dword [0x523b74]
mov dword [esp], 0x20
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov eax, dword [0x523b74]
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov dword [esp], eax
call sym.zsh.exe_quotedzputs
mov esi, dword [esi]
test esi, esi
jne 0x40e4d5
jmp 0x40e424
movzx eax, byte [ebp + 2]
xor eax, 0x20
mov byte [ebp + 2], al
jmp 0x40e48e