{"type": "func", "start": 8758260, "end": 8758376, "name": "GJBaseGameLayer::countCollectedUserCoins", "pseudocode": "// \n// GJBaseGameLayer::countCollectedUserCoins from 0x85a3f4 to 0x85a468 (116 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::levelComplete @ 0x5d132c\n// > <???> @ 0x4b300\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 GJBaseGameLayer::countCollectedUserCoins(GJBaseGameLayer *a1)\n{\n  cocos2d::CCDictionary *m_collectedItems; // x0\n  cocos2d::CCDictElement *m_pElements; // x0\n  cocos2d::CCDictElement *next; // x19\n  int v4; // w20\n\n  m_collectedItems = a1->m_collectedItems;\n  if ( !m_collectedItems )\n    return 0;\n  m_pElements = m_collectedItems->m_pElements;\n  if ( !m_pElements )\n    return 0;\n  next = (cocos2d::CCDictElement *)m_pElements->hh.next;\n  v4 = 0;\n  while ( 1 )\n  {\n    if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))m_pElements->m_pObject->__vftable[22].isEqual)(m_pElements->m_pObject) == 31 )\n      ++v4;\n    if ( !next )\n      break;\n    m_pElements = next;\n    next = (cocos2d::CCDictElement *)next->hh.next;\n  }\n  return v4;\n}", "assembly": "; \n; GJBaseGameLayer::countCollectedUserCoins from 0x85a3f4 to 0x85a468 (116 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::levelComplete @ 0x5d132c\n; > <???> @ 0x4b300\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,#-0x20+var_s0]!                          ; +0x0, 0x85a3f4\nMOV             X29, SP                                                ; +0x4, 0x85a3f8\nLDR             X0, [X0,#0x3278]                                       ; +0x8, 0x85a3fc\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x85a400\nCBZ             X0, loc_85A454                                         ; +0x10, 0x85a404\nLDR             X0, [X0,#0x38]                                         ; +0x14, 0x85a408\nCBZ             X0, loc_85A454                                         ; +0x18, 0x85a40c\nLDR             X19, [X0,#0x120]                                       ; +0x1c, 0x85a410\nMOV             W20, #0                                                ; +0x20, 0x85a414\nB               loc_85A424                                             ; +0x24, 0x85a418\nMOV             X0, X19                                                ; +0x28, 0x85a41c\nLDR             X19, [X19,#0x120]                                      ; +0x2c, 0x85a420\nLDR             X1, [X0,#0x108]                                        ; +0x30, 0x85a424\nMOV             X0, X1                                                 ; +0x34, 0x85a428\nLDR             X1, [X1]                                               ; +0x38, 0x85a42c\nLDR             X1, [X1,#0x6F8]                                        ; +0x3c, 0x85a430\nBLR             X1                                                     ; +0x40, 0x85a434\nCMP             W0, #0x1F                                              ; +0x44, 0x85a438\nCINC            W20, W20, EQ                                           ; +0x48, 0x85a43c\nCBNZ            X19, loc_85A41C                                        ; +0x4c, 0x85a440\nMOV             W0, W20                                                ; +0x50, 0x85a444\nLDP             X19, X20, [SP,#var_s10]                                ; +0x54, 0x85a448\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x58, 0x85a44c\nRET                                                                    ; +0x5c, 0x85a450\nMOV             W20, #0                                                ; +0x60, 0x85a454\nMOV             W0, W20                                                ; +0x64, 0x85a458\nLDP             X19, X20, [SP,#var_s10]                                ; +0x68, 0x85a45c\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x6c, 0x85a460\nRET                                                                    ; +0x70, 0x85a464", "xrefs": ["PlayLayer::levelComplete @ 0x5d132c", "<???> @ 0x4b300"], "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"}