# gogogo

## 逆向分析

ida7.6以上逆go要比ida7.6下好很多，入眼一个if判断，输入正确之后没什么用

math_init有点长，运行程序之后发现是一个1a2b的游戏，当游戏通关在exit之后有一个栈溢出，放的有点隐晦，难受（从头看到尾

# vdq

## 逆向分析

get_opr_lst应该就是read的功能了。跟进这个函数发现了一个变量

##### View

archive这个功能并不会将用以储存消息的容器也释放掉

poc有点长

["Add", "Add", "Archive", "Add", "Archive", "Add", "Add", "View", "Remove", "Remove", "Archive"]

A double-ended queue implemented with a growable ring buffer.

The “default” usage of this type as a queue is to use push_back to add to the queue, and pop_front to remove from the queue. extend and append push onto the back in this manner, and iterating over VecDeque goes front to back.

A VecDeque with a known list of items can be initialized from an array:

Since VecDeque is a ring buffer, its elements are not necessarily contiguous in memory. If you want to access the elements as a single slice, such as for efficient sorting, you can use make_contiguous. It rotates the VecDeque so that its elements do not wrap, and returns a mutable slice to the now-contiguous element sequence.

make_contiguous

Rearranges the internal storage of this deque so it is one contiguous slice, which is then returned.

VecDeque::make_contiguous 存在一个错误，即在特定条件下多次弹出相同的元素。此错误可能导致释放后使用或双重释放。

["Add", "Add", "Archive", "Add", "Archive", "Add", "Add", "View", "Remove", "Remove", "Remove", "View"]

return unsafe { &mut self.buffer_as_mut_slice()[tail..head] };

# Reference

https://mp.weixin.qq.com/s/5pwU3-DX9-dI14iNIcIbPA

https://www.cjovi.icu/WP/1617.html