Function at 0x4caf30
Capabilities:
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4a8
mov rbp, rsp
mov qword [rbp + 0x48], rdx
mov qword [rbp + 0x38], r8
mov dword [rbp + 0x44], r9d
mov qword [rbp + 0x60], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x280], 0
nop
mov rcx, qword [rbp + 0x4f8]
mov rdx, qword [0x004221f8]
call fcn.00413ec0
mov rcx, qword [rbp + 0x500]
mov rdx, qword [0x004221f8]
call fcn.00413ec0
mov ecx, 2
mov edx, 2
mov r8d, 0x11
call sub.wsock32.dll_socket
mov qword [rbp + 0x50], rax
mov rax, qword [rbp + 0x50]
cmp rax, 0xffffffffffffffff
je 0x4cb2e8
mov word [rbp + 0x290], 2
mov dword [rbp + 0x294], 0
mov word [rbp + 0x292], 0
mov rcx, qword [rbp + 0x50]
lea rdx, [rbp + 0x290]
mov r8d, 0x10
call sub.wsock32.dll_bind
cmp eax, 0xffffffff
je 0x4cb2df
lea rcx, [rbp + 0x2a0]
mov edx, 0x200
call fcn.00421ad0
mov byte [rbp + 0x2a1], 1
mov byte [rbp + 0x2a2], 1
mov byte [rbp + 0x2a5], 1
lea rcx, [rbp + 0x280]
lea rdx, [0x004cb378]
mov r8, qword [rbp + 0x48]
call fcn.00410f60
mov esi, 1
lea rcx, [0x004cb378]
mov rdx, qword [rbp + 0x280]
mov r8d, esi
add r8d, 1
mov r9d, 0x7fffffff
mov rax, qword [0x00bb8998]
call qword [rax]
mov ebx, eax
test ebx, ebx
jle 0x4cb08b
mov rcx, qword [rbp + 0x280]
call fcn.004108b0
cmp ebx, eax
jge 0x4cb08b
mov rax, qword [rbp + 0x280]
movsxd rcx, esi
mov edx, ebx
sub dl, sil
sub dl, 1
mov byte [rax + rcx - 1], dl
mov esi, ebx
jmp 0x4cb036
mov rcx, qword [rbp + 0x280]
call fcn.004108b0
mov rcx, qword [rbp + 0x280]
movsxd rdx, esi
sub al, sil
mov byte [rcx + rdx - 1], al
nop
lea rcx, [rbp + 0x280]
call fcn.004109d0
mov rbx, rax
mov rcx, qword [rbp + 0x280]
call fcn.004108b0
mov rcx, rbx
lea rdx, [rbp + 0x2ac]
movsxd r8, eax
call fcn.00408cc0
mov rcx, qword [rbp + 0x280]
call fcn.004108b0
add eax, 0xc
mov dword [rbp + 0x28c], eax
movsxd rax, dword [rbp + 0x28c]
movzx rcx, byte [rbp + 0x4f0]
mov byte [rax + rbp + 0x2a2], cl
movsxd rax, dword [rbp + 0x28c]
mov byte [rax + rbp + 0x2a4], 1
add dword [rbp + 0x28c], 5
xor rax, rax
mov dword [rbp + 0x5c], eax
xor rsi, rsi
mov edi, dword [rbp + 0x44]
cmp esi, edi
jg 0x4cb1bc
add edi, 1
movsxd rax, esi
mov rcx, qword [rbp + 0x38]
cmp qword [rcx + rax*8], 0
je 0x4cb1b1
mov rcx, rbp
movsxd rax, esi
mov rdx, qword [rbp + 0x38]
mov rdx, qword [rdx + rax*8]
call fcn.004caee0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4cb1b1
mov word [rbp + 0x290], 2
mov cx, 0x35
call sub.wsock32.dll_htons
mov word [rbp + 0x292], ax
mov dword [rbp + 0x294], ebx
mov rcx, qword [rbp + 0x50]
lea rdx, [rbp + 0x2a0]
mov r8d, dword [rbp + 0x28c]
xor r9, r9
lea rax, [rbp + 0x290]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0x10
call sub.wsock32.dll_sendto
cmp eax, 0xffffffff
je 0x4cb1b1
mov eax, dword [rbp + 0x5c]
add eax, 1
mov dword [rbp + 0x5c], eax
add esi, 1
cmp esi, edi
jne 0x4cb12e
nop
mov dword [rbp + 0x78], 1
mov rax, qword [rbp + 0x50]
mov qword [rbp + 0x80], rax
mov dword [rbp + 0x70], 5
mov dword [rbp + 0x74], 0
jmp 0x4cb283
movzx rax, byte [rbp + 0x2a4]
test al, 0xf
jne 0x4cb27a
mov rcx, rbp
lea rdx, [rbp + 0x68]
movzx r8d, word [rbp + 0x2a7]
lea r9, [rbp + 0x28c]
call fcn.004cad50
mov rcx, qword [rbp + 0x4f8]
mov rdx, qword [rbp + 0x68]
mov r8, qword [0x004221f8]
call fcn.00413f40
cmp byte [rbp + 0x4f0], 2
jne 0x4cb260
mov rcx, rbp
lea rdx, [rbp + 0x60]
movzx r8d, word [rbp + 0x2a9]
lea r9, [rbp + 0x28c]
call fcn.004cad50
mov rcx, qword [rbp + 0x500]
mov rdx, qword [rbp + 0x60]
mov r8, qword [0x004221f8]
call fcn.00413f40
mov rax, qword [rbp + 0x4f8]
cmp qword [rax], 0
jne 0x4cb2de
mov rax, qword [rbp + 0x500]
cmp qword [rax], 0
jne 0x4cb2de
mov eax, dword [rbp + 0x5c]
sub eax, 1
mov dword [rbp + 0x5c], eax
mov eax, dword [rbp + 0x5c]
test eax, eax
jle 0x4cb2de
xor rcx, rcx
lea rdx, [rbp + 0x78]
xor r8, r8
xor r9, r9
lea rax, [rbp + 0x70]
mov qword [rsp + 0x20], rax
call sub.wsock32.dll_select
test eax, eax
jle 0x4cb2de
mov rcx, qword [rbp + 0x50]
lea rdx, [rbp + 0x2a0]
mov r8d, 0x200
xor r9, r9
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
call sub.wsock32.dll_recvfrom
cmp eax, 0xffffffff
jne 0x4cb1e2
nop
mov rcx, qword [rbp + 0x50]
call sub.wsock32.dll_closesocket
nop
lea rcx, [rbp + 0x60]
mov rdx, qword [0x004221f8]
mov r8d, 2
call fcn.00412e00
lea rcx, [rbp + 0x280]
call fcn.004100d0
lea rsp, [rbp + 0x4a8]
pop rbx
pop rsi
pop rdi
pop rbp
ret