{"type": "func", "start": 4296105548, "end": 4296105780, "name": "MoreVideoOptionsLayer::layerForPage", "pseudocode": "// \n// MoreVideoOptionsLayer::layerForPage from 0x100115e4c to 0x100115f34 (232 bytes)\n// \n// 1 xrefs:\n// > MoreVideoOptionsLayer::addToggle @ 0x1001157ac\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 10:59:10 +0000\n// \n\n__int64 __fastcall MoreVideoOptionsLayer::layerForPage(__int64 a1, int a2)\n{\n  __int64 v4; // x19\n  __int64 v5; // x0\n  char *CString; // x0\n  __int64 v7; // x0\n  __int64 v8; // x19\n  __int64 v9; // x21\n  __int64 v10; // x0\n  char *v11; // x0\n  void *__p[2]; // [xsp+8h] [xbp-38h] BYREF\n  char v14; // [xsp+1Fh] [xbp-21h]\n\n  v4 = *(_QWORD *)(a1 + 672);\n  v5 = sub_1003065B0(\"layer_%i\", a2);\n  CString = (char *)cocos2d::CCString::getCString(v5);\n  sub_100009900(__p, CString);\n  v7 = cocos2d::CCDictionary::objectForKey(v4, __p);\n  v8 = v7;\n  if ( v14 < 0 )\n  {\n    operator delete(__p[0]);\n    if ( v8 )\n      return v8;\n  }\n  else if ( v7 )\n  {\n    return v8;\n  }\n  v8 = cocos2d::CCLayer::create(v7);\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v8);\n  v9 = *(_QWORD *)(a1 + 672);\n  v10 = sub_1003065B0(\"layer_%i\", a2);\n  v11 = (char *)cocos2d::CCString::getCString(v10);\n  sub_100009900(__p, v11);\n  cocos2d::CCDictionary::setObject(v9, v8, __p);\n  if ( v14 < 0 )\n    operator delete(__p[0]);\n  return v8;\n}", "assembly": "; \n; MoreVideoOptionsLayer::layerForPage from 0x100115e4c to 0x100115f34 (232 bytes)\n; \n; 1 xrefs:\n; > MoreVideoOptionsLayer::addToggle @ 0x1001157ac\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 10:59:10 +0000\n; \nSUB             SP, SP, #0x50                                          ; +0x0, 0x100115e4c\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x100115e50\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x100115e54\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x100115e58\nADD             X29, SP, #0x40                                         ; +0x10, 0x100115e5c\nMOV             X20, X1                                                ; +0x14, 0x100115e60\nMOV             X21, X0                                                ; +0x18, 0x100115e64\nLDR             X19, [X0,#0x2A0]                                       ; +0x1c, 0x100115e68\nMOV             X8, X1                                                 ; +0x20, 0x100115e6c\nSTR             X8, [SP,#0x40+var_40]                                  ; +0x24, 0x100115e70\nADRL            X0, aLayerI; \"layer_%i\"                                ; +0x28, 0x100115e74\nBL              sub_1003065B0                                          ; +0x30, 0x100115e7c\nBL              cocos2d__CCString__getCString                          ; +0x34, 0x100115e80\nMOV             X1, X0; __s                                            ; +0x38, 0x100115e84\nADD             X0, SP, #0x40+__p; int                                 ; +0x3c, 0x100115e88\nBL              sub_100009900                                          ; +0x40, 0x100115e8c\nADD             X1, SP, #0x40+__p                                      ; +0x44, 0x100115e90\nMOV             X0, X19                                                ; +0x48, 0x100115e94\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x4c, 0x100115e98\nMOV             X19, X0                                                ; +0x50, 0x100115e9c\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x54, 0x100115ea0\nTBNZ            W8, #0x1F, loc_100115EB0                               ; +0x58, 0x100115ea4\nCBNZ            X19, loc_100115F1C                                     ; +0x5c, 0x100115ea8\nB               loc_100115EBC                                          ; +0x60, 0x100115eac\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x64, 0x100115eb0\nBL              __ZdlPv; operator delete(void *)                       ; +0x68, 0x100115eb4\nCBNZ            X19, loc_100115F1C                                     ; +0x6c, 0x100115eb8\nBL              cocos2d__CCLayer__create                               ; +0x70, 0x100115ebc\nMOV             X19, X0                                                ; +0x74, 0x100115ec0\nLDR             X0, [X21,#0x248]                                       ; +0x78, 0x100115ec4\nLDR             X8, [X0]                                               ; +0x7c, 0x100115ec8\nLDR             X8, [X8,#0x1C8]                                        ; +0x80, 0x100115ecc\nMOV             X1, X19                                                ; +0x84, 0x100115ed0\nBLR             X8                                                     ; +0x88, 0x100115ed4\nLDR             X21, [X21,#0x2A0]                                      ; +0x8c, 0x100115ed8\nSTR             X20, [SP,#0x40+var_40]                                 ; +0x90, 0x100115edc\nADRL            X0, aLayerI; \"layer_%i\"                                ; +0x94, 0x100115ee0\nBL              sub_1003065B0                                          ; +0x9c, 0x100115ee8\nBL              cocos2d__CCString__getCString                          ; +0xa0, 0x100115eec\nMOV             X1, X0; __s                                            ; +0xa4, 0x100115ef0\nADD             X0, SP, #0x40+__p; int                                 ; +0xa8, 0x100115ef4\nBL              sub_100009900                                          ; +0xac, 0x100115ef8\nADD             X2, SP, #0x40+__p                                      ; +0xb0, 0x100115efc\nMOV             X0, X21                                                ; +0xb4, 0x100115f00\nMOV             X1, X19                                                ; +0xb8, 0x100115f04\nBL              cocos2d__CCDictionary__setObject                       ; +0xbc, 0x100115f08\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0xc0, 0x100115f0c\nTBZ             W8, #0x1F, loc_100115F1C                               ; +0xc4, 0x100115f10\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0xc8, 0x100115f14\nBL              __ZdlPv; operator delete(void *)                       ; +0xcc, 0x100115f18\nMOV             X0, X19                                                ; +0xd0, 0x100115f1c\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xd4, 0x100115f20\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xd8, 0x100115f24\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xdc, 0x100115f28\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xe0, 0x100115f2c\nRET                                                                    ; +0xe4, 0x100115f30", "xrefs": ["MoreVideoOptionsLayer::addToggle @ 0x1001157ac"], "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"}