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

Disassembly:
push 0xfc
mov eax, 0x596966
call fcn.0055d546
mov ebx, ecx
and dword [ebp - 0xf0], 0
and dword [ebp - 4], 0
lea ecx, [ebp - 0x74]
call fcn.00407859
mov byte [ebp - 4], 1
xor edi, edi
cmp byte [0x61f365], 0
mov dword [ebp - 0x3c], edi
mov byte [ebp - 0x74], 1
jne 0x40d09d
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040cfee
lea ecx, [ebp - 0x74]
call fcn.0040540b
push edi
jmp 0x40d42f
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403e41
call fcn.0040fb1a
mov esi, eax
add esp, 0x18
mov dword [ebp - 0xd4], esi
test esi, esi
jne 0x40d0d7
mov esi, str.main_link_not_exist
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.0040428c
jmp 0x40d084
lea ecx, [esi + 0x180]
mov edx, 0x5e1685
call fcn.004057c0
test al, al
jne 0x40d0f2
mov esi, str.main_link_not_empty
jmp 0x40d0c4
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.00403e41
mov ecx, edi
call fcn.0040a2c9
mov eax, dword [ebp - 0x1c]
add esp, 0x18
sub eax, dword [ebp - 0x20]
sar eax, 2
test eax, eax
je 0x40d15a
mov esi, str.ip_link_exist
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.0040428c
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040cfee
jmp 0x40d41d
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d1c7
mov byte [ebp - 0x74], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.00404a8f
push eax
mov edx, str.create_socket_error:
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x108]
call fcn.00404bfe
pop ecx
push eax
lea ecx, [ebp - 0x70]
call fcn.00407134
push 0
push 1
lea ecx, [ebp - 0x108]
call fcn.00404102
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 2
call fcn.00404102
jmp 0x40d14a
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.00431772
mov esi, eax
pop ecx
mov dword [ebp - 0xd0], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x40d22f
push 0x1c8
push 0
push esi
call fcn.0055d9e0
pop ecx
pop ecx
mov ecx, esi
call fcn.0040efa9
mov esi, eax
jmp 0x40d231
xor esi, esi
mov byte [ebp - 4], 2
xor ecx, ecx
mov eax, dword [0x610718]
mov dword [esi + 4], 0x40d882
mov dword [esi + 8], 0x40d91f
mov dword [esi + 0xc], fcn.00404a8e
mov dword [esi + 0x10], fcn.0040d936
mov dword [esi + 0x14], 0x40daed
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 [0x61f2bc]
cmp eax, 0x64
mov dword [ebp - 0xd0], esi
cmovge eax, ecx
lea ecx, [ebp - 0xec]
inc eax
mov dword [0x61f2bc], eax
mov dword [esi + 0x11c], eax
call fcn.00417455
lea ecx, [esi + 0x18]
push eax
call fcn.00407134
push 0
push 1
lea ecx, [ebp - 0xec]
call fcn.00404102
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 0x40d2e4
push 0xffffffffffffffff
push 0
push eax
call fcn.0040406e
mov eax, dword [edi + 0x144]
mov dword [esi + 0x144], eax
call fcn.004172e1
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042f1ba
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 0x40d336
push 0xffffffffffffffff
push 0
push eax
call fcn.0040406e
lea ecx, [edi + 0x180]
lea eax, [esi + 0x18]
cmp ecx, eax
je 0x40d34d
push 0xffffffffffffffff
push 0
push eax
call fcn.0040406e
mov edx, 0x604282
lea ecx, [ebp - 0xcc]
call fcn.004299ee
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xec]
mov edx, dword [esi + 0x11c]
call fcn.00404a8f
mov esi, eax
mov edi, 0x5e4460
mov byte [ebp - 4], 6
push edi
call fcn.004035bd
pop ecx
push eax
push 0
push edi
lea ecx, [ebp - 0xc4]
call fcn.0040e370
push 0xffffffffffffffff
push 0
push esi
push 3
push eax
lea ecx, [ebp - 0xc4]
call fcn.00407366
lea ecx, [ebp - 0xc4]
cmp ecx, eax
je 0x40d3ba
push 0xffffffffffffffff
push 0
push eax
call fcn.0040406e
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 5
call fcn.00404102
lea ecx, [ebp - 0xcc]
call fcn.00429b06
lea eax, [ebp - 0xd0]
push eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040eb9b
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call fcn.00405015
lea eax, [ebp - 0x74]
mov byte [ebp - 0x74], 1
push eax
mov ecx, ebx
call fcn.0040cfee
mov byte [ebp - 4], 5
cmp dword [ebp - 0x28], 0
je 0x40d412
call fcn.0055a120
lea ecx, [ebp - 0xcc]
call fcn.0040bbd4
lea ecx, [ebp - 0x20]
call fcn.00405f76
lea ecx, [ebp - 0x74]
call fcn.0040540b
push 0
push 1
lea ecx, [ebp + 8]
call fcn.00404102
mov eax, ebx
call fcn.0055d4f5
ret