Function at 0x140004f90
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0x50
mov rax, qword [0x14005b040]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor r15d, r15d
movsx esi, r8w
mov dword [rcx + 0x564], edx
mov r12d, 2
mov word [rcx + 0x560], si
mov edi, edx
mov qword [rcx + 8], r15
mov rbx, rcx
mov dword [rcx + 0x538], r15d
xor r8d, r8d
mov qword [rcx + 0x540], r15
mov edx, r12d
mov qword [rcx + 0x548], r15
mov ebp, r9d
mov dword [rcx + 0x5a4], r15d
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0x558], rax
mov qword [rbx + 0x5b0], r15
mov qword [rbx + 0x5b8], r15
mov qword [rbx + 0x5c0], r15
mov qword [rbx + 0x5c8], r15
mov qword [rbx + 0x5d0], r15
mov qword [rbx + 0x5d8], r15
mov qword [rbx + 0x5e0], r15
mov qword [rbx + 0x5e8], r15
mov qword [rbx + 0x5f0], r15
mov qword [rbx + 0x5f8], r15
mov qword [rbx + 0x600], r15
mov qword [rbx + 0x608], r15
mov qword [rbx + 0x610], r15
mov qword [rbx + 0x618], r15
mov qword [rbx + 0x620], r15
mov qword [rbx + 0x628], r15
mov qword [rbx + 0x630], r15
mov qword [rbx + 0x638], r15
mov qword [rbx + 0x640], r15
mov qword [rbx + 0x648], r15
mov qword [rbx + 0x650], r15
mov qword [rbx + 0x658], r15
mov qword [rbx + 0x660], r15
mov qword [rbx + 0x668], r15
mov qword [rbx + 0x670], r15
mov qword [rbx + 0x678], r15
mov qword [rbx + 0x680], r15
mov qword [rbx + 0x688], r15
mov qword [rbx + 0x690], r15
mov qword [rbx + 0x698], r15
mov qword [rbx + 0x6a0], r15
mov qword [rbx + 0x6a8], r15
mov qword [rbx + 0x6b0], r15
mov qword [rbx + 0x6b8], r15
mov qword [rbx + 0x6c0], r15
mov qword [rbx + 0x6c8], r15
mov qword [rbx + 0x6d0], r15
mov qword [rbx + 0x6d8], r15
mov qword [rbx + 0x6e0], r15
mov qword [rbx + 0x6e8], r15
mov qword [rbx + 0x6f0], r15
mov qword [rbx + 0x6f8], r15
mov qword [rbx + 0x700], r15
mov qword [rbx + 0x708], r15
mov qword [rbx + 0x710], r15
mov qword [rbx + 0x718], r15
mov qword [rbx + 0x720], r15
mov qword [rbx + 0x728], r15
mov qword [rbx + 0x730], r15
mov qword [rbx + 0x738], r15
mov qword [rbx + 0x740], r15
mov qword [rbx + 0x748], r15
mov qword [rbx + 0x750], r15
mov qword [rbx + 0x758], r15
mov qword [rbx + 0x760], r15
mov qword [rbx + 0x768], r15
mov qword [rbx + 0x770], r15
mov qword [rbx + 0x778], r15
mov qword [rbx + 0x780], r15
mov qword [rbx + 0x788], r15
mov qword [rbx + 0x790], r15
mov qword [rbx + 0x798], r15
mov qword [rbx + 0x7a0], r15
mov qword [rbx + 0x7a8], r15
mov qword [rbx + 0x7b0], r15
mov qword [rbx + 0x7b8], r15
mov qword [rbx + 0x7c0], r15
mov qword [rbx + 0x7c8], r15
mov qword [rbx + 0x7d0], r15
mov qword [rbx + 0x7d8], r15
mov qword [rbx + 0x7e0], r15
mov qword [rbx + 0x7e8], r15
mov qword [rbx + 0x7f0], r15
mov qword [rbx + 0x7f8], r15
mov qword [rbx + 0x800], r15
mov qword [rbx + 0x808], r15
mov qword [rbx + 0x810], r15
mov qword [rbx + 0x818], r15
mov qword [rbx + 0x820], r15
mov qword [rbx + 0x828], r15
mov qword [rbx + 0x830], r15
mov qword [rbx + 0x838], r15
mov qword [rbx + 0x840], r15
mov qword [rbx + 0x848], r15
mov qword [rbx + 0x850], r15
mov qword [rbx + 0x858], r15
mov qword [rbx + 0x860], r15
mov qword [rbx + 0x868], r15
mov qword [rbx + 0x870], r15
mov qword [rbx + 0x878], r15
mov qword [rbx + 0x880], r15
mov qword [rbx + 0x888], r15
mov qword [rbx + 0x890], r15
mov qword [rbx + 0x898], r15
mov qword [rbx + 0x8a0], r15
mov qword [rbx + 0x8a8], r15
mov qword [rbx + 0x8b0], r15
mov qword [rbx + 0x8b8], r15
mov qword [rbx + 0x8c0], r15
mov qword [rbx + 0x8c8], r15
mov qword [rbx + 0x8d0], r15
mov qword [rbx + 0x8d8], r15
mov qword [rbx + 0x8e0], r15
mov qword [rbx + 0x8e8], r15
mov qword [rbx + 0x8f0], r15
mov qword [rbx + 0x8f8], r15
mov qword [rbx + 0x900], r15
mov qword [rbx + 0x908], r15
mov qword [rbx + 0x910], r15
mov qword [rbx + 0x918], r15
mov qword [rbx + 0x920], r15
mov qword [rbx + 0x928], r15
mov qword [rbx + 0x930], r15
mov qword [rbx + 0x938], r15
mov qword [rbx + 0x940], r15
mov qword [rbx + 0x948], r15
mov qword [rbx + 0x950], r15
mov qword [rbx + 0x958], r15
mov qword [rbx + 0x960], r15
mov qword [rbx + 0x968], r15
mov qword [rbx + 0x970], r15
mov qword [rbx + 0x978], r15
mov qword [rbx + 0x980], r15
mov qword [rbx + 0x988], r15
mov qword [rbx + 0x990], r15
mov qword [rbx + 0x998], r15
mov qword [rbx + 0x9a0], r15
mov qword [rbx + 0x9a8], r15
cmp rax, 0xffffffffffffffff
je 0x1400055eb
movzx ecx, si
mov qword [rsp + 0x88], r14
mov word [rbx + 0x580], r12w
mov dword [rbx + 0x584], edi
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rbx + 0x558]
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov word [rbx + 0x582], ax
mov r8d, 4
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x140005405
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x5a8]
lea rdx, str.setsockopt_SO_REUSEADDR_returns_with_error__d_r_n
mov r8d, eax
call fcn.140019c40
mov rcx, qword [rbx + 0x558]
lea r9, [rsp + 0x3c]
mov edx, 0xffff
mov dword [rsp + 0x3c], 1
mov r8d, 0x20
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x140005453
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x5a8]
lea rdx, str.setsockopt_SO_BROADCAST_returns_with_error__d_r_n
mov r8d, eax
call fcn.140019c40
mov rcx, qword [rbx + 0x5a8]
lea r8, str.ReceiveWindow
mov r9d, 0x40
lea rdx, str.Settings
call fcn.140019450
mov rcx, qword [rbx + 0x558]
lea r9, [rsp + 0x34]
shl eax, 0xa
mov edx, 0xffff
mov r8d, 0x1002
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x40], 4
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1400054e7
mov rcx, qword [rbx + 0x558]
lea rax, [rsp + 0x40]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1002
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
je 0x1400054e7
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x30], eax
jge 0x140005510
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, dword [rsp + 0x34]
lea rdx, str.setsockopt_SO_RCVBUF_returns_with_error__d__recv_window_d__buff_size_d__r_n
mov rcx, qword [rbx + 0x5a8]
mov r8d, eax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
call fcn.140019c40
mov rcx, qword [rbx + 0x558]
lea rdx, [rbx + 0x580]
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_bind]
mov r14, qword [rsp + 0x88]
cmp eax, 0xffffffff
jne 0x140005574
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x5a8]
lea rdx, str.bind_to_port__d_returns_with_error__d_r_n
mov r9d, eax
mov dword [rbx + 0x5a0], eax
mov r8d, esi
call fcn.140019c40
mov rcx, qword [rbx + 0x558]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x558], 0xffffffffffffffff
test ebp, ebp
je 0x14000560d
mov eax, dword [rbx + 0x550]
lea r8, str.PORT_68
mov rcx, qword [rbx + 0x5a8]
lea rdx, str.Settings
mov r9d, 0x44
mov dword [rbx + 0x584], eax
call fcn.140019450
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rbx + 0x560]
mov word [rbx + 0x582], ax
mov eax, dword [rbx + 0x550]
mov dword [rbx + 0x594], eax
mov word [rbx + 0x590], r12w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbx + 0x592], ax
mov dword [rbx + 0x5a4], 1
jmp 0x14000560d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x5a8]
lea rdx, str.socket_returns_with_error__d_r_n
mov r8d, eax
mov dword [rbx + 0x5a0], eax
call fcn.140019c40
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140020e70
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret