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

Disassembly:
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xffffffffffffffff
push 0x4faf58
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x591430]
xor eax, ebp
mov dword [ebp + 0x400], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov eax, dword [ebp + 0x40c]
mov ebx, dword [ebp + 0x410]
mov dword [ebp - 0x24], eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x4c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x48], 1
cmp byte [esi + 0xd0], 0
mov dword [ebp - 4], 0
jne 0x41c05f
mov eax, dword [esi + 0xa8]
lea edi, [esi + 0xa8]
lea ecx, [esi + 0xc0]
mov dword [ebp - 0x20], ecx
mov dword [eax], 0
mov eax, dword [esi + 0xb4]
mov dword [edi + 8], 0xffffffff
mov dword [eax], 0
mov dword [esi + 0xbc], 0xffffffff
mov eax, dword [ecx]
mov dword [eax], 0
mov dword [ecx + 8], 0xffffffff
xor ecx, ecx
mov eax, dword [edi]
mov esi, dword [esi + 0x30]
mov edx, dword [eax]
test edx, edx
je 0x41bbcc
add eax, 4
nop dword [eax]
cmp dword [eax], esi
je 0x41bbe3
inc ecx
add eax, 4
cmp ecx, edx
jb 0x41bbc0
lea eax, [edx + 1]
mov ecx, edi
push eax
call fcn.0041b050
mov ecx, dword [edi]
mov eax, dword [ecx]
mov dword [ecx + eax*4 + 4], esi
mov eax, dword [edi]
inc dword [eax]
mov ecx, dword [ebp - 0x14]
xor edi, edi
mov esi, dword [ecx + 0xcc]
test esi, esi
je 0x41bc06
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x41bc23
mov esi, dword [esi + 4]
test esi, esi
jne 0x41bbf2
xor cl, cl
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], 3
lea ebx, [eax + 0xa8]
add eax, 0x3c
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x40], eax
jmp 0x41bc2a
mov cl, 1
jmp 0x41bc08
mov cl, byte [ebp - 0xd]
mov edx, edi
mov dword [ebp - 0x38], edx
test cl, cl
jne 0x41bc3c
cmp dword [eax + 4], 0
mov byte [ebp - 0xd], cl
je 0x41bc40
mov byte [ebp - 0xd], 1
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, eax
je 0x41bcdc
nop dword [eax]
mov eax, dword [ebx]
lea edi, [esi]
mov edx, dword [ebx + 4]
mov esi, dword [esi]
mov ecx, dword [eax]
inc ecx
cmp ecx, edx
jbe 0x41bcbd
mov eax, edx
shr eax, 1
add eax, edx
cmp eax, ecx
cmovae ecx, eax
mov dword [ebp - 0x50], ecx
lea eax, [ecx*4 + 4]
push eax
call fcn.00445790
mov edx, dword [ebp - 0x1c]
xor ebx, ebx
add esp, 4
mov dword [ebp - 0x44], eax
mov ecx, dword [edx]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov ecx, dword [edx]
cmp dword [ecx], ebx
jbe 0x41bca5
mov ecx, eax
mov eax, dword [edx]
mov eax, dword [eax + ebx*4 + 4]
mov dword [ecx + ebx*4 + 4], eax
inc ebx
mov eax, dword [edx]
cmp ebx, dword [eax]
jb 0x41bc94
push dword [edx]
call fcn.004457a0
mov ebx, dword [ebp - 0x1c]
add esp, 4
mov eax, dword [ebp - 0x44]
mov dword [ebx], eax
mov eax, dword [ebp - 0x50]
mov dword [ebx + 4], eax
mov edx, dword [ebx]
mov eax, dword [edi + 8]
mov ecx, dword [edx]
mov dword [edx + ecx*4 + 4], eax
mov eax, dword [ebx]
inc dword [eax]
mov eax, dword [ebp - 0x40]
cmp esi, dword [eax]
jne 0x41bc50
mov edx, dword [ebp - 0x38]
jmp 0x41bcdf
mov eax, dword [ebp - 0x40]
mov edi, dword [ebx + 8]
cmp edi, edx
cmovbe edi, edx
add eax, 0x1c
add ebx, 0xc
mov dword [ebp - 0x40], eax
sub dword [ebp - 0x18], 1
mov dword [ebp - 0x1c], ebx
jne 0x41bc27
cmp byte [ebp - 0xd], 0
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x14]
jne 0x41bd16
cmp dword [esi + 0x94], 0
mov byte [ebp - 0xd], 0
je 0x41bd1a
mov byte [ebp - 0xd], 1
lea eax, [esi + 0x8c]
push ebx
push eax
lea ecx, [esi + 0xb4]
call fcn.0041c250
mov esi, dword [esi + 0xbc]
cmp esi, edi
mov eax, dword [ebp - 0x14]
cmovbe esi, edi
add eax, 0x8c
mov edi, dword [ebp - 0x20]
mov ecx, edi
push ebx
push eax
call fcn.0041c250
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc8]
cmp eax, esi
cmovbe eax, esi
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x41bd6d
cmp byte [ebp - 0xd], al
je 0x41c05f
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
test eax, eax
je 0x41bdc3
mov esi, dword [edx + 0xcc]
mov ecx, 0x11e1a300
cmp eax, ecx
cmovbe ecx, eax
test esi, esi
je 0x41bda4
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0xc]
mov esi, dword [esi + 4]
mov ecx, eax
test esi, esi
jne 0x41bd93
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x34], eax
imul eax, eax, 0xf4240
sub ecx, eax
mov dword [ebp - 0x30], ecx
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.004b9da0
mov ecx, dword [ebp - 0x14]
mov esi, dword [edi]
push 0
mov eax, dword [ecx + 0xa8]
mov edi, dword [ecx + 0xb4]
mov dword [ebp - 0x24], eax
call dword [sym.imp.WSOCK32.dll_WSASetLastError]
mov edx, dword [ebp - 0x24]
test edx, edx
jne 0x41be30
test edi, edi
jne 0x41be30
test esi, esi
jne 0x41be30
mov eax, 0x10624dd3
imul dword [ebp - 0x30]
imul eax, dword [ebp - 0x34], 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
mov eax, 1
cmove ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.004b9da0
jmp 0x41bf3a
cmp dword [ebp - 0x34], 0
jne 0x41be4f
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x24], 0x3e8
lea eax, [ecx - 1]
cmp eax, 0x3e6
cmovbe ecx, dword [ebp - 0x24]
mov dword [ebp - 0x30], ecx
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x38]
push esi
push edi
push edx
inc eax
push eax
call dword [sym.imp.WSOCK32.dll_select]
mov edi, eax
call fcn.004b9da0
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
test edi, edi
js 0x41be79
call fcn.004b9da0
test edi, edi
jle 0x41bf3a
mov esi, dword [ebp - 0x14]
push dword [esi + 0xa8]
push dword [esi + 0x30]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x41bf3a
lea eax, [ebp]
mov dword [ebp - 0x3c], 0x400
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x28], 0
call fcn.004b9da0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
push eax
push 0
push 1
lea eax, [ebp - 0x3c]
push eax
push dword [esi + 0x30]
call fcn.0041a860
add esp, 0x14
cmp eax, 0x400
jne 0x41bf39
mov ebx, esi
mov esi, dword [ebx + 0x30]
push 0
call dword [sym.imp.WSOCK32.dll_WSASetLastError]
push 0
push 0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 0
push eax
push 1
lea eax, [ebp - 0x3c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_WSARecv]
mov esi, eax
call fcn.004b9da0
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x41bf1f
cmp eax, 0x4d2
jne 0x41bf24
call fcn.004b9da0
test esi, esi
jne 0x41bf36
call fcn.004b9da0
cmp dword [ebp - 0x18], 0x400
je 0x41bed4
mov ebx, dword [ebp - 0x2c]
dec edi
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x48], 1
test edi, edi
jle 0x41c03d
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
push ebx
lea esi, [edi + 0x8c]
push esi
call fcn.0041a080
push ebx
push esi
lea ecx, [edi + 0xb4]
call fcn.0041a080
mov eax, dword [ebp - 0x20]
mov edx, 2
add edi, 0x70
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], edi
mov eax, dword [eax]
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
cmp dword [eax], ecx
jbe 0x41c022
nop
mov eax, dword [eax + ecx*4 + 4]
mov ecx, edi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00418240
mov esi, dword [eax]
cmp esi, dword [edi + 4]
je 0x41c00b
mov edi, dword [esi + 0xc]
test edi, edi
je 0x41bffb
mov eax, dword [edi + 0x2c]
push edi
call eax
add esp, 4
test eax, eax
je 0x41c008
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x41bfdc
mov eax, dword [ecx + 0x14]
mov dword [esi + 0xc], eax
test eax, eax
jne 0x41bfd5
mov dword [esi + 0x10], eax
mov dword [ecx + 0x14], 0
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x41bfef
mov dword [eax + 0x14], edi
jmp 0x41bff1
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov edi, dword [esi + 0xc]
test edi, edi
jne 0x41bfb4
mov edi, dword [ebp - 0x1c]
mov ecx, edi
push esi
call fcn.004180f0
jmp 0x41c00b
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
inc ecx
mov dword [ebp - 0x2c], ecx
mov eax, dword [eax]
cmp ecx, dword [eax]
jb 0x41bf90
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
dec edx
sub edi, 0x1c
mov dword [ebp - 0x18], edx
sub eax, 0xc
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], eax
test edx, edx
jns 0x41bf80
mov ecx, dword [ebp - 0x14]
mov esi, dword [ecx + 0xcc]
test esi, esi
je 0x41c05f
nop word [eax + eax]
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x41c050
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x400]
xor ecx, ebp
call fcn.004b7be0
lea esp, [ebp + 0x404]
pop ebp
ret 8