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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x238
xor eax, eax
cmp ebx, eax
push esi
push edi
je 0x1001567b
mov esi, 1
cmp dword [ebp + 0xc], esi
jl 0x1001567b
mov dword [esp + 0x138], eax
mov dword [esp + 0x30], eax
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x10015670
cmp byte [ebx + 0x90], 0
mov ecx, esi
mov dword [esp + 8], eax
mov dword [esp + 0x13c], eax
mov dword [esp + 0x138], ecx
je 0x100153b3
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], esi
jmp 0x10015422
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea esi, [ebx + 0xf4]
push esi
call edi
lea eax, [ebx + 0xdc]
push eax
call edi
cmp dword [ebx + 0x6c], 0
jne 0x100153d7
cmp dword [ebx + 0x68], 0
je 0x10015404
mov ecx, dword [esp + 0x30]
xor eax, eax
test ecx, ecx
jbe 0x100153f0
mov edx, dword [ebx]
cmp dword [esp + eax*4 + 0x34], edx
je 0x100153f0
add eax, 1
cmp eax, ecx
jb 0x100153e3
cmp eax, ecx
jne 0x10015404
cmp ecx, 0x40
jae 0x10015404
mov ecx, dword [ebx]
mov dword [esp + eax*4 + 0x34], ecx
add dword [esp + 0x30], 1
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebx + 0xdc]
push eax
call edi
push esi
call edi
mov ecx, dword [esp + 0x138]
mov esi, 1
mov edx, dword [ebx + 4]
cmp edx, 0xffffffff
je 0x10015460
xor eax, eax
test ecx, ecx
jbe 0x1001543f
cmp dword [esp + eax*4 + 0x13c], edx
je 0x1001543f
add eax, esi
cmp eax, ecx
jb 0x10015430
cmp eax, ecx
jne 0x10015456
cmp ecx, 0x40
jae 0x10015456
mov dword [esp + eax*4 + 0x13c], edx
add dword [esp + 0x138], esi
cmp edx, dword [esp + 8]
jle 0x10015460
mov dword [esp + 8], edx
mov eax, dword [ebp + 8]
cdq
test edx, edx
mov edi, eax
mov dword [esp + 0x14], edx
jg 0x10015481
jl 0x10015474
test edi, edi
jae 0x10015481
mov edi, 0x3e8
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
mov dword [esp + 0x18], eax
lea eax, [ebx + 0xc4]
push eax
mov dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0x38]
mov esi, dword [ebx + 0x3c]
mov dword [esp + 0x28], eax
or eax, esi
je 0x10015502
mov edx, dword [esp + 0x14]
push 0
push 0x3e8
push edx
push edi
call fcn.1002eab0
mov ecx, dword [esp + 0x18]
add eax, ecx
adc edx, dword [esp + 0x1c]
cmp edx, esi
jl 0x10015502
mov edx, dword [esp + 0x28]
jg 0x100154e8
cmp eax, edx
jbe 0x10015502
sub edx, ecx
sbb esi, dword [esp + 0x1c]
push 0
push 0x3e8
push esi
push edx
call fcn.1002c390
mov edi, eax
mov esi, edx
jmp 0x10015506
mov esi, dword [esp + 0x14]
lea eax, [ebx + 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jg 0x10015525
jl 0x1001551d
test edi, edi
jae 0x10015525
xor edi, edi
mov dword [esp + 0x14], edi
mov esi, edi
push 0
push 0x3e8
push esi
push edi
call fcn.1002eab0
mov dword [esp + 0x20], eax
imul eax, eax, 0x3e8
sub edi, eax
lea eax, [esp + 0x20]
imul edi, edi, 0x3e8
push eax
mov eax, dword [esp + 0xc]
push 0
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x144]
push edx
add eax, 1
push eax
mov dword [esp + 0x38], edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x10015596
call fcn.1001e4a1
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
call fcn.1001e4a1
mov eax, dword [eax]
sub eax, 4
neg eax
sbb eax, eax
and eax, 0xe
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x10015670
lea ecx, [esp + 0x138]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100155d2
mov edx, dword [ebp + 0xc]
push edx
mov eax, ebx
call fcn.10015960
add esp, 4
test eax, eax
jne 0x10015680
cmp dword [ebx], 0xffffffff
je 0x10015680
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x1001562f
lea ecx, [esp + 0x138]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001562f
mov eax, dword [ebx + 4]
push 0
push 1
lea edx, [esp + 0x17]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [ebx]
cmp ecx, 0xffffffff
je 0x10015670
mov edx, dword [esp + 0x30]
xor eax, eax
test edx, edx
jbe 0x1001561d
cmp dword [esp + eax*4 + 0x34], ecx
je 0x1001561d
add eax, 1
cmp eax, edx
jb 0x10015610
cmp eax, edx
jne 0x1001562f
cmp edx, 0x40
jae 0x1001562f
mov dword [esp + eax*4 + 0x34], ecx
add dword [esp + 0x30], 1
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x10015670
lea ecx, [esp + 0x30]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001565e
mov eax, dword [ebp + 0xc]
mov ecx, ebx
call fcn.10015a00
test eax, eax
jne 0x10015680
cmp dword [ebx], 0xffffffff
jne 0x10015663
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebx], 0xffffffff
je 0x10015670
mov esi, ebx
call fcn.10015c40
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 3
pop edi
pop esi
mov esp, ebp
pop ebp
ret