Function at 0x4cbcb0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 8
push ebx
push esi
mov si, word [esp + 0x14]
push edi
push 0
push 1
movzx ebx, si
push ebx
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0
call dword [sym.imp.WSOCK32.dll_socket]
mov edi, eax
test edi, edi
jns 0x4cbd24
push 0
push str.MISC
call fcn.004073a0
add esp, 8
test eax, eax
je 0x4cbd1a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
push eax
push ebx
push str.portable_socket_create_n_bind
push str._s:_error_opening_socket_sa_family_d____s_n
push 0
push str.MISC
call fcn.00407400
add esp, 0x1c
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 8
ret
push edi
call fcn.004059e0
add esp, 4
test eax, eax
je 0x4cbd65
push 0
push str.MISC
call fcn.004073a0
add esp, 8
test eax, eax
je 0x4cbeeb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
push eax
push str.portable_socket_create_n_bind
push str._s:_error_on_set_SOCK_CLOEXEC___s_n
jmp 0x4cbedc
mov ebx, dword [sym.imp.WSOCK32.dll_setsockopt]
lea eax, [esp + 0xc]
push 4
push eax
push 4
push 0xffff
push edi
call ebx
test eax, eax
je 0x4cbdb4
push 0
push str.MISC
call fcn.004073a0
add esp, 8
test eax, eax
je 0x4cbeeb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
push eax
push str.portable_socket_create_n_bind
push str._s:_error_on_setsockopt_SO_REUSEADDR___s_n
jmp 0x4cbedc
cmp si, 0x17
jne 0x4cbe01
push 4
lea eax, [esp + 0x14]
push eax
push 0x1b
push 0x29
push edi
call ebx
cmp eax, 0xffffffff
jne 0x4cbe01
push 0
push str.MISC
call fcn.004073a0
add esp, 8
test eax, eax
je 0x4cbeeb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
push eax
push str.portable_socket_create_n_bind
push str._s:_error_on_setsockopt_IPV6_V6ONLY___s_n
jmp 0x4cbedc
mov ecx, str.0.0.0.0
cmp si, 0x17
mov eax, 0x4ebb18
cmovne eax, ecx
push eax
call fcn.00406b90
add esp, 4
mov dword [esp + 0x18], eax
push 0
test eax, eax
jne 0x4cbe66
push str.MISC
call fcn.004073a0
add esp, 8
test eax, eax
je 0x4cbeeb
push str.portable_socket_create_n_bind
push str._s:_error_on_create_addr_any_n
push 0
push str.MISC
call fcn.00407400
add esp, 0x10
push edi
call fcn.004cbb60
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 8
ret
push eax
call fcn.00407150
mov ebx, eax
lea eax, [esp + 0x20]
push eax
call fcn.00406d70
movzx ecx, word [ebx]
add esp, 0xc
sub ecx, 2
je 0x4cbe93
sub ecx, 0x15
je 0x4cbe8c
xor eax, eax
jmp 0x4cbe98
mov eax, 0x1c
jmp 0x4cbe98
mov eax, 0x10
push eax
push ebx
push edi
call dword [sym.imp.WSOCK32.dll_bind]
push ebx
mov esi, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
test esi, esi
je 0x4cbefe
push 0
push str.MISC
call fcn.004073a0
add esp, 8
test eax, eax
je 0x4cbeeb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
push eax
push str.portable_socket_create_n_bind
push str._s:_error_on_binding___s_n
push 0
push str.MISC
call fcn.00407400
add esp, 0x18
push edi
call fcn.004cbb60
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 8
ret
push 3
push str.MISC
call fcn.004073a0
add esp, 8
test eax, eax
je 0x4cbf2b
push edi
push str.portable_socket_create_n_bind
push str._s:_returns_fd_d_n
push 3
push str.MISC
call fcn.00407400
add esp, 0x14
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 8
ret