Function at 0x40d070
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
mov eax, dword [0x42d084]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
add eax, 0x3b
mov dword [ebp - 0x80c], eax
mov ecx, dword [0x42f5cc]
and ecx, 1
je 0x40d0c1
push str.sosendoob
push 0x427008
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0xc
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
mov ecx, dword [0x42f5cc]
and ecx, 1
je 0x40d114
mov edx, dword [0x42f5c8]
push edx
push 0x20
call fcn.00415811
add esp, 8
mov eax, dword [ebp + 8]
push eax
push 0x427010
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414be4
add esp, 0xc
mov edx, dword [0x42f5c8]
push edx
push 0xa
call fcn.00415811
add esp, 8
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
mov ecx, dword [0x42f5cc]
and ecx, 1
je 0x40d16c
mov edx, dword [0x42f5c8]
push edx
push 0x20
call fcn.00415811
add esp, 8
mov eax, dword [ebp - 0x80c]
mov ecx, dword [eax]
push ecx
push str.sb__sb_cc___d
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0xc
mov eax, dword [0x42f5c8]
push eax
push 0xa
call fcn.00415811
add esp, 8
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414b88
add esp, 4
mov edx, dword [ebp + 8]
cmp dword [edx + 0x14], 0x800
jle 0x40d182
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0x800
mov ecx, dword [ebp - 0x80c]
mov edx, dword [ebp - 0x80c]
mov eax, dword [ecx + 0xc]
cmp eax, dword [edx + 8]
jae 0x40d205
push 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 0x80c]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
sub edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov ecx, dword [0x42f5cc]
and ecx, 2
je 0x40d200
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 4]
push ecx
push str._____sent__d_bytes_urgent_data___d_urgent_bytes_left_n
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0x10
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
jmp 0x40d376
mov ecx, dword [ebp - 0x80c]
mov edx, dword [ecx + 0x10]
mov eax, dword [ebp - 0x80c]
add edx, dword [eax + 4]
mov ecx, dword [ebp - 0x80c]
sub edx, dword [ecx + 0xc]
mov dword [ebp - 0x810], edx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x810]
cmp eax, dword [edx + 0x14]
jle 0x40d240
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 0x810], edx
mov eax, dword [ebp - 0x810]
push eax
mov ecx, dword [ebp - 0x80c]
mov edx, dword [ecx + 0xc]
push edx
lea eax, [ebp - 0x808]
push eax
call fcn.0041e5d0
add esp, 0xc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
sub edx, dword [ebp - 0x810]
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x14], 0
je 0x40d2e6
mov edx, dword [ebp - 0x80c]
mov eax, dword [ebp - 0x80c]
mov ecx, dword [edx + 8]
sub ecx, dword [eax + 0x10]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
cmp eax, dword [edx + 0x14]
jle 0x40d2a4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x80c]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x810]
lea ecx, [ebp + eax - 0x808]
push ecx
call fcn.0041e5d0
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
sub eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x14], eax
mov edx, dword [ebp - 0x810]
add edx, dword [ebp - 4]
mov dword [ebp - 0x810], edx
push 1
mov eax, dword [ebp - 0x810]
push eax
lea ecx, [ebp - 0x808]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x810]
je 0x40d33e
mov edx, dword [0x42f5cc]
and edx, 4
je 0x40d33e
push str.Didnt_send_all_data_urgently_XXXXX_n
mov eax, dword [0x42f5c8]
push eax
call fcn.00414be4
add esp, 8
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414b88
add esp, 4
mov edx, dword [0x42f5cc]
and edx, 2
je 0x40d376
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
push ecx
mov edx, dword [ebp - 4]
push edx
push str.____2_sent__d_bytes_urgent_data___d_urgent_bytes_left_n
mov eax, dword [0x42f5c8]
push eax
call fcn.00414be4
add esp, 0x10
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414b88
add esp, 4
mov edx, dword [ebp - 0x80c]
mov eax, dword [edx]
sub eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x80c]
mov dword [ecx], eax
mov edx, dword [ebp - 0x80c]
mov eax, dword [edx + 0xc]
add eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x80c]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x80c]
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp - 0x80c]
add eax, dword [ecx + 4]
mov edx, dword [ebp - 0x80c]
cmp dword [edx + 0xc], eax
jb 0x40d3d6
mov eax, dword [ebp - 0x80c]
mov ecx, dword [ebp - 0x80c]
mov edx, dword [eax + 0xc]
sub edx, dword [ecx + 4]
mov eax, dword [ebp - 0x80c]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004149ef
mov esp, ebp
pop ebp
ret