943,660 Members | Top Members by Rank

Ad:
Aug 7th, 2009
-1

Please C++ TO Delphi

Expand Post »
Please C++ TO Delphi

Pascal and Delphi Syntax (Toggle Plain Text)
  1. IMAGE_NT_HEADERS* inh;
  2. IMAGE_SECTION_HEADER* ish;
  3.  
  4. 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)));
  5.  
  6.  
  7. newSecSize = (newSecSize + (inh->OptionalHeader.FileAlignment - ((newSecSize % inh->OptionalHeader.FileAlignment) ? (newSecSize % inh->OptionalHeader.FileAlignment) : inh->OptionalHeader.FileAlignment)));
  8.  
  9.  
  10. ish->Misc.VirtualSize = (newSecSize + (inh->OptionalHeader.SectionAlignment - ((newSecSize % inh->OptionalHeader.SectionAlignment) ? (newSecSize % inh->OptionalHeader.SectionAlignment) : inh->OptionalHeader.SectionAlignment)));
  11.  
  12. DWORD* hVMImg;
  13.  
  14. DWORD _ssss = (*(DWORD*)(hVMImg + 7))*4 + (*(DWORD*)(hVMImg + 8))*8 + 4;
  15.  
  16.  
  17. BYTE* outCodeBuf;
  18. int outPos = 0;
  19. BYTE* instr;
  20.  
  21. *(DWORD*)(outCodeBuf + outPos + 4) = (int)*((char*)instr + 3);
  22. *(DWORD*)(outCodeBuf + outPos + 4) = *(DWORD*)(instr + 2);
  23.  
  24. BYTE* outCodeBuf;
  25. int outPos = 0;
  26. BYTE* codeBase;
  27. int curPos = 0;
  28. struct
  29. {
  30. DWORD disasm_len;
  31. } dis;
  32.  
  33. memmove(outCodeBuf + outPos + 1, codeBase + curPos, dis.disasm_len);
Similar Threads
Reputation Points: -11
Solved Threads: 0
Newbie Poster
Leila1 is offline Offline
5 posts
since May 2009
Aug 7th, 2009
0

Re: Please C++ TO Delphi

See http://www.daniweb.com/forums/faq.ph...niweb_policies for the forum rules before posting.

Quote originally posted by DaniWeb Rules ...
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
Reputation Points: 9
Solved Threads: 2
Newbie Poster
TeejMonster is offline Offline
19 posts
since Jul 2009
Aug 7th, 2009
0

Re: Please C++ TO Delphi

They're just a helpless skiddie wannabe, trying to do something or other with someone else's malware kit.

I've seen it, it's rubbish.
http://www.daniweb.com/forums/thread194496.html
http://www.daniweb.com/forums/thread195594.html
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: CreateNew affecting all objects
Next Thread in Pascal and Delphi Forum Timeline: basic operations





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC