Function at 0x4076b0
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004068d0
add esp, 8
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00407220
add esp, 4
mov dword [ebp - 0x18], eax
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 8]
cmp dword [eax + edx*4 + 0x1d8], 0xffffffff
jne 0x407796
push 0x11
push 2
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dx, word [ecx]
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 8]
mov dword [edx + ecx*4 + 0x1d8], eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 8]
cmp dword [ecx + eax*4 + 0x1d8], 0xffffffff
jne 0x407741
mov edx, dword [ebp + 8]
push edx
call fcn.00406580
add esp, 4
mov dword [0x411d88], 0x2736
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 8]
cmp dword [ecx + eax*4 + 0x1d8], 0
jge 0x407763
mov edx, dword [ebp + 0x1c]
mov eax, dword [0x411d88]
mov dword [edx], eax
or eax, 0xffffffff
jmp 0x407bef
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*4 + 0x1d8]
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x407796
mov eax, dword [ebp + 8]
push eax
call fcn.00406580
add esp, 4
xor eax, eax
jmp 0x407bef
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*4 + 0x1d8]
mov dword [ebp - 0xc], eax
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_send]
cmp eax, dword [ebp + 0x10]
je 0x4077d2
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406580
add esp, 4
xor eax, eax
jmp 0x407bef
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x20]
shl eax, cl
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0x20], 0
jle 0x4077f2
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ecx + 0xc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jg 0x4077ff
mov dword [ebp - 0x10], 1
call fcn.00406700
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1c8], edx
mov edx, dword [ebp - 0x1cc]
mov dword [ebp - 0x1bc], edx
mov eax, dword [ebp - 0x1c8]
mov dword [ebp - 0x1b8], eax
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00406650
add esp, 8
mov dword [ebp - 0x1d4], eax
mov dword [ebp - 0x1d0], edx
mov edx, dword [ebp - 0x1d4]
mov dword [ebp - 0x1b0], edx
mov eax, dword [ebp - 0x1d0]
mov dword [ebp - 0x1ac], eax
mov ecx, dword [ebp - 0x1ac]
push ecx
mov edx, dword [ebp - 0x1b0]
push edx
mov eax, dword [ebp - 0x1b8]
push eax
mov ecx, dword [ebp - 0x1bc]
push ecx
call fcn.00406760
add esp, 0x10
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x1d8], edx
mov edx, dword [ebp - 0x1dc]
mov dword [ebp - 0x1a8], edx
mov eax, dword [ebp - 0x1d8]
mov dword [ebp - 0x1a4], eax
jmp 0x407bea
call fcn.00406700
mov dword [ebp - 0x1e4], eax
mov dword [ebp - 0x1e0], edx
mov ecx, dword [ebp - 0x1e4]
mov dword [ebp - 0x1bc], ecx
mov edx, dword [ebp - 0x1e0]
mov dword [ebp - 0x1b8], edx
mov dword [ebp - 0x1a0], 0
mov dword [ebp - 0x1c4], 0
jmp 0x4078f5
mov eax, dword [ebp - 0x1c4]
add eax, 1
mov dword [ebp - 0x1c4], eax
mov ecx, dword [ebp - 0x1c4]
cmp ecx, dword [ebp - 0x1a0]
jae 0x407919
mov edx, dword [ebp - 0x1c4]
mov eax, dword [ebp + edx*4 - 0x19c]
cmp eax, dword [ebp - 0xc]
jne 0x407917
jmp 0x407919
jmp 0x4078e6
mov ecx, dword [ebp - 0x1c4]
cmp ecx, dword [ebp - 0x1a0]
jne 0x40794f
cmp dword [ebp - 0x1a0], 0x40
jae 0x40794f
mov edx, dword [ebp - 0x1c4]
mov eax, dword [ebp - 0xc]
mov dword [ebp + edx*4 - 0x19c], eax
mov ecx, dword [ebp - 0x1a0]
add ecx, 1
mov dword [ebp - 0x1a0], ecx
xor edx, edx
test edx, edx
jne 0x4078da
mov eax, dword [ebp - 0x1b8]
push eax
mov ecx, dword [ebp - 0x1bc]
push ecx
mov edx, dword [ebp - 0x1a4]
push edx
mov eax, dword [ebp - 0x1a8]
push eax
call fcn.004067f0
add esp, 0x10
test eax, eax
jle 0x4079c7
mov ecx, dword [ebp - 0x1b8]
push ecx
mov edx, dword [ebp - 0x1bc]
push edx
mov eax, dword [ebp - 0x1a4]
push eax
mov ecx, dword [ebp - 0x1a8]
push ecx
call fcn.004067a0
add esp, 0x10
mov dword [ebp - 0x1ec], eax
mov dword [ebp - 0x1e8], edx
mov edx, dword [ebp - 0x1ec]
mov dword [ebp - 0x1b0], edx
mov eax, dword [ebp - 0x1e8]
mov dword [ebp - 0x1ac], eax
jmp 0x4079f7
push 0
push 0
call fcn.00406650
add esp, 8
mov dword [ebp - 0x1f4], eax
mov dword [ebp - 0x1f0], edx
mov ecx, dword [ebp - 0x1f4]
mov dword [ebp - 0x1b0], ecx
mov edx, dword [ebp - 0x1f0]
mov dword [ebp - 0x1ac], edx
push 0
lea eax, [ebp - 0x1b0]
push eax
push 0
push 0
lea ecx, [ebp - 0x1a0]
push ecx
mov edx, dword [ebp - 0xc]
add edx, 1
push edx
call fcn.00406bb0
add esp, 0x18
mov dword [ebp - 0x1c0], eax
cmp dword [ebp - 0x1c0], 0
jne 0x407a39
mov eax, dword [ebp + 0x28]
mov dword [eax], 1
xor eax, eax
jmp 0x407bef
cmp dword [ebp - 0x1c0], 0
jge 0x407a63
cmp dword [0x411d88], 4
jne 0x407a50
jmp 0x4078a7
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406580
add esp, 4
xor eax, eax
jmp 0x407bef
mov dword [0x411d88], 0
mov dword [ebp - 0x1b4], 0x80
lea edx, [ebp - 0x1b4]
push edx
lea eax, [ebp - 0x9c]
push eax
push 0
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jg 0x407ab5
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406580
add esp, 4
xor eax, eax
jmp 0x407bef
mov edx, dword [ebp + 0x28]
mov dword [edx], 1
cmp dword [ebp - 4], 0xc
jge 0x407ae0
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x2738
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406580
add esp, 4
xor eax, eax
jmp 0x407bef
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
and eax, 0xffff
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
and edx, 0xffff
cmp eax, edx
je 0x407afe
jmp 0x4078a7
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
and ecx, 0x400
test ecx, ecx
jne 0x407b2a
lea edx, [ebp - 0x9c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00406830
add esp, 8
test eax, eax
jne 0x407b2a
jmp 0x4078a7
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
and edx, 0x800
test edx, edx
jne 0x407b61
mov eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0xc]
add edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00406a00
add esp, 0x10
test eax, eax
jne 0x407b61
jmp 0x4078a7
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
shr edx, 0x18
and edx, 0xf
cmp edx, 2
je 0x407b91
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x18
and ecx, 0xf
cmp ecx, 4
je 0x407b91
mov edx, dword [ebp - 8]
mov eax, dword [edx]
shr eax, 0x18
and eax, 0xf
cmp eax, 5
jne 0x407bad
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406580
add esp, 4
mov edx, dword [ebp + 8]
cmp dword [edx + 0x160], 0
jne 0x407bad
xor eax, eax
jmp 0x407bef
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
and ecx, 0x20
test ecx, ecx
jne 0x407be5
mov edx, dword [ebp - 8]
mov eax, dword [edx]
shr eax, 0x11
and eax, 1
test eax, eax
je 0x407be5
mov ecx, dword [ebp + 0x24]
mov dword [ecx], 1
mov edx, dword [ebp + 8]
push edx
call fcn.00406580
add esp, 4
mov eax, 1
jmp 0x407bef
mov eax, dword [ebp - 4]
jmp 0x407bef
jmp 0x4078d0
mov esp, ebp
pop ebp
ret