{"type": "func", "start": 4933080, "end": 4933208, "name": "GJOptionsLayer::addGVToggle", "pseudocode": "// \n// GJOptionsLayer::addGVToggle from 0x4b45d8 to 0x4b4658 (128 bytes)\n// \n// 23 xrefs:\n// > EditorOptionsLayer::setupOptions @ 0x4b46b0\n// > EditorOptionsLayer::setupOptions @ 0x4b46c2\n// > EditorOptionsLayer::setupOptions @ 0x4b46d4\n// > EditorOptionsLayer::setupOptions @ 0x4b46e6\n// > EditorOptionsLayer::setupOptions @ 0x4b46f8\n// > EditorOptionsLayer::setupOptions @ 0x4b470a\n// > EditorOptionsLayer::setupOptions @ 0x4b471c\n// > EditorOptionsLayer::setupOptions @ 0x4b472e\n// > EditorOptionsLayer::setupOptions @ 0x4b4740\n// > EditorOptionsLayer::setupOptions @ 0x4b4752\n// > EditorOptionsLayer::setupOptions @ 0x4b476a\n// > EditorOptionsLayer::setupOptions @ 0x4b477c\n// > EditorOptionsLayer::setupOptions @ 0x4b478e\n// > EditorOptionsLayer::setupOptions @ 0x4b47a0\n// > EditorOptionsLayer::setupOptions @ 0x4b47b2\n// > EditorOptionsLayer::setupOptions @ 0x4b47c4\n// > EditorOptionsLayer::setupOptions @ 0x4b47d6\n// > EditorOptionsLayer::setupOptions @ 0x4b47e8\n// > EditorOptionsLayer::setupOptions @ 0x4b47fa\n// > EditorOptionsLayer::setupOptions @ 0x4b480c\n// > EditorOptionsLayer::setupOptions @ 0x4b481e\n// > EditorOptionsLayer::setupOptions @ 0x4b4830\n// > EditorOptionsLayer::setupOptions @ 0x4b4842\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 GJOptionsLayer::addGVToggle(GJOptionsLayer *a1, const char *a2, const char *a3, const char *a4)\n{\n  int v8; // r7\n  GameManager *v9; // r0\n  bool GameVariable; // r0\n  cocos2d::CCDictionary *m_variables; // r9\n  const std::string *v12; // r1\n  cocos2d::CCObject *v13; // r0\n  char v14; // [sp+10h] [bp-Ch] BYREF\n\n  v8 = atoi(a3);\n  v9 = GameManager::sharedState();\n  GameVariable = GameManager::getGameVariable(v9, a3);\n  GJOptionsLayer::addToggleInternal(a1, a2, v8, GameVariable, a4);\n  m_variables = a1->m_variables;\n  sub_776584((int)&v14, (char *)a3);\n  v13 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v14, v12);\n  cocos2d::CCDictionary::setObject(m_variables, v13, v8);\n  sub_774008(&v14);\n}", "assembly": "; \n; GJOptionsLayer::addGVToggle from 0x4b45d8 to 0x4b4658 (128 bytes)\n; \n; 23 xrefs:\n; > EditorOptionsLayer::setupOptions @ 0x4b46b0\n; > EditorOptionsLayer::setupOptions @ 0x4b46c2\n; > EditorOptionsLayer::setupOptions @ 0x4b46d4\n; > EditorOptionsLayer::setupOptions @ 0x4b46e6\n; > EditorOptionsLayer::setupOptions @ 0x4b46f8\n; > EditorOptionsLayer::setupOptions @ 0x4b470a\n; > EditorOptionsLayer::setupOptions @ 0x4b471c\n; > EditorOptionsLayer::setupOptions @ 0x4b472e\n; > EditorOptionsLayer::setupOptions @ 0x4b4740\n; > EditorOptionsLayer::setupOptions @ 0x4b4752\n; > EditorOptionsLayer::setupOptions @ 0x4b476a\n; > EditorOptionsLayer::setupOptions @ 0x4b477c\n; > EditorOptionsLayer::setupOptions @ 0x4b478e\n; > EditorOptionsLayer::setupOptions @ 0x4b47a0\n; > EditorOptionsLayer::setupOptions @ 0x4b47b2\n; > EditorOptionsLayer::setupOptions @ 0x4b47c4\n; > EditorOptionsLayer::setupOptions @ 0x4b47d6\n; > EditorOptionsLayer::setupOptions @ 0x4b47e8\n; > EditorOptionsLayer::setupOptions @ 0x4b47fa\n; > EditorOptionsLayer::setupOptions @ 0x4b480c\n; > EditorOptionsLayer::setupOptions @ 0x4b481e\n; > EditorOptionsLayer::setupOptions @ 0x4b4830\n; > EditorOptionsLayer::setupOptions @ 0x4b4842\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.W          {R4-R9,LR}                                             ; +0x0, 0x4b45d8\nMOV             R9, R3                                                 ; +0x4, 0x4b45dc\nLDR             R4, =(__stack_chk_guard_ptr - 0x4B45EA)                ; +0x6, 0x4b45de\nSUB             SP, SP, #0x1C                                          ; +0x8, 0x4b45e0\nMOV             R5, R0                                                 ; +0xa, 0x4b45e2\nMOV             R0, R2; char *                                         ; +0xc, 0x4b45e4\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xe, 0x4b45e6\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x10, 0x4b45e8\nMOV             R6, R2                                                 ; +0x12, 0x4b45ea\nMOV             R8, R1                                                 ; +0x14, 0x4b45ec\nLDR             R3, [R4]                                               ; +0x16, 0x4b45ee\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x18, 0x4b45f0\nBLX             atoi                                                   ; +0x1a, 0x4b45f2\nMOV             R7, R0                                                 ; +0x1e, 0x4b45f6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x20, 0x4b45f8\nMOV             R1, R6; char *                                         ; +0x24, 0x4b45fc\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x26, 0x4b45fe\nMOV             R1, R8; char *                                         ; +0x2a, 0x4b4602\nSTR.W           R9, [SP,#0x1C+var_1C]; char *                          ; +0x2c, 0x4b4604\nMOV             R2, R7; int                                            ; +0x30, 0x4b4608\nMOV             R3, R0; bool                                           ; +0x32, 0x4b460a\nMOV             R0, R5; this                                           ; +0x34, 0x4b460c\nBL              _ZN14GJOptionsLayer17addToggleInternalEPKcibS1_; GJOptionsLayer::addToggleInternal(char const*,int,bool,char const*) ; +0x36, 0x4b460e\nLDR.W           R9, [R5,#0x2C8]                                        ; +0x3a, 0x4b4612\nADD             R5, SP, #0x1C+var_C                                    ; +0x3e, 0x4b4616\nMOV             R1, R6; char *                                         ; +0x40, 0x4b4618\nADD             R2, SP, #0x1C+var_10                                   ; +0x42, 0x4b461a\nMOV             R8, R0                                                 ; +0x44, 0x4b461c\nMOV             R0, R5; int                                            ; +0x46, 0x4b461e\nBL              sub_776584                                             ; +0x48, 0x4b4620\nMOV             R0, R5                                                 ; +0x4c, 0x4b4624\nBL              _ZN7cocos2d8CCString6createERKSs; cocos2d::CCString::create(std::string const&) ; +0x4e, 0x4b4626\nMOV             R1, R0; cocos2d::CCObject *                            ; +0x52, 0x4b462a\nMOV             R2, R7; int                                            ; +0x54, 0x4b462c\nMOV             R0, R9; this                                           ; +0x56, 0x4b462e\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0x58, 0x4b4630\nMOV             R0, R5                                                 ; +0x5c, 0x4b4634\nBL              sub_774008                                             ; +0x5e, 0x4b4636\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x62, 0x4b463a\nLDR             R3, [R4]                                               ; +0x64, 0x4b463c\nMOV             R0, R8                                                 ; +0x66, 0x4b463e\nCMP             R2, R3                                                 ; +0x68, 0x4b4640\nBEQ             loc_4B4652                                             ; +0x6a, 0x4b4642\nBLX             __stack_chk_fail                                       ; +0x6c, 0x4b4644\nMOV             R0, R5                                                 ; +0x70, 0x4b4648\nBL              sub_774008                                             ; +0x72, 0x4b464a\nBL              __cxa_end_cleanup                                      ; +0x76, 0x4b464e\nADD             SP, SP, #0x1C                                          ; +0x7a, 0x4b4652\nPOP.W           {R4-R9,PC}                                             ; +0x7c, 0x4b4654", "xrefs": ["EditorOptionsLayer::setupOptions @ 0x4b46b0", "EditorOptionsLayer::setupOptions @ 0x4b46c2", "EditorOptionsLayer::setupOptions @ 0x4b46d4", "EditorOptionsLayer::setupOptions @ 0x4b46e6", "EditorOptionsLayer::setupOptions @ 0x4b46f8", "EditorOptionsLayer::setupOptions @ 0x4b470a", "EditorOptionsLayer::setupOptions @ 0x4b471c", "EditorOptionsLayer::setupOptions @ 0x4b472e", "EditorOptionsLayer::setupOptions @ 0x4b4740", "EditorOptionsLayer::setupOptions @ 0x4b4752", "EditorOptionsLayer::setupOptions @ 0x4b476a", "EditorOptionsLayer::setupOptions @ 0x4b477c", "EditorOptionsLayer::setupOptions @ 0x4b478e", "EditorOptionsLayer::setupOptions @ 0x4b47a0", "EditorOptionsLayer::setupOptions @ 0x4b47b2", "EditorOptionsLayer::setupOptions @ 0x4b47c4", "EditorOptionsLayer::setupOptions @ 0x4b47d6", "EditorOptionsLayer::setupOptions @ 0x4b47e8", "EditorOptionsLayer::setupOptions @ 0x4b47fa", "EditorOptionsLayer::setupOptions @ 0x4b480c", "EditorOptionsLayer::setupOptions @ 0x4b481e", "EditorOptionsLayer::setupOptions @ 0x4b4830", "EditorOptionsLayer::setupOptions @ 0x4b4842"], "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"}