Function at 0x470920
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 0x470f4e
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 0x470c01
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 0x470d80
call r15
cmp dword [rax], 4
je 0x470a0a
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 0x470db0
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 0x470e30
lea rcx, [rdi + 0x50]
mov byte [rsp + 0x68], 0
mov qword [rsp + 0x60], rcx
call sym.pthread_mutex_lock
test eax, eax
jne 0x470f3b
mov rax, qword [rdi + 0x40]
mov byte [rsp + 0x68], 1
test rax, rax
je 0x470b4d
cmp rax, qword [rdi + 0x30]
jbe 0x470eb0
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 0x470e12
lea rcx, [rdi + 0x48]
call sym.std::condition_variable::notify_one__
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x4709c5
mov r8d, 3
mov rdx, rbp
mov rcx, rbp
call rax
mov rax, qword [r12]
cmp rax, 0xffffffffffffffff
jne 0x4709d3
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 0x470f2c
mov rcx, rbx
call sym.pthread_mutex_lock
test eax, eax
jne 0x470f42
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 0x470c64
mov rcx, rbx
call sym.std::thread::join__
add rbx, 8
cmp rsi, rbx
jne 0x470c53
mov rax, qword [rdi]
lea rdx, [sym.httplib::ThreadPool::ThreadPool__]
mov rax, qword [rax + 8]
cmp rax, rdx
jne 0x470f20
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.00443cf8
mov rbx, qword [rdi + 0x20]
lea r12, [rdi + 0x20]
cmp r12, rbx
jne 0x470ccf
jmp 0x470ce8
lea rcx, [rbx + 0x10]
mov r8d, 3
mov rdx, rcx
call rax
mov rcx, rbx
call sym.operator_delete_void_
cmp r12, rsi
je 0x470ce8
mov rbx, rsi
mov rax, qword [rbx + 0x20]
mov rsi, qword [rbx]
test rax, rax
jne 0x470cb0
mov rcx, rbx
call sym.operator_delete_void_
cmp r12, rsi
jne 0x470ccc
mov rdx, qword [rdi + 0x10]
mov rcx, qword [rdi + 8]
cmp rdx, rcx
je 0x470ea2
cmp qword [rcx], 0
jne 0x470f36
mov rax, rcx
jmp 0x470d1a
cmp qword [rax], 0
jne 0x470f36
add rax, 8
cmp rdx, rax
jne 0x470d10
call sym.operator_delete_void_
mov rcx, rdi
call sym.operator_delete_void_
cmp byte [rsp + 0x90], 0
mov rax, qword [rsp + 0x80]
jne 0x470e80
test rax, rax
je 0x470d5c
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 0x470a30
mov rax, qword [rdi]
lea rdx, [method.httplib::TaskQueue.on_idle__]
mov rax, qword [rax + 0x20]
cmp rax, rdx
je 0x4709c5
mov rcx, rdi
call rax
jmp 0x4709c5
mov rbx, qword [sym.imp.msvcrt.dll__errno]
call rbx
cmp dword [rax], 0x18
je 0x470ee0
call rbx
cmp dword [rax], 4
je 0x4709c5
call rbx
cmp dword [rax], 0xb
je 0x4709c5
mov rax, qword [rsi + 0x28]
cmp rax, 0xffffffffffffffff
je 0x470c01
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 0x470f2a
lea rbx, [rdi + 0x50]
xor ebp, ebp
jmp 0x470c21
mov rcx, qword [rsp + 0x60]
lea rdx, [rsp + 0x68]
call method.std::unique_lock_std::mutex_.unlock____clone_.isra.285_
jmp 0x470bcb
mov rdx, rbp
mov rcx, rdi
call rax
mov r13d, eax
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x470e56
mov r8d, 3
mov rdx, rbp
mov rcx, rbp
call rax
test r13b, r13b
jne 0x4709c5
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 0x4709c5
test rax, rax
je 0x470f49
lea rcx, [rsp + 0x70]
call qword [rsp + 0x88]
mov rax, qword [rsp + 0x80]
jmp 0x470d46
test rcx, rcx
je 0x470d28
jmp 0x470d23
mov rcx, qword [rsp + 0x60]
lea rdx, [rsp + 0x68]
call method.std::unique_lock_std::mutex_.unlock____clone_.isra.285_
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x470e5f
mov r8d, 3
mov rdx, rbp
mov rcx, rbp
call rax
jmp 0x470e5f
mov qword [rsp + 0x50], 0
lea rbp, [rsp + 0x50]
mov dword [rsp + 0x58], 0xf4240
jmp 0x470f0b
call rbx
cmp dword [rax], 4
jne 0x4709c5
mov rdx, rbp
mov rcx, rbp
call sym.nanosleep
cmp eax, 0xffffffff
je 0x470f00
jmp 0x4709c5
mov rcx, rdi
call rax
jmp 0x470d30
xor ebp, ebp
mov rcx, rdi
call rax
jmp 0x470c64
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 0x470f56
jmp 0x470f5f