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

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x128
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
xor ebp, ebp
push 0x1000
push ebp
mov dword [eax], 1
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
cmp ebx, ebp
je 0x406fa4
push 0x11
push 2
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x24], edi
je 0x406f99
cmp edi, 0xffffffff
je 0x406f99
mov dword [esp + 0x14], ebp
jmp 0x406d7d
mov edi, dword [esp + 0x24]
xor ebp, ebp
cmp dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
jne 0x406d8e
push 0x100
jmp 0x406d8f
push ebp
call dword [sym.imp.WSOCK32.dll_htons]
push eax
push dword [esp + 0x144]
push dword [esp + 0x144]
push edi
call fcn.00406fb1
add esp, 0x10
test eax, eax
jne 0x406f53
push 0xc
lea eax, [esp + 0x30]
pop esi
mov dword [esp + 0x38], edi
push eax
push ebp
lea eax, [esp + 0x3c]
push ebp
push eax
push ebp
mov dword [esp + 0x48], 1
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], ebp
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
jle 0x406f53
push 4
push ebp
push ebx
call fcn.00408800
add esp, 0xc
push ebp
push 0x1000
push ebx
push edi
call dword [sym.imp.WSOCK32.dll_recv]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x28], ebp
jle 0x406f53
cmp ebp, esi
jbe 0x406f53
mov ax, word [ebx + 2]
mov edi, dword [sym.imp.WSOCK32.dll_ntohs]
push eax
call edi
mov si, ax
and esi, 0xf
cmp esi, 3
je 0x406f64
cmp esi, 2
jne 0x406e47
mov ax, word [ebx + 2]
push eax
call edi
test al, 0x80
jne 0x406f64
test esi, esi
jne 0x406f53
push ebp
push ebx
call fcn.00407184
pop ecx
mov dword [esp + 0x24], eax
test eax, eax
pop ecx
je 0x406f53
and dword [esp + 0x1c], esi
and dword [esp + 0x18], esi
mov edi, eax
mov dword [esp + 0x10], edi
jmp 0x406e78
mov edi, dword [esp + 0x10]
cmp word [edi + 0x10a], 1
jne 0x406f34
cmp word [edi + 0x108], 0xf
jne 0x406f34
cmp word [edi + 0x10c], 3
jb 0x406f34
mov ebp, 0x108
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x406f42
push ebp
push 0
push esi
call fcn.00408800
mov eax, dword [edi + 0x110]
add edi, 0x110
add esp, 0xc
mov ax, word [eax + ebx]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
movzx eax, ax
mov dword [esi + 4], eax
mov eax, dword [edi]
lea ebp, [esi + 8]
inc eax
push ebp
inc eax
push dword [esp + 0x2c]
push eax
push ebx
call fcn.004070c1
add esp, 0x10
cmp byte [ebp], 0
jne 0x406f18
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x406f30
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x406f2a
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
jmp 0x406f30
mov dword [eax], esi
mov dword [esp + 0x1c], esi
mov edi, dword [esp + 0x10]
mov edi, dword [edi]
test edi, edi
mov dword [esp + 0x10], edi
jne 0x406e74
cmp dword [esp + 0x18], 0
push dword [esp + 0x20]
jne 0x406f73
call fcn.00407161
pop ecx
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 2
jl 0x406d77
jmp 0x406f79
mov eax, dword [esp + 0x144]
mov dword [eax], 2
jmp 0x406f79
call fcn.00407161
pop ecx
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x24]
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, dword [esp + 0x18]
jmp 0x406fa6
push ebx
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret