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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, ecx
push esi
push edi
xor esi, esi
mov edi, dword [ebx]
call fcn.00408c40
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0x15c]
mov dword [ebp - 8], edx
test eax, eax
je 0x41808a
cmp eax, 4
je 0x41808a
push 0x5da
push str.ytcp
push str.ASSERT_FAILED:_s:_d_n
push 0x5da
push str.ytcp
call fcn.00409950
add esp, 0x14
push 0x38
lea eax, [ebx + 0x178]
push 0
push eax
call fcn.00443620
mov edx, dword [ebx + 0xc]
add esp, 0xc
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4180a3
mov eax, dword [ebx + 0x1c]
sub edx, ecx
test eax, eax
mov dword [ebp - 0x10], edx
mov ecx, 4
cmovne ecx, eax
lea eax, [ecx + edx]
push eax
mov dword [ebx + 0x194], eax
call fcn.00449be3
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebx + 0x190], eax
push dword [ebp - 0x10]
push dword [ebx + 0xc]
push eax
call fcn.00444290
mov eax, dword [ebp - 0x14]
add esp, 0xc
add eax, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x418102
push ecx
push dword [ebx + 0x14]
push eax
call fcn.00444290
add esp, 0xc
jmp 0x418108
mov dword [eax], 0xa0d0a0d
mov ecx, dword [ebp + 8]
add dword [ebp - 0xc], ecx
mov eax, dword [ebp + 0xc]
adc dword [ebp - 8], eax
mov dword [ebx + 0x180], esi
mov dword [ebx + 0x150], ecx
mov dword [ebx + 0x154], eax
mov dword [ebx + 0x178], 1
call fcn.00408c40
cmp dword [ebp - 8], edx
jb 0x4182cd
ja 0x418150
cmp dword [ebp - 0xc], eax
jb 0x4182cd
nop dword [eax]
mov eax, dword [ebx]
cmp dword [eax + 0x748], 4
je 0x418182
cmp dword [eax + 0x80], 0
je 0x418236
cmp dword [eax + 0xac], 3
jge 0x418236
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x418130
test esi, esi
je 0x41818e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [edi + 0x810]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + 0x160], 0
je 0x4181e0
push dword [edi + 0x6ec]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x794]
mov dword [ebx + 0x184], eax
inc dword [edi + 0x794]
cmp dword [edi + 0x794], 0x7f
jl 0x4181d4
mov dword [edi + 0x794], 0x30
push dword [edi + 0x6ec]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebx + 0x18c], 0
mov ecx, dword [edi + 0x814]
test ecx, ecx
je 0x41825d
xor esi, esi
lea eax, [ecx + 0x18c]
cmp dword [eax], esi
je 0x418255
cmp esi, 0x10
jge 0x41821a
mov ecx, dword [eax]
inc esi
cmp dword [ecx + 0x18c], 0
lea eax, [ecx + 0x18c]
jne 0x418200
cmp esi, 0x10
jne 0x418255
cmp dword [ecx + 0x18c], 0
je 0x418255
push dword [edi + 0x810]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x418130
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4182f6
push 0x5f9
push str.ytcp
push str.Hub_is_not_ready__WebSocket_
jmp 0x4182e3
mov dword [ecx + 0x18c], ebx
jmp 0x418263
mov dword [edi + 0x814], ebx
push dword [edi + 0x810]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00408c40
push 0
mov dword [ebx + 0x140], eax
lea eax, [ebp - 4]
push 1
push eax
mov dword [ebx + 0x144], edx
push dword [edi + 0x98]
mov byte [ebp - 4], 1
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4182c4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4182f6
push ecx
push eax
mov edx, 0x115
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4182f6
push 0x5f0
push str.ytcp
push str.Unable_to_queue_request__WebSocket_
push str._s___s:_d_
push 0x100
push eax
call fcn.0041c830
add esp, 0x18
pop edi
pop esi
mov eax, 0xfffffff8
pop ebx
mov esp, ebp
pop ebp
ret