能力值:
( LV3,RANK:20 )
|
-
-
2 楼
我把狗砍掉一只腿,求楼下教我怎么用猫的腿接上......
|
能力值:
( LV17,RANK:797 )
|
-
-
3 楼
自己解决了。
void FixRelocBase2(CPeFile &cPe,DWORD ImageBase,DWORD SecBase) { PIMAGE_BASE_RELOCATION rel; DWORD relNum; rel=(PIMAGE_BASE_RELOCATION)( cPe.rva_to_buffer(cPe.GetDataDirInfo(IMAGE_DIRECTORY_ENTRY_BASERELOC)->VirtualAddress) ); while (rel->SizeOfBlock) { relNum=(rel->SizeOfBlock-8)/2; for (DWORD i=0;i<relNum;i++) { char Type; Type = rel->TypeOffset>>12; if (Type==3) { DWORD *relAdr; relAdr = (DWORD *)rel->VirtualAddress; relAdr = (DWORD *)cPe.rva_to_buffer((DWORD)relAdr + (rel->TypeOffset&0x0fff)); *relAdr -= cPe.GetImageBase(); //算出RVA *relAdr -=cPe.FindSectionByName(".MyCode")->VirtualAddress; *relAdr +=SecBase; *relAdr +=ImageBase; } } rel=(PIMAGE_BASE_RELOCATION)((DWORD)rel + rel->SizeOfBlock); } }
|
能力值:
( LV2,RANK:10 )
|
-
-
4 楼
参考内存加载dll里面有
|
|
|