{"type": "func", "start": 4296185104, "end": 4296185181, "name": "GJBaseGameLayer::countCollectedUserCoins", "pseudocode": "// \n// GJBaseGameLayer::countCollectedUserCoins from 0x100129510 to 0x10012955d (77 bytes)\n// \n// 1 xrefs:\n// > PlayLayer::levelComplete @ 0x1000b39c5\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 GJBaseGameLayer::countCollectedUserCoins(GJBaseGameLayer *a1)\n{\n  cocos2d::CCDictionary *m_collectedItems; // rax\n  int v2; // ebx\n  cocos2d::CCDictElement *m_pElements; // r14\n  cocos2d::CCObject *m_pObject; // rdi\n\n  m_collectedItems = a1->m_collectedItems;\n  v2 = 0;\n  if ( m_collectedItems )\n  {\n    m_pElements = m_collectedItems->m_pElements;\n    if ( m_pElements )\n    {\n      v2 = 0;\n      do\n      {\n        m_pObject = m_pElements->m_pObject;\n        m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n        v2 += ((__int64 (__fastcall *)(cocos2d::CCObject *))m_pObject->__vftable[22].isEqual)(m_pObject) == 31;\n      }\n      while ( m_pElements );\n    }\n  }\n  return v2;\n}", "assembly": "; \n; GJBaseGameLayer::countCollectedUserCoins from 0x100129510 to 0x10012955d (77 bytes)\n; \n; 1 xrefs:\n; > PlayLayer::levelComplete @ 0x1000b39c5\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\npush    rbp                                                            ; +0x0, 0x100129510\nmov     rbp, rsp                                                       ; +0x1, 0x100129511\npush    r14                                                            ; +0x4, 0x100129514\npush    rbx                                                            ; +0x6, 0x100129516\nmov     rax, [rdi+3080h]                                               ; +0x7, 0x100129517\nxor     ebx, ebx                                                       ; +0xe, 0x10012951e\ntest    rax, rax                                                       ; +0x10, 0x100129520\njz      short loc_100129556                                            ; +0x13, 0x100129523\nmov     r14, [rax+38h]                                                 ; +0x15, 0x100129525\ntest    r14, r14                                                       ; +0x19, 0x100129529\njz      short loc_100129556                                            ; +0x1c, 0x10012952c\nxor     ebx, ebx                                                       ; +0x1e, 0x10012952e\nmov     rdi, [r14+108h]                                                ; +0x20, 0x100129530\nmov     r14, [r14+120h]                                                ; +0x27, 0x100129537\nmov     rax, [rdi]                                                     ; +0x2e, 0x10012953e\ncall    qword ptr [rax+6F8h]                                           ; +0x31, 0x100129541\nxor     ecx, ecx                                                       ; +0x37, 0x100129547\ncmp     eax, 1Fh                                                       ; +0x39, 0x100129549\nsetz    cl                                                             ; +0x3c, 0x10012954c\nadd     ebx, ecx                                                       ; +0x3f, 0x10012954f\ntest    r14, r14                                                       ; +0x41, 0x100129551\njnz     short loc_100129530                                            ; +0x44, 0x100129554\nmov     eax, ebx                                                       ; +0x46, 0x100129556\npop     rbx                                                            ; +0x48, 0x100129558\npop     r14                                                            ; +0x49, 0x100129559\npop     rbp                                                            ; +0x4b, 0x10012955b\nretn                                                                   ; +0x4c, 0x10012955c", "xrefs": ["PlayLayer::levelComplete @ 0x1000b39c5"], "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"}