Function at 0x40d253
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 0x40d28a
push str.WSAStart__
call fcn.0040cbc0
pop ecx
pop ecx
jmp 0x40d480
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 0x40d2a7
push 0
push str.Please_setup_TCP_IP_controlpanel__network__r_n
jmp 0x40d27e
push 1
pop eax
cmp dword [ebp + 8], eax
jne 0x40d487
push 0
push eax
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x40d2ca
push 0
push str.Please_setup2_TCP_IP_controlpanel__network__r_n
jmp 0x40d27e
push 0x10
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.0041b900
mov eax, dword [esi + 0xc0]
mov edi, dword [sym.imp.WSOCK32.dll_bind]
mov dword [ebp - 0x18], eax
mov ax, word [esi + 0xc4]
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 0x40d312
push 0
push str.bind__
jmp 0x40d27e
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [esi + 4]
call edi
test eax, eax
je 0x40d33c
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.0040cbc0
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 0x40d367
push 0
push str.ioctlsocket_nonblock_
jmp 0x40d27e
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40d387
lea ecx, [ebp - 4]
push ecx
push ebx
push eax
call edi
test eax, eax
je 0x40d387
push 0
push str.ioctlsocket_tcp_nonblock_
jmp 0x40d27e
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 0x40d3b6
push 0
push str.setsockopt_broadcast_
jmp 0x40d27e
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 0x40d3fa
lea eax, [ebp - 8]
push 4
push eax
push 0x1001
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40d3fa
push 0
push str.setsockopt_sendbuf_
call fcn.0040cbc0
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 0x40d43e
lea eax, [ebp - 8]
push 4
push eax
push 0x1002
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40d43e
push 0
push str.setsockopt_recvbuf_
call fcn.0040cbc0
pop ecx
pop ecx
mov eax, dword [esi + 4]
mov dword [ebp - 4], 1
cmp eax, 0xffffffff
je 0x40d46b
lea ecx, [ebp - 4]
push 4
push ecx
push 4
push ebx
push eax
call edi
test eax, eax
je 0x40d46b
push 0
push str.setsockopt_tcp_reuseaddr_
call fcn.0040cbc0
pop ecx
pop ecx
mov esi, dword [esi + 4]
cmp esi, 0xffffffff
je 0x40d484
push 5
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x40d484
xor eax, eax
jmp 0x40d487
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4