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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5124
call fcn.00425360
push edi
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x511c], ecx
mov byte [ebp - 0x5014], 0
mov ecx, 0x13ff
xor eax, eax
lea edi, [ebp - 0x5013]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, 1
test edx, edx
je 0x40bdbf
mov dword [ebp - 0x5118], 0
mov dword [ebp - 0x5120], 0
jmp 0x40bbe1
mov eax, dword [ebp - 0x5120]
add eax, 1
mov dword [ebp - 0x5120], eax
mov ecx, dword [ebp - 0x5120]
cmp ecx, dword [ebp - 0x5118]
jae 0x40bc05
mov edx, dword [ebp - 0x5120]
mov eax, dword [ebp + edx*4 - 0x5114]
cmp eax, dword [ebp - 0x10]
jne 0x40bc03
jmp 0x40bc05
jmp 0x40bbd2
mov ecx, dword [ebp - 0x5120]
cmp ecx, dword [ebp - 0x5118]
jne 0x40bc3b
cmp dword [ebp - 0x5118], 0x40
jae 0x40bc3b
mov edx, dword [ebp - 0x5120]
mov eax, dword [ebp - 0x10]
mov dword [ebp + edx*4 - 0x5114], eax
mov ecx, dword [ebp - 0x5118]
add ecx, 1
mov dword [ebp - 0x5118], ecx
xor edx, edx
test edx, edx
jne 0x40bbc6
mov dword [ebp - 0x5124], 0
jmp 0x40bc5c
mov eax, dword [ebp - 0x5124]
add eax, 1
mov dword [ebp - 0x5124], eax
mov ecx, dword [ebp - 0x5124]
cmp ecx, dword [ebp - 0x5118]
jae 0x40bc83
mov edx, dword [ebp - 0x5124]
mov eax, dword [ebp + edx*4 - 0x5114]
cmp eax, dword [ebp - 0x511c]
jne 0x40bc81
jmp 0x40bc83
jmp 0x40bc4d
mov ecx, dword [ebp - 0x5124]
cmp ecx, dword [ebp - 0x5118]
jne 0x40bcbc
cmp dword [ebp - 0x5118], 0x40
jae 0x40bcbc
mov edx, dword [ebp - 0x5124]
mov eax, dword [ebp - 0x511c]
mov dword [ebp + edx*4 - 0x5114], eax
mov ecx, dword [ebp - 0x5118]
add ecx, 1
mov dword [ebp - 0x5118], ecx
xor edx, edx
test edx, edx
jne 0x40bc41
push 0
push 0
push 0
lea eax, [ebp - 0x5118]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jg 0x40bce9
jmp 0x40bde2
lea ecx, [ebp - 0x5118]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40bd53
push 0
push 0x5000
lea eax, [ebp - 0x5014]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jg 0x40bd23
jmp 0x40bde0
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0x5014]
push eax
mov ecx, dword [ebp - 0x511c]
push ecx
call fcn.0040bafb
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40bd4e
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 4]
je 0x40bd53
jmp 0x40bdde
lea eax, [ebp - 0x5118]
push eax
mov ecx, dword [ebp - 0x511c]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40bdba
push 0
push 0x5000
lea edx, [ebp - 0x5014]
push edx
mov eax, dword [ebp - 0x511c]
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jg 0x40bd90
jmp 0x40bddc
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x5014]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.0040bafb
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40bdb8
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 4]
je 0x40bdba
jmp 0x40bdda
jmp 0x40bbaf
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x511c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x40bde4
jmp 0x40bdbf
jmp 0x40bdbf
jmp 0x40bdbf
jmp 0x40bdbf
jmp 0x40bdbf
pop edi
mov esp, ebp
pop ebp
ret 4