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

Disassembly:
sub esp, 0x11c
push ebx
push ebp
mov ebp, ecx
mov eax, dword [ebp + 0x5c]
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x10031912
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x11c
ret
cmp dword [0x10131ff8], ebx
je 0x10031933
mov ecx, dword [0x101314b4]
call sub.WINMM.dll_timeGetTime
mov edi, eax
add edi, dword [0x10131ff8]
mov dword [esp + 0x18], edi
jmp 0x10031937
mov edi, dword [esp + 0x18]
mov eax, dword [0x10131ff8]
xor esi, esi
cmp eax, ebx
je 0x10031955
mov ecx, dword [0x101314b4]
call sub.WINMM.dll_timeGetTime
mov esi, edi
sub esi, eax
jns 0x10031955
xor esi, esi
mov eax, dword [ebp + 4]
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp + 0x28], 1
mov ecx, 0x3f
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov dword [esp + 0x20], edx
mov eax, esi
cdq
mov ecx, 0x3e8
idiv ecx
lea ecx, [esp + 0x28]
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
lea eax, [esp + 0x20]
push eax
push ebx
push ebx
push ecx
shl edx, 3
push ebx
mov dword [esp + 0x38], edx
call sub.WSOCK32.dll_select
cmp eax, ebx
je 0x10031a9e
cmp eax, 1
jne 0x10031a87
mov eax, dword [ebp + 4]
lea edx, [esp + 0x14]
push edx
push 0x4004667f
or esi, 0xffffffff
push eax
mov dword [esp + 0x20], esi
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
jne 0x10031a9b
mov eax, dword [ebp + 0xc]
cmp eax, ebx
lea edi, [ebp + 8]
mov byte [esp + 0x13], bl
jne 0x100319f7
xor edx, edx
jmp 0x100319fc
mov edx, dword [edi + 8]
sub edx, eax
mov ecx, dword [esp + 0x14]
cmp edx, ecx
jae 0x10031a2a
cmp eax, ebx
jne 0x10031a0c
xor edx, edx
jmp 0x10031a11
mov edx, dword [edi + 8]
sub edx, eax
lea eax, [esp + 0x13]
sub ecx, edx
push eax
push ecx
mov ecx, dword [edi + 8]
push ecx
mov ecx, edi
call fcn.10034320
mov ecx, dword [esp + 0x14]
jmp 0x10031a5a
cmp eax, ebx
je 0x10031a5a
mov edx, dword [edi + 8]
mov esi, edx
sub esi, eax
cmp ecx, esi
jae 0x10031a5a
lea esi, [eax + ecx]
mov eax, edx
cmp eax, edx
je 0x10031a50
mov cl, byte [eax]
mov byte [esi], cl
inc esi
inc eax
cmp eax, edx
jne 0x10031a42
mov ecx, dword [esp + 0x14]
mov edx, dword [edi + 8]
mov dword [esp + 0x1c], edx
mov dword [edi + 8], esi
lea edx, [esp + 0x1c]
push edx
lea edx, [ebp + 0x38]
push edx
push ebx
mov dword [ebp + 0x58], ebx
mov eax, dword [ebp + 0xc]
push ecx
push eax
mov eax, dword [ebp + 4]
push eax
mov dword [esp + 0x34], 0x10
call sub.WSOCK32.dll_recvfrom
cmp eax, 0xffffffff
jne 0x10031aab
jmp 0x10031933
pop edi
pop esi
mov dword [ebp + 0x5c], 0xffffffff
pop ebp
xor eax, eax
pop ebx
add esp, 0x11c
ret
mov dword [ebp + 0x5c], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x11c
ret
mov edx, dword [ebp + 0xc]
cmp edx, ebx
lea edi, [ebp + 8]
mov byte [esp + 0x13], bl
jne 0x10031abd
xor ecx, ecx
jmp 0x10031ac2
mov ecx, dword [edi + 8]
sub ecx, edx
cmp ecx, eax
jae 0x10031afa
cmp edx, ebx
jne 0x10031ace
xor ecx, ecx
jmp 0x10031ad3
mov ecx, dword [edi + 8]
sub ecx, edx
lea edx, [esp + 0x13]
sub eax, ecx
push edx
push eax
mov eax, dword [edi + 8]
push eax
mov ecx, edi
call fcn.10034320
mov ecx, dword [ebp + 0x3c]
push ecx
call sub.WSOCK32.dll_ntohl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
cmp edx, ebx
je 0x10031b25
mov esi, dword [edi + 8]
mov ecx, esi
sub ecx, edx
cmp eax, ecx
jae 0x10031b25
add edx, eax
mov eax, esi
cmp eax, esi
je 0x10031b1b
mov cl, byte [eax]
mov byte [edx], cl
inc edx
inc eax
cmp eax, esi
jne 0x10031b11
mov eax, dword [edi + 8]
mov dword [esp + 0x18], eax
mov dword [edi + 8], edx
mov ecx, dword [ebp + 0x3c]
push ecx
call sub.WSOCK32.dll_ntohl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret