Please C++ TO Delphi

IMAGE_NT_HEADERS* inh;
IMAGE_SECTION_HEADER* ish;

DWORD newRVA = (ish + inh->FileHeader.NumberOfSections - 1)->VirtualAddress + ((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize + (inh->OptionalHeader.SectionAlignment - (((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize % inh->OptionalHeader.SectionAlignment) ? ((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize % inh->OptionalHeader.SectionAlignment) : inh->OptionalHeader.SectionAlignment)));


newSecSize = (newSecSize + (inh->OptionalHeader.FileAlignment - ((newSecSize % inh->OptionalHeader.FileAlignment) ? (newSecSize % inh->OptionalHeader.FileAlignment) : inh->OptionalHeader.FileAlignment)));


ish->Misc.VirtualSize = (newSecSize + (inh->OptionalHeader.SectionAlignment - ((newSecSize % inh->OptionalHeader.SectionAlignment) ? (newSecSize % inh->OptionalHeader.SectionAlignment) : inh->OptionalHeader.SectionAlignment)));

DWORD* hVMImg;

DWORD _ssss = (*(DWORD*)(hVMImg + 7))*4 + (*(DWORD*)(hVMImg + 8))*8 + 4;


BYTE* outCodeBuf;
int outPos = 0;
BYTE* instr;

*(DWORD*)(outCodeBuf + outPos + 4) = (int)*((char*)instr + 3);
*(DWORD*)(outCodeBuf + outPos + 4) = *(DWORD*)(instr + 2);

BYTE* outCodeBuf;
int outPos = 0;
BYTE* codeBase;
int curPos = 0;
struct 
{
DWORD disasm_len;
} dis;

memmove(outCodeBuf + outPos + 1, codeBase + curPos, dis.disasm_len);
Salem commented: Why the hell are you still here? -7

Recommended Answers

All 2 Replies

See http://www.daniweb.com/forums/faq.php?faq=daniweb_policies for the forum rules before posting.

Do not post homework problems expecting a quick answer without showing any effort yourself. This especially pertains to the software development forums.

Why not see how much you can do by yourself. You'll learn more that way, and you may (god forbid) have a little fun :p

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.