1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[RenderEdge] Memory Hack

Discussion in 'The Lab' started by ENAleksey, Oct 9, 2017.

  1. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Basic version | Experimental version | Widescreen Fix

    Current version v1.0.5a

    Introduction



    War3 2017-12-12 14-48-57-81.png
    Now it's possible to edit the standard interface of Warcraft without the need to inject third-party libraries.

    Requirements:


    Code



    Memory Hack
    Typecast
    Code (vJASS):
    native MergeUnits    takes integer qty, integer a, integer b, integer make returns boolean
    native ConvertUnits takes integer qty, integer id returns boolean
    native IgnoredUnits takes integer unitid returns integer

    library Typecast
    //! nocjass
        globals
            code Code //This is not used, it's here just to fool Jasshelper
            code l__Code
            integer Int //This is not used, it's here just to fool Jasshelper
            integer l__Int
            string Str //This is not used, it's here just to fool Jasshelper
            string l__Str
            boolean Bool //This is not used, it's here just to fool Jasshelper
            boolean l__Bool
            trigger Trig //This is not used, it's here just to fool Jasshelper
            trigger l__Trig
     
            integer Array
            integer array l__Array
            integer bytecode
            integer array l__bytecode
            integer array Memory
            integer bytecodedata //used to pass data between regular code and bytecode
        endglobals

        function InitArray takes integer vtable returns nothing
            set l__Array[4] = 0
            set l__Array[1] = vtable
            set l__Array[2] = -1
            set l__Array[3] = -1
        endfunction

        function TypecastArray takes nothing returns nothing
            local integer Array //typecast Array to integer
        endfunction

        //# +nosemanticerror
        function GetArrayAddress takes nothing returns integer //not really needed
            return l__Array
            return 0
        endfunction


        function setCode takes code c returns nothing
            set l__Code = c
            return //Prevents Jasshelper from inlining this function
        endfunction

        function setInt takes integer i returns nothing
            set l__Int = i
            return //Prevents JassHelper from inlining this function
        endfunction

        function setStr takes string s returns nothing
            set l__Str = s
            return //Prevents JassHelper from inlining this function
        endfunction

        function setBool takes boolean b returns nothing
            set l__Bool = b
            return //Prevents Jasshelper from inlining this function
        endfunction
     
        function setTrig takes trigger t returns nothing
            set l__Trig = t
            return //Prevents Jasshelper from inlining this function
        endfunction

        private function Typecast1 takes nothing returns nothing
            local integer Code //Jasshelper will implicitly rename this to l__Code
            local code Int     //Jasshelper will implicitly rename this to l__Int
        endfunction

        //# +nosemanticerror
        function C2I takes code c returns integer
            call setCode(c)
            return l__Code
        endfunction

        //# +nosemanticerror
        function I2C takes integer i returns code
            call setInt(i)
            return l__Int
        endfunction

        private function Typecast2 takes nothing returns nothing
            local integer Str //Jasshelper will implicitly rename this to l__Str
            local string Int   //Jasshelper will implicitly rename this to l__Int
        endfunction

        //# +nosemanticerror
        function SH2I takes string s returns integer
            call setStr(s)
            return l__Str
        endfunction

        //# +nosemanticerror
        function I2SH takes integer i returns string
            call setInt(i)
            return l__Int
        endfunction

        private function Typecast3 takes nothing returns nothing
            local integer Bool //Jasshelper will implicitly rename this to l__Bool
            local boolean Int  //Jasshelper will implicitly rename this to l__Int
        endfunction

        //# +nosemanticerror
        function B2I takes boolean b returns integer
            call setBool(b)
            return l__Bool
        endfunction

        //# +nosemanticerror
        function I2B takes integer i returns boolean
            call setInt(i)
            return l__Int
        endfunction
     
        private function Typecast4 takes nothing returns nothing
            local integer Trig //Jasshelper will implicitly rename this to l__Trig
            local trigger Int  //Jasshelper will implicitly rename this to l__Int
        endfunction
     
        //# +nosemanticerror
        function T2I takes trigger t returns integer
            call setTrig(t)
            return l__Trig
        endfunction
     
        //# +nosemanticerror
        function I2T takes integer i returns trigger
            call setInt(i)
            return l__Int
        endfunction

     
        //# +nosemanticerror
        function realToIndex takes real r returns integer
            return r
        endfunction

        function cleanInt takes integer i returns integer
            return i
        endfunction

        //# +nosemanticerror
        function indexToReal takes integer i returns real
            return i
        endfunction

        function cleanReal takes real r returns real
            return r
        endfunction
     
     
        function GetRealFromMemory takes integer i returns real
            return cleanReal(indexToReal(i))
        endfunction
     
        function SetRealIntoMemory takes real r returns integer
            return cleanInt(realToIndex(r))
        endfunction

     
        function ReadMemory takes integer address returns integer
            return Memory[address/4] //Inline-friendly
        endfunction

        function WriteMemory takes integer address, integer value returns nothing
            set Memory[address/4] = value //Inline-friendly
        endfunction

        function InitBytecode takes integer id, integer k returns nothing
            set l__bytecode[0] = 0x0C010900     //op: 0C(LITERAL), type: 09(integer array), reg: 01,
            set l__bytecode[1] = k                 //value: 0x2114D008
            set l__bytecode[2] = 0x11010000     //op: 11(SETVAR), reg: 01
            set l__bytecode[3] = id                //id of variable udg_Memory
            set l__bytecode[4] = 0x0C010400     //op: 0C(LITERAL), type: 04(integer), reg: 01, value: 0
            set l__bytecode[6] = 0x27000000     //op: 27(RETURN)

            set l__bytecode[8] = 0x07090000     //op: 07(GLOBAL), type: 09 (integer array) //Create new array
            set l__bytecode[9] = 0x0C5F         //name: C5F(?stand?)
            set l__bytecode[10] = 0x0E010400     //op: 0E(GETVAR), type: 04(integer), reg: 01 //Obtain the desired amount of bytes
            set l__bytecode[11] = id+1            //id of variable bytecodedata (variable ids are sequential)
            set l__bytecode[12] = 0x12010100     //op: 12(SETARRAY), index=reg01, value=reg01 //Set index of the array, forcing allocation of udg_Memory
            set l__bytecode[13] = 0x0C5F         //name: C5F(?stand?)
            set l__bytecode[14] = 0x0E010400     //op: 0E(GETVAR), type: 04(integer), reg: 01 //Read array variable as an integer
            set l__bytecode[15] = 0x0C5F         //name: C5F(?stand?)
            set l__bytecode[16] = 0x11010000     //op: 11(SETVAR), reg: 01 //pass the value to the jass world
            set l__bytecode[17] = id+1            //id of variable bytecodedata
            set l__bytecode[18] = 0x27000000     //op: 27(RETURN)
        endfunction
               
        function Typecast takes nothing returns nothing
            local integer bytecode
        endfunction

        //# +nosemanticerror
        function GetBytecodeAddress takes nothing returns integer
            return l__bytecode
            return 0
        endfunction

        function NewGlobal takes nothing returns integer
            return -0x0C5F0704 //op: 07(GLOBAL), type: 04(integer), name: 0x0C5F("stand")
            return 0x2700 //op: 27(RETURN)
        endfunction

        function SetGlobal takes nothing returns nothing
            //This will actually set the value of the global variable, not the local
            local integer stand = 0x2114D008
        endfunction

        //# +nosemanticerror
        function UnlockMemory takes nothing returns nothing
            local integer array stand //The execution of this line is skipped
            call ForForce(bj_FORCE_PLAYER[0], I2C(2 + C2I(function NewGlobal)))
            call ForForce(bj_FORCE_PLAYER[0], I2C(8 + C2I(function SetGlobal)))
            call InitArray(0)
            call InitArray(stand[GetArrayAddress()/4])
            call InitBytecode(stand[C2I(function ReadMemory)/4 + 13], stand[GetArrayAddress()/4 + 3 ] + 4) //obtain the id of variable "Memory"
            call ForForce(bj_FORCE_PLAYER[0], I2C(stand[GetBytecodeAddress()/4 + 3])) //run bytecode from the array (crashes while map saving)
        endfunction
     
        function WriteRealMemory takes integer addr, integer val returns nothing
            if (addr/4*4 != addr) then
                call BJDebugMsg("WriteMemory WARNING! : " + I2S(addr))
                //call WriteRealMemory_FIX(addr,val)
            else
                set Memory[addr/4] = val
            endif
        endfunction

        function ReadRealMemory takes integer addr returns integer
            if (addr/4*4 != addr) then
                call BJDebugMsg("ReadMemory WARNING! : " + I2S(addr))
                //return ReadRealMemory_FIX(addr)
            endif
            return Memory[addr/4]
        endfunction
    //! endnocjass
    endlibrary
    Memory
    Code (vJASS):
    library Memory initializer Init uses Typecast

        globals
            integer address_GameBase
            integer address_GameState
     
            integer array RJassNativesBuffer
            integer RJassNativesBufferSize = 0
     
            integer address_VirtualAlloc = 0
            integer address_JassEnvironment = 0
            integer address_IgnoredUnits = 0
            integer address_IgnoredUnitsOffset = 0
            integer address_MergeUnits = 0
            integer address_MergeUnitsOffset = 0
        endglobals

     
        function GetJassContext takes integer id returns integer
            return Memory[Memory[Memory[Memory[address_JassEnvironment]/4 + 5]/4 + 36]/4 + id]
        endfunction

        function GetStringAddress takes string s returns integer
            return Memory[Memory[Memory[Memory[GetJassContext(1)/4 + 2589]/4 + 2]/4 + SH2I(s)*4 + 2]/4 + 7]
        endfunction
     
     
        function ReadRealPointer1LVL takes integer addr, integer offset1 returns integer
            local integer retval = 0
            if addr > 0 then
                set retval = ReadRealMemory(addr)
                if addr > 0 then
                    set retval = ReadRealMemory(retval + offset1)
                else
                    set retval = 0
                endif
            endif
            return retval
        endfunction

        function ReadRealPointer2LVL takes integer addr, integer offset1, integer offset2 returns integer
            local integer retval = ReadRealPointer1LVL(addr,offset1)
            if retval > 0 then
                set retval = ReadRealMemory(retval + offset2)
            else
                set retval = 0
            endif
            return retval
        endfunction

        function CreateJassNativeHook takes integer oldaddress, integer newaddress returns integer
            local integer FirstAddress = ReadRealPointer2LVL(address_JassEnvironment*4, 0x14, 0x20)
            local integer NextAddress = FirstAddress
            local integer i = 0
     
            if RJassNativesBufferSize > 0 then
                loop
                    set i = i + 1
           
                    if RJassNativesBuffer[  i * 3 - 3 ] == oldaddress or RJassNativesBuffer[ i * 3 - 2 ] == oldaddress or RJassNativesBuffer[  i * 3 - 3 ] == newaddress or RJassNativesBuffer[  i * 3 - 2 ] == newaddress then
                        call WriteRealMemory(RJassNativesBuffer[ i  * 3 - 1 ], newaddress)
                        return RJassNativesBuffer[ i * 3 - 1 ]
                    endif
           
                    exitwhen i == RJassNativesBufferSize
                endloop
            endif
     
            loop
                if ReadRealMemory(NextAddress+12) < 0x3000 then
                    return 0
                endif
                if ReadRealMemory(NextAddress+12) == oldaddress then
                    call WriteRealMemory(NextAddress+12, newaddress)
           
                    if RJassNativesBufferSize < 100 then
                        set RJassNativesBufferSize = RJassNativesBufferSize + 1
                        set RJassNativesBuffer[ RJassNativesBufferSize  * 3 - 1 ] = NextAddress + 12
                        set RJassNativesBuffer[ RJassNativesBufferSize  * 3 - 2 ] = oldaddress
                        set RJassNativesBuffer[ RJassNativesBufferSize  * 3 - 3 ] = newaddress
                    endif
           
                    return NextAddress+12
                endif
       
                set NextAddress = ReadRealMemory(NextAddress)
                if NextAddress == FirstAddress or NextAddress == 0 then
                    return 0
                endif
            endloop
            return 0
        endfunction

     
        private function Init takes nothing returns nothing
            local integer i = 0
            local integer bytecodeAddress = 0
            call ForForce(bj_FORCE_PLAYER[0], I2C(8 + C2I(function UnlockMemory)))
            set bytecodeAddress = GetBytecodeAddress()
            set i = Memory[bytecodeAddress/4]
            set i = i - Memory[i/4]
     
            if i == 5205600 then // 1.26a
                set address_GameBase = ReadRealMemory(bytecodeAddress) - 0x951060
                set address_GameState = (address_GameBase + 0xAB65F4) / 4
                set address_JassEnvironment = (address_GameBase + 0xADA848) / 4
                set address_VirtualAlloc = (address_GameBase + 0x86D0F4) / 4
                set address_MergeUnits = address_GameBase + 0x2DD320
                set address_IgnoredUnits = address_GameBase + 0x2DCE80
            else
                call DisplayTextToPlayer(GetLocalPlayer(), 0.0, 0.0, "Unsupported version!")
            endif
        endfunction

    endlibrary
    FpCall
    Code (vJASS):
    library FpCall initializer Init uses Memory

       globals
           //integer pReservedExecutableMemory0 = 0
           integer pReservedExecutableMemory = 0
       endglobals

     
       function fast_call1 takes integer pFuncFastcallAddr, integer arg1 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0xB9F68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg1)
           call WriteRealMemory(pReservedExecutableMemory+8, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+16, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function fast_call takes integer pFuncFastcallAddr returns integer
           return fast_call1(pFuncFastcallAddr, 0)
       endfunction

       function fast_call2 takes integer pFuncFastcallAddr, integer arg1, integer arg2 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0xBAF68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg2)
           call WriteRealMemory(pReservedExecutableMemory+8, 0xB9F68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, arg1)
           call WriteRealMemory(pReservedExecutableMemory+16, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+20, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+24, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function fast_call3 takes integer pFuncFastcallAddr, integer arg1, integer arg2, integer arg3 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68F68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg3)
           call WriteRealMemory(pReservedExecutableMemory+8, 0xBAF68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, arg2)
           call WriteRealMemory(pReservedExecutableMemory+16, 0xB9F68B90)
           call WriteRealMemory(pReservedExecutableMemory+20, arg1)
           call WriteRealMemory(pReservedExecutableMemory+24, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+28, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+32, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function fast_call4 takes integer pFuncFastcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68F68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg4)
           call WriteRealMemory(pReservedExecutableMemory+8, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, arg3)
           call WriteRealMemory(pReservedExecutableMemory+16, 0xBAF68B90)
           call WriteRealMemory(pReservedExecutableMemory+20, arg2)
           call WriteRealMemory(pReservedExecutableMemory+24, 0xB9F68B90)
           call WriteRealMemory(pReservedExecutableMemory+28, arg1)
           call WriteRealMemory(pReservedExecutableMemory+32, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+36, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+40, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function fast_call5 takes integer pFuncFastcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68F68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg5)
           call WriteRealMemory(pReservedExecutableMemory+8, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, arg4)
           call WriteRealMemory(pReservedExecutableMemory+16, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+20, arg3)
           call WriteRealMemory(pReservedExecutableMemory+24, 0xBAF68B90)
           call WriteRealMemory(pReservedExecutableMemory+28, arg2)
           call WriteRealMemory(pReservedExecutableMemory+32, 0xB9F68B90)
           call WriteRealMemory(pReservedExecutableMemory+36, arg1)
           call WriteRealMemory(pReservedExecutableMemory+40, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+44, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+48, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function fast_call6 takes integer pFuncFastcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5, integer arg6 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68F68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg6)
           call WriteRealMemory(pReservedExecutableMemory+8, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, arg5)
           call WriteRealMemory(pReservedExecutableMemory+16, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+20, arg4)
           call WriteRealMemory(pReservedExecutableMemory+24, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+28, arg3)
           call WriteRealMemory(pReservedExecutableMemory+32, 0xBAF68B90)
           call WriteRealMemory(pReservedExecutableMemory+36, arg2)
           call WriteRealMemory(pReservedExecutableMemory+40, 0xB9F68B90)
           call WriteRealMemory(pReservedExecutableMemory+44, arg1)
           call WriteRealMemory(pReservedExecutableMemory+48, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+52, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+56, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function fast_call7 takes integer pFuncFastcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5, integer arg6, integer arg7 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68F68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg7)
           call WriteRealMemory(pReservedExecutableMemory+8, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, arg6)
           call WriteRealMemory(pReservedExecutableMemory+16, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+20, arg5)
           call WriteRealMemory(pReservedExecutableMemory+24, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+28, arg4)
           call WriteRealMemory(pReservedExecutableMemory+32, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+36, arg3)
           call WriteRealMemory(pReservedExecutableMemory+40, 0xBAF68B90)
           call WriteRealMemory(pReservedExecutableMemory+44, arg2)
           call WriteRealMemory(pReservedExecutableMemory+48, 0xB9F68B90)
           call WriteRealMemory(pReservedExecutableMemory+52, arg1)
           call WriteRealMemory(pReservedExecutableMemory+56, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+60, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+64, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function fast_call8 takes integer pFuncFastcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5, integer arg6, integer arg7, integer arg8 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68F68B56)
           call WriteRealMemory(pReservedExecutableMemory+4, arg8)
           call WriteRealMemory(pReservedExecutableMemory+8, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+12, arg7)
           call WriteRealMemory(pReservedExecutableMemory+16, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+20, arg6)
           call WriteRealMemory(pReservedExecutableMemory+24, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+28, arg5)
           call WriteRealMemory(pReservedExecutableMemory+32, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+36, arg4)
           call WriteRealMemory(pReservedExecutableMemory+40, 0x68F68B90)
           call WriteRealMemory(pReservedExecutableMemory+44, arg3)
           call WriteRealMemory(pReservedExecutableMemory+48, 0xBAF68B90)
           call WriteRealMemory(pReservedExecutableMemory+52, arg2)
           call WriteRealMemory(pReservedExecutableMemory+56, 0xB9F68B90)
           call WriteRealMemory(pReservedExecutableMemory+60, arg1)
           call WriteRealMemory(pReservedExecutableMemory+64, 0xBEF68B90)
           call WriteRealMemory(pReservedExecutableMemory+68, pFuncFastcallAddr)
           call WriteRealMemory(pReservedExecutableMemory+72, 0xC35ED6FF)
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset, pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction

     
       function this_call1 takes integer pFuncThiscallAddr, integer arg1 returns integer
           return fast_call2(pFuncThiscallAddr, arg1, 0)
       endfunction
     
       function this_call2 takes integer pFuncThiscallAddr, integer arg1, integer arg2 returns integer
           return fast_call3(pFuncThiscallAddr, arg1, 0, arg2)
       endfunction
     
       function this_call3 takes integer pFuncThiscallAddr, integer arg1, integer arg2, integer arg3 returns integer
           return fast_call4(pFuncThiscallAddr, arg1, 0, arg2, arg3)
       endfunction
     
       function this_call4 takes integer pFuncThiscallAddr, integer arg1, integer arg2, integer arg3, integer arg4 returns integer
           return fast_call5(pFuncThiscallAddr, arg1, 0, arg2, arg3, arg4)
       endfunction
     
       function this_call5 takes integer pFuncThiscallAddr, integer arg1, integer arg2, integer arg3, integer arg4, integer arg5 returns integer
           return fast_call6(pFuncThiscallAddr, arg1, 0, arg2, arg3, arg4, arg5)
       endfunction
     
       function this_call6 takes integer pFuncThiscallAddr, integer arg1, integer arg2, integer arg3, integer arg4, integer arg5, integer arg6 returns integer
           return fast_call7(pFuncThiscallAddr, arg1, 0, arg2, arg3, arg4, arg5, arg6)
       endfunction
     
       function this_call7 takes integer pFuncThiscallAddr, integer arg1, integer arg2, integer arg3, integer arg4, integer arg5, integer arg6, integer arg7 returns integer
           return fast_call8(pFuncThiscallAddr, arg1, 0, arg2, arg3, arg4, arg5, arg6, arg7)
       endfunction


       function std_call1 takes integer pFuncStdcallAddr, integer arg1 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+8, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+12, pFuncStdcallAddr) // mov ecx, pFuncStdcallAddr
           call WriteRealMemory(pReservedExecutableMemory+16, 0xC359D1FF) // call ecx, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function std_call takes integer pFuncStdcallAddr returns integer
           return std_call1(pFuncStdcallAddr, 0)
       endfunction
     
       function std_call2 takes integer pFuncStdcallAddr, integer arg1, integer arg2 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+16, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+20, pFuncStdcallAddr) // mov ecx, pFuncStdcallAddr
           call WriteRealMemory(pReservedExecutableMemory+24, 0xC359D1FF) // call ecx, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function std_call3 takes integer pFuncStdcallAddr, integer arg1, integer arg2, integer arg3 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+24, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+28, pFuncStdcallAddr) // mov ecx, pFuncStdcallAddr
           call WriteRealMemory(pReservedExecutableMemory+32, 0xC359D1FF) // call ecx, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function std_call4 takes integer pFuncStdcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg4) // push arg4
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+24, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+28, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+32, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+36, pFuncStdcallAddr) // mov ecx, pFuncStdcallAddr
           call WriteRealMemory(pReservedExecutableMemory+40, 0xC359D1FF) // call ecx, pop ecx, ret
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function std_call5 takes integer pFuncStdcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5 returns integer
           local integer pOffset1
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg5) // push arg5
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg4) // push arg4
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+24, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+28, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+32, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+36, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+40, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+44, pFuncStdcallAddr) // mov ecx, pFuncStdcallAddr
           call WriteRealMemory(pReservedExecutableMemory+48, 0xC359D1FF) // call ecx, pop ecx, ret
         
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function std_call6 takes integer pFuncStdcallAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5 , integer arg6 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg6) // push arg6
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg5) // push arg5
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg4) // push arg4
           call WriteRealMemory(pReservedExecutableMemory+24, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+28, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+32, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+36, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+40, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+44, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+48, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+52, pFuncStdcallAddr) // mov ecx, pFuncStdcallAddr
           call WriteRealMemory(pReservedExecutableMemory+56, 0xC359D1FF) // call ecx, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
     
       function c_call1 takes integer pFuncCdeclAddr, integer arg1 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+8, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+12, pFuncCdeclAddr) // mov ecx, pFuncCdeclAddr
           call WriteRealMemory(pReservedExecutableMemory+16, 0xC483D1FF) // call ecx, add esp,
           call WriteRealMemory(pReservedExecutableMemory+20, 0xCCC35904) // 4, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function c_call2 takes integer pFuncCdeclAddr, integer arg1, integer arg2 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+16, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+20, pFuncCdeclAddr) // mov ecx, pFuncCdeclAddr
           call WriteRealMemory(pReservedExecutableMemory+24, 0xC483D1FF) // call ecx, add esp,
           call WriteRealMemory(pReservedExecutableMemory+28, 0xCCC35908) // 4, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function c_call3 takes integer pFuncCdeclAddr, integer arg1, integer arg2, integer arg3 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+24, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+28, pFuncCdeclAddr) // mov ecx, pFuncCdeclAddr
           call WriteRealMemory(pReservedExecutableMemory+32, 0xC483D1FF) // call ecx, add esp,
           call WriteRealMemory(pReservedExecutableMemory+36, 0xCCC3590C) // 4, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function c_call4 takes integer pFuncCdeclAddr, integer arg1, integer arg2, integer arg3 , integer arg4 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg4) // push arg4
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+24, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+28, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+32, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+36, pFuncCdeclAddr) // mov ecx, pFuncCdeclAddr
           call WriteRealMemory(pReservedExecutableMemory+40, 0xC483D1FF) // call ecx, add esp,
           call WriteRealMemory(pReservedExecutableMemory+44, 0xCCC35910) // 4, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function c_call5 takes integer pFuncCdeclAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg5) // push arg5
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg4) // push arg4
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+24, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+28, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+32, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+36, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+40, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+44, pFuncCdeclAddr) // mov ecx, pFuncCdeclAddr
           call WriteRealMemory(pReservedExecutableMemory+48, 0xC483D1FF) // call ecx, add esp,
           call WriteRealMemory(pReservedExecutableMemory+52, 0xCCC35914) // 4, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
       function c_call6 takes integer pFuncCdeclAddr, integer arg1, integer arg2, integer arg3 , integer arg4, integer arg5 , integer arg6 returns integer
           local integer pOffset1
         
           call WriteRealMemory(pReservedExecutableMemory, 0x68C98B51) // push ecx. mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+4, arg6) // push arg6
           call WriteRealMemory(pReservedExecutableMemory+8, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+12, arg5) // push arg5
           call WriteRealMemory(pReservedExecutableMemory+16, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+20, arg4) // push arg4
           call WriteRealMemory(pReservedExecutableMemory+24, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+28, arg3) // push arg3
           call WriteRealMemory(pReservedExecutableMemory+32, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+36, arg2) // push arg2
           call WriteRealMemory(pReservedExecutableMemory+40, 0x6890C98B) //  mov ecx,ecx
           call WriteRealMemory(pReservedExecutableMemory+44, arg1) // push arg1
           call WriteRealMemory(pReservedExecutableMemory+48, 0xB990C98B) // mov ecx,ecx , nop
           call WriteRealMemory(pReservedExecutableMemory+52, pFuncCdeclAddr) // mov ecx, pFuncCdeclAddr
           call WriteRealMemory(pReservedExecutableMemory+56, 0xC483D1FF) // call ecx, add esp,
           call WriteRealMemory(pReservedExecutableMemory+60, 0xCCC35918) // 4, pop ecx, ret
         
           if address_IgnoredUnitsOffset == 0 then
               set address_IgnoredUnitsOffset = CreateJassNativeHook(address_IgnoredUnits, pReservedExecutableMemory )
           else
               call WriteRealMemory(address_IgnoredUnitsOffset,pReservedExecutableMemory)
           endif
         
           set pOffset1 = IgnoredUnits(0)
           call WriteRealMemory(address_IgnoredUnitsOffset, address_IgnoredUnits)
           return pOffset1
       endfunction
     
     
       function AllocateExecutableMemory takes integer size returns integer
           local integer retval = 0
           if address_VirtualAlloc != 0 then
               if pReservedExecutableMemory == 0 then
                   if address_MergeUnitsOffset == 0 then
                       set address_MergeUnitsOffset = CreateJassNativeHook(address_MergeUnits, Memory[address_VirtualAlloc] )
                   else
                       call WriteRealMemory(address_MergeUnitsOffset, Memory[address_VirtualAlloc])
                   endif
                   set retval = B2I(MergeUnits(0, size+4, 0x3000, 0x40))
                   call WriteRealMemory(address_MergeUnitsOffset, address_MergeUnits)
                   return retval
               else
                   set retval = std_call4(Memory[address_VirtualAlloc], 0, size+4, 0x3000, 0x40)
               endif
             
           endif
         
           if (retval == 0) then
               return 0
           endif
         
           return (retval + 4) / 4 * 4
       endfunction
     
     
       private function Init takes nothing returns nothing
           //set pReservedExecutableMemory0 = AllocateExecutableMemory(1000)
           set pReservedExecutableMemory = AllocateExecutableMemory(1000)
       endfunction

    endlibrary
    Utils
    Code (vJASS):
    library Utils initializer Init uses Memory, FpCall

        globals
            integer address_ConvertString = 0
            integer address_GameClass2 = 0
        endglobals

     
        function Message takes string msg returns nothing
            call DisplayTextToPlayer(GetLocalPlayer(), 0.0, 0.0, msg)
        endfunction
     
        function ConvertNullTerminatedStringToString takes integer pNullTerminatedString returns string
            return I2SH(this_call1(address_ConvertString, pNullTerminatedString))
        endfunction
     
        function GetMouseEnv takes nothing returns integer
            return Memory[Memory[address_GameClass2]/4 + 0x3BC/4] + 0x310
        endfunction

        function GetMouseTerrainX takes nothing returns real
            return GetRealFromMemory(Memory[GetMouseEnv()/4 + 0])
        endfunction

        function GetMouseTerrainY takes nothing returns real
            return GetRealFromMemory(Memory[GetMouseEnv()/4 + 1])
        endfunction

        function GetMouseTerrainZ takes nothing returns real
            return GetRealFromMemory(Memory[GetMouseEnv()/4 + 2])
        endfunction

     
        private function Init takes nothing returns nothing
            set address_ConvertString = address_GameBase + 0x3BAA20
            set address_GameClass2 = (address_GameBase + 0xAB4F80) / 4
        endfunction
     
    endlibrary

    Systems
    Interface
    Code (vJASS):
    library Interface initializer Init uses FpCall, Utils

       globals
           constant integer ANCHOR_TOPLEFT = 0
           constant integer ANCHOR_TOP = 1
           constant integer ANCHOR_TOPRIGHT = 2
           constant integer ANCHOR_LEFT = 3
           constant integer ANCHOR_CENTER = 4
           constant integer ANCHOR_RIGHT = 5
           constant integer ANCHOR_BOTTOMLEFT = 6
           constant integer ANCHOR_BOTTOM = 7
           constant integer ANCHOR_BOTTOMRIGHT = 8
         
           constant integer FRAME_WorldFrameWar3 = 239
           constant integer FRAME_Minimap = 240
           constant integer FRAME_InfoBar = 241
           constant integer FRAME_CommandBar = 242
           constant integer FRAME_ResourceBarFrame = 243
           constant integer FRAME_UpperButtonBarFrame = 244
           constant integer FRAME_Unknown1 = 245 // ?
           constant integer FRAME_ClickableBlock = 246
           constant integer FRAME_HeroBar = 247
           constant integer FRAME_PeonBar = 248
           constant integer FRAME_Message = 249
           constant integer FRAME_UnitMessage = 250
           constant integer FRAME_ChatMessage = 251
           constant integer FRAME_TopMessage = 252
           constant integer FRAME_Portrait = 253
           constant integer FRAME_TimeOfDayIndicator = 254
           constant integer FRAME_ChatEditBar = 255
           constant integer FRAME_CinematicPanel = 256
           constant integer FRAME_Unknown2 = 257 // ?
           constant integer FRAME_MinimapButton1 = 258
           constant integer FRAME_MinimapButton2 = 259
           constant integer FRAME_MinimapButton3 = 260
           constant integer FRAME_MinimapButton4 = 261
           constant integer FRAME_MinimapButton5 = 262
           constant integer FRAME_FrameB = 263
           constant integer FRAME_MouseBorders = 264
           constant integer FRAME_FrameA = 265
           constant integer FRAME_SimpleConsole = 266
     
           integer address_GetGameUI = 0
           integer address_SetFramePoint = 0
           integer address_SetFramePoint2 = 0
           integer address_SetFrameWidth = 0
           integer address_SetFrameHeight = 0
           integer address_GetFrameTextAddress = 0
           integer address_GetFrameItemAddress = 0
           integer address_GetFrameSkinAddress = 0
           integer address_UpdateFrameText = 0
         
           integer pTooltipFrame = 0
         
           integer pGameUI = 0
       endglobals
     
       // =================================================
     
       function GetGameUI takes integer a1, integer a2 returns integer
           return fast_call2(address_GetGameUI, a1, a2)
       endfunction
     
       function ReadGameUIStruct takes integer element returns integer
           return Memory[pGameUI/4 + element]
       endfunction
     
       function GetRootFrame takes nothing returns integer
           return pGameUI + 180
       endfunction
     
       function SetFramePoint takes integer pFrame, integer point, integer pParentFrame, integer relativePoint, real offsetX, real offsetY returns nothing
           call this_call7(address_SetFramePoint, pFrame, point, pParentFrame, relativePoint, SetRealIntoMemory(offsetX), SetRealIntoMemory(offsetY), 1)
       endfunction
     
       function SetFramePoint2 takes integer pFrame, integer point, real offsetX, real offsetY returns nothing
           call this_call5(address_SetFramePoint2, pFrame, point, SetRealIntoMemory(offsetX), SetRealIntoMemory(offsetY), 1)
       endfunction
     
       function SetFrameWidth takes integer pFrame, real width returns nothing
           call this_call2(address_SetFrameWidth, pFrame, SetRealIntoMemory(width))
       endfunction
     
       function SetFrameHeight takes integer pFrame, real height returns nothing
           call this_call2(address_SetFrameHeight, pFrame, SetRealIntoMemory(height))
       endfunction
     
       function GetFrameWidth takes integer pFrame returns real
           return GetRealFromMemory(Memory[pFrame/4 + 22])
       endfunction
     
       function GetFrameHeight takes integer pFrame returns real
           return GetRealFromMemory(Memory[pFrame/4 + 23])
       endfunction
     
       function GetFramePointParent takes integer pFrame, integer point returns integer
           return Memory[Memory[pFrame/4 + point + 2]/4 + 1]
       endfunction
     
       function GetFramePointRelativePoint takes integer pFrame, integer point returns integer
           return Memory[Memory[pFrame/4 + point + 2]/4 + 2]
       endfunction
     
       function GetFramePointX takes integer pFrame, integer point returns real
           return GetRealFromMemory(Memory[Memory[pFrame/4 + point + 2]/4 + 3])
       endfunction
     
       function GetFramePointY takes integer pFrame, integer point returns real
           return GetRealFromMemory(Memory[Memory[pFrame/4 + point + 2]/4 + 4])
       endfunction
     
       function GetFrameTextAddress takes string name, integer id returns integer
           return fast_call2(address_GetFrameTextAddress, GetStringAddress(name), id)
       endfunction
     
       function GetFrameItemAddress takes string name, integer id returns integer
           return fast_call2(address_GetFrameItemAddress, GetStringAddress(name), id)
       endfunction

       function GetFrameSkinAddress takes string name, integer id returns integer
           return fast_call2(address_GetFrameSkinAddress, GetStringAddress(name), id)
       endfunction
     
       function GetFrameTextString takes string name, integer id returns string
           local integer FrameAddr = GetFrameTextAddress(name, id)
           if FrameAddr == 0 then
               return ""
           endif
           return ConvertNullTerminatedStringToString(ReadRealMemory(FrameAddr + 0x9C))
       endfunction
     
       function SetFrameTextAddress takes integer addr, string str returns nothing
           call this_call2(address_UpdateFrameText, addr, GetStringAddress(str))
       endfunction

       // =================================================
     
       function GetPanelButton takes integer pFrame, integer row, integer column returns integer
           return Memory[Memory[4 * row + Memory[pFrame/4 + 85]/4 + 2]/4 + column]
       endfunction
     
       function GetMinimapButton takes integer id returns integer // id = [0; 4]
           return ReadGameUIStruct(FRAME_MinimapButton1 + id)
       endfunction

       function GetUpperButtonBarButton takes integer id returns integer // id = [0; 3]
           local integer pUpperButtonBar = ReadGameUIStruct(FRAME_UpperButtonBarFrame)
           if (id == 0) then
               return Memory[pUpperButtonBar/4 + 78]
           elseif (id == 1) then
               return Memory[pUpperButtonBar/4 + 76]
           elseif (id == 2) then
               return Memory[pUpperButtonBar/4 + 77]
           elseif (id == 3) then
               return Memory[pUpperButtonBar/4 + 88]
           endif
           return 0
       endfunction
     
       function GetCommandBarButton takes integer row, integer column returns integer // row = [0; 2]  column = [0; 3]
           local integer pCommandBar = ReadGameUIStruct(FRAME_CommandBar)
           return GetPanelButton(pCommandBar, row, column)
       endfunction

       function GetItemBarButton takes integer id returns integer // id = [0; 5]
           local integer pInfoBar = ReadGameUIStruct(FRAME_InfoBar)
           local integer pItemBar = Memory[pInfoBar/4 + 82]
           return Memory[Memory[pItemBar/4 + 76]/4 + 2 * id + 1]
       endfunction
     
       function GetHeroBarButton takes integer id returns integer // id = [0; 6]
           local integer pHeroBar = ReadGameUIStruct(FRAME_HeroBar)
           return GetPanelButton(pHeroBar, id, 0)
       endfunction
     
       // =================================================
     
       function HideInterface takes nothing returns nothing
           local integer pRootFrame = GetRootFrame()

           call SetFramePoint(ReadGameUIStruct(FRAME_UpperButtonBarFrame), ANCHOR_TOPLEFT, pRootFrame, ANCHOR_TOPLEFT, 0.0, 1.0)
           call SetFramePoint(ReadGameUIStruct(FRAME_ResourceBarFrame), ANCHOR_TOPRIGHT, pRootFrame, ANCHOR_TOPRIGHT, 0.0, 1.0)

           call SetFramePoint(ReadGameUIStruct(FRAME_SimpleConsole), ANCHOR_TOPLEFT, pRootFrame, ANCHOR_TOPLEFT, 10.0, 0.0)
           call SetFramePoint(ReadGameUIStruct(FRAME_SimpleConsole), ANCHOR_TOPRIGHT, pRootFrame, ANCHOR_TOPRIGHT, -10.0, 0.0)

           call SetFramePoint(ReadGameUIStruct(FRAME_Portrait) + 180, ANCHOR_BOTTOMLEFT, pRootFrame, ANCHOR_BOTTOMLEFT, 1.0, 1.0)
           call SetFramePoint(ReadGameUIStruct(FRAME_Minimap) + 180, ANCHOR_BOTTOMLEFT, pRootFrame, ANCHOR_BOTTOMLEFT, 1.0, 1.0)

           call SetFramePoint(ReadGameUIStruct(FRAME_PeonBar), ANCHOR_BOTTOMLEFT, pRootFrame, ANCHOR_BOTTOMLEFT, 1.0, 1.0)
           call SetFramePoint(ReadGameUIStruct(FRAME_HeroBar), ANCHOR_TOPLEFT, pRootFrame, ANCHOR_TOPLEFT, 0.0, 1.0)

           call SetFramePoint(ReadGameUIStruct(FRAME_TimeOfDayIndicator) + 180, ANCHOR_BOTTOMLEFT, pRootFrame, ANCHOR_BOTTOMLEFT, 1.0, 1.0)
           call SetFramePoint(Memory[ReadGameUIStruct(FRAME_TimeOfDayIndicator)/4 + 108] + 180, ANCHOR_TOP, pRootFrame, ANCHOR_TOP, 1.0, 0.0) // TimeOfDayIndicator UBERTIP

           call SetFramePoint(Memory[ReadGameUIStruct(FRAME_InfoBar)/4 + 83], ANCHOR_BOTTOMRIGHT, pRootFrame, ANCHOR_TOPLEFT, 1.0, 0.0) // ConsoleInventoryCoverTexture
       endfunction

       function EditBlackBorders takes real upperHeight, real bottomHeight returns nothing
           local integer pWorldFrameWar3 = ReadGameUIStruct(FRAME_WorldFrameWar3) + 180
           local integer pRootFrame = GetRootFrame()

           call SetFramePoint(pWorldFrameWar3, ANCHOR_TOPRIGHT, pRootFrame, ANCHOR_TOPRIGHT, 0.0, -upperHeight)
           call SetFramePoint(pWorldFrameWar3, ANCHOR_BOTTOMLEFT, pRootFrame, ANCHOR_BOTTOMLEFT, 0.0, bottomHeight)
       endfunction
     
       function EditPortrait takes integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pPortraitFrame = ReadGameUIStruct(FRAME_Portrait) + 180
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pPortraitFrame, width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pPortraitFrame, height)
           endif
           call SetFramePoint(pPortraitFrame, ANCHOR_BOTTOMLEFT, pRootFrame, anchor, offsetX, -(offsetY + GetFrameHeight(pPortraitFrame)))
       endfunction
     
       function EditMinimap takes integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pMinimapFrame = ReadGameUIStruct(FRAME_Minimap) + 180
           local integer pRootFrame = GetRootFrame()

           call SetFramePoint(pMinimapFrame, ANCHOR_BOTTOMLEFT, pRootFrame, anchor, offsetX, -(offsetY + height))
           call SetFramePoint(pMinimapFrame, ANCHOR_TOPRIGHT, pRootFrame, anchor, offsetX + width, -offsetY)
       endfunction
     
       function EditCommandBarButton takes integer row, integer column, integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pButtonFrame = GetCommandBarButton(row, column)
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pButtonFrame, width)
               //call SetFrameWidth(Memory[pButtonFrame/4 + 82], width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pButtonFrame, height)
           endif
           call SetFramePoint(pButtonFrame, ANCHOR_TOPLEFT, pRootFrame, anchor, offsetX, -offsetY)
       endfunction
     
       function EditItemBarButton takes integer buttonId, integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pButtonFrame = GetItemBarButton(buttonId)
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pButtonFrame, width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pButtonFrame, height)
           endif
           call SetFramePoint(pButtonFrame, ANCHOR_TOPLEFT, pRootFrame, anchor, offsetX, -offsetY)
       endfunction
     
       function EditMinimapButton takes integer buttonId, integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pButtonFrame = GetMinimapButton(buttonId)
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pButtonFrame, width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pButtonFrame, height)
           endif
           call SetFramePoint(pButtonFrame, ANCHOR_TOPLEFT, pRootFrame, anchor, offsetX, -offsetY)
       endfunction
     
       function EditUpperButtonBarButton takes integer buttonId, integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pButtonFrame = GetUpperButtonBarButton(buttonId)
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pButtonFrame, width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pButtonFrame, height)
           endif
         
           if (buttonId == 0) then
               call SetFramePoint(pButtonFrame, ANCHOR_TOPLEFT, pRootFrame, anchor, offsetX, -offsetY)
           else
               call SetFramePoint(pButtonFrame, ANCHOR_LEFT, pRootFrame, anchor, offsetX, -(offsetY + GetFrameHeight(pButtonFrame)/2))
           endif
       endfunction
     
       function EditHeroBarButton takes integer buttonId, integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pButtonFrame = GetHeroBarButton(buttonId)
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pButtonFrame, width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pButtonFrame, height)
           endif
           call SetFramePoint(pButtonFrame, ANCHOR_TOPLEFT, pRootFrame, anchor, offsetX, -offsetY)
       endfunction
     
       function EditHeroBarHealthBar takes integer buttonId, integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pHealthFrame = Memory[GetHeroBarButton(buttonId)/4 + 115]
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pHealthFrame, width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pHealthFrame, height)
           endif
           call SetFramePoint(pHealthFrame, ANCHOR_TOP, pRootFrame, anchor, offsetX + GetFrameWidth(pHealthFrame)/2, -offsetY)
       endfunction
     
       function EditHeroBarManaBar takes integer buttonId, integer anchor, real offsetX, real offsetY, real width, real height returns nothing
           local integer pManaFrame = Memory[GetHeroBarButton(buttonId)/4 + 116]
           local integer pRootFrame = GetRootFrame()
         
           if (width >= 0) then
               call SetFrameWidth(pManaFrame, width)
           endif
           if (height >= 0) then
               call SetFrameHeight(pManaFrame, height)
           endif
           call SetFramePoint(pManaFrame, ANCHOR_TOP, pRootFrame, anchor, offsetX + GetFrameWidth(pManaFrame)/2, -offsetY)
       endfunction
     
       function EditTooltip takes integer anchor, real offsetX, real offsetY, real width returns nothing
           local integer pRootFrame = GetRootFrame()

           if (width >= 0) then
               call SetFrameWidth(pTooltipFrame, width) // Borders
               call SetFrameWidth(Memory[(pTooltipFrame + 384)/4], width) // Text
           endif
           //call SetFramePoint(pTooltipFrame, ANCHOR_BOTTOMRIGHT, pRootFrame, anchor, offsetX + GetFrameWidth(pTooltipFrame), -(offsetY + GetFrameHeight(pTooltipFrame))) // offsetX = 0, offsetY = 0 - top left corner
           call SetFramePoint(pTooltipFrame, ANCHOR_BOTTOMRIGHT, pRootFrame, anchor, offsetX, -offsetY) // offsetX = 0, offsetY = 0 - bottom right corner
       endfunction
     
       // =================================================
     
     
       private function Init takes nothing returns nothing
           set address_GetGameUI = address_GameBase + 0x300710
           set address_SetFramePoint = address_GameBase + 0x606770
           set address_SetFramePoint2 = address_GameBase + 0x6061B0
           set address_SetFrameWidth = address_GameBase + 0x605D90
           set address_SetFrameHeight = address_GameBase + 0x605DB0
           set address_GetFrameTextAddress = address_GameBase + 0x61C7B0
           set address_GetFrameItemAddress = address_GameBase + 0x5FA970
           set address_GetFrameSkinAddress = address_GameBase + 0x31F530
           set address_UpdateFrameText = address_GameBase + 0x60CA10
         
           set pTooltipFrame = fast_call(address_GameBase + 0x337240)
         
           set pGameUI = GetGameUI(0, 0)
       endfunction
     
    endlibrary
    FileSystem
    Code (vJASS):
    library FileSystem initializer Init uses FpCall

        globals
            integer address_GetModuleHandle = 0
            integer address_GetProcAddress = 0
            integer address_GetFileAttributesA = 0
            integer address_ExportFromMpq = 0
            integer address_LoadLibraryA = 0
        endglobals


        function GetModuleHandle takes string nDllName returns integer
            return std_call1(Memory[address_GetModuleHandle], GetStringAddress(nDllName))
        endfunction

        function GetModuleProcAddress takes string nDllName, string nProcName returns integer
            return std_call2(Memory[address_GetProcAddress], GetModuleHandle(nDllName), GetStringAddress(nProcName))
        endfunction
     
        function GetFileAttributes takes string fileName returns integer
            return std_call1(address_GetFileAttributesA, GetStringAddress(fileName))
        endfunction
     
        function FileExists takes string fileName returns boolean
            return GetFileAttributes(fileName) != -1
        endfunction

        function LoadLibrary takes string fileName returns integer
            return std_call1(address_LoadLibraryA, GetStringAddress(fileName))
        endfunction

        function ExportFileFromMpq takes string source, string dest returns boolean
            return fast_call2(address_ExportFromMpq, GetStringAddress(source), GetStringAddress(dest)) > 0
        endfunction
     
        function ExportAndInjectDLL takes string source, string dest returns boolean
            if (GetModuleHandle(source) != 0) then
                return true
            endif
     
            if (not ExportFileFromMpq(source, dest)) then
                return false
            endif
     
            if (LoadLibrary(dest) == 0) then
                return false
            endif
     
            return true
        endfunction
     
     
        private function Init takes nothing returns nothing
            set address_GetModuleHandle = (address_GameBase + 0x86D1D0) / 4
            set address_GetProcAddress = (address_GameBase + 0x86D280) / 4
            set address_ExportFromMpq = address_GameBase + 0x737F00
            set address_GetFileAttributesA = GetModuleProcAddress("Kernel32.dll", "GetFileAttributesA")
            set address_LoadLibraryA = GetModuleProcAddress("Kernel32.dll", "LoadLibraryA")
        endfunction
     
    endlibrary
    RenderEdge
    Code (vJASS):
    library RenderEdge initializer Init uses FileSystem, Utils, FpCall

        globals
            constant string RENDEREDGE_DLL = "RenderEdge_mini.dll"
     
            // TriggerRegisterMouseEvent & TriggerRegisterKeyEvent
            constant integer MB_Left = 0
            constant integer MB_Middle = 1
            constant integer MB_Right = 2
            constant integer MB_X1 = 3
            constant integer MB_X2 = 4
            constant integer KEY_Any = -1
            constant integer EVENT_Down = 0
            constant integer EVENT_Up = 1
     
            integer address_GetWindowX = 0
            integer address_GetWindowY = 0
            integer address_GetWindowWidth = 0
            integer address_GetWindowHeight = 0
            integer address_GetMouseX = 0
            integer address_GetMouseY = 0
            integer address_GetWheelDelta = 0
            integer address_GetTriggerKey = 0
            integer address_IsKeyDown = 0
            integer address_BlockMouse = 0
            integer address_SetMousePos = 0
            integer address_TriggerRegisterMouseMoveEvent = 0
            integer address_TriggerRegisterMouseWheelEvent = 0
            integer address_TriggerRegisterKeyEvent = 0
            integer address_TriggerRegisterMouseEvent = 0
        endglobals

     
        function GetWindowX takes nothing returns integer
            return std_call1(address_GetWindowX, 0)
        endfunction
     
        function GetWindowY takes nothing returns integer
            return std_call1(address_GetWindowY, 0)
        endfunction
     
        function GetWindowWidth takes nothing returns integer
            return std_call1(address_GetWindowWidth, 0)
        endfunction
     
        function GetWindowHeight takes nothing returns integer
            return std_call1(address_GetWindowHeight, 0)
        endfunction
     
        function GetMouseX takes nothing returns integer
            return std_call1(address_GetMouseX, 0)
        endfunction
     
        function GetMouseY takes nothing returns integer
            return std_call1(address_GetMouseY, 0)
        endfunction
     
        function GetWheelDelta takes nothing returns integer
            return std_call1(address_GetWheelDelta, 0)
        endfunction
     
        function GetTriggerKey takes nothing returns integer
            return std_call1(address_GetTriggerKey, 0)
        endfunction
     
        function IsKeyDown takes integer iKey returns boolean
            return std_call1(address_IsKeyDown, iKey) == 1
        endfunction
     
        function BlockMouse takes boolean bBlock returns nothing
            call std_call1(address_BlockMouse, B2I(bBlock))
        endfunction
     
        function SetMousePos takes integer x, integer y returns nothing
            call std_call2(address_SetMousePos, x, y)
        endfunction
     
        function TriggerRegisterMouseMoveEvent takes trigger trig returns nothing
            call std_call1(address_TriggerRegisterMouseMoveEvent, T2I(trig))
        endfunction
     
        function TriggerRegisterMouseWheelEvent takes trigger trig returns nothing
            call std_call1(address_TriggerRegisterMouseWheelEvent, T2I(trig))
        endfunction
     
        function TriggerRegisterMouseEvent takes trigger trig, integer iKey, integer state returns nothing
            call std_call3(address_TriggerRegisterMouseEvent, T2I(trig), iKey, state)
        endfunction
     
        function TriggerRegisterKeyEvent takes trigger trig, integer iKey, integer state returns nothing
            call std_call3(address_TriggerRegisterKeyEvent, T2I(trig), iKey, state)
        endfunction
     
     
        private function Init takes nothing returns nothing
            if (ExportAndInjectDLL(RENDEREDGE_DLL, RENDEREDGE_DLL)) then
                set address_GetWindowX = GetModuleProcAddress(RENDEREDGE_DLL, "GetWindowX")
                set address_GetWindowY = GetModuleProcAddress(RENDEREDGE_DLL, "GetWindowY")
                set address_GetWindowWidth = GetModuleProcAddress(RENDEREDGE_DLL, "GetWindowWidth")
                set address_GetWindowHeight = GetModuleProcAddress(RENDEREDGE_DLL, "GetWindowHeight")
                set address_GetMouseX = GetModuleProcAddress(RENDEREDGE_DLL, "GetMouseX")
                set address_GetMouseY = GetModuleProcAddress(RENDEREDGE_DLL, "GetMouseY")
                set address_GetWheelDelta = GetModuleProcAddress(RENDEREDGE_DLL, "GetWheelDelta")
                set address_GetTriggerKey = GetModuleProcAddress(RENDEREDGE_DLL, "GetTriggerKey")
                set address_IsKeyDown = GetModuleProcAddress(RENDEREDGE_DLL, "IsKeyDown")
                set address_BlockMouse = GetModuleProcAddress(RENDEREDGE_DLL, "BlockMouse")
                set address_SetMousePos = GetModuleProcAddress(RENDEREDGE_DLL, "SetMousePos")
                set address_TriggerRegisterMouseMoveEvent = GetModuleProcAddress(RENDEREDGE_DLL, "TriggerRegisterMouseMoveEvent")
                set address_TriggerRegisterMouseWheelEvent = GetModuleProcAddress(RENDEREDGE_DLL, "TriggerRegisterMouseWheelEvent")
                set address_TriggerRegisterKeyEvent = GetModuleProcAddress(RENDEREDGE_DLL, "TriggerRegisterKeyEvent")
                set address_TriggerRegisterMouseEvent = GetModuleProcAddress(RENDEREDGE_DLL, "TriggerRegisterMouseEvent")
            else
                call Message("Failed to inject " + RENDEREDGE_DLL)
            endif
        endfunction

    endlibrary

    Demo
    GUI
    Code (vJASS):
    library GUI initializer Init uses Interface, RenderEdge, Utils

       globals
         
       endglobals
     
        // ===================================
     
       function FromPixelX takes integer i returns real
           return i * 0.8 / GetWindowWidth()
       endfunction
     
       function FromPixelY takes integer i returns real
           return i * 0.6 / GetWindowHeight()
       endfunction
     
       // ===================================
     
       function EditStandardInterface takes nothing returns nothing
           local real portraitWidth = FromPixelX(150)
           local real portraitHeight = FromPixelY(150)
           local real portraitStartX = FromPixelX(20)
           local real portraitStartY = FromPixelY(20)
         
           local real minimapWidth = FromPixelX(200)
           local real minimapHeight = FromPixelY(200)
           local real minimapStartX = FromPixelX(-220)
           local real minimapStartY = FromPixelY(20)
           local real minimapButtonWidth = FromPixelX(32)
           local real minimapButtonHeight = FromPixelY(32)
           local real minimapButtonStartX = minimapStartX
           local real minimapButtonStartY = minimapStartY + minimapHeight + FromPixelY(5)
           local real minimapButtonDeltaX = minimapButtonWidth + FromPixelX(10)
         
           local real upperButtonWidth = FromPixelX(120)
           local real upperButtonHeight = -1 // default height
           local real upperBarStartX = FromPixelX(-360)
           local real upperBarStartY = FromPixelY(40)
           local real upperBarDeltaY = FromPixelY(40)
         
           local real commandButtonWidth = FromPixelX(64)
           local real commandButtonHeight = FromPixelY(64)
           local real commandBarStartX = FromPixelX(-80)
           local real commandBarStartY = FromPixelY(-100)
           local real commandBarDeltaX = commandButtonWidth + FromPixelX(10)
           local real commandBarDeltaY = commandButtonHeight + FromPixelY(10)
           local real spellBarStartX = -(commandBarDeltaX*6 - FromPixelX(10))/2
           local real spellBarStartY = FromPixelY(-140)
         
           local real itemButtonWidth = FromPixelX(48)
           local real itemButtonHeight = FromPixelY(48)
           local real itemBarStartX = FromPixelX(-300)
           local real itemBarStartY = FromPixelY(-140)
           local real itemBarDeltaX = itemButtonWidth + FromPixelX(10)
           local real itemBarDeltaY = itemButtonHeight + FromPixelY(10)
         
           local real healthBarWidth = FromPixelX(400)
           local real healthBarHeight = FromPixelY(16)
           local real healthBarStartX = -healthBarWidth/2
           local real healthBarStartY = FromPixelY(-50)
         
           //===========================================================================
         
           call EditBlackBorders(0, 0)
           call EditPortrait(ANCHOR_TOPLEFT, portraitStartX, portraitStartY, portraitWidth, portraitHeight)
         
           //===========================================================================
         
           call EditMinimap(ANCHOR_TOPRIGHT, minimapStartX, minimapStartY, minimapWidth, minimapHeight)
           call EditMinimapButton(0, ANCHOR_TOPRIGHT, minimapButtonStartX + minimapButtonDeltaX*0, minimapButtonStartY, minimapButtonWidth, minimapButtonHeight)
           call EditMinimapButton(1, ANCHOR_TOPRIGHT, minimapButtonStartX + minimapButtonDeltaX*1, minimapButtonStartY, minimapButtonWidth, minimapButtonHeight)
           call EditMinimapButton(2, ANCHOR_TOPRIGHT, minimapButtonStartX + minimapButtonDeltaX*2, minimapButtonStartY, minimapButtonWidth, minimapButtonHeight)
           call EditMinimapButton(3, ANCHOR_TOPRIGHT, minimapButtonStartX + minimapButtonDeltaX*3, minimapButtonStartY, minimapButtonWidth, minimapButtonHeight)
           call EditMinimapButton(4, ANCHOR_TOPRIGHT, minimapButtonStartX + minimapButtonDeltaX*4, minimapButtonStartY, minimapButtonWidth, minimapButtonHeight)
         
           //===========================================================================
         
           call EditUpperButtonBarButton(0, ANCHOR_TOPRIGHT, upperBarStartX, upperBarStartY + upperBarDeltaY*0, upperButtonWidth, upperButtonHeight) // Quests
           call EditUpperButtonBarButton(1, ANCHOR_TOPRIGHT, upperBarStartX, upperBarStartY + upperBarDeltaY*1, upperButtonWidth, upperButtonHeight) // Menu
           call EditUpperButtonBarButton(2, ANCHOR_TOPRIGHT, upperBarStartX, upperBarStartY + upperBarDeltaY*2, upperButtonWidth, upperButtonHeight) // Allies
           call EditUpperButtonBarButton(3, ANCHOR_TOPRIGHT, upperBarStartX, upperBarStartY + upperBarDeltaY*3, upperButtonWidth, upperButtonHeight) // Log
         
           //===========================================================================
         
           call EditCommandBarButton(0, 0, ANCHOR_RIGHT, commandBarStartX, commandBarStartY + commandBarDeltaY*0, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(0, 1, ANCHOR_RIGHT, commandBarStartX, commandBarStartY + commandBarDeltaY*1, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(0, 2, ANCHOR_RIGHT, commandBarStartX, commandBarStartY + commandBarDeltaY*2, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(0, 3, ANCHOR_RIGHT, commandBarStartX, commandBarStartY + commandBarDeltaY*3, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(1, 0, ANCHOR_RIGHT, commandBarStartX, commandBarStartY + commandBarDeltaY*4, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(1, 3, ANCHOR_RIGHT, commandBarStartX, commandBarStartY + commandBarDeltaY*5, commandButtonWidth, commandButtonHeight)

           call EditCommandBarButton(1, 1, ANCHOR_BOTTOM, spellBarStartX + commandBarDeltaX*0, spellBarStartY, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(2, 0, ANCHOR_BOTTOM, spellBarStartX + commandBarDeltaX*1, spellBarStartY, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(2, 1, ANCHOR_BOTTOM, spellBarStartX + commandBarDeltaX*2, spellBarStartY, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(2, 2, ANCHOR_BOTTOM, spellBarStartX + commandBarDeltaX*3, spellBarStartY, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(2, 3, ANCHOR_BOTTOM, spellBarStartX + commandBarDeltaX*4, spellBarStartY, commandButtonWidth, commandButtonHeight)
           call EditCommandBarButton(1, 2, ANCHOR_BOTTOM, spellBarStartX + commandBarDeltaX*5, spellBarStartY, commandButtonWidth, commandButtonHeight)
         
           //===========================================================================
         
           call EditItemBarButton(0, ANCHOR_BOTTOMRIGHT, itemBarStartX + itemBarDeltaX*0, itemBarStartY + itemBarDeltaY*0, itemButtonWidth, itemButtonHeight)
           call EditItemBarButton(1, ANCHOR_BOTTOMRIGHT, itemBarStartX + itemBarDeltaX*1, itemBarStartY + itemBarDeltaY*0, itemButtonWidth, itemButtonHeight)
           call EditItemBarButton(2, ANCHOR_BOTTOMRIGHT, itemBarStartX + itemBarDeltaX*2, itemBarStartY + itemBarDeltaY*0, itemButtonWidth, itemButtonHeight)
           call EditItemBarButton(3, ANCHOR_BOTTOMRIGHT, itemBarStartX + itemBarDeltaX*0, itemBarStartY + itemBarDeltaY*1, itemButtonWidth, itemButtonHeight)
           call EditItemBarButton(4, ANCHOR_BOTTOMRIGHT, itemBarStartX + itemBarDeltaX*1, itemBarStartY + itemBarDeltaY*1, itemButtonWidth, itemButtonHeight)
           call EditItemBarButton(5, ANCHOR_BOTTOMRIGHT, itemBarStartX + itemBarDeltaX*2, itemBarStartY + itemBarDeltaY*1, itemButtonWidth, itemButtonHeight)
         
           //===========================================================================
         
           call EditHeroBarHealthBar(0, ANCHOR_BOTTOM, healthBarStartX, healthBarStartY, healthBarWidth, healthBarHeight)
           call EditHeroBarManaBar(0, ANCHOR_BOTTOM, healthBarStartX, healthBarStartY + healthBarHeight + FromPixelY(4), healthBarWidth, healthBarHeight)
       endfunction
     
       function OnMouseDown takes nothing returns nothing
           call ClearTextMessages()
           call Message("Mouse Button: " + I2S(GetTriggerKey()))
           call Message("\n")
           call Message("Mouse X: " + I2S(GetMouseX()))
           call Message("Mouse Y: " + I2S(GetMouseY()))
           call Message("\n")
           call Message("Terrain X: " + R2S(GetMouseTerrainX()))
           call Message("Terrain Y: " + R2S(GetMouseTerrainY()))
           call Message("Terrain Z: " + R2S(GetMouseTerrainZ()))
       endfunction
     
       function OnKeyDown takes nothing returns nothing
           call ClearTextMessages()
           call Message("Keyboard Key: " + I2S(GetTriggerKey()))
       endfunction
     
       private function OnMouseMove takes nothing returns nothing
           call EditTooltip(ANCHOR_TOPLEFT, FromPixelX(GetMouseX()), FromPixelY(GetMouseY()), -1)
       endfunction
     
     
       private function Init takes nothing returns nothing
           local trigger temp = CreateTrigger()
         
           // HideInterface function should be called while map initialization
           call HideInterface()
         
           // Editing the CommandBar buttons does not work while map initialization, so it is necessary to wait a bit
           call TriggerRegisterTimerEvent(temp, 0.001, false)
           call TriggerAddAction(temp, function EditStandardInterface)
         
           set temp = CreateTrigger()
           call TriggerRegisterMouseEvent(temp, KEY_Any, EVENT_Down)
           call TriggerAddAction(temp, function OnMouseDown)
         
           set temp = CreateTrigger()
           call TriggerRegisterKeyEvent(temp, KEY_Any, EVENT_Down)
           call TriggerAddAction(temp, function OnKeyDown)
         
           set temp = CreateTrigger()
           call TriggerRegisterMouseMoveEvent(temp)
           call TriggerAddAction(temp, function OnMouseMove)
       endfunction

    endlibrary
    Camera
    Code (vJASS):
    library Camera initializer Init uses RenderEdge

        globals
            private real yaw = 0.0
            private real pitch = 0.0
            private real camDist = 0.0

            private real cameraTime = 0.03125
            private real sensX = 0.05
            private real sensY = 0.05

            private boolean bRBM = false
            private boolean bCtrlPressed = false
        endglobals
     
     
        function GetWindowCenterX takes nothing returns integer
            return GetWindowWidth()/2 + GetWindowX()
        endfunction
     
        function GetWindowCenterY takes nothing returns integer
            return GetWindowHeight()/2 + GetWindowY()
        endfunction
     
        function SetCameraFieldLocal takes camerafield camField, real value, real time returns nothing
            if (GetLocalPlayer() == GetLocalPlayer()) then
                call SetCameraField(camField, value, time)
            endif
        endfunction
     
     
        function NormalizeYaw takes nothing returns real
            if (yaw > 180.0) then
                set yaw = yaw - 360.0
            elseif (yaw < -180.0) then
                set yaw = yaw + 360.0
            endif

            return yaw
        endfunction

        function NormalizePitch takes nothing returns real
            if (pitch > 89.0 and pitch <= 180.0) then
                set pitch = 89.0
            endif
     
            if (pitch > 180.0) then
                set pitch = pitch - 360.0
            elseif (pitch < -89.0) then
                set pitch = -89.0
            endif

            return pitch
        endfunction

     
        private function OnFrameUpdate takes nothing returns nothing
            local integer mouseX
            local integer mouseY
            local integer centerX
            local integer centerY
            local real deltaX
            local real deltaY
     
            if (bCtrlPressed and bRBM) then
                set mouseX = GetMouseX()
                set mouseY = GetMouseY()
                set centerX = GetWindowCenterX()
                set centerY = GetWindowCenterY()
                set deltaX = I2R(centerX - mouseX)
                set deltaY = I2R(centerY - mouseY)
       
                if (mouseX != centerX) then
                    set yaw = yaw + deltaX * sensX
                    set yaw = NormalizeYaw()
           
                    call SetCameraFieldLocal(CAMERA_FIELD_ROTATION, yaw, cameraTime)
                endif
       
                if (mouseY != centerY) then
                    set pitch = pitch + deltaY * sensY
                    set pitch = NormalizePitch()
           
                    call SetCameraFieldLocal(CAMERA_FIELD_ANGLE_OF_ATTACK, pitch, cameraTime)
                endif
       
                call SetMousePos(centerX, centerY)
            endif
        endfunction

        private function OnKeyboardDown takes nothing returns nothing
            if (GetTriggerKey() == 17 and (not IsKeyDown(1)) and (not IsKeyDown(2))) then
                set camDist = GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
                call BlockMouse(true)
                set bCtrlPressed = true
            endif
        endfunction

        private function OnKeyboardUp takes nothing returns nothing
            if (GetTriggerKey() == 17) then
                call BlockMouse(false)
                set bCtrlPressed = false
            endif
        endfunction
           
        private function OnMouseDown takes nothing returns nothing
            set bRBM = true
            if (bCtrlPressed) then
                set yaw = GetCameraField(CAMERA_FIELD_ROTATION) * bj_RADTODEG
                set pitch = GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK) * bj_RADTODEG
                call SetMousePos(GetWindowCenterX(), GetWindowCenterY())
                call EnableUserControl(false)
            endif
        endfunction
       
        private function OnMouseUp takes nothing returns nothing
            set bRBM = false
            call EnableUserControl(true)
        endfunction

        private function OnWheelEvent takes nothing returns nothing
            if (bCtrlPressed) then
                set camDist = camDist - I2R(GetWheelDelta()) * 0.5
                if (camDist < 1.0) then
                    set camDist = 1.0
                elseif (camDist > 3000.0) then
                    set camDist = 3000.0
                endif

                call SetCameraFieldLocal(CAMERA_FIELD_TARGET_DISTANCE, camDist, cameraTime)
            endif
        endfunction


        private function Init takes nothing returns nothing
            local trigger temp = CreateTrigger()
            call TriggerAddAction(temp, function OnFrameUpdate)
            call TriggerRegisterTimerEvent(temp, cameraTime, true)

            set temp = CreateTrigger()
            call TriggerAddAction(temp, function OnKeyboardDown)
            call TriggerRegisterKeyEvent(temp, KEY_Any, EVENT_Down)

            set temp = CreateTrigger()
            call TriggerAddAction(temp, function OnKeyboardUp)
            call TriggerRegisterKeyEvent(temp, KEY_Any, EVENT_Up)
     
            set temp = CreateTrigger()
            call TriggerAddAction(temp, function OnMouseDown)
            call TriggerRegisterMouseEvent(temp, MB_Right, EVENT_Down)
     
            set temp = CreateTrigger()
            call TriggerAddAction(temp, function OnMouseUp)
            call TriggerRegisterMouseEvent(temp, MB_Right, EVENT_Up)
     
            set temp = CreateTrigger()
            call TriggerAddAction(temp, function OnWheelEvent)
            call TriggerRegisterMouseWheelEvent(temp)
        endfunction
     
    endlibrary



    Projects using RenderEdge




    Thanks


     

    Attached Files:

    Last edited: Jan 14, 2018
  2. Chaosy

    Chaosy

    Tutorial Reviewer

    Joined:
    Jun 9, 2011
    Messages:
    11,054
    Resources:
    18
    Icons:
    1
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    18
    Does this not mean that everyone that plays the map needs to be on the same patch? seems like a huge drawback.
     
  3. BritneySpears2016

    BritneySpears2016

    Joined:
    Oct 3, 2017
    Messages:
    26
    Resources:
    0
    Resources:
    0
    There are no bigger patches than 1.26, soon or later every platform (non-ladder) will use it.
    Nice examples btw, @ENAleksey
     
  4. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,535
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    Keep in mind who plays on 1.26 makes themselves very vulnerable to losing their hardware or even worse... Anyone using stuff like this and is telling players/people to down-patch should also properly warn them so please don't forget those warning labels.
     
  5. Aniki

    Aniki

    Joined:
    Nov 7, 2014
    Messages:
    559
    Resources:
    6
    Tools:
    1
    Maps:
    1
    Spells:
    1
    JASS:
    3
    Resources:
    6
    -- DioD 2009-11-25

    Someone is in luck =)...
     
  6. Trigger.edge

    Trigger.edge

    Joined:
    Jun 21, 2012
    Messages:
    419
    Resources:
    0
    Resources:
    0
    damn it! :DDDDDDDDDD
     
  7. Kakerate

    Kakerate

    Joined:
    Oct 18, 2013
    Messages:
    482
    Resources:
    0
    Resources:
    0
    How do we get tooltips to re-attach to the abilities and items?
     
  8. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    7,014
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    Using deprecated versions of Warcraft 3 will split up the community and i will take up no part in that.

    Unless you can port this to the current version, it's pretty much useless for any serious mapper.

    Still impressive though.
     
  9. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    It's impossible due the fact that writing into the memory was fixed in 1.28 patches.
     
  10. TempMail

    TempMail

    Joined:
    Nov 3, 2017
    Messages:
    25
    Resources:
    0
    Resources:
    0
    Its unneeded in the first place. Any serious mapper with memhack can provide SUCH a level of game expierence, none of other could even remotely hope for. Users will vote by themselves, chosing where to play.
     
  11. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,952
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Maybe you are unaware of the fact that happened already the moment 1.27 came out.
    Big portions of the community are on 1.26 for both modding (JNGP until WEX shares the same feature set, memory hack, and basically most of the tools developed since WC3 came to be) and ladder (better pings, better match making, better anti-hack capabilities, 16:9 aspect ratio, better map pool, ...).
    The split happened because Blizzard does not care about the community tools and hacks, nor does it care about ladder.
    I don't care what they say, it's the actions that speak loudly.
    I don't understand this notion of recent tools suddenly splitting the community when it happened already ages ago.
    If one day we will get all of the incredibly simple 1-liner (on the game side) natives added by memory hack, maybe the people who use 1.26 for modding reasons will think about updating.
    As to ladder - let's see when Undead isn't Northrend's #1 ladder player...(but you can't check it on ladder, because the whole site stopped working a while ago, probably no one noticed because Battle.net ladder is a hacker joke).
     
    Last edited: Nov 9, 2017
  12. Kakerate

    Kakerate

    Joined:
    Oct 18, 2013
    Messages:
    482
    Resources:
    0
    Resources:
    0
    Hosting on 1.26a, I've noticed that while this is enabled, people without the file "RenderEdge_mini.dll" will get crash on init
    ==============================================================================
    Warcraft III (build 6401)

    Exe: c:\program files (x86)\warcraft 3\War3.exe
    Time: Nov 16, 2017 9:08:51.983 AM
    User: Paul
    Computer: PAUL-PC
    ------------------------------------------------------------------------------

    This application has encountered a critical error:

    FATAL ERROR!

    Program: c:\program files (x86)\warcraft 3\War3.exe
    Exception: 0xC0000005 (ACCESS_VIOLATION) at 0023:00000000

    The instruction at '0x00000000' referenced memory at '0x00000000'.
    The memory could not be 'written'.


    War3Build: 1.26.0.6401
    Played Maps\Test\WorldEditTestMap.w3x
    Player 0 WorldEdit Race Human StartLoc 9
    Player 1 Race Human StartLoc 1
    Player 2 Race Human StartLoc 2
    Player 3 Race Human StartLoc 3
    Player 4 Race Human StartLoc 4
    Player 5 Race Human StartLoc 5
    Player 6 Race Human StartLoc 6
    Player 7 Race Human StartLoc 7
    Player 8 Race Human StartLoc 8
    Player 9 Race Human StartLoc 9
    Player 10 Race Human StartLoc 10
    Player 11 Race Human StartLoc 11
    ------------------------------------------------------------------------------

    ----------------------------------------
    x86 Registers
    ----------------------------------------

    EAX=0018F2E8 EBX=FFFFFFFF ECX=00000000 EDX=00000000 ESI=6F933A2E
    EDI=0018F348 EBP=0018F3A0 ESP=0018F2D0 EIP=00000000 FLG=00210216
    CS =0023 DS =002B ES =002B SS =002B FS =0053 GS =002B


    ----------------------------------------
    Stack Trace (Manual)
    ----------------------------------------

    Address Frame Logical addr Module

    00000000 0018F3A0 0000:00000000 c:\program files (x86)\warcraft 3\War3.exe

    ----------------------------------------
    Stack Trace (Using DBGHELP.DLL)
    ----------------------------------------

    20E80022 <unknown module> <unknown symbol>+0 (0x00000000,0x00000000,0x00000000,0x00000000)


    ----------------------------------------
    Loaded Modules
    ----------------------------------------

    0x00400000 - 0x0047D000 c:\program files (x86)\warcraft 3\War3.exe
    0x15000000 - 0x15061000 c:\program files (x86)\warcraft 3\Storm.dll
    0x21100000 - 0x2115F000 c:\program files (x86)\warcraft 3\mss32.dll
    0x22600000 - 0x22616000 c:\program files (x86)\warcraft 3\redist\miles\Mssfast.m3d
    0x22700000 - 0x22717000 c:\program files (x86)\warcraft 3\redist\miles\Mssdolby.m3d
    0x22C00000 - 0x22C18000 c:\program files (x86)\warcraft 3\redist\miles\Msseax2.m3d
    0x24600000 - 0x24611000 c:\program files (x86)\warcraft 3\redist\miles\Reverb3.flt
    0x26F00000 - 0x26F2A000 c:\program files (x86)\warcraft 3\redist\miles\Mp3dec.asi
    0x549F0000 - 0x557BE000 C:\Windows\system32\nvd3dum.dll
    0x5B770000 - 0x5B865000 C:\Windows\System32\PROPSYS.dll
    0x5C460000 - 0x5C735000 C:\Windows\system32\nvapi.dll
    0x60000000 - 0x6005D000 c:\program files (x86)\warcraft 3\ijl15.dll
    0x61560000 - 0x6169A000 C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvSCPAPI.dll
    0x620F0000 - 0x621F5000 C:\Windows\system32\d3d8.dll
    0x624D0000 - 0x6255D000 C:\Windows\AppPatch\AcLayers.DLL
    0x62570000 - 0x62590000 c:\program files (x86)\warcraft 3\GameDll_fix_mapsize_limit.mix
    0x6A110000 - 0x6A1F7000 C:\Windows\system32\DDRAW.dll
    0x6A200000 - 0x6A2C8000 C:\Windows\system32\OPENGL32.dll
    0x6B3F0000 - 0x6B3F6000 C:\Windows\system32\d3d8thk.dll
    0x6B5F0000 - 0x6B622000 C:\Windows\system32\WINMM.dll
    0x6B750000 - 0x6B762000 C:\Windows\system32\MPR.dll
    0x6B790000 - 0x6B797000 C:\Windows\system32\WSOCK32.dll
    0x6B7A0000 - 0x6B7A6000 C:\Windows\system32\DCIMAN32.dll
    0x6B8B0000 - 0x6B930000 C:\Windows\system32\uxtheme.dll
    0x6BB60000 - 0x6BB67000 C:\Windows\system32\avrt.dll
    0x6BC60000 - 0x6BC73000 C:\Windows\system32\dwmapi.dll
    0x6C910000 - 0x6C926000 C:\Windows\system32\GPAPI.dll
    0x6C930000 - 0x6C96D000 C:\Windows\SysWOW64\bcryptprimitives.dll
    0x6C970000 - 0x6C9A9000 C:\Windows\system32\ncrypt.dll
    0x6C9D0000 - 0x6CA09000 C:\Windows\System32\MMDevApi.dll
    0x6CA70000 - 0x6CAA6000 C:\Windows\system32\AUDIOSES.DLL
    0x6CB40000 - 0x6CB62000 C:\Windows\system32\GLU32.dll
    0x6CB80000 - 0x6CB86000 C:\Windows\system32\SensApi.dll
    0x6CB90000 - 0x6CBAD000 C:\Windows\system32\cryptnet.dll
    0x6D140000 - 0x6D18C000 C:\Windows\system32\apphelp.dll
    0x6DB00000 - 0x6DB72000 C:\Windows\system32\DSOUND.DLL
    0x6DCA0000 - 0x6DCC5000 C:\Windows\system32\powrprof.dll
    0x6EB80000 - 0x6EBB8000 C:\Windows\System32\fwpuclnt.dll
    0x6F000000 - 0x6FBB5000 c:\program files (x86)\warcraft 3\Game.dll
    0x6FF00000 - 0x6FF06000 C:\Windows\system32\rasadhlp.dll
    0x6FF10000 - 0x6FF18000 C:\Windows\system32\credssp.dll
    0x6FF20000 - 0x6FF70000 C:\Windows\system32\webio.dll
    0x6FF70000 - 0x6FFC8000 C:\Windows\system32\WINHTTP.dll
    0x70140000 - 0x7022B000 C:\Windows\system32\dbghelp.dll
    0x70380000 - 0x7041B000 C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc\MSVCR80.dll
    0x70460000 - 0x70477000 C:\Windows\system32\bcrypt.dll
    0x70490000 - 0x70514000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_ec86b8d6858ec0bc\COMCTL32.dll
    0x70A50000 - 0x70A5D000 C:\Windows\system32\dhcpcsvc6.DLL
    0x70A60000 - 0x70A72000 C:\Windows\system32\dhcpcsvc.DLL
    0x70A80000 - 0x70A87000 C:\Windows\system32\WINNSI.DLL
    0x70A90000 - 0x70AAC000 C:\Windows\system32\IPHLPAPI.DLL
    0x70CF0000 - 0x70D34000 C:\Windows\system32\DNSAPI.dll
    0x70D80000 - 0x70D86000 C:\Windows\System32\wship6.dll
    0x70D90000 - 0x70D95000 C:\Windows\System32\wshtcpip.dll
    0x70DA0000 - 0x70DDC000 C:\Windows\system32\mswsock.dll
    0x71E10000 - 0x71E4B000 C:\Windows\system32\rsaenh.dll
    0x71E50000 - 0x71E67000 C:\Windows\system32\CRYPTSP.dll
    0x75470000 - 0x75491000 C:\Windows\system32\ntmarta.dll
    0x754A0000 - 0x754F1000 C:\Windows\system32\WINSPOOL.DRV
    0x75500000 - 0x75509000 C:\Windows\system32\VERSION.dll
    0x755D0000 - 0x755DC000 C:\Windows\syswow64\CRYPTBASE.dll
    0x755E0000 - 0x75640000 C:\Windows\syswow64\SspiCli.dll
    0x75640000 - 0x75643000 C:\Windows\syswow64\api-ms-win-downlevel-normaliz-l1-1-0.dll
    0x75650000 - 0x75653000 C:\Windows\syswow64\normaliz.DLL
    0x75660000 - 0x7568F000 C:\Windows\syswow64\WINTRUST.dll
    0x75690000 - 0x75695000 C:\Windows\syswow64\PSAPI.DLL
    0x756A0000 - 0x75731000 C:\Windows\syswow64\OLEAUT32.dll
    0x757D0000 - 0x758E0000 C:\Windows\syswow64\kernel32.dll
    0x758E0000 - 0x7652C000 C:\Windows\syswow64\SHELL32.dll
    0x76590000 - 0x7660B000 C:\Windows\syswow64\comdlg32.dll
    0x76610000 - 0x76627000 C:\Windows\syswow64\USERENV.dll
    0x76630000 - 0x76677000 C:\Windows\syswow64\KERNELBASE.dll
    0x76680000 - 0x76684000 C:\Windows\syswow64\api-ms-win-downlevel-version-l1-1-0.dll
    0x76690000 - 0x76780000 C:\Windows\syswow64\RPCRT4.dll
    0x76780000 - 0x76784000 C:\Windows\syswow64\api-ms-win-downlevel-shlwapi-l1-1-0.dll
    0x76790000 - 0x76796000 C:\Windows\syswow64\NSI.dll
    0x767A0000 - 0x767A5000 C:\Windows\syswow64\api-ms-win-downlevel-advapi32-l1-1-0.dll
    0x767B0000 - 0x7685C000 C:\Windows\syswow64\msvcrt.dll
    0x76860000 - 0x768F0000 C:\Windows\syswow64\GDI32.dll
    0x768F0000 - 0x76947000 C:\Windows\syswow64\SHLWAPI.dll
    0x76950000 - 0x769B0000 C:\Windows\syswow64\IMM32.dll
    0x769B0000 - 0x76A33000 C:\Windows\syswow64\CLBCatQ.DLL
    0x76A40000 - 0x76B40000 C:\Windows\syswow64\USER32.dll
    0x76B40000 - 0x76DEB000 C:\Windows\syswow64\WININET.dll
    0x76DF0000 - 0x76E91000 C:\Windows\syswow64\ADVAPI32.dll
    0x76EA0000 - 0x76ED5000 C:\Windows\syswow64\WS2_32.dll
    0x76EE0000 - 0x77001000 C:\Windows\syswow64\CRYPT32.dll
    0x77160000 - 0x77395000 C:\Windows\syswow64\iertutil.dll
    0x773A0000 - 0x7746D000 C:\Windows\syswow64\MSCTF.dll
    0x77470000 - 0x7747B000 C:\Windows\syswow64\profapi.dll
    0x77480000 - 0x7761D000 C:\Windows\syswow64\SETUPAPI.dll
    0x77620000 - 0x77632000 C:\Windows\syswow64\DEVOBJ.dll
    0x77640000 - 0x776DD000 C:\Windows\syswow64\USP10.dll
    0x776E0000 - 0x776EC000 C:\Windows\syswow64\MSASN1.dll
    0x776F0000 - 0x776F4000 C:\Windows\syswow64\api-ms-win-downlevel-user32-l1-1-0.dll
    0x77700000 - 0x77727000 C:\Windows\syswow64\CFGMGR32.dll
    0x77730000 - 0x77775000 C:\Windows\syswow64\WLDAP32.dll
    0x77780000 - 0x7778A000 C:\Windows\syswow64\LPK.dll
    0x77790000 - 0x778ED000 C:\Windows\syswow64\ole32.dll
    0x77920000 - 0x77939000 C:\Windows\SysWOW64\sechost.dll
    0x77D40000 - 0x77EC0000 C:\Windows\SysWOW64\ntdll.dll


    ----------------------------------------
    Memory Dump
    ----------------------------------------

    Code: 16 bytes starting at (EIP = 00000000)

    00000000: <can't read from this address>


    Stack: 1024 bytes starting at (ESP = 0018F2D0)

    * = addr ** *
    0018F2D0: 22 00 E8 20 4A 23 10 00 FF FF FF FF 00 00 00 00 ".. J#..........
    0018F2E0: 01 00 00 00 B8 D1 45 6F 00 00 00 00 A4 D1 45 6F ......Eo......Eo
    0018F2F0: D0 55 FF 03 00 00 00 00 9C D1 45 6F D0 55 FF 03 .U........Eo.U..
    0018F300: 88 00 12 1E 08 00 00 00 01 00 00 3D 0D 00 00 00 ...........=....
    0018F310: E2 5D 02 15 00 A3 E1 1A 48 F3 18 00 D6 B7 45 6F .]......H.....Eo
    0018F320: 88 00 12 1E 54 F3 18 00 93 A0 45 6F 73 0E 91 BE ....T.....Eos...
    0018F330: 00 00 00 00 54 F3 18 00 7C F3 18 00 28 E6 82 6F ....T...|...(..o
    0018F340: 00 00 00 00 00 00 00 00 E0 04 C9 0E 08 2E 45 6F ..............Eo
    0018F350: E0 04 C9 0E 4C AA 58 0F 93 A0 45 6F 23 0E 91 BE ....L.X...Eo#...
    0018F360: 0C A9 58 0F 0C A9 58 0F 93 A0 45 6F 33 0E 91 BE ..X...X...Eo3...
    0018F370: 50 04 C9 0E 0C A9 58 0F 19 AD 45 6F 0C A9 58 0F P.....X...Eo..X.
    0018F380: 04 00 00 00 44 F3 18 00 80 39 D6 03 90 03 C9 0E ....D....9......
    0018F390: 04 00 00 00 01 00 00 00 00 00 E8 20 E3 0E 91 BE ........... ....
    0018F3A0: 04 00 00 00 AE EF 45 6F D0 55 FF 03 F3 0E 91 BE ......Eo.U......
    0018F3B0: 00 00 00 00 88 00 12 1E 00 00 00 00 AC 00 12 1E ................
    0018F3C0: B0 71 FD 03 01 00 00 00 80 CE 2D 6F 00 00 00 00 .q........-o....
    0018F3D0: BA 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    0018F3E0: 48 5D 02 15 00 04 00 00 E2 5D 02 15 90 B8 B5 0E H].......]......
    0018F3F0: D6 B7 45 6F 88 00 12 1E 28 F4 18 00 93 A0 45 6F ..Eo....(.....Eo
    0018F400: 47 09 91 BE 67 8E F5 00 28 F4 18 00 50 F4 18 00 G...g...(...P...
    0018F410: 28 E6 82 6F 00 00 00 00 32 E8 45 6F 63 09 91 BE (..o....2.Eoc...
    0018F420: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    0018F430: 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 ................
    0018F440: 4A E9 01 00 00 00 00 00 98 F5 18 00 A8 E8 82 6F J..............o
    0018F450: FF FF FF FF 03 FC 45 6F B0 7D 88 12 00 F5 18 00 ......Eo.}......
    0018F460: E0 93 04 00 00 00 00 00 26 00 00 00 88 00 12 1E ........&.......
    0018F470: CC 00 81 0E C0 00 81 0E D4 B6 44 6F B0 7D 88 12 ..........Do.}..
    0018F480: 00 00 00 00 00 F5 18 00 E0 93 04 00 00 00 00 00 ................
    0018F490: 01 00 00 00 00 F5 18 00 6C 49 5F 21 96 83 3A 6F ........lI_!..:eek:
    0018F4A0: 00 00 00 00 00 F5 18 00 E0 93 04 00 00 00 00 00 ................
    0018F4B0: 01 00 00 00 00 00 00 00 54 06 82 0E 00 00 00 00 ........T.......
    0018F4C0: B4 03 86 0E C4 A8 3B 6F 26 00 00 00 00 F5 18 00 ......;o&.......
    0018F4D0: 6C 49 5F 21 00 00 00 00 01 00 00 00 1C 49 5F 21 lI_!.........I_!
    0018F4E0: 55 58 44 6F 00 F5 18 00 6C 49 5F 21 00 00 00 00 UXDo....lI_!....
    0018F4F0: 01 00 00 00 1C 49 5F 21 6C 49 5F 21 1C 49 5F 21 .....I_!lI_!.I_!
    0018F500: 00 00 00 00 F6 73 44 6F 6C 49 5F 21 01 00 00 00 .....sDolI_!....
    0018F510: 1C 49 5F 21 40 49 5F 21 FF FF FF FF 1C 49 5F 21 .I_!@I_!.....I_!
    0018F520: 00 00 00 00 68 01 1E 1E 40 49 5F 21 63 61 74 2B ....h...@I_!cat+
    0018F530: 1C 49 5F 21 33 50 44 6F 72 50 44 6F 00 00 00 00 .I_!3PDorPDo....
    0018F540: 40 49 5F 21 1C 49 5F 21 FF FF FF FF 97 80 44 6F @I_!.I_!......Do
    0018F550: 17 08 91 BE 24 F6 18 00 26 00 00 00 7C F6 18 00 ....$...&...|...
    0018F560: FF FF FF FF B4 03 86 0E 63 61 74 2B 6C 67 61 2B ........cat+lga+
    0018F570: 63 61 74 2B 00 00 00 00 70 E1 47 0E 40 72 AB 6F cat+....p.G.@r.o
    0018F580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    0018F590: FF FF FF FF FF FF FF FF B8 F5 18 00 78 DE 82 6F ............x..o
    0018F5A0: 00 00 00 00 B8 3F 3D 6F 26 00 00 00 F3 08 91 BE .....?=o&.......
    0018F5B0: 72 3B 93 6F 1C 49 5F 21 24 F7 18 00 08 68 82 6F r;.o.I_!$....h.o
    0018F5C0: 00 00 00 00 B8 D1 45 6F E8 24 B7 0E A4 D1 45 6F ......Eo.$....Eo
    0018F5D0: B0 00 A9 0E 9C D1 45 6F 98 FD FB 03 88 00 A5 0E ......Eo........
    0018F5E0: 08 00 00 00 60 63 02 15 E0 63 05 15 50 02 00 00 ....`c...c..P...
    0018F5F0: 00 25 00 00 B0 00 A9 0E 88 00 B7 0E 1A C6 44 6F .%............Do
    0018F600: 48 21 00 04 00 FC 46 E7 60 40 03 0F 3D 1B 4C 6F H!....F.`@..=.Lo
    0018F610: 60 40 03 0F 00 00 00 00 1C 00 00 00 00 00 00 00 `@..............
    0018F620: E8 24 B7 0E 37 32 45 6F 01 00 00 00 CC F9 A7 6F .$..72Eo.......o
    0018F630: FE FF FF FF 00 00 00 00 B0 00 AA 0E 48 21 00 04 ............H!..
    0018F640: 00 FC 46 E7 B7 C7 45 6F B0 00 00 0F 00 00 00 00 ..F...Eo........
    0018F650: 00 00 00 00 46 02 00 00 B0 00 AA 0E 04 00 00 00 ....F...........
    0018F660: 20 F6 18 00 04 1F D6 03 90 00 C9 0E 06 00 00 00 ...............
    0018F670: 01 00 00 00 30 3F 3D 6F 3F 0B 91 BE 04 00 00 00 ....0?=o?.......
    0018F680: AE EF 45 6F 98 FD FB 03 CF 0B 91 BE DC 00 81 0E ..Eo............
    0018F690: 00 00 00 00 00 00 00 00 88 00 A5 0E B0 B9 FC 03 ................
    0018F6A0: 00 00 00 00 00 00 00 00 34 23 10 00 D7 7F 00 00 ........4#......
    0018F6B0: 00 00 7E 46 00 00 80 C6 00 00 00 00 00 00 70 41 ..~F..........pA
    0018F6C0: 49 13 01 6F CD CC CC 3D 00 00 7A 46 00 00 C0 3F I..o...=..zF...?


    ------------------------------------------------------------------------------
    [00:00:00.0] [+6 msec] : Exec:ExecuteFunc...[00:00:00.0] [+1 msec] : Looking for FileSystem___Init function.
    [00:00:00.0] [+172 msec] : Looking for GetModuleProcAddress function.
    [00:00:00.0] [+90 msec] : Looking for GetModuleHandle function.
    [00:00:00.0] [+78 msec] : Looking for GetStringAddress function.
    [00:00:00.0] [+77 msec] : Looking for GetJassContext function.
    [00:00:00.0] [+80 msec] : Looking for SH2I function.
    [00:00:00.0] [+82 msec] : Looking for setStr function.
    [00:00:00.0] [+79 msec] : Looking for CallStdcallWith1Args function.
    [00:00:00.0] [+80 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+84 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+89 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for GetStringAddress function.
    [00:00:00.0] [+77 msec] : Looking for GetJassContext function.
    [00:00:00.0] [+78 msec] : Looking for SH2I function.
    [00:00:00.0] [+76 msec] : Looking for setStr function.
    [00:00:00.0] [+78 msec] : Looking for CallStdcallWith2Args function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+81 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+81 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+83 msec] : Looking for GetModuleProcAddress function.
    [00:00:00.0] [+78 msec] : Looking for GetModuleHandle function.
    [00:00:00.0] [+78 msec] : Looking for GetStringAddress function.
    [00:00:00.0] [+77 msec] : Looking for GetJassContext function.
    [00:00:00.0] [+81 msec] : Looking for SH2I function.
    [00:00:00.0] [+79 msec] : Looking for setStr function.
    [00:00:00.0] [+79 msec] : Looking for CallStdcallWith1Args function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+81 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for GetStringAddress function.
    [00:00:00.0] [+77 msec] : Looking for GetJassContext function.
    [00:00:00.0] [+78 msec] : Looking for SH2I function.
    [00:00:00.0] [+76 msec] : Looking for setStr function.
    [00:00:00.0] [+83 msec] : Looking for CallStdcallWith2Args function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+84 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+81 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+85 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+82 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+86 msec] : [ExecuteFunc] OK [funcName:FileSystem___Init]
    [00:00:00.0] [+7 msec] : Exec:ExecuteFunc...[00:00:00.0] [+1 msec] : Looking for Interface___Init function.
    [00:00:00.0] [+129 msec] : Looking for GetGameUI function.
    [00:00:00.0] [+80 msec] : Looking for fast_call2 function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+89 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+84 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for CreateJassNativeHook function.
    [00:00:00.0] [+79 msec] : Looking for ReadRealPointer2LVL function.
    [00:00:00.0] [+84 msec] : Looking for ReadRealPointer1LVL function.
    [00:00:00.0] [+78 msec] : Looking for ReadRealMemory function.
    [00:00:00.0] [+77 msec] : Looking for ReadRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for ReadRealMemory function.
    [00:00:00.0] [+92 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+81 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+83 msec] : [ExecuteFunc] OK [funcName:Interface___Init]
    [00:00:00.0] [+4 msec] : Exec:ExecuteFunc...[00:00:00.0] [+6 msec] : Looking for RenderEdge___Init function.
    [00:00:00.0] [+104 msec] : Looking for ExportAndInjectDLL function.
    [00:00:00.0] [+80 msec] : Looking for GetModuleHandle function.
    [00:00:00.0] [+77 msec] : Looking for GetStringAddress function.
    [00:00:00.0] [+145 msec] : Looking for GetJassContext function.
    [00:00:00.0] [+79 msec] : Looking for SH2I function.
    [00:00:00.0] [+76 msec] : Looking for setStr function.
    [00:00:00.0] [+78 msec] : Looking for CallStdcallWith1Args function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+77 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+87 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for ExportFileFromMpq function.
    [00:00:00.0] [+83 msec] : Looking for GetStringAddress function.
    [00:00:00.0] [+77 msec] : Looking for GetJassContext function.
    [00:00:00.0] [+78 msec] : Looking for SH2I function.
    [00:00:00.0] [+76 msec] : Looking for setStr function.
    [00:00:00.0] [+77 msec] : Looking for GetStringAddress function.
    [00:00:00.0] [+77 msec] : Looking for GetJassContext function.
    [00:00:00.0] [+78 msec] : Looking for SH2I function.
    [00:00:00.0] [+76 msec] : Looking for setStr function.
    [00:00:00.0] [+77 msec] : Looking for CallFastCallWith2Args function.
    [00:00:00.0] [+84 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+104 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+91 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+78 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+326 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+91 msec] : [ExecuteFunc] OK [funcName:RenderEdge___Init]
    [00:00:00.0] [+6 msec] : Exec:ExecuteFunc...[00:00:00.0] [+1 msec] : Looking for Camera___Init function.
    [00:00:00.0] [+178 msec] : Exec:CreateTrigger[]...[00:00:00.0] [+11 msec] : [CreateTrigger] OK [1057607]
    [00:00:00.0] [+4 msec] : Looking for Camera___OnFrameUpdate function.
    [00:00:00.0] [+85 msec] : Exec:TriggerAddAction[Trigger:1057607, actionFunc:39]...[00:00:00.0] [+16 msec] : [TriggerAddAction] OK [1057608]
    [00:00:00.0] [+5 msec] : Exec:TriggerRegisterTimerEvent[Trigger:1057607, timeout:0.03125, periodic:TRUE]...[00:00:00.0] [+17 msec] : [TriggerRegisterTimerEvent] OK [1057609]
    [00:00:00.0] [+3 msec] : Exec:CreateTrigger[]...[00:00:00.0] [+5 msec] : [CreateTrigger] OK [1057610]
    [00:00:00.0] [+3 msec] : Looking for Camera___OnKeyboardDown function.
    [00:00:00.0] [+77 msec] : Exec:TriggerAddAction[Trigger:1057610, actionFunc:40]...[00:00:00.0] [+13 msec] : [TriggerAddAction] OK [1057611]
    [00:00:00.0] [+4 msec] : Looking for TriggerRegisterKeyEvent function.
    [00:00:00.0] [+77 msec] : Looking for T2I function.
    [00:00:00.0] [+72 msec] : Looking for setTrig function.
    [00:00:00.0] [+74 msec] : Looking for std_call3 function.
    [00:00:00.0] [+75 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+75 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+74 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+74 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+75 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+194 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+132 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+80 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.
    [00:00:00.0] [+79 msec] : Looking for WriteRealMemory function.

    could this be due to me importing improperly or is this .dll just part of the requirements for this to work?


    this is from the recent surge of really useful libs coming out. The more reason there is to use memory hack , the more the angsty opposition feels the need to complain about it.
     
    Last edited: Nov 16, 2017
  13. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    RenderEdge_mini.dll is only required for functions such as GetMouseX and GetTriggerKey and Widescreen Fix. Probably, map should work with imported DLL, but only when functions from it aren't used in the code. Just delete all the code that uses functions from RenderEdge (e.g. Camera Demo and functions like EditMinimapPixel from GUI Demo).
     
  14. Kakerate

    Kakerate

    Joined:
    Oct 18, 2013
    Messages:
    482
    Resources:
    0
    Resources:
    0
    Hmm... I was hoping this wonderful widescreen fix would be .dll free. War3 honestly looks so much cleaner with this.
    I don't suppose there would be any way to download the file clientside on runtime?
     
  15. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    I think this is that are you looking for: [RenderEdge] Widescreen Fix
    It work even in BattleNet (but it's not entirely legal).

    Hmm, I have an idea, wait a bit..

    Ready! Try to host this map.
     

    Attached Files:

    Last edited: Nov 16, 2017
  16. Kakerate

    Kakerate

    Joined:
    Oct 18, 2013
    Messages:
    482
    Resources:
    0
    Resources:
    0
    A solution would definitely be appreciated!
    Really though, the dependency of requiring a file is no big deal at all. Hell, if we get this running on bnet its likely going to require a .dll

    Will get back to you with results.
     
  17. Trigger.edge

    Trigger.edge

    Joined:
    Jun 21, 2012
    Messages:
    419
    Resources:
    0
    Resources:
    0
    Hello, again thanks for posting this, it was what I was looking for 6 months ago, everything is fine execpt by the missing tooltips.

    Is there any way to display them on the screen, likewise for multiboards and leaderboards?
     
  18. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Hi. You can write your own function to hide the interface, or simply comment out this line in the HideInterface function:
    call SetFramePoint(ReadGameUIStruct(FRAME_SimpleConsole), ANCHOR_TOPRIGHT, pRootFrame, ANCHOR_TOPRIGHT, -10.0, 0.0)
     
  19. Trigger.edge

    Trigger.edge

    Joined:
    Jun 21, 2012
    Messages:
    419
    Resources:
    0
    Resources:
    0
    Great. I've also realized that useful functions (or at least for me) like TriggerRegisterMouseWheelEvent do not work for multiplayer maps, is it possible that you can fix this?
     
  20. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Probably, yes. I'm not sure but if i remember correctly, it's possible to write synchronization system, using units orders. But I never thought how exactly this can be implemented.
     
    Last edited: Dec 5, 2017