Function at 0x40cfeb
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push 0xfc
mov eax, 0x596b85
call fcn.0055d756
mov ebx, ecx
and dword [ebp - 0xf0], 0
and dword [ebp - 4], 0
lea ecx, [ebp - 0x74]
call fcn.00407826
mov byte [ebp - 4], 1
xor edi, edi
cmp byte [0x61f31d], 0
mov dword [ebp - 0x3c], edi
mov byte [ebp - 0x74], 1
jne 0x40d03e
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040cf8f
lea ecx, [ebp - 0x74]
call fcn.004053d8
push edi
jmp 0x40d3d0
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403e0e
call fcn.0040fabb
mov esi, eax
add esp, 0x18
mov dword [ebp - 0xd4], esi
test esi, esi
jne 0x40d078
mov esi, str.main_link_not_exist
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.00404259
jmp 0x40d025
lea ecx, [esi + 0x180]
mov edx, 0x5e1685
call fcn.0040578d
test al, al
jne 0x40d093
mov esi, str.main_link_not_empty
jmp 0x40d065
xor eax, eax
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
sub esp, 0x18
mov byte [ebp - 4], 2
lea eax, [esi + 0x124]
mov ecx, esp
lea edi, [ebp - 0x20]
push eax
call fcn.00403e0e
mov ecx, edi
call fcn.0040a26a
mov eax, dword [ebp - 0x1c]
add esp, 0x18
sub eax, dword [ebp - 0x20]
sar eax, 2
test eax, eax
je 0x40d0fb
mov esi, str.ip_link_exist
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.00404259
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040cf8f
jmp 0x40d3be
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d168
mov byte [ebp - 0x74], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.00404a5c
push eax
mov edx, str.create_socket_error:
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x108]
call fcn.00404bcb
pop ecx
push eax
lea ecx, [ebp - 0x70]
call fcn.00407101
push 0
push 1
lea ecx, [ebp - 0x108]
call fcn.004040cf
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 2
call fcn.004040cf
jmp 0x40d0eb
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0x24]
push 4
push eax
push 0x1002
push 0xffff
push edi
mov dword [ebp - 0x24], 0x40000
call esi
push 4
lea eax, [ebp - 0x24]
push eax
push 0x1001
push 0xffff
push edi
call esi
push 0x1c8
call fcn.0043195a
mov esi, eax
pop ecx
mov dword [ebp - 0xd0], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x40d1d0
push 0x1c8
push 0
push esi
call fcn.0055dbf0
pop ecx
pop ecx
mov ecx, esi
call fcn.0040ef4a
mov esi, eax
jmp 0x40d1d2
xor esi, esi
mov byte [ebp - 4], 2
xor ecx, ecx
mov eax, dword [0x610718]
mov dword [esi + 4], 0x40d823
mov dword [esi + 8], 0x40d8c0
mov dword [esi + 0xc], fcn.00404a5b
mov dword [esi + 0x10], fcn.0040d8d7
mov dword [esi + 0x14], 0x40da8e
mov dword [esi + 0x30], edi
mov byte [esi + 0x4e], 1
mov dword [esi + 0x58], eax
mov eax, dword [0x610714]
mov dword [esi + 0x5c], eax
mov eax, dword [0x61f278]
cmp eax, 0x64
mov dword [ebp - 0xd0], esi
cmovge eax, ecx
lea ecx, [ebp - 0xec]
inc eax
mov dword [0x61f278], eax
mov dword [esi + 0x11c], eax
call fcn.00417275
lea ecx, [esi + 0x18]
push eax
call fcn.00407101
push 0
push 1
lea ecx, [ebp - 0xec]
call fcn.004040cf
mov edi, dword [ebp - 0xd4]
lea ecx, [esi + 0x124]
mov byte [esi + 0x120], 0
mov eax, dword [edi + 0x140]
mov dword [esi + 0x140], eax
lea eax, [edi + 0x124]
cmp ecx, eax
je 0x40d285
push 0xffffffffffffffff
push 0
push eax
call fcn.0040403b
mov eax, dword [edi + 0x144]
mov dword [esi + 0x144], eax
call fcn.00417101
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042f3a2
mov dword [esi + 0x64], eax
lea ecx, [esi + 0x168]
mov ax, word [edi + 0x13c]
mov word [esi + 0x13c], ax
lea eax, [edi + 0x18]
mov byte [esi + 0x165], 1
cmp ecx, eax
je 0x40d2d7
push 0xffffffffffffffff
push 0
push eax
call fcn.0040403b
lea ecx, [edi + 0x180]
lea eax, [esi + 0x18]
cmp ecx, eax
je 0x40d2ee
push 0xffffffffffffffff
push 0
push eax
call fcn.0040403b
mov edx, 0x604282
lea ecx, [ebp - 0xcc]
call fcn.00429bd5
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xec]
mov edx, dword [esi + 0x11c]
call fcn.00404a5c
mov esi, eax
mov edi, 0x5e4438
mov byte [ebp - 4], 6
push edi
call fcn.0040358a
pop ecx
push eax
push 0
push edi
lea ecx, [ebp - 0xc4]
call fcn.0040e311
push 0xffffffffffffffff
push 0
push esi
push 3
push eax
lea ecx, [ebp - 0xc4]
call fcn.00407333
lea ecx, [ebp - 0xc4]
cmp ecx, eax
je 0x40d35b
push 0xffffffffffffffff
push 0
push eax
call fcn.0040403b
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 5
call fcn.004040cf
lea ecx, [ebp - 0xcc]
call fcn.00429ced
lea eax, [ebp - 0xd0]
push eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040eb3c
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call fcn.00404fe2
lea eax, [ebp - 0x74]
mov byte [ebp - 0x74], 1
push eax
mov ecx, ebx
call fcn.0040cf8f
mov byte [ebp - 4], 5
cmp dword [ebp - 0x28], 0
je 0x40d3b3
call fcn.0055a2f0
lea ecx, [ebp - 0xcc]
call fcn.0040bb75
lea ecx, [ebp - 0x20]
call fcn.00405f43
lea ecx, [ebp - 0x74]
call fcn.004053d8
push 0
push 1
lea ecx, [ebp + 8]
call fcn.004040cf
mov eax, ebx
call fcn.0055d705
ret