Function at 0x4fc980
Capabilities:
Create udp socket
Get socket status
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5cd030
push 0x56a94d
mov eax, dword fs:[0]
push eax
sub esp, 0x338
push ebx
push esi
push edi
mov eax, dword [0x5d7050]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], 1
test dword [edi + 0x1174], 0x4000000
je 0x4fc9db
call fcn.004af4c0
lea ebx, [edi + 0xb18]
call fcn.0050e2d0
push 0x11
push 2
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, 0xffffffff
jne 0x4fca08
call sub.WS2_32.dll_WSAGetLastError
push eax
push str.socket_d
mov ecx, 0x6180b8
call fcn.00435a30
add esp, 8
mov byte [edi + 0xc], 0
lea eax, [ebp - 0x30]
push eax
push 0x8004667e
push esi
call sub.WS2_32.dll_ioctlsocket
lea esi, [edi + 0x20]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov word [esi], 2
push 0x43
call sub.WS2_32.dll_htons
mov word [edi + 0x22], ax
push 0
call sub.WS2_32.dll_htonl
mov dword [edi + 0x24], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x28], 1
mov ebx, 0x78
mov dword [ebp - 0x34], ebx
jmp 0x4fca60
push 0x10
push esi
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.WS2_32.dll_bind
test eax, eax
je 0x4fca9d
call sub.WS2_32.dll_WSAGetLastError
push eax
push str.Lerror:_RecvSocket_bind_failed:__d
mov ecx, 0x6180b8
call fcn.00435a30
add esp, 8
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub ebx, 1
mov dword [ebp - 0x34], ebx
test ebx, ebx
jg 0x4fca60
test ebx, ebx
mov ebx, dword [ebp - 0x1c]
jle 0x4fcad4
push 4
lea edx, [ebp - 0x3c]
push edx
push 0x20
push 0xffff
push ebx
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x4fcb13
call sub.WS2_32.dll_WSAGetLastError
push eax
push str.Lsetsockopt_failed:_setting_SO_BROADCAST_on_RecvSocket_error__d
mov ecx, 0x6180b8
call fcn.00435a30
add esp, 8
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 0x28], 0
call fcn.004fcc08
cmp byte [edi + 0xc], 0
je 0x4fcaff
push str.Lexiting
mov ecx, 0x6180b8
call fcn.00435a30
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x20], 0
cmp byte [edi + 0xc], 0
jne 0x4fcad4
mov dword [ebp - 0x24], 1
xor edx, edx
mov dword [ebp - 0x20], edx
xor ecx, ecx
mov dword [ebp - 0x140], ecx
xor eax, eax
mov dword [ebp - 0x38], eax
cmp eax, ecx
jae 0x4fcb54
cmp dword [ebp + eax*4 - 0x13c], ebx
je 0x4fcb52
add eax, 1
jmp 0x4fcb3d
cmp eax, ecx
jne 0x4fcb71
cmp ecx, 0x40
jae 0x4fcb71
mov dword [ebp + eax*4 - 0x13c], ebx
mov ecx, dword [ebp - 0x140]
add ecx, 1
mov dword [ebp - 0x140], ecx
mov dword [ebp - 0x348], edx
mov dword [ebp - 0x244], edx
lea eax, [ebp - 0x24]
push eax
lea edx, [ebp - 0x244]
push edx
lea eax, [ebp - 0x348]
push eax
lea edx, [ebp - 0x140]
push edx
push ecx
call sub.WS2_32.dll_select
test eax, eax
jle 0x4fcb21
lea eax, [ebp - 0x140]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4fcb21
lea esi, [edi + 0x1c8]
lea ecx, [edi + 0x1c4]
push ecx
lea edx, [edi + 0x10]
push edx
push 0
mov eax, dword [edi + 0x1c0]
push eax
push esi
push ebx
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jle 0x4fcb21
push eax
mov ebx, esi
call fcn.004fd060
mov ebx, eax
test ebx, ebx
je 0x4fcbf5
push edi
mov ecx, ebx
call fcn.004fcc70
call fcn.004fc740
mov ebx, dword [ebp - 0x1c]
jmp 0x4fcb21