Function at 0x51f1ac
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x51f414
push dword fs:[eax]
mov dword fs:[eax], esp
test byte [esi + 0x1c], 0x10
jne 0x51f3f6
test byte [esi + 0x1c], 1
jne 0x51f3f6
test bl, bl
je 0x51f3cd
cmp dword [esi + 0x48], 0xffffffff
jne 0x51f3f9
push 0x11
push 2
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov dword [esi + 0x48], ebx
inc ebx
jne 0x51f238
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x24]
call fcn.0040d9f8
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov edx, 0x51f42c
call fcn.00405138
mov ecx, dword [ebp - 0x20]
mov dl, 1
mov eax, dword [0x408a68]
call fcn.0040e240
call fcn.00404764
mov byte [ebp - 1], 1
push 1
lea eax, [ebp - 1]
push eax
push 4
push 0xffff
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_setsockopt
inc eax
mov byte [ebp - 2], 0x40
push 1
lea eax, [ebp - 2]
push eax
push 3
push 0
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_setsockopt
inc eax
mov byte [ebp - 1], 1
push 1
lea eax, [ebp - 1]
push eax
push 4
push 0xffff
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_setsockopt
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0x1002
push 0xffff
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_getsockopt
test eax, eax
jne 0x51f2e2
cmp dword [ebp - 8], 0x2000
jge 0x51f2e2
mov dword [ebp - 8], 0x2000
mov dword [ebp - 0xc], 4
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0x1002
push 0xffff
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_setsockopt
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_getsockopt
test eax, eax
jne 0x51f333
cmp dword [ebp - 8], 0x2000
jge 0x51f333
mov dword [ebp - 8], 0x2000
mov dword [ebp - 0xc], 4
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_setsockopt
mov word [ebp - 0x1c], 2
mov ax, word [esi + 0x30]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x1a], ax
xor eax, eax
mov dword [ebp - 0x18], eax
push 1
push 0x401
mov eax, dword [esi + 0x40]
push eax
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_WSAAsyncSelect
push 0x10
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_bind
inc eax
setne bl
mov byte [esi + 0x44], bl
test bl, bl
je 0x51f39a
cmp dword [esi + 0x5c], 0
je 0x51f3f9
mov eax, dword [esi + 0x5c]
mov edx, 0x51f43c
call fcn.00405238
je 0x51f3f9
mov dl, 1
mov eax, esi
call fcn.0051f948
jmp 0x51f3f9
push 2
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_closesocket
mov dword [esi + 0x48], 0xffffffff
mov ecx, 0x51f44c
mov dl, 1
mov eax, dword [0x408a68]
call fcn.0040e240
call fcn.00404764
jmp 0x51f3f9
push 2
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [esi + 0x48]
push eax
call sub.wsock32.dll_closesocket
xor edx, edx
mov eax, esi
call fcn.0051f948
mov dword [esi + 0x48], 0xffffffff
mov byte [esi + 0x44], bl
jmp 0x51f3f9
mov byte [esi + 0x44], bl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51f41b
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00404e34
ret