Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Results 1 to 10 of 29

Hybrid View

  1. #1
    Master
    Join Date
    Nov 2017
    Location
    europa
    Posts
    123
    Rep Power
    244

    Default

    You are right the right format is the second, this is a bug caused by the decryption algorithm that Djeman used to create the Jigolua software and which does not take into account an additional specificity related to the decoding of LUNA .

    we actually have two parameters that appear using it:

    self.SetupSearchCenter [self.selectedCenterType] (self.SetupSearchCenter, self)

    by analyzing this sequence given by jigolua

    function OneBoxSearch: SetupQuery (filter)
    self.query = sc_copy_table (self.defaultQuery)
    self.query.filter = filter or ui.keyboard: InputValue ()
    self.query.limit = self.maxResult
    self.SetupSearchCenter [self.selectedCenterType] (self.SetupSearchCenter, self)
    self.query.poi.providerIds = self: GetQueryProviders ()
    self.query.poi.containerIds = self.selectedPoiContainers
    self.query.poi.nameOnly = self.poiIsNameOnly
    end

    we immediately notice that 'self' must in fact represent the 'OneBoxSearch' entity

    for my part, on the two parameters listed, I kept only the first one whereas it was the one he was going to eliminate
    Spoiler: Click to see content

    and this is what we find from the disassembly
    % function <jgrulmvkm / hg_search_base.lua: 359,362> (11 instructions, 44 bytes at function # 17)
    1 param, 4 slot, 0 upvalue, 1 local, 7 constant, 0 function
    1 [360]: 0x46004000: GETTABLE 1 0 -1; R1: = R0 ["SetupSearchCenter"]
    2 [360]: 0x85400000: GETGLOBAL 2 -2; R2: = Gbl ["EOneBoxSearchCenterTypes"]
    3 [360]: 0x86804001: GETTABLE 2 2 -3; R2: = R2 ["Global"]
    4 [360]: 0x86C04001: GETTABLE 2 2 -4; R2: = R2 ["value"]
    5 [360]: 0x4B808000: SELF 1 1 2; R2: = R1; R1: = R1 [R2]
    6 [360]: 0xC0000000: MOVE 3 0; R3: = R0
    7 [360]: 0x5C40A001: CALL 1 3129; R1, ...: = R1 (R2, R3)
    8 [361]: 0x46004100: GETTABLE 1 0 -5; R1: = R0 ["query"]
    9 [361]: 0x86804100: GETTABLE 2 0 -7; R2: = R0 ["nearbySearchRange"]
    10 [361]: 0x49808082: SETTABLE 1 -6 2; R1 ["maxDistance"]: = R2
    11 [362]: 0x1E008000: RETURN 0 1; return

    constants (7) for function # 17:
    1 "SetupSearchCenter"
    2 "EOneBoxSearchCenterTypes"
    3 "Global"
    4 "value"
    5 "query"
    6 "maxDistance"
    7 "nearbySearchRange"

    locals (1) for function # 17:
    0 self 1 11 ==> as R0
    which is the function
    Code:
    Please Login or Register to see the links
    and not this
    Code:
    Please Login or Register to see the links
    or this
    Code:
    Please Login or Register to see the links
    in these cases the erroneous representation would be worth

    Code:
    Please Login or Register to see the links
    when in reality the correct code would be
    Code:
    Please Login or Register to see the links


    the content of the following code should be suitable to replace that of the lua
    Spoiler: hg_search_base.lua
    Code:
    Please Login or Register to see the links


    Thank you for reporting this bug, I think I identified its origin, I must check that it does not affect other lua files in the pack, otherwise in which case I will repost the corrections for all the archives as attachments to the first message

    the list of impacted files is still quite small:

    listseparator.lua, hg_search_base.lua, shop.lua, shop_enums.lua vr_ovde_parser.lua and speedcam.lua


    A complementary attached list is available in post # 15
    [Only registered and activated users can see links. ]
    Attached Files Attached Files
    • This post requires you to click the "LIKE this post" button to see Attachments.
    Last edited by lunapark; 20th July 2021 at 01:23 AM.

  2.    Advertissements


  3. #2
    Member
    Join Date
    Apr 2016
    Location
    Brussels
    Posts
    15
    Rep Power
    0

    Default

    Amazing find and already posted a new fixed archive!

    It took a bit longer for me to pinpoint this exact issue because while looking for root-causes for things-not-working, I also hit "real" defects in the code.
    Currently looking at some strange trigger() behavior but I will analyze the differences first between the "old" and "new" disassembled files, maybe the cause is there.

    Please let me know if there is anything I can do to help or test. Don't know much about iGO but a decent programmer.

    BTW, Is there also way to compile back the changed LUA? I know it needs a compiler with Wide String support and additional opcodes, made clear by the not-to-miss warning in the decompiled file.
    Last edited by Boki; 4th July 2021 at 09:20 AM. Reason: approved

  4. #3
    Master
    Join Date
    Nov 2017
    Location
    europa
    Posts
    123
    Rep Power
    244

    Default

    it is useless to recompile the lua for LUNA except for those who think that their modifications will be inaccessible, which is totally illusory, because in the current state of recompilations, it is without counting the programming errors as well as the generated coding by LUNA integrates a part of the unknown which no longer corresponds to the Primo style scripts,

    the lua 5.1 standard is no longer fully respected with LUNA (it was not already respected before with primo and the widestring), and for that it would be necessary only to methodically disassemble the apk to extract the conversion mechanisms that can allow to reproduce the original scripts.

    the main thing is that clear scripts can work fully with the correct syntax.
    Whether they are in clear or not, iGO converts scripts into executable code on load to save execution time.

  5. #4
    Member
    Join Date
    Apr 2016
    Location
    Brussels
    Posts
    15
    Rep Power
    0

    Default

    I found a couple more issues in data_9.35.2.153810, specifically in address.luad. Replacing this module results in a hang.

    Line 97: this code does not seem to correspond with the original
    Code:
    Please Login or Register to see the links
    When I try to disassemble by hand it should be something like:
    Code:
    Please Login or Register to see the links
    Also the line
    Code:
    Please Login or Register to see the links
    crashes the code (does this function have an argument ?), so I changed it temporarily to
    Code:
    Please Login or Register to see the links
    With these line in place, I can search countries but not cities, so I assume there are some more undetected errors.
    Last edited by Boki; 5th July 2021 at 03:29 PM. Reason: approved

 

 

Tags for this Thread

Bookmarks

Posting Permissions

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