Function at 0x1800357d0
Capabilities:
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
mov dword [rax + 0x18], r8d
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd0
mov rcx, qword [0x180052eb0]
mov edi, r8d
mov r15d, edx
mov esi, 0xc0
xor ebp, ebp
xor edx, edx
and dword [rsp + 0x30], ebp
mov r8, rsi
mov r12, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rbx, rax
jne 0x180035829
lea ebp, [rax + 8]
jmp 0x180035a66
mov r8, rsi
xor edx, edx
mov rcx, rax
call sub.ntdll.dll_memset
xor r13d, r13d
xor si, si
test r12, r12
je 0x180035846
mov si, word [r12]
xor eax, eax
test si, si
sete al
movsxd r14, eax
xor r8d, r8d
mov edx, edi
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x180035961
cmp r15d, 0x17
jne 0x180035898
lea r9, [rsp + 0x40]
lea edx, [r15 + 0x12]
lea r8d, [r15 + 4]
mov rcx, rax
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp dword [rsp + 0x120], ebp
je 0x18003596a
test r14, r14
je 0x1800358d0
mov esi, dword [0x180052e00]
mov ax, 0x400
imul esi, esi, 0x19660d
add esi, 0x3c6ef35f
mov dword [0x180052e00], esi
shr esi, 1
cmp si, ax
jae 0x1800358d0
add si, ax
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
call sub.ntdll.dll_memset
cmp r15d, 2
movzx ecx, si
jne 0x180035901
and dword [rsp + 0x54], ebp
mov word [rsp + 0x50], r15w
call qword [sym.imp.WS2_32.dll_htons]
lea r8d, [r15 + 0xe]
jmp 0x180035914
mov word [rsp + 0x50], 0x17
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, 0x1c
lea rdx, [rsp + 0x50]
mov rcx, rdi
mov word [rsp + 0x52], ax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x18003594f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
mov r13d, eax
call qword [sym.imp.WS2_32.dll_closesocket]
or rdi, 0xffffffffffffffff
cmp r13d, 0x2740
jne 0x18003597c
test r14, r14
je 0x18003597c
cmp rdi, 0xffffffffffffffff
jne 0x180035970
mov edi, dword [rsp + 0x110]
jmp 0x180035851
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r13d, eax
cmp rdi, 0xffffffffffffffff
je 0x18003597c
test r12, r12
je 0x180035985
mov word [r12], si
jmp 0x180035985
mov ecx, r13d
call qword [sym.imp.WS2_32.dll_WSASetLastError]
cmp rdi, 0xffffffffffffffff
jne 0x180035998
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
jmp 0x180035a53
cmp dword [rsp + 0x110], 2
jne 0x1800359cd
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x2003
mov rcx, rdi
mov dword [rsp + 0x34], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [rsp + 0x128], ebp
je 0x1800359f1
lea r8, [rsp + 0x38]
mov edx, 0x8004667e
mov rcx, rdi
mov dword [rsp + 0x38], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov qword [rbx], rdi
mov eax, dword [rsp + 0x30]
mov dword [rbx + 8], eax
xor eax, eax
cmp r15d, 2
sete al
and qword [rbx + 0x98], rbp
and dword [rbx + 0xa0], ebp
and dword [rbx + 0xa4], ebp
mov dword [rbx + 0x94], eax
mov rax, qword [rsp + 0x130]
mov qword [rbx + 0xb0], rax
mov rax, qword [rsp + 0x138]
mov qword [rbx + 0xb8], rax
mov eax, dword [rsp + 0x140]
mov dword [rbx + 0xa8], eax
mov rax, qword [rsp + 0x148]
mov qword [rax], rbx
test ebp, ebp
je 0x180035a78
cmp rdi, 0xffffffffffffffff
je 0x180035a66
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [0x180052eb0]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea r11, [rsp + 0xd0]
mov eax, ebp
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret