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

Disassembly:
push 0xfc
mov eax, 0x596e39
call fcn.0055da28
mov ebx, ecx
and dword [ebp - 0xf0], 0
and dword [ebp - 4], 0
lea ecx, [ebp - 0x74]
call fcn.00407888
mov byte [ebp - 4], 1
xor edi, edi
cmp byte [0x6203e5], 0
mov dword [ebp - 0x3c], edi
mov byte [ebp - 0x74], 1
jne 0x40d0c8
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040d019
lea ecx, [ebp - 0x74]
call fcn.00405438
push edi
jmp 0x40d45a
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403e6e
call fcn.0040fb46
mov esi, eax
add esp, 0x18
mov dword [ebp - 0xd4], esi
test esi, esi
jne 0x40d102
mov esi, str.main_link_not_exist
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.004042b9
jmp 0x40d0af
lea ecx, [esi + 0x180]
mov edx, 0x5e268d
call fcn.004057ed
test al, al
jne 0x40d11d
mov esi, str.main_link_not_empty
jmp 0x40d0ef
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.00403e6e
mov ecx, edi
call fcn.0040a2f4
mov eax, dword [ebp - 0x1c]
add esp, 0x18
sub eax, dword [ebp - 0x20]
sar eax, 2
test eax, eax
je 0x40d185
mov esi, str.ip_link_exist
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.004042b9
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040d019
jmp 0x40d448
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d1f2
mov byte [ebp - 0x74], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.00404abc
push eax
mov edx, str.create_socket_error:
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x108]
call fcn.00404c2b
pop ecx
push eax
lea ecx, [ebp - 0x70]
call fcn.00407163
push 0
push 1
lea ecx, [ebp - 0x108]
call fcn.0040412f
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 2
call fcn.0040412f
jmp 0x40d175
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.00431c6a
mov esi, eax
pop ecx
mov dword [ebp - 0xd0], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x40d25a
push 0x1c8
push 0
push esi
call fcn.0055dec0
pop ecx
pop ecx
mov ecx, esi
call fcn.0040efd5
mov esi, eax
jmp 0x40d25c
xor esi, esi
mov byte [ebp - 4], 2
xor ecx, ecx
mov eax, dword [0x611718]
mov dword [esi + 4], 0x40d8ad
mov dword [esi + 8], 0x40d94a
mov dword [esi + 0xc], fcn.00404abb
mov dword [esi + 0x10], fcn.0040d961
mov dword [esi + 0x14], 0x40db18
mov dword [esi + 0x30], edi
mov byte [esi + 0x4e], 1
mov dword [esi + 0x58], eax
mov eax, dword [0x611714]
mov dword [esi + 0x5c], eax
mov eax, dword [0x62033c]
cmp eax, 0x64
mov dword [ebp - 0xd0], esi
cmovge eax, ecx
lea ecx, [ebp - 0xec]
inc eax
mov dword [0x62033c], eax
mov dword [esi + 0x11c], eax
call fcn.0041764b
lea ecx, [esi + 0x18]
push eax
call fcn.00407163
push 0
push 1
lea ecx, [ebp - 0xec]
call fcn.0040412f
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 0x40d30f
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
mov eax, dword [edi + 0x144]
mov dword [esi + 0x144], eax
call fcn.004174d7
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042f6b2
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 0x40d361
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
lea ecx, [edi + 0x180]
lea eax, [esi + 0x18]
cmp ecx, eax
je 0x40d378
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
mov edx, 0x604282
lea ecx, [ebp - 0xcc]
call fcn.00429ee5
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xec]
mov edx, dword [esi + 0x11c]
call fcn.00404abc
mov esi, eax
mov edi, 0x5e5460
mov byte [ebp - 4], 6
push edi
call fcn.004035ea
pop ecx
push eax
push 0
push edi
lea ecx, [ebp - 0xc4]
call fcn.0040e39b
push 0xffffffffffffffff
push 0
push esi
push 3
push eax
lea ecx, [ebp - 0xc4]
call fcn.00407395
lea ecx, [ebp - 0xc4]
cmp ecx, eax
je 0x40d3e5
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 5
call fcn.0040412f
lea ecx, [ebp - 0xcc]
call fcn.00429ffe
lea eax, [ebp - 0xd0]
push eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040ebc6
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call fcn.00405042
lea eax, [ebp - 0x74]
mov byte [ebp - 0x74], 1
push eax
mov ecx, ebx
call fcn.0040d019
mov byte [ebp - 4], 5
cmp dword [ebp - 0x28], 0
je 0x40d43d
call fcn.0055a610
lea ecx, [ebp - 0xcc]
call fcn.0040bbff
lea ecx, [ebp - 0x20]
call fcn.00405fa3
lea ecx, [ebp - 0x74]
call fcn.00405438
push 0
push 1
lea ecx, [ebp + 8]
call fcn.0040412f
mov eax, ebx
call fcn.0055d9d7
ret