Function at 0x40d670
Capabilities:
Send data
Send data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov edx, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [ebp - 0x1c], edx
xor edx, edx
cmp byte [ebx + 0x28], 0
jne 0x40d6b0
mov eax, dword [ebp - 0x1c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x40d936
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], eax
lea eax, [ebp - 0x48]
lea esi, [ebp - 0x2c]
mov dword [esp], eax
lea edi, [ebx + 0xd0]
mov dword [esp + 4], ebx
call fcn.0040b890
lea eax, [ebp - 0x48]
sub esp, 4
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.0040b660
sub esp, 4
lea eax, [ebp - 0x4c]
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.004086d0
mov eax, dword [ebp - 0x20]
sub esp, 4
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x40d8e0
mov eax, dword [ebx + 0xb0]
mov edx, dword [ebp - 0x4c]
lea edi, [ebx + 0x30]
mov dword [ebp - 0x60], eax
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 4]
test eax, eax
js 0x40d72f
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.00451198
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0x18]
cmp eax, dword [ebx + 8]
je 0x40d93b
mov ecx, dword [ebx + 0x24]
cmp eax, dword [ebx + 0x1c]
je 0x40d8d0
mov ecx, dword [ebp - 0x60]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x10
mov dword [esp + 0x14], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov eax, dword [eax - 4]
mov dword [esp], eax
call sub.cygwin1.dll_sendto
mov edx, dword [ebp - 0x4c]
cmp dword [edx - 0xc], eax
je 0x40d7d0
lea edi, [ebx + 0x168]
mov dword [esp + 8], 8
mov dword [esp + 4], str.sendto:
mov dword [esp], edi
call fcn.00451130
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov dword [esp], eax
mov esi, eax
call sub.cygwin1.dll_strlen
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00451150
call sub.cygwin1.dll___errno
cmp dword [eax], 0x7a
jne 0x40d7d0
mov dword [ebx + 0xb8], 0x1f4
call fcn.0041ea90
cmp byte [ebx + 0xb4], 0
je 0x40d848
sub eax, dword [ebx + 0x138]
mov ecx, 0x9c40
sbb edx, dword [ebx + 0x13c]
mov esi, eax
xor eax, eax
cmp ecx, esi
sbb eax, edx
jb 0x40d898
mov eax, dword [ebp - 0x4c]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x40d910
mov eax, dword [ebp - 0x38]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
je 0x40d690
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x40d690
lea eax, [ebp - 0x4c]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x40d690
mov esi, eax
mov edi, edx
sub esi, dword [ebx + 0x140]
sbb edi, dword [ebx + 0x144]
xor ecx, ecx
mov dword [ebp - 0x60], esi
mov esi, 0x2710
cmp esi, dword [ebp - 0x60]
mov dword [ebp - 0x5c], edi
mov edi, ecx
sbb edi, dword [ebp - 0x5c]
jae 0x40d7fd
sub eax, dword [ebx + 0x148]
sbb edx, dword [ebx + 0x14c]
cmp esi, eax
sbb ecx, edx
jae 0x40d7fd
mov dword [esp], ebx
call fcn.0040d590
jmp 0x40d7fd
mov byte [ebx + 0x28], 0
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x21
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], str.Server_now_detached_from_client._n
call sub.cygwin1.dll_fwrite
jmp 0x40d7fd
mov eax, dword [ecx - 4]
add eax, 0x200
jmp 0x40d747
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x40d708
lea eax, [ebp - 0x4d]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x40d708
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x40d80e
lea eax, [ebp - 0x4d]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x40d80e
call sub.cygwin1.dll___stack_chk_fail
call fcn.0040b5a0
mov ebx, eax
jmp 0x46dfd5