{"type": "func", "start": 4298216132, "end": 4298216344, "name": "GameManager::getNextUsedKey", "pseudocode": "// \n// GameManager::getNextUsedKey from 0x1003192c4 to 0x100319398 (212 bytes)\n// \n// 1 xrefs:\n// > GameManager::reorderKey @ 0x100319504\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall GameManager::getNextUsedKey(GameManager *a1, int a2, bool a3)\n{\n  int v3; // w23\n  cocos2d::CCArray *OrderedCustomObjectKeys; // x21\n  unsigned int v7; // w22\n  __int64 v8; // x25\n  cocos2d::CCString *v9; // x0\n  unsigned int v10; // w0\n  unsigned int v11; // w24\n  __int64 v12; // x26\n  cocos2d::CCString *v13; // x0\n\n  OrderedCustomObjectKeys = GameManager::getOrderedCustomObjectKeys(a1);\n  if ( !(unsigned int)sub_10024A36C((__int64)OrderedCustomObjectKeys) )\n    return 0;\n  v7 = 0;\n  v8 = 0;\n  while ( 1 )\n  {\n    v9 = cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, v7);\n    v10 = cocos2d::CCString::intValue(v9);\n    v11 = v10;\n    if ( v10 == a2 )\n      v12 = (unsigned int)v8;\n    else\n      v12 = v10;\n    if ( v10 == a2 )\n    {\n      v3 = v8;\n      if ( !a3 )\n      {\n        if ( v7 + 1 >= (unsigned int)sub_10024A36C((__int64)OrderedCustomObjectKeys) )\n        {\n          v3 = 0;\n        }\n        else\n        {\n          v13 = cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, v7 + 1);\n          v3 = cocos2d::CCString::intValue(v13);\n        }\n        v12 = v8;\n      }\n    }\n    if ( v11 == a2 )\n      break;\n    ++v7;\n    v8 = v12;\n    if ( v7 >= (unsigned int)sub_10024A36C((__int64)OrderedCustomObjectKeys) )\n      return 0;\n  }\n  return v3;\n}", "assembly": "; \n; GameManager::getNextUsedKey from 0x1003192c4 to 0x100319398 (212 bytes)\n; \n; 1 xrefs:\n; > GameManager::reorderKey @ 0x100319504\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X26, X25, [SP,#-0x10+var_40]!                          ; +0x0, 0x1003192c4\nSTP             X24, X23, [SP,#0x40+var_30]                            ; +0x4, 0x1003192c8\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x8, 0x1003192cc\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0xc, 0x1003192d0\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x10, 0x1003192d4\nADD             X29, SP, #0x40                                         ; +0x14, 0x1003192d8\nMOV             X19, X2                                                ; +0x18, 0x1003192dc\nMOV             X20, X1                                                ; +0x1c, 0x1003192e0\nBL              GameManager__getOrderedCustomObjectKeys                ; +0x20, 0x1003192e4\nMOV             X21, X0                                                ; +0x24, 0x1003192e8\nBL              sub_10024A36C                                          ; +0x28, 0x1003192ec\nCBZ             W0, loc_100319378                                      ; +0x2c, 0x1003192f0\nMOV             W22, #0                                                ; +0x30, 0x1003192f4\nMOV             W25, #0                                                ; +0x34, 0x1003192f8\nMOV             X0, X21                                                ; +0x38, 0x1003192fc\nMOV             X1, X22                                                ; +0x3c, 0x100319300\nBL              cocos2d__CCArray__stringAtIndex                        ; +0x40, 0x100319304\nBL              cocos2d__CCString__intValue                            ; +0x44, 0x100319308\nMOV             X24, X0                                                ; +0x48, 0x10031930c\nCMP             W0, W20                                                ; +0x4c, 0x100319310\nCSEL            W26, W0, W25, NE                                       ; +0x50, 0x100319314\nCSEL            W23, W23, W25, NE                                      ; +0x54, 0x100319318\nB.NE            loc_100319358                                          ; +0x58, 0x10031931c\nTBNZ            W19, #0, loc_100319358                                 ; +0x5c, 0x100319320\nADD             W23, W22, #1                                           ; +0x60, 0x100319324\nMOV             X0, X21                                                ; +0x64, 0x100319328\nBL              sub_10024A36C                                          ; +0x68, 0x10031932c\nCMP             W23, W0                                                ; +0x6c, 0x100319330\nB.CS            loc_100319350                                          ; +0x70, 0x100319334\nMOV             X0, X21                                                ; +0x74, 0x100319338\nMOV             X1, X23                                                ; +0x78, 0x10031933c\nBL              cocos2d__CCArray__stringAtIndex                        ; +0x7c, 0x100319340\nBL              cocos2d__CCString__intValue                            ; +0x80, 0x100319344\nMOV             X23, X0                                                ; +0x84, 0x100319348\nB               loc_100319354                                          ; +0x88, 0x10031934c\nMOV             W23, #0                                                ; +0x8c, 0x100319350\nMOV             X26, X25                                               ; +0x90, 0x100319354\nCMP             W24, W20                                               ; +0x94, 0x100319358\nB.EQ            loc_10031937C                                          ; +0x98, 0x10031935c\nADD             W22, W22, #1                                           ; +0x9c, 0x100319360\nMOV             X0, X21                                                ; +0xa0, 0x100319364\nBL              sub_10024A36C                                          ; +0xa4, 0x100319368\nMOV             X25, X26                                               ; +0xa8, 0x10031936c\nCMP             W22, W0                                                ; +0xac, 0x100319370\nB.CC            loc_1003192FC                                          ; +0xb0, 0x100319374\nMOV             W23, #0                                                ; +0xb4, 0x100319378\nMOV             X0, X23                                                ; +0xb8, 0x10031937c\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xbc, 0x100319380\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xc0, 0x100319384\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xc4, 0x100319388\nLDP             X24, X23, [SP,#0x40+var_30]                            ; +0xc8, 0x10031938c\nLDP             X26, X25, [SP+0x40+var_40],#0x50                       ; +0xcc, 0x100319390\nRET                                                                    ; +0xd0, 0x100319394", "xrefs": ["GameManager::reorderKey @ 0x100319504"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}