{"type": "func", "start": 4296044336, "end": 4296044413, "name": "GJBaseGameLayer::countCollectedUserCoins", "pseudocode": "// \n// GJBaseGameLayer::countCollectedUserCoins from 0x100106f30 to 0x100106f7d (77 bytes)\n// \n// 1 xrefs:\n// > PlayLayer::levelComplete @ 0x100081118\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:21:32 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::countCollectedUserCoins(__int64 a1)\n{\n  __int64 v1; // rax\n  unsigned int v2; // ebx\n  __int64 v3; // r14\n  __int64 v4; // rdi\n\n  v1 = *(_QWORD *)(a1 + 12592);\n  v2 = 0;\n  if ( v1 )\n  {\n    v3 = *(_QWORD *)(v1 + 56);\n    if ( v3 )\n    {\n      v2 = 0;\n      do\n      {\n        v4 = *(_QWORD *)(v3 + 264);\n        v3 = *(_QWORD *)(v3 + 288);\n        v2 += (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1800LL))(v4) == 31;\n      }\n      while ( v3 );\n    }\n  }\n  return v2;\n}", "assembly": "; \n; GJBaseGameLayer::countCollectedUserCoins from 0x100106f30 to 0x100106f7d (77 bytes)\n; \n; 1 xrefs:\n; > PlayLayer::levelComplete @ 0x100081118\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:21:32 +0000\n; \npush    rbp                                                            ; +0x0, 0x100106f30\nmov     rbp, rsp                                                       ; +0x1, 0x100106f31\npush    r14                                                            ; +0x4, 0x100106f34\npush    rbx                                                            ; +0x6, 0x100106f36\nmov     rax, [rdi+3130h]                                               ; +0x7, 0x100106f37\nxor     ebx, ebx                                                       ; +0xe, 0x100106f3e\ntest    rax, rax                                                       ; +0x10, 0x100106f40\njz      short loc_100106F76                                            ; +0x13, 0x100106f43\nmov     r14, [rax+38h]                                                 ; +0x15, 0x100106f45\ntest    r14, r14                                                       ; +0x19, 0x100106f49\njz      short loc_100106F76                                            ; +0x1c, 0x100106f4c\nxor     ebx, ebx                                                       ; +0x1e, 0x100106f4e\nmov     rdi, [r14+108h]                                                ; +0x20, 0x100106f50\nmov     r14, [r14+120h]                                                ; +0x27, 0x100106f57\nmov     rax, [rdi]                                                     ; +0x2e, 0x100106f5e\ncall    qword ptr [rax+708h]                                           ; +0x31, 0x100106f61\nxor     ecx, ecx                                                       ; +0x37, 0x100106f67\ncmp     eax, 1Fh                                                       ; +0x39, 0x100106f69\nsetz    cl                                                             ; +0x3c, 0x100106f6c\nadd     ebx, ecx                                                       ; +0x3f, 0x100106f6f\ntest    r14, r14                                                       ; +0x41, 0x100106f71\njnz     short loc_100106F50                                            ; +0x44, 0x100106f74\nmov     eax, ebx                                                       ; +0x46, 0x100106f76\npop     rbx                                                            ; +0x48, 0x100106f78\npop     r14                                                            ; +0x49, 0x100106f79\npop     rbp                                                            ; +0x4b, 0x100106f7b\nretn                                                                   ; +0x4c, 0x100106f7c", "xrefs": ["PlayLayer::levelComplete @ 0x100081118"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}