{"type": "func", "start": 9967440, "end": 9967688, "name": "GJMultiplayerManager::getDLObject", "pseudocode": "// \n// GJMultiplayerManager::getDLObject from 0x981750 to 0x981848 (248 bytes)\n// \n// 2 xrefs:\n// > GJMultiplayerManager::isDLActive @ 0x981850\n// > <???> @ 0x6bf58\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\ncocos2d::CCObject *GJMultiplayerManager::getDLObject(GJMultiplayerManager *a1, const char *a2)\n{\n  cocos2d::CCDictionary *m_activeDownloads; // x21\n  cocos2d::CCObject *v3; // x20\n  char *v4; // x0\n  unsigned int *v6; // x2\n  int v7; // w1\n  std::string v8; // [xsp+40h] [xbp+40h] BYREF\n\n  m_activeDownloads = a1->m_activeDownloads;\n  sub_D153B8((int)&v8, (char *)a2);\n  v3 = (cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(m_activeDownloads, &v8);\n  v4 = (char *)v8.m_data.m_data - 24;\n  if ( (__int64 *)v8.m_data.m_data - 3 != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v6 = (unsigned int *)((char *)v8.m_data.m_data - 8);\n      do\n        v7 = __ldaxr(v6);\n      while ( __stlxr(v7 - 1, v6) );\n    }\n    else\n    {\n      v7 = *((_DWORD *)v8.m_data.m_data - 2);\n      *((_DWORD *)v8.m_data.m_data - 2) = v7 - 1;\n    }\n    if ( v7 <= 0 )\n      operator delete(v4);\n  }\n  return v3;\n}", "assembly": "; \n; GJMultiplayerManager::getDLObject from 0x981750 to 0x981848 (248 bytes)\n; \n; 2 xrefs:\n; > GJMultiplayerManager::isDLActive @ 0x981850\n; > <???> @ 0x6bf58\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_50]!                                ; +0x0, 0x981750\nMOV             X29, SP                                                ; +0x4, 0x981754\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x981758\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x98175c\nADD             X20, X29, #0x50+var_10                                 ; +0x10, 0x981760\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x14, 0x981764\nADD             X2, X29, #0x50+var_20                                  ; +0x18, 0x981768\nLDR             X21, [X0,#0x140]                                       ; +0x1c, 0x98176c\nMOV             X0, X20; int                                           ; +0x20, 0x981770\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x981774\nLDR             X3, [X3]                                               ; +0x28, 0x981778\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x2c, 0x98177c\nBL              sub_D153B8                                             ; +0x30, 0x981780\nMOV             X0, X21                                                ; +0x34, 0x981784\nMOV             X1, X20                                                ; +0x38, 0x981788\nBL              _ZN7cocos2d12CCDictionary12objectForKeyERKSs; cocos2d::CCDictionary::objectForKey(std::string const&) ; +0x3c, 0x98178c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x40, 0x981790\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x44, 0x981794\nMOV             X20, X0                                                ; +0x48, 0x981798\nSUB             X0, X2, #0x18; p                                       ; +0x4c, 0x98179c\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x50, 0x9817a0\nCMP             X0, X1                                                 ; +0x54, 0x9817a4\nB.NE            loc_9817D4                                             ; +0x58, 0x9817a8\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x5c, 0x9817ac\nMOV             X0, X20                                                ; +0x60, 0x9817b0\nLDR             X2, [X29,#0x50+var_8]                                  ; +0x64, 0x9817b4\nLDR             X1, [X19]                                              ; +0x68, 0x9817b8\nCMP             X2, X1                                                 ; +0x6c, 0x9817bc\nB.NE            loc_981818                                             ; +0x70, 0x9817c0\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x74, 0x9817c4\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x78, 0x9817c8\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x7c, 0x9817cc\nRET                                                                    ; +0x80, 0x9817d0\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x84, 0x9817d4\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x88, 0x9817d8\nCBZ             X1, loc_981808                                         ; +0x8c, 0x9817dc\nSUB             X2, X2, #8                                             ; +0x90, 0x9817e0\nLDAXR           W1, [X2]                                               ; +0x94, 0x9817e4\nSUB             W3, W1, #1                                             ; +0x98, 0x9817e8\nSTLXR           W4, W3, [X2]                                           ; +0x9c, 0x9817ec\nCBNZ            W4, loc_9817E4                                         ; +0xa0, 0x9817f0\nCMP             W1, WZR                                                ; +0xa4, 0x9817f4\nB.GT            loc_9817AC                                             ; +0xa8, 0x9817f8\nADD             X1, X29, #0x50+var_18                                  ; +0xac, 0x9817fc\nBL              j__ZdlPv; operator delete(void *)                      ; +0xb0, 0x981800\nB               loc_9817AC                                             ; +0xb4, 0x981804\nLDUR            W1, [X2,#-8]                                           ; +0xb8, 0x981808\nSUB             W3, W1, #1                                             ; +0xbc, 0x98180c\nSTUR            W3, [X2,#-8]                                           ; +0xc0, 0x981810\nB               loc_9817F4                                             ; +0xc4, 0x981814\nBL              .__stack_chk_fail                                      ; +0xc8, 0x981818\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xcc, 0x98181c\nMOV             X19, X0                                                ; +0xd0, 0x981820\nLDR             X0, [X29,#0x50+var_10]                                 ; +0xd4, 0x981824\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xd8, 0x981828\nSUB             X0, X0, #0x18                                          ; +0xdc, 0x98182c\nCMP             X0, X1                                                 ; +0xe0, 0x981830\nB.EQ            loc_981840                                             ; +0xe4, 0x981834\nADD             X1, X29, #0x50+var_18                                  ; +0xe8, 0x981838\nBL              sub_4DD360                                             ; +0xec, 0x98183c\nMOV             X0, X19                                                ; +0xf0, 0x981840\nBL              _Unwind_Resume                                         ; +0xf4, 0x981844", "xrefs": ["GJMultiplayerManager::isDLActive @ 0x981850", "<???> @ 0x6bf58"], "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"}