Jump to content

Help c+ to autoit


fyue
 Share

Recommended Posts

#include "stdafx.h"

#include <string.h>

#include <conio.h>

#include <malloc.h>

void first(unsigned char* str, unsigned char* dst, size_t len)

{

size_t i = 0;

while (i < len)

{

if (str > 0x39)

{

dst[i/2] = (str-7) << 4;

}

else

{

dst[i/2] = str << 4;

}

if (str[i+1] > 0x39)

{

dst[i/2] = dst[i/2] | (str[i+1] - 0x37);

}

else

{

dst[i/2] = dst[i/2] | (str[i+1] - 0x30);

}

i += 2;

}

}

void second(unsigned long dst4, unsigned char* dstmain, size_t len)

{

unsigned long dwCode = dst4 ^ 0x83ACB78D;

size_t i = 0;

while (i < len)

{

dstmain = dstmain ^ ( (unsigned char)dwCode ^ 0xAF);

dwCode = dwCode * 0x34F85F9;

dwCode = ( (dwCode + len)*len + 0xA13292 ) * len;

i++;

}

}

void third(unsigned long dst4, unsigned char* dstmain, size_t len)

{

unsigned long dwCode = dst4 ^ 0x1E2A6C5B;

size_t i = 0;

while (i < len)

{

dstmain = dstmain ^ ( (unsigned char)dwCode ^ 0xDA);

dwCode = ((dwCode*len*len*0x415EAC8 + 0x5C07)*len + 0x188D3D9)*len;

i++;

}

}

int _tmain(int argc, _TCHAR* argv[])

{

unsigned char str[] = "EC3A3A4E3B493A383F4A3A363B393B4D3A4C3B4D3F4A3A383B3E3A4D3F4A3B493A4C3B4D3F3D3F4A39383F363B3C3F4A3B4B3B493A4E3B4B3B393B383B3F3B363F4A3A4D3A4A3F3F3E383B3A39364C4C8DFE5513";

unsigned long dst4;

int dstLen = (strlen( (char*)str) - 8) / 2 + 1;

unsigned char* dstmain = (unsigned char*)_alloca(dstLen);

first(str+strlen((char*)str)-8, (unsigned char*)&dst4, 8);

first(str, dstmain, strlen((char*)str)-8);

second(dst4, dstmain, dstLen-1 );

dstmain[dstLen-1] = 0;

unsigned long dst4_2;

int dstLen_2 = (dstLen - 1 - 8) / 2 + 1;

unsigned char* dstmain_2 = (unsigned char*)_alloca(dstLen_2);

first(dstmain + (dstLen - 1) - 8, (unsigned char*)&dst4_2, 8);

first(dstmain, dstmain_2, (dstLen - 1) -8);

third(dst4_2, dstmain_2, dstLen_2-1 );

dstmain_2[dstLen_2 - 1] = 0;

printf("Finally: %s",dstmain_2);

_getche();

return 0;

}

Link to comment
Share on other sites

Its customary to add a question.

He may not have any? ... Abstract art ya know LOL

UDFS & Apps:

Spoiler

DDEML.au3 - DDE Client + Server
Localization.au3 - localize your scripts
TLI.au3 - type information on COM objects (TLBINF emulation)
TLBAutoEnum.au3 - auto-import of COM constants (enums)
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector - OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE 

Link to comment
Share on other sites

Was that food for Google Translate?

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

That's precisely what I said: we are not Google Translate!

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

You see, posting the exact same request on every AutoIt board in the world won't forcibly help...

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...