{"type": "func", "start": 4298580876, "end": 4298581100, "name": "GJOptionsLayer::onToggle", "pseudocode": "// \n// GJOptionsLayer::onToggle from 0x10037238c to 0x10037246c (224 bytes)\n// \n// 1 xrefs:\n// > GJOptionsLayer::addToggleInternal @ 0x100371edc\n// \n// This function is hookable on this platform (idp: arm, 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 11:03:23 +0000\n// \n\nvoid __fastcall GJOptionsLayer::onToggle(_QWORD *a1, __int64 a2)\n{\n  __int64 v4; // x21\n  int v5; // w0\n  __int64 v6; // x0\n  __n128 v7; // q0\n  __int64 v8; // x21\n  __int64 v9; // x20\n  __int64 CString; // x0\n  char *v11; // x0\n  __int64 v12; // x0\n  void *__p[2]; // [xsp+8h] [xbp-38h] BYREF\n  char v14; // [xsp+1Fh] [xbp-21h]\n\n  v4 = a1[131];\n  v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  v7 = cocos2d::CCDictionary::objectForKey_1(v4, v5);\n  if ( v6 )\n  {\n    v8 = v6;\n    v9 = GameManager::sharedState(v6);\n    CString = cocos2d::CCString::getCString(v8);\n    GameManager::toggleGameVariable(v9, CString);\n    v11 = (char *)cocos2d::CCString::getCString(v8);\n    sub_100009900(__p, v11);\n    (*(void (__fastcall **)(_QWORD *, void **))(*a1 + 1512LL))(a1, __p);\n    if ( v14 < 0 )\n      operator delete(__p[0]);\n  }\n  else\n  {\n    v12 = (*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)a2 + 64LL))(a2, v7);\n    (*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1520LL))(a1, v12);\n  }\n}", "assembly": "; \n; GJOptionsLayer::onToggle from 0x10037238c to 0x10037246c (224 bytes)\n; \n; 1 xrefs:\n; > GJOptionsLayer::addToggleInternal @ 0x100371edc\n; \n; This function is hookable on this platform (idp: arm, 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 11:03:23 +0000\n; \nSUB             SP, SP, #0x50                                          ; +0x0, 0x10037238c\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x100372390\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x100372394\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x100372398\nADD             X29, SP, #0x40                                         ; +0x10, 0x10037239c\nMOV             X20, X1                                                ; +0x14, 0x1003723a0\nMOV             X19, X0                                                ; +0x18, 0x1003723a4\nLDR             X21, [X0,#0x418]                                       ; +0x1c, 0x1003723a8\nLDR             X8, [X1]                                               ; +0x20, 0x1003723ac\nLDR             X8, [X8,#0x40]                                         ; +0x24, 0x1003723b0\nMOV             X0, X1                                                 ; +0x28, 0x1003723b4\nBLR             X8                                                     ; +0x2c, 0x1003723b8\nSXTW            X1, W0                                                 ; +0x30, 0x1003723bc\nMOV             X0, X21                                                ; +0x34, 0x1003723c0\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x38, 0x1003723c4\nCBZ             X0, loc_100372438                                      ; +0x3c, 0x1003723c8\nMOV             X21, X0                                                ; +0x40, 0x1003723cc\nBL              GameManager__sharedState                               ; +0x44, 0x1003723d0\nMOV             X20, X0                                                ; +0x48, 0x1003723d4\nMOV             X0, X21                                                ; +0x4c, 0x1003723d8\nBL              cocos2d__CCString__getCString                          ; +0x50, 0x1003723dc\nMOV             X1, X0                                                 ; +0x54, 0x1003723e0\nMOV             X0, X20                                                ; +0x58, 0x1003723e4\nBL              GameManager__toggleGameVariable                        ; +0x5c, 0x1003723e8\nMOV             X0, X21                                                ; +0x60, 0x1003723ec\nBL              cocos2d__CCString__getCString                          ; +0x64, 0x1003723f0\nMOV             X1, X0; __s                                            ; +0x68, 0x1003723f4\nADD             X0, SP, #0x40+__p; int                                 ; +0x6c, 0x1003723f8\nBL              sub_100009900                                          ; +0x70, 0x1003723fc\nLDR             X8, [X19]                                              ; +0x74, 0x100372400\nLDR             X8, [X8,#0x5E8]                                        ; +0x78, 0x100372404\nADD             X1, SP, #0x40+__p                                      ; +0x7c, 0x100372408\nMOV             X0, X19                                                ; +0x80, 0x10037240c\nBLR             X8                                                     ; +0x84, 0x100372410\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x88, 0x100372414\nTBZ             W8, #0x1F, loc_100372424                               ; +0x8c, 0x100372418\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x90, 0x10037241c\nBL              __ZdlPv; operator delete(void *)                       ; +0x94, 0x100372420\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x98, 0x100372424\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x9c, 0x100372428\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xa0, 0x10037242c\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xa4, 0x100372430\nRET                                                                    ; +0xa8, 0x100372434\nLDR             X8, [X20]                                              ; +0xac, 0x100372438\nLDR             X8, [X8,#0x40]                                         ; +0xb0, 0x10037243c\nMOV             X0, X20                                                ; +0xb4, 0x100372440\nBLR             X8                                                     ; +0xb8, 0x100372444\nMOV             X1, X0                                                 ; +0xbc, 0x100372448\nLDR             X8, [X19]                                              ; +0xc0, 0x10037244c\nLDR             X2, [X8,#0x5F0]                                        ; +0xc4, 0x100372450\nMOV             X0, X19                                                ; +0xc8, 0x100372454\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xcc, 0x100372458\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xd0, 0x10037245c\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xd4, 0x100372460\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xd8, 0x100372464\nBR              X2                                                     ; +0xdc, 0x100372468", "xrefs": ["GJOptionsLayer::addToggleInternal @ 0x100371edc"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}