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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2c8
movaps xmmword [rsp + 0x2b0], xmm6
lea rax, [sym._ZNSt14_Function_base13_Base_managerIZN7httplib6Server15listen_internalEvEUlvE_E10_M_managerERSt9_Any_dataRKS5_St18_Manager_op]
mov byte [rcx + 0x78], 1
mov rsi, rcx
mfence
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0x80], rax
lea rax, [method.std._Function_handler_void_____httplib::Server::listen_internal__::lambda__1_::_M_invoke_std::_Any_data_const_]
cmp qword [rcx + 0x18], 0
mov qword [rsp + 0x88], rax
movdqa xmm1, xmmword [rsp + 0xa0]
mov byte [rsp + 0x90], 1
movaps xmmword [rsp + 0x70], xmm1
je 0x46fa5e
lea rcx, [rcx + 8]
call qword [rsi + 0x20]
mov r14, qword [sym.imp.WS2_32.dll_select]
lea r12, [rsi + 0x28]
mov rdi, rax
mov r15, qword [sym.imp.msvcrt.dll__errno]
lea rax, [method.std._Function_handler_void_____httplib::Server::listen_internal__::lambda__2_::_M_invoke_std::_Any_data_const_]
lea rbx, [sym._ZNSt14_Function_base13_Base_managerIZN7httplib6Server15listen_internalEvEUlvE0_E10_M_managerERSt9_Any_dataRKS5_St18_Manager_o]
mov qword [rsp + 0x38], rax
movq xmm6, rbx
movhps xmm6, qword [rsp + 0x38]
mov rax, qword [r12]
cmp rax, 0xffffffffffffffff
je 0x46f711
mov rax, qword [rsi + 0x68]
lea rbp, [rsp + 0xa0]
mov rdx, qword [rsi + 0x60]
lea r13, [rsp + 0x48]
mov rbx, qword [r12]
mov qword [rsp + 0xa8], rbx
add ebx, 1
mov dword [rsp + 0xa0], 1
mov dword [rsp + 0x48], edx
mov dword [rsp + 0x4c], eax
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
mov ecx, ebx
call r14
cdqe
test rax, rax
jns 0x46f890
call r15
cmp dword [rax], 4
je 0x46f51a
xor r8d, r8d
xor edx, edx
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_accept]
cmp rax, 0xffffffffffffffff
mov rbx, rax
je 0x46f8c0
mov rcx, qword [rsi + 0x48]
mov r9, rbp
movabs rdx, 0x20c49ba5e353f7cf
imul r8d, dword [rsi + 0x40], 0x3e8
mov dword [rsp + 0x20], 4
mov r13, qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, rcx
sar rcx, 0x3f
imul rdx
sar rdx, 7
sub rdx, rcx
mov rcx, rbx
add edx, r8d
mov r8d, 0x1006
mov dword [rsp + 0xa0], edx
mov edx, 0xffff
call r13
mov r8, qword [rsi + 0x58]
mov r9, rbp
movabs rdx, 0x20c49ba5e353f7cf
imul ecx, dword [rsi + 0x50], 0x3e8
mov dword [rsp + 0x20], 4
mov rax, r8
sar r8, 0x3f
imul rdx
sar rdx, 7
sub rdx, r8
mov r8d, 0x1005
add edx, ecx
mov rcx, rbx
mov dword [rsp + 0xa0], edx
mov edx, 0xffff
call r13
mov rax, qword [rdi]
lea rdx, [method.httplib::ThreadPool.enqueue_std::function_void_____]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0xa8], rbx
movaps xmmword [rsp + 0xb0], xmm6
cmp rax, rdx
jne 0x46f940
lea rcx, [rdi + 0x50]
mov byte [rsp + 0x68], 0
mov qword [rsp + 0x60], rcx
call sym.pthread_mutex_lock
test eax, eax
jne 0x46fa4b
mov rax, qword [rdi + 0x40]
mov byte [rsp + 0x68], 1
test rax, rax
je 0x46f65d
cmp rax, qword [rdi + 0x30]
jbe 0x46f9c0
lea rbx, [rdi + 0x20]
mov ecx, 0x30
call sym.operator_new_unsigned_long_long_
mov rdx, qword [rsp + 0xb0]
mov qword [rsp + 0xb0], 0
mov rcx, qword [rax + 0x28]
mov r9, qword [rsp + 0xa0]
mov r10, qword [rsp + 0xa8]
mov qword [rax + 0x20], rdx
mov rdx, qword [rsp + 0xb8]
movdqu xmm0, xmmword [rax + 0x10]
mov qword [rsp + 0xb8], rcx
mov rcx, rax
mov qword [rax + 0x10], r9
mov qword [rax + 0x18], r10
mov qword [rax + 0x28], rdx
mov rdx, rbx
movaps xmmword [rsp + 0xa0], xmm0
call sym.std::__detail::_List_node_base::_M_hook_std::__detail::_List_node_base_
add qword [rdi + 0x30], 1
cmp byte [rsp + 0x68], 0
jne 0x46f922
lea rcx, [rdi + 0x48]
call sym.std::condition_variable::notify_one__
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x46f4d5
mov r8d, 3
mov rdx, rbp
mov rcx, rbp
call rax
mov rax, qword [r12]
cmp rax, 0xffffffffffffffff
jne 0x46f4e3
mov rax, qword [rdi]
lea rbx, [rdi + 0x50]
mov ebp, 1
lea rdx, [method.httplib::ThreadPool.shutdown__]
mov rax, qword [rax + 0x18]
cmp rax, rdx
jne 0x46fa3c
mov rcx, rbx
call sym.pthread_mutex_lock
test eax, eax
jne 0x46fa52
mov rcx, rbx
mov byte [rdi + 0x38], 1
call sym.pthread_mutex_unlock
lea rcx, [rdi + 0x48]
call sym.std::condition_variable::notify_all__
mov rbx, qword [rdi + 8]
mov rsi, qword [rdi + 0x10]
cmp rbx, rsi
je 0x46f774
mov rcx, rbx
call sym.std::thread::join__
add rbx, 8
cmp rsi, rbx
jne 0x46f763
mov rax, qword [rdi]
lea rdx, [sym.httplib::ThreadPool::ThreadPool__]
mov rax, qword [rax + 8]
cmp rax, rdx
jne 0x46fa30
lea rax, method.httplib::ThreadPool.ThreadPool__
lea rcx, [rdi + 0x50]
mov qword [rdi], rax
call sym.pthread_mutex_destroy
lea rcx, [rdi + 0x48]
call fcn.004459e0
mov rbx, qword [rdi + 0x20]
lea r12, [rdi + 0x20]
cmp r12, rbx
jne 0x46f7df
jmp 0x46f7f8
lea rcx, [rbx + 0x10]
mov r8d, 3
mov rdx, rcx
call rax
mov rcx, rbx
call sym.operator_delete_void_
cmp r12, rsi
je 0x46f7f8
mov rbx, rsi
mov rax, qword [rbx + 0x20]
mov rsi, qword [rbx]
test rax, rax
jne 0x46f7c0
mov rcx, rbx
call sym.operator_delete_void_
cmp r12, rsi
jne 0x46f7dc
mov rdx, qword [rdi + 0x10]
mov rcx, qword [rdi + 8]
cmp rdx, rcx
je 0x46f9b2
cmp qword [rcx], 0
jne 0x46fa46
mov rax, rcx
jmp 0x46f82a
cmp qword [rax], 0
jne 0x46fa46
add rax, 8
cmp rdx, rax
jne 0x46f820
call sym.operator_delete_void_
mov edx, 0x58
mov rcx, rdi
call sym.operator_delete_void__unsigned_long_long_
cmp byte [rsp + 0x90], 0
mov rax, qword [rsp + 0x80]
jne 0x46f990
test rax, rax
je 0x46f871
lea rcx, [rsp + 0x70]
mov r8d, 3
mov rdx, rcx
call rax
nop
movaps xmm6, xmmword [rsp + 0x2b0]
mov eax, ebp
add rsp, 0x2c8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
jne 0x46f540
mov rax, qword [rdi]
lea rdx, [method.httplib::TaskQueue.on_idle__]
mov rax, qword [rax + 0x20]
cmp rax, rdx
je 0x46f4d5
mov rcx, rdi
call rax
jmp 0x46f4d5
mov rbx, qword [sym.imp.msvcrt.dll__errno]
call rbx
cmp dword [rax], 0x18
je 0x46f9f0
call rbx
cmp dword [rax], 4
je 0x46f4d5
call rbx
cmp dword [rax], 0xb
je 0x46f4d5
mov rax, qword [rsi + 0x28]
cmp rax, 0xffffffffffffffff
je 0x46f711
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rdi]
lea rdx, [method.httplib::ThreadPool.shutdown__]
mov rax, qword [rax + 0x18]
cmp rax, rdx
jne 0x46fa3a
lea rbx, [rdi + 0x50]
xor ebp, ebp
jmp 0x46f731
mov rcx, qword [rsp + 0x60]
lea rdx, [rsp + 0x68]
call method.std::unique_lock_std::mutex_.unlock____clone_.isra.290_
jmp 0x46f6db
mov rdx, rbp
mov rcx, rdi
call rax
mov r13d, eax
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x46f966
mov r8d, 3
mov rdx, rbp
mov rcx, rbp
call rax
test r13b, r13b
jne 0x46f4d5
mov edx, 2
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x46f4d5
test rax, rax
je 0x46fa59
lea rcx, [rsp + 0x70]
call qword [rsp + 0x88]
mov rax, qword [rsp + 0x80]
jmp 0x46f85b
test rcx, rcx
je 0x46f838
jmp 0x46f833
mov rcx, qword [rsp + 0x60]
lea rdx, [rsp + 0x68]
call method.std::unique_lock_std::mutex_.unlock____clone_.isra.290_
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x46f96f
mov r8d, 3
mov rdx, rbp
mov rcx, rbp
call rax
jmp 0x46f96f
mov qword [rsp + 0x50], 0
lea rbp, [rsp + 0x50]
mov dword [rsp + 0x58], 0xf4240
jmp 0x46fa1b
call rbx
cmp dword [rax], 4
jne 0x46f4d5
mov rdx, rbp
mov rcx, rbp
call sym.nanosleep
cmp eax, 0xffffffff
je 0x46fa10
jmp 0x46f4d5
mov rcx, rdi
call rax
jmp 0x46f845
xor ebp, ebp
mov rcx, rdi
call rax
jmp 0x46f774
call sym.std::terminate__
mov ecx, eax
call sym.std::__throw_system_error_int_
mov ecx, eax
call sym.std::__throw_system_error_int_
call sym.std::__throw_bad_function_call__
call sym.std::__throw_bad_function_call__
mov rbx, rax
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 8]
lea rcx, [rsp + 0x70]
call method.httplib::detail::scope_exit.scope_exit__
mov rcx, rbx
call sym._Unwind_Resume
test rdi, rdi
mov rbx, rax
jne 0x46fa66
jmp 0x46fa6f