arm/shared/KernelExploit/Sources/CFastFind/CFastFind.c
/**
 * Emulate an adrp and add instruction at the given pc value
 * Returns destination
 */
Emulate an adrp and add instruction at the given pc value
Returns destination
Emulate an adrp and add instruction at the given pc value Returns destination
uint64_t aarch64_emulate_adrp_add(uint32_t instruction, uint32_t addInstruction, uint64_t pc) {
    uint64_t adrp_target = aarch64_emulate_adrp(instruction, pc);
    if (!adrp_target) {
        return 0;
    }
    uint32_t addDst;
    uint32_t addSrc;
    uint32_t addImm;
    if (!aarch64_emulate_add_imm(addInstruction, &addDst, &addSrc, &addImm)) {
        return 0;
    }
    if ((instruction & 0x1F) != addSrc) {
        return 0;
    }
    return adrp_target + (uint64_t) addImm;
}
uint64_t aarch64_emulate_adrp_add ( uint32_t instruction , uint32_t addInstruction , uint64_t pc ) { uint64_t adrp_target = aarch64_emulate_adrp ( instruction , pc ) ; if ( ! adrp_target ) { return 0 ; } uint32_t addDst ; uint32_t addSrc ; uint32_t addImm ; if ( ! aarch64_emulate_add_imm ( addInstruction , & addDst , & addSrc , & addImm ) ) { return 0 ; } if ( ( instruction & 0x1F ) != addSrc ) { return 0 ; } return adrp_target + ( uint64_t ) addImm ; }
Emulate an adrp and add instruction at the given pc value
 Returns destination
Emulate an adrp and add instruction at the given pc value Returns destination
// Emulate