# stupid original total hack attempt to clear 2GB+ address flag _MESSAGE( "recorrecting exe checksum (%08X -> %08X) ", *checksumPtr, newChecksum) UInt32 newChecksum = CalcEXEChecksum(buf, bufLen, checksumOffset) ![]() clear it, recalculate the exe checksum _MESSAGE( "clearing large-address-aware flag (flags offset = %08X checksum offset = %08X) ", flagsOffset, checksumOffset) UInt32 * checksumPtr = ( UInt32 *)(buf + checksumOffset) UInt16 * flagsPtr = ( UInt16 *)(buf + flagsOffset) UInt32 checksumOffset = headerOffset + 0x14 + 0x40 // +14 to skip COFF header UInt32 flagsOffset = headerOffset + 0x12 *really* clear 2GB+ address-aware flag (this version actually works) ![]() Static void Clear2GBAware( UInt8 * buf, UInt32 bufLen) */Ĭhecksum = (checksum & 0xFFFFFFFF) + (checksum > 32) Ĭhecksum = (checksum & 0xFFFF) + (checksum > 16) * It can be shown that b can reach 0xffef1 here. * It can be shown that a = kModAdler) a -= kModAdler
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |