Function at 0x40cd00
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
push ebx
push esi
lea eax, [ebp - 0x1ac]
push edi
push eax
mov esi, ecx
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
push 0
je 0x40cd37
push str.WSAStart__
call fcn.0040c51d
pop ecx
pop ecx
jmp 0x40cf2d
mov edi, dword [sym.imp.WSOCK32.dll_socket]
push 2
pop ebx
push ebx
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40cd54
push 0
push str.Please_setup_TCP_IP_controlpanel__network__r_n
jmp 0x40cd2b
push 1
pop eax
cmp dword [ebp + 8], eax
jne 0x40cf34
push 0
push eax
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x40cd77
push 0
push str.Please_setup2_TCP_IP_controlpanel__network__r_n
jmp 0x40cd2b
push 0x10
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.00418050
mov eax, dword [esi + 0x84]
mov edi, dword [sym.imp.WSOCK32.dll_bind]
mov dword [ebp - 0x18], eax
mov ax, word [esi + 0x88]
add esp, 0xc
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x1c]
mov word [ebp - 0x1c], bx
push 0x10
push eax
push dword [esi]
call edi
test eax, eax
je 0x40cdbf
push 0
push str.bind__
jmp 0x40cd2b
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [esi + 4]
call edi
test eax, eax
je 0x40cde9
push dword [esi + 4]
call dword [sym.imp.WSOCK32.dll_closesocket]
or dword [esi + 4], 0xffffffff
push 0
push str.bind_tcp__error._Cant_support_file_attach
call fcn.0040c51d
pop ecx
pop ecx
mov edi, dword [sym.imp.WSOCK32.dll_ioctlsocket]
lea eax, [ebp - 4]
mov ebx, 0x8004667e
push eax
push ebx
mov dword [ebp - 4], 1
push dword [esi]
call edi
test eax, eax
je 0x40ce14
push 0
push str.ioctlsocket_nonblock_
jmp 0x40cd2b
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40ce34
lea ecx, [ebp - 4]
push ecx
push ebx
push eax
call edi
test eax, eax
je 0x40ce34
push 0
push str.ioctlsocket_tcp_nonblock_
jmp 0x40cd2b
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea eax, [ebp - 4]
push 4
push eax
mov ebx, 0xffff
push 0x20
push ebx
mov dword [ebp - 4], 1
push dword [esi]
call edi
test eax, eax
je 0x40ce63
push 0
push str.setsockopt_broadcast_
jmp 0x40cd2b
lea eax, [ebp - 0xc]
push 4
push eax
push 0x1001
push ebx
mov dword [ebp - 0xc], 0x10000
push dword [esi]
mov dword [ebp - 8], 0x8000
call edi
test eax, eax
je 0x40cea7
lea eax, [ebp - 8]
push 4
push eax
push 0x1001
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40cea7
push 0
push str.setsockopt_sendbuf_
call fcn.0040c51d
pop ecx
pop ecx
lea eax, [ebp - 0xc]
push 4
push eax
push 0x1002
push ebx
mov dword [ebp - 0xc], 0x10000
push dword [esi]
mov dword [ebp - 8], 0x8000
call edi
test eax, eax
je 0x40ceeb
lea eax, [ebp - 8]
push 4
push eax
push 0x1002
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40ceeb
push 0
push str.setsockopt_recvbuf_
call fcn.0040c51d
pop ecx
pop ecx
mov eax, dword [esi + 4]
mov dword [ebp - 4], 1
cmp eax, 0xffffffff
je 0x40cf18
lea ecx, [ebp - 4]
push 4
push ecx
push 4
push ebx
push eax
call edi
test eax, eax
je 0x40cf18
push 0
push str.setsockopt_tcp_reuseaddr_
call fcn.0040c51d
pop ecx
pop ecx
mov esi, dword [esi + 4]
cmp esi, 0xffffffff
je 0x40cf31
push 5
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x40cf31
xor eax, eax
jmp 0x40cf34
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4