Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Dekaron Bypass

  1. #11
    kkelaine
    kkelaine is offline
    New member
    Join Date
    2012 Mar
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    2
    Thanked in
    2 Posts
    Rep Power
    0
    can someone nice to post hack in here?

  2. #12
    TheBeast13
    TheBeast13 is offline
    Guest
    Join Date
    2011 Oct
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0
    Thanks for the bypass, good job

  3. #13
    RoterRamses
    RoterRamses is offline
    New member
    Join Date
    2011 Apr
    Posts
    10
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0
    interesting

  4. #14
    yeyi
    yeyi is offline
    Guest
    Join Date
    2012 May
    Posts
    1
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    work?

    i am new here, does it work? I invite you to make a tut

  5. #15
    camalspider1
    camalspider1 is offline
    Guest
    Join Date
    2012 May
    Posts
    1
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    Thumbs up well

    i can't wait to try the bypass out,does it still work?

  6. #16
    deathlost
    deathlost is offline
    Guest
    Join Date
    2012 Jul
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    2
    Thanked in
    1 Post
    Rep Power
    0
    Hacks still works, just use the pause process and inject CE

  7. #17
    gawron25
    gawron25 is offline
    New member
    Join Date
    2012 Mar
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    6
    Thanked in
    2 Posts
    Rep Power
    0

    Source

    Code:
    FUNC _MEMORYOPEN($IV_PID, $IV_DESIREDACCESS = 2035711, $IV_INHERITHANDLE = 1)
        IF NOT PROCESSEXISTS($IV_PID) THEN
            SETERROR(1)
            RETURN 0
        ENDIF
        LOCAL $AH_HANDLE[2] = [DLLOPEN("kernel32.dll")]
        IF @ERROR THEN
            SETERROR(2)
            RETURN 0
        ENDIF
        LOCAL $AV_OPENPROCESS = DLLCALL($AH_HANDLE[0], "int", "OpenProcess", "int", $IV_DESIREDACCESS, "int", $IV_INHERITHANDLE, "int", $IV_PID)
        IF @ERROR THEN
            DLLCLOSE($AH_HANDLE[0])
            SETERROR(3)
            RETURN 0
        ENDIF
        $AH_HANDLE[1] = $AV_OPENPROCESS[0]
        RETURN $AH_HANDLE
    ENDFUNC   ;==>_MEMORYOPEN
    FUNC _MEMORYREAD($IV_ADDRESS, $AH_HANDLE, $SV_TYPE = "dword")
        IF NOT ISARRAY($AH_HANDLE) THEN
            SETERROR(1)
            RETURN 0
        ENDIF
        LOCAL $V_BUFFER = DLLSTRUCTCREATE($SV_TYPE)
        IF @ERROR THEN
            SETERROR(@ERROR + 1)
            RETURN 0
        ENDIF
        DLLCALL($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
        IF NOT @ERROR THEN
            LOCAL $V_VALUE = DLLSTRUCTGETDATA($V_BUFFER, 1)
            RETURN $V_VALUE
        ELSE
            SETERROR(6)
            RETURN 0
        ENDIF
    ENDFUNC   ;==>_MEMORYREAD
    FUNC _MEMORYWRITE($IV_ADDRESS, $AH_HANDLE, $V_DATA, $SV_TYPE = "dword")
        IF NOT ISARRAY($AH_HANDLE) THEN
            SETERROR(1)
            RETURN 0
        ENDIF
        LOCAL $V_BUFFER = DLLSTRUCTCREATE($SV_TYPE)
        IF @ERROR THEN
            SETERROR(@ERROR + 1)
            RETURN 0
        ELSE
            DLLSTRUCTSETDATA($V_BUFFER, 1, $V_DATA)
            IF @ERROR THEN
                SETERROR(6)
                RETURN 0
            ENDIF
        ENDIF
        DLLCALL($AH_HANDLE[0], "int", "WriteProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
        IF NOT @ERROR THEN
            RETURN 1
        ELSE
            SETERROR(7)
            RETURN 0
        ENDIF
    ENDFUNC   ;==>_MEMORYWRITE
    FUNC _MEMORYCLOSE($AH_HANDLE)
        IF NOT ISARRAY($AH_HANDLE) THEN
            SETERROR(1)
            RETURN 0
        ENDIF
        DLLCALL($AH_HANDLE[0], "int", "CloseHandle", "int", $AH_HANDLE[1])
        IF NOT @ERROR THEN
            DLLCLOSE($AH_HANDLE[0])
            RETURN 1
        ELSE
            DLLCLOSE($AH_HANDLE[0])
            SETERROR(2)
            RETURN 0
        ENDIF
    ENDFUNC   ;==>_MEMORYCLOSE
    FUNC SETPRIVILEGE($PRIVILEGE, $BENABLE)
        CONST $TOKEN_ADJUST_PRIVILEGES = 32
        CONST $TOKEN_QUERY = 8
        CONST $SE_PRIVILEGE_ENABLED = 2
        LOCAL $HTOKEN, $SP_AUXRET, $SP_RET, $HCURRPROCESS, $NTOKENS, $NTOKENINDEX, $PRIV
        $NTOKENS = 1
        $LUID = DLLSTRUCTCREATE("dword;int")
        IF ISARRAY($PRIVILEGE) THEN $NTOKENS = UBOUND($PRIVILEGE)
        $TOKEN_PRIVILEGES = DLLSTRUCTCREATE("dword;dword[" & (3 * $NTOKENS) & "]")
        $NEWTOKEN_PRIVILEGES = DLLSTRUCTCREATE("dword;dword[" & (3 * $NTOKENS) & "]")
        $HCURRPROCESS = DLLCALL("kernel32.dll", "hwnd", "GetCurrentProcess")
        $SP_AUXRET = DLLCALL("advapi32.dll", "int", "OpenProcessToken", "hwnd", $HCURRPROCESS[0], "int", BITOR($TOKEN_ADJUST_PRIVILEGES, $TOKEN_QUERY), "int*", 0)
        IF $SP_AUXRET[0] THEN
            $HTOKEN = $SP_AUXRET[3]
            DLLSTRUCTSETDATA($TOKEN_PRIVILEGES, 1, 1)
            $NTOKENINDEX = 1
            WHILE $NTOKENINDEX <= $NTOKENS
                IF ISARRAY($PRIVILEGE) THEN
                    $PRIV = $PRIVILEGE[$NTOKENINDEX - 1]
                ELSE
                    $PRIV = $PRIVILEGE
                ENDIF
                $RET = DLLCALL("advapi32.dll", "int", "LookupPrivilegeValue", "str", "", "str", $PRIV, "ptr", DLLSTRUCTGETPTR($LUID))
                IF $RET[0] THEN
                    IF $BENABLE THEN
                        DLLSTRUCTSETDATA($TOKEN_PRIVILEGES, 2, $SE_PRIVILEGE_ENABLED, (3 * $NTOKENINDEX))
                    ELSE
                        DLLSTRUCTSETDATA($TOKEN_PRIVILEGES, 2, 0, (3 * $NTOKENINDEX))
                    ENDIF
                    DLLSTRUCTSETDATA($TOKEN_PRIVILEGES, 2, DLLSTRUCTGETDATA($LUID, 1), (3 * ($NTOKENINDEX - 1)) + 1)
                    DLLSTRUCTSETDATA($TOKEN_PRIVILEGES, 2, DLLSTRUCTGETDATA($LUID, 2), (3 * ($NTOKENINDEX - 1)) + 2)
                    DLLSTRUCTSETDATA($LUID, 1, 0)
                    DLLSTRUCTSETDATA($LUID, 2, 0)
                ENDIF
                $NTOKENINDEX += 1
            WEND
            $RET = DLLCALL("advapi32.dll", "int", "AdjustTokenPrivileges", "hwnd", $HTOKEN, "int", 0, "ptr", DLLSTRUCTGETPTR($TOKEN_PRIVILEGES), "int", DLLSTRUCTGETSIZE($NEWTOKEN_PRIVILEGES), "ptr", DLLSTRUCTGETPTR($NEWTOKEN_PRIVILEGES), "int*", 0)
            $F = DLLCALL("kernel32.dll", "int", "GetLastError")
        ENDIF
        $NEWTOKEN_PRIVILEGES = 0
        $TOKEN_PRIVILEGES = 0
        $LUID = 0
        IF $SP_AUXRET[0] = 0 THEN RETURN 0
        $SP_AUXRET = DLLCALL("kernel32.dll", "int", "CloseHandle", "hwnd", $HTOKEN)
        IF NOT $RET[0] AND NOT $SP_AUXRET[0] THEN RETURN 0
        RETURN $RET[0]
    ENDFUNC   ;==>SETPRIVILEGE
    FUNC _MEMORYPOINTERREAD($IV_ADDRESS, $AH_HANDLE, $AV_OFFSET, $SV_TYPE = "dword")
        IF ISARRAY($AV_OFFSET) THEN
            IF ISARRAY($AH_HANDLE) THEN
                LOCAL $IV_POINTERCOUNT = UBOUND($AV_OFFSET) - 1
            ELSE
                SETERROR(2)
                RETURN 0
            ENDIF
        ELSE
            SETERROR(1)
            RETURN 0
        ENDIF
        LOCAL $IV_DATA[2], $I
        LOCAL $V_BUFFER = DLLSTRUCTCREATE("dword")
        FOR $I = 0 TO $IV_POINTERCOUNT
            IF $I = $IV_POINTERCOUNT THEN
                $V_BUFFER = DLLSTRUCTCREATE($SV_TYPE)
                IF @ERROR THEN
                    SETERROR(@ERROR + 2)
                    RETURN 0
                ENDIF
                $IV_ADDRESS = "0x" & HEX($IV_DATA[1] + $AV_OFFSET[$I])
                DLLCALL($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
                IF @ERROR THEN
                    SETERROR(7)
                    RETURN 0
                ENDIF
                $IV_DATA[1] = DLLSTRUCTGETDATA($V_BUFFER, 1)
            ELSEIF $I = 0 THEN
                DLLCALL($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
                IF @ERROR THEN
                    SETERROR(7)
                    RETURN 0
                ENDIF
                $IV_DATA[1] = DLLSTRUCTGETDATA($V_BUFFER, 1)
            ELSE
                $IV_ADDRESS = "0x" & HEX($IV_DATA[1] + $AV_OFFSET[$I])
                DLLCALL($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
                IF @ERROR THEN
                    SETERROR(7)
                    RETURN 0
                ENDIF
                $IV_DATA[1] = DLLSTRUCTGETDATA($V_BUFFER, 1)
            ENDIF
        NEXT
        $IV_DATA[0] = $IV_ADDRESS
        RETURN $IV_DATA
    ENDFUNC   ;==>_MEMORYPOINTERREAD
    FUNC _MEMORYPOINTERWRITE($IV_ADDRESS, $AH_HANDLE, $AV_OFFSET, $V_DATA, $SV_TYPE = "dword")
        IF ISARRAY($AV_OFFSET) THEN
            IF ISARRAY($AH_HANDLE) THEN
                LOCAL $IV_POINTERCOUNT = UBOUND($AV_OFFSET) - 1
            ELSE
                SETERROR(2)
                RETURN 0
            ENDIF
        ELSE
            SETERROR(1)
            RETURN 0
        ENDIF
        LOCAL $IV_STRUCTDATA, $I
        LOCAL $V_BUFFER = DLLSTRUCTCREATE("dword")
        FOR $I = 0 TO $IV_POINTERCOUNT
            IF $I = $IV_POINTERCOUNT THEN
                $V_BUFFER = DLLSTRUCTCREATE($SV_TYPE)
                IF @ERROR THEN
                    SETERROR(@ERROR + 3)
                    RETURN 0
                ENDIF
                DLLSTRUCTSETDATA($V_BUFFER, 1, $V_DATA)
                IF @ERROR THEN
                    SETERROR(8)
                    RETURN 0
                ENDIF
                $IV_ADDRESS = "0x" & HEX($IV_STRUCTDATA + $AV_OFFSET[$I])
                DLLCALL($AH_HANDLE[0], "int", "WriteProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
                IF @ERROR THEN
                    SETERROR(9)
                    RETURN 0
                ELSE
                    RETURN $IV_ADDRESS
                ENDIF
            ELSEIF $I = 0 THEN
                DLLCALL($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
                IF @ERROR THEN
                    SETERROR(3)
                    RETURN 0
                ENDIF
                $IV_STRUCTDATA = DLLSTRUCTGETDATA($V_BUFFER, 1)
            ELSE
                $IV_ADDRESS = "0x" & HEX($IV_STRUCTDATA + $AV_OFFSET[$I])
                DLLCALL($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER), "int", "")
                IF @ERROR THEN
                    SETERROR(3)
                    RETURN 0
                ENDIF
                $IV_STRUCTDATA = DLLSTRUCTGETDATA($V_BUFFER, 1)
            ENDIF
        NEXT
    ENDFUNC   ;==>_MEMORYPOINTERWRITE
    FUNC _MEMORYGETBASEADDRESS($AH_HANDLE, $IHEXDEC = 0)
        LOCAL $IV_ADDRESS = 1048576
        LOCAL $V_BUFFER = DLLSTRUCTCREATE("dword;dword;dword;dword;dword;dword;dword")
        LOCAL $VDATA
        LOCAL $VTYPE
        IF NOT ISARRAY($AH_HANDLE) THEN
            SETERROR(1)
            RETURN 0
        ENDIF
        DLLCALL($AH_HANDLE[0], "int", "VirtualQueryEx", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER))
        IF NOT @ERROR THEN
            $VDATA = HEX( DLLSTRUCTGETDATA($V_BUFFER, 2))
            $VTYPE = HEX( DLLSTRUCTGETDATA($V_BUFFER, 3))
            WHILE $VTYPE <> "00000080"
                DLLCALL($AH_HANDLE[0], "int", "VirtualQueryEx", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DLLSTRUCTGETPTR($V_BUFFER), "int", DLLSTRUCTGETSIZE($V_BUFFER))
                $VDATA = HEX( DLLSTRUCTGETDATA($V_BUFFER, 2))
                $VTYPE = HEX( DLLSTRUCTGETDATA($V_BUFFER, 3))
                IF HEX($IV_ADDRESS) = "01000000" THEN EXITLOOP
                $IV_ADDRESS += 65536
            WEND
            IF $VTYPE = "00000080" THEN
                SETERROR(0)
                IF $IHEXDEC = 1 THEN
                    RETURN DEC($VDATA)
                ELSE
                    RETURN $VDATA
                ENDIF
            ELSE
                SETERROR(2)
                RETURN 0
            ENDIF
        ELSE
            SETERROR(3)
            RETURN 0
        ENDIF
    ENDFUNC   ;==>_MEMORYGETBASEADDRESS
    #EndRegion
    FUNC _STRINGEXPLODE($SSTRING, $SDELIMITER, $ILIMIT = 0)
        IF $ILIMIT > 0 THEN
            $SSTRING = STRINGREPLACE($SSTRING, $SDELIMITER, CHR(0), $ILIMIT)
            $SDELIMITER = CHR(0)
        ELSEIF $ILIMIT < 0 THEN
            LOCAL $IINDEX = STRINGINSTR($SSTRING, $SDELIMITER, 0, $ILIMIT)
            IF $IINDEX THEN
                $SSTRING = STRINGLEFT($SSTRING, $IINDEX - 1)
            ENDIF
        ENDIF
        RETURN STRINGSPLIT($SSTRING, $SDELIMITER, 3)
    ENDFUNC   ;==>_STRINGEXPLODE
    FUNC _STRINGINSERT($S_STRING, $S_INSERTSTRING, $I_POSITION)
        LOCAL $I_LENGTH, $S_START, $S_END
        IF $S_STRING = "" OR(NOT ISSTRING($S_STRING)) THEN
            RETURN SETERROR(1, 0, $S_STRING)
        ELSEIF $S_INSERTSTRING = "" OR(NOT ISSTRING($S_STRING)) THEN
            RETURN SETERROR(2, 0, $S_STRING)
        ELSE
            $I_LENGTH = STRINGLEN($S_STRING)
            IF( ABS($I_POSITION) > $I_LENGTH) OR(NOT ISINT($I_POSITION)) THEN
                RETURN SETERROR(3, 0, $S_STRING)
            ENDIF
        ENDIF
        IF $I_POSITION = 0 THEN
            RETURN $S_INSERTSTRING & $S_STRING
        ELSEIF $I_POSITION > 0 THEN
            $S_START = STRINGLEFT($S_STRING, $I_POSITION)
            $S_END = STRINGRIGHT($S_STRING, $I_LENGTH - $I_POSITION)
            RETURN $S_START & $S_INSERTSTRING & $S_END
        ELSEIF $I_POSITION < 0 THEN
            $S_START = STRINGLEFT($S_STRING, ABS($I_LENGTH + $I_POSITION))
            $S_END = STRINGRIGHT($S_STRING, ABS($I_POSITION))
            RETURN $S_START & $S_INSERTSTRING & $S_END
        ENDIF
    ENDFUNC   ;==>_STRINGINSERT
    FUNC _STRINGPROPER($S_STRING)
        LOCAL $IX = 0
        LOCAL $CAPNEXT = 1
        LOCAL $S_NSTR = ""
        LOCAL $S_CURCHAR
        FOR $IX = 1 TO STRINGLEN($S_STRING)
            $S_CURCHAR = STRINGMID($S_STRING, $IX, 1)
            SELECT
                CASE $CAPNEXT = 1
                    IF STRINGREGEXP($S_CURCHAR, "[a-zA-Z¬-óŮÔ]") THEN
                        $S_CURCHAR = STRINGUPPER($S_CURCHAR)
                        $CAPNEXT = 0
                    ENDIF
                CASE NOT STRINGREGEXP($S_CURCHAR, "[a-zA-Z¬-óŮÔ]")
                    $CAPNEXT = 1
                CASE ELSE
                    $S_CURCHAR = STRINGLOWER($S_CURCHAR)
            ENDSELECT
            $S_NSTR &= $S_CURCHAR
        NEXT
        RETURN $S_NSTR
    ENDFUNC   ;==>_STRINGPROPER
    FUNC _STRINGREPEAT($SSTRING, $IREPEATCOUNT)
        LOCAL $SRESULT
        SELECT
            CASE NOT STRINGISINT($IREPEATCOUNT)
                SETERROR(1)
                RETURN ""
            CASE STRINGLEN($SSTRING) < 1
                SETERROR(1)
                RETURN ""
            CASE $IREPEATCOUNT <= 0
                SETERROR(1)
                RETURN ""
            CASE ELSE
                FOR $ICOUNT = 1 TO $IREPEATCOUNT
                    $SRESULT &= $SSTRING
                NEXT
                RETURN $SRESULT
        ENDSELECT
    ENDFUNC   ;==>_STRINGREPEAT
    FUNC _STRINGREVERSE($S_STRING)
        LOCAL $I_LEN = STRINGLEN($S_STRING)
        IF $I_LEN < 1 THEN RETURN SETERROR(1, 0, "")
        LOCAL $T_CHARS = DLLSTRUCTCREATE("char[" & $I_LEN + 1 & "]")
        DLLSTRUCTSETDATA($T_CHARS, 1, $S_STRING)
        LOCAL $A_REV = DLLCALL("msvcrt.dll", "ptr:cdecl", "_strrev", "ptr", DLLSTRUCTGETPTR($T_CHARS))
        IF @ERROR OR $A_REV[0] = 0 THEN RETURN SETERROR(2, 0, "")
        RETURN DLLSTRUCTGETDATA($T_CHARS, 1)
    ENDFUNC   ;==>_STRINGREVERSE
    FUNC _STRINGTOHEX($STRCHAR)
        RETURN HEX( STRINGTOBINARY($STRCHAR))
    ENDFUNC   ;==>_STRINGTOHEX
    FUNC _ARRAYADD(BYREF $AVARRAY, $VVALUE)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, -1)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(2, 0, -1)
        LOCAL $IUBOUND = UBOUND($AVARRAY)
        REDIM $AVARRAY[$IUBOUND + 1]
        $AVARRAY[$IUBOUND] = $VVALUE
        RETURN $IUBOUND
    ENDFUNC   ;==>_ARRAYADD
    FUNC _ARRAYBINARYSEARCH(CONST BYREF $AVARRAY, $VVALUE, $ISTART = 0, $IEND = 0)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, -1)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(5, 0, -1)
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(4, 0, -1)
        LOCAL $IMID = INT(($IEND + $ISTART) / 2)
        IF $AVARRAY[$ISTART] > $VVALUE OR $AVARRAY[$IEND] < $VVALUE THEN RETURN SETERROR(2, 0, -1)
        WHILE $ISTART <= $IMID AND $VVALUE <> $AVARRAY[$IMID]
            IF $VVALUE < $AVARRAY[$IMID] THEN
                $IEND = $IMID - 1
            ELSE
                $ISTART = $IMID + 1
            ENDIF
            $IMID = INT(($IEND + $ISTART) / 2)
        WEND
        IF $ISTART > $IEND THEN RETURN SETERROR(3, 0, -1)
        RETURN $IMID
    ENDFUNC   ;==>_ARRAYBINARYSEARCH
    FUNC _ARRAYCOMBINATIONS(BYREF $AVARRAY, $ISET, $SDELIM = "")
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(2, 0, 0)
        LOCAL $IN = UBOUND($AVARRAY)
        LOCAL $IR = $ISET
        LOCAL $AIDX[$IR]
        FOR $I = 0 TO $IR - 1
            $AIDX[$I] = $I
        NEXT
        LOCAL $ITOTAL = __ARRAY_COMBINATIONS($IN, $IR)
        LOCAL $ILEFT = $ITOTAL
        LOCAL $ARESULT[$ITOTAL + 1]
        $ARESULT[0] = $ITOTAL
        LOCAL $ICOUNT = 1
        WHILE $ILEFT > 0
            __ARRAY_GETNEXT($IN, $IR, $ILEFT, $ITOTAL, $AIDX)
            FOR $I = 0 TO $ISET - 1
                $ARESULT[$ICOUNT] &= $AVARRAY[$AIDX[$I]] & $SDELIM
            NEXT
            IF $SDELIM <> "" THEN $ARESULT[$ICOUNT] = STRINGTRIMRIGHT($ARESULT[$ICOUNT], 1)
            $ICOUNT += 1
        WEND
        RETURN $ARESULT
    ENDFUNC   ;==>_ARRAYCOMBINATIONS
    FUNC _ARRAYCONCATENATE(BYREF $AVARRAYTARGET, CONST BYREF $AVARRAYSOURCE, $ISTART = 0)
        IF NOT ISARRAY($AVARRAYTARGET) THEN RETURN SETERROR(1, 0, 0)
        IF NOT ISARRAY($AVARRAYSOURCE) THEN RETURN SETERROR(2, 0, 0)
        IF UBOUND($AVARRAYTARGET, 0) <> 1 THEN
            IF UBOUND($AVARRAYSOURCE, 0) <> 1 THEN RETURN SETERROR(5, 0, 0)
            RETURN SETERROR(3, 0, 0)
        ENDIF
        IF UBOUND($AVARRAYSOURCE, 0) <> 1 THEN RETURN SETERROR(4, 0, 0)
        LOCAL $IUBOUNDTARGET = UBOUND($AVARRAYTARGET) - $ISTART, $IUBOUNDSOURCE = UBOUND($AVARRAYSOURCE)
        REDIM $AVARRAYTARGET[$IUBOUNDTARGET + $IUBOUNDSOURCE]
        FOR $I = $ISTART TO $IUBOUNDSOURCE - 1
            $AVARRAYTARGET[$IUBOUNDTARGET + $I] = $AVARRAYSOURCE[$I]
        NEXT
        RETURN $IUBOUNDTARGET + $IUBOUNDSOURCE
    ENDFUNC   ;==>_ARRAYCONCATENATE
    FUNC _ARRAYCREATE($V_0, $V_1 = 0, $V_2 = 0, $V_3 = 0, $V_4 = 0, $V_5 = 0, $V_6 = 0, $V_7 = 0, $V_8 = 0, $V_9 = 0, $V_10 = 0, $V_11 = 0, $V_12 = 0, $V_13 = 0, $V_14 = 0, $V_15 = 0, $V_16 = 0, $V_17 = 0, $V_18 = 0, $V_19 = 0, $V_20 = 0)
        LOCAL $AV_ARRAY[21] = [$V_0, $V_1, $V_2, $V_3, $V_4, $V_5, $V_6, $V_7, $V_8, $V_9, $V_10, $V_11, $V_12, $V_13, $V_14, $V_15, $V_16, $V_17, $V_18, $V_19, $V_20]
        REDIM $AV_ARRAY[@NUMPARAMS]
        RETURN $AV_ARRAY
    ENDFUNC   ;==>_ARRAYCREATE
    FUNC _ARRAYDELETE(BYREF $AVARRAY, $IELEMENT)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        LOCAL $IUBOUND = UBOUND($AVARRAY, 1) - 1
        IF NOT $IUBOUND THEN
            $AVARRAY = ""
            RETURN 0
        ENDIF
        IF $IELEMENT < 0 THEN $IELEMENT = 0
        IF $IELEMENT > $IUBOUND THEN $IELEMENT = $IUBOUND
        SWITCH UBOUND($AVARRAY, 0)
            CASE 1
                FOR $I = $IELEMENT TO $IUBOUND - 1
                    $AVARRAY[$I] = $AVARRAY[$I + 1]
                NEXT
                REDIM $AVARRAY[$IUBOUND]
            CASE 2
                LOCAL $ISUBMAX = UBOUND($AVARRAY, 2) - 1
                FOR $I = $IELEMENT TO $IUBOUND - 1
                    FOR $J = 0 TO $ISUBMAX
                        $AVARRAY[$I][$J] = $AVARRAY[$I + 1][$J]
                    NEXT
                NEXT
                REDIM $AVARRAY[$IUBOUND][$ISUBMAX + 1]
            CASE ELSE
                RETURN SETERROR(3, 0, 0)
        ENDSWITCH
        RETURN $IUBOUND
    ENDFUNC   ;==>_ARRAYDELETE
    FUNC _ARRAYDISPLAY(CONST BYREF $AVARRAY, $STITLE = "Array: ListView Display", $IITEMLIMIT = -1, $ITRANSPOSE = 0, $SSEPARATOR = "", $SREPLACE = "|", $SHEADER = "")
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        LOCAL $IDIMENSION = UBOUND($AVARRAY, 0), $IUBOUND = UBOUND($AVARRAY, 1) - 1, $ISUBMAX = UBOUND($AVARRAY, 2) - 1
        IF $IDIMENSION > 2 THEN RETURN SETERROR(2, 0, 0)
        IF $SSEPARATOR = "" THEN $SSEPARATOR = CHR(124)
        IF _ARRAYSEARCH($AVARRAY, $SSEPARATOR, 0, 0, 0, 1) <> -1 THEN
            FOR $X = 1 TO 255
                IF $X >= 32 AND $X <= 127 THEN CONTINUELOOP
                LOCAL $SFIND = _ARRAYSEARCH($AVARRAY, CHR($X), 0, 0, 0, 1)
                IF $SFIND = -1 THEN
                    $SSEPARATOR = CHR($X)
                    EXITLOOP
                ENDIF
            NEXT
        ENDIF
        LOCAL $VTMP, $IBUFFER = 64
        LOCAL $ICOLLIMIT = 250
        LOCAL $IONEVENTMODE = OPT("GUIOnEventMode", 0), $SDATASEPARATORCHAR = OPT("GUIDataSeparatorChar", $SSEPARATOR)
        IF $ISUBMAX < 0 THEN $ISUBMAX = 0
        IF $ITRANSPOSE THEN
            $VTMP = $IUBOUND
            $IUBOUND = $ISUBMAX
            $ISUBMAX = $VTMP
        ENDIF
        IF $ISUBMAX > $ICOLLIMIT THEN $ISUBMAX = $ICOLLIMIT
        IF $IITEMLIMIT < 1 THEN $IITEMLIMIT = $IUBOUND
        IF $IUBOUND > $IITEMLIMIT THEN $IUBOUND = $IITEMLIMIT
        IF $SHEADER = "" THEN
            $SHEADER = "Row  "
            FOR $I = 0 TO $ISUBMAX
                $SHEADER &= $SSEPARATOR & "Col " & $I
            NEXT
        ENDIF
        LOCAL $AVARRAYTEXT[$IUBOUND + 1]
        FOR $I = 0 TO $IUBOUND
            $AVARRAYTEXT[$I] = "[" & $I & "]"
            FOR $J = 0 TO $ISUBMAX
                IF $IDIMENSION = 1 THEN
                    IF $ITRANSPOSE THEN
                        $VTMP = $AVARRAY[$J]
                    ELSE
                        $VTMP = $AVARRAY[$I]
                    ENDIF
                ELSE
                    IF $ITRANSPOSE THEN
                        $VTMP = $AVARRAY[$J][$I]
                    ELSE
                        $VTMP = $AVARRAY[$I][$J]
                    ENDIF
                ENDIF
                $VTMP = STRINGREPLACE($VTMP, $SSEPARATOR, $SREPLACE, 0, 1)
                $AVARRAYTEXT[$I] &= $SSEPARATOR & $VTMP
                $VTMP = STRINGLEN($VTMP)
                IF $VTMP > $IBUFFER THEN $IBUFFER = $VTMP
            NEXT
        NEXT
        $IBUFFER += 1
        LOCAL CONST $_ARRAYCONSTANT_GUI_DOCKBORDERS = 102
        LOCAL CONST $_ARRAYCONSTANT_GUI_DOCKBOTTOM = 64
        LOCAL CONST $_ARRAYCONSTANT_GUI_DOCKHEIGHT = 512
        LOCAL CONST $_ARRAYCONSTANT_GUI_DOCKLEFT = 2
        LOCAL CONST $_ARRAYCONSTANT_GUI_DOCKRIGHT = 4
        LOCAL CONST $_ARRAYCONSTANT_GUI_EVENT_CLOSE = -3
        LOCAL CONST $_ARRAYCONSTANT_LVIF_PARAM = 4
        LOCAL CONST $_ARRAYCONSTANT_LVIF_TEXT = 1
        LOCAL CONST $_ARRAYCONSTANT_LVM_GETCOLUMNWIDTH = (4096 + 29)
        LOCAL CONST $_ARRAYCONSTANT_LVM_GETITEMCOUNT = (4096 + 4)
        LOCAL CONST $_ARRAYCONSTANT_LVM_GETITEMSTATE = (4096 + 44)
        LOCAL CONST $_ARRAYCONSTANT_LVM_INSERTITEMW = (4096 + 77)
        LOCAL CONST $_ARRAYCONSTANT_LVM_SETEXTENDEDLISTVIEWSTYLE = (4096 + 54)
        LOCAL CONST $_ARRAYCONSTANT_LVM_SETITEMW = (4096 + 76)
        LOCAL CONST $_ARRAYCONSTANT_LVS_EX_FULLROWSELECT = 32
        LOCAL CONST $_ARRAYCONSTANT_LVS_EX_GRIDLINES = 1
        LOCAL CONST $_ARRAYCONSTANT_LVS_SHOWSELALWAYS = 8
        LOCAL CONST $_ARRAYCONSTANT_WS_EX_CLIENTEDGE = 512
        LOCAL CONST $_ARRAYCONSTANT_WS_MAXIM****OX = 65536
        LOCAL CONST $_ARRAYCONSTANT_WS_MINIM****OX = 131072
        LOCAL CONST $_ARRAYCONSTANT_WS_S****OX = 262144
        LOCAL CONST $_ARRAYCONSTANT_TAGLVITEM = "int Mask;int Item;int SubItem;int State;int StateMask;ptr Text;int TextMax;int Image;int Param;int Indent;int GroupID;int Columns;ptr pColumns"
        LOCAL $IADDMASK = BITOR($_ARRAYCONSTANT_LVIF_TEXT, $_ARRAYCONSTANT_LVIF_PARAM)
        LOCAL $TBUFFER = DLLSTRUCTCREATE("wchar Text[" & $IBUFFER & "]"), $PBUFFER = DLLSTRUCTGETPTR($TBUFFER)
        LOCAL $TITEM = DLLSTRUCTCREATE($_ARRAYCONSTANT_TAGLVITEM), $PITEM = DLLSTRUCTGETPTR($TITEM)
        DLLSTRUCTSETDATA($TITEM, "Param", 0)
        DLLSTRUCTSETDATA($TITEM, "Text", $PBUFFER)
        DLLSTRUCTSETDATA($TITEM, "TextMax", $IBUFFER)
        LOCAL $IWIDTH = 640, $IHEIGHT = 480
        LOCAL $HGUI = GUICREATE($STITLE, $IWIDTH, $IHEIGHT, DEFAULT, DEFAULT, BITOR($_ARRAYCONSTANT_WS_S****OX, $_ARRAYCONSTANT_WS_MINIM****OX, $_ARRAYCONSTANT_WS_MAXIM****OX))
        LOCAL $AIGUISIZE = WINGETCLIENTSIZE($HGUI)
        LOCAL $HLISTVIEW = GUICTRLCREATELISTVIEW($SHEADER, 0, 0, $AIGUISIZE[0], $AIGUISIZE[1] - 26, $_ARRAYCONSTANT_LVS_SHOWSELALWAYS)
        LOCAL $HCOPY = GUICTRLCREATEBUTTON("Copy Selected", 3, $AIGUISIZE[1] - 23, $AIGUISIZE[0] - 6, 20)
        GUICTRLSETRESIZING($HLISTVIEW, $_ARRAYCONSTANT_GUI_DOCKBORDERS)
        GUICTRLSETRESIZING($HCOPY, $_ARRAYCONSTANT_GUI_DOCKLEFT + $_ARRAYCONSTANT_GUI_DOCKRIGHT + $_ARRAYCONSTANT_GUI_DOCKBOTTOM + $_ARRAYCONSTANT_GUI_DOCKHEIGHT)
        GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_SETEXTENDEDLISTVIEWSTYLE, $_ARRAYCONSTANT_LVS_EX_GRIDLINES, $_ARRAYCONSTANT_LVS_EX_GRIDLINES)
        GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_SETEXTENDEDLISTVIEWSTYLE, $_ARRAYCONSTANT_LVS_EX_FULLROWSELECT, $_ARRAYCONSTANT_LVS_EX_FULLROWSELECT)
        GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_SETEXTENDEDLISTVIEWSTYLE, $_ARRAYCONSTANT_WS_EX_CLIENTEDGE, $_ARRAYCONSTANT_WS_EX_CLIENTEDGE)
        LOCAL $AITEM
        FOR $I = 0 TO $IUBOUND
            IF GUICTRLCREATELISTVIEWITEM($AVARRAYTEXT[$I], $HLISTVIEW) = 0 THEN
                $AITEM = STRINGSPLIT($AVARRAYTEXT[$I], $SSEPARATOR)
                DLLSTRUCTSETDATA($TBUFFER, "Text", $AITEM[1])
                DLLSTRUCTSETDATA($TITEM, "Item", $I)
                DLLSTRUCTSETDATA($TITEM, "SubItem", 0)
                DLLSTRUCTSETDATA($TITEM, "Mask", $IADDMASK)
                GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_INSERTITEMW, 0, $PITEM)
                DLLSTRUCTSETDATA($TITEM, "Mask", $_ARRAYCONSTANT_LVIF_TEXT)
                FOR $J = 2 TO $AITEM[0]
                    DLLSTRUCTSETDATA($TBUFFER, "Text", $AITEM[$J])
                    DLLSTRUCTSETDATA($TITEM, "SubItem", $J - 1)
                    GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_SETITEMW, 0, $PITEM)
                NEXT
            ENDIF
        NEXT
        $IWIDTH = 0
        FOR $I = 0 TO $ISUBMAX + 1
            $IWIDTH += GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_GETCOLUMNWIDTH, $I, 0)
        NEXT
        IF $IWIDTH < 250 THEN $IWIDTH = 230
        $IWIDTH += 20
        IF $IWIDTH > @DESKTOPWIDTH THEN $IWIDTH = @DESKTOPWIDTH - 100
        WINMOVE($HGUI, "", (@DESKTOPWIDTH - $IWIDTH) / 2, DEFAULT, $IWIDTH)
        GUISETSTATE(@SW_SHOW, $HGUI)
        WHILE 1
            SWITCH GUIGETMSG()
                CASE $_ARRAYCONSTANT_GUI_EVENT_CLOSE
                    EXITLOOP
                CASE $HCOPY
                    LOCAL $SCLIP = ""
                    LOCAL $AICURITEMS[1] = [0]
                    FOR $I = 0 TO GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_GETITEMCOUNT, 0, 0)
                        IF GUICTRLSENDMSG($HLISTVIEW, $_ARRAYCONSTANT_LVM_GETITEMSTATE, $I, 2) THEN
                            $AICURITEMS[0] += 1
                            REDIM $AICURITEMS[$AICURITEMS[0] + 1]
                            $AICURITEMS[$AICURITEMS[0]] = $I
                        ENDIF
                    NEXT
                    IF NOT $AICURITEMS[0] THEN
                        FOR $SITEM IN $AVARRAYTEXT
                            $SCLIP &= $SITEM & @CRLF
                        NEXT
                    ELSE
                        FOR $I = 1 TO UBOUND($AICURITEMS) - 1
                            $SCLIP &= $AVARRAYTEXT[$AICURITEMS[$I]] & @CRLF
                        NEXT
                    ENDIF
                    CLIPPUT($SCLIP)
            ENDSWITCH
        WEND
        GUIDELETE($HGUI)
        OPT("GUIOnEventMode", $IONEVENTMODE)
        OPT("GUIDataSeparatorChar", $SDATASEPARATORCHAR)
        RETURN 1
    ENDFUNC   ;==>_ARRAYDISPLAY
    FUNC _ARRAYFINDALL(CONST BYREF $AVARRAY, $VVALUE, $ISTART = 0, $IEND = 0, $ICASE = 0, $IPARTIAL = 0, $ISUBITEM = 0)
        $ISTART = _ARRAYSEARCH($AVARRAY, $VVALUE, $ISTART, $IEND, $ICASE, $IPARTIAL, 1, $ISUBITEM)
        IF @ERROR THEN RETURN SETERROR(@ERROR, 0, -1)
        LOCAL $IINDEX = 0, $AVRESULT[UBOUND($AVARRAY)]
        DO
            $AVRESULT[$IINDEX] = $ISTART
            $IINDEX += 1
            $ISTART = _ARRAYSEARCH($AVARRAY, $VVALUE, $ISTART + 1, $IEND, $ICASE, $IPARTIAL, 1, $ISUBITEM)
        UNTIL @ERROR
        REDIM $AVRESULT[$IINDEX]
        RETURN $AVRESULT
    ENDFUNC   ;==>_ARRAYFINDALL
    FUNC _ARRAYINSERT(BYREF $AVARRAY, $IELEMENT, $VVALUE = "")
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(2, 0, 0)
        LOCAL $IUBOUND = UBOUND($AVARRAY) + 1
        REDIM $AVARRAY[$IUBOUND]
        FOR $I = $IUBOUND - 1 TO $IELEMENT + 1 STEP -1
            $AVARRAY[$I] = $AVARRAY[$I - 1]
        NEXT
        $AVARRAY[$IELEMENT] = $VVALUE
        RETURN $IUBOUND
    ENDFUNC   ;==>_ARRAYINSERT
    FUNC _ARRAYMAX(CONST BYREF $AVARRAY, $ICOMPNUMERIC = 0, $ISTART = 0, $IEND = 0)
        LOCAL $IRESULT = _ARRAYMAXINDEX($AVARRAY, $ICOMPNUMERIC, $ISTART, $IEND)
        IF @ERROR THEN RETURN SETERROR(@ERROR, 0, "")
        RETURN $AVARRAY[$IRESULT]
    ENDFUNC   ;==>_ARRAYMAX
    FUNC _ARRAYMAXINDEX(CONST BYREF $AVARRAY, $ICOMPNUMERIC = 0, $ISTART = 0, $IEND = 0)
        IF NOT ISARRAY($AVARRAY) OR UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(1, 0, -1)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(3, 0, -1)
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(2, 0, -1)
        LOCAL $IMAXINDEX = $ISTART
        IF $ICOMPNUMERIC THEN
            FOR $I = $ISTART TO $IEND
                IF NUMBER($AVARRAY[$IMAXINDEX]) < NUMBER($AVARRAY[$I]) THEN $IMAXINDEX = $I
            NEXT
        ELSE
            FOR $I = $ISTART TO $IEND
                IF $AVARRAY[$IMAXINDEX] < $AVARRAY[$I] THEN $IMAXINDEX = $I
            NEXT
        ENDIF
        RETURN $IMAXINDEX
    ENDFUNC   ;==>_ARRAYMAXINDEX
    FUNC _ARRAYMIN(CONST BYREF $AVARRAY, $ICOMPNUMERIC = 0, $ISTART = 0, $IEND = 0)
        LOCAL $IRESULT = _ARRAYMININDEX($AVARRAY, $ICOMPNUMERIC, $ISTART, $IEND)
        IF @ERROR THEN RETURN SETERROR(@ERROR, 0, "")
        RETURN $AVARRAY[$IRESULT]
    ENDFUNC   ;==>_ARRAYMIN
    FUNC _ARRAYMININDEX(CONST BYREF $AVARRAY, $ICOMPNUMERIC = 0, $ISTART = 0, $IEND = 0)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, -1)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(3, 0, -1)
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(2, 0, -1)
        LOCAL $IMININDEX = $ISTART
        IF $ICOMPNUMERIC THEN
            FOR $I = $ISTART TO $IEND
                IF NUMBER($AVARRAY[$IMININDEX]) > NUMBER($AVARRAY[$I]) THEN $IMININDEX = $I
            NEXT
        ELSE
            FOR $I = $ISTART TO $IEND
                IF $AVARRAY[$IMININDEX] > $AVARRAY[$I] THEN $IMININDEX = $I
            NEXT
        ENDIF
        RETURN $IMININDEX
    ENDFUNC   ;==>_ARRAYMININDEX
    FUNC _ARRAYPERMUTE(BYREF $AVARRAY, $SDELIM = "")
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(2, 0, 0)
        LOCAL $ISIZE = UBOUND($AVARRAY), $IFACTORIAL = 1, $AIDX[$ISIZE], $ARESULT[1], $ICOUNT = 1
        FOR $I = 0 TO $ISIZE - 1
            $AIDX[$I] = $I
        NEXT
        FOR $I = $ISIZE TO 1 STEP -1
            $IFACTORIAL *= $I
        NEXT
        REDIM $ARESULT[$IFACTORIAL + 1]
        $ARESULT[0] = $IFACTORIAL
        __ARRAY_EXETERINTERNAL($AVARRAY, 0, $ISIZE, $SDELIM, $AIDX, $ARESULT, $ICOUNT)
        RETURN $ARESULT
    ENDFUNC   ;==>_ARRAYPERMUTE
    FUNC _ARRAYPOP(BYREF $AVARRAY)
        IF(NOT ISARRAY($AVARRAY)) THEN RETURN SETERROR(1, 0, "")
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(2, 0, "")
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1, $SLASTVAL = $AVARRAY[$IUBOUND]
        IF NOT $IUBOUND THEN
            $AVARRAY = ""
        ELSE
            REDIM $AVARRAY[$IUBOUND]
        ENDIF
        RETURN $SLASTVAL
    ENDFUNC   ;==>_ARRAYPOP
    FUNC _ARRAYPUSH(BYREF $AVARRAY, $VVALUE, $IDIRECTION = 0)
        IF(NOT ISARRAY($AVARRAY)) THEN RETURN SETERROR(1, 0, 0)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(3, 0, 0)
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1
        IF ISARRAY($VVALUE) THEN
            LOCAL $IUBOUNDS = UBOUND($VVALUE)
            IF($IUBOUNDS - 1) > $IUBOUND THEN RETURN SETERROR(2, 0, 0)
            IF $IDIRECTION THEN
                FOR $I = $IUBOUND TO $IUBOUNDS STEP -1
                    $AVARRAY[$I] = $AVARRAY[$I - $IUBOUNDS]
                NEXT
                FOR $I = 0 TO $IUBOUNDS - 1
                    $AVARRAY[$I] = $VVALUE[$I]
                NEXT
            ELSE
                FOR $I = 0 TO $IUBOUND - $IUBOUNDS
                    $AVARRAY[$I] = $AVARRAY[$I + $IUBOUNDS]
                NEXT
                FOR $I = 0 TO $IUBOUNDS - 1
                    $AVARRAY[$I + $IUBOUND - $IUBOUNDS + 1] = $VVALUE[$I]
                NEXT
            ENDIF
        ELSE
            IF $IDIRECTION THEN
                FOR $I = $IUBOUND TO 1 STEP -1
                    $AVARRAY[$I] = $AVARRAY[$I - 1]
                NEXT
                $AVARRAY[0] = $VVALUE
            ELSE
                FOR $I = 0 TO $IUBOUND - 1
                    $AVARRAY[$I] = $AVARRAY[$I + 1]
                NEXT
                $AVARRAY[$IUBOUND] = $VVALUE
            ENDIF
        ENDIF
        RETURN 1
    ENDFUNC   ;==>_ARRAYPUSH
    FUNC _ARRAYREVERSE(BYREF $AVARRAY, $ISTART = 0, $IEND = 0)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(3, 0, 0)
        LOCAL $VTMP, $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(2, 0, 0)
        FOR $I = $ISTART TO INT(($ISTART + $IEND - 1) / 2)
            $VTMP = $AVARRAY[$I]
            $AVARRAY[$I] = $AVARRAY[$IEND]
            $AVARRAY[$IEND] = $VTMP
            $IEND -= 1
        NEXT
        RETURN 1
    ENDFUNC   ;==>_ARRAYREVERSE
    FUNC _ARRAYSEARCH(CONST BYREF $AVARRAY, $VVALUE, $ISTART = 0, $IEND = 0, $ICASE = 0, $IPARTIAL = 0, $IFORWARD = 1, $ISUBITEM = -1)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, -1)
        IF UBOUND($AVARRAY, 0) > 2 OR UBOUND($AVARRAY, 0) < 1 THEN RETURN SETERROR(2, 0, -1)
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(4, 0, -1)
        LOCAL $ISTEP = 1
        IF NOT $IFORWARD THEN
            LOCAL $ITMP = $ISTART
            $ISTART = $IEND
            $IEND = $ITMP
            $ISTEP = -1
        ENDIF
        SWITCH UBOUND($AVARRAY, 0)
            CASE 1
                IF NOT $IPARTIAL THEN
                    IF NOT $ICASE THEN
                        FOR $I = $ISTART TO $IEND STEP $ISTEP
                            IF $AVARRAY[$I] = $VVALUE THEN RETURN $I
                        NEXT
                    ELSE
                        FOR $I = $ISTART TO $IEND STEP $ISTEP
                            IF $AVARRAY[$I] == $VVALUE THEN RETURN $I
                        NEXT
                    ENDIF
                ELSE
                    FOR $I = $ISTART TO $IEND STEP $ISTEP
                        IF STRINGINSTR($AVARRAY[$I], $VVALUE, $ICASE) > 0 THEN RETURN $I
                    NEXT
                ENDIF
            CASE 2
                LOCAL $IUBOUNDSUB = UBOUND($AVARRAY, 2) - 1
                IF $ISUBITEM > $IUBOUNDSUB THEN $ISUBITEM = $IUBOUNDSUB
                IF $ISUBITEM < 0 THEN
                    $ISUBITEM = 0
                ELSE
                    $IUBOUNDSUB = $ISUBITEM
                ENDIF
                FOR $J = $ISUBITEM TO $IUBOUNDSUB
                    IF NOT $IPARTIAL THEN
                        IF NOT $ICASE THEN
                            FOR $I = $ISTART TO $IEND STEP $ISTEP
                                IF $AVARRAY[$I][$J] = $VVALUE THEN RETURN $I
                            NEXT
                        ELSE
                            FOR $I = $ISTART TO $IEND STEP $ISTEP
                                IF $AVARRAY[$I][$J] == $VVALUE THEN RETURN $I
                            NEXT
                        ENDIF
                    ELSE
                        FOR $I = $ISTART TO $IEND STEP $ISTEP
                            IF STRINGINSTR($AVARRAY[$I][$J], $VVALUE, $ICASE) > 0 THEN RETURN $I
                        NEXT
                    ENDIF
                NEXT
            CASE ELSE
                RETURN SETERROR(7, 0, -1)
        ENDSWITCH
        RETURN SETERROR(6, 0, -1)
    ENDFUNC   ;==>_ARRAYSEARCH
    FUNC _ARRAYSORT(BYREF $AVARRAY, $IDESCENDING = 0, $ISTART = 0, $IEND = 0, $ISUBITEM = 0)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(2, 0, 0)
        SWITCH UBOUND($AVARRAY, 0)
            CASE 1
                __ARRAYQUICKSORT1D($AVARRAY, $ISTART, $IEND)
                IF $IDESCENDING THEN _ARRAYREVERSE($AVARRAY, $ISTART, $IEND)
            CASE 2
                LOCAL $ISUBMAX = UBOUND($AVARRAY, 2) - 1
                IF $ISUBITEM > $ISUBMAX THEN RETURN SETERROR(3, 0, 0)
                IF $IDESCENDING THEN
                    $IDESCENDING = -1
                ELSE
                    $IDESCENDING = 1
                ENDIF
                __ARRAYQUICKSORT2D($AVARRAY, $IDESCENDING, $ISTART, $IEND, $ISUBITEM, $ISUBMAX)
            CASE ELSE
                RETURN SETERROR(4, 0, 0)
        ENDSWITCH
        RETURN 1
    ENDFUNC   ;==>_ARRAYSORT
    FUNC __ARRAYQUICKSORT1D(BYREF $AVARRAY, BYREF $ISTART, BYREF $IEND)
        IF $IEND <= $ISTART THEN RETURN
        LOCAL $VTMP
        IF($IEND - $ISTART) < 15 THEN
            LOCAL $VCUR
            FOR $I = $ISTART + 1 TO $IEND
                $VTMP = $AVARRAY[$I]
                IF ISNUMBER($VTMP) THEN
                    FOR $J = $I - 1 TO $ISTART STEP -1
                        $VCUR = $AVARRAY[$J]
                        IF($VTMP >= $VCUR AND ISNUMBER($VCUR)) OR(NOT ISNUMBER($VCUR) AND STRINGCOMPARE($VTMP, $VCUR) >= 0) THEN EXITLOOP
                        $AVARRAY[$J + 1] = $VCUR
                    NEXT
                ELSE
                    FOR $J = $I - 1 TO $ISTART STEP -1
                        IF( STRINGCOMPARE($VTMP, $AVARRAY[$J]) >= 0) THEN EXITLOOP
                        $AVARRAY[$J + 1] = $AVARRAY[$J]
                    NEXT
                ENDIF
                $AVARRAY[$J + 1] = $VTMP
            NEXT
            RETURN
        ENDIF
        LOCAL $L = $ISTART, $R = $IEND, $VPIVOT = $AVARRAY[INT(($ISTART + $IEND) / 2)], $FNUM = ISNUMBER($VPIVOT)
        DO
            IF $FNUM THEN
                WHILE($AVARRAY[$L] < $VPIVOT AND ISNUMBER($AVARRAY[$L])) OR(NOT ISNUMBER($AVARRAY[$L]) AND STRINGCOMPARE($AVARRAY[$L], $VPIVOT) < 0)
                    $L += 1
                WEND
                WHILE($AVARRAY[$R] > $VPIVOT AND ISNUMBER($AVARRAY[$R])) OR(NOT ISNUMBER($AVARRAY[$R]) AND STRINGCOMPARE($AVARRAY[$R], $VPIVOT) > 0)
                    $R -= 1
                WEND
            ELSE
                WHILE( STRINGCOMPARE($AVARRAY[$L], $VPIVOT) < 0)
                    $L += 1
                WEND
                WHILE( STRINGCOMPARE($AVARRAY[$R], $VPIVOT) > 0)
                    $R -= 1
                WEND
            ENDIF
            IF $L <= $R THEN
                $VTMP = $AVARRAY[$L]
                $AVARRAY[$L] = $AVARRAY[$R]
                $AVARRAY[$R] = $VTMP
                $L += 1
                $R -= 1
            ENDIF
        UNTIL $L > $R
        __ARRAYQUICKSORT1D($AVARRAY, $ISTART, $R)
        __ARRAYQUICKSORT1D($AVARRAY, $L, $IEND)
    ENDFUNC   ;==>__ARRAYQUICKSORT1D
    FUNC __ARRAYQUICKSORT2D(BYREF $AVARRAY, BYREF $ISTEP, BYREF $ISTART, BYREF $IEND, BYREF $ISUBITEM, BYREF $ISUBMAX)
        IF $IEND <= $ISTART THEN RETURN
        LOCAL $VTMP, $L = $ISTART, $R = $IEND, $VPIVOT = $AVARRAY[INT(($ISTART + $IEND) / 2)][$ISUBITEM], $FNUM = ISNUMBER($VPIVOT)
        DO
            IF $FNUM THEN
                WHILE($ISTEP * ($AVARRAY[$L][$ISUBITEM] - $VPIVOT) < 0 AND ISNUMBER($AVARRAY[$L][$ISUBITEM])) OR(NOT ISNUMBER($AVARRAY[$L][$ISUBITEM]) AND $ISTEP * STRINGCOMPARE($AVARRAY[$L][$ISUBITEM], $VPIVOT) < 0)
                    $L += 1
                WEND
                WHILE($ISTEP * ($AVARRAY[$R][$ISUBITEM] - $VPIVOT) > 0 AND ISNUMBER($AVARRAY[$R][$ISUBITEM])) OR(NOT ISNUMBER($AVARRAY[$R][$ISUBITEM]) AND $ISTEP * STRINGCOMPARE($AVARRAY[$R][$ISUBITEM], $VPIVOT) > 0)
                    $R -= 1
                WEND
            ELSE
                WHILE($ISTEP * STRINGCOMPARE($AVARRAY[$L][$ISUBITEM], $VPIVOT) < 0)
                    $L += 1
                WEND
                WHILE($ISTEP * STRINGCOMPARE($AVARRAY[$R][$ISUBITEM], $VPIVOT) > 0)
                    $R -= 1
                WEND
            ENDIF
            IF $L <= $R THEN
                FOR $I = 0 TO $ISUBMAX
                    $VTMP = $AVARRAY[$L][$I]
                    $AVARRAY[$L][$I] = $AVARRAY[$R][$I]
                    $AVARRAY[$R][$I] = $VTMP
                NEXT
                $L += 1
                $R -= 1
            ENDIF
        UNTIL $L > $R
        __ARRAYQUICKSORT2D($AVARRAY, $ISTEP, $ISTART, $R, $ISUBITEM, $ISUBMAX)
        __ARRAYQUICKSORT2D($AVARRAY, $ISTEP, $L, $IEND, $ISUBITEM, $ISUBMAX)
    ENDFUNC   ;==>__ARRAYQUICKSORT2D
    FUNC _ARRAYSWAP(BYREF $VITEM1, BYREF $VITEM2)
        LOCAL $VTMP = $VITEM1
        $VITEM1 = $VITEM2
        $VITEM2 = $VTMP
    ENDFUNC   ;==>_ARRAYSWAP
    FUNC _ARRAYTOCLIP(CONST BYREF $AVARRAY, $ISTART = 0, $IEND = 0)
        LOCAL $SRESULT = _ARRAYTOSTRING($AVARRAY, @CR, $ISTART, $IEND)
        IF @ERROR THEN RETURN SETERROR(@ERROR, 0, 0)
        RETURN CLIPPUT($SRESULT)
    ENDFUNC   ;==>_ARRAYTOCLIP
    FUNC _ARRAYTOSTRING(CONST BYREF $AVARRAY, $SDELIM = "|", $ISTART = 0, $IEND = 0)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, "")
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(3, 0, "")
        LOCAL $SRESULT, $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(2, 0, "")
        FOR $I = $ISTART TO $IEND
            $SRESULT &= $AVARRAY[$I] & $SDELIM
        NEXT
        RETURN STRINGTRIMRIGHT($SRESULT, STRINGLEN($SDELIM))
    ENDFUNC   ;==>_ARRAYTOSTRING
    FUNC _ARRAYTRIM(BYREF $AVARRAY, $ITRIMNUM, $IDIRECTION = 0, $ISTART = 0, $IEND = 0)
        IF NOT ISARRAY($AVARRAY) THEN RETURN SETERROR(1, 0, 0)
        IF UBOUND($AVARRAY, 0) <> 1 THEN RETURN SETERROR(2, 0, 0)
        LOCAL $IUBOUND = UBOUND($AVARRAY) - 1
        IF $IEND < 1 OR $IEND > $IUBOUND THEN $IEND = $IUBOUND
        IF $ISTART < 0 THEN $ISTART = 0
        IF $ISTART > $IEND THEN RETURN SETERROR(5, 0, 0)
        IF $IDIRECTION THEN
            FOR $I = $ISTART TO $IEND
                $AVARRAY[$I] = STRINGTRIMRIGHT($AVARRAY[$I], $ITRIMNUM)
            NEXT
        ELSE
            FOR $I = $ISTART TO $IEND
                $AVARRAY[$I] = STRINGTRIMLEFT($AVARRAY[$I], $ITRIMNUM)
            NEXT
        ENDIF
        RETURN 1
    ENDFUNC   ;==>_ARRAYTRIM
    FUNC _ARRAYUNIQUE($AARRAY, $IDIMENSION = 1, $IBASE = 0, $ICASE = 0, $VDELIM = "|")
        LOCAL $IUBOUNDDIM
        IF $VDELIM = "|" THEN $VDELIM = CHR(1)
        IF NOT ISARRAY($AARRAY) THEN RETURN SETERROR(1, 0, 0)
        IF NOT $IDIMENSION > 0 THEN
            RETURN SETERROR(3, 0, 0)
        ELSE
            $IUBOUNDDIM = UBOUND($AARRAY, 1)
            IF @ERROR THEN RETURN SETERROR(3, 0, 0)
            IF $IDIMENSION > 1 THEN
                LOCAL $AARRAYTMP[1]
                FOR $I = 0 TO $IUBOUNDDIM - 1
                    _ARRAYADD($AARRAYTMP, $AARRAY[$I][$IDIMENSION - 1])
                NEXT
                _ARRAYDELETE($AARRAYTMP, 0)
            ELSE
                IF UBOUND($AARRAY, 0) = 1 THEN
                    DIM $AARRAYTMP[1]
                    FOR $I = 0 TO $IUBOUNDDIM - 1
                        _ARRAYADD($AARRAYTMP, $AARRAY[$I])
                    NEXT
                    _ARRAYDELETE($AARRAYTMP, 0)
                ELSE
                    DIM $AARRAYTMP[1]
                    FOR $I = 0 TO $IUBOUNDDIM - 1
                        _ARRAYADD($AARRAYTMP, $AARRAY[$I][$IDIMENSION - 1])
                    NEXT
                    _ARRAYDELETE($AARRAYTMP, 0)
                ENDIF
            ENDIF
        ENDIF
        LOCAL $SHOLD
        FOR $ICC = $IBASE TO UBOUND($AARRAYTMP) - 1
            IF NOT STRINGINSTR($VDELIM & $SHOLD, $VDELIM & $AARRAYTMP[$ICC] & $VDELIM, $ICASE) THEN $SHOLD &= $AARRAYTMP[$ICC] & $VDELIM
        NEXT
        IF $SHOLD THEN
            $AARRAYTMP = STRINGSPLIT( STRINGTRIMRIGHT($SHOLD, STRINGLEN($VDELIM)), $VDELIM, 1)
            RETURN $AARRAYTMP
        ENDIF
        RETURN SETERROR(2, 0, 0)
    ENDFUNC   ;==>_ARRAYUNIQUE
    FUNC __ARRAY_EXETERINTERNAL(BYREF $AVARRAY, $ISTART, $ISIZE, $SDELIM, BYREF $AIDX, BYREF $ARESULT, BYREF $ICOUNT)
        IF $ISTART == $ISIZE - 1 THEN
            FOR $I = 0 TO $ISIZE - 1
                $ARESULT[$ICOUNT] &= $AVARRAY[$AIDX[$I]] & $SDELIM
            NEXT
            IF $SDELIM <> "" THEN $ARESULT[$ICOUNT] = STRINGTRIMRIGHT($ARESULT[$ICOUNT], 1)
            $ICOUNT += 1
        ELSE
            LOCAL $ITEMP
            FOR $I = $ISTART TO $ISIZE - 1
                $ITEMP = $AIDX[$I]
                $AIDX[$I] = $AIDX[$ISTART]
                $AIDX[$ISTART] = $ITEMP
                __ARRAY_EXETERINTERNAL($AVARRAY, $ISTART + 1, $ISIZE, $SDELIM, $AIDX, $ARESULT, $ICOUNT)
                $AIDX[$ISTART] = $AIDX[$I]
                $AIDX[$I] = $ITEMP
            NEXT
        ENDIF
    ENDFUNC   ;==>__ARRAY_EXETERINTERNAL
    FUNC __ARRAY_COMBINATIONS($IN, $IR)
        LOCAL $I_TOTAL = 1
        FOR $I = $IR TO 1 STEP -1
            $I_TOTAL *= ($IN / $I)
            $IN -= 1
        NEXT
        RETURN ROUND($I_TOTAL)
    ENDFUNC   ;==>__ARRAY_COMBINATIONS
    FUNC __ARRAY_GETNEXT($IN, $IR, BYREF $ILEFT, $ITOTAL, BYREF $AIDX)
        IF $ILEFT == $ITOTAL THEN
            $ILEFT -= 1
            RETURN
        ENDIF
        LOCAL $I = $IR - 1
        WHILE $AIDX[$I] == $IN - $IR + $I
            $I -= 1
        WEND
        $AIDX[$I] += 1
        FOR $J = $I + 1 TO $IR - 1
            $AIDX[$J] = $AIDX[$I] + $J - $I
        NEXT
        $ILEFT -= 1
    ENDFUNC   ;==>__ARRAY_GETNEXT
    GLOBAL CONST $GMEM_FIXED = 0
    GLOBAL CONST $GMEM_MOVEABLE = 2
    GLOBAL CONST $GMEM_NOCOMPACT = 16
    GLOBAL CONST $GMEM_NODISCARD = 32
    GLOBAL CONST $GMEM_ZEROINIT = 64
    GLOBAL CONST $GMEM_MODIFY = 128
    GLOBAL CONST $GMEM_DISCARDABLE = 256
    GLOBAL CONST $GMEM_NOT_BANKED = 4096
    GLOBAL CONST $GMEM_SHARE = 8192
    GLOBAL CONST $GMEM_DDESHARE = 8192
    GLOBAL CONST $GMEM_NOTIFY = 16384
    GLOBAL CONST $GMEM_LOWER = 4096
    GLOBAL CONST $GMEM_VALID_FLAGS = 32626
    GLOBAL CONST $GMEM_INVALID_HANDLE = 32768
    GLOBAL CONST $GPTR = $GMEM_FIXED + $GMEM_ZEROINIT
    GLOBAL CONST $GHND = $GMEM_MOVEABLE + $GMEM_ZEROINIT
    GLOBAL CONST $MEM_COMMIT = 4096
    GLOBAL CONST $MEM_RESERVE = 8192
    GLOBAL CONST $MEM_TOP_DOWN = 1048576
    GLOBAL CONST $MEM_SHARED = 134217728
    GLOBAL CONST $PAGE_NOACCESS = 1
    GLOBAL CONST $PAGE_READONLY = 2
    GLOBAL CONST $PAGE_READWRITE = 4
    GLOBAL CONST $PAGE_EXECUTE = 16
    GLOBAL CONST $PAGE_EXECUTE_READ = 32
    GLOBAL CONST $PAGE_EXECUTE_READWRITE = 64
    GLOBAL CONST $PAGE_GUARD = 256
    GLOBAL CONST $PAGE_NOCACHE = 512
    GLOBAL CONST $MEM_DECOMMIT = 16384
    GLOBAL CONST $MEM_RELEASE = 32768
    GLOBAL CONST $TAGPOINT = "long X;long Y"
    GLOBAL CONST $TAGRECT = "long Left;long Top;long Right;long Bottom"
    GLOBAL CONST $TAGSIZE = "long X;long Y"
    GLOBAL CONST $TAGMARGINS = "int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight"
    GLOBAL CONST $TAGFILETIME = "dword Lo;dword Hi"
    GLOBAL CONST $TAGSYSTEMTIME = "word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds"
    GLOBAL CONST $TAGTIME_ZONE_INFORMATION = "long Bias;wchar StdName[32];word StdDate[8];long StdBias;wchar DayName[32];word DayDate[8];long DayBias"
    GLOBAL CONST $TAGNMHDR = "hwnd hWndFrom;uint_ptr IDFrom;INT Code"
    GLOBAL CONST $TAGCOMBOBOXEXITEM = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
    GLOBAL CONST $TAGNMCBEDRAGBEGIN = $TAGNMHDR & ";int ItemID;ptr szText"
    GLOBAL CONST $TAGNMCBEENDEDIT = $TAGNMHDR & ";bool fChanged;int NewSelection;ptr szText;int Why"
    GLOBAL CONST $TAGNMCOMBOBOXEX = $TAGNMHDR & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
    GLOBAL CONST $TAGDTPRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;" & "word MinSecond;word MinMSecond;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;" & "word MaxMinute;word MaxSecond;word MaxMSecond;bool MinValid;bool MaxValid"
    GLOBAL CONST $TAGNMDATETIMECHANGE = $TAGNMHDR & ";dword Flag;" & $TAGSYSTEMTIME
    GLOBAL CONST $TAGNMDATETIMEFORMAT = $TAGNMHDR & ";ptr Format;" & $TAGSYSTEMTIME & ";ptr pDisplay;wchar Display[64]"
    GLOBAL CONST $TAGNMDATETIMEFORMATQUERY = $TAGNMHDR & ";ptr Format;long SizeX;long SizeY"
    GLOBAL CONST $TAGNMDATETIMEKEYDOWN = $TAGNMHDR & ";int VirtKey;ptr Format;" & $TAGSYSTEMTIME
    GLOBAL CONST $TAGNMDATETIMESTRING = $TAGNMHDR & ";ptr UserString;" & $TAGSYSTEMTIME & ";dword Flags"
    GLOBAL CONST $TAGEVENTLOGRECORD = "dword Length;dword Reserved;dword RecordNumber;dword TimeGenerated;dword TimeWritten;dword EventID;" & "word EventType;word NumStrings;word EventCategory;word ReservedFlags;dword ClosingRecordNumber;dword StringOffset;" & "dword UserSidLength;dword UserSidOffset;dword DataLength;dword DataOffset"
    GLOBAL CONST $TAGGDIPBITMAPDATA = "uint Width;uint Height;int Stride;int Format;ptr Scan0;uint_ptr Reserved"
    GLOBAL CONST $TAGGDIPENCODERPARAM = "byte GUID[16];dword Count;dword Type;ptr Values"
    GLOBAL CONST $TAGGDIPENCODERPARAMS = "dword Count;byte Params[0]"
    GLOBAL CONST $TAGGDIPRECTF = "float X;float Y;float Width;float Height"
    GLOBAL CONST $TAGGDIPSTARTUPINPUT = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
    GLOBAL CONST $TAGGDIPSTARTUPOUTPUT = "ptr HookProc;ptr UnhookProc"
    GLOBAL CONST $TAGGDIPIMAGECODECINFO = "byte CLSID[16];byte FormatID[16];ptr CodecName;ptr DllName;ptr FormatDesc;ptr FileExt;" & "ptr MimeType;dword Flags;dword Version;dword SigCount;dword SigSize;ptr SigPattern;ptr SigMask"
    GLOBAL CONST $TAGGDIPPENCODERPARAMS = "dword Count;byte Params[0]"
    GLOBAL CONST $TAGHDITEM = "uint Mask;int XY;ptr Text;handle hBMP;int TextMax;int Fmt;lparam Param;int Image;int Order;uint Type;ptr pFilter;uint State"
    GLOBAL CONST $TAGNMHDDISPINFO = $TAGNMHDR & ";int Item;uint Mask;ptr Text;int TextMax;int Image;lparam lParam"
    GLOBAL CONST $TAGNMHDFILTERBTNCLICK = $TAGNMHDR & ";int Item;" & $TAGRECT
    GLOBAL CONST $TAGNMHEADER = $TAGNMHDR & ";int Item;int Button;ptr pItem"
    GLOBAL CONST $TAGGETIPADDRESS = "byte Field4;byte Field3;byte Field2;byte Field1"
    GLOBAL CONST $TAGNMIPADDRESS = $TAGNMHDR & ";int Field;int Value"
    GLOBAL CONST $TAGLVFINDINFO = "uint Flags;ptr Text;lparam Param;" & $TAGPOINT & ";uint Direction"
    GLOBAL CONST $TAGLVHITTESTINFO = $TAGPOINT & ";uint Flags;int Item;int SubItem"
    GLOBAL CONST $TAGLVITEM = "uint Mask;int Item;int SubItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;lparam Param;" & "int Indent;int GroupID;uint Columns;ptr pColumns"
    GLOBAL CONST $TAGNMLISTVIEW = $TAGNMHDR & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "long ActionX;long ActionY;lparam Param"
    GLOBAL CONST $TAGNMLVCUSTOMDRAW = $TAGNMHDR & ";dword dwDrawStage;handle hdc;long Left;long Top;long Right;long Bottom;" & "dword_ptr dwItemSpec;uint uItemState;lparam lItemlParam" & ";dword clrText;dword clrTextBk;int iSubItem;dword dwItemType;dword clrFace;int iIconEffect;" & "int iIconPhase;int iPartId;int iStateId;long TextLeft;long TextTop;long TextRight;long TextBottom;uint uAlign"
    GLOBAL CONST $TAGNMLVDISPINFO = $TAGNMHDR & ";" & $TAGLVITEM
    GLOBAL CONST $TAGNMLVFINDITEM = $TAGNMHDR & ";" & $TAGLVFINDINFO
    GLOBAL CONST $TAGNMLVGETINFOTIP = $TAGNMHDR & ";dword Flags;ptr Text;int TextMax;int Item;int SubItem;lparam lParam"
    GLOBAL CONST $TAGNMITEMACTIVATE = $TAGNMHDR & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $TAGPOINT & ";lparam lParam;uint KeyFlags"
    GLOBAL CONST $TAGNMLVKEYDOWN = $TAGNMHDR & ";align 1;word VKey;uint Flags"
    GLOBAL CONST $TAGNMLVSCROLL = $TAGNMHDR & ";int DX;int DY"
    GLOBAL CONST $TAGMCHITTESTINFO = "uint Size;" & $TAGPOINT & ";uint Hit;" & $TAGSYSTEMTIME
    GLOBAL CONST $TAGMCMONTHRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short Span"
    GLOBAL CONST $TAGMCRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short MinSet;short MaxSet"
    GLOBAL CONST $TAGMCSELRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds"
    GLOBAL CONST $TAGNMDAYSTATE = $TAGNMHDR & ";" & $TAGSYSTEMTIME & ";int DayState;ptr pDayState"
    GLOBAL CONST $TAGNMSELCHANGE = $TAGNMHDR & ";word BegYear;word BegMonth;word BegDOW;word BegDay;" & "word BegHour;word BegMinute;word BegSecond;word BegMSeconds;word EndYear;word EndMonth;word EndDOW;" & "word EndDay;word EndHour;word EndMinute;word EndSecond;word EndMSeconds"
    GLOBAL CONST $TAGNMOBJECTNOTIFY = $TAGNMHDR & ";int Item;ptr piid;ptr pObject;long Result"
    GLOBAL CONST $TAGNMTCKEYDOWN = $TAGNMHDR & ";word VKey;uint Flags"
    GLOBAL CONST $TAGTVITEM = "uint Mask;handle hItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;int SelectedImage;" & "int Children;lparam Param"
    GLOBAL CONST $TAGTVITEMEX = $TAGTVITEM & ";int Integral"
    GLOBAL CONST $TAGNMTREEVIEW = $TAGNMHDR & ";uint Action;uint OldMask;handle OldhItem;uint OldState;uint OldStateMask;" & "ptr OldText;int OldTextMax;int OldImage;int OldSelectedImage;int OldChildren;lparam OldParam;uint NewMask;handle NewhItem;" & "uint NewState;uint NewStateMask;ptr NewText;int NewTextMax;int NewImage;int NewSelectedImage;int NewChildren;" & "lparam NewParam;long PointX;long PointY"
    GLOBAL CONST $TAGNMTVCUSTOMDRAW = $TAGNMHDR & ";dword DrawStage;handle HDC;long Left;long Top;long Right;long Bottom;" & "dword_ptr ItemSpec;uint ItemState;lparam ItemParam;dword ClrText;dword ClrTextBk;int Level"
    GLOBAL CONST $TAGNMTVDISPINFO = $TAGNMHDR & ";" & $TAGTVITEM
    GLOBAL CONST $TAGNMTVGETINFOTIP = $TAGNMHDR & ";ptr Text;int TextMax;handle hItem;lparam lParam"
    GLOBAL CONST $TAGTVHITTESTINFO = $TAGPOINT & ";uint Flags;handle Item"
    GLOBAL CONST $TAGNMTVKEYDOWN = $TAGNMHDR & ";word VKey;uint Flags"
    GLOBAL CONST $TAGNMMOUSE = $TAGNMHDR & ";dword_ptr ItemSpec;dword_ptr ItemData;" & $TAGPOINT & ";lparam HitInfo"
    GLOBAL CONST $TAGTOKEN_PRIVILEGES = "dword Count;int64 LUID;dword Attributes"
    GLOBAL CONST $TAGIMAGEINFO = "handle hBitmap;handle hMask;int Unused1;int Unused2;" & $TAGRECT
    GLOBAL CONST $TAGMENUINFO = "dword Size;INT Mask;dword Style;uint YMax;handle hBack;dword ContextHelpID;ulong_ptr MenuData"
    GLOBAL CONST $TAGMENUITEMINFO = "uint Size;uint Mask;uint Type;uint State;uint ID;handle SubMenu;handle BmpChecked;handle BmpUnchecked;" & "ulong_ptr ItemData;ptr TypeData;uint CCH;handle BmpItem"
    GLOBAL CONST $TAGREBARBANDINFO = "uint cbSize;uint fMask;uint fStyle;dword clrFore;dword clrBack;ptr lpText;uint cch;" & "int iImage;hwnd hwndChild;uint cxMinChild;uint cyMinChild;uint cx;handle hbmBack;uint wID;uint cyChild;uint cyMaxChild;" & "uint cyIntegral;uint cxIdeal;lparam lParam;uint cxHeader"
    GLOBAL CONST $TAGNMREBARAUTOBREAK = $TAGNMHDR & ";uint uBand;uint wID;lparam lParam;uint uMsg;uint fStyleCurrent;bool fAutoBreak"
    GLOBAL CONST $TAGNMRBAUTOSIZE = $TAGNMHDR & ";bool fChanged;long TargetLeft;long TargetTop;long TargetRight;long TargetBottom;" & "long ActualLeft;long ActualTop;long ActualRight;long ActualBottom"
    GLOBAL CONST $TAGNMREBAR = $TAGNMHDR & ";dword dwMask;uint uBand;uint fStyle;uint wID;laram lParam"
    GLOBAL CONST $TAGNMREBARCHEVRON = $TAGNMHDR & ";uint uBand;uint wID;lparam lParam;" & $TAGRECT & ";lparam lParamNM"
    GLOBAL CONST $TAGNMREBARCHILDSIZE = $TAGNMHDR & ";uint uBand;uint wID;long CLeft;long CTop;long CRight;long CBottom;" & "long BLeft;long BTop;long BRight;long BBottom"
    GLOBAL CONST $TAGCOLORSCHEME = "dword Size;dword BtnHighlight;dword BtnShadow"
    GLOBAL CONST $TAGNMTOOLBAR = $TAGNMHDR & ";int iItem;" & "int iBitmap;int idCommand;byte fsState;byte fsStyle;align;dword_ptr dwData;int_ptr iString" & ";int cchText;ptr pszText;" & $TAGRECT
    GLOBAL CONST $TAGNMTBHOTITEM = $TAGNMHDR & ";int idOld;int idNew;dword dwFlags"
    GLOBAL CONST $TAGTBBUTTON = "int Bitmap;int Command;byte State;byte Style;align;dword_ptr Param;int_ptr String"
    GLOBAL CONST $TAGTBBUTTONINFO = "uint Size;dword Mask;int Command;int Image;byte State;byte Style;word CX;dword_ptr Param;ptr Text;int TextMax"
    GLOBAL CONST $TAGNETRESOURCE = "dword Scope;dword Type;dword DisplayType;dword Usage;ptr LocalName;ptr RemoteName;ptr Comment;ptr Provider"
    GLOBAL CONST $TAGOVERLAPPED = "ulong_ptr Internal;ulong_ptr InternalHigh;dword Offset;dword OffsetHigh;handle hEvent"
    GLOBAL CONST $TAGOPENFILENAME = "dword StructSize;hwnd hwndOwner;handle hInstance;ptr lpstrFilter;ptr lpstrCustomFilter;" & "dword nMaxCustFilter;dword nFilterIndex;ptr lpstrFile;dword nMaxFile;ptr lpstrFileTitle;dword nMaxFileTitle;" & "ptr lpstrInitialDir;ptr lpstrTitle;dword Flags;word nFileOffset;word nFileExtension;ptr lpstrDefExt;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName;ptr pvReserved;dword dwReserved;dword FlagsEx"
    GLOBAL CONST $TAGBITMAPINFO = "dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;" & "long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;dword RGBQuad"
    GLOBAL CONST $TAGBLENDFUNCTION = "byte Op;byte Flags;byte Alpha;byte Format"
    GLOBAL CONST $TAGGUID = "dword Data1;word Data2;word Data3;byte Data4[8]"
    GLOBAL CONST $TAGWINDOWPLACEMENT = "uint length; uint flags;uint showCmd;long ptMinPosition[2];long ptMaxPosition[2];long rcNormalPosition[4]"
    GLOBAL CONST $TAGWINDOWPOS = "hwnd hWnd;hwnd InsertAfter;int X;int Y;int CX;int CY;uint Flags"
    GLOBAL CONST $TAGSCROLLINFO = "uint cbSize;uint fMask;int  nMin;int  nMax;uint nPage;int  nPos;int  nTrackPos"
    GLOBAL CONST $TAGSCROLLBARINFO = "dword cbSize;" & $TAGRECT & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
    GLOBAL CONST $TAGLOGFONT = "long Height;long Width;long Escapement;long Orientation;long Weight;byte Italic;byte Underline;" & "byte Strikeout;byte CharSet;byte OutPrecision;byte ClipPrecision;byte Quality;byte PitchAndFamily;wchar FaceName[32]"
    GLOBAL CONST $TAGKBDLLHOOKSTRUCT = "dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo"
    GLOBAL CONST $TAGPROCESS_INFORMATION = "handle hProcess;handle hThread;dword ProcessID;dword ThreadID"
    GLOBAL CONST $TAGSTARTUPINFO = "dword Size;ptr Reserved1;ptr Desktop;ptr Title;dword X;dword Y;dword XSize;dword YSize;dword XCountChars;" & "dword YCountChars;dword FillAttribute;dword Flags;word ShowWindow;word Reserved2;ptr Reserved3;handle StdInput;" & "handle StdOutput;handle StdError"
    GLOBAL CONST $TAGSECURITY_ATTRIBUTES = "dword Length;ptr Descriptor;bool InheritHandle"
    GLOBAL CONST $TAGWIN32_FIND_DATA = "dword dwFileAttributes; dword ftCreationTime[2]; dword ftLastAccessTime[2]; dword ftLastWriteTime[2]; dword nFileSizeHigh; dword nFileSizeLow; dword dwReserved0; dword dwReserved1; wchar cFileName[260]; wchar cAlternateFileName[14]"
    GLOBAL CONST $PROCESS_TERMINATE = 1
    GLOBAL CONST $PROCESS_CREATE_THREAD = 2
    GLOBAL CONST $PROCESS_SET_SESSIONID = 4
    GLOBAL CONST $PROCESS_VM_OPERATION = 8
    GLOBAL CONST $PROCESS_VM_READ = 16
    GLOBAL CONST $PROCESS_VM_WRITE = 32
    GLOBAL CONST $PROCESS_DUP_HANDLE = 64
    GLOBAL CONST $PROCESS_CREATE_PROCESS = 128
    GLOBAL CONST $PROCESS_SET_QUOTA = 256
    GLOBAL CONST $PROCESS_SET_INFORMATION = 512
    GLOBAL CONST $PROCESS_QUERY_INFORMATION = 1024
    GLOBAL CONST $PROCESS_SUSPEND_RESUME = 2048
    GLOBAL CONST $PROCESS_ALL_ACCESS = 2035711
    GLOBAL CONST $ERROR_NO_TOKEN = 1008
    GLOBAL CONST $SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege"
    GLOBAL CONST $SE_AUDIT_NAME = "SeAuditPrivilege"
    GLOBAL CONST $SE_BACKUP_NAME = "SeBackupPrivilege"
    GLOBAL CONST $SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege"
    GLOBAL CONST $SE_CREATE_GLOBAL_NAME = "SeCreateGlobalPrivilege"
    GLOBAL CONST $SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege"
    GLOBAL CONST $SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege"
    GLOBAL CONST $SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege"
    GLOBAL CONST $SE_DEBUG_NAME = "SeDebugPrivilege"
    GLOBAL CONST $SE_ENABLE_DELEGATION_NAME = "SeEnableDelegationPrivilege"
    GLOBAL CONST $SE_IMPERSONATE_NAME = "SeImpersonatePrivilege"
    GLOBAL CONST $SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"
    GLOBAL CONST $SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege"
    GLOBAL CONST $SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege"
    GLOBAL CONST $SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege"
    GLOBAL CONST $SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege"
    GLOBAL CONST $SE_MANAGE_VOLUME_NAME = "SeManageVolumePrivilege"
    GLOBAL CONST $SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"
    GLOBAL CONST $SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege"
    GLOBAL CONST $SE_RESTORE_NAME = "SeRestorePrivilege"
    GLOBAL CONST $SE_SECURITY_NAME = "SeSecurityPrivilege"
    GLOBAL CONST $SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
    GLOBAL CONST $SE_SYNC_AGENT_NAME = "SeSyncAgentPrivilege"
    GLOBAL CONST $SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege"
    GLOBAL CONST $SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege"
    GLOBAL CONST $SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege"
    GLOBAL CONST $SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege"
    GLOBAL CONST $SE_TCB_NAME = "SeTcbPrivilege"
    GLOBAL CONST $SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege"
    GLOBAL CONST $SE_UNDOCK_NAME = "SeUndockPrivilege"
    GLOBAL CONST $SE_PRIVILEGE_ENABLED_BY_DEFAULT = 1
    GLOBAL CONST $SE_PRIVILEGE_ENABLED = 2
    GLOBAL CONST $SE_PRIVILEGE_REMOVED = 4
    GLOBAL CONST $SE_PRIVILEGE_USED_FOR_ACCESS = - - - 2147483648
    GLOBAL CONST $TOKENUSER = 1
    GLOBAL CONST $TOKENGROUPS = 2
    GLOBAL CONST $TOKENPRIVILEGES = 3
    GLOBAL CONST $TOKENOWNER = 4
    GLOBAL CONST $TOKENPRIMARYGROUP = 5
    GLOBAL CONST $TOKENDEFAULTDACL = 6
    GLOBAL CONST $TOKENSOURCE = 7
    GLOBAL CONST $TOKENTYPE = 8
    GLOBAL CONST $TOKENIMPERSONATIONLEVEL = 9
    GLOBAL CONST $TOKENSTATISTICS = 10
    GLOBAL CONST $TOKENRESTRICTEDSIDS = 11
    GLOBAL CONST $TOKENSESSIONID = 12
    GLOBAL CONST $TOKENGROUPSANDPRIVILEGES = 13
    GLOBAL CONST $TOKENSESSIONREFERENCE = 14
    GLOBAL CONST $TOKENSANDBOXINERT = 15
    GLOBAL CONST $TOKENAUDITPOLICY = 16
    GLOBAL CONST $TOKENORIGIN = 17
    GLOBAL CONST $TOKENELEVATIONTYPE = 18
    GLOBAL CONST $TOKENLINKEDTOKEN = 19
    GLOBAL CONST $TOKENELEVATION = 20
    GLOBAL CONST $TOKENHASRESTRICTIONS = 21
    GLOBAL CONST $TOKENACCESSINFORMATION = 22
    GLOBAL CONST $TOKENVIRTUALIZATIONALLOWED = 23
    GLOBAL CONST $TOKENVIRTUALIZATIONENABLED = 24
    GLOBAL CONST $TOKENINTEGRITYLEVEL = 25
    GLOBAL CONST $TOKENUIACCESS = 26
    GLOBAL CONST $TOKENMANDATORYPOLICY = 27
    GLOBAL CONST $TOKENLOGONSID = 28
    GLOBAL CONST $TOKEN_ASSIGN_PRIMARY = 1
    GLOBAL CONST $TOKEN_DUPLICATE = 2
    GLOBAL CONST $TOKEN_IMPERSONATE = 4
    GLOBAL CONST $TOKEN_QUERY = 8
    GLOBAL CONST $TOKEN_QUERY_SOURCE = 16
    GLOBAL CONST $TOKEN_ADJUST_PRIVILEGES = 32
    GLOBAL CONST $TOKEN_ADJUST_GROUPS = 64
    GLOBAL CONST $TOKEN_ADJUST_DEFAULT = 128
    GLOBAL CONST $TOKEN_ADJUST_SESSIONID = 256
    GLOBAL CONST $FC_NOOVERWRITE = 0
    GLOBAL CONST $FC_OVERWRITE = 1
    GLOBAL CONST $FT_MODIFIED = 0
    GLOBAL CONST $FT_CREATED = 1
    GLOBAL CONST $FT_ACCESSED = 2
    GLOBAL CONST $FO_READ = 0
    GLOBAL CONST $FO_APPEND = 1
    GLOBAL CONST $FO_OVERWRITE = 2
    GLOBAL CONST $FO_BINARY = 16
    GLOBAL CONST $FO_UNICODE = 32
    GLOBAL CONST $FO_UTF16_LE = 32
    GLOBAL CONST $FO_UTF16_BE = 64
    GLOBAL CONST $FO_UTF8 = 128
    GLOBAL CONST $FO_UTF8_NOBOM = 256
    GLOBAL CONST $EOF = -1
    GLOBAL CONST $FD_FILEMUSTEXIST = 1
    GLOBAL CONST $FD_PATHMUSTEXIST = 2
    GLOBAL CONST $FD_MULTISELECT = 4
    GLOBAL CONST $FD_PROMPTCREATENEW = 8
    GLOBAL CONST $FD_PROMPTOVERWRITE = 16
    GLOBAL CONST $CREATE_NEW = 1
    GLOBAL CONST $CREATE_ALWAYS = 2
    GLOBAL CONST $OPEN_EXISTING = 3
    GLOBAL CONST $OPEN_ALWAYS = 4
    GLOBAL CONST $TRUNCATE_EXISTING = 5
    GLOBAL CONST $INVALID_SET_FILE_POINTER = -1
    GLOBAL CONST $FILE_BEGIN = 0
    GLOBAL CONST $FILE_CURRENT = 1
    GLOBAL CONST $FILE_END = 2
    GLOBAL CONST $FILE_ATTRIBUTE_READONLY = 1
    GLOBAL CONST $FILE_ATTRIBUTE_HIDDEN = 2
    GLOBAL CONST $FILE_ATTRIBUTE_SYSTEM = 4
    GLOBAL CONST $FILE_ATTRIBUTE_DIRECTORY = 16
    GLOBAL CONST $FILE_ATTRIBUTE_ARCHIVE = 32
    GLOBAL CONST $FILE_ATTRIBUTE_DEVICE = 64
    GLOBAL CONST $FILE_ATTRIBUTE_NORMAL = 128
    GLOBAL CONST $FILE_ATTRIBUTE_TEMPORARY = 256
    GLOBAL CONST $FILE_ATTRIBUTE_SPARSE_FILE = 512
    GLOBAL CONST $FILE_ATTRIBUTE_REPARSE_POINT = 1024
    GLOBAL CONST $FILE_ATTRIBUTE_COMPRESSED = 2048
    GLOBAL CONST $FILE_ATTRIBUTE_OFFLINE = 4096
    GLOBAL CONST $FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 8192
    GLOBAL CONST $FILE_ATTRIBUTE_ENCRYPTED = 16384
    GLOBAL CONST $FILE_SHARE_READ = 1
    GLOBAL CONST $FILE_SHARE_WRITE = 2
    GLOBAL CONST $FILE_SHARE_DELETE = 4
    GLOBAL CONST $GENERIC_ALL = 268435456
    GLOBAL CONST $GENERIC_EXECUTE = 536870912
    GLOBAL CONST $GENERIC_WRITE = 1073741824
    GLOBAL CONST $GENERIC_READ = - - - 2147483648
    FUNC _SENDMESSAGE($HWND, $IMSG, $WPARAM = 0, $LPARAM = 0, $IRETURN = 0, $WPARAMTYPE = "wparam", $LPARAMTYPE = "lparam", $SRETURNTYPE = "lresult")
        LOCAL $ARESULT = DLLCALL("user32.dll", $SRETURNTYPE, "SendMessageW", "hwnd", $HWND, "uint", $IMSG, $WPARAMTYPE, $WPARAM, $LPARAMTYPE, $LPARAM)
        IF @ERROR THEN RETURN SETERROR(@ERROR, @EXTENDED, "")
        IF $IRETURN >= 0 AND $IRETURN <= 4 THEN RETURN $ARESULT[$IRETURN]
        RETURN $ARESULT
    ENDFUNC   ;==>_SENDMESSAGE
    FUNC _SENDMESSAGEA($HWND, $IMSG, $WPARAM = 0, $LPARAM = 0, $IRETURN = 0, $WPARAMTYPE = "wparam", $LPARAMTYPE = "lparam", $SRETURNTYPE = "lresult")
        LOCAL $ARESULT = DLLCALL("user32.dll", $SRETURNTYPE, "SendMessageA", "hwnd", $HWND, "uint", $IMSG, $WPARAMTYPE, $WPARAM, $LPARAMTYPE, $LPARAM)
        IF @ERROR THEN RETURN SETERROR(@ERROR, @EXTENDED, "")
        IF $IRETURN >= 0 AND $IRETURN <= 4 THEN RETURN $ARESULT[$IRETURN]
        RETURN $ARESULT
    ENDFUNC   ;==>_SENDMESSAGEA
    GLOBAL $__GAINPROCESS_WINAPI[64][2] = [[0, 0]]
    GLOBAL $__GAWINLIST_WINAPI[64][2] = [[0, 0]]
    GLOBAL CONST $__WINAPICONSTANT_WM_SETFONT = 48
    GLOBAL CONST $__WINAPICONSTANT_FW_NORMAL = 400
    GLOBAL CONST $__WINAPICONSTANT_DEFAULT_CHARSET = 1
    GLOBAL CONST $__WINAPICONSTANT_OUT_DEFAULT_PRECIS = 0
    GLOBAL CONST $__WINAPICONSTANT_CLIP_DEFAULT_PRECIS = 0
    GLOBAL CONST $__WINAPICONSTANT_DEFAULT_QUALITY = 0
    GLOBAL CONST $__WINAPICONSTANT_FORMAT_MESSAGE_ALLOCATE_BUFFER = 256
    GLOBAL CONST $__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM = 4096
    GLOBAL CONST $__WINAPICONSTANT_LOGPIXELSX = 88
    GLOBAL CONST $__WINAPICONSTANT_LOGPIXELSY = 90
    GLOBAL CONST $HGDI_ERROR = PTR(-1)
    GLOBAL CONST $INVALID_HANDLE_VALUE = PTR(-1)
    GLOBAL CONST $CLR_INVALID = -1
    GLOBAL CONST $__WINAPICONSTANT_FLASHW_CAPTION = 1
    GLOBAL CONST $__WINAPICONSTANT_FLASHW_TRAY = 2
    GLOBAL CONST $__WINAPICONSTANT_FLASHW_TIMER = 4
    GLOBAL CONST $__WINAPICONSTANT_FLASHW_TIMERNOFG = 12
    GLOBAL CONST $__WINAPICONSTANT_GW_HWNDNEXT = 2
    GLOBAL CONST $__WINAPICONSTANT_GW_CHILD = 5
    GLOBAL CONST $__WINAPICONSTANT_DI_MASK = 1
    GLOBAL CONST $__WINAPICONSTANT_DI_IMAGE = 2
    GLOBAL CONST $__WINAPICONSTANT_DI_NORMAL = 3
    GLOBAL CONST $__WINAPICONSTANT_DI_COMPAT = 4
    GLOBAL CONST $__WINAPICONSTANT_DI_DEFAULTSIZE = 8
    GLOBAL CONST $__WINAPICONSTANT_DI_NOMIRROR = 16
    GLOBAL CONST $__WINAPICONSTANT_DISPLAY_DEVICE_ATTACHED_TO_DESKTOP = 1
    GLOBAL CONST $__WINAPICONSTANT_DISPLAY_DEVICE_PRIMARY_DEVICE = 4
    GLOBAL CONST $__WINAPICONSTANT_DISPLAY_DEVICE_MIRRORING_DRIVER = 8
    GLOBAL CONST $__WINAPICONSTANT_DISPLAY_DEVICE_VGA_COMPATIBLE = 16
    GLOBAL CONST $__WINAPICONSTANT_DISPLAY_DEVICE_REMOVABLE = 32
    GLOBAL CONST $__WINAPICONSTANT_DISPLAY_DEVICE_MODESPRUNED = 134217728
    GLOBAL CONST $NULL_BRUSH = 5
    GLOBAL CONST $NULL_PEN = 8
    GLOBAL CONST $BLACK_BRUSH = 4
    GLOBAL CONST $DKGRAY_BRUSH = 3
    GLOBAL CONST $DC_BRUSH = 18
    GLOBAL CONST $GRAY_BRUSH = 2
    GLOBAL CONST $HOLLOW_BRUSH = $NULL_BRUSH
    GLOBAL CONST $LTGRAY_BRUSH = 1
    GLOBAL CONST $WHITE_BRUSH = 0
    GLOBAL CONST $BLACK_PEN = 7
    GLOBAL CONST $DC_PEN = 19
    GLOBAL CONST $WHITE_PEN = 6
    GLOBAL CONST $ANSI_FIXED_FONT = 11
    GLOBAL CONST $ANSI_VAR_FONT = 12
    GLOBAL CONST $DEVICE_DEFAULT_FONT = 14
    GLOBAL CONST $DEFAULT_GUI_FONT = 17
    GLOBAL CONST $OEM_FIXED_FONT = 10
    GLOBAL CONST $SYSTEM_FONT = 13
    GLOBAL CONST $SYSTEM_FIXED_FONT = 16
    GLOBAL CONST $DEFAULT_PALETTE = 15
    GLOBAL CONST $MB_PRECOMPOSED = 1
    GLOBAL CONST $MB_COMPOSITE = 2
    GLOBAL CONST $MB_USEGLYPHCHARS = 4
    GLOBAL CONST $ULW_ALPHA = 2
    GLOBAL CONST $ULW_COLORKEY = 1
    GLOBAL CONST $ULW_OPAQUE = 4
    GLOBAL CONST $WH_CALLWNDPROC = 4
    GLOBAL CONST $WH_CALLWNDPROCRET = 12
    GLOBAL CONST $WH_CBT = 5
    GLOBAL CONST $WH_DEBUG = 9
    GLOBAL CONST $WH_FOREGROUNDIDLE = 11
    GLOBAL CONST $WH_GETMESSAGE = 3
    GLOBAL CONST $WH_JOURNALPLAYBACK = 1
    GLOBAL CONST $WH_JOURNALRECORD = 0
    GLOBAL CONST $WH_KEYBOARD = 2
    GLOBAL CONST $WH_KEYBOARD_LL = 13
    GLOBAL CONST $WH_MOUSE = 7
    GLOBAL CONST $WH_MOUSE_LL = 14
    GLOBAL CONST $WH_MSGFILTER = -1
    GLOBAL CONST $WH_SHELL = 10
    GLOBAL CONST $WH_SYSMSGFILTER = 6
    GLOBAL CONST $WPF_ASYNCWINDOWPLACEMENT = 4
    GLOBAL CONST $WPF_RESTORETOMAXIMIZED = 2
    GLOBAL CONST $WPF_SETMINPOSITION = 1
    GLOBAL CONST $KF_EXTENDED = 256
    GLOBAL CONST $KF_ALTDOWN = 8192
    GLOBAL CONST $KF_UP = 32768
    GLOBAL CONST $LLKHF_EXTENDED = BITSHIFT($KF_EXTENDED, 8)
    GLOBAL CONST $LLKHF_INJECTED = 16
    GLOBAL CONST $LLKHF_ALTDOWN = BITSHIFT($KF_ALTDOWN, 8)
    GLOBAL CONST $LLKHF_UP = BITSHIFT($KF_UP, 8)
    GLOBAL CONST $OFN_ALLOWMULTISELECT = 512
    GLOBAL CONST $OFN_CREATEPROMPT = 8192
    GLOBAL CONST $OFN_DONTADDTORECENT = 33554432
    GLOBAL CONST $OFN_ENABLEHOOK = 32
    GLOBAL CONST $OFN_ENABLEINCLUDENOTIFY = 4194304
    GLOBAL CONST $OFN_ENABLESIZING = 8388608
    GLOBAL CONST $OFN_ENABLETEMPLATE = 64
    GLOBAL CONST $OFN_ENABLETEMPLATEHANDLE = 128
    GLOBAL CONST $OFN_EXPLORER = 524288
    GLOBAL CONST $OFN_EXTENSIONDIFFERENT = 1024
    GLOBAL CONST $OFN_FILEMUSTEXIST = 4096
    GLOBAL CONST $OFN_FORCESHOWHIDDEN = 268435456
    GLOBAL CONST $OFN_HIDEREADONLY = 4
    GLOBAL CONST $OFN_LONGNAMES = 2097152
    GLOBAL CONST $OFN_NOCHANGEDIR = 8
    GLOBAL CONST $OFN_NODEREFERENCELINKS = 1048576
    GLOBAL CONST $OFN_NOLONGNAMES = 262144
    GLOBAL CONST $OFN_NONETWORKBUTTON = 131072
    GLOBAL CONST $OFN_NOREADONLYRETURN = 32768
    GLOBAL CONST $OFN_NOTESTFILECREATE = 65536
    GLOBAL CONST $OFN_NOVALIDATE = 256
    GLOBAL CONST $OFN_OVERWRITEPROMPT = 2
    GLOBAL CONST $OFN_PATHMUSTEXIST = 2048
    GLOBAL CONST $OFN_READONLY = 1
    GLOBAL CONST $OFN_SHAREAWARE = 16384
    GLOBAL CONST $OFN_SHOWHELP = 16
    GLOBAL CONST $OFN_EX_NOPLACESBAR = 1
    GLOBAL CONST $TAGCURSORINFO = "dword Size;dword Flags;handle hCursor;" & $TAGPOINT
    GLOBAL CONST $TAGDISPLAY_DEVICE = "dword Size;wchar Name[32];wchar String[128];dword Flags;wchar ID[128];wchar Key[128]"
    GLOBAL CONST $TAGFLASHWINFO = "uint Size;hwnd hWnd;dword Flags;uint Count;dword TimeOut"
    GLOBAL CONST $TAGICONINFO = "bool Icon;dword XHotSpot;dword YHotSpot;handle hMask;handle hColor"
    GLOBAL CONST $TAGMEMORYSTATUSEX = "dword Length;dword MemoryLoad;" & "uint64 TotalPhys;uint64 AvailPhys;uint64 TotalPageFile;uint64 AvailPageFile;" & "uint64 TotalVirtual;uint64 AvailVirtual;uint64 AvailExtendedVirtual"
    
    Func _filewritetoline($sfile, $iline, $stext, $foverwrite = 0)
        If $iline <= 0 Then Return SetError(4, 0, 0)
        If NOT IsString($stext) Then
            $stext = String($stext)
            If $stext = "" Then Return SetError(6, 0, 0)
        EndIf
        If $foverwrite <> 0 AND $foverwrite <> 1 Then Return SetError(5, 0, 0)
        If NOT FileExists($sfile) Then Return SetError(2, 0, 0)
        Local $sread_file = FileRead($sfile)
        Local $asplit_file = StringSplit(StringStripCR($sread_file), @LF)
        If UBound($asplit_file) < $iline Then Return SetError(1, 0, 0)
        Local $hfile = FileOpen($sfile, $fo_overwrite)
        If $hfile = -1 Then Return SetError(3, 0, 0)
        $sread_file = ""
        For $i = 1 To $asplit_file[0]
            If $i = $iline Then
                If $foverwrite = 1 Then
                    If $stext <> "" Then $sread_file &= $stext & @CRLF
                Else
                    $sread_file &= $stext & @CRLF & $asplit_file[$i] & @CRLF
                EndIf
            ElseIf $i < $asplit_file[0] Then
                $sread_file &= $asplit_file[$i] & @CRLF
            ElseIf $i = $asplit_file[0] Then
                $sread_file &= $asplit_file[$i]
            EndIf
        Next
        FileWrite($hfile, $sread_file)
        FileClose($hfile)
        Return 1
    EndFunc
    
    
    Call("Suspend2")
    
    Func Suspend2()
        $list1 = ProcessList()
        $msg1 = _arrayfindall($list1, "Dekaron.exe", 1, $list1[0][0])
        If @error = 6 Then
            Call("Suspend")
        EndIf
        For $z = 1 To 1
            $listdone1 = _arraycombinations($msg1, $z, "")
        Next
        While 1
           Sleep (500)
            $list = ProcessList()
            $msg = _arrayfindall($list, "Dekaron.exe", 1, $list[0][0])
            For $i = 1 To 1
                $listdone = _arraycombinations($msg, $i, "")
            Next
            If $listdone[0] > $listdone1[0] Then
                $x = $list[$listdone[$listdone[0]]][1]
                While 1
                    $handle = _memoryopen($x)
                    $test = _memoryread(10452076, $handle, "byte")
                    If $test = 204 Then
                        _processsuspend($x)
                    
                        _memoryclose($handle)
                        Sleep(10)
                        _filewritetoline("DK_PID.txt", 4, $x, 0)
                        MSGBOX ( 44096 , "DEKARON" , "ACTIVE HACKS THEN PRESS OK" ) 
                        _processresume($x)
                    
                        Exit 
                    EndIf
                WEnd
            EndIf
        WEnd
    EndFunc
    
    Func Suspend()
        While 1
           Sleep (500)
            If ProcessExists("Dekaron.exe") Then
                $proces_id = ProcessExists("Dekaron.exe")
                $handle = _memoryopen($proces_id)
                $test = _memoryread(10452076, $handle, "byte")
                If $test = 204 Then
                    _processsuspend($proces_id)
                            Sleep(10)
                    _filewritetoline("DK_PID.txt", 4, $proces_id, 0)
                    MSGBOX ( 44096 , "DEKARON" , "ACTIVE HACKS THEN PRESS OK" ) 
                    _processresume($proces_id)
                    
                    Exit 
                EndIf
            EndIf
        WEnd
    EndFunc
    
    Func _memorywritemod($adress, $handle, $data)
        $count = StringSplit($data, " ")
        For $i = 0 To Binary($count[0] - 1) Step 1
            $hexcount = "0x" & $count[$i + 1]
            _memorywrite($adress + $i, $handle, Binary($hexcount), "byte")
        Next
    EndFunc
    
    Func _processsuspend($processid)
        If $processid Then
            $ai_handle = DllCall("kernel32.dll", "int", "OpenProcess", "int", 2035711, "int", False, "int", $processid)
            $i_sucess = DllCall("ntdll.dll", "int", "NtSuspendProcess", "int", $ai_handle[0])
            DllCall("kernel32.dll", "ptr", "CloseHandle", "ptr", $ai_handle)
            If IsArray($i_sucess) Then
                Return 1
            Else
                SetError(1)
                Return 0
            EndIf
        Else
            SetError(2)
            Return 0
        EndIf
    EndFunc
    
    Func _processresume($processid)
        If $processid Then
            $ai_handle = DllCall("kernel32.dll", "int", "OpenProcess", "int", 2035711, "int", False, "int", $processid)
            $i_sucess = DllCall("ntdll.dll", "int", "NtResumeProcess", "int", $ai_handle[0])
            DllCall("kernel32.dll", "ptr", "CloseHandle", "ptr", $ai_handle)
            If IsArray($i_sucess) Then
                Return 1
            Else
                SetError(1)
                Return 0
            EndIf
        Else
            SetError(2)
            Return 0
        EndIf
    EndFunc

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Tool] Dekaron D0 Packer / Extractor
    By h4x0r in forum Game Files
    Replies: 6
    Last Post: 2015-07-03, 08:44 PM
  2. CE hacks for dekaron
    By Demise in forum 2Moons / Dekaron
    Replies: 4
    Last Post: 2012-03-15, 03:09 AM
  3. Dekaron Global
    By ashH in forum 2Moons / Dekaron
    Replies: 3
    Last Post: 2012-02-25, 02:06 AM
  4. Dekaron Global Unpacked / debug detection bypass
    By Enigma in forum 2Moons / Dekaron
    Replies: 3
    Last Post: 2011-10-01, 03:32 PM
  5. [REQUEST]dekaron global
    By desayer in forum Research Requests
    Replies: 0
    Last Post: 2010-10-31, 01:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •