Announcement

Collapse

Please use the Hentai ID thread for all hentai ID requests. Click me for link!

The Identification Thread is Here:

http://www.hongfire.com/forum/showthread.php/447081
See more
See less

Interactive Text Hooker - new text extraction tool

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interactive Text Hooker - new text extraction tool

    Interactive Text Hooker (ITH) is a tool to help you extract text from Japanese games.
    It works very like AGTH. if you are familiar with AGTH you will find it easy to work with ITH.
    Right now ITH is not quite stable and under developing. Please help me test it and report any bugs you find.
    Also any suggestion about new features or improvement is welcome.
    Latest ITH 2.3 (2011.7.9). ITH64 1.0 (2011.5.15). 3.0 test.
    Latest engine support module(10.15).


    Manual & Tutorials
    User manual: http://code.google.com/p/interactive...iki/UserManual
    English: http://craneanime.blogspot.com/2011/01/tutorial-ith-interactive-text-hooker.html
    Korean: http://blog.naver.com/foolmaker/30098345502
    Vietnamese: http://vnsharing.net/forum/showthread.php?t=235841
    Just googled these tutorials out. Thanks to the authors of these tutorials. I'm just too lazy to write one.
    If you also write tutorial please send me the link and I will add it here.
    Chinese(need register): http://bbs.sumisora.org/read.php?tid=10997379
    Written by me. Also ITH Chinese version can be found here.

    Links:
    ITH at Google code: http://code.google.com/p/interactive-text-hooker/
    ITH at Google group: http://groups.google.com/group/interactive-text-hooker
    AGTH main thread by Setx: http://www.hongfire.com/forum/showthread.php?t=36807
    AGTH tutorial by fhc: http://www.hongfire.com/forum/showthread.php?t=59189
    Advanced AGTH Video Tutorials by Freaka: http://www.hongfire.com/forum/showthread.php?t=80401
    Translation Aggregator by ScumSuckingPig: http://www.hongfire.com/forum/showthread.php?t=94395
    VirusTotal: http://www.virustotal.com/

    System requirement:
    Intel Pentium4 or later processor. Recommend OS is Windows XP or later.
    Technically your processor must support SSE2 and OS support common control library 6.
    ITH is also assumed to work in 64-bit Windows.

    Basic usage:
    Spoiler

    Please put ITH.exe, ITH.dll and ITH_engine.dll in the same folder.
    To let ITH extract text from a game, click on the process button,
    it will open a dialog with a process list. Find your target and click attach then.
    When you don't want to extract more text from that game, click detach to tell ITH stop extracting.
    After attached, the shorter drop-down list will contain the pid and name of the game you select.
    If ITH could extract some text, the longer drop down list in the main window will have more than one item.
    When you select one text will appeared in the big square.
    Every item is called a thread. Try to go through every item and find if the text is the same
    to the text in the game.

    User-defined hooks:
    Spoiler

    Also UserHook. AGTH uses this term in its thread.
    When the default hooks doesn't give you right text you want, you will need to install a user-defined hook.
    A special string is needed to inform ITH about the hook you want to install.
    This string is called H-code in AGTH terms. Usually it's game and version dependent.
    Refer to AGTH help and Freaka's video tutorial for further information.
    ITH can handle AGTH H-code, so if you have an AGTH H-code for a game, ITH will also work well for that one.
    Input this string right to the process list(the shorter drop down list) and press enter, a new hook will be installed.

    Thread window:
    Spoiler

    You can manage thread linking information and comment here. Thread linking is a mechanism to merge thread.
    Select the sender thread at the top, then select a thread in link to list.
    Click set, a link will be created to that. Notice that no cyclic link is permitted. Like 1>2>3>1.
    Link list will list all thread on this chain one by one.
    Last sentence contains the last sentence from one thread.
    Comment is some text to describe the thread.
    After you have commented some thread, its name will change in the main window.


    Hook window:
    Spoiler

    Click hook in the main window will open a dialog to help you manage hooks.
    But it is for advanced users who are familiar with H-code internal.

    H-code defined by Setx: /H[X]{A|B|W|S|Q|H}[N][data_offset[*drdo]][:sub_offset[*drdo]]@addr[:module[:{name|#ordinal}]]
    addr->Hook Address, data_offset->Data Offset (when data_offset is negative value, sub more 4 from that, e.g. -8 for EAX, but still -4 for EAX in H-code)
    *drdo->Data Indirection when after data_offset, Split Indirection when after sub_offset
    sub_offset->Split Parameter, also sub 4 when negative.
    Module/Function Base(ITH original): Here fill hash values of module and name. You enter a string in the right blank,
    click hash module/function, then hash values is calculated and filled into this 2 blanks.
    CheckBoxes on the left enable correspond function.
    CheckBoxes On the right correspond to charset option.
    A->Big Endian (ITH different from AGTH defination), B->None, W->Unicode
    S->String, Q->String&Unicode, H->Hex value, N->No context.
    Last Char(ITH original), give in string pointer and extract last char of that string.
    Click generate code you will see h-code of this hook in the bottom.
    Notice that module and name is string in AGTH h-code, but ITH can't get string back from hash.
    Click Remove Hook to remove current selected hook from target process and clear all threads from that hook.
    Click Modify Hook to modify current selected hook. In fact original hook is removed and ITH insert new hook base on parameters in hook window.


    Profile:
    Spoiler

    After attached to some process, you can add that to profile. ITH will record its path.
    If you enable auto inject in option window, ITH will monitor process and attach to that whose path has been record.
    You can also assign up to 4 user-define hook codes(h-code) to a record.
    If you enable auto insert in option window, ITH will insert these hooks after attached.
    Hook code contains module/function name will be transform into hash value.
    They represent equivalent hook. Module name is case insensitive while function name is case sensitive.
    Original : change to ! to indicate that's hash value.
    e.g. /HA4@123:foo.bar:abc -> /HA4@123!BD097770!C5840063

    On the left is a list of all games you have attached and added to profile.
    They other three boxes stores information about remote downloaded profiles.
    Click Refresh to list all profiles stored locally. You can update this list with the updater.
    Click a game on the left and click Find, ITH will find a correspond profile according to executable hash value.
    The click import to copy all information and insert hooks.
    .


    Option:
    Spoiler

    Split time: Time interval to insert line break. At least 100.
    Process delay: ITH will check one process if it's in profile. At least 50.
    If there are N processes running on your system, it takes N*PD for one round.
    This is the longest time ITH waits to attach after a process in profile launched.
    Inject delay: ITH delay attach after process in profile found. At least 1000.
    Insert delay: ITH delay insert hooks after attached. At least 200.
    Auto attach: ITH will attach to processes in profile automatically.
    Auto insert: ITH will insert hooks after attached automatically. Notice that auto insert will not work if auto attach is not enabled.
    Time unit is millisecond.
    Suppress: Enable suppress repetition function. This is the case ABCABCABC.
    Clipboard: ITH will copy the last sentence to the clipboard. Other tools which monitors clipboard will make use of it.
    Here "last sentence" means characters from right after the last line break to the current character

    Global filter: Global filter is a customizable filter that will apply to all threads.
    Currently only single character policy is implemented.
    Maybe in the future I will introduce more complex rules into ITH.
    All characters in the filter list will be filterd out before dispatch to correspond thread.
    Therefore those characters will not appear in final output.

    Full space at the beginning is by default filtered. If it's in the middle of a sentence,
    explicitly add it to global filter list.



    Miscellaneous:
    Spoiler

    Top: ITH will stay on top when pushed.
    Clear: Wiped out the text in the current thread.
    Save: Save profile for current game.
    This includes UserHooks, thread links, thread comment, and current select thread.

    Suspend/Terminate thread: You can suspend terminate some thread of some process.
    Select one thread and operation type, then click Execute.
    There's an box in the right upper corner of the process dialog.
    If you enter an function address here then operation will be proceed on all threads with the same start address.

    ITH is able to attach to multiple processes at same time, although it seems useless now.
    When you close ITH while a program, which is already attached by ITH, is still running,
    open ITH once more then ITH will automatically attached to that program.

    Link: You can type L[num1]-[num2] in the command line (without brackets, only number).
    ITH will make a link from thread num1 to thread num2.
    All text thread num1 receives will also be sent to thread num2.

    ITH will remove single character repetition, that is the case AAABBBCCC....


    ITH64:
    Spoiler

    Based on worldwide data taken during June 2010 from Windows Update 46% of Windows 7 PCs run the 64-bit edition of Windows 7.
    It's likely that more and more game engine will have a 64 bit version. Currently already one exist(CMVS64).
    Neither current ITH nor AGTH can hook 64 bit process, since they're all 32 bit program.
    ITH64 is designed to address this problem. It's native 64 bit program. Its internal architecture is reformed to fit the 64 bit environment.
    Although it's possible for ITH64 to hook 32 bit process, I want to leave that task to original ITH currently.
    In other word, ITH64 will NOT hook ANY 32 bit process. Please use original ITH instead.
    Maybe at some future point I will write a compatible layer. Then you need only ITH64 to do all your hook task.

    Usage of ITH64 is almost the same to original ITH. Only difference is about register representation in h-code.
    Original h-code has the following register map:
    EAX -> -4, ECX -> -8 ... EDI -> -20
    New 64 bit version is as this:
    RAX -> 0, RCX -> -8 ... RDI -> -38, R8-> -40 ... R15 -> -78
    It becomes zero-based and the increment is changed from 4 to 8.

    Example code for current CMVS64 engine.
    /HA-40:-48@4E050:cmvs64.exe
    This means that at 4E050 in module cmvs64, r8 contains data and r9 stores split parameter.
    Be aware of architecture difference when writing h-code for ITH64.
    I strongly recommend that new code use a base-offset style to indicate the real address.
    Not only because the address has become longer, but also to avoid problems when the target module is map into random address.


    Why ITH:
    Spoiler

    AGTH is a big success in text extraction.
    With UserHook function it can solve more than 95% current text extract issues.
    But new games usually need H-code to help AGTH working, and common users have no way to write one.
    ITH is designed to recognize much more game engines than AGTH and insert proper hooks automatically.

    1)ITH now can detect many popular game engines.
    Currently KiriKiri, BGI, RealLive, ShinaRio, CMVS, MAJIRO, rUGP, Malie, NitroPlus, Lune, QLIE,
    Apricot, CandySoft, AB2Try, Debonosu, System40, CIRCUS, AtelierKaguya, Waffle, YU-RIS,
    TinkerBell, AbelSoftware, SofthouseChara, LiveMaker, Bruns, CaramelBox, Pensil.
    More will be added later. If you find some engine ITH currently can't detect, feel free to request it here.
    I will then study that engine and try to find a way to detect it.
    General speaking ITH works well without special codes for more than 70% new released games.

    2)ITH has a graphic attach/hook insert interface. You don't need to pass parameters to ITH via cmd or link target line.

    3)ITH is able to insert multiple UserHooks into target process, while AGTH only one.

    4)ITH can join threads together as your wish(Link function), while AGTH will join many together, sometimes with useless threads.
    Since ITH is able to insert multiple UserHooks, this also means you can join text from different hooks together.
    This is useful when the text process function appears at different place.

    5)ITH can detach from process, remove/modify UserHook while the process is running.
    You don't need to restart the process when you find you have inserted wrong hooks.
    Bad hooks won't crash the process, just yield error message.
    This means you can use try-error method to guess hook code more efficiently.

    6)ITH is open source and is under developing. More features will be added to ITH in future versions.

    a) AGTH has option to hook common system routine(/X?), ITH currently only hook APIs in GDI32.dll


    IMPORTANT note:
    I have submit this program to VirusTotal, some anti-virus software report ITH as malware.
    I use NOD32 and it report nothing here. There is some aggressive technique that may be used in virus.
    ITH requires administrative privilege to function properly, means it has potential to damage your computer.
    I promise that original ITH will not
    1)spy programs other than you tell it to attach,
    2)create/modify/move/delete any files without explicit prompt, other than "ITH.pro" and "ITH.ini" resides in its folder,
    In the case of ITH64, it will create "ITH64.pro" and "ITH64.ini" respectively.
    3)create/write/delete any system registry keys,
    4)send/receive any information through network.
    Make sure you have checked hash values to ensure it is original version.

    Hash value of ITH
    Spoiler

    Hash values for current ITH.exe
    MD5 : 339360e57c9940ab33631071947a8e42
    SHA1 : f8a1b98c7b77b0b1fa45a1998bb80c0a6f34aad2
    SHA256: 540a5ec6f6d5092b1d76f96427d8cd344103b256e4526ad460 2b1a25ef1c882e

    Hash values for current ITH.dll
    MD5 : 2685073a5825725d09bb6671f99ac151
    SHA1 : 6e5cffd1886d7d131c91a6afe20244b79f3d89ac
    SHA256: 34548ec22b4e22774255b13c0ac799d13a535c03bcb84a0e4a ad3a06d454ad6e

    Hash values for ITH_engine.dll (2011.7.9)
    MD5 : 6d9cd2bf506aede1bcc40b1db8b116e0
    SHA1 : f066d124ee91de2da0dc89c864390969602aff3b
    SHA256: c61e1fe060d5bf6e69c1b70a122f51e406714e7821ea43761e 0046ad6dc505ce

    Hash values for current ITH_engine.dll (2011.10.15)
    MD5 : c027319d9f652747c2beb9be2cc0a6e7
    SHA1 : cdb6b380e859cf45c6747ac5880d2ac4896c251d
    SHA256: faca50c43ab62b2366d4b927d234dcf4522e01e369c415a9ac 9b1d27dd632d90


    Hash value of ITH64
    Spoiler

    Hash values for current ITH64.exe
    MD5 : 394b168b58e2f8da89fa73c507ea1136
    SHA1 : 412a3fdac7b9ec42bafd30f2fc2f821c25c2513d
    SHA256: 180dea1d34c23260bfbef0d529ecfdea437395d86ca8f44ac6 a1730c44a51b0d

    Hash values for current ITH64.dll
    MD5 : 523089418cc41e410f1c58f71e277b2b
    SHA1 : 251eb10d20d1083e99d2697db30d987c561bd970
    SHA256: 12073ed66c13967818b7778ce3e5ac37f0edd87f4e8adf9b6c 4c02a4849b0511

    Hash values for current ITH64_engine.dll
    MD5 : 2657858b2beb04dc104adcccbb343691
    SHA1 : 6bb730cbfc7715d5b8c5f56c008923d6d25a5ebf
    SHA256: 78b4ae62b19e04bce75ba2bdd5bf7ca3c1d5db3e95df53db9e 8c2117329e6a35


    About the source:
    Spoiler

    From 2.2 source code of ITH is under GPLv3. Older source is no longer available.
    ITH is written in C++ and inline assembly, compiled by VC10.0.
    A ready-for-compile project pack is also uploaded. Please get ntdll.lib and msvcrt.lib from latest WDK.
    Since I begin develop ITH with VS10.0 so maybe it's inconvenient for those under 10.0.
    I develop this program in WIN7 64 so it's assumed to work well under both 32 and 64bit OS.
    Attached Files
    Last edited by kaosu; 03-02-2012, 08:27 PM.
    sigpic
    Got stuck at AGTH H-codes? Have a try of ITH, supports more game engine.
    http://www.hongfire.com/forum/showthread.php?t=208860

  • 5. System resource (CPU usage) problem.

    Tested with 2011.6.6 version

    There is a problem about CPU usage in ITH new version.

    when I use ITH for kirikiri engine game
    http://www.hongfire.com/forum/showthread.php/351585
    ぴんく・シスターズ~さばさばしているのに実はうぶなお姉ちゃんと、お兄ちゃんが大好きな妹~

    After I finished the game, I closed it. But ITH still remains in my process.
    then ITH possesses 20~30% of CPU usage regardless of attach/detach state

    FYI
    Before I quit the game, I used text-output function of ITH.
    But I'm not sure when it happens. (usually fine~)
    Look image plz

    thank you
    Attached Files
    Last edited by foolmaker; 06-13-2011, 07:42 PM.

    Comment


    • Originally posted by foolmaker View Post
      @ Bug report about auto-suppress mode

      I try to hook ITH to the doujinshi game, which name is 絶対服従の便女学生.
      and It has 2 types of text pattern.

      1. each char double repeated (for option menu)
      2. no repeated text (for main text)
      FYI
      Another similar bug sample.
      [110520][クロックアップ企画]触診病淫

      It also has two type in TextOutA thread. Main text is 5 times-single char repetition.
      but SAVE/LOAD part's text is hooked each single-char repeated different times.
      Then whenever SAVE or LOAD, Hooked text is over suppressed.

      I hope that ITH can turn it off the auto-suppression function by manually for care this case.
      likewise custom single-char suppression, but separately. As you mentioned before.

      Or hopefully, ITH more intelligent about auto-sentence repetition.
      For example, ITH'd better to distinguish btw sentence repetition and single char repetition.
      Each means AABBCCDDEE -> single char repetition / ABCDEABCDE -> sentence repetition.
      (It means sentence repetition recognizer does not count disjointed single char repetition)

      So when single char repetition case, wish to manage it manually.

      Thank you
      Last edited by foolmaker; 06-14-2011, 10:18 PM.

      Comment


      • @foomaker: Thanks for testing & bug report.
        Seems the new KiriKiri2 hook doesn't work well. I will recover it to the original one.
        But the original KirkiKiri2 hook has the problem of caching, but not every character.
        If one character is repeated more than once it is still displayed once.
        This is the problem of the hook, not the filter though.
        I may work out a better one to get rid of both problem.

        I tested profile import function and it works well. You can notice that profile detail has changed.
        But there's no message box to indicate success in this version.

        The decision about single char & whole sentence repetition together is a problematic issue.
        Since before ITH can decide the number of single char repetitions, some duplicated chars are already in the buffer.
        This will obfuscate detection of whole sentence repetition.
        Single char repetition can be easily decided by human,
        so I'm considering adding a per thread number setting instead of the current global one.
        With users' assistance ITH should work better in similar situation.

        @tamers182: I will add that that setting to profile soon. Seems this is also an game specific setting.
        I fixed some new bugs of repetition filter which are introduced in the 6.6 version.
        Please try this one. Another issue, I think you are using /HSN-4@004B31ED.
        That's not a safe hook and may cause problems.
        A clean hook is /HS8@4B2BD0. You will not need repetition filter on for this hook.
        Last edited by kaosu; 06-17-2011, 05:46 AM.
        sigpic
        Got stuck at AGTH H-codes? Have a try of ITH, supports more game engine.
        http://www.hongfire.com/forum/showthread.php?t=208860

        Comment


        • Originally posted by kaosu View Post
          @tamers182: I will add that that setting to profile soon. Seems this is also an game specific setting.
          I fixed some new bugs of repetition filter which are introduced in the 6.6 version.
          Please try this one. Another issue, I think you are using /HSN-4@004B31ED.
          That's not a safe hook and may cause problems.
          A clean hook is /HS8@4B2BD0. You will not need repetition filter on for this hook.
          kaosu, i love you
          Not the gay way, but the J.D.-loves-Turk way.

          Auto suppress repetitions now works fine.

          Were did you find the other hook code for Meguri Megureba Meguru Toki?? I could only find the semi-working one and nothing else...


          Another thing i was thinking about: Why doesn't ITH have something like AGTH has with /x3 /v? There's some games wich i can't use ITH for, since the threads containing the text won't show up in ITH.

          Comment


          • Originally posted by tamers182 View Post
            Another thing i was thinking about: Why doesn't ITH have something like AGTH has with /x3 /v? There's some games wich i can't use ITH for, since the threads containing the text won't show up in ITH.
            He answered that in the past: http://www.hongfire.com/forum/showth...11#post2674411

            Comment


            • Originally posted by Freaka View Post
              Thanks.

              Did kaosu implement what he was writing about in his post yet?

              Comment


              • Nope.

                If you're pressed to use ITH, you could manually add hooks. In agth a hook shows a name like lstrlenA, which if you understand how to build a hook and read the docu for that function http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx means /HS4@0:kernel32.dll:lstrlenA (if I'm not mistaken, I didn't actually test it ). S because the A at the end means it's Ansi-String, it would be Q if was Unicode (= W at the end), 4 because the content is found in the first function parameter (8 for second, C for third, 10 for forth), kernel32.dll because that's what it says for DLL and the name of the function.

                Comment


                • Originally posted by Freaka View Post
                  Nope.

                  If you're pressed to use ITH, you could manually add hooks. In agth a hook shows a name like lstrlenA, which if you understand how to build a hook and read the docu for that function http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx means /HS4@0:kernel32.dll:lstrlenA (if I'm not mistaken, I didn't actually test it ). S because the A at the end means it's Ansi-String, it would be Q if was Unicode (= W at the end), 4 because the content is found in the first function parameter (8 for second, C for third, 10 for forth), kernel32.dll because that's what it says for DLL and the name of the function.
                  I didn't really get what you wrote, but that means that i could add the thread from AGTH to ITH?

                  That would be cool, i'd like to use only ITH.

                  Comment


                  • @tamers182: I have planned similar feature since long before. But still haven't started coding.
                    I just want to find a way to provide equivalent hook while minimizing performance penalty.
                    Although the theory to build a new hook from exist /x? hook for a specific thread is simple,
                    it still involve some interaction with user who has programming knowledge.
                    Just like Freaka has done in the previous post.
                    To completely automate this process there is still much work to be done.
                    I will implement this feature as soon as I come up with a good design.

                    I finished some graphic stuff for fun. Just to make ITH looks nicer.
                    You can use your bmp files as the background of the text field
                    Last edited by kaosu; 06-19-2011, 02:20 AM.
                    sigpic
                    Got stuck at AGTH H-codes? Have a try of ITH, supports more game engine.
                    http://www.hongfire.com/forum/showthread.php?t=208860

                    Comment


                    • Originally posted by kaosu View Post
                      @tamers182: I have planned similar feature since long before. But still haven't started coding.
                      I just want to find a way to provide equivalent hook while minimizing performance penalty.
                      Although the theory to build a new hook from exist /x? hook for a specific thread is simple,
                      it still involve some interaction with user who has programming knowledge.
                      Just like Freaka has done in the previous post.
                      To completely automate this process there is still much work to be done.
                      I will implement this feature as soon as I come up with a good design.

                      I finished some graphic stuff for fun. Just to make ITH looks nicer.
                      You can use your bmp files as the background of the text field
                      Could you maybe scale the background image to fit the window size of ITH?

                      Comment


                      • Yesterday I downloaded new ITH version and it behaves strangely. The worst thing is that I can't intentionally reproduce the situation - it just happens after some random time.

                        Sometimes when I close the attached game, ITH thinks that it is still hooked to it - process name, threads, etc are left intact, in console there's no 'process xxx detached' string.
                        Task manager shows that process doesn't exist anymore.
                        Running the game again and attaching to it creates a duplicate entry in ITH's 'attached to' list, it's hooks are working fine.
                        And it doesn't matter if it was the same game or not, hereafter any attached process will not be automatically deleted from 'attached to' list.
                        If I close ITH after that it sometimes throws an exception.

                        It never happened with old 2011-2-2 version, only with 2011-6-15 and 2011-6-17 from last posts.
                        Using WinXP sp3 japanese in vmware, didn't try it in host system.

                        First I thought it could be related to kirikiri changes but it wasn't the case (starting, attaching, and exiting one of them worked fine)
                        Last edited by Andys; 06-17-2011, 03:46 PM.

                        Comment


                        • @Kaosu

                          1. Text Export bug report with 2011.06.16
                          I have tested some Kirikiri engine game with ITH 2011.06.16 version.
                          Alert message was popping.

                          I used ITH for hooking text kirikiri game, which is 魔法少女フェアリーナイツ.
                          I just exported the text out.

                          But It does not happen at 2011.06.17 version yet.
                          (but 06.17's tested time is to short to make a decision.)

                          See the first image


                          2. Kirikiri engine problem(bug?)
                          As you said to me, Maybe ITH's kirikiri2 engine is rollback to original one.
                          But now the number of Kirikiri1 threads is overwhelming when I played 魔法少女フェアリーナイツ.

                          It is not a big problem, maybe... (If there is no crash as before)
                          But Kirikiri1's 'Name' hooking thread is changed to the newly generated thread.
                          Like below.. notice that the thread address is same.

                          0003:2772:0x00541254:0x00547F9E:0x00000014 (original generated name thread)
                          002A:2772:0x00541254:0x00547F9E:0x00000014 (newly generated name thread)

                          And this change continues ... name thread goes to the 004A, 006A, ...
                          (and total hooked threads are larger and larger...)

                          when I used /HWN-4*14:-4*0@541254 for userhook,
                          It works slightly better than basic hook but after choices(selection) in game,
                          threads are still separated too.

                          Look second image.



                          3. ITH's auto-attach/detach problem

                          It is similar with what Andys said above.

                          First of all, I open any game and do not close (from now on)
                          Here, I tested Kirikiri game (魔法少女フェアリーナイツ).

                          And open ITH and hook that game. and played some time.
                          Then close ITH (do not close game!) and rerun ITH,
                          ITH already attach the previous game. (why? i check the auto hook option off)

                          And randomly, when I close the ITH again, ITH's window is closed
                          but it still works in the process list ... and it possess cpu usage 10~20%.

                          Naturally, I kill ITH in the process manager by force
                          and rerun ITH again, then ITH can not attach/detach the game.

                          Before I close the game process, ITH can not work well with attach/detach process.
                          I think ITH's auto-attaching/detaching function is not work fine like previous one.
                          And FYI notice that I use the [NTLEA 0.86] program for opening the game.

                          See the last 2 image.



                          4. Profile & Link related bug
                          There also exist very special bug.
                          I save the profile of the game 魔法少女フェアリーナイツ with text & name thread linked.
                          (And I do not use the auto attach function.)

                          After saving profile, I play it with ITH again. and I linked two threads manually like typing L2-4 ...
                          (Notice that this link info. is already saved in the profile.)

                          Then ITH behaves strange (does not work) and the game becomes no-response state !!
                          I think there may be a bug between link function and profile mutually.


                          Best regards.
                          Attached Files
                          Last edited by foolmaker; 06-18-2011, 05:43 AM.

                          Comment


                          • @Andy: I have slightly changed synchronization scheme in the last version.
                            Just want to make sure resource clean up. Seems it breaks the exist multi-thread execution order.
                            Maybe this causes the strange problem.
                            I also randomly encounter such case since long before.
                            I think this one is most difficult to debug. I will try to improve it.

                            @foolmaker: 1. Please keep on testing if this bug still occur for 6.17. I'm not sure if I fixed this bug.
                            2&3&4. Essentially these may due to same bug. Seems ITH internal data is corrupted.
                            So further thread/hook management becomes disordered.
                            I will dl that game soon. Is this situation occur every time you start that game?
                            sigpic
                            Got stuck at AGTH H-codes? Have a try of ITH, supports more game engine.
                            http://www.hongfire.com/forum/showthread.php?t=208860

                            Comment


                            • Originally posted by kaosu View Post
                              @foolmaker: 1. Please keep on testing if this bug still occur for 6.17. I'm not sure if I fixed this bug.
                              2&3&4. Essentially these may due to same bug. Seems ITH internal data is corrupted.
                              So further thread/hook management becomes disordered.
                              I will dl that game soon. Is this situation occur every time you start that game?
                              Case 2&4 always occur. so you can see those easily (playing or skipping it some time.)
                              Case 3 sometimes (I'm not sure exactly when it occurs, but might be frequent if you do same procedure)...
                              or clicking attach&detach button quickly. Then, ITH goes to the same situations. (can not detach states)
                              Last edited by foolmaker; 06-18-2011, 09:53 AM.

                              Comment


                              • @Andys: I think I find what causes ITH think it still hook the game.
                                In fact the DLL is already clean up but thread data is corrupted due to bugs in text dispatch routine.
                                More exactly, if any thread's address/retn/split is greater than 0x80000000(bit 31 on), data is very likely to be corrupted.

                                @foolmaker: Bugs that cause case 2&4 are fixed. I'm not sure if case 3 is due to the same one.
                                I think it's a timing problem, which exist since long before.
                                If this situation don't occur quite often, just terminate ITH and game and restart should work fine.

                                @tamers182: Simply stretching a picture will make it looks ugly, unless in power of 2.
                                To get rid of this problem I must use complex algorithm or utilize graphic hardware.
                                I don't want to eat up much of user's graphic resource, since the main purpose of ITH is text extraction.
                                Currently I will keep drawing as simple as possible. So please prepare a bmp to fit size of your window.
                                Last edited by kaosu; 06-26-2011, 04:53 PM.
                                sigpic
                                Got stuck at AGTH H-codes? Have a try of ITH, supports more game engine.
                                http://www.hongfire.com/forum/showthread.php?t=208860

                                Comment

                                Working...
                                X