{"type": "func", "start": 7347888, "end": 7348188, "name": "GJGameLevel::setLastBuildPageForTab", "pseudocode": "// \n// GJGameLevel::setLastBuildPageForTab from 0x701eb0 to 0x701fdc (300 bytes)\n// \n// 2 xrefs:\n// > EditorUI::onPause @ 0x6963cc\n// > <???> @ 0x31bd8\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// local variable allocation has failed, the output may be wrong!\nvoid GJGameLevel::setLastBuildPageForTab(GJGameLevel *a1, int a2, int a3)\n{\n  cocos2d::CCDictionary *m_lastBuildSave; // x23\n  cocos2d::CCObject *v4; // x22\n  cocos2d::CCString *v5; // x0\n  char *CString; // x0\n  void *v7; // x0\n  unsigned int *v8; // x2\n  int v9; // w1\n  __int64 v11; // [xsp+60h] [xbp+60h] BYREF\n\n  m_lastBuildSave = a1->m_lastBuildSave;\n  v4 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", *(const char **)&a2);\n  v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                              (cocos2d::CCString *)\"%i\",\n                              (const char *)(unsigned int)a3);\n  CString = (char *)cocos2d::CCString::getCString(v5);\n  sub_D153B8((int)&v11, CString);\n  cocos2d::CCDictionary::setObject((int)m_lastBuildSave, v4);\n  v7 = (void *)(v11 - 24);\n  if ( (__int64 *)(v11 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v8 = (unsigned int *)(v11 - 8);\n      do\n        v9 = __ldaxr(v8);\n      while ( __stlxr(v9 - 1, v8) );\n    }\n    else\n    {\n      v9 = *(_DWORD *)(v11 - 8);\n      *(_DWORD *)(v11 - 8) = v9 - 1;\n    }\n    if ( v9 <= 0 )\n      operator delete(v7);\n  }\n}", "assembly": "; \n; GJGameLevel::setLastBuildPageForTab from 0x701eb0 to 0x701fdc (300 bytes)\n; \n; 2 xrefs:\n; > EditorUI::onPause @ 0x6963cc\n; > <???> @ 0x31bd8\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             X29, X30, [SP,#var_70]!                                ; +0x0, 0x701eb0\nMOV             X29, SP                                                ; +0x4, 0x701eb4\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0x701eb8\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x701ebc\nSTR             X23, [SP,#0x70+var_40]                                 ; +0x10, 0x701ec0\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x14, 0x701ec4\nADRP            X21, #(aSongidI+8)@PAGE; \"%i\"                          ; +0x18, 0x701ec8\nLDR             X23, [X0,#0x140]                                       ; +0x1c, 0x701ecc\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x701ed0\nADD             X21, X21, #(aSongidI+8)@PAGEOFF; \"%i\"                  ; +0x24, 0x701ed4\nMOV             X0, X21; this                                          ; +0x28, 0x701ed8\nSTR             X2, [X29,#0x70+var_28]                                 ; +0x2c, 0x701edc\nADD             X20, X29, #0x70+var_10                                 ; +0x30, 0x701ee0\nLDR             X3, [X3]                                               ; +0x34, 0x701ee4\nSTR             X3, [X29,#0x70+var_8]                                  ; +0x38, 0x701ee8\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x3c, 0x701eec\nMOV             X22, X0                                                ; +0x40, 0x701ef0\nLDR             X2, [X29,#0x70+var_28]                                 ; +0x44, 0x701ef4\nMOV             X0, X21; this                                          ; +0x48, 0x701ef8\nMOV             W1, W2; char *                                         ; +0x4c, 0x701efc\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x50, 0x701f00\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x54, 0x701f04\nMOV             X1, X0; char *                                         ; +0x58, 0x701f08\nADD             X2, X29, #0x70+var_20                                  ; +0x5c, 0x701f0c\nMOV             X0, X20; int                                           ; +0x60, 0x701f10\nBL              sub_D153B8                                             ; +0x64, 0x701f14\nMOV             X0, X23; int                                           ; +0x68, 0x701f18\nMOV             X1, X22; this                                          ; +0x6c, 0x701f1c\nMOV             X2, X20                                                ; +0x70, 0x701f20\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectERKSs; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const&) ; +0x74, 0x701f24\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x78, 0x701f28\nLDR             X2, [X29,#0x70+var_10]                                 ; +0x7c, 0x701f2c\nSUB             X0, X2, #0x18; p                                       ; +0x80, 0x701f30\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x84, 0x701f34\nCMP             X0, X1                                                 ; +0x88, 0x701f38\nB.NE            loc_701F68                                             ; +0x8c, 0x701f3c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x90, 0x701f40\nLDR             X1, [X29,#0x70+var_8]                                  ; +0x94, 0x701f44\nLDR             X0, [X19]                                              ; +0x98, 0x701f48\nCMP             X1, X0                                                 ; +0x9c, 0x701f4c\nB.NE            loc_701FAC                                             ; +0xa0, 0x701f50\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0xa4, 0x701f54\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0xa8, 0x701f58\nLDR             X23, [SP,#0x70+var_40]                                 ; +0xac, 0x701f5c\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0xb0, 0x701f60\nRET                                                                    ; +0xb4, 0x701f64\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xb8, 0x701f68\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xbc, 0x701f6c\nCBZ             X1, loc_701F9C                                         ; +0xc0, 0x701f70\nSUB             X2, X2, #8                                             ; +0xc4, 0x701f74\nLDAXR           W1, [X2]                                               ; +0xc8, 0x701f78\nSUB             W3, W1, #1                                             ; +0xcc, 0x701f7c\nSTLXR           W4, W3, [X2]                                           ; +0xd0, 0x701f80\nCBNZ            W4, loc_701F78                                         ; +0xd4, 0x701f84\nCMP             W1, WZR                                                ; +0xd8, 0x701f88\nB.GT            loc_701F40                                             ; +0xdc, 0x701f8c\nADD             X1, X29, #0x70+var_18                                  ; +0xe0, 0x701f90\nBL              j__ZdlPv; operator delete(void *)                      ; +0xe4, 0x701f94\nB               loc_701F40                                             ; +0xe8, 0x701f98\nLDUR            W1, [X2,#-8]                                           ; +0xec, 0x701f9c\nSUB             W3, W1, #1                                             ; +0xf0, 0x701fa0\nSTUR            W3, [X2,#-8]                                           ; +0xf4, 0x701fa4\nB               loc_701F88                                             ; +0xf8, 0x701fa8\nBL              .__stack_chk_fail                                      ; +0xfc, 0x701fac\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x100, 0x701fb0\nMOV             X19, X0                                                ; +0x104, 0x701fb4\nLDR             X0, [X29,#0x70+var_10]                                 ; +0x108, 0x701fb8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x10c, 0x701fbc\nSUB             X0, X0, #0x18                                          ; +0x110, 0x701fc0\nCMP             X0, X1                                                 ; +0x114, 0x701fc4\nB.EQ            loc_701FD4                                             ; +0x118, 0x701fc8\nADD             X1, X29, #0x70+var_18                                  ; +0x11c, 0x701fcc\nBL              sub_6EE220                                             ; +0x120, 0x701fd0\nMOV             X0, X19                                                ; +0x124, 0x701fd4\nBL              _Unwind_Resume                                         ; +0x128, 0x701fd8", "xrefs": ["EditorUI::onPause @ 0x6963cc", "<???> @ 0x31bd8"], "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"}