Function at 0x40bcbd
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
je 0x40bcf4
push 0
push str.WSAStart__
call fcn.0040b522
pop ecx
pop ecx
jmp 0x40beed
mov edi, dword [sym.imp.WSOCK32.dll_socket]
xor ebx, ebx
push ebx
push 2
push 2
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x40bd24
push 1
pop eax
cmp dword [ebp + 8], eax
jne 0x40bef4
push ebx
push eax
push 2
call edi
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x40bd2c
push ebx
push 0x420288
jmp 0x40bce8
push 0x10
lea eax, [ebp - 0x1c]
push ebx
push eax
call fcn.00416700
mov ax, word [esi + 0x84]
lea edi, [esi + 0x84]
add esp, 0xc
mov word [ebp - 0x1c], 2
mov dword [ebp - 0x18], ebx
push eax
call dword [sym.imp.WSOCK32.dll_htons]
movzx eax, ax
mov dword [edi], eax
mov edi, dword [sym.imp.WSOCK32.dll_bind]
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [esi]
call edi
test eax, eax
je 0x40bd80
push ebx
push str.bind__
jmp 0x40bce8
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [esi + 4]
call edi
test eax, eax
je 0x40bda9
push dword [esi + 4]
call dword [sym.imp.WSOCK32.dll_closesocket]
or dword [esi + 4], 0xffffffff
push ebx
push 0x420260
call fcn.0040b522
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 0x40bdd4
push 0
push str.ioctlsocket_nonblock_
jmp 0x40bce8
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40bdf4
lea ecx, [ebp - 4]
push ecx
push ebx
push eax
call edi
test eax, eax
je 0x40bdf4
push 0
push str.ioctlsocket_tcp_nonblock_
jmp 0x40bce8
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 0x40be23
push 0
push str.setsockopt_broadcast_
jmp 0x40bce8
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 0x40be67
lea eax, [ebp - 8]
push 4
push eax
push 0x1001
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40be67
push 0
push str.setsockopt_sendbuf_
call fcn.0040b522
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 0x40beab
lea eax, [ebp - 8]
push 4
push eax
push 0x1002
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40beab
push 0
push str.setsockopt_recvbuf_
call fcn.0040b522
pop ecx
pop ecx
mov eax, dword [esi + 4]
mov dword [ebp - 4], 1
cmp eax, 0xffffffff
je 0x40bed8
lea ecx, [ebp - 4]
push 4
push ecx
push 4
push ebx
push eax
call edi
test eax, eax
je 0x40bed8
push 0
push str.setsockopt_tcp_reuseaddr_
call fcn.0040b522
pop ecx
pop ecx
mov esi, dword [esi + 4]
cmp esi, 0xffffffff
je 0x40bef1
push 5
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x40bef1
xor eax, eax
jmp 0x40bef4
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4