Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool found = false;
- //Get the offset
- for( unsigned char e = 0; e < iTableSize; e++)
- {
- if (found) {
- break;
- }
- if(table[e] == vecItems[i][t])
- {
- //2nd Byte | if t + 1 < iLength FIX
- if(t + 1 < iTableSize)
- {
- for( unsigned char r = 0; r < iTableSize; r++)
- {
- if(table[r] == vecItems[i][t + 1])
- {
- //lets search the byte
- for(unsigned char random = 0x00; random < 0xFF; random++)
- {
- if((random == (e << 4) & 0xF0U) && random == (r & 0x0FU))
- {
- //found
- this->itemDictionary[iFile].vecBuffer.push_back(random);
- found = true;
- break;
- }
- }
- }
- if(found)
- {
- break;
- }
- }
- if(!found)
- {
- //lets search the byte
- for(unsigned char random = 0x00; random < 0xFF; random++)
- {
- if((random == (e << 4) & 0xF0U) && random == (0x00 & 0x0FU))
- {
- //found
- this->itemDictionary[iFile].vecBuffer.push_back(random);
- found = true;
- break;
- }
- }
- }
- if(!found)
- {
- //ShowMessage("Error");
- this->itemDictionary[iFile].vecBuffer.push_back((e << 4) & 0xF0U);
- }
- }else
- {
- //lets search the byte
- for(unsigned char random = 0x00; random < 0xFF; random++)
- {
- if((random == (e << 4) & 0xF0U) && random == (0x00 & 0x0FU))
- {
- //found
- this->itemDictionary[iFile].vecBuffer.push_back(random);
- found = false;
- break;
- }
- }
- if(!found)
- {
- //ShowMessage("Error 2");
- this->itemDictionary[iFile].vecBuffer.push_back((e & 0x0FU));
- }
- }
- t++;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement