{"type": "func", "start": 5372362320, "end": 5372362720, "name": "ParentalOptionsLayer::objectsForPage", "pseudocode": "// \n// ParentalOptionsLayer::objectsForPage from 0x14037be50 to 0x14037bfe0 (400 bytes)\n// \n// 2 xrefs:\n// > ParentalOptionsLayer::addToggle @ 0x14037bde4\n// > <???> @ 0x1406d5d08\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\ncocos2d::CCArray *ParentalOptionsLayer::objectsForPage(ParentalOptionsLayer *a1, int a2)\n{\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // rbx\n  size_t v7; // r8\n  __int64 v8; // rcx\n  cocos2d::CCArray *v9; // rdi\n  void *v10; // rcx\n  cocos2d::CCString *v11; // rax\n  const char *v12; // rax\n  void *v13; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-48h] BYREF\n  __int128 v16; // [rsp+30h] [rbp-38h]\n\n  v4 = cocos2d::CCString::createWithFormat(\"object_%i\", a2);\n  CString = cocos2d::CCString::getCString(v4);\n  *(_OWORD *)Block = 0;\n  v16 = 0;\n  v6 = -1;\n  v7 = -1;\n  do\n    ++v7;\n  while ( CString[v7] );\n  sub_14003A930(Block, CString, v7);\n  v9 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_values, Block);\n  if ( *((_QWORD *)&v16 + 1) > 0xFu )\n  {\n    v10 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v16 + 1) + 1LL) >= 0x1000 )\n    {\n      v10 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v10);\n  }\n  if ( !v9 )\n  {\n    v9 = (cocos2d::CCArray *)cocos2d::CCArray::create(v8);\n    v11 = cocos2d::CCString::createWithFormat(\"object_%i\", a2);\n    v12 = cocos2d::CCString::getCString(v11);\n    *(_OWORD *)Block = 0;\n    v16 = 0;\n    do\n      ++v6;\n    while ( v12[v6] );\n    sub_14003A930(Block, v12, v6);\n    cocos2d::CCDictionary::setObject(a1->m_values, v9, Block);\n    if ( *((_QWORD *)&v16 + 1) > 0xFu )\n    {\n      v13 = Block[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v16 + 1) + 1LL) >= 0x1000 )\n      {\n        v13 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v13 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v13);\n    }\n  }\n  return v9;\n}", "assembly": "; \n; ParentalOptionsLayer::objectsForPage from 0x14037be50 to 0x14037bfe0 (400 bytes)\n; \n; 2 xrefs:\n; > ParentalOptionsLayer::addToggle @ 0x14037bde4\n; > <???> @ 0x1406d5d08\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14037be50\npush    rbp                                                            ; +0x5, 0x14037be55\npush    rsi                                                            ; +0x6, 0x14037be56\npush    rdi                                                            ; +0x7, 0x14037be57\nsub     rsp, 50h                                                       ; +0x8, 0x14037be58\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x14037be5c\nxor     rax, rsp                                                       ; +0x13, 0x14037be63\nmov     [rsp+68h+var_28], rax                                          ; +0x16, 0x14037be66\nmov     ebp, edx                                                       ; +0x1b, 0x14037be6b\nmov     rsi, rcx                                                       ; +0x1d, 0x14037be6d\nlea     rcx, aObjectI; \"object_%i\"                                     ; +0x20, 0x14037be70\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x27, 0x14037be77\nmov     rcx, rax                                                       ; +0x2d, 0x14037be7d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x30, 0x14037be80\nxorps   xmm0, xmm0                                                     ; +0x36, 0x14037be86\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x39, 0x14037be89\nxorps   xmm1, xmm1                                                     ; +0x3e, 0x14037be8e\nmovdqu  [rsp+68h+var_38], xmm1                                         ; +0x41, 0x14037be91\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x47, 0x14037be97\nmov     r8, rbx                                                        ; +0x4e, 0x14037be9e\ninc     r8                                                             ; +0x51, 0x14037bea1\ncmp     byte ptr [rax+r8], 0                                           ; +0x54, 0x14037bea4\njnz     short loc_14037BEA1                                            ; +0x59, 0x14037bea9\nmov     rdx, rax                                                       ; +0x5b, 0x14037beab\nlea     rcx, [rsp+68h+Block]                                           ; +0x5e, 0x14037beae\ncall    sub_14003A930                                                  ; +0x63, 0x14037beb3\nnop                                                                    ; +0x68, 0x14037beb8\nlea     rdx, [rsp+68h+Block]                                           ; +0x69, 0x14037beb9\nmov     rcx, [rsi+288h]                                                ; +0x6e, 0x14037bebe\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x75, 0x14037bec5\nmov     rdi, rax                                                       ; +0x7b, 0x14037becb\nmov     rdx, qword ptr [rsp+68h+var_38+8]                              ; +0x7e, 0x14037bece\ncmp     rdx, 0Fh                                                       ; +0x83, 0x14037bed3\njbe     short loc_14037BF0E                                            ; +0x87, 0x14037bed7\ninc     rdx                                                            ; +0x89, 0x14037bed9\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x8c, 0x14037bedc\nmov     rax, rcx                                                       ; +0x91, 0x14037bee1\ncmp     rdx, 1000h                                                     ; +0x94, 0x14037bee4\njb      short loc_14037BF09                                            ; +0x9b, 0x14037beeb\nadd     rdx, 27h ; '''                                                 ; +0x9d, 0x14037beed\nmov     rcx, [rcx-8]                                                   ; +0xa1, 0x14037bef1\nsub     rax, rcx                                                       ; +0xa5, 0x14037bef5\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa8, 0x14037bef8\ncmp     rax, 1Fh                                                       ; +0xac, 0x14037befc\njbe     short loc_14037BF09                                            ; +0xb0, 0x14037bf00\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb2, 0x14037bf02\ndb 0CCh                                                                ; +0xb8, 0x14037bf08\ncall    j_j_free                                                       ; +0xb9, 0x14037bf09\ntest    rdi, rdi                                                       ; +0xbe, 0x14037bf0e\njnz     loc_14037BFC0                                                  ; +0xc1, 0x14037bf11\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0xc7, 0x14037bf17\nmov     rdi, rax                                                       ; +0xcd, 0x14037bf1d\nmov     edx, ebp                                                       ; +0xd0, 0x14037bf20\nlea     rcx, aObjectI; \"object_%i\"                                     ; +0xd2, 0x14037bf22\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xd9, 0x14037bf29\nmov     rcx, rax                                                       ; +0xdf, 0x14037bf2f\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xe2, 0x14037bf32\nxorps   xmm0, xmm0                                                     ; +0xe8, 0x14037bf38\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0xeb, 0x14037bf3b\nxorps   xmm1, xmm1                                                     ; +0xf0, 0x14037bf40\nmovdqu  [rsp+68h+var_38], xmm1                                         ; +0xf3, 0x14037bf43\nnop     dword ptr [rax+00000000h]                                      ; +0xf9, 0x14037bf49\ninc     rbx                                                            ; +0x100, 0x14037bf50\ncmp     byte ptr [rax+rbx], 0                                          ; +0x103, 0x14037bf53\njnz     short loc_14037BF50                                            ; +0x107, 0x14037bf57\nmov     r8, rbx                                                        ; +0x109, 0x14037bf59\nmov     rdx, rax                                                       ; +0x10c, 0x14037bf5c\nlea     rcx, [rsp+68h+Block]                                           ; +0x10f, 0x14037bf5f\ncall    sub_14003A930                                                  ; +0x114, 0x14037bf64\nnop                                                                    ; +0x119, 0x14037bf69\nlea     r8, [rsp+68h+Block]                                            ; +0x11a, 0x14037bf6a\nmov     rdx, rdi                                                       ; +0x11f, 0x14037bf6f\nmov     rcx, [rsi+288h]                                                ; +0x122, 0x14037bf72\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x129, 0x14037bf79\nnop                                                                    ; +0x12f, 0x14037bf7f\nmov     rdx, qword ptr [rsp+68h+var_38+8]                              ; +0x130, 0x14037bf80\ncmp     rdx, 0Fh                                                       ; +0x135, 0x14037bf85\njbe     short loc_14037BFC0                                            ; +0x139, 0x14037bf89\ninc     rdx                                                            ; +0x13b, 0x14037bf8b\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x13e, 0x14037bf8e\nmov     rax, rcx                                                       ; +0x143, 0x14037bf93\ncmp     rdx, 1000h                                                     ; +0x146, 0x14037bf96\njb      short loc_14037BFBB                                            ; +0x14d, 0x14037bf9d\nadd     rdx, 27h ; '''                                                 ; +0x14f, 0x14037bf9f\nmov     rcx, [rcx-8]                                                   ; +0x153, 0x14037bfa3\nsub     rax, rcx                                                       ; +0x157, 0x14037bfa7\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x15a, 0x14037bfaa\ncmp     rax, 1Fh                                                       ; +0x15e, 0x14037bfae\njbe     short loc_14037BFBB                                            ; +0x162, 0x14037bfb2\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x164, 0x14037bfb4\ndb 0CCh                                                                ; +0x16a, 0x14037bfba\ncall    j_j_free                                                       ; +0x16b, 0x14037bfbb\nmov     rax, rdi                                                       ; +0x170, 0x14037bfc0\nmov     rcx, [rsp+68h+var_28]                                          ; +0x173, 0x14037bfc3\nxor     rcx, rsp; StackCookie                                          ; +0x178, 0x14037bfc8\ncall    __security_check_cookie                                        ; +0x17b, 0x14037bfcb\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x180, 0x14037bfd0\nadd     rsp, 50h                                                       ; +0x188, 0x14037bfd8\npop     rdi                                                            ; +0x18c, 0x14037bfdc\npop     rsi                                                            ; +0x18d, 0x14037bfdd\npop     rbp                                                            ; +0x18e, 0x14037bfde\nretn                                                                   ; +0x18f, 0x14037bfdf", "xrefs": ["ParentalOptionsLayer::addToggle @ 0x14037bde4", "<???> @ 0x1406d5d08"], "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"}