Function at 0x508cee
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.00507220
mov ebx, eax
test ebx, ebx
je 0x508fff
cmp dword [ebx + 0x14c], 2
jne 0x508fff
mov eax, esi
shr eax, 0x10
and ax, 0xffff
test ax, ax
je 0x508d99
movzx edx, ax
mov dword [ebx + 0x184], edx
cmp dword [0x56acb4], 0
je 0x508d80
cmp si, 0x20
jne 0x508d57
push 3
push 0x3b
push ebx
push 0x56beb0
call fcn.005072cb
jmp 0x508d80
cmp dword [ebx + 0x158], 0
je 0x508d71
push 3
push 0x43
push ebx
push 0x56bebb
call fcn.005072cb
jmp 0x508d80
push 3
push 0x3e
push ebx
push 0x56bec4
call fcn.005072cb
push ebx
call fcn.005071c0
test eax, eax
je 0x508fff
push ebx
call fcn.005070ff
jmp 0x508fff
push 0
call fcn.0055aa70
pop ecx
mov dword [ebx + 0x180], eax
push 1
push 1
push dword [ebx + 0x18c]
push 0x8038
call fcn.00526a8c
test eax, eax
jne 0x508fff
inc dword [ebx + 0x188]
cmp dword [ebx + 0x188], 0x14
jl 0x508df6
xor ecx, ecx
mov dword [ebx + 0x188], ecx
push 0
push 1
push dword [ebx + 0x18c]
push 0x8038
call fcn.00526a8c
test eax, eax
jne 0x508fff
mov eax, 0x1001
sub eax, dword [ebx + 0x138]
cmp eax, 1
jle 0x508f5a
cmp dword [ebx + 0x158], 0
je 0x508e6a
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 0x508e82
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 0x508e82
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 0x508ea7
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x508fff
mov dword [ebx + 0x184], eax
mov esi, 3
jmp 0x508fd8
test esi, esi
jle 0x508fd6
cmp dword [0x56acb4], 0
jne 0x508ede
mov eax, dword [ebx + 0x134]
test eax, eax
je 0x508ec9
push eax
call fcn.00557ca0
pop ecx
xor edx, edx
mov dword [ebx + 0x134], edx
xor ecx, ecx
mov dword [ebx + 0x138], ecx
jmp 0x508dc3
mov eax, dword [ebx + 0x134]
test eax, eax
je 0x508f0d
mov edx, dword [ebx + 0x138]
add edx, esi
add edx, 0xa
push edx
push eax
call fcn.00558280
add esp, 8
test eax, eax
je 0x508dc3
mov dword [ebx + 0x134], eax
jmp 0x508f27
lea ecx, [esi + 0xa]
push ecx
call fcn.00557db4
pop ecx
mov edi, eax
mov dword [ebx + 0x134], edi
test edi, edi
je 0x508dc3
push esi
lea eax, [ebp - 0x1008]
push eax
mov edx, dword [ebx + 0x134]
add edx, dword [ebx + 0x138]
push edx
call fcn.0054c0e0
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 0x508f7c
push 0
push 0x43
push ebx
push str.UDPREAD
call fcn.005072cb
jmp 0x508f8b
push 0
push 0x3e
push ebx
push str.SOCKREAD
call fcn.005072cb
push ebx
call fcn.005071c0
test eax, eax
je 0x508dc3
cmp dword [ebx + 0x150], 0
jne 0x508fc8
mov eax, dword [ebx + 0x134]
test eax, eax
je 0x508fb3
push eax
call fcn.00557ca0
pop ecx
xor edx, edx
mov dword [ebx + 0x134], edx
xor ecx, ecx
mov dword [ebx + 0x138], ecx
jmp 0x508dc3
cmp dword [ebx + 0x150], 2
je 0x508f5a
jmp 0x508dc3
xor esi, esi
cmp dword [0x56acb4], 0
je 0x508ff9
push esi
push 0x3b
push ebx
push str.SOCKCLOSE
call fcn.005072cb
push ebx
call fcn.005071c0
test eax, eax
je 0x508fff
push ebx
call fcn.005070ff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8