RtlpSearchFunctionTable
_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY *__fastcall RtlpSearchFunctionTable(
_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY *FunctionTable,
UINT64 EntryCount,
UINT64 ControlPc,
UINT64 ImageBase){
_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY *v4;
int v5;
UINT64 v7;
_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY *v8;
UINT64 BeginAddress;
bool v10;
int v11;
int v12;
int v13;
v4 = 0i64;
v5 = EntryCount;
if( (_DWORD)EntryCount )
{
v7 = ControlPc - ImageBase;
v8 = (_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY *)((char *)FunctionTable + 12 * (unsigned int)(EntryCount - 1));
BeginAddress = v8->BeginAddress;
if( v7 < BeginAddress )
{
v10 = v5 - 2 < 0;
v11 = v5 - 2;
v12 = 0;
if( !v10 )
{
do
{
v13 = (v12 + v11) >> 1;
v8 = (_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY *)((char *)FunctionTable + 12 * v13);
if( v7 < v8->BeginAddress )
{
v11 = v13 - 1;
}
else
{
LODWORD(BeginAddress) = v8->BeginAddress;
if( v7 < v8[1].UnwindData )
break;
v12 = v13 + 1;
}
LODWORD(BeginAddress) = v8->BeginAddress;
}
while( v11 >= v12 );
}
}
if( v7 >= (unsigned int)BeginAddress && v7 < v8->UnwindData )
return v8;
}
return v4;
}Referenced by:
RtlMarkExceptionHandlingPages