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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov esi, dword [esp + 0x44]
mov ebp, ecx
mov dword [esp + 0x18], edx
mov ebx, dword [esi]
mov edi, dword [esi + 8]
mov eax, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp], edi
sub eax, edi
cmp eax, 0x20
jae 0x4be98b
lea ecx, [esp + 8]
push esi
call fcn.004beb90
add esp, 4
movzx eax, byte [esp + 8]
cmp al, 4
jne 0x4beae2
cmp dword [esp + 0xc], 0
je 0x4beb2a
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 8]
mov ebx, dword [esi]
mov dword [esp], eax
mov eax, dword [edx]
mov dword [esp + 0x14], edi
mov dword [esp + 4], ebp
mov ebp, 0x2000
xor edi, edi
mov edx, esi
mov dword [esp + 0x20], eax
jmp 0x4be9bc
sub edi, eax
cmp esi, ebp
cmovb ecx, ebp
cmp eax, esi
cmove ebp, ecx
cmp dword [esp], ebx
jne 0x4be9fe
cmp ebx, dword [esp + 0x1c]
jne 0x4be9fe
mov eax, edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 8]
push eax
call fcn.004beb90
add esp, 4
movzx eax, byte [esp + 8]
cmp al, 4
jne 0x4beb37
cmp dword [esp + 0xc], 0
je 0x4beb57
mov edx, dword [esp + 0x44]
mov ebx, dword [edx]
mov eax, dword [edx + 8]
mov dword [esp], eax
cmp dword [esp], ebx
jne 0x4bea40
cmp ebx, 0xffffffdf
ja 0x4beaff
lea esi, [ebx + 0x20]
lea eax, [ebx + ebx]
cmp eax, esi
cmova esi, eax
test esi, esi
js 0x4beaff
test ebx, ebx
je 0x4bea45
mov eax, dword [edx + 4]
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 0x10], ebx
jmp 0x4bea47
mov eax, dword [edx + 4]
jmp 0x4bea7c
xor eax, eax
mov dword [esp + 0xc], eax
lea eax, [esp + 8]
lea ecx, [esp + 0x24]
mov edx, 1
push eax
push esi
call fcn.0041c420
add esp, 8
cmp dword [esp + 0x24], 1
je 0x4beaff
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x44]
mov ebx, esi
mov dword [ecx + 4], eax
mov dword [ecx], esi
mov esi, ebx
sub esi, dword [esp]
cmp esi, ebp
cmovae esi, ebp
cmp esi, 0x7fffffff
mov ecx, esi
jb 0x4bea95
mov ecx, 0x7fffffff
add eax, dword [esp]
push 0
push ecx
push eax
push dword [esp + 0x2c]
call dword [sym.imp.ws2_32.dll_recv]
cmp eax, 0xffffffff
je 0x4beb0a
cmp edi, eax
cmovbe edi, eax
test eax, eax
je 0x4beb17
mov ecx, dword [esp]
mov edx, dword [esp + 0x44]
add ecx, eax
cmp edi, esi
mov dword [esp], ecx
mov dword [edx + 8], ecx
mov ecx, 0xffffffff
je 0x4bead1
mov ebp, 0xffffffff
test ebp, ebp
js 0x4be9b0
lea ecx, [ebp + ebp]
jmp 0x4be9b0
movzx ecx, byte [esp + 0xb]
movzx esi, word [esp + 9]
mov edx, dword [esp + 0xc]
mov byte [ebp + 3], cl
mov word [ebp + 1], si
mov byte [ebp], al
mov dword [ebp + 4], edx
jmp 0x4beb7b
mov eax, dword [esp + 4]
mov word [eax], 0x2601
jmp 0x4beb7b
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x274a
jne 0x4beb6e
mov ecx, dword [esp]
mov eax, dword [esp + 4]
sub ecx, dword [esp + 0x14]
mov dword [eax + 4], ecx
mov byte [eax], 4
jmp 0x4beb7b
mov dword [ebp + 4], 0
mov byte [ebp], 4
jmp 0x4beb7b
movzx ecx, byte [esp + 0xb]
mov edx, dword [esp + 4]
movzx edi, word [esp + 9]
mov esi, dword [esp + 0xc]
mov byte [edx + 3], cl
mov word [edx + 1], di
mov byte [edx], al
mov dword [edx + 4], esi
jmp 0x4beb7b
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 4]
mov eax, dword [eax + 8]
sub eax, dword [esp + 0x14]
mov dword [ecx + 4], eax
mov byte [ecx], 4
jmp 0x4beb7b
mov ecx, dword [esp + 4]
mov dword [ecx + 4], eax
mov dword [ecx], 0
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret