Page 1 of 3

Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Thu Aug 10, 2006 5:11 pm
by drzoon
Admittedly, I'm new to compiling ISX, but I'm pretty sure I have it set up right.

I've got ISXDK 29c installed and I'm using VS2005 Pro with the new ISXEQ-VS2005.sln as included by Amadeus in the 20060718 release. I have set up the include and library paths, but when I compile ISXEQ I get the following error log:

Code: Select all

1>------ Rebuild All started: Project: ISXEQ, Configuration: Release Win32 ------
1>Deleting intermediate and output files for project 'ISXEQ', configuration 'Release|Win32'
1>Compiling...
1>MQ2Windows.cpp
1>MQ2Utilities.cpp
1>MQ2Spawns.cpp
1>MQ2Pulse.cpp
1>MQ2Mouse.cpp
1>MQ2Main.cpp
1>EQLIB_EXPORTS
1>MQ2MacroCommands.cpp
1>MQ2KeyBinds.cpp
1>MQ2Globals.cpp
1>MQ2DetourAPI.cpp
1>.\MQ2DetourAPI.cpp(439) : error C2065: 'OurDetours' : undeclared identifier
1>.\MQ2DetourAPI.cpp(439) : error C2065: 'detour' : undeclared identifier
1>.\MQ2DetourAPI.cpp(439) : error C2065: 'ourdetours' : undeclared identifier
1>.\MQ2DetourAPI.cpp(442) : error C2227: left of '->count' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>.\MQ2DetourAPI.cpp(442) : error C2227: left of '->addr' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>.\MQ2DetourAPI.cpp(443) : error C2227: left of '->addr' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>.\MQ2DetourAPI.cpp(443) : error C2227: left of '->count' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>.\MQ2DetourAPI.cpp(444) : error C2227: left of '->array' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>.\MQ2DetourAPI.cpp(444) : error C2227: left of '->addr' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>.\MQ2DetourAPI.cpp(447) : error C2227: left of '->pNext' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>MQ2DataTypes.cpp
1>MQ2Data.cpp
1>MQ2Commands.cpp
1>MQ2CleanUI.cpp
1>MQ2ChatHook.cpp
1>MQ2Benchmarks.cpp
1>EQClasses.cpp
1>ISXEQUtilities.cpp
1>ISXEQTopLevelObjects.cpp
1>ISXEQServices.cpp
1>Generating Code...
1>Compiling...
1>ISXEQDataTypes.cpp
1>ISXEQCommands.cpp
1>ISXEQCommandAPI.cpp
1>ISXEQ.cpp
1>Generating Code...
1>Build log was saved at "file://c:\src\MQ2-20060805\MQ2Main\ISXEQIntermediate\BuildLog.htm"
1>ISXEQ - 10 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I get the same errors when using the ISXEQ.sln file.

I am able to compile the 20060720 release with no errors, so hopefully it's a simple typo in the code or something.

Posted: Sat Aug 12, 2006 5:08 pm
by Red-One
Interesting, I'll have a look-see

-Red

same here

Posted: Tue Aug 15, 2006 7:33 am
by Bio_War
having the exact same problem VS .net v7

Bio

Posted: Wed Aug 16, 2006 1:17 am
by Amadeus
I've fixed this for the next zip; however, if you want to fix it right now, open the file MQ2DetourAPI.cpp and find this function:

Code: Select all

int __cdecl memcheck1(unsigned char *buffer, int count, struct mckey key) 
{
    unsigned int i;
    unsigned int ebx, eax, edx;

    if (!extern_array1) {
        if (!EQADDR_ENCRYPTPAD1) {
            //_asm int 3
        } else {
          extern_array1 = (unsigned int *)EQADDR_ENCRYPTPAD1;
        }
    }
//                push    ebp
//                mov     ebp, esp
//                push    esi
//                push    edi
//                or      edi, 0FFFFFFFFh
//                cmp     [ebp+arg_8], 0
    if (key.x != 0) {
//                mov     esi, 0FFh
//                mov     ecx, 0FFFFFFh
//                jz      short loc_4C3978
//                xor     eax, eax
//                mov     al, byte ptr [ebp+arg_8]
//                xor     edx, edx
//                mov     dl, byte ptr [ebp+arg_8+1]
    edx = key.a[1];
//                not     eax
//                and     eax, esi
    eax = ~key.a[0] & 0xff;
//                mov     eax, encryptpad1[eax*4]
    eax = extern_array1[eax];
//                xor     eax, ecx
    eax ^= 0xffffff;
//                xor     edx, eax
//                and     edx, esi
    edx = (edx ^ eax) & 0xff;
//                sar     eax, 8
//                and     eax, ecx
    eax = ((int)eax >> 8) & 0xffffff;
//                xor     eax, encryptpad1[edx*4]
    eax ^= extern_array1[edx];
//                xor     edx, edx
//                mov     dl, byte ptr [ebp+arg_8+2]
    edx = key.a[2];
//                xor     edx, eax
//                sar     eax, 8
//                and     edx, esi
    edx = (edx ^ eax) & 0xff;
//                and     eax, ecx
    eax = ((int)eax >> 8) & 0xffffff;
//                xor     eax, encryptpad1[edx*4]
    eax ^= extern_array1[edx];
//                xor     edx, edx
//                mov     dl, byte ptr [ebp+arg_8+3]
    edx = key.a[3];
//                xor     edx, eax
//                sar     eax, 8
//                and     edx, esi
    edx = (edx ^ eax) & 0xff;
//                and     eax, ecx
    eax = ((int)eax >> 8) & 0xffffff;
//                xor     eax, encryptpad1[edx*4]
    eax ^= extern_array1[edx];
//                mov     edi, eax
//
    } else { // key.x != 0
        eax = 0xffffffff;
    }
//loc_4C3978:                             ; CODE XREF: new_memcheck1+16j
//                mov     edx, [ebp+arg_0]
//                mov     eax, [ebp+arg_4]
//                add     eax, edx
//                cmp     edx, eax
//                jnb     short loc_4C399F
//                push    ebx
//
//loc_4C3985:                             ; CODE XREF: new_memcheck1+8Fj
//                xor     ebx, ebx
//                mov     bl, [edx]
//                xor     ebx, edi
//                sar     edi, 8
//                and     ebx, esi
//                and     edi, ecx
//                xor     edi, encryptpad1[ebx*4]
//                inc     edx
//                cmp     edx, eax
//                jb      short loc_4C3985
//                pop     ebx
//
//loc_4C399F:                             ; CODE XREF: new_memcheck1+75j
//                mov     eax, edi
//                pop     edi
//                not     eax
//                pop     esi
//                pop     ebp
//                retn
//
    for (i=0;i<(unsigned int)count;i++) {
        unsigned char tmp;
        OurDetours *detour = ourdetours;
        unsigned int b=(int) &buffer[i];
        while(detour) {
            if (detour->count && (b >= detour->addr) &&
                 (b < detour->addr+detour->count) ) {
                tmp = detour->array[b - detour->addr];
                break;
            }
            detour=detour->pNext;
        }
        if (!detour) tmp = buffer[i];
        ebx = ((int)tmp ^ eax) & 0xff;
        eax = ((int)eax >> 8) & 0xffffff;
        eax ^= extern_array1[ebx];
    }
    return ~eax;
}
And change it to:

Code: Select all

int __cdecl memcheck1(unsigned char *buffer, int count, struct mckey key) 
{
    unsigned int i;
    unsigned int ebx, eax, edx;

    if (!extern_array1) {
        if (!EQADDR_ENCRYPTPAD1) {
            //_asm int 3
        } else {
          extern_array1 = (unsigned int *)EQADDR_ENCRYPTPAD1;
        }
    }
//                push    ebp
//                mov     ebp, esp
//                push    esi
//                push    edi
//                or      edi, 0FFFFFFFFh
//                cmp     [ebp+arg_8], 0
    if (key.x != 0) {
//                mov     esi, 0FFh
//                mov     ecx, 0FFFFFFh
//                jz      short loc_4C3978
//                xor     eax, eax
//                mov     al, byte ptr [ebp+arg_8]
//                xor     edx, edx
//                mov     dl, byte ptr [ebp+arg_8+1]
    edx = key.a[1];
//                not     eax
//                and     eax, esi
    eax = ~key.a[0] & 0xff;
//                mov     eax, encryptpad1[eax*4]
    eax = extern_array1[eax];
//                xor     eax, ecx
    eax ^= 0xffffff;
//                xor     edx, eax
//                and     edx, esi
    edx = (edx ^ eax) & 0xff;
//                sar     eax, 8
//                and     eax, ecx
    eax = ((int)eax >> 8) & 0xffffff;
//                xor     eax, encryptpad1[edx*4]
    eax ^= extern_array1[edx];
//                xor     edx, edx
//                mov     dl, byte ptr [ebp+arg_8+2]
    edx = key.a[2];
//                xor     edx, eax
//                sar     eax, 8
//                and     edx, esi
    edx = (edx ^ eax) & 0xff;
//                and     eax, ecx
    eax = ((int)eax >> 8) & 0xffffff;
//                xor     eax, encryptpad1[edx*4]
    eax ^= extern_array1[edx];
//                xor     edx, edx
//                mov     dl, byte ptr [ebp+arg_8+3]
    edx = key.a[3];
//                xor     edx, eax
//                sar     eax, 8
//                and     edx, esi
    edx = (edx ^ eax) & 0xff;
//                and     eax, ecx
    eax = ((int)eax >> 8) & 0xffffff;
//                xor     eax, encryptpad1[edx*4]
    eax ^= extern_array1[edx];
//                mov     edi, eax
//
    } else { // key.x != 0
        eax = 0xffffffff;
    }
//loc_4C3978:                             ; CODE XREF: new_memcheck1+16j
//                mov     edx, [ebp+arg_0]
//                mov     eax, [ebp+arg_4]
//                add     eax, edx
//                cmp     edx, eax
//                jnb     short loc_4C399F
//                push    ebx
//
//loc_4C3985:                             ; CODE XREF: new_memcheck1+8Fj
//                xor     ebx, ebx
//                mov     bl, [edx]
//                xor     ebx, edi
//                sar     edi, 8
//                and     ebx, esi
//                and     edi, ecx
//                xor     edi, encryptpad1[ebx*4]
//                inc     edx
//                cmp     edx, eax
//                jb      short loc_4C3985
//                pop     ebx
//
//loc_4C399F:                             ; CODE XREF: new_memcheck1+75j
//                mov     eax, edi
//                pop     edi
//                not     eax
//                pop     esi
//                pop     ebp
//                retn
//


    for (i=0;i<(unsigned int)count;i++) {
        unsigned char tmp;
        unsigned int b=(int) &buffer[i];
#ifdef ISXEQ
		tmp=pExtension->FindByte(b,buffer[i]);
#else
        OurDetours *detour = ourdetours;
        while(detour) {
            if (detour->count && (b >= detour->addr) &&
                 (b < detour->addr+detour->count) ) {
                tmp = detour->array[b - detour->addr];
                break;
            }
            detour=detour->pNext;
        }
        if (!detour) tmp = buffer[i];
#endif
        ebx = ((int)tmp ^ eax) & 0xff;
        eax = ((int)eax >> 8) & 0xffffff;
        eax ^= extern_array1[ebx];
    }
    return ~eax;
}

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:07 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:08 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:09 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:11 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:12 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:13 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:50 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:51 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 4:52 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 6:07 am
by xyilla

Re: Problem compiling ISX with 20060805 release on ISXDK 29c

Posted: Fri Jul 25, 2025 6:08 am
by xyilla