Untitled
{ uintptr_t addr = debugger->scanner->Find_Pattern("48 63 45 ? 48 69 C8 ? ? ? ? ? 03 ? 74 ? F6") + 0x4; auto instruction = Decode(addr); if (instruction.operand_count == 4 && instruction.operands[0].reg.value != 0 && instruction.operands[1].reg.value != 0 && instruction.operands[2].imm.value.s != 0) printf("\t\tstatic uintptr_t entity_size = 0x%llX;\n", instruction.operands[2].imm.value.s); else printf("\t\t\033[1;31mstatic uintptr_t entity_size = 0x0;\033[0m\n"); } { uintptr_t addr = debugger->scanner->Find_Pattern("0F B7 81 ? ? ? ? 83 F8 12"); auto instruction = Decode(addr); if (instruction.operands[1].mem.base == ZYDIS_REGISTER_RCX && instruction.operands[1].mem.disp.has_displacement) printf("\t\tstatic uintptr_t entity_type = 0x%llX;\n", instruction.operands[1].mem.disp.value); else printf("\t\t\033[1;31mstatic uintptr_t entity_type = 0x0;\033[0m\n"); } { uintptr_t addr = debugger->scanner->Find_Pattern("48 63 45 ? 48 69 C8 ? ? ? ? ? 03 ? 74 ? F6") + 0x10; auto instruction = Decode(addr); if (instruction.operands[0].mem.base == ZYDIS_REGISTER_RCX && instruction.operands[0].mem.disp.has_displacement) printf("\t\tstatic uintptr_t entity_index = 0x%llX;\n", instruction.operands[0].mem.disp.value); else printf("\t\t\033[1;31mstatic uintptr_t entity_index = 0x0;\033[0m\n"); } printf("\t\t\static uintptr_t entity_pos = entity_type + 0x1C;\n");
Leave a Comment