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

Disassembly:
sub esp, 0xd8
mov eax, dword [0x67bbb0]
xor eax, esp
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0xe0]
push ebx
mov dword [esp + 0x20], eax
lea ebx, [esp + 0x48]
mov eax, dword [esp + 0xe8]
push esi
mov esi, dword [esp + 0xe4]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xf4]
push edi
mov dword [esp + 0x38], eax
xor edi, edi
xor eax, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], edi
mov byte [esp + 0xf], 0
mov dword [esp + 0x14], ebx
test esi, esi
je 0x4becb5
cmp dword [esi], 0xbab1e
jne 0x4becb5
cmp byte [esi + 0xe0], al
je 0x4be90f
lea eax, [edi + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd4]
xor ecx, esp
call fcn.005eee94
add esp, 0xd8
ret
push ebp
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x4be96a
lea eax, [esp + 0x40]
push eax
push ebp
call fcn.004bfa30
add esp, 8
mov ebx, eax
xor edx, edx
mov eax, 1
nop
or esi, 0xffffffff
test ebx, eax
je 0x4be93c
mov esi, dword [esp + edx*4 + 0x40]
inc edi
mov ecx, eax
rol ecx, 0x10
test ebx, ecx
je 0x4be94a
mov esi, dword [esp + edx*4 + 0x40]
inc edi
cmp esi, 0xffffffff
je 0x4be957
inc edx
rol eax, 1
cmp edx, 5
jb 0x4be930
mov ebp, dword [ebp]
mov dword [esp + 0x14], edi
test ebp, ebp
jne 0x4be917
mov esi, dword [esp + 0x24]
lea ebx, [esp + 0x54]
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.004c0ef0
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
js 0x4be992
mov ecx, dword [esp + 0xf8]
cmp eax, ecx
cmovl ecx, eax
mov dword [esp + 0x30], ecx
jmp 0x4be99d
mov eax, dword [esp + 0xf8]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x28]
add eax, edi
cmp byte [esp + 0x104], 0
mov dword [esp + 0x38], eax
je 0x4be9bb
cmp dword [esi + 0xe8], 0xffffffff
je 0x4be9bb
inc eax
cmp eax, 0xa
jbe 0x4be9f8
shl eax, 3
push eax
call dword [0x6780d8]
mov ebx, eax
mov dword [esp + 0x1c], eax
add esp, 4
test ebx, ebx
jne 0x4be9f3
lea eax, [ebx + 3]
pop ebp
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd4]
xor ecx, esp
call fcn.005eee94
add esp, 0xd8
ret
mov byte [esp + 0x13], 1
xor ebp, ebp
mov dword [esp + 0x20], ebp
test edi, edi
je 0x4bea9a
mov eax, dword [esi + 4]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4bea9a
mov edi, dword [esp + 0x18]
nop dword [eax]
lea ecx, [esp + 0x40]
push ecx
push eax
call fcn.004bfa30
add esp, 8
mov ebx, eax
xor edx, edx
mov ecx, 1
or esi, 0xffffffff
test ebx, ecx
je 0x4bea54
mov eax, dword [esp + edx*4 + 0x40]
mov dword [edi + ebp*8], eax
mov eax, 0x300
mov word [edi + ebp*8 + 4], ax
inc ebp
mov esi, dword [esp + edx*4 + 0x40]
mov eax, ecx
rol eax, 0x10
test ebx, eax
je 0x4bea73
mov eax, dword [esp + edx*4 + 0x40]
mov dword [edi + ebp*8], eax
mov eax, 0x10
mov word [edi + ebp*8 + 4], ax
inc ebp
mov esi, dword [esp + edx*4 + 0x40]
cmp esi, 0xffffffff
je 0x4bea80
inc edx
rol ecx, 1
cmp edx, 5
jb 0x4bea37
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], ebp
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4bea20
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4beb27
mov esi, dword [esp + 0x2c]
lea ecx, [ebp*8 + 4]
add ecx, ebx
mov dword [esp + 0x1c], eax
add esi, 4
add ebp, eax
mov dword [esp + 0x20], ebp
mov ebp, 0x300
mov eax, dword [esi - 4]
xor edx, edx
mov dword [ecx - 4], eax
xor eax, eax
mov word [ecx], ax
movzx eax, word [esi]
mov edi, eax
test al, 1
je 0x4beae3
mov word [ecx], bp
mov edx, ebp
movzx edi, word [esi]
movzx eax, di
movzx ebx, dx
mov edi, eax
mov dword [esp + 0x34], edi
test al, 2
je 0x4beb04
or edx, 0x400
mov word [ecx], dx
movzx eax, word [esi]
movzx ebx, dx
jmp 0x4beb08
mov eax, dword [esp + 0x34]
test al, 4
je 0x4beb12
or ebx, 0x10
mov word [ecx], bx
add ecx, 8
add esi, 8
sub dword [esp + 0x1c], 1
jne 0x4beac5
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
cmp byte [esp + 0x104], 0
mov ebx, dword [esp + 0x18]
je 0x4beb56
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0xe8]
cmp eax, 0xffffffff
je 0x4beb56
mov dword [ebx + ebp*8], eax
mov eax, 0x300
mov word [ebx + ebp*8 + 4], ax
inc ebp
mov dword [esp + 0x20], ebp
test ebp, ebp
je 0x4bec33
push dword [esp + 0x30]
push ebp
push ebx
call fcn.004cfdf0
add esp, 0xc
mov dword [esp + 0x34], eax
test eax, eax
jle 0x4bec33
cmp dword [esp + 0x28], 0
mov dword [esp + 0x14], eax
je 0x4bebe7
mov ebp, dword [esp + 0x2c]
lea edi, [edi*8 + 6]
add ebp, 6
add edi, ebx
movsx esi, word [edi]
lea edi, [edi + 8]
mov eax, esi
lea ebp, [ebp + 8]
and eax, 0x300
mov ebx, esi
neg eax
sbb eax, eax
neg eax
movzx edx, ax
mov eax, edx
or eax, 4
and bl, 0x10
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and esi, 0x400
movzx ecx, ax
mov eax, edx
cmove ecx, eax
sub dword [esp + 0x28], 1
mov word [ebp - 8], cx
jne 0x4beb93
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
cmp byte [esp + 0x104], 0
mov edi, dword [esp + 0x24]
je 0x4bec3b
cmp dword [edi + 0xe8], 0xffffffff
je 0x4bec3b
mov eax, dword [esp + 0x38]
mov ecx, 0x300
test word [ebx + eax*8 + 6], cx
je 0x4bec3b
mov esi, dword [sym.imp.WS2_32.dll_recv]
push 0
push 0x40
lea eax, [esp + 0xac]
push eax
push dword [edi + 0xe8]
call esi
test eax, eax
jns 0x4bec14
mov esi, dword [esp + 0x34]
dec esi
jmp 0x4bec3f
mov edi, dword [esp + 0x24]
xor esi, esi
jmp 0x4bec3f
mov esi, dword [esp + 0x14]
cmp byte [esp + 0x13], 0
je 0x4bec50
push ebx
call dword [0x6780dc]
add esp, 4
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4bec5a
mov dword [eax], esi
cmp byte [esp + 0x100], 0
je 0x4becae
test ebp, ebp
jne 0x4becae
cmp dword [edi], 0xbab1e
mov dword [esp + 0x2c], ebp
jne 0x4becae
cmp byte [edi + 0xe0], 0
jne 0x4becae
lea eax, [esp + 0x2c]
push eax
push edi
call fcn.004c0ef0
add esp, 8
test eax, eax
jne 0x4becae
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4becae
mov ecx, dword [esp + 0x30]
cmp eax, ecx
jg 0x4beca3
test eax, eax
jns 0x4beca5
mov eax, ecx
push eax
call fcn.004d05b0
add esp, 4
xor eax, eax
jmp 0x4be9da
mov ecx, dword [esp + 0xe0]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005eee94
add esp, 0xd8
ret