Function at 0x41a610
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x928
mov eax, dword [0x4ff004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
mov eax, 0x10624dd3
mov dword [ebp - 0x91c], ecx
imul esi
push edi
mov edi, dword [ebp + 0x10]
push 0
sar edx, 6
push 0x3e8
push dword [ebp + 0xc]
mov eax, edx
shr eax, 0x1f
add eax, edx
push esi
mov dword [ebp - 0x924], eax
call fcn.0045f970
imul eax, eax, 0x3e8
xor edx, edx
mov dword [ebp - 0x914], edx
sub esi, eax
imul eax, esi, 0x3e8
mov dword [ebp - 0x920], eax
test ebx, ebx
je 0x41a690
mov esi, dword [ebx]
mov edx, 1
mov dword [ebp - 0x910], esi
mov dword [ebp - 0x914], edx
jmp 0x41a692
xor esi, esi
mov eax, dword [ebp - 0x91c]
mov ecx, dword [eax + 0x50]
cmp ecx, 0xffffffff
jne 0x41a6dc
test edi, edi
je 0x41a6c6
push 0xbc2
push str.ytcp
push str.Invalid_argument
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 [ebp - 8]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
xor eax, eax
test edx, edx
je 0x41a6f0
cmp dword [ebp + eax*4 - 0x910], ecx
je 0x41a6f0
inc eax
cmp eax, edx
jb 0x41a6e2
cmp eax, edx
jne 0x41a706
cmp edx, 0x40
jae 0x41a706
mov dword [ebp + eax*4 - 0x910], ecx
inc dword [ebp - 0x914]
cmp ecx, esi
cmovbe ecx, esi
test ecx, ecx
je 0x41a978
lea eax, [ebp - 0x924]
push eax
push 0
push 0
lea eax, [ebp - 0x914]
push eax
lea eax, [ecx + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x41a7e2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
test edi, edi
je 0x41a7cc
push esi
push 0xbd3
push str.ytcp
push str._s:_d:tcp__d_:
push 0x100
push edi
call fcn.0041c830
mov ecx, edi
add esp, 0x18
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41a770
push 0
sub ecx, edx
mov eax, 0x100
sub eax, ecx
push eax
lea eax, [edi + ecx]
push eax
push 0x400
push esi
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41a7a0
sub ecx, edx
test ecx, ecx
jle 0x41a7cc
dec ecx
mov edx, 1
add ecx, edi
sub edx, edi
mov al, byte [ecx]
cmp al, 0xa
je 0x41a7c1
cmp al, 0xd
jne 0x41a7cc
mov byte [ecx], 0
dec ecx
lea eax, [edx + ecx]
test eax, eax
jg 0x41a7b7
mov eax, 0xfffffff8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x41a84b
lea eax, [ebp - 0x914]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x41a84b
push 0
push 1
lea eax, [ebp - 0x915]
mov byte [ebp - 0x915], 0
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jns 0x41a83c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
jne 0x41a826
lea eax, [edi - 8]
jmp 0x41a843
push edi
push eax
mov edx, 0x11e
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
jmp 0x41a843
movzx eax, byte [ebp - 0x915]
test eax, eax
js 0x41a97a
mov ebx, dword [ebp - 0x91c]
lea eax, [ebp - 0x914]
push eax
push dword [ebx + 0x50]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x41a978
push dword [ebx + 0x64]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ax, word [ebx + 0x54]
sub ax, word [ebx + 0x56]
push dword [ebx + 0x64]
movzx esi, ax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
xor esi, esi
test eax, eax
je 0x41a965
mov ecx, 0x800
cmp eax, ecx
push esi
cmova eax, ecx
push eax
lea eax, [ebp - 0x80c]
push eax
mov eax, ebx
push dword [eax + 0x50]
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jne 0x41a8f4
test edi, edi
je 0x41a8dc
push 0x2d1
push str.ytcp
push str.No_more_data
push str._s___s:_d_
push 0x100
push edi
call fcn.0041c830
add esp, 0x18
mov esi, 0xfffffff7
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
jns 0x41a93d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x41a918
xor esi, esi
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
jne 0x41a927
lea esi, [edi - 8]
jmp 0x41a93d
push edi
push eax
mov edx, 0x2dc
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
mov esi, eax
test esi, esi
jle 0x41a965
push dword [ebx + 0x64]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
lea edx, [ebp - 0x80c]
lea ecx, [ebx + 0x54]
call fcn.00411400
add esp, 4
push dword [ebx + 0x64]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004423fe
mov esp, ebp
pop ebp
ret