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

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov esi, edx
mov ebp, ecx
push edi
mov edx, dword [esi + 0x2c]
and edx, 0xfffeffff
mov dword [esi + 0x2c], edx
cmp dword [ebx + 0x20], 0
jge 0x4b53ca
test edx, 0x1000
jne 0x4b5349
test edx, 0x40000
jne 0x4b55c7
and edx, 0xffffefff
add dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x2c], edx
mov ecx, edx
jne 0x4b5378
mov eax, edx
and al, 5
cmp al, 4
jne 0x4b5378
and edx, 0xfffffffb
mov dword [esi + 0x2c], edx
mov ecx, edx
test dl, 8
je 0x4b5378
mov eax, dword [esi + 4]
dec dword [eax + 4]
mov ecx, dword [esi + 0x2c]
test ecx, 0x40000
je 0x4b5386
xor ecx, ecx
xor eax, eax
jmp 0x4b5392
mov eax, dword [esi + 0x98]
mov ecx, dword [esi + 0x9c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebx + 0x20]
mov dword [esp + 0x18], eax
call fcn.004b83b0
cmp eax, 0x2745
mov ecx, 0x2746
cmove eax, ecx
lea ecx, [esp + 0x18]
push ecx
mov ecx, eax
call fcn.004b8970
push eax
mov eax, dword [esi + 0x38]
push esi
call eax
add esp, 0xc
jmp 0x4b55c7
test edx, 0x40000
jne 0x4b53fc
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x4b54a4
lea edi, [esi + 0x98]
push edi
push eax
mov eax, dword [esi + 0x38]
push esi
call eax
mov eax, dword [ebx + 0x24]
add esp, 0xc
cmp eax, dword [edi]
jb 0x4b55af
mov edx, dword [esi + 0x2c]
test edx, 0x1000
je 0x4b55af
mov edi, dword [sym.imp.WS2_32.dll_WSARecv]
xor ebx, ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
mov eax, dword [esi + 0x34]
push 0x10000
push esi
mov dword [esp + 0x28], ebx
call eax
add esp, 0xc
cmp dword [esp + 0x1c], ebx
je 0x4b559c
cmp dword [esp + 0x18], ebx
je 0x4b559c
push 0
push 0
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
lea eax, [esp + 0x30]
push eax
push 1
lea eax, [esp + 0x2c]
push eax
push dword [esi + 0x90]
call edi
cmp eax, 0xffffffff
je 0x4b553b
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4b5504
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [esi + 0x38]
push esi
call eax
mov eax, dword [esp + 0x30]
add esp, 0xc
cmp eax, dword [esp + 0x18]
jb 0x4b55af
test dword [esi + 0x2c], 0x1000
jne 0x4b5410
jmp 0x4b55af
test edx, 0x1000
je 0x4b54da
and edx, 0xffffefff
add dword [esi + 0x40], 0xffffffff
mov ecx, edx
jne 0x4b54d8
mov eax, edx
and al, 5
cmp al, 4
jne 0x4b54d8
and edx, 0xfffffffb
mov dword [esi + 0x2c], edx
mov ecx, edx
test dl, 8
je 0x4b54d8
mov eax, dword [esi + 4]
dec dword [eax + 4]
mov ecx, dword [esi + 0x2c]
mov edx, ecx
lea eax, [esi + 0x98]
mov dword [esp + 0x1c], 0
and edx, 0xffffbfff
mov dword [esp + 0x18], 0
push eax
mov dword [esi + 0x2c], edx
push 0xfffff001
jmp 0x4b55a6
mov ecx, dword [esi + 0x2c]
and ecx, 0xffffafff
add dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x2c], ecx
jne 0x4b552f
mov eax, ecx
and al, 5
cmp al, 4
jne 0x4b552f
and ecx, 0xfffffffb
mov dword [esi + 0x2c], ecx
test cl, 8
je 0x4b552f
mov eax, dword [esi + 4]
dec dword [eax + 4]
lea eax, [esp + 0x18]
push eax
push 0xfffff001
jmp 0x4b55a6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
cmp edx, 0x2733
jne 0x4b5554
lea eax, [esp + 0x18]
push eax
push 0
jmp 0x4b55a6
mov ecx, dword [esi + 0x2c]
and ecx, 0xffffefff
add dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x2c], ecx
jne 0x4b557f
mov eax, ecx
and al, 5
cmp al, 4
jne 0x4b557f
and ecx, 0xfffffffb
mov dword [esi + 0x2c], ecx
test cl, 8
je 0x4b557f
mov eax, dword [esi + 4]
dec dword [eax + 4]
cmp edx, 0x2745
mov eax, 0x2746
cmove edx, eax
lea eax, [esp + 0x18]
push eax
mov ecx, edx
call fcn.004b8970
push eax
jmp 0x4b55a6
lea eax, [esp + 0x18]
push eax
push 0xfffff024
mov eax, dword [esi + 0x38]
push esi
call eax
add esp, 0xc
mov eax, dword [esi + 0x2c]
and eax, 0x11000
cmp eax, 0x1000
jne 0x4b55c7
mov edx, esi
mov ecx, ebp
call fcn.004b4f30
mov ecx, dword [esi + 0x3c]
mov eax, dword [esi + 0x2c]
dec ecx
mov dword [esi + 0x3c], ecx
test al, 1
je 0x4b55ec
test ecx, ecx
jne 0x4b55ec
test al, 0x20
jne 0x4b55ec
or eax, 0x20
mov dword [esi + 0x2c], eax
mov eax, dword [ebp + 0x2c]
mov dword [esi + 0x28], eax
mov dword [ebp + 0x2c], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret