{"type": "func", "start": 4298579256, "end": 4298579432, "name": "GJOptionsLayer::addGVToggle", "pseudocode": "// \n// GJOptionsLayer::addGVToggle from 0x100371d38 to 0x100371de8 (176 bytes)\n// \n// 2 xrefs:\n// > SFXSettingsPopup::setupOptions @ 0x1001f7c38\n// > FindObjectOptionsLayer::setupOptions @ 0x1004ddcbc\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\n__int64 __fastcall GJOptionsLayer::addGVToggle(__int64 a1, __int64 a2, char *a3, __int64 a4)\n{\n  __int64 v8; // x20\n  __int64 v9; // x0\n  __n128 GameVariable; // q0\n  __int64 v11; // x0\n  __int64 v12; // x19\n  __int64 v13; // x21\n  void *v14; // x0\n  void *__p[2]; // [xsp+8h] [xbp-48h] BYREF\n  char v17; // [xsp+1Fh] [xbp-31h]\n\n  v8 = atoi(a3);\n  v9 = GameManager::sharedState(v8);\n  GameVariable = GameManager::getGameVariable(v9, a3);\n  v12 = GJOptionsLayer::addToggleInternal(a1, a2, v8, v11, a4, GameVariable);\n  v13 = *(_QWORD *)(a1 + 1048);\n  sub_100009900(__p, a3);\n  v14 = sub_1003064AC((__int128 *)__p);\n  cocos2d::CCDictionary::setObject_1(v13, v14, (int)v8);\n  if ( v17 < 0 )\n    operator delete(__p[0]);\n  return v12;\n}", "assembly": "; \n; GJOptionsLayer::addGVToggle from 0x100371d38 to 0x100371de8 (176 bytes)\n; \n; 2 xrefs:\n; > SFXSettingsPopup::setupOptions @ 0x1001f7c38\n; > FindObjectOptionsLayer::setupOptions @ 0x1004ddcbc\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, #0x60                                          ; +0x0, 0x100371d38\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x100371d3c\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x100371d40\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x100371d44\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x100371d48\nADD             X29, SP, #0x50                                         ; +0x14, 0x100371d4c\nMOV             X19, X3                                                ; +0x18, 0x100371d50\nMOV             X22, X2                                                ; +0x1c, 0x100371d54\nMOV             X21, X1                                                ; +0x20, 0x100371d58\nMOV             X23, X0                                                ; +0x24, 0x100371d5c\nMOV             X0, X2; char *                                         ; +0x28, 0x100371d60\nBL              _atoi                                                  ; +0x2c, 0x100371d64\nMOV             X20, X0                                                ; +0x30, 0x100371d68\nBL              GameManager__sharedState                               ; +0x34, 0x100371d6c\nMOV             X1, X22                                                ; +0x38, 0x100371d70\nBL              GameManager__getGameVariable                           ; +0x3c, 0x100371d74\nMOV             X3, X0                                                 ; +0x40, 0x100371d78\nMOV             X0, X23                                                ; +0x44, 0x100371d7c\nMOV             X1, X21                                                ; +0x48, 0x100371d80\nMOV             X2, X20                                                ; +0x4c, 0x100371d84\nMOV             X4, X19                                                ; +0x50, 0x100371d88\nBL              GJOptionsLayer__addToggleInternal                      ; +0x54, 0x100371d8c\nMOV             X19, X0                                                ; +0x58, 0x100371d90\nLDR             X21, [X23,#0x418]                                      ; +0x5c, 0x100371d94\nADD             X0, SP, #0x50+__p; int                                 ; +0x60, 0x100371d98\nMOV             X1, X22; __s                                           ; +0x64, 0x100371d9c\nBL              sub_100009900                                          ; +0x68, 0x100371da0\nADD             X0, SP, #0x50+__p                                      ; +0x6c, 0x100371da4\nBL              sub_1003064AC                                          ; +0x70, 0x100371da8\nMOV             X1, X0                                                 ; +0x74, 0x100371dac\nSXTW            X2, W20                                                ; +0x78, 0x100371db0\nMOV             X0, X21                                                ; +0x7c, 0x100371db4\nBL              cocos2d__CCDictionary__setObject_1                     ; +0x80, 0x100371db8\nLDRSB           W8, [SP,#0x50+var_31]                                  ; +0x84, 0x100371dbc\nTBZ             W8, #0x1F, loc_100371DCC                               ; +0x88, 0x100371dc0\nLDR             X0, [SP,#0x50+__p]; __p                                ; +0x8c, 0x100371dc4\nBL              __ZdlPv; operator delete(void *)                       ; +0x90, 0x100371dc8\nMOV             X0, X19                                                ; +0x94, 0x100371dcc\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x98, 0x100371dd0\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x9c, 0x100371dd4\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0xa0, 0x100371dd8\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0xa4, 0x100371ddc\nADD             SP, SP, #0x60 ; '`'                                    ; +0xa8, 0x100371de0\nRET                                                                    ; +0xac, 0x100371de4", "xrefs": ["SFXSettingsPopup::setupOptions @ 0x1001f7c38", "FindObjectOptionsLayer::setupOptions @ 0x1004ddcbc"], "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"}