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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x818
mov eax, dword [0x4600b4]
xor eax, esp
mov dword [esp + 0x814], eax
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x54], 0
je 0x40668b
call fcn.0040a8b0
mov edx, dword [0x463274]
xor edi, edi
test edx, edx
je 0x4065a7
nop dword [eax]
mov al, byte [edx + 0x12c]
lea ecx, [edi + 1]
mov edx, dword [edx + 0x18]
cmp al, 1
cmovne ecx, edi
mov edi, ecx
test edx, edx
jne 0x406590
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x4065de
push 0x800
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.0041e250
add esp, 0xc
mov dword [esp + 0x18], 6
lea eax, [esp + 0x18]
push 0
push 4
push eax
mov eax, dword [esi + 0x2c]
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [0x460a20]
test eax, eax
jne 0x406607
mov eax, dword [esi + 0x14]
cmp byte [eax + 0x12c], 1
je 0x406626
pop edi
pop esi
mov ecx, dword [esp + 0x814]
xor ecx, esp
call fcn.00419f88
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x4066b3
cmp edi, 2
jl 0x4066b3
cmp dword [0x463270], 2
jl 0x4066b3
mov ecx, dword [esi + 0x54]
cmp byte [ecx + 0x18], 0
jne 0x406648
call fcn.00403520
pop edi
pop esi
mov ecx, dword [esp + 0x814]
xor ecx, esp
call fcn.00419f88
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x14]
push 2
call fcn.00416530
mov edi, dword [esi + 0x10]
test edi, edi
je 0x406666
mov byte [edi + 0x44], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [edi + 0x30], eax
mov ecx, dword [esi + 0x54]
test ecx, ecx
je 0x40668b
call fcn.004034f0
mov eax, dword [esi + 0x54]
test eax, eax
je 0x406684
push 0x1c
push eax
call fcn.00419f99
add esp, 8
mov dword [esi + 0x54], 0
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x4066c7
call fcn.00414240
mov eax, dword [esi + 0x18]
cmp byte [eax + 0x44], 1
jne 0x4066c7
cmp byte [eax + 0x45], 1
jne 0x4066b3
call fcn.0040a4b0
mov ecx, dword [eax + 0x30]
mov eax, dword [ecx]
call dword [eax + 0xc]
pop edi
pop esi
mov ecx, dword [esp + 0x814]
xor ecx, esp
call fcn.00419f88
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x4066ff
call fcn.00418d70
mov eax, dword [esi + 0x10]
cmp dword [eax + 0x24], 0
jg 0x4066ff
cmp dword [0x460a20], 0
jne 0x4066ff
call fcn.0040a4b0
push 3
mov ecx, dword [eax + 0x30]
call fcn.00404890
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x24]
mov dword [0x463280], eax
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40679d
movq xmm0, qword [eax + 0x20]
movq qword [esp + 0xc], xmm0
movss xmm0, dword [0x4576e8]
comiss xmm0, dword [esp + 0xc]
jbe 0x40679d
cmp dword [0x460a20], 1
jne 0x406771
cmp dword [0x460a24], 2
jne 0x406771
mov edx, dword [0x463274]
xor edi, edi
test edx, edx
je 0x406767
mov al, byte [edx + 0x134]
lea ecx, [edi + 1]
mov edx, dword [edx + 0x18]
test al, al
cmove ecx, edi
mov edi, ecx
test edx, edx
jne 0x406742
mov dword [0x460a24], 1
test edi, edi
jne 0x406771
mov dword [0x460a24], 0
push ecx
mov ecx, dword [esi + 0x14]
call fcn.004166c0
mov edi, dword [esi + 0x10]
test edi, edi
je 0x406796
mov eax, dword [edi + 0x24]
mov dword [0x463280], eax
mov byte [edi + 0x44], 0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [edi + 0x30], eax
mov ecx, esi
call fcn.00407f90
mov edx, dword [0x463274]
xor edi, edi
test edx, edx
je 0x4067c7
nop dword [eax]
mov al, byte [edx + 0x134]
lea ecx, [edi + 1]
mov edx, dword [edx + 0x18]
test al, al
cmove ecx, edi
mov edi, ecx
test edx, edx
jne 0x4067b0
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x4067fe
push 0x800
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.0041e250
add esp, 0xc
mov dword [esp + 0x18], 6
lea eax, [esp + 0x18]
push 0
push 4
push eax
mov eax, dword [esi + 0x2c]
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
cmp dword [0x460a20], 0
jne 0x406815
mov eax, dword [esi + 0x14]
cmp byte [eax + 0x134], 1
je 0x40682c
jmp 0x406861
cmp dword [0x460a20], 1
jne 0x406861
cmp edi, 2
jl 0x406861
cmp dword [0x463270], 2
jl 0x406861
call fcn.0040a4b0
mov eax, dword [eax + 0x30]
cmp dword [eax + 0x14], 2
je 0x40685a
xorps xmm0, xmm0
mov dword [eax + 0x14], 2
mov dword [eax + 0x18], 3
movups xmmword [eax + 0x1c], xmm0
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x40685a
mov byte [eax + 0xd], 1
mov byte [esi + 0x218], 1
cmp byte [esi + 0x218], 0
jne 0x4066a6
mov ecx, esi
call fcn.0040a8b0
mov ecx, dword [esp + 0x81c]
pop edi
pop esi
xor ecx, esp
call fcn.00419f88
mov esp, ebp
pop ebp
ret