{"type": "func", "start": 5373754112, "end": 5373754342, "name": "MoreVideoOptionsLayer::countForPage", "pseudocode": "// \n// MoreVideoOptionsLayer::countForPage from 0x1404cfb00 to 0x1404cfbe6 (230 bytes)\n// \n// 6 xrefs:\n// > MoreVideoOptionsLayer::addToggle @ 0x1404cf645\n// > MoreVideoOptionsLayer::addToggle @ 0x1404cf7c0\n// > ParentalOptionsLayer::addMasterToggle @ 0x1404d1cd9\n// > ParentalOptionsLayer::addToggle @ 0x1404d24f5\n// > ParentalOptionsLayer::incrementCountForPage @ 0x1404d2933\n// > <???> @ 0x1409296fc\n// \n// This function is hookable on this platform (idp: pc, 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:33:00 +0000\n// \n\n// Merged with: MoreVideoOptionsLayer::countForPage, ParentalOptionsLayer::countForPage\n__int64 __fastcall MoreVideoOptionsLayer::countForPage(__int64 a1, int a2)\n{\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  cocos2d::CCString *v6; // rax\n  unsigned int v7; // ebx\n  void *v8; // r8\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v11; // [rsp+40h] [rbp-28h]\n\n  v3 = cocos2d::CCString::createWithFormat(\"page_%i\", a2);\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v11 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( CString[v5] );\n  sub_14003D230(Block, CString, v5);\n  v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(a1 + 680), Block);\n  v7 = cocos2d::CCString::intValue(v6);\n  if ( *((_QWORD *)&v11 + 1) > 0xFu )\n  {\n    v8 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v11 + 1) + 1LL) >= 0x1000 )\n    {\n      v8 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v8);\n  }\n  return v7;\n}", "assembly": "; \n; MoreVideoOptionsLayer::countForPage from 0x1404cfb00 to 0x1404cfbe6 (230 bytes)\n; \n; 6 xrefs:\n; > MoreVideoOptionsLayer::addToggle @ 0x1404cf645\n; > MoreVideoOptionsLayer::addToggle @ 0x1404cf7c0\n; > ParentalOptionsLayer::addMasterToggle @ 0x1404d1cd9\n; > ParentalOptionsLayer::addToggle @ 0x1404d24f5\n; > ParentalOptionsLayer::incrementCountForPage @ 0x1404d2933\n; > <???> @ 0x1409296fc\n; \n; This function is hookable on this platform (idp: pc, 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:33:00 +0000\n; \npush    rbx                                                            ; +0x0, 0x1404cfb00\nsub     rsp, 60h                                                       ; +0x2, 0x1404cfb02\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1404cfb06\nxor     rax, rsp                                                       ; +0xd, 0x1404cfb0d\nmov     [rsp+68h+var_18], rax                                          ; +0x10, 0x1404cfb10\nmov     rbx, rcx                                                       ; +0x15, 0x1404cfb15\nlea     rcx, aPageI; \"page_%i\"                                         ; +0x18, 0x1404cfb18\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1f, 0x1404cfb1f\nmov     rcx, rax                                                       ; +0x25, 0x1404cfb25\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x28, 0x1404cfb28\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x1404cfb2e\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x31, 0x1404cfb31\nxorps   xmm1, xmm1                                                     ; +0x36, 0x1404cfb36\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x39, 0x1404cfb39\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3f, 0x1404cfb3f\ninc     r8                                                             ; +0x46, 0x1404cfb46\ncmp     byte ptr [rax+r8], 0                                           ; +0x49, 0x1404cfb49\njnz     short loc_1404CFB46                                            ; +0x4e, 0x1404cfb4e\nmov     rdx, rax                                                       ; +0x50, 0x1404cfb50\nlea     rcx, [rsp+68h+Block]                                           ; +0x53, 0x1404cfb53\ncall    sub_14003D230                                                  ; +0x58, 0x1404cfb58\nnop                                                                    ; +0x5d, 0x1404cfb5d\nlea     rdx, [rsp+68h+Block]                                           ; +0x5e, 0x1404cfb5e\nmov     rcx, [rbx+2A8h]                                                ; +0x63, 0x1404cfb63\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0x6a, 0x1404cfb6a\nmov     rcx, rax                                                       ; +0x70, 0x1404cfb70\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x73, 0x1404cfb73\nmov     ebx, eax                                                       ; +0x79, 0x1404cfb79\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0x7b, 0x1404cfb7b\ncmp     rdx, 0Fh                                                       ; +0x80, 0x1404cfb80\njbe     short loc_1404CFBD1                                            ; +0x84, 0x1404cfb84\ninc     rdx                                                            ; +0x86, 0x1404cfb86\nmov     r8, [rsp+68h+Block]                                            ; +0x89, 0x1404cfb89\nmov     rcx, r8                                                        ; +0x8e, 0x1404cfb8e\ncmp     rdx, 1000h                                                     ; +0x91, 0x1404cfb91\njb      short loc_1404CFBC9                                            ; +0x98, 0x1404cfb98\nadd     rdx, 27h ; '''                                                 ; +0x9a, 0x1404cfb9a\nmov     r8, [r8-8]                                                     ; +0x9e, 0x1404cfb9e\nsub     rcx, r8                                                        ; +0xa2, 0x1404cfba2\nsub     rcx, 8                                                         ; +0xa5, 0x1404cfba5\ncmp     rcx, 1Fh                                                       ; +0xa9, 0x1404cfba9\njbe     short loc_1404CFBC9                                            ; +0xad, 0x1404cfbad\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xaf, 0x1404cfbaf\nxor     r9d, r9d; LineNo                                               ; +0xb8, 0x1404cfbb8\nxor     r8d, r8d; FileName                                             ; +0xbb, 0x1404cfbbb\nxor     edx, edx; FunctionName                                         ; +0xbe, 0x1404cfbbe\nxor     ecx, ecx; Expression                                           ; +0xc0, 0x1404cfbc0\ncall    cs:_invoke_watson                                              ; +0xc2, 0x1404cfbc2\ndb 0CCh                                                                ; +0xc8, 0x1404cfbc8\nmov     rcx, r8; Block                                                 ; +0xc9, 0x1404cfbc9\ncall    j_j_free                                                       ; +0xcc, 0x1404cfbcc\nmov     eax, ebx                                                       ; +0xd1, 0x1404cfbd1\nmov     rcx, [rsp+68h+var_18]                                          ; +0xd3, 0x1404cfbd3\nxor     rcx, rsp; StackCookie                                          ; +0xd8, 0x1404cfbd8\ncall    __security_check_cookie                                        ; +0xdb, 0x1404cfbdb\nadd     rsp, 60h                                                       ; +0xe0, 0x1404cfbe0\npop     rbx                                                            ; +0xe4, 0x1404cfbe4\nretn                                                                   ; +0xe5, 0x1404cfbe5", "xrefs": ["MoreVideoOptionsLayer::addToggle @ 0x1404cf645", "MoreVideoOptionsLayer::addToggle @ 0x1404cf7c0", "ParentalOptionsLayer::addMasterToggle @ 0x1404d1cd9", "ParentalOptionsLayer::addToggle @ 0x1404d24f5", "ParentalOptionsLayer::incrementCountForPage @ 0x1404d2933", "<???> @ 0x1409296fc"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}