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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xf0], ebx
mov dword [ebp - 0x104], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ecx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00404edc
lea eax, [ebp - 0xdc]
mov edx, dword [0x408bcc]
call fcn.004053ec
xor eax, eax
push ebp
push 0x51d363
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x58]
call fcn.004d90f4
movzx eax, ax
mov edx, dword [ebx + 0x58]
mov edx, dword [edx + 0xc]
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0
je 0x51d321
test eax, eax
je 0x51d321
xor edx, edx
mov ecx, dword [0x5446e8]
mov ecx, dword [ecx]
cmp byte [ecx + 0x9b], 0
je 0x51d02e
test eax, 0x80
jle 0x51d02e
or edx, 0xffffffff
jmp 0x51d08a
mov ecx, dword [0x5446e8]
mov ecx, dword [ecx]
cmp byte [ecx + 0x98], 0
je 0x51d04a
test eax, 2
jle 0x51d04a
or edx, 0xffffffff
mov ecx, dword [0x5446e8]
mov ecx, dword [ecx]
cmp byte [ecx + 0x99], 0
je 0x51d06e
test eax, 1
jg 0x51d06b
test eax, 8
jle 0x51d06e
or edx, 0xffffffff
mov ecx, dword [0x5446e8]
mov ecx, dword [ecx]
cmp byte [ecx + 0x9a], 0
je 0x51d08a
test eax, 4
jle 0x51d08a
or edx, 0xffffffff
test edx, edx
je 0x51d321
lea ecx, [ebp - 8]
mov eax, dword [ebx + 0x58]
mov eax, dword [eax + 8]
mov edx, 2
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [0x5446e8]
mov eax, dword [eax]
test dword [eax + 0x9c], 0x10
jle 0x51d236
mov eax, dword [ebp - 8]
call fcn.00404eec
call fcn.004c22ac
test al, al
je 0x51d236
push 0
push 2
push 2
call sub.wsock32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x51d236
mov dword [ebp - 0x18], 0xffffffff
push 4
lea eax, [ebp - 0x18]
push eax
push 0x20
push 0xffff
push esi
call sub.wsock32.dll_setsockopt
lea eax, [ebp - 0xec]
xor ecx, ecx
mov edx, 0x10
call fcn.00403254
mov word [ebp - 0xec], 2
xor eax, eax
mov dword [ebp - 0xe8], eax
push 0x2652
call sub.wsock32.dll_htons
mov word [ebp - 0xea], ax
push 0x10
lea eax, [ebp - 0xec]
push eax
push esi
call sub.wsock32.dll_bind
push esi
mov eax, dword [ebp - 8]
call fcn.00404eec
mov edi, eax
push edi
mov eax, dword [0x5446e8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb4]
call fcn.00404eec
mov edx, dword [0x5446e8]
mov edx, dword [edx]
mov cx, word [edx + 0x76]
pop edx
call fcn.004c243c
push esi
push edi
mov eax, dword [0x5446e8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb4]
call fcn.00404eec
mov edx, dword [0x5446e8]
mov edx, dword [edx]
mov cx, word [edx + 0x76]
pop edx
call fcn.004c243c
mov byte [ebp - 0x11], al
push esi
call sub.wsock32.dll_closesocket
cmp byte [ebp - 0x11], 0
je 0x51d236
lea edx, [ebp - 0xdc]
mov eax, 0x800
call fcn.0040f5e8
lea eax, [ebp - 0xf0]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x100], eax
mov byte [ebp - 0xfc], 0xb
mov eax, dword [ebp - 8]
mov dword [ebp - 0xf8], eax
mov byte [ebp - 0xf4], 0xb
lea edx, [ebp - 0x100]
mov ecx, 1
mov eax, 0x51d37c
call fcn.0040a674
mov eax, dword [ebp - 0xf0]
push eax
call fcn.0040b3f4
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x104]
lea eax, [ebp - 0xdc]
call fcn.0040cd64
mov edx, dword [ebp - 0x104]
lea eax, [ebp - 0xc]
pop ecx
call fcn.00404d38
xor edx, edx
mov eax, dword [ebp - 0xc]
call fcn.004d5230
mov eax, dword [0x5446e8]
mov eax, dword [eax]
test dword [eax + 0x9c], 0x20
jle 0x51d321
cmp byte [ebx + 0x55], 5
je 0x51d321
mov ecx, 1
mov dl, 1
mov eax, dword [0x517548]
call fcn.00518fc0
mov ebx, eax
mov edx, dword [0x4a200c]
mov eax, 8
call fcn.00405828
mov dword [ebp - 0x10], eax
mov edx, dword [0x4a1fdc]
mov eax, 0x10
call fcn.00405828
mov edx, dword [ebp - 0x10]
mov dword [edx], eax
mov eax, dword [ebp - 0x10]
add eax, 4
mov edx, dword [ebp - 4]
call fcn.00404a80
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
call fcn.004da8fc
mov edx, dword [ebp - 0x10]
mov eax, ebx
call fcn.0051909c
mov ecx, ebx
mov dl, 1
mov eax, dword [0x51a2d8]
call fcn.0051d66c
mov ebx, eax
lea eax, [ebx + 0x70]
mov edx, dword [0x5446e8]
mov edx, dword [edx]
mov edx, dword [edx + 0xc4]
call fcn.00404a80
mov eax, dword [0x5446e8]
mov eax, dword [eax]
mov eax, dword [eax + 0xbc]
mov dword [ebx + 0x74], eax
mov eax, dword [0x5446e8]
mov eax, dword [eax]
mov al, byte [eax + 0xc0]
mov byte [ebx + 0x78], al
mov eax, dword [0x5446e8]
mov eax, dword [eax]
mov al, byte [eax + 0xb8]
mov byte [ebx + 0x79], al
mov byte [ebx + 0x7a], 0
mov byte [ebx + 0x6c], 0
mov byte [ebx + 0x80], 1
mov eax, ebx
call fcn.00424c2c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d36a
lea eax, [ebp - 0x104]
call fcn.00404a2c
lea eax, [ebp - 0xf0]
call fcn.00404a2c
lea eax, [ebp - 0xdc]
mov edx, dword [0x408bcc]
call fcn.004054bc
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00404a50
ret