Reverse Engineering of Function sub_2E72: A Detailed Analysis
Based on the provided code, the function 'sub_2E72' takes two parameters 'a1' and 'a2' and returns an integer.
The function starts by declaring a character array 'v15' of size 40. It then initializes 'v2' and 'v4' to point to the start of 'v15'.
Next, the function enters a nested loop to copy 16 bytes of data from the memory address 'a1' into 'v15', effectively copying a 4x4 matrix of bytes. This nested loop iterates over 'i' and 'j' and uses pointer arithmetic to copy the bytes.
After that, the function calls 'sub_2CB2' passing 'v15' and the memory address 'a2 + 160' as arguments.
Then, the function enters a loop that iterates 9 times. In each iteration, it calls 'sub_2DB4', 'sub_2D88', and 'sub_2CB2' with 'v15' and the memory address 'a2 + 16 * v7' as arguments. If 'v7' is not zero, it also calls 'sub_2DF0'. After each iteration, it decrements 'v7' by 1.
Finally, the function enters another nested loop to copy the modified 'v15' back into the memory address 'a1'. This nested loop iterates over 'k' and 'l' and uses pointer arithmetic to copy the bytes.
The function then returns 'a1'.
原文地址: https://www.cveoy.top/t/topic/qFy5 著作权归作者所有。请勿转载和采集!