Function at 0x405e40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x1ac
mov byte [ebp - 0x189], cl
mov dword [ebp - 0x184], eax
call sub.cygwin1.dll___errno
mov dword [eax], 0
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call sub.cygwin1.dll_opendir
test eax, eax
mov edi, eax
je 0x4064df
mov edx, dword [0x41a054]
test edx, edx
je 0x405f5e
mov dword [esp], eax
call sub.cygwin1.dll_dirfd
test eax, eax
js 0x40638c
lea edx, [ebp - 0x178]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygwin1.dll__fstat64
shr eax, 0x1f
test al, al
jne 0x406359
mov edx, dword [ebp - 0x170]
mov ecx, dword [ebp - 0x16c]
mov eax, dword [ebp - 0x178]
mov dword [esp], 0x10
mov dword [ebp - 0x190], edx
mov dword [ebp - 0x194], ecx
mov dword [ebp - 0x180], eax
call fcn.0040a000
mov edx, dword [ebp - 0x190]
mov ecx, dword [ebp - 0x194]
mov dword [eax], edx
mov edx, dword [ebp - 0x180]
mov esi, eax
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [esp + 4], eax
mov eax, dword [0x41a054]
mov dword [esp], eax
call fcn.00411510
test eax, eax
je 0x406504
cmp esi, eax
jne 0x406440
mov eax, dword [0x41a06c]
mov edx, dword [0x41a070]
sub edx, eax
cmp edx, 0xf
jle 0x40649d
lea edx, [eax + 0x10]
mov ecx, dword [ebp - 0x16c]
mov dword [0x41a06c], edx
mov edx, dword [ebp - 0x178]
mov dword [eax + 8], edx
mov edx, dword [ebp - 0x170]
mov dword [eax + 4], ecx
mov dword [eax], edx
cmp byte [0x41a050], 0
je 0x4060f5
cmp byte [0x4140e4], 0
je 0x40610f
cmp byte [0x41a095], 0
mov byte [0x4140e4], 0
jne 0x406136
test ebx, ebx
mov esi, dword [0x41a168]
cmove ebx, dword [ebp - 0x184]
call sub.cygwin1.dll___getreent
mov ecx, esi
mov edx, ebx
mov eax, dword [eax + 8]
mov dword [esp], 0
call fcn.00403570
add eax, dword [0x41a118]
cmp byte [0x41a095], 0
mov dword [0x41a118], eax
je 0x405fe5
mov edx, dword [0x41a0ec]
lea ecx, [edx + 4]
cmp dword [0x41a0f0], ecx
jb 0x4063ac
mov dword [edx], eax
add dword [0x41a0ec], 4
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x4145e5
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
add dword [0x41a118], 2
call fcn.00401430
movzx edx, byte [ebp - 0x189]
mov dword [ebp - 0x180], 0
mov dword [ebp - 0x17c], 0
mov dword [ebp - 0x188], edx
jmp 0x4060a5
test eax, eax
jne 0x406054
mov eax, dword [0x41a140]
mov edx, ebx
call fcn.004041f0
test al, al
jne 0x4060a0
mov eax, dword [0x41a13c]
mov edx, ebx
call fcn.004041f0
test al, al
jne 0x4060a0
movzx eax, byte [esi + 0xc]
sub eax, 1
cmp al, 0xd
jbe 0x4061a0
xor edx, edx
mov eax, dword [ebp - 0x184]
xor ecx, ecx
mov dword [esp], eax
mov eax, ebx
call fcn.00404cd0
add dword [ebp - 0x180], eax
adc dword [ebp - 0x17c], edx
cmp dword [0x41a038], 1
je 0x406314
call fcn.00403b00
call sub.cygwin1.dll___errno
mov dword [eax], 0
mov dword [esp], edi
call sub.cygwin1.dll_readdir
test eax, eax
mov esi, eax
je 0x4061b0
lea ebx, [eax + 0x14]
mov eax, dword [0x41a138]
cmp eax, 2
je 0x406054
cmp byte [esi + 0x14], 0x2e
jne 0x406040
test eax, eax
je 0x4060a0
movzx eax, byte [esi + 0x15]
cmp al, 0x2e
je 0x406350
test al, al
je 0x4060a0
lea esi, [esi]
jmp 0x406054
cmp byte [0x41a024], 0
je 0x406014
cmp byte [0x4140e4], 0
jne 0x405f78
mov dword [esp], 0xa
call sub.cygwin1.dll_putchar_unlocked
add dword [0x41a118], 1
cmp byte [0x41a095], 0
mov byte [0x4140e4], 0
je 0x405f8c
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x414521
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov edx, dword [0x41a118]
add edx, 2
cmp byte [0x41a095], 0
mov dword [0x41a118], edx
je 0x405f8c
mov eax, dword [0x41a0ec]
lea ecx, [eax + 4]
cmp dword [0x41a0f0], ecx
jb 0x4064bb
mov dword [eax], edx
add dword [0x41a0ec], 4
jmp 0x405f8c
movzx eax, al
mov edx, dword [eax*4 + 0x4175e0]
jmp 0x406075
call sub.cygwin1.dll___errno
mov eax, dword [eax]
test eax, eax
je 0x4061eb
mov dword [esp], str.reading_directory__s
call sub.cygintl_8.dll_libintl_gettext
mov ecx, dword [ebp - 0x184]
mov edx, eax
mov eax, dword [ebp - 0x188]
call fcn.004023f0
call sub.cygwin1.dll___errno
cmp dword [eax], 0x8b
je 0x4060a0
mov dword [esp], edi
call sub.cygwin1.dll_closedir
test eax, eax
jne 0x4063e7
call fcn.004025f0
cmp byte [0x41a050], 0
jne 0x4063d0
mov esi, dword [0x41a038]
test esi, esi
je 0x40623a
cmp byte [0x41a091], 0
jne 0x40623a
mov ebx, dword [0x41a114]
test ebx, ebx
je 0x40622f
call fcn.00405b40
add esp, 0x1ac
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [0x41a095], 0
jne 0x40640c
mov dword [esp], str.total
call sub.cygintl_8.dll_libintl_gettext
mov ebx, eax
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputs
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
mov dword [esp], 0x20
add dword [0x41a118], eax
call sub.cygwin1.dll_putchar_unlocked
mov eax, dword [0x41a158]
mov edx, dword [0x41a15c]
add dword [0x41a118], 1
mov dword [esp + 0x18], eax
mov eax, dword [0x41a14c]
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x17c]
mov dword [esp + 0x10], 0x400
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x178]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040ae30
mov ebx, eax
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputs
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
mov dword [esp], 0xa
add dword [0x41a118], eax
call sub.cygwin1.dll_putchar_unlocked
add dword [0x41a118], 1
jmp 0x406220
cmp dword [0x41a08c], 0xffffffff
jne 0x4060a0
cmp byte [0x41a091], 0
jne 0x4060a0
cmp byte [0x41a050], 0
jne 0x4060a0
call fcn.004025f0
call fcn.00405b40
call fcn.00401430
jmp 0x4060a0
movzx eax, byte [esi + 0x16]
jmp 0x4060e9
mov dword [esp], str.cannot_determine_device_and_inode_of__s
call sub.cygintl_8.dll_libintl_gettext
mov ecx, dword [ebp - 0x184]
mov edx, eax
movzx eax, byte [ebp - 0x189]
call fcn.004023f0
mov dword [esp], edi
call sub.cygwin1.dll_closedir
add esp, 0x1ac
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x184]
lea eax, [ebp - 0x178]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.cygwin1.dll__stat64
shr eax, 0x1f
jmp 0x405eb0
mov dword [esp + 4], 4
mov dword [esp], 0x41a0e0
call fcn.0040bd40
mov eax, dword [0x41a118]
mov edx, dword [0x41a0ec]
jmp 0x405fdc
movzx edx, byte [ebp - 0x189]
mov eax, dword [ebp - 0x184]
call fcn.004033e0
jmp 0x40620d
mov dword [esp], str.closing_directory__s
call sub.cygintl_8.dll_libintl_gettext
mov ecx, dword [ebp - 0x184]
mov edx, eax
movzx eax, byte [ebp - 0x189]
call fcn.004023f0
jmp 0x4061fb
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x414521
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
add dword [0x41a118], 2
jmp 0x406247
mov dword [esp], esi
call sub.cygwin1.dll_free
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call fcn.00409b30
mov dword [esp], str._s:_not_listing_already_listed_directory
mov ebx, eax
call sub.cygintl_8.dll_libintl_gettext
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], eax
call sub.cygwin1.dll_error
mov dword [esp], edi
call sub.cygwin1.dll_closedir
mov dword [0x41a020], 2
add esp, 0x1ac
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], 0x10
mov dword [esp], 0x41a060
call fcn.0040bd40
mov eax, dword [0x41a06c]
jmp 0x405f3b
mov dword [esp + 4], 4
mov dword [esp], 0x41a0e0
call fcn.0040bd40
mov eax, dword [0x41a0ec]
mov edx, dword [0x41a118]
jmp 0x40618e
mov dword [esp], str.cannot_open_directory__s
call sub.cygintl_8.dll_libintl_gettext
mov ecx, dword [ebp - 0x184]
mov edx, eax
movzx eax, byte [ebp - 0x189]
call fcn.004023f0
jmp 0x40622f
call fcn.0040a8f0
lea esi, [esi]
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
mov dword [ebp - 8], esi
mov esi, dword [eax]
mov dword [esp + 4], 0x2e
mov dword [esp], esi
call sub.cygwin1.dll_strrchr
mov ebx, eax
mov eax, dword [ebp + 8]
mov edi, dword [eax]
mov dword [esp + 4], 0x2e
mov dword [esp], edi
call sub.cygwin1.dll_strrchr
mov edx, 0x414515
test eax, eax
cmove eax, edx
test ebx, ebx
cmove ebx, edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.cygwin1.dll_strcmp
test eax, eax
je 0x406577
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov dword [ebp + 0xc], edi
mov ebx, dword [ebp - 0xc]
mov dword [ebp + 8], esi
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov esp, ebp
pop ebp
jmp sub.cygwin1.dll_strcmp