{"type": "func", "start": 5371812016, "end": 5371812113, "name": "GJRateLevelLayer::onToggleCoins", "pseudocode": "// \n// GJRateLevelLayer::onToggleCoins from 0x1402f58b0 to 0x1402f5911 (97 bytes)\n// \n// 2 xrefs:\n// > GJRateLevelLayer::init @ 0x1402f4a93\n// > <???> @ 0x1406d3ff8\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\nvoid GJRateLevelLayer::onToggleCoins(GJRateLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  bool m_coinsToggled; // dl\n  const cocos2d::ccColor3B *v3; // rdx\n  _BYTE v4[3]; // [rsp+30h] [rbp+8h] BYREF\n  __int16 v5; // [rsp+40h] [rbp+18h] BYREF\n  char v6; // [rsp+42h] [rbp+1Ah]\n\n  m_coinsToggled = a1->m_coinsToggled;\n  a1->m_coinsToggled = !m_coinsToggled;\n  if ( m_coinsToggled )\n  {\n    memset(v4, 50, sizeof(v4));\n    v3 = (const cocos2d::ccColor3B *)v4;\n  }\n  else\n  {\n    v3 = (const cocos2d::ccColor3B *)&v5;\n    v5 = -1;\n    v6 = -1;\n  }\n  a1->m_coinSprite->setColor(&a1->m_coinSprite->cocos2d::CCRGBAProtocol, v3);\n}", "assembly": "; \n; GJRateLevelLayer::onToggleCoins from 0x1402f58b0 to 0x1402f5911 (97 bytes)\n; \n; 2 xrefs:\n; > GJRateLevelLayer::init @ 0x1402f4a93\n; > <???> @ 0x1406d3ff8\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\nsub     rsp, 28h                                                       ; +0x0, 0x1402f58b0\nmovzx   edx, byte ptr [rcx+3ECh]                                       ; +0x4, 0x1402f58b4\ntest    dl, dl                                                         ; +0xb, 0x1402f58bb\nsetz    al                                                             ; +0xd, 0x1402f58bd\nmov     [rcx+3ECh], al                                                 ; +0x10, 0x1402f58c0\ntest    dl, dl                                                         ; +0x16, 0x1402f58c6\njnz     short loc_1402F58E8                                            ; +0x18, 0x1402f58c8\nmovzx   eax, cs:word_140529B34                                         ; +0x1a, 0x1402f58ca\nlea     rdx, [rsp+28h+arg_10]                                          ; +0x21, 0x1402f58d1\nmov     [rsp+28h+arg_10], ax                                           ; +0x26, 0x1402f58d6\nmovzx   eax, cs:byte_140529B36                                         ; +0x2b, 0x1402f58db\nmov     [rsp+28h+arg_12], al                                           ; +0x32, 0x1402f58e2\njmp     short loc_1402F58F9                                            ; +0x36, 0x1402f58e6\nmov     [rsp+28h+arg_0], 3232h                                         ; +0x38, 0x1402f58e8\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x3f, 0x1402f58ef\nmov     [rsp+28h+arg_2], 32h ; '2'                                     ; +0x44, 0x1402f58f4\nmov     rcx, [rcx+3F0h]                                                ; +0x49, 0x1402f58f9\nadd     rcx, 140h                                                      ; +0x50, 0x1402f5900\nmov     rax, [rcx]                                                     ; +0x57, 0x1402f5907\ncall    qword ptr [rax]                                                ; +0x5a, 0x1402f590a\nadd     rsp, 28h                                                       ; +0x5c, 0x1402f590c\nretn                                                                   ; +0x60, 0x1402f5910", "xrefs": ["GJRateLevelLayer::init @ 0x1402f4a93", "<???> @ 0x1406d3ff8"], "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"}