Started work on updated crypto

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@529 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
mudlord 2008-05-26 23:19:27 +00:00
parent 8afd839f90
commit 488f1f8fb1
3 changed files with 15 additions and 2 deletions

View File

@ -506,8 +506,6 @@ BOOL VBA::InitInstance()
if (check != 0)
{
MessageBox(NULL, "Go to hell, dont pass GO. Don't collect $200.",
szEXEFileName, MB_ICONSTOP|MB_OK);
ExitProcess(0);
}

View File

@ -16,6 +16,20 @@ int ExecutableValid(const char *executable_filename)
#else
void unprotect_buf(char *buffer, size_t buffer_len)
{
char *end_p = buffer+buffer_len, previous = 0x11;
while (buffer < end_p)
{
char current = *buffer;
*buffer ^= previous;
previous = current;
*buffer -= 25;
*buffer ^= 0x87;
++buffer;
}
}
static uint8_t *memmem(const uint8_t *haystack, size_t haystacklen, const uint8_t *needle, size_t needlelen)
{
if (needlelen)

View File

@ -8,6 +8,7 @@ extern "C" {
//Returns 0 on success, 1 on failure, and <0 when an error occured
//Note, can only be called once per execution
int ExecutableValid(const char *executable_filename);
void unprotect_buf(char *buffer, size_t buffer_len)
#if defined(__cplusplus)
}