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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e18ac
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x57af80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x280], eax
mov ecx, dword [ebp + 0x14]
lea esi, [eax + 4]
mov edi, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x288], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x280]
push esi
mov eax, dword [ecx]
mov dword [ebp - 0x284], eax
inc eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x28c], eax
test eax, eax
jns 0x40b4ec
push 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x280]
push eax
push 1
push dword [ebp - 0x288]
call fcn.0040bc20
xor eax, eax
jmp 0x40bc00
xorps xmm0, xmm0
mov ecx, 2
movdqu xmmword [ebp - 0xf8], xmm0
mov word [ebp - 0xf8], cx
lea ecx, [ebp - 0xf8]
push 0x10
push ecx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x40b4c9
mov esi, dword [sym.imp.WS2_32.dll_htons]
xor eax, eax
mov word [ebp - 0x70], ax
xor ecx, ecx
mov eax, 0x1000
mov dword [ebp - 0x6a], ecx
xorps xmm0, xmm0
mov word [ebp - 0x66], cx
or eax, eax
mov word [ebp - 0x44], cx
push 1
movdqu xmmword [ebp - 0x64], xmm0
mov dword [ebp - 0x42], 0x1002100
movdqu xmmword [ebp - 0x54], xmm0
mov dword [ebp - 0x6e], eax
call esi
movzx ecx, ax
movzx eax, word [ebp - 0x6e]
shl ecx, 0x10
or ecx, eax
lea eax, [ebp - 0x64]
push 0x22
push eax
mov dword [ebp - 0x6e], ecx
mov ecx, dword [ebp - 0x280]
push 0x506064
call fcn.0040b220
mov eax, dword [ebp - 0x284]
xorps xmm0, xmm0
mov word [ebp - 0x70], ax
mov eax, 2
movdqu xmmword [ebp - 0x3c], xmm0
push 0x89
mov word [ebp - 0x3c], ax
call esi
mov esi, dword [ebp + 8]
push 0x10
mov word [ebp - 0x3a], ax
lea eax, [ebp - 0x3c]
push eax
push 0
push 0x32
lea eax, [ebp - 0x70]
mov dword [ebp - 0x38], esi
push eax
push dword [ebp - 0x28c]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x40b5e5
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x280]
push eax
push 2
push dword [ebp - 0x288]
call fcn.0040bc20
xor eax, eax
jmp 0x40bc00
mov esi, dword [ebp + 0xc]
mov eax, 0x10624dd3
imul esi
mov dword [ebp - 0x20c], 1
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, ecx, 0x3e8
mov dword [ebp - 0x2c], ecx
sub esi, eax
mov eax, dword [ebp - 0x28c]
mov dword [ebp - 0x208], eax
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x28], esi
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40b65d
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x280]
push eax
push 3
push dword [ebp - 0x288]
call fcn.0040bc20
xor eax, eax
jmp 0x40bc00
test eax, eax
jne 0x40b67f
mov ecx, dword [ebp - 0x280]
push eax
push dword [ebp + 8]
push 4
push dword [ebp - 0x288]
call fcn.0040bc20
xor eax, eax
jmp 0x40bc00
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0x10
movq qword [ebp - 0x298], xmm0
push 0x10000
mov dword [ebp - 0x294], 0x10000
call fcn.004defbe
mov esi, eax
add esp, 4
mov dword [ebp - 0x298], esi
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push 0x10000
push esi
push dword [ebp - 0x28c]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp - 0x290], eax
test eax, eax
jg 0x40b711
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x280]
push eax
push 3
push dword [ebp - 0x288]
call fcn.0040bc20
test esi, esi
je 0x40b70a
push esi
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
jmp 0x40bc00
push dword [ebp - 0x28c]
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 0x290], 0x39
mov byte [ebp - 0x27a], 1
mov byte [ebp - 0x279], 0
jge 0x40b760
mov ecx, dword [ebp - 0x280]
push 0
push dword [ebp + 8]
push 5
push dword [ebp - 0x288]
call fcn.0040bc20
test esi, esi
je 0x40b70a
push esi
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
jmp 0x40bc00
lea ecx, [ebp - 0x278]
call fcn.0040b050
push 0x39
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 1
push esi
push eax
call dword [sym.imp.MSVCR120.dll_memmove]
movzx eax, word [ebp - 0x278]
add esp, 0xc
cmp eax, dword [ebp - 0x284]
je 0x40b7ca
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x280]
push eax
push 6
push dword [ebp - 0x288]
call fcn.0040bc20
mov eax, dword [ebp - 0x23f]
test eax, eax
je 0x40b6fd
push eax
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x40b6fd
movzx edx, byte [ebp - 0x240]
mov ecx, dword [ebp - 0x290]
lea eax, [edx + edx*8]
add eax, eax
add eax, 0x39
cmp ecx, eax
jge 0x40b85b
add ecx, 0xffffffd5
mov byte [ebp - 0x279], 1
mov eax, 0x38e38e39
mov byte [ebp - 0x27a], 0
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x284], eax
mov byte [ebp - 0x240], al
je 0x40b84f
xor ecx, ecx
mov edx, 0x12
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004defbe
mov ecx, dword [ebp - 0x284]
mov dword [ebp - 0x23f], eax
lea ecx, [ecx + ecx*8]
add ecx, ecx
push ecx
lea ecx, [esi + 0x39]
push ecx
push eax
mov eax, dword [sym.imp.MSVCR120.dll_memmove]
call eax
add esp, 0x10
jmp 0x40b8d4
mov dword [ebp - 0x23f], 0
jmp 0x40b8d4
xor ecx, ecx
mov eax, edx
mov edx, 0x12
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004defbe
movzx ecx, byte [ebp - 0x240]
mov dword [ebp - 0x23f], eax
lea ecx, [ecx + ecx*8]
add ecx, ecx
push ecx
lea ecx, [esi + 0x39]
push ecx
push eax
mov eax, dword [sym.imp.MSVCR120.dll_memmove]
call eax
movzx eax, byte [ebp - 0x240]
add esp, 0x10
lea ecx, [eax + eax*8]
lea eax, [ecx*2 + 0x67]
cmp dword [ebp - 0x290], eax
jge 0x40b8b8
xor al, al
mov byte [ebp - 0x27a], al
jmp 0x40b8d4
lea eax, [ecx*2 + 0x39]
add eax, esi
push 0x2e
push eax
lea eax, [ebp - 0x23b]
push eax
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
cmp byte [ebp - 0x240], 0
mov dword [ebp - 0x290], 0
jbe 0x40ba62
xor esi, esi
mov dword [ebp - 0x28c], esi
mov eax, dword [ebp - 0x23f]
add eax, esi
push 0xf
push eax
movsx ecx, byte [eax + 0xf]
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x284], ecx
call dword [sym.imp.MSVCR120.dll_memmove]
mov eax, dword [ebp - 0x23f]
lea ecx, [ebp - 0xe8]
mov byte [ebp - 0x11], 0
add esp, 0xc
movzx esi, word [esi + eax + 0x10]
shr esi, 7
not esi
and esi, 1
call fcn.0040af60
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 2
push 0x3f
push eax
call dword [sym.imp.MSVCR120.dll_strchr]
add esp, 8
test eax, eax
jne 0x40b95d
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0xe8]
call fcn.0040b1e0
mov ecx, dword [ebp - 0x280]
lea eax, [ebp - 0x20]
push esi
push dword [ebp - 0x284]
push eax
call fcn.0040b320
push eax
lea ecx, [ebp - 0xd0]
call fcn.0040b1e0
mov eax, dword [ebp - 0x284]
mov edx, dword [ebp - 0x23f]
mov dword [ebp - 0xb8], eax
xor eax, eax
mov cl, byte [ebp - 0xae]
test esi, esi
mov esi, dword [ebp - 0x28c]
sete al
add edx, esi
mov dword [ebp - 0xb4], eax
movzx eax, byte [edx + 0x10]
shr al, 1
and al, 1
mov byte [ebp - 0xb0], al
movzx eax, byte [edx + 0x10]
shr al, 2
and al, 1
mov byte [ebp - 0xaf], al
movzx eax, byte [edx + 0x10]
shr al, 3
xor al, cl
and al, 1
xor cl, al
mov byte [ebp - 0xae], cl
movzx eax, word [edx + 0x10]
shr ax, 4
add al, al
xor al, cl
and al, 2
xor cl, al
mov byte [ebp - 0xae], cl
movzx eax, word [edx + 0x10]
shr ax, 5
shl al, 2
xor al, cl
and al, 0xc
xor cl, al
mov byte [ebp - 0xae], cl
movzx eax, word [edx + 0x10]
shr ax, 7
shl al, 4
xor al, cl
and al, 0x10
xor cl, al
lea eax, [ebp - 0xe8]
mov byte [ebp - 0xae], cl
mov ecx, edi
push eax
call fcn.0040bf10
lea ecx, [ebp - 0xe8]
mov byte [ebp - 4], 1
call fcn.0040b0e0
mov ecx, dword [ebp - 0x290]
add esi, 0x12
movzx eax, byte [ebp - 0x240]
inc ecx
mov dword [ebp - 0x290], ecx
mov dword [ebp - 0x28c], esi
cmp ecx, eax
jl 0x40b8f3
mov al, byte [ebp - 0x279]
mov byte [edi + 0x5f], al
mov al, byte [ebp - 0x27a]
mov byte [edi + 0x60], al
test al, al
je 0x40ba90
push 6
lea eax, [ebp - 0x23b]
push eax
lea eax, [edi + 0x58]
push eax
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x40ba99
xor eax, eax
mov dword [edi + 0x58], eax
mov word [edi + 0x5c], ax
lea ecx, [edi + 8]
push 0x505a70
call fcn.0040b1e0
lea ecx, [edi + 0x20]
push 0x505a70
call fcn.0040b1e0
lea ecx, [edi + 0x40]
push 0x505a70
call fcn.0040b1e0
mov eax, dword [edi]
mov byte [edi + 0x5e], 0
mov word [edi + 0x61], 0
mov byte [edi + 0x63], 0
mov esi, dword [eax]
mov byte [ebp - 0x279], 1
cmp esi, eax
je 0x40bbd5
lea eax, [esi + 8]
push eax
lea ecx, [ebp - 0xac]
call fcn.0040aec0
mov ecx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x78]
mov byte [ebp - 4], 3
test ecx, ecx
jne 0x40bb4b
test eax, eax
jne 0x40bbbc
cmp byte [ebp - 0x279], al
je 0x40bbbc
lea edx, [ebp - 0xac]
mov dword [ebp - 0x284], edx
lea edx, [edi + 8]
cmp edx, dword [ebp - 0x284]
je 0x40bb40
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0xac]
mov ecx, edx
push eax
call fcn.00402410
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x7c]
mov byte [edi + 0x62], 1
mov byte [ebp - 0x279], 0
cmp ecx, 0x20
jne 0x40bb5a
test eax, eax
jne 0x40bbbc
mov byte [edi + 0x5e], 1
jmp 0x40bbbc
cmp ecx, 3
jne 0x40bb95
test eax, eax
jne 0x40bbbc
lea eax, [ebp - 0xac]
push eax
lea ecx, [edi + 0x38]
call fcn.0040bf60
lea ecx, [ebp - 0xac]
lea eax, [edi + 0x40]
cmp eax, ecx
je 0x40bb8b
push 0xffffffffffffffff
push 0
push ecx
mov ecx, eax
call fcn.00402410
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x7c]
mov byte [edi + 0x61], 1
cmp ecx, 0x1e
jne 0x40bbbc
cmp eax, 1
jne 0x40bbbc
lea ecx, [ebp - 0xac]
lea eax, [edi + 0x20]
cmp eax, ecx
je 0x40bbb8
push 0xffffffffffffffff
push 0
push ecx
mov ecx, eax
call fcn.00402410
mov byte [edi + 0x63], 1
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 1
call fcn.0040b0e0
mov esi, dword [esi]
cmp esi, dword [edi]
jne 0x40bae1
mov eax, dword [ebp - 0x23f]
test eax, eax
je 0x40bbe8
push eax
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x298]
test eax, eax
je 0x40bbfb
push eax
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004df262
mov esp, ebp
pop ebp
ret 0x10