MiApplyStraddleFixups
VOID __stdcall MiApplyStraddleFixups(
_MI_DYNAMIC_RELOCATIONS *DynamicRelocations,
VOID *MappingVa,
UINT64 VirtualAddress,
UINT64 Diff,
UINT64 PrivateFixup,
UINT64 Direction){
__int64 *v6;
int v8;
int v11;
int v12;
char *v13;
int v14;
__int64 v15;
__int64 v16;
__int64 v17;
__int64 v18;
__int64 v19;
v6 = (__int64 *)*((_QWORD *)DynamicRelocations + 2);
v8 = VirtualAddress;
if( v6 )
{
while( 1 )
{
v11 = *((_DWORD *)v6 + 2);
if( (v11 & 0xFFFFF000) == v8 )
break;
v12 = *((_DWORD *)v6 + 3);
if( (v12 & 0xFFFFF000) == v8 )
{
v14 = v12 & 0xFFF;
v13 = (char *)MappingVa;
v15 = 4096 - (v11 & 0xFFFu);
LABEL_10:
if( v13 )
{
v16 = v6[3];
if( (Direction & 1) != 0 )
{
v18 = v16 + *((_QWORD *)DynamicRelocations + 6);
}
else
{
v17 = v16 + PrivateFixup;
if( !PrivateFixup )
v17 = v6[3];
v18 = Diff + v17;
}
v19 = v18;
if( v14 )
memmove(v13, (char *)&v19 + v15, v14);
}
}
LABEL_4:
v6 = (__int64 *)*v6;
if( !v6 )
return;
}
if( (v11 & 0xFFF) == 0 )
{
if( *((_WORD *)v6 + 8) == 3 )
*(_WORD *)((char *)MappingVa + (*((_DWORD *)v6 + 3) & 0xFFFi64) - 2) += WORD1(Diff);
goto LABEL_4;
}
v13 = (char *)MappingVa + (v11 & 0xFFF);
v14 = 4096 - ((unsigned __int16)v13 & 0xFFF);
v15 = 0i64;
goto LABEL_10;
}
}Referenced by:
MiPerformFixups