Function at 0x47ead0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
mov esi, dword [esp + 0x54]
cmp byte [ebx], 0
jne 0x47eb30
test esi, esi
jne 0x47eb00
mov dword [esp + 0x50], 0x4fa1da
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp sym.zsh.exe_dupstring
mov dword [esp + 0xc], esi
xor edi, edi
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x4fa1da
call sub.cygwin1.dll_fwrite
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call sym.zsh.exe_is_mb_niceformat
test eax, eax
je 0x47ec00
test esi, esi
jne 0x47eba8
lea eax, [esp + 0x2c]
mov dword [esp], ebx
mov dword [esp + 0xc], 6
mov dword [esp + 8], eax
mov dword [esp + 4], 0
call sym.zsh.exe_mb_niceformat
mov ebx, dword [esp + 0x2c]
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
add eax, 4
mov dword [esp], eax
call sym.zsh.exe_zhalloc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x4fa1e0
mov edi, eax
mov dword [esp], eax
call sub.cygwin1.dll_sprintf
mov dword [esp], ebx
call fcn.004e5e70
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], esi
xor edi, edi
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x4fa1dd
call sub.cygwin1.dll_fwrite
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
call sym.zsh.exe_mb_niceformat
mov dword [esp + 4], esi
mov dword [esp], 0x27
call sub.cygwin1.dll_fputc
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, byte [ebx]
mov ebp, ebx
mov eax, edx
test dl, dl
jne 0x47ec1f
jmp 0x47ed20
movzx eax, byte [edi + 1]
lea ebp, [edi + 1]
test al, al
je 0x47ed20
movzx ecx, al
mov edi, ebp
cmp al, 0x83
jne 0x47ec35
movzx ecx, byte [ebp + 1]
add edi, 1
xor ecx, 0x20
movzx ecx, cl
test byte [ecx + ecx + 0x523921], 8
je 0x47ec10
movzx ecx, byte [0x522d58]
test esi, esi
je 0x47ed48
xor edi, edi
test cl, cl
jne 0x47f0a8
mov dword [esp + 0x18], edi
xor eax, eax
mov ebp, esi
mov dword [esp + 0x1c], edi
mov edi, ebx
lea esi, [esi]
lea esi, [esi]
lea esi, [edi + 1]
cmp dl, 0x9b
je 0x47ee50
movsx ebx, dl
cmp dl, 0x83
jne 0x47ec91
movzx ebx, byte [edi + 1]
lea esi, [edi + 2]
xor ebx, 0x20
movsx ebx, bl
mov edi, esi
cmp ebx, 0x27
jne 0x47eea0
test eax, eax
je 0x47ef70
test ebp, ebp
je 0x47f050
mov dword [esp + 4], ebp
mov dword [esp], 0x27
call sub.cygwin1.dll_putc
test eax, eax
js 0x47ed10
mov dword [esp + 4], ebp
mov dword [esp], 0x4f9f31
call sub.cygwin1.dll_fputs
test eax, eax
js 0x47ed10
xor eax, eax
movzx edx, byte [edi]
test dl, dl
jne 0x47ec70
mov edi, dword [esp + 0x1c]
mov esi, ebp
test eax, eax
je 0x47f0f6
test ebp, ebp
je 0x47f115
mov dword [esp + 4], esi
mov dword [esp], 0x27
call sub.cygwin1.dll_fputc
test eax, eax
jns 0x47eb22
lea esi, [esi]
nop
xor edi, edi
jmp 0x47eb22
test esi, esi
jne 0x47ed30
mov dword [esp + 0x50], ebx
jmp 0x47eaf0
mov dword [esp + 4], esi
xor edi, edi
mov dword [esp], ebx
call sym.zsh.exe_zputs
jmp 0x47eb22
mov dword [esp], ebx
mov edi, ebx
mov byte [esp + 0x1c], cl
mov byte [esp + 0x18], dl
call sub.cygwin1.dll_strlen
movzx ecx, byte [esp + 0x1c]
movzx edx, byte [esp + 0x18]
add eax, 2
cmp cl, 1
sbb ebp, ebp
and ebp, 2
add ebp, 1
lea esi, [esi]
lea ecx, [edi + 1]
cmp dl, 0x83
je 0x47ed8c
mov ecx, edi
mov edi, eax
add eax, ebp
cmp dl, 0x27
cmovne eax, edi
movzx edx, byte [ecx + 1]
lea edi, [ecx + 1]
test dl, dl
jne 0x47ed78
add eax, 1
mov dword [esp], eax
call sym.zsh.exe_zhalloc
cmp byte [0x522d58], 0
mov edi, eax
je 0x47f108
mov byte [eax], 0x27
movzx ecx, byte [ebx]
lea edx, [eax + 1]
test cl, cl
je 0x47f0e8
mov dword [esp + 0x18], edi
mov ebp, ebx
mov edi, esi
mov esi, edx
jmp 0x47ee30
movsx ebx, cl
cmp cl, 0x83
jne 0x47ede5
movzx ebx, byte [ebp + 1]
lea eax, [ebp + 2]
xor ebx, 0x20
movsx ebx, bl
mov ebp, eax
cmp ebx, 0x27
jne 0x47ef00
test edi, edi
je 0x47f020
mov dword [esp + 4], edi
mov dword [esp], 0x27
call sub.cygwin1.dll_fputc
test eax, eax
js 0x47ed10
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.cygwin1.dll_fputc
test eax, eax
js 0x47ed10
movzx ecx, byte [ebp]
test cl, cl
je 0x47f0d8
lea eax, [ebp + 1]
cmp cl, 0x9b
jne 0x47edd0
mov ebx, 0x2d
test edi, edi
je 0x47ef40
mov ebp, eax
jmp 0x47ee10
test eax, eax
jne 0x47ef90
test ebp, ebp
je 0x47f038
mov dword [esp + 4], ebp
mov dword [esp], 0x27
call sub.cygwin1.dll_fputc
test eax, eax
js 0x47ed10
mov edi, esi
mov ebx, 0x2d
mov dword [esp + 4], ebp
mov dword [esp], ebx
call sub.cygwin1.dll_fputc
test eax, eax
js 0x47ed10
mov eax, 1
jmp 0x47ecd6
test eax, eax
jne 0x47efe0
test ebp, ebp
je 0x47f060
mov dword [esp + 4], ebp
mov dword [esp], 0x27
call sub.cygwin1.dll_fputc
test eax, eax
js 0x47ed10
cmp ebx, 0xa
jne 0x47ee7f
cmp byte [0x522cee], 0
je 0x47ef68
mov dword [esp + 4], ebp
mov dword [esp], 0x5c
call sub.cygwin1.dll_fputc
test eax, eax
js 0x47ed10
mov ebx, 0xa
jmp 0x47ee7f
cmp ebx, 0xa
jne 0x47ee3d
cmp byte [0x522cee], 0
je 0x47ee3d
test edi, edi
je 0x47f090
mov dword [esp + 4], edi
mov dword [esp], 0x5c
call sub.cygwin1.dll_fputc
test eax, eax
jns 0x47ee10
xor edi, edi
jmp 0x47eb22
movzx ecx, bl
mov ebp, eax
test byte [ecx + ecx + 0x523921], 0x10
je 0x47efd0
xor ebx, 0x20
mov byte [esi], 0x83
add esi, 2
mov byte [esi - 1], bl
jmp 0x47ee24
mov edi, esi
jmp 0x47ee7f
test ebp, ebp
jne 0x47ecc0
mov eax, dword [esp + 0x18]
lea edx, [eax + 2]
mov dword [esp + 0x18], edx
mov edx, 0x275c
mov word [eax], dx
jmp 0x47ecd4
mov ebx, 0x2d
test ebp, ebp
jne 0x47ef68
mov eax, dword [esp + 0x18]
mov edi, esi
movzx edx, bl
test byte [edx + edx + 0x523921], 0x10
je 0x47f010
lea edx, [eax + 2]
xor ebx, 0x20
mov byte [eax], 0x83
mov byte [eax + 1], bl
mov eax, 1
mov dword [esp + 0x18], edx
jmp 0x47ecd6
mov byte [esi], bl
add esi, 1
jmp 0x47ee24
cmp ebx, 0xa
jne 0x47ef95
cmp byte [0x522cee], 0
je 0x47ef95
test ebp, ebp
jne 0x47eeda
mov esi, dword [esp + 0x18]
mov ebx, 0xa
mov byte [esi], 0x5c
lea eax, [esi + 1]
jmp 0x47ef9f
lea edx, [eax + 1]
mov byte [eax], bl
mov dword [esp + 0x18], edx
jmp 0x47ee93
mov byte [esi], 0x27
mov ecx, 0x27
add esi, 1
mov ebx, 0x27
jmp 0x47ef45
mov edx, dword [esp + 0x18]
mov edi, esi
mov ebx, 0x2d
mov byte [edx], 0x27
lea eax, [edx + 1]
jmp 0x47ef9f
mov esi, dword [esp + 0x18]
mov byte [esi], 0x27
lea eax, [esi + 1]
jmp 0x47ef7c
mov edx, dword [esp + 0x18]
mov byte [edx], 0x27
lea eax, [edx + 1]
cmp ebx, 0xa
jne 0x47ef9f
cmp byte [0x522cee], 0
mov dword [esp + 0x18], eax
jne 0x47eff6
jmp 0x47ef99
mov byte [esi], 0x5c
mov ecx, 0xa
add esi, 1
mov ebx, 0xa
jmp 0x47ef45
mov dword [esp + 4], esi
mov dword [esp], 0x27
call sub.cygwin1.dll_fputc
test eax, eax
js 0x47ed10
movzx ecx, byte [ebx]
xor edi, edi
xor edx, edx
test cl, cl
jne 0x47edc2
jmp 0x47ecf3
mov edx, esi
mov esi, edi
mov edi, dword [esp + 0x18]
test esi, esi
jne 0x47ecf3
mov byte [edx], 0x27
lea eax, [edx + 1]
mov byte [eax], 0
jmp 0x47eb22
test ebp, ebp
jne 0x47eb22
mov eax, dword [esp + 0x18]
jmp 0x47f0ee
movzx edx, byte [ebx]
test dl, dl
jne 0x47ec58
jmp 0x47f0ee
mov edx, dword [esp + 0x18]
jmp 0x47f0e8