{"type": "func", "start": 5371397616, "end": 5371398016, "name": "GJOptionsLayer::objectsForPage", "pseudocode": "// \n// GJOptionsLayer::objectsForPage from 0x1402905f0 to 0x140290780 (400 bytes)\n// \n// 4 xrefs:\n// > GJOptionsLayer::addToggleInternal @ 0x1402900ab\n// > EditorOptionsLayer::setupOptions @ 0x14029135e\n// > GameOptionsLayer::setupOptions @ 0x14029f801\n// > <???> @ 0x1406d1964\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\n// Hidden C++ exception states: #wind=1\ncocos2d::CCArray *GJOptionsLayer::objectsForPage(GJOptionsLayer *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; GJOptionsLayer::objectsForPage from 0x1402905f0 to 0x140290780 (400 bytes)\n; \n; 4 xrefs:\n; > GJOptionsLayer::addToggleInternal @ 0x1402900ab\n; > EditorOptionsLayer::setupOptions @ 0x14029135e\n; > GameOptionsLayer::setupOptions @ 0x14029f801\n; > <???> @ 0x1406d1964\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, 0x1402905f0\npush    rbp                                                            ; +0x5, 0x1402905f5\npush    rsi                                                            ; +0x6, 0x1402905f6\npush    rdi                                                            ; +0x7, 0x1402905f7\nsub     rsp, 50h                                                       ; +0x8, 0x1402905f8\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1402905fc\nxor     rax, rsp                                                       ; +0x13, 0x140290603\nmov     [rsp+68h+var_28], rax                                          ; +0x16, 0x140290606\nmov     ebp, edx                                                       ; +0x1b, 0x14029060b\nmov     rsi, rcx                                                       ; +0x1d, 0x14029060d\nlea     rcx, aObjectI; \"object_%i\"                                     ; +0x20, 0x140290610\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x27, 0x140290617\nmov     rcx, rax                                                       ; +0x2d, 0x14029061d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x30, 0x140290620\nxorps   xmm0, xmm0                                                     ; +0x36, 0x140290626\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x39, 0x140290629\nxorps   xmm1, xmm1                                                     ; +0x3e, 0x14029062e\nmovdqu  [rsp+68h+var_38], xmm1                                         ; +0x41, 0x140290631\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x47, 0x140290637\nmov     r8, rbx                                                        ; +0x4e, 0x14029063e\ninc     r8                                                             ; +0x51, 0x140290641\ncmp     byte ptr [rax+r8], 0                                           ; +0x54, 0x140290644\njnz     short loc_140290641                                            ; +0x59, 0x140290649\nmov     rdx, rax                                                       ; +0x5b, 0x14029064b\nlea     rcx, [rsp+68h+Block]                                           ; +0x5e, 0x14029064e\ncall    sub_14003A930                                                  ; +0x63, 0x140290653\nnop                                                                    ; +0x68, 0x140290658\nlea     rdx, [rsp+68h+Block]                                           ; +0x69, 0x140290659\nmov     rcx, [rsi+3C8h]                                                ; +0x6e, 0x14029065e\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, 0x140290665\nmov     rdi, rax                                                       ; +0x7b, 0x14029066b\nmov     rdx, qword ptr [rsp+68h+var_38+8]                              ; +0x7e, 0x14029066e\ncmp     rdx, 0Fh                                                       ; +0x83, 0x140290673\njbe     short loc_1402906AE                                            ; +0x87, 0x140290677\ninc     rdx                                                            ; +0x89, 0x140290679\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x8c, 0x14029067c\nmov     rax, rcx                                                       ; +0x91, 0x140290681\ncmp     rdx, 1000h                                                     ; +0x94, 0x140290684\njb      short loc_1402906A9                                            ; +0x9b, 0x14029068b\nadd     rdx, 27h ; '''                                                 ; +0x9d, 0x14029068d\nmov     rcx, [rcx-8]                                                   ; +0xa1, 0x140290691\nsub     rax, rcx                                                       ; +0xa5, 0x140290695\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa8, 0x140290698\ncmp     rax, 1Fh                                                       ; +0xac, 0x14029069c\njbe     short loc_1402906A9                                            ; +0xb0, 0x1402906a0\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb2, 0x1402906a2\ndb 0CCh                                                                ; +0xb8, 0x1402906a8\ncall    j_j_free                                                       ; +0xb9, 0x1402906a9\ntest    rdi, rdi                                                       ; +0xbe, 0x1402906ae\njnz     loc_140290760                                                  ; +0xc1, 0x1402906b1\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0xc7, 0x1402906b7\nmov     rdi, rax                                                       ; +0xcd, 0x1402906bd\nmov     edx, ebp                                                       ; +0xd0, 0x1402906c0\nlea     rcx, aObjectI; \"object_%i\"                                     ; +0xd2, 0x1402906c2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xd9, 0x1402906c9\nmov     rcx, rax                                                       ; +0xdf, 0x1402906cf\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xe2, 0x1402906d2\nxorps   xmm0, xmm0                                                     ; +0xe8, 0x1402906d8\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0xeb, 0x1402906db\nxorps   xmm1, xmm1                                                     ; +0xf0, 0x1402906e0\nmovdqu  [rsp+68h+var_38], xmm1                                         ; +0xf3, 0x1402906e3\nnop     dword ptr [rax+00000000h]                                      ; +0xf9, 0x1402906e9\ninc     rbx                                                            ; +0x100, 0x1402906f0\ncmp     byte ptr [rax+rbx], 0                                          ; +0x103, 0x1402906f3\njnz     short loc_1402906F0                                            ; +0x107, 0x1402906f7\nmov     r8, rbx                                                        ; +0x109, 0x1402906f9\nmov     rdx, rax                                                       ; +0x10c, 0x1402906fc\nlea     rcx, [rsp+68h+Block]                                           ; +0x10f, 0x1402906ff\ncall    sub_14003A930                                                  ; +0x114, 0x140290704\nnop                                                                    ; +0x119, 0x140290709\nlea     r8, [rsp+68h+Block]                                            ; +0x11a, 0x14029070a\nmov     rdx, rdi                                                       ; +0x11f, 0x14029070f\nmov     rcx, [rsi+3C8h]                                                ; +0x122, 0x140290712\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, 0x140290719\nnop                                                                    ; +0x12f, 0x14029071f\nmov     rdx, qword ptr [rsp+68h+var_38+8]                              ; +0x130, 0x140290720\ncmp     rdx, 0Fh                                                       ; +0x135, 0x140290725\njbe     short loc_140290760                                            ; +0x139, 0x140290729\ninc     rdx                                                            ; +0x13b, 0x14029072b\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x13e, 0x14029072e\nmov     rax, rcx                                                       ; +0x143, 0x140290733\ncmp     rdx, 1000h                                                     ; +0x146, 0x140290736\njb      short loc_14029075B                                            ; +0x14d, 0x14029073d\nadd     rdx, 27h ; '''                                                 ; +0x14f, 0x14029073f\nmov     rcx, [rcx-8]                                                   ; +0x153, 0x140290743\nsub     rax, rcx                                                       ; +0x157, 0x140290747\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x15a, 0x14029074a\ncmp     rax, 1Fh                                                       ; +0x15e, 0x14029074e\njbe     short loc_14029075B                                            ; +0x162, 0x140290752\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x164, 0x140290754\ndb 0CCh                                                                ; +0x16a, 0x14029075a\ncall    j_j_free                                                       ; +0x16b, 0x14029075b\nmov     rax, rdi                                                       ; +0x170, 0x140290760\nmov     rcx, [rsp+68h+var_28]                                          ; +0x173, 0x140290763\nxor     rcx, rsp; StackCookie                                          ; +0x178, 0x140290768\ncall    __security_check_cookie                                        ; +0x17b, 0x14029076b\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x180, 0x140290770\nadd     rsp, 50h                                                       ; +0x188, 0x140290778\npop     rdi                                                            ; +0x18c, 0x14029077c\npop     rsi                                                            ; +0x18d, 0x14029077d\npop     rbp                                                            ; +0x18e, 0x14029077e\nretn                                                                   ; +0x18f, 0x14029077f", "xrefs": ["GJOptionsLayer::addToggleInternal @ 0x1402900ab", "EditorOptionsLayer::setupOptions @ 0x14029135e", "GameOptionsLayer::setupOptions @ 0x14029f801", "<???> @ 0x1406d1964"], "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"}