{"type": "func", "start": 4300235840, "end": 4300235918, "name": "GJRateLevelLayer::onToggleCoins", "pseudocode": "// \n// GJRateLevelLayer::onToggleCoins from 0x100506440 to 0x10050648e (78 bytes)\n// \n// 1 xrefs:\n// > GJRateLevelLayer::init @ 0x100505bf5\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 __fastcall GJRateLevelLayer::onToggleCoins(GJRateLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  bool m_coinsToggled; // al\n  cocos2d::CCSprite *m_coinSprite; // rdi\n  _WORD v4[2]; // [rsp+Ch] [rbp-4h] BYREF\n\n  m_coinsToggled = a1->m_coinsToggled;\n  a1->m_coinsToggled = !m_coinsToggled;\n  m_coinSprite = a1->m_coinSprite;\n  if ( m_coinsToggled )\n  {\n    memset(v4, 50, 3);\n  }\n  else\n  {\n    LOBYTE(v4[1]) = -1;\n    v4[0] = -1;\n  }\n  ((void (__fastcall *)(cocos2d::CCSprite *, _WORD *))m_coinSprite->setColor)(m_coinSprite, v4);\n}", "assembly": "; \n; GJRateLevelLayer::onToggleCoins from 0x100506440 to 0x10050648e (78 bytes)\n; \n; 1 xrefs:\n; > GJRateLevelLayer::init @ 0x100505bf5\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, 0x100506440\nmov     rbp, rsp                                                       ; +0x1, 0x100506441\nsub     rsp, 10h                                                       ; +0x4, 0x100506444\nmovzx   eax, byte ptr [rdi+3F4h]                                       ; +0x8, 0x100506448\nmov     ecx, eax                                                       ; +0xf, 0x10050644f\nxor     cl, 1                                                          ; +0x11, 0x100506451\nmov     [rdi+3F4h], cl                                                 ; +0x14, 0x100506454\nmov     rdi, [rdi+3F8h]                                                ; +0x1a, 0x10050645a\ntest    al, al                                                         ; +0x21, 0x100506461\njz      short loc_100506471                                            ; +0x23, 0x100506463\nmov     [rbp+var_2], 32h ; '2'                                         ; +0x25, 0x100506465\nmov     [rbp+var_4], 3232h                                             ; +0x29, 0x100506469\njmp     short loc_10050647B                                            ; +0x2f, 0x10050646f\nmov     [rbp+var_2], 0FFh                                              ; +0x31, 0x100506471\nmov     [rbp+var_4], 0FFFFh                                            ; +0x35, 0x100506475\nmov     rax, [rdi]                                                     ; +0x3b, 0x10050647b\nlea     rsi, [rbp+var_4]                                               ; +0x3e, 0x10050647e\ncall    qword ptr [rax+3B0h]                                           ; +0x42, 0x100506482\nadd     rsp, 10h                                                       ; +0x48, 0x100506488\npop     rbp                                                            ; +0x4c, 0x10050648c\nretn                                                                   ; +0x4d, 0x10050648d", "xrefs": ["GJRateLevelLayer::init @ 0x100505bf5"], "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"}