Function at 0x54afa0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [esp + 0xc]
sub esp, 8
push ebx
mov ebx, dword [esp + 0x14]
test ebx, ebx
jne 0x54afb9
cmp ecx, 0xffffffff
je 0x54b11d
push ebp
mov ebp, dword [esp + 0x14]
push edi
xor edi, edi
mov dword [esp + 0xc], edi
cmp dword [ebp + 0x78], edi
jle 0x54b11b
mov dword [esp + 0x10], edi
xor eax, eax
push esi
mov esi, dword [ebp + 0x74]
add esi, eax
mov eax, dword [esi + 0x20]
cmp eax, 0xffffffff
je 0x54b1d6
cmp dword [esi + 0x54], 0
jne 0x54b1d6
test ebx, ebx
je 0x54b04e
push ebx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x54b1d2
mov edx, dword [ebx]
xor eax, eax
test edx, edx
je 0x54b056
mov edi, dword [esi + 0x20]
lea ecx, [ebx + 4]
cmp dword [ecx], edi
je 0x54b023
inc eax
add ecx, 4
cmp eax, edx
jb 0x54b011
mov edi, dword [esp + 0x10]
jmp 0x54b056
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x54b043
lea edi, [eax + 1]
lea edi, [ebx + edi*4]
mov ecx, dword [edi + 4]
lea edi, [edi + 4]
mov dword [edi - 4], ecx
inc eax
mov edx, dword [ebx]
lea ecx, [edx - 1]
cmp eax, ecx
jb 0x54b030
mov edi, dword [esp + 0x10]
lea eax, [edx - 1]
mov dword [ebx], eax
jmp 0x54b056
cmp eax, ecx
jne 0x54b1d6
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x20]
cmp edx, 2
je 0x54b122
mov eax, 2
sub eax, edx
add edx, 0x24
add edx, esi
cmp dword [ebp + 0x91b8], 0
je 0x54b099
push dword [ebp + 0x91bc]
push 0
push 0
push 0
push eax
mov eax, dword [ebp + 0x91b8]
push edx
push ecx
mov eax, dword [eax + 0xc]
call eax
add esp, 0x1c
jmp 0x54b0a4
push 0
push eax
push edx
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x54b0da
cmp eax, 0xffffffff
jne 0x54b0c7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
je 0x54b1d2
cmp eax, 0x2733
je 0x54b1d2
push dword [esp + 0x28]
push edi
push ebp
call fcn.0054a460
add esp, 0xc
jmp 0x54b1d2
add dword [esi + 0x28], eax
cmp dword [esi + 0x28], 2
jne 0x54b1d2
movzx ecx, byte [esi + 0x24]
movzx eax, byte [esi + 0x25]
shl ecx, 8
or ecx, eax
push ecx
mov dword [esi + 0x2c], ecx
call dword [0x5f09c4]
add esp, 4
mov dword [esi + 0x30], eax
test eax, eax
jne 0x54b1cb
push dword [esp + 0x28]
push edi
push ebp
call fcn.0054a460
add esp, 0xc
pop esi
pop edi
pop ebp
pop ebx
add esp, 8
ret
mov ebx, dword [esi + 0x30]
add ebx, dword [esi + 0x34]
mov edx, dword [esi + 0x2c]
sub edx, dword [esi + 0x34]
mov eax, dword [ebp + 0x91b8]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x20]
test eax, eax
je 0x54b15c
push dword [ebp + 0x91bc]
mov eax, dword [eax + 0xc]
push 0
push 0
push 0
push edx
push dword [esp + 0x24]
push ecx
call eax
add esp, 0x1c
jmp 0x54b16a
push 0
push edx
push dword [esp + 0x18]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x54b195
cmp eax, 0xffffffff
jne 0x54b185
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
je 0x54b1d2
cmp eax, 0x2733
je 0x54b1d2
push dword [esp + 0x28]
push edi
push ebp
call fcn.0054a460
add esp, 0xc
jmp 0x54b1d2
add dword [esi + 0x34], eax
mov eax, dword [esi + 0x2c]
cmp dword [esi + 0x34], eax
jne 0x54b1d2
push dword [esp + 0x28]
push 1
push edi
push eax
push dword [esi + 0x30]
push ebp
call fcn.0054ac60
push dword [esi + 0x30]
call dword [0x5f09cc]
add esp, 0x1c
mov dword [esi + 0x30], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x34], 0
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
inc edi
add eax, 0x58
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
cmp edi, dword [ebp + 0x78]
jl 0x54afd5
pop esi
pop edi
pop ebp
pop ebx
add esp, 8
ret