Function at 0x406cf0
Capabilities:
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x4c
mov eax, dword [ecx + 0xd0]
test eax, eax
je 0x406d47
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x406d40
mov ecx, dword [ebx + 0xc8]
cmp dword [ecx + 0x8c], 2
je 0x406d47
mov edx, dword [eax + 0x44]
mov edi, dword [ebx + 0xa8]
mov eax, dword [eax + 0x40]
mov esi, dword [ecx + 0x2c]
mov dword [edi + 0x14], edx
mov dword [edi + 0x10], eax
test byte [ecx + 0x7d], 2
jne 0x406d99
mov eax, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
jmp 0x406da5
mov edx, dword [eax + 0x44]
test edx, edx
jne 0x406d0a
lea eax, [esp + 0x38]
mov dword [esp], 0
mov dword [esp + 4], eax
call sym._clock_gettime
mov esi, dword [esp + 0x3c]
mov eax, 0x10624dd3
mov ecx, dword [esp + 0x38]
mov edi, dword [ebx + 0xa8]
imul esi
sar esi, 0x1f
mov dword [ebx + 0xe4], ecx
sar edx, 6
sub edx, esi
mov dword [ebx + 0xe8], edx
mov dword [edi + 0x10], ecx
mov ecx, dword [ebx + 0xc8]
mov dword [edi + 0x14], edx
mov esi, dword [ecx + 0x2c]
test byte [ecx + 0x7d], 2
je 0x406d34
mov eax, dword [ecx + 0x368]
mov edx, dword [ecx + 0x36c]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp], ecx
call sym._Settings_GenerateClientHdr
mov esi, eax
test eax, eax
jle 0x406e76
mov eax, dword [ebx + 0xc8]
test byte [eax + 0x79], 8
je 0x406e80
mov edi, dword [eax + 0x2c]
mov eax, dword [ebx + 0xa8]
mov ebp, dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp], ecx
mov dword [esp + 0x2c], edx
call ebp
sub esp, 4
mov dword [edi], eax
mov edx, dword [esp + 0x2c]
mov dword [esp], edx
call ebp
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0xa8]
sub esp, 4
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call ebp
mov dword [edi + 4], eax
mov eax, dword [ebx + 0xa8]
sub esp, 4
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call ebp
mov edx, dword [ebx + 0xc8]
sub esp, 4
mov dword [edi + 8], eax
mov dword [ebx + 0xc4], esi
mov dword [esp + 0xc], 0
mov eax, dword [edx + 0x68]
cmp esi, eax
cmovge eax, esi
mov dword [esp + 8], eax
mov eax, dword [edx + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xcc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_send]
mov byte [ebx + 0xc1], 1
sub esp, 0x10
mov esi, eax
test esi, esi
js 0x406fb8
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
mov dword [esp + 4], 0x3938700
call sym._SetSocketOptionsSendTimeout
mov eax, dword [ebx + 0xc8]
test byte [eax + 0x78], 0x20
je 0x406fe0
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xcc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
mov eax, dword [ebx + 0xc8]
sub esp, 0x10
mov edx, dword [eax + 0x48]
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._SetSocketOptionsSendTimeout
mov eax, dword [ebx + 0xc8]
mov edx, dword [eax + 0x7c]
mov ecx, eax
and edx, 0x40001
cmp edx, 1
je 0x407060
mov edx, dword [eax + 0x78]
test dl, 0x10
jne 0x406f3c
mov edx, dword [eax + 0x68]
mov ecx, 0x114
cmp edx, ecx
cmovg edx, ecx
mov ecx, dword [eax + 0x2c]
test byte [eax + 0x7d], 0x20
je 0x407040
cmp edx, 4
jae 0x407078
test edx, edx
je 0x406f37
mov byte [ecx], 0xa5
test dl, 2
jne 0x4070c0
mov eax, dword [ebx + 0xc8]
mov edx, dword [eax + 0x78]
mov ecx, eax
and edx, 0x20
jne 0x406e6e
mov eax, dword [ecx + 0x7c]
not eax
test eax, 0x2001
jne 0x406e6e
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov eax, dword [ecx + 0x60]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
test eax, eax
jns 0x406e6e
mov dword [esp + 8], 0x7f0
mov dword [esp + 4], str.Client.cpp
mov dword [esp], 0x45a2fb
call sym._warn_errno
jmp 0x406e6e
mov dword [esp + 8], 0x7f5
mov dword [esp + 4], str.Client.cpp
mov dword [esp], str.send_hdr
call sym._warn_errno
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [eax + 0x7c]
not edx
and edx, 0x2001
jne 0x406ea0
lea edx, [esp + 0x38]
mov dword [esp + 0x38], 1
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], edx
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov eax, dword [eax + 0x60]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
test eax, eax
js 0x40709f
mov eax, dword [ebx + 0xc8]
jmp 0x406ea0
mov dword [esp + 4], edx
mov dword [esp], ecx
call sym._pattern
mov ecx, dword [ebx + 0xc8]
mov edx, dword [ecx + 0x78]
jmp 0x406f3c
mov ecx, ebx
call method.Client.PeerXchange__
mov eax, dword [ebx + 0xc8]
mov ecx, eax
jmp 0x406ef6
lea edi, [ecx + 4]
mov dword [ecx], 0xa5a5a5a5
mov eax, 0xa5a5a5a5
and edi, 0xfffffffc
mov dword [ecx + edx - 4], 0xa5a5a5a5
sub ecx, edi
add ecx, edx
shr ecx, 2
rep stosd dword es:[edi], eax
jmp 0x406f31
mov dword [esp + 8], 0x7d4
mov dword [esp + 4], str.Client.cpp
mov dword [esp], 0x45a2fb
call sym._warn_errno
jmp 0x40702c
mov eax, 0xffffa5a5
mov word [ecx + edx - 2], ax
mov eax, dword [ebx + 0xc8]
jmp 0x406f37