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

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x124
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
xor edi, edi
push 0x1000
push edi
mov dword [eax], 1
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
cmp ebx, edi
je 0x402fa9
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, edi
mov dword [esp + 0x20], ebp
je 0x402f9e
cmp ebp, 0xffffffff
je 0x402f9e
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x402d72
xor edi, edi
cmp eax, edi
mov dword [esp + 0x10], edi
jne 0x402d81
push 0x100
jmp 0x402d82
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x13c]
mov edx, dword [esp + 0x138]
push eax
push ecx
push edx
push ebp
call fcn.00402fc0
add esp, 0x10
test eax, eax
jne 0x402f3a
lea eax, [esp + 0x28]
lea ecx, [esp + 0x30]
push eax
push edi
push edi
push ecx
push edi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], 1
mov dword [esp + 0x3c], 0xc
mov dword [esp + 0x40], edi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x402f3a
push edi
push 0x1000
push ebx
push ebp
mov dword [ebx], edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x24], esi
jle 0x402f3a
cmp esi, 0xc
jbe 0x402f3a
mov dx, word [ebx + 2]
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
push edx
call edi
and eax, 0xf
cmp eax, 3
je 0x402f4e
cmp eax, 2
jne 0x402e36
mov ax, word [ebx + 2]
push eax
call edi
test al, 0x80
jne 0x402f5d
jmp 0x402f3a
test eax, eax
jne 0x402f3a
push esi
push ebx
call fcn.004031d0
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x1c], edi
je 0x402f3a
xor eax, eax
mov ebp, edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
cmp word [ebp + 0x10a], 1
jne 0x402f16
cmp word [ebp + 0x108], 0xf
jne 0x402f16
cmp word [ebp + 0x10c], 3
jb 0x402f16
push 0x108
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 0x402f25
mov ecx, 0x42
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x110]
mov dx, word [ecx + ebx]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xffff
lea edi, [esi + 8]
mov dword [esi + 4], eax
mov ecx, dword [ebp + 0x110]
mov eax, dword [esp + 0x24]
push edi
add ecx, 2
push eax
push ecx
push ebx
call fcn.004030e0
mov al, byte [edi]
add esp, 0x10
test al, al
jne 0x402efe
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x402f16
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x402f10
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
jmp 0x402f16
mov dword [eax], esi
mov dword [esp + 0x14], esi
mov ebp, dword [ebp]
mov edi, dword [esp + 0x1c]
test ebp, ebp
jne 0x402e62
mov eax, dword [esp + 0x10]
push edi
test eax, eax
jne 0x402f6c
call fcn.004031a0
mov ebp, dword [esp + 0x24]
add esp, 4
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 2
mov dword [esp + 0x18], eax
jl 0x402d70
jmp 0x402f78
mov edx, dword [esp + 0x140]
mov dword [edx], 2
jmp 0x402f78
mov eax, dword [esp + 0x140]
mov dword [eax], 2
jmp 0x402f78
call fcn.004031a0
mov ebp, dword [esp + 0x24]
add esp, 4
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret
push ebx
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x124
ret