SHOW:
|
|
- or go back to the newest paste.
| 1 | struct hashFindData {
| |
| 2 | unsigned int dataHash; | |
| 3 | unsigned int calculationData; | |
| 4 | hashFindData *next; | |
| 5 | }; | |
| 6 | ||
| 7 | hashFindData *getHashAddress(unsigned int hash) {
| |
| 8 | short div = *(short*)(0x1EA3A7C+0x14); | |
| 9 | unsigned int v1 = hash/div; | |
| 10 | unsigned int v2 = v1*div; | |
| 11 | unsigned int dif = hash-v2; | |
| 12 | unsigned int add = dif << 2; | |
| 13 | unsigned int structAddr = *(unsigned int*)( *(int*)(0x1EA3A7C+0x10) +add); | |
| 14 | hashFindData *dat = (hashFindData *)structAddr; | |
| 15 | } | |
| 16 | ||
| 17 | unsigned int getCalculationData(unsigned int hash) {
| |
| 18 | hashFindData *d = getHashAddress(hash); | |
| 19 | while (d != 0) {
| |
| 20 | if (d->dataHash == hash) {
| |
| 21 | return calculationData; | |
| 22 | } | |
| 23 | d = d->next; | |
| 24 | } | |
| 25 | return 0; | |
| 26 | } | |
| 27 | ||
| 28 | int main() | |
| 29 | {
| |
| 30 | //so essentially, if this = 0, the model is loadable and spawnable | |
| 31 | //if it returns 0, then u gotta teleport to the option to get the game to load it into this data first so this doesn't return 0 anymore | |
| 32 | getCalculationData(some hash); | |
| 33 | } |