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

Disassembly:
sub esp, 0x344
push ebx
push ebp
push esi
mov esi, dword [esp + 0x354]
push edi
push 0
push 2
mov dword [esp + 0x18], ecx
push 2
mov dword [esp + 0x24], 0
lea ebx, [esi + 0x400]
lea edi, [esi + 0x800]
call sub.WSOCK32.dll_socket
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x407f9b
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x273f
mov dword [esp + 0x14], eax
jne 0x407f77
push 0x96
mov ecx, 0x424040
call fcn.004069e0
test esi, esi
je 0x407f68
push 0x400
push edi
push 0x96
mov ecx, 0x424040
call fcn.00406920
mov edi, 0x417368
or ecx, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x344
ret 4
push eax
push 0x6e
push 0x424040
call fcn.00406a60
add esp, 0xc
test esi, esi
je 0x408094
mov ecx, dword [esp + 0x14]
push ecx
push 0x6e
jmp 0x408064
lea eax, [esp + 0x30]
push 4
push eax
push 0x20
push 0xffff
push ebp
mov dword [esp + 0x44], 1
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x407fed
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x6f
push 0x424040
mov dword [esp + 0x20], eax
call fcn.00406a60
add esp, 0xc
mov dword [esp + 0x18], 0x7d4
test esi, esi
je 0x408094
mov ecx, dword [esp + 0x14]
push ecx
push 0x6f
jmp 0x408064
xor eax, eax
mov dword [esp + 0x20], eax
mov word [esp + 0x20], 2
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
push eax
mov dword [esp + 0x30], eax
call sub.WSOCK32.dll_htonl
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], eax
mov dx, word [ecx + 0xc]
push edx
call sub.WSOCK32.dll_htons
mov word [esp + 0x22], ax
lea eax, [esp + 0x20]
push 0x10
push eax
push ebp
call sub.WSOCK32.dll_bind
test eax, eax
je 0x4080f0
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x70
push 0x424040
mov dword [esp + 0x20], eax
call fcn.00406a60
add esp, 0xc
mov dword [esp + 0x18], 0x7d5
test esi, esi
je 0x408094
mov ecx, dword [esp + 0x14]
push ecx
push 0x70
push edi
push 0x424040
call fcn.00406ac0
mov edi, 0x417368
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
push ebp
call sub.WSOCK32.dll_closesocket
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea ecx, [edi + 0x143c]
push 0
push ecx
call esi
push 0x71
mov ecx, 0x424040
call fcn.004069e0
push 0
push 0x424068
call esi
mov eax, dword [edi + 0x1424]
test eax, eax
je 0x4080d5
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esp + 0x18]
mov dword [edi + 0x1424], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x344
ret 4
test esi, esi
je 0x408116
mov edi, str.UdpOK
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + 0xc]
push ecx
push 0x6d
push 0x424040
call fcn.00406a60
add esp, 0xc
mov ebx, 1
lea edx, [edi + 0x143c]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [0x424068]
test eax, eax
jne 0x408098
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x34]
push ecx
push 0
lea edx, [esp + 0x258]
push 0
push edx
push 0
mov dword [esp + 0x268], ebp
mov dword [esp + 0x264], ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], 0
mov dword [esp + 0x30], 0x10
call sub.WSOCK32.dll_select
test eax, eax
je 0x408140
cmp eax, 0xffffffff
je 0x408140
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x3c]
push eax
push ecx
push 0
lea edx, [esp + 0x5c]
push 0x200
push edx
push ebp
call sub.WSOCK32.dll_recvfrom
mov esi, eax
cmp esi, 0xffffffff
jne 0x4081d0
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x72
push 0x424040
call fcn.00406a60
add esp, 0xc
jmp 0x408140
mov eax, dword [edi + 0x1434]
test eax, eax
je 0x4081f8
mov eax, dword [esp + 0x40]
push esi
push eax
call sub.WSOCK32.dll_inet_ntoa
push eax
push 0x419e58
push 0x424040
call fcn.00406a20
add esp, 0x10
lea ecx, [esp + 0x3c]
push esi
push ecx
mov word [esp + 0x44], bx
call fcn.00409a50
add esp, 8
mov word [esp + 0x3c], 2
test eax, eax
je 0x408140
lea edx, [esp + 0x3c]
push 0x10
push edx
push 0
push eax
lea eax, [esp + 0x60]
push eax
push ebp
call sub.WSOCK32.dll_sendto
test eax, eax
je 0x408256
mov ecx, dword [edi + 0x1434]
test ecx, ecx
je 0x408140
push eax
push 0x7b
push 0x424040
call fcn.00406a60
add esp, 0xc
jmp 0x408140
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x7c
push 0x424040
call fcn.00406a60
add esp, 0xc
jmp 0x408140