Function at 0x408d10
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov esi, dword [esp + 0x78]
mov ebp, dword [esp + 0x74]
mov ebx, dword [esi + 0xc]
test ebx, ebx
jne 0x408e80
test byte [esp + 0x7c], 1
jne 0x408ef0
mov eax, dword [esp + 0x7c]
and eax, 9
cmp eax, 1
jne 0x409115
mov eax, dword [ebp + 8]
add eax, eax
test eax, 0x3fe
jne 0x409085
add ebx, eax
mov dword [esp + 4], 1
mov dword [esp + 8], ebx
mov eax, dword [esi]
mov dword [esp], eax
call fcn.0041a7e0
test eax, eax
je 0x40912a
mov dword [esi], eax
mov dword [esi + 0xc], ebx
test byte [esp + 0x7c], 0x10
jne 0x408e99
mov eax, dword [ebp + 4]
add eax, dword [ebp]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
mov edi, dword [esp + 0x7c]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 8]
add edx, ecx
and edi, 8
mov dword [esp + 0x28], edi
mov dword [esp + 0x44], eax
jne 0x408ed0
mov ecx, edx
not ecx
add ecx, dword [esi + 0xc]
mov dword [esp + 0x48], ecx
add edx, dword [esi]
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x74], ebp
mov dword [esp + 0x4c], edx
test eax, eax
je 0x409101
mov eax, dword [esp + 0x7c]
lea ebp, [esp + 0x44]
lea edi, [esp + 0x40]
and eax, 2
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x7c]
and eax, 9
mov dword [esp + 0x2c], eax
nop
lea eax, [esp + 0x48]
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x4c]
mov dword [esp + 0xc], eax
call sub.cygiconv_2.dll_libiconv
cmp eax, 0xffffffff
jne 0x4090a0
call sub.cygwin1.dll___errno
cmp dword [eax], 4
je 0x408df0
call sub.cygwin1.dll___errno
cmp dword [eax], 0x16
jne 0x408f83
test byte [esp + 0x7c], 4
je 0x408f9c
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x408f4e
mov eax, dword [esp + 0x4c]
lea edx, [eax + 1]
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x40]
lea ecx, [edx + 1]
mov dword [esp + 0x40], ecx
movzx edx, byte [edx]
mov byte [eax], dl
mov eax, dword [esp + 0x44]
sub dword [esp + 0x48], 1
sub eax, 1
test eax, eax
mov dword [esp + 0x44], eax
jne 0x408df0
jmp 0x408dc8
mov eax, dword [esi + 8]
add eax, 1
cmp ebx, eax
jbe 0x408d35
test byte [esp + 0x7c], 0x10
je 0x408d85
mov eax, dword [esp + 0x70]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.cygiconv_2.dll_libiconv
jmp 0x408d85
mov ebx, dword [esi + 0xc]
cmp edx, ebx
jb 0x409070
sub edx, ebx
sub ecx, 1
sub ecx, edx
mov dword [esp + 0x48], ecx
jmp 0x408dba
mov eax, dword [ebp + 8]
lea ebx, [eax + eax]
test ebx, 0x3fe
jne 0x409092
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.0041a790
test eax, eax
mov dword [esi], eax
je 0x409136
mov dword [esi + 0xc], ebx
mov dword [esi + 4], 0
mov dword [esi + 8], 0
jmp 0x408d7a
call sub.cygwin1.dll___errno
cmp dword [eax], 7
jne 0x4090c6
mov eax, dword [esi]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x28]
sub ecx, eax
test edx, edx
je 0x408fa2
mov edx, dword [esi + 4]
cmp ecx, edx
jbe 0x408fa2
cmp edx, 1
jbe 0x408fa2
cmp ecx, dword [esi + 0xc]
jb 0x4090b0
sub edx, 1
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], edx
jmp 0x408df0
call sub.cygwin1.dll___errno
cmp dword [eax], 0x8a
jne 0x408f40
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x408e3c
mov ebp, dword [esp + 0x74]
jmp 0x408fb8
cmp dword [esp + 0x2c], 1
je 0x409000
mov ebp, dword [esp + 0x74]
call sub.cygwin1.dll___errno
mov dword [eax], 7
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x4c]
sub eax, dword [esi]
mov edx, dword [esi + 4]
test ecx, ecx
je 0x408fd0
cmp eax, edx
jae 0x408fd0
add eax, dword [esi + 0xc]
sub eax, edx
mov dword [esi + 8], eax
mov eax, dword [esp + 0x44]
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x40]
sub eax, dword [ebp]
mov dword [ebp + 4], eax
call sub.cygwin1.dll___errno
mov eax, dword [eax]
test eax, eax
setne al
movzx eax, al
neg eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x74]
mov edx, dword [edx + 8]
mov dword [esp + 0x34], edx
add edx, edx
test edx, 0x3fe
je 0x40901e
or edx, 0x3ff
add edx, 1
mov dword [esp + 0x3c], ecx
mov ecx, edx
add ecx, dword [esi + 0xc]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x38], edx
mov dword [esp + 8], ecx
mov dword [esp + 0x34], ecx
call fcn.0041a7e0
test eax, eax
je 0x40912a
mov ecx, dword [esp + 0x34]
mov dword [esi], eax
mov edx, dword [esp + 0x38]
add dword [esp + 0x48], edx
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0x3c]
add eax, ecx
mov dword [esp + 0x4c], eax
jmp 0x408df0
sub ebx, edx
test ecx, ecx
sete cl
movzx ecx, cl
sub ebx, ecx
mov dword [esp + 0x48], ebx
jmp 0x408dba
or eax, 0x3ff
add eax, 1
jmp 0x408d55
or ebx, 0x3ff
add ebx, 1
jmp 0x408f02
mov eax, dword [esp + 0x44]
jmp 0x408dc8
mov dword [esp + 4], ecx
mov dword [esp], esi
call fcn.00428830
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x408f73
call sub.cygwin1.dll___errno
mov dword [esp + 8], str.unexpected_error_from_iconv__
mov eax, dword [eax]
mov dword [esp], 3
mov dword [esp + 4], eax
call fcn.0041f9e0
mov dword [esp + 8], 0xf7
mov dword [esp + 4], str.rsync.c
mov dword [esp], 4
call fcn.00412fd0
mov ebp, dword [esp + 0x74]
call sub.cygwin1.dll___errno
mov dword [eax], 0
jmp 0x408fb8
call sub.cygwin1.dll___errno
mov dword [eax], 7
mov eax, 0xffffffff
jmp 0x408ff7
mov dword [esp], 0x454813
call fcn.0041a8d0
mov dword [esp], 0x454808
call fcn.0041a8d0
lea esi, [esi]
lea edi, [edi]