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

Disassembly:
push 0xfc
mov eax, 0x596d05
call fcn.0055d8e8
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 [0x620365], 0
mov dword [ebp - 0x3c], edi
mov byte [ebp - 0x74], 1
jne 0x40d0cc
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040d01d
lea ecx, [ebp - 0x74]
call fcn.00405438
push edi
jmp 0x40d45e
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403e6e
call fcn.0040fb49
mov esi, eax
add esp, 0x18
mov dword [ebp - 0xd4], esi
test esi, esi
jne 0x40d106
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 0x40d0b3
lea ecx, [esi + 0x180]
mov edx, 0x5e264d
call fcn.004057ed
test al, al
jne 0x40d121
mov esi, str.main_link_not_empty
jmp 0x40d0f3
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.0040a2f8
mov eax, dword [ebp - 0x1c]
add esp, 0x18
sub eax, dword [ebp - 0x20]
sar eax, 2
test eax, eax
je 0x40d189
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.0040d01d
jmp 0x40d44c
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d1f6
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 0x40d179
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.00431b37
mov esi, eax
pop ecx
mov dword [ebp - 0xd0], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x40d25e
push 0x1c8
push 0
push esi
call fcn.0055dd80
pop ecx
pop ecx
mov ecx, esi
call fcn.0040efd8
mov esi, eax
jmp 0x40d260
xor esi, esi
mov byte [ebp - 4], 2
xor ecx, ecx
mov eax, dword [0x611718]
mov dword [esi + 4], 0x40d8b1
mov dword [esi + 8], 0x40d94e
mov dword [esi + 0xc], fcn.00404abb
mov dword [esi + 0x10], fcn.0040d965
mov dword [esi + 0x14], 0x40db1c
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 [0x6202bc]
cmp eax, 0x64
mov dword [ebp - 0xd0], esi
cmovge eax, ecx
lea ecx, [ebp - 0xec]
inc eax
mov dword [0x6202bc], eax
mov dword [esi + 0x11c], eax
call fcn.00417517
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 0x40d313
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
mov eax, dword [edi + 0x144]
mov dword [esi + 0x144], eax
call fcn.004173a3
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042f57f
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 0x40d365
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
lea ecx, [edi + 0x180]
lea eax, [esi + 0x18]
cmp ecx, eax
je 0x40d37c
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
mov edx, 0x604282
lea ecx, [ebp - 0xcc]
call fcn.00429db1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xec]
mov edx, dword [esi + 0x11c]
call fcn.00404abc
mov esi, eax
mov edi, 0x5e5420
mov byte [ebp - 4], 6
push edi
call fcn.004035ea
pop ecx
push eax
push 0
push edi
lea ecx, [ebp - 0xc4]
call fcn.0040e39f
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 0x40d3e9
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.00429ec9
lea eax, [ebp - 0xd0]
push eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040ebca
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.0040d01d
mov byte [ebp - 4], 5
cmp dword [ebp - 0x28], 0
je 0x40d441
call fcn.0055a4d0
lea ecx, [ebp - 0xcc]
call fcn.0040bc03
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.0055d897
ret