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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffffe8
push ebx
push esi
push edi
mov esi, dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00508d4c
mov ebx, eax
test ebx, ebx
je 0x50ab27
cmp dword [ebx + 0x14c], 2
jne 0x50ab27
mov eax, esi
shr eax, 0x10
and ax, 0xffff
test ax, ax
je 0x50a8c5
movzx edx, ax
mov dword [ebx + 0x184], edx
cmp dword [0x56cdd8], 0
je 0x50a8ac
cmp si, 0x20
jne 0x50a883
push 3
push 0x3b
push ebx
push 0x56dfe0
call fcn.00508df7
jmp 0x50a8ac
cmp dword [ebx + 0x158], 0
je 0x50a89d
push 3
push 0x44
push ebx
push 0x56dfeb
call fcn.00508df7
jmp 0x50a8ac
push 3
push 0x3e
push ebx
push 0x56dff4
call fcn.00508df7
push ebx
call fcn.00508cec
test eax, eax
je 0x50ab27
push ebx
call fcn.00508c2b
jmp 0x50ab27
push 0
call fcn.0055ca2c
pop ecx
mov dword [ebx + 0x180], eax
push 1
push 1
push dword [ebx + 0x18c]
push 0x8038
call fcn.00528a48
test eax, eax
jne 0x50ab27
inc dword [ebx + 0x188]
cmp dword [ebx + 0x188], 0x14
jl 0x50a922
xor ecx, ecx
mov dword [ebx + 0x188], ecx
push 0
push 1
push dword [ebx + 0x18c]
push 0x8038
call fcn.00528a48
test eax, eax
jne 0x50ab27
mov eax, 0x1001
sub eax, dword [ebx + 0x138]
cmp eax, 1
jle 0x50aa86
cmp dword [ebx + 0x158], 0
je 0x50a996
mov dword [ebp - 4], 0x10
lea edx, [ebp - 4]
push edx
lea ecx, [ebp - 0x1018]
push ecx
push 0
dec eax
push eax
lea edx, [ebp - 0x1008]
push edx
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_recvfrom
mov esi, eax
cmp dword [ebp - 4], 0
jle 0x50a9ae
push dword [ebp - 0x1014]
call sub.WSOCK32.dll_htonl
mov dword [ebx + 0x168], eax
mov ax, word [ebp - 0x1016]
push eax
call sub.WSOCK32.dll_ntohs
mov word [ebx + 0x16c], ax
jmp 0x50a9ae
push 0
dec eax
push eax
lea edx, [ebp - 0x1008]
push edx
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_recv
mov esi, eax
cmp esi, 0xffffffff
jne 0x50a9d3
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x50ab27
mov dword [ebx + 0x184], eax
mov esi, 3
jmp 0x50ab00
test esi, esi
jle 0x50aafe
cmp dword [0x56cdd8], 0
jne 0x50aa0a
mov eax, dword [ebx + 0x134]
test eax, eax
je 0x50a9f5
push eax
call fcn.00559c5c
pop ecx
xor edx, edx
mov dword [ebx + 0x134], edx
xor ecx, ecx
mov dword [ebx + 0x138], ecx
jmp 0x50a8ef
mov eax, dword [ebx + 0x134]
test eax, eax
je 0x50aa39
mov edx, dword [ebx + 0x138]
add edx, esi
add edx, 0xa
push edx
push eax
call fcn.0055a23c
add esp, 8
test eax, eax
je 0x50a8ef
mov dword [ebx + 0x134], eax
jmp 0x50aa53
lea ecx, [esi + 0xa]
push ecx
call fcn.00559d70
pop ecx
mov edi, eax
mov dword [ebx + 0x134], edi
test edi, edi
je 0x50a8ef
push esi
lea eax, [ebp - 0x1008]
push eax
mov edx, dword [ebx + 0x134]
add edx, dword [ebx + 0x138]
push edx
call fcn.0054e09c
add esp, 0xc
add dword [ebx + 0x138], esi
mov ecx, dword [ebx + 0x134]
mov eax, dword [ebx + 0x138]
mov byte [ecx + eax], 0
xor edx, edx
mov dword [ebx + 0x150], edx
cmp dword [ebx + 0x158], 0
je 0x50aaa8
push 0
push 0x44
push ebx
push str.UDPREAD
call fcn.00508df7
jmp 0x50aab7
push 0
push 0x3e
push ebx
push str.SOCKREAD
call fcn.00508df7
push ebx
call fcn.00508cec
test eax, eax
je 0x50ab27
cmp dword [ebx + 0x150], 0
jne 0x50aaf0
mov eax, dword [ebx + 0x134]
test eax, eax
je 0x50aadb
push eax
call fcn.00559c5c
pop ecx
xor edx, edx
mov dword [ebx + 0x134], edx
xor ecx, ecx
mov dword [ebx + 0x138], ecx
jmp 0x50a8ef
cmp dword [ebx + 0x150], 2
je 0x50aa86
jmp 0x50a8ef
xor esi, esi
cmp dword [0x56cdd8], 0
je 0x50ab21
push esi
push 0x3b
push ebx
push str.SOCKCLOSE
call fcn.00508df7
push ebx
call fcn.00508cec
test eax, eax
je 0x50ab27
push ebx
call fcn.00508c2b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8