{"type": "func", "start": 4295552804, "end": 4295553136, "name": "GameLevelManager::onSuggestLevelStarsCompleted", "pseudocode": "// \n// GameLevelManager::onSuggestLevelStarsCompleted from 0x10008ef24 to 0x10008f070 (332 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::handleIt @ 0x1000887e4\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\n__int64 (***__fastcall GameLevelManager::onSuggestLevelStarsCompleted(__int64 a1, _QWORD *a2, char *__s))(void)\n{\n  char *v3; // x20\n  __int64 v6; // x22\n  GameLevelManager *v7; // x0\n  _BOOL4 v8; // w0\n  _BOOL4 v9; // w22\n  _BOOL4 v10; // w0\n  _BOOL4 v11; // w21\n  GameManager *v12; // x21\n  float v13; // s0\n  __int64 (***result)(void); // x0\n  __int64 (**v15)(void); // x8\n  void *__p[2]; // [xsp+8h] [xbp-38h] BYREF\n  char v17; // [xsp+1Fh] [xbp-21h]\n\n  v3 = __s;\n  if ( __s[23] < 0 )\n    v3 = *(char **)__s;\n  v6 = *(_QWORD *)(a1 + 608);\n  sub_100009900(__p, v3);\n  v7 = (GameLevelManager *)cocos2d::CCDictionary::removeObjectForKey_1(v6, (char *)__p);\n  if ( v17 < 0 )\n    operator delete(__p[0]);\n  GameLevelManager::getSplitIntFromKey(v7, v3, 1);\n  sub_100009900(__p, \"-1\");\n  v8 = sub_1000045BC(a2, __p);\n  v9 = v8;\n  if ( v17 < 0 )\n  {\n    operator delete(__p[0]);\n    if ( v9 )\n    {\nLABEL_12:\n      result = *(__int64 (****)(void))(a1 + 808);\n      if ( !result )\n        return result;\n      v15 = *result + 1;\n      return (__int64 (***)(void))(*v15)();\n    }\n  }\n  else if ( v8 )\n  {\n    goto LABEL_12;\n  }\n  sub_100009900(__p, \"-2\");\n  v10 = sub_1000045BC(a2, __p);\n  v11 = v10;\n  if ( v17 < 0 )\n  {\n    operator delete(__p[0]);\n    if ( v11 )\n      goto LABEL_11;\n  }\n  else if ( v10 )\n  {\nLABEL_11:\n    v12 = GameManager::sharedState();\n    v12->m_hasRP.value = 0;\n    v13 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n    v12->m_hasRP.seed = (int)v13;\n    v12->m_hasRP.random = (int)v13;\n    goto LABEL_12;\n  }\n  result = *(__int64 (****)(void))(a1 + 808);\n  if ( !result )\n    return result;\n  v15 = *result;\n  return (__int64 (***)(void))(*v15)();\n}", "assembly": "; \n; GameLevelManager::onSuggestLevelStarsCompleted from 0x10008ef24 to 0x10008f070 (332 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::handleIt @ 0x1000887e4\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x10008ef24\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x10008ef28\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x10008ef2c\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x10008ef30\nADD             X29, SP, #0x40                                         ; +0x10, 0x10008ef34\nMOV             X20, X2                                                ; +0x14, 0x10008ef38\nMOV             X21, X1                                                ; +0x18, 0x10008ef3c\nMOV             X19, X0                                                ; +0x1c, 0x10008ef40\nLDRSB           W8, [X2,#0x17]                                         ; +0x20, 0x10008ef44\nTBZ             W8, #0x1F, loc_10008EF50                               ; +0x24, 0x10008ef48\nLDR             X20, [X20]                                             ; +0x28, 0x10008ef4c\nLDR             X22, [X19,#0x260]                                      ; +0x2c, 0x10008ef50\nADD             X0, SP, #0x40+__p; int                                 ; +0x30, 0x10008ef54\nMOV             X1, X20; __s                                           ; +0x34, 0x10008ef58\nBL              sub_100009900                                          ; +0x38, 0x10008ef5c\nADD             X1, SP, #0x40+__p; __s                                 ; +0x3c, 0x10008ef60\nMOV             X0, X22; int                                           ; +0x40, 0x10008ef64\nBL              cocos2d__CCDictionary__removeObjectForKey_1            ; +0x44, 0x10008ef68\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x48, 0x10008ef6c\nTBZ             W8, #0x1F, loc_10008EF7C                               ; +0x4c, 0x10008ef70\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x50, 0x10008ef74\nBL              __ZdlPv; operator delete(void *)                       ; +0x54, 0x10008ef78\nMOV             X1, X20                                                ; +0x58, 0x10008ef7c\nMOV             W2, #1                                                 ; +0x5c, 0x10008ef80\nBL              GameLevelManager__getSplitIntFromKey                   ; +0x60, 0x10008ef84\nMOV             X20, X0                                                ; +0x64, 0x10008ef88\nADRL            X1, a1_0; \"-1\"                                         ; +0x68, 0x10008ef8c\nADD             X0, SP, #0x40+__p; int                                 ; +0x70, 0x10008ef94\nBL              sub_100009900                                          ; +0x74, 0x10008ef98\nADD             X1, SP, #0x40+__p                                      ; +0x78, 0x10008ef9c\nMOV             X0, X21                                                ; +0x7c, 0x10008efa0\nBL              sub_1000045BC                                          ; +0x80, 0x10008efa4\nMOV             X22, X0                                                ; +0x84, 0x10008efa8\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x88, 0x10008efac\nTBNZ            W8, #0x1F, loc_10008EFBC                               ; +0x8c, 0x10008efb0\nCBZ             W22, loc_10008EFC8                                     ; +0x90, 0x10008efb4\nB               loc_10008F020                                          ; +0x94, 0x10008efb8\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x98, 0x10008efbc\nBL              __ZdlPv; operator delete(void *)                       ; +0x9c, 0x10008efc0\nCBNZ            W22, loc_10008F020                                     ; +0xa0, 0x10008efc4\nADRL            X1, a2_0; \"-2\"                                         ; +0xa4, 0x10008efc8\nADD             X0, SP, #0x40+__p; int                                 ; +0xac, 0x10008efd0\nBL              sub_100009900                                          ; +0xb0, 0x10008efd4\nADD             X1, SP, #0x40+__p                                      ; +0xb4, 0x10008efd8\nMOV             X0, X21                                                ; +0xb8, 0x10008efdc\nBL              sub_1000045BC                                          ; +0xbc, 0x10008efe0\nMOV             X21, X0                                                ; +0xc0, 0x10008efe4\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0xc4, 0x10008efe8\nTBNZ            W8, #0x1F, loc_10008F034                               ; +0xc8, 0x10008efec\nCBZ             W21, loc_10008F040                                     ; +0xcc, 0x10008eff0\nBL              GameManager__sharedState                               ; +0xd0, 0x10008eff4\nMOV             X21, X0                                                ; +0xd4, 0x10008eff8\nSTR             WZR, [X0,#0x3DC]                                       ; +0xd8, 0x10008effc\nBL              _rand                                                  ; +0xdc, 0x10008f000\nSCVTF           S0, W0, #0x1F                                          ; +0xe0, 0x10008f004\nMOV             W8, #0x447A0000                                        ; +0xe4, 0x10008f008\nFMOV            S1, W8                                                 ; +0xe8, 0x10008f00c\nFMUL            S0, S0, S1                                             ; +0xec, 0x10008f010\nFCVTZS          W8, S0                                                 ; +0xf0, 0x10008f014\nSTR             W8, [X21,#0x3D8]                                       ; +0xf4, 0x10008f018\nSTR             W8, [X21,#0x3D4]                                       ; +0xf8, 0x10008f01c\nLDR             X0, [X19,#0x328]                                       ; +0xfc, 0x10008f020\nCBZ             X0, loc_10008F05C                                      ; +0x100, 0x10008f024\nLDR             X8, [X0]                                               ; +0x104, 0x10008f028\nADD             X8, X8, #8                                             ; +0x108, 0x10008f02c\nB               loc_10008F04C                                          ; +0x10c, 0x10008f030\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x110, 0x10008f034\nBL              __ZdlPv; operator delete(void *)                       ; +0x114, 0x10008f038\nCBNZ            W21, loc_10008EFF4                                     ; +0x118, 0x10008f03c\nLDR             X0, [X19,#0x328]                                       ; +0x11c, 0x10008f040\nCBZ             X0, loc_10008F05C                                      ; +0x120, 0x10008f044\nLDR             X8, [X0]                                               ; +0x124, 0x10008f048\nLDR             X8, [X8]                                               ; +0x128, 0x10008f04c\nMOV             X1, X20                                                ; +0x12c, 0x10008f050\nMOV             W2, #0x2D ; '-'                                        ; +0x130, 0x10008f054\nBLR             X8                                                     ; +0x134, 0x10008f058\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x138, 0x10008f05c\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x13c, 0x10008f060\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x140, 0x10008f064\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x144, 0x10008f068\nRET                                                                    ; +0x148, 0x10008f06c", "xrefs": ["GameLevelManager::handleIt @ 0x1000887e4"], "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"}