Skip to content

Commit d38b113

Browse files
committed
Update How_can_i_find_view_matrix_pattern.md
1 parent c7d30c0 commit d38b113

File tree

1 file changed

+111
-112
lines changed

1 file changed

+111
-112
lines changed

How_can_i_find_view_matrix_pattern.md

+111-112
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Go to there as in video
1111
- Zoom to tareget center (150m)
1212

13-
viewmatrix 4x4 16 float. its 16*4 64Byte
13+
ViewMatrix 4x4 16 float. its 16*4 64Byte
1414
if you zoom to this target with 8x scoop.
1515
your view matrix some like this.
1616
```
@@ -35,124 +35,123 @@ your view matrix some like this.
3535

3636
## Find viewmatrix base
3737
```C++
38-
loadRegions(0x340F4E00, 0x5F9CFEB0);
39-
40-
float _f;
38+
loadRegions(0x340F4E00, 0x5F9CFEB0);
4139

42-
DWORD foundedVMPath = 0;
43-
//for(int r = 0; r < memSectorIndex; r++){
44-
for(int r = 0; r < memSectorIndex; r++){
45-
std::cout << termcolor::blue << " region: " << (r + 1) << "/" << memSectorIndex << " base: " << termcolor::cyan << "0x" << std::hex << memSectorList[r].dwBaseAddr << termcolor::reset << " size: " << std::dec << memSectorList[r].dwMemorySize << "\n";
40+
float _f;
4641

47-
MEMORY_REGION region = memSectorList[r];
48-
DWORD base = region.dwBaseAddr;
49-
int size = region.dwMemorySize;
50-
loadBuffer(base, size);
51-
52-
for(int i = 0; i < size - 4; i+=4){
53-
_f = flook( i);
54-
if( _f > -11.0f && _f < -10.0f){ // 10
55-
_f = flook( i + 4);
56-
if( _f > -0.012 && _f < 0.012){ // 11
57-
_f = flook( i + 8);
58-
if(flook( i + 8) == 0.0f){ // 12
59-
_f = flook( i + 12);
60-
if(_f > 0.092f && _f < 0.102f){ // 13
61-
_f = flook( i + 16);
62-
if(_f > 0.900f && _f < 1.100f){ // 14
63-
_f = flook( i + 20);
64-
if(_f > -0.100f && _f < 0.100f){ // 15
65-
_f = flook( i + 24);
66-
if(_f == 0.0f){ // 16
67-
_f = flook( i + 28);
68-
if(_f > 0.990f && _f < 0.999f){ // 17
69-
_f = flook( i + 32);
70-
if(_f != 0.0f || 1 == 1){ // 18 - unknown
71-
_f = flook( i + 36);
72-
if(_f > 18.0f && _f < 19.0f){ // 19
73-
_f = flook( i + 40);
74-
if(_f == 0.0f){ // 20
75-
_f = flook( i + 44);
76-
if(_f > -0.007f && _f < 0.007f){ // 21
77-
_f = flook( i + 48);
78-
if(_f > 10000.0f && _f < 8000000.0f || 1 == 1){ // 22 - unknown
79-
_f = flook( i + 52);
80-
if(_f > -30000.0f && _f < -10000.0f){ // 23
81-
_f = flook( i + 56);
82-
if(_f == 3.0f){ // 24
83-
_f = flook( i + 60);
84-
if(_f > -800000.0f && _f < -100000.0f || 1 == 1){ // 25 - unknown
85-
if(flook(i + 64) == 0.0f && flook(i + 68) == 0.0f && flook(i + 72) == 0.0f){ // END + 12byte
86-
std::cout << "Found : " << std::hex << base + i << std::dec << "\n";
87-
foundedVMPath = base + i;
88-
r = memSectorIndex;
89-
int ax = 22;
90-
}
91-
}
92-
}
93-
}
94-
}
95-
}
96-
}
97-
}
98-
}
99-
}
100-
}
101-
}
102-
}
103-
}
104-
}
105-
}
106-
}
107-
}
108-
}
42+
DWORD foundedVMPath = 0;
43+
for(int r = 0; r < memSectorIndex; r++){
44+
std::cout << termcolor::blue << " region: " << (r + 1) << "/" << memSectorIndex << " base: " << termcolor::cyan << "0x" << std::hex << memSectorList[r].dwBaseAddr << termcolor::reset << " size: " << std::dec << memSectorList[r].dwMemorySize << "\n";
45+
46+
MEMORY_REGION region = memSectorList[r];
47+
DWORD base = region.dwBaseAddr;
48+
int size = region.dwMemorySize;
49+
loadBuffer(base, size);
50+
51+
for(int i = 0; i < size - 4; i+=4){
52+
_f = flook( i);
53+
if( _f > -11.0f && _f < -10.0f){ // 10
54+
_f = flook( i + 4);
55+
if( _f > -0.012 && _f < 0.012){ // 11
56+
_f = flook( i + 8);
57+
if(flook( i + 8) == 0.0f){ // 12
58+
_f = flook( i + 12);
59+
if(_f > 0.092f && _f < 0.102f){ // 13
60+
_f = flook( i + 16);
61+
if(_f > 0.900f && _f < 1.100f){ // 14
62+
_f = flook( i + 20);
63+
if(_f > -0.100f && _f < 0.100f){ // 15
64+
_f = flook( i + 24);
65+
if(_f == 0.0f){ // 16
66+
_f = flook( i + 28);
67+
if(_f > 0.990f && _f < 0.999f){ // 17
68+
_f = flook( i + 32);
69+
if(_f != 0.0f || 1 == 1){ // 18 - unknown
70+
_f = flook( i + 36);
71+
if(_f > 18.0f && _f < 19.0f){ // 19
72+
_f = flook( i + 40);
73+
if(_f == 0.0f){ // 20
74+
_f = flook( i + 44);
75+
if(_f > -0.007f && _f < 0.007f){ // 21
76+
_f = flook( i + 48);
77+
if(_f > 10000.0f && _f < 8000000.0f || 1 == 1){ // 22 - unknown
78+
_f = flook( i + 52);
79+
if(_f > -30000.0f && _f < -10000.0f){ // 23
80+
_f = flook( i + 56);
81+
if(_f == 3.0f){ // 24
82+
_f = flook( i + 60);
83+
if(_f > -800000.0f && _f < -100000.0f || 1 == 1){ // 25 - unknown
84+
if(flook(i + 64) == 0.0f && flook(i + 68) == 0.0f && flook(i + 72) == 0.0f){ // END + 12byte
85+
std::cout << "Found : " << std::hex << base + i << std::dec << "\n";
86+
foundedVMPath = base + i;
87+
r = memSectorIndex;
88+
int ax = 22;
89+
}
90+
}
91+
}
92+
}
93+
}
94+
}
95+
}
96+
}
97+
}
98+
}
99+
}
100+
}
101+
}
102+
}
103+
}
104+
}
105+
}
106+
}
107+
}
109108
```
110109
111110
112111
113112
## Find Which Pointers Goint To ViewMatrix
114113
115114
```C++
116-
loadRegions(0x26000000, 0x30000000);
117-
DWORD _1, _2, _3;
118-
for(int r = 0; r < memSectorIndex; r++){
119-
std::cout << termcolor::blue << " region: " << (r+1) << "/" << memSectorIndex << " base: " << termcolor::cyan << "0x" << std::hex << memSectorList[r].dwBaseAddr << termcolor::reset << " size: " << std::dec << memSectorList[r].dwMemorySize << "\n";
120-
MEMORY_REGION region = memSectorList[r];
121-
DWORD base = region.dwBaseAddr;
122-
int size = region.dwMemorySize;
123-
loadBuffer(base, size);
124-
for(int i = 0; i < size - 4; i += 4){
125-
_1 = dlook(i);
126-
if(_1 > 0x2C8475E0 && _1 < 0x5C8475E0){
127-
for(int g = 0; g < 200; g += 4){
128-
_2 = dread(_1 + g);
129-
if(_2 > 0x2C8475E0){
130-
for(int h = 0; h < 1024; h += 4){
131-
if(_2 + h == foundedVMPath){
132-
std::cout << termcolor::green;
133-
std::cout << "Found Base: ";
134-
std::cout << termcolor::red;
135-
logHex((base + i));
136-
std::cout << termcolor::reset;
137-
std::cout << " >";
138-
std::cout << termcolor::red;
139-
std::cout << " +0x";
140-
logHex(g);
141-
std::cout << termcolor::reset;
142-
std::cout << " >";
143-
std::cout << termcolor::red;
144-
std::cout << " +0x";
145-
logHex(h);
146-
std::cout << termcolor::reset;
147-
logStr("\n");
148-
std::cout << termcolor::reset;
149-
std::string xxx;
150-
std::cin >> xxx;
151-
}
152-
}
153-
}
154-
}
155-
}
156-
}
157-
}
115+
loadRegions(0x26000000, 0x30000000);
116+
DWORD _1, _2, _3;
117+
for(int r = 0; r < memSectorIndex; r++){
118+
std::cout << termcolor::blue << " region: " << (r+1) << "/" << memSectorIndex << " base: " << termcolor::cyan << "0x" << std::hex << memSectorList[r].dwBaseAddr << termcolor::reset << " size: " << std::dec << memSectorList[r].dwMemorySize << "\n";
119+
MEMORY_REGION region = memSectorList[r];
120+
DWORD base = region.dwBaseAddr;
121+
int size = region.dwMemorySize;
122+
loadBuffer(base, size);
123+
for(int i = 0; i < size - 4; i += 4){
124+
_1 = dlook(i);
125+
if(_1 > 0x2C8475E0 && _1 < 0x5C8475E0){
126+
for(int g = 0; g < 200; g += 4){
127+
_2 = dread(_1 + g);
128+
if(_2 > 0x2C8475E0){
129+
for(int h = 0; h < 1024; h += 4){
130+
if(_2 + h == foundedVMPath){
131+
std::cout << termcolor::green;
132+
std::cout << "Found Base: ";
133+
std::cout << termcolor::red;
134+
logHex((base + i));
135+
std::cout << termcolor::reset;
136+
std::cout << " >";
137+
std::cout << termcolor::red;
138+
std::cout << " +0x";
139+
logHex(g);
140+
std::cout << termcolor::reset;
141+
std::cout << " >";
142+
std::cout << termcolor::red;
143+
std::cout << " +0x";
144+
logHex(h);
145+
std::cout << termcolor::reset;
146+
logStr("\n");
147+
std::cout << termcolor::reset;
148+
std::string xxx;
149+
std::cin >> xxx;
150+
}
151+
}
152+
}
153+
}
154+
}
155+
}
156+
}
158157
```

0 commit comments

Comments
 (0)