Function at 0x180017678
Capabilities:
Get socket status
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x738
mov qword [rsp + 0x48], 0xffffffffffffffff
mov rax, qword [0x180062058]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x5c], 0x64
cmp qword [rsp + 0x30], 0
je 0x180017bd4
mov rax, qword [rsp + 0x30]
cmp dword [rax + 4], 2
je 0x1800176da
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x30], rax
jmp 0x1800176b3
mov rax, qword [rsp + 0x30]
mov ecx, dword [rax]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x4e0], 0
mov dword [rsp + 0x2d0], 0
mov dword [rsp + 0xc0], 0
mov dword [rsp + 0x44], 0
jmp 0x180017720
mov eax, dword [rsp + 0x44]
inc eax
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x4e0]
cmp dword [rsp + 0x44], eax
jae 0x180017748
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
cmp qword [rsp + rax*8 + 0x4e8], rcx
jne 0x180017746
jmp 0x180017748
jmp 0x180017716
mov eax, dword [rsp + 0x4e0]
cmp dword [rsp + 0x44], eax
jne 0x180017784
cmp dword [rsp + 0x4e0], 0x40
jae 0x180017784
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
mov qword [rsp + rax*8 + 0x4e8], rcx
mov eax, dword [rsp + 0x4e0]
inc eax
mov dword [rsp + 0x4e0], eax
xor eax, eax
test eax, eax
jne 0x18001770c
mov dword [rsp + 0x3c], 0
jmp 0x18001779e
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x2d0]
cmp dword [rsp + 0x3c], eax
jae 0x1800177c6
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
cmp qword [rsp + rax*8 + 0x2d8], rcx
jne 0x1800177c4
jmp 0x1800177c6
jmp 0x180017794
mov eax, dword [rsp + 0x2d0]
cmp dword [rsp + 0x3c], eax
jne 0x180017802
cmp dword [rsp + 0x2d0], 0x40
jae 0x180017802
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
mov qword [rsp + rax*8 + 0x2d8], rcx
mov eax, dword [rsp + 0x2d0]
inc eax
mov dword [rsp + 0x2d0], eax
xor eax, eax
test eax, eax
jne 0x18001778a
mov dword [rsp + 0x40], 0
jmp 0x18001781c
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0xc0]
cmp dword [rsp + 0x40], eax
jae 0x180017844
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
cmp qword [rsp + rax*8 + 0xc8], rcx
jne 0x180017842
jmp 0x180017844
jmp 0x180017812
mov eax, dword [rsp + 0xc0]
cmp dword [rsp + 0x40], eax
jne 0x180017880
cmp dword [rsp + 0xc0], 0x40
jae 0x180017880
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
mov qword [rsp + rax*8 + 0xc8], rcx
mov eax, dword [rsp + 0xc0]
inc eax
mov dword [rsp + 0xc0], eax
xor eax, eax
test eax, eax
jne 0x180017808
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x2d0]
lea r8, [rsp + 0x4e0]
lea rdx, [rsp + 0xc0]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov rax, qword [rsp + 0x30]
cmp dword [rax + 0x10], 2
jne 0x1800179ca
lea rdx, [rsp + 0xc0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1800179c5
mov dword [rsp + 0x54], 1
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x54]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x1800179b5
call fcn.1800175f0
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 0x2bf20
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
call fcn.180016c48
mov edx, 0x80
lea rcx, [rsp + 0x60]
call fcn.18000cbd0
mov edx, dword [rsp + 0x38]
lea rcx, [rsp + 0x60]
call fcn.18000cc08
mov rax, qword [rsp + 0x30]
mov edx, dword [rax + 0x14]
lea rcx, [rsp + 0x60]
call fcn.18000cc08
lea rcx, [rsp + 0x60]
call fcn.18000cc3c
mov dword [rsp + 0x50], eax
lea rcx, [rsp + 0x60]
call fcn.18000cd70
mov r8d, reloc.WS2_32.dll_socket
mov ecx, dword [rsp + 0x50]
mov edx, ecx
mov rcx, rax
call qword [rsp + 0x750]
lea rcx, [rsp + 0x60]
call fcn.18000cb94
jmp 0x1800179c5
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x180017bd4
jmp 0x180017bc1
mov rax, qword [rsp + 0x30]
cmp dword [rax + 0x10], 3
jne 0x180017a5c
lea rdx, [rsp + 0xc0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180017a57
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x6f0]
call fcn.180015f48
lea rcx, [rsp + 0x80]
mov rdi, rcx
mov rsi, rax
mov ecx, 0x40
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x14]
or eax, 0x110000
mov r8, qword [rsp + 0x750]
mov edx, eax
lea rcx, [rsp + 0x80]
call fcn.18001540c
jmp 0x180017bc1
lea rdx, [rsp + 0x2d0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180017a9e
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 0
mov r8d, 4
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
jmp 0x180017bc1
lea rdx, [rsp + 0x4e0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180017ae0
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 1
mov r8d, 6
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
jmp 0x180017bc1
lea rdx, [rsp + 0xc0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180017b86
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x48], rax
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_accept]
mov rcx, qword [rsp + 0x30]
mov qword [rcx + 0x20], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax + 0x20], 0xffffffffffffffff
jne 0x180017b56
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 0
mov r8d, 4
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
jmp 0x180017b79
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 1
mov r8d, 6
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x180017bc1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [rsp + 0x30]
sub eax, dword [rcx + 0x18]
mov rcx, qword [rsp + 0x30]
cmp eax, dword [rcx + 8]
jbe 0x180017bc1
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 0
mov r8d, 4
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x30], rax
jmp 0x1800176b3
add rsp, 0x738
pop rdi
pop rsi
ret