Function at 0x4a5d60
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x924
push ebx
push esi
push edi
push 0xc0
xor esi, esi
xor eax, eax
push esi
push 0x6f6650
mov word [0x6f6644], ax
call sub.msvcrt.dll_memset
push 0x3e80
mov byte [0x6f254b], 0
call fcn.004a5be0
add esp, 0x10
call fcn.004a3bd0
test al, al
je 0x4a5db9
movzx ecx, byte [0x6f671c]
add ecx, 0x3c8c
push ecx
call fcn.004a5be0
add esp, 4
call fcn.004a5ce0
push esi
call fcn.004a5be0
mov dl, byte [0x6f254b]
mov edi, dword [ebp - 0x10]
add esp, 4
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], esi
mov byte [ebp - 1], dl
mov byte [0x6f254a], 1
xor ebx, ebx
mov dword [ebp - 8], ebx
call fcn.004574b0
cmp eax, dword [ebp - 0x18]
jb 0x4a5e4e
add eax, 0x1f4
mov dword [ebp - 0x18], eax
cmp byte [0x6f254b], bl
jbe 0x4a5e44
mov esi, 0x6f6650
mov al, byte [esi]
mov edi, esi
test al, al
je 0x4a5e35
cmp byte [esi + 1], 5
jae 0x4a5e1d
push esi
call fcn.004a40d0
add esp, 4
jmp 0x4a5e35
cmp al, 1
jne 0x4a5e2f
cmp word [esi + 8], 0
je 0x4a5e2f
mov word [esi], 2
jmp 0x4a5e35
dec byte [ebp - 1]
mov byte [esi], 0
movzx eax, byte [0x6f254b]
inc ebx
add esi, 0x10
cmp ebx, eax
jb 0x4a5e04
cmp byte [ebp - 1], 0
je 0x4a610b
movzx eax, byte [0x6f254b]
xor edx, edx
xor ebx, ebx
mov dword [ebp - 0x124], edx
test eax, eax
je 0x4a5ebf
mov ecx, 0x6f6650
mov dword [ebp - 0xc], eax
jmp 0x4a5e70
cmp byte [ecx], 0
mov edi, ecx
je 0x4a5eb7
xor eax, eax
test edx, edx
je 0x4a5e8e
mov esi, dword [ecx + 4]
cmp dword [ebp + eax*4 - 0x120], esi
je 0x4a5e8e
inc eax
cmp eax, edx
jb 0x4a5e80
cmp eax, edx
jne 0x4a5eae
cmp edx, 0x40
jae 0x4a5eae
mov edx, dword [ecx + 4]
mov dword [ebp + eax*4 - 0x120], edx
mov edx, dword [ebp - 0x124]
inc edx
mov dword [ebp - 0x124], edx
mov eax, dword [ecx + 4]
cmp eax, ebx
jbe 0x4a5eb7
mov ebx, eax
add ecx, 0x10
dec dword [ebp - 0xc]
jne 0x4a5e70
xor esi, esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], 0x2710
call fcn.004a4e20
cmp dword [ebp - 0x124], esi
jne 0x4a5efe
mov ecx, dword [ebp - 0x20]
mov eax, 0x10624dd3
imul ecx, ecx, 0x3e8
imul dword [ebp - 0x1c]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4a5f15
lea edx, [ebp - 0x20]
push edx
push esi
push esi
lea eax, [ebp - 0x124]
push eax
inc ebx
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
call fcn.004a4e00
cmp byte [0x6f254a], 0
je 0x4a612f
call fcn.004574b0
mov dword [ebp - 0x10], eax
test esi, esi
je 0x4a601d
cmp byte [0x6f254b], 0
mov byte [ebp - 2], 0
mov dword [ebp - 0xc], 0
jbe 0x4a601d
mov esi, 0x6f6650
mov edx, dword [esi + 4]
lea ecx, [ebp - 0x124]
push ecx
push edx
mov edi, esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a5ff2
mov ecx, dword [esi + 4]
push 0
push 0
push 0
push 0x800
lea eax, [ebp - 0x924]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xa
jne 0x4a5ff2
cmp byte [ebp - 0x924], 0x81
jne 0x4a5ff2
mov edx, dword [ebp - 0x923]
push edx
call dword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [0x6f5dfc]
jne 0x4a5ff2
mov eax, dword [ebp - 0x91f]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp ax, word [esi + 2]
jne 0x4a5ff2
mov al, byte [ebp - 0x91b]
mov bl, al
cmp al, 2
ja 0x4a5ff2
mov ecx, dword [ebp - 0x91d]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movsx edx, bl
cmp word [esi + edx*2 + 8], 0
movzx ecx, ax
lea eax, [esi + edx*2 + 8]
jne 0x4a5ff2
mov word [eax], cx
mov byte [ebp - 2], 1
mov eax, dword [ebp - 0xc]
movzx ecx, byte [0x6f254b]
inc eax
add esi, 0x10
mov dword [ebp - 0xc], eax
cmp eax, ecx
jb 0x4a5f54
cmp byte [ebp - 2], 0
je 0x4a601d
mov edx, dword [ebp - 0x10]
add edx, 0xfa
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4a6090
cmp dword [ebp - 0x10], eax
jb 0x4a6090
movzx ecx, byte [0x6f254b]
xor eax, eax
test ecx, ecx
je 0x4a6090
jmp 0x4a6040
mov edi, eax
shl edi, 4
add edi, 0x6f6650
mov dl, byte [edi]
test dl, dl
je case.default.0x4a605a
movzx edx, dl
dec edx
cmp edx, 3
ja case.default.0x4a605a
jmp dword [edx*4 + 0x4a6174]
movzx edx, word [edi + 0xa]
jmp 0x4a6071
movzx edx, word [edi + 0xc]
jmp 0x4a6071
movzx edx, word [edi + 8]
test dx, dx
je case.default.0x4a605a
mov eax, ecx
mov word [0x6f6644], dx
mov dword [ebp - 8], edi
inc eax
cmp eax, ecx
jb 0x4a6040
mov esi, dword [ebp - 8]
test esi, esi
jne 0x4a60a8
jmp 0x4a6093
mov esi, dword [ebp - 8]
cmp byte [0x6f254a], 0
jne 0x4a5de0
test esi, esi
je 0x4a612f
mov eax, dword [esi + 4]
mov cx, word [esi + 2]
mov edx, dword [0x6f25c0]
mov dword [0x69fb40], eax
mov byte [0x6f254a], 0
mov dword [esi + 4], 0xffffffff
mov word [edx + 0xc], cx
mov eax, dword [0x69fb40]
push 0x40000
push eax
call fcn.004a3dc0
mov ecx, dword [0x69fb40]
push 0x40000
push ecx
call fcn.004a3de0
add esp, 0x10
cmp byte [esi], 2
jne 0x4a612a
mov dx, word [edi + 0xc]
cmp dx, word [edi + 8]
jne 0x4a611e
push 3
call fcn.004a4f50
add esp, 4
jmp 0x4a612f
push 1
call fcn.004a4f50
add esp, 4
mov byte [0x6f254a], 0
jmp 0x4a612f
push 2
call fcn.004a4f50
add esp, 4
jmp 0x4a612f
call fcn.004a4f80
xor esi, esi
cmp byte [0x6f254b], 0
jbe 0x4a616a
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
mov edi, 0x6f6654
mov eax, dword [edi]
test eax, eax
je 0x4a615b
cmp eax, 0xffffffff
je 0x4a615b
cmp eax, dword [0x69fb3c]
je 0x4a615b
push eax
call ebx
movzx eax, byte [0x6f254b]
inc esi
add edi, 0x10
cmp esi, eax
jb 0x4a6145
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret