| skipped 163 lines |
164 | 164 | | |
165 | 165 | | // Calculate the address of the jump target |
166 | 166 | | DWORD jumpTargetAddress = ntHeader->OptionalHeader.ImageBase + caveSectionHeader->VirtualAddress; |
167 | | - | DWORD jumpOffset = jumpTargetAddress - (ntHeader->OptionalHeader.ImageBase + entryPointRva + sizeof(5)); |
| 167 | + | DWORD jumpOffset = jumpTargetAddress - (ntHeader->OptionalHeader.ImageBase + entryPointRva + sizeof(unsigned char)); |
168 | 168 | | |
169 | 169 | | // Patch the entry point with a jump instruction to the .cave section |
170 | 170 | | unsigned char bytes[5]; |
| skipped 77 lines |