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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x4ff004]
xor eax, esp
mov dword [esp + 0x110], eax
cmp dword [0x500b60], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
jne 0x40805c
mov edx, edi
xor ecx, ecx
call fcn.00405ac0
test eax, eax
js 0x40857f
push 0x467318
push ebx
call fcn.00445fc4
add esp, 8
test eax, eax
jne 0x40810c
mov eax, dword [0x500b60]
test byte [eax + 0x381c], 1
jne 0x40857d
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x500b60]
mov edx, edi
mov ecx, ebx
call fcn.0040fbb0
mov esi, eax
mov dword [ebx + 0x437c], esi
test esi, esi
jns 0x4080d5
push 0x100
push edi
lea ecx, [ebx + 0x4380]
mov edx, 0x100
call fcn.0041c8a0
mov esi, dword [ebx + 0x437c]
add esp, 8
test esi, esi
jns 0x4080d5
mov eax, dword [0x500b60]
jmp 0x4080e1
mov eax, dword [0x500b60]
or dword [eax + 0x381c], 1
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jns 0x40857d
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
push 0x46731c
push ebx
call fcn.00445fc4
add esp, 8
test eax, eax
jne 0x40816b
mov eax, dword [0x500b60]
test byte [eax + 0x381c], 2
jne 0x40857d
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x500b60]
push edi
or dword [ecx + 0x381c], 2
add ecx, 0x3cd0
call fcn.0041c4b0
mov ecx, dword [0x500b60]
add esp, 4
mov esi, eax
push dword [ecx + 0x3818]
jmp 0x4080e7
test ebx, ebx
jne 0x408192
push 0x141
push str.ymemory
push str.YPANIC:_s:_d_n
push 0x141
push str.ymemory
call fcn.00409950
add esp, 0x14
jmp 0x4081f5
xor esi, esi
cmp byte [ebx], 0
je 0x4081af
nop dword [eax]
cmp esi, 0x100
jae 0x4081af
inc esi
cmp byte [ebx + esi], 0
jne 0x4081a0
lea eax, [esi + 1]
cmp eax, 0x100
jbe 0x4081e1
push 0x14a
push str.ymemory
push str.YPANIC:_s:_d_n
push 0x14a
push str.ymemory
call fcn.00409950
add esp, 0x14
mov byte [esp + 0x18], 0
jmp 0x4081f5
push esi
lea eax, [esp + 0x1c]
push ebx
push eax
call fcn.00444290
add esp, 0xc
mov byte [esp + esi + 0x18], 0
mov eax, dword [0x500b60]
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, ebx
call fcn.00401660
mov ecx, eax
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x4082dc
xor esi, esi
lea edi, [ecx + 0x1c]
mov eax, dword [edi]
test eax, eax
je 0x40825c
mov ecx, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408248
test dl, dl
je 0x408244
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408248
add eax, 2
add ecx, 2
test dl, dl
jne 0x408228
xor eax, eax
jmp 0x40824d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40825c
inc esi
add edi, 4
cmp esi, 8
jl 0x408220
jmp 0x4082a6
cmp esi, 8
jge 0x4082a6
mov eax, dword [esp + 0x10]
lea eax, [eax + esi*4]
add eax, 0x1c
mov dword [esp + 0x14], eax
cmp dword [eax], 0
jne 0x4082a6
mov esi, ebx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x408280
sub esi, ecx
inc esi
push esi
call fcn.00449be3
add esp, 4
mov edi, eax
push esi
push ebx
push edi
call fcn.00444290
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [eax], edi
mov eax, dword [esp + 0x10]
mov dword [eax + 0x80], 0
mov eax, dword [0x500b60]
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov eax, dword [0x500b60]
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
lea edx, [esp + 0x18]
lea ecx, [esp + 0x1c]
call fcn.00405080
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x408570
nop word [eax + eax]
mov ecx, dword [0x500b60]
push dword [ecx + 0x3818]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x500b60]
xor esi, esi
mov ecx, 0x20
add eax, 0x3840
mov ebx, ecx
cmp ecx, 0x20
jne 0x408372
mov edx, dword [eax - 4]
test edx, edx
jne 0x408347
mov ecx, esi
cmp esi, ebx
jne 0x408372
test edx, edx
mov ecx, esi
cmovne ecx, ebx
cmp dword [eax], 0
jne 0x40835b
lea ecx, [esi + 1]
cmp ecx, 0x20
jne 0x408372
cmp dword [eax + 4], 0
jne 0x408369
lea ecx, [esi + 2]
cmp esi, 0x1e
jne 0x408372
cmp dword [eax + 8], 0
jne 0x408372
lea ecx, [esi + 3]
add esi, 4
add eax, 0x10
cmp esi, 0x20
jl 0x408333
cmp ecx, 0x20
jge 0x408440
mov edx, dword [esp + 0x10]
lea eax, [ecx*4 + 0x383c]
mov esi, ecx
mov dword [esp + 0x14], eax
mov ecx, dword [0x500b60]
mov dword [eax + ecx], edx
lea ecx, [edx + 0x94]
mov edx, edi
call fcn.00415d40
mov ebx, eax
test ebx, ebx
js 0x408545
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x14]
cmp eax, 4
jne 0x4083ca
mov edx, 0x41a990
jmp 0x4083d8
cmp eax, 3
jne 0x4084f4
mov edx, 0x407270
mov eax, dword [0x500b60]
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebx + eax]
push ecx
push edx
add ecx, 0x9c
call fcn.0041cb00
add esp, 8
test eax, eax
js 0x4084a3
push 0
push 1
lea eax, [esp + 0x14]
mov byte [esp + 0x14], 1
push eax
mov eax, dword [0x500b60]
mov eax, dword [ebx + eax]
push dword [eax + 0x98]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x408440
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x408440
push edi
push eax
mov edx, 0x115
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
mov eax, dword [0x500b60]
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp esi, 0x20
jne 0x40857d
mov ecx, dword [esp + 0x10]
call fcn.00405410
test edi, edi
je 0x408489
push 0xf67
push str.yapi
push str.Too_many_network_hub_registered
push str._s___s:_d_
push 0x100
push edi
call fcn.0041c830
add esp, 0x18
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov eax, dword [0x500b60]
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x4084da
push 0xf60
push str.yapi
push str.Unable_to_start_helper_thread
push str._s___s:_d_
push 0x100
push edi
call fcn.0041c830
add esp, 0x18
mov eax, 0xfffffff8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov eax, dword [0x500b60]
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x40852b
push 0xf5b
push str.yapi
push str.Unsupported_hub_proto
push str._s___s:_d_
push 0x100
push edi
call fcn.0041c830
add esp, 0x18
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov eax, dword [0x500b60]
push dword [eax + 0x3818]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x14]
cmp esi, 0xfffffff5
jne 0x4080f5
xor eax, eax
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret