Function at 0x10004fb0
Capabilities:
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
mov eax, 0x13ec
call fcn.100256f0
mov eax, dword [0x1003b030]
xor eax, esp
mov dword [esp + 0x13e4], eax
mov eax, dword [esp + 0x13f4]
push ebx
mov ebx, dword [esp + 0x13f4]
push ebp
push esi
push edi
mov edi, edx
lea edx, [esp + 0x60]
push edx
xor esi, esi
push 0x202
mov dword [esp + 0x28], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x44], 0xbb8
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], esi
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esp + 0x18], eax
cmp eax, esi
je 0x10005298
cmp eax, 0xffffffff
je 0x10005298
push 4
lea ecx, [esp + 0x40]
push ecx
push 0x1006
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, dword [sym.imp.WS2_32.dll_htons]
mov edx, 2
push 0x35
mov word [esp + 0x54], dx
call esi
push ebx
mov word [esp + 0x56], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x54], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movzx ebp, ax
push ebp
call esi
push 1
mov word [esp + 0x28], ax
mov byte [esp + 0x2a], 1
mov byte [esp + 0x2b], 0
call esi
mov word [esp + 0x28], ax
xor eax, eax
xor ecx, ecx
xor edx, edx
push edi
lea edi, [esp + 0x1f4]
mov word [esp + 0x2e], ax
mov word [esp + 0x30], cx
mov word [esp + 0x32], dx
call fcn.10004f10
add esp, 4
push 1
mov edi, eax
call esi
push 1
mov word [esp + 0x18], ax
call esi
lea ebx, [edi + 0x10]
push ebx
mov word [esp + 0x1a], ax
call fcn.1001861e
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov esi, eax
mov eax, dword [esp + 0x28]
mov dword [esi], eax
mov dword [esi + 4], ecx
push edi
lea eax, [esp + 0x1f8]
push eax
lea ecx, [esi + 0xc]
push ecx
mov dword [esi + 8], edx
call fcn.1001c130
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
add esp, 0x10
push 0x10
lea eax, [esp + 0x54]
push eax
push 0
push ebx
push esi
push ecx
mov dword [esi + edi + 0xc], edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jl 0x10005294
lea edx, [esp + 0x38]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x54]
push eax
push 0
push 0x1000
lea ecx, [esp + 0x400]
push ecx
push edx
mov dword [esp + 0x50], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
jl 0x10005294
mov eax, dword [esp + 0x3f0]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
push eax
call esi
cmp ax, bp
jne 0x10005294
mov ecx, dword [esp + 0x3f6]
push ecx
call esi
movzx eax, ax
mov dword [esp + 0x48], eax
mov esi, ebx
mov dword [esp + 0x30], 0
test eax, eax
jle 0x1000528c
mov eax, dword [esp + 0x20]
mov ecx, 4
sub ecx, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], ecx
jmp 0x100051a7
mov edi, ebp
cmp esi, edi
jae 0x1000528c
lea edx, [esp + 0x4c]
push edx
push edi
lea eax, [esp + 0x1f8]
mov ecx, esi
lea edi, [esp + 0x3f8]
call fcn.10004df0
mov edi, eax
add esp, 8
test edi, edi
je 0x10005294
mov ebp, dword [esp + 0x14]
add esi, edi
cmp esi, ebp
jae 0x10005294
lea ebx, [esp + esi + 0x3f0]
add esi, 0xa
cmp esi, ebp
jae 0x10005294
movzx eax, word [ebx]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
cmp eax, 1
jne 0x1000524e
movzx ecx, word [ebx + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
lea edx, [edi + esi]
cmp edx, ebp
ja 0x10005294
cmp dword [esp + 0x20], 0
je 0x10005277
cmp edi, 4
jne 0x10005277
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
add ecx, eax
cmp ecx, 0x28
ja 0x10005277
mov edx, dword [esp + esi + 0x3f0]
add dword [esp + 0x10], edi
mov dword [eax], edx
add eax, edi
mov dword [esp + 0x34], eax
jmp 0x10005277
cmp eax, 5
jne 0x10005277
lea eax, [esp + 0x4c]
push eax
push ebp
lea eax, [esp + 0x1f8]
mov ecx, esi
lea edi, [esp + 0x3f8]
call fcn.10004df0
mov edi, eax
add esp, 8
test edi, edi
je 0x10005294
mov eax, dword [esp + 0x30]
inc eax
add esi, edi
cmp eax, dword [esp + 0x48]
mov dword [esp + 0x30], eax
jl 0x100051a5
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
test esi, esi
je 0x100052b4
mov edx, dword [esp + 0x10]
lea ecx, [edx + 1]
cmp ecx, 0x28
ja 0x100052b4
mov byte [esi + edx], 0
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x100052c2
mov edx, dword [esp + 0x10]
mov dword [ecx], edx
test eax, eax
je 0x100052d2
cmp eax, 0xffffffff
je 0x100052d2
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x13f4]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100186a4
add esp, 0x13ec
ret