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

Disassembly:
push 0xfc
mov eax, 0x586d25
call fcn.0054eeb6
mov ebx, ecx
and dword [ebp - 0xf0], 0
and dword [ebp - 4], 0
lea ecx, [ebp - 0x74]
call fcn.00407602
mov byte [ebp - 4], 1
xor edi, edi
cmp byte [0x60b183], 0
mov dword [ebp - 0x3c], edi
mov byte [ebp - 0x74], 1
jne 0x40bdb8
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040bd09
lea ecx, [ebp - 0x74]
call fcn.004052db
push edi
jmp 0x40c14a
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403d4e
call fcn.0040e239
mov esi, eax
add esp, 0x18
mov dword [ebp - 0xd4], esi
test esi, esi
jne 0x40bdf2
mov esi, str.main_link_not_exist
push esi
call fcn.004034ca
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.00404199
jmp 0x40bd9f
lea ecx, [esi + 0x180]
mov edx, 0x5d057d
call fcn.0040568b
test al, al
jne 0x40be0d
mov esi, str.main_link_not_empty
jmp 0x40bddf
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.00403d4e
mov ecx, edi
call fcn.004094f1
mov eax, dword [ebp - 0x1c]
add esp, 0x18
sub eax, dword [ebp - 0x20]
sar eax, 2
test eax, eax
je 0x40be75
mov esi, str.ip_link_exist
push esi
call fcn.004034ca
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.00404199
lea eax, [ebp - 0x74]
mov ecx, ebx
push eax
call fcn.0040bd09
jmp 0x40c138
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40bee2
mov byte [ebp - 0x74], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.0040495e
push eax
mov edx, str.create_socket_error:
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x108]
call fcn.00404acd
pop ecx
push eax
lea ecx, [ebp - 0x70]
call fcn.00407035
push 0
push 1
lea ecx, [ebp - 0x108]
call fcn.0040400f
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 2
call fcn.0040400f
jmp 0x40be65
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.0042325c
mov esi, eax
pop ecx
mov dword [ebp - 0xd0], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x40bf4a
push 0x1c8
push 0
push esi
call fcn.0054f350
pop ecx
pop ecx
mov ecx, esi
call fcn.0040d702
mov esi, eax
jmp 0x40bf4c
xor esi, esi
mov byte [ebp - 4], 2
xor ecx, ecx
mov eax, dword [0x5fc708]
mov dword [esi + 4], 0x40c58f
mov dword [esi + 8], 0x40c62c
mov dword [esi + 0xc], fcn.0040495d
mov dword [esi + 0x10], fcn.0040c643
mov dword [esi + 0x14], 0x40c7fa
mov dword [esi + 0x30], edi
mov byte [esi + 0x4e], 1
mov dword [esi + 0x58], eax
mov eax, dword [0x5fc704]
mov dword [esi + 0x5c], eax
mov eax, dword [0x60b134]
cmp eax, 0x64
mov dword [ebp - 0xd0], esi
cmovge eax, ecx
lea ecx, [ebp - 0xec]
inc eax
mov dword [0x60b134], eax
mov dword [esi + 0x11c], eax
call fcn.00411821
lea ecx, [esi + 0x18]
push eax
call fcn.00407035
push 0
push 1
lea ecx, [ebp - 0xec]
call fcn.0040400f
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 0x40bfff
push 0xffffffffffffffff
push 0
push eax
call fcn.00403f7b
mov eax, dword [edi + 0x144]
mov dword [esi + 0x144], eax
call fcn.004116ad
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042175d
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 0x40c051
push 0xffffffffffffffff
push 0
push eax
call fcn.00403f7b
lea ecx, [edi + 0x180]
lea eax, [esi + 0x18]
cmp ecx, eax
je 0x40c068
push 0xffffffffffffffff
push 0
push eax
call fcn.00403f7b
mov edx, 0x604282
lea ecx, [ebp - 0xcc]
call fcn.0041cc31
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xec]
mov edx, dword [esi + 0x11c]
call fcn.0040495e
mov esi, eax
mov edi, 0x5d31d8
mov byte [ebp - 4], 6
push edi
call fcn.004034ca
pop ecx
push eax
push 0
push edi
lea ecx, [ebp - 0xc4]
call fcn.0040cff4
push 0xffffffffffffffff
push 0
push esi
push 3
push eax
lea ecx, [ebp - 0xc4]
call fcn.0040710f
lea ecx, [ebp - 0xc4]
cmp ecx, eax
je 0x40c0d5
push 0xffffffffffffffff
push 0
push eax
call fcn.00403f7b
push 0
push 1
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 5
call fcn.0040400f
lea ecx, [ebp - 0xcc]
call fcn.0041cd49
lea eax, [ebp - 0xd0]
push eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040d671
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call fcn.00404ee4
lea eax, [ebp - 0x74]
mov byte [ebp - 0x74], 1
push eax
mov ecx, ebx
call fcn.0040bd09
mov byte [ebp - 4], 5
cmp dword [ebp - 0x28], 0
je 0x40c12d
call fcn.0054bc00
lea ecx, [ebp - 0xcc]
call fcn.0040aa30
lea ecx, [ebp - 0x20]
call fcn.00405e41
lea ecx, [ebp - 0x74]
call fcn.004052db
push 0
push 1
lea ecx, [ebp + 8]
call fcn.0040400f
mov eax, ebx
call fcn.0054ee65
ret