It's 3:41am and I'm exhausted but I'm not sleeping till I finish, can someone please inform me of my mistake?
ProcMem.h
Code:
//READ MemORY - Pointer
template <class cData>
cData Read(DWORD dwAddress, int *Offset, BOOL Type)
{
//Variables
int iSize = iSizeOfArray(Offset) - 1; //Size Of *Array Of Offsets
dwAddress = Read<DWORD>(dwAddress); //HEX VAL
//Loop Through Each Offset & Store Hex Value (Address)
for (int i = 0; i < iSize; i++)
dwAddress = Read<DWORD>(dwAddress + Offset[i]);
// printf("%x", dwAddress);
//printf("%s", "\n");
if (!Type)
return dwAddress + Offset[iSize]; //FALSE - Return Address
else
return Read<cData>(dwAddress + Offset[iSize]); //TRUE - Return Value
}
iSizeOfArray:
Code:
int ProcMem::iSizeOfArray(int *iArray) {
//Loop Through *chArray To Get Amount Of Bytes
for (int iLength = 1; iLength < MAX_PATH; iLength++)
if (iArray[iLength] == '*')
return iLength;
cout << "\nLENGTH: Failed To Read Length Of Array\n";
return 0;
}
//Solved, it was an issue with the way my procmem was reading array length, just changed it to require an extra arg.
Code:
int ProcMem::iSizeOfArray(int *iArray) {
//Loop Through *chArray To Get Amount Of Bytes
for (int iLength = 1; iLength < MAX_PATH; iLength++)
if (iArray[iLength] == '*')
return iLength;
cout << "\nLENGTH: Failed To Read Length Of Array\n";
return 0;
}
I have no idea who coded this bullshit, but this is not how you get the size of an array.