{"type": "func", "start": 6442535184, "end": 6442535548, "name": "cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID from 0x180014910 to 0x180014a7c (364 bytes)\n// \n// 7 xrefs:\n// > cocos2d::extension::CCTableView::cellAtIndex @ 0x180015282\n// > cocos2d::extension::CCTableView::updateCellAtIndex @ 0x180015326\n// > cocos2d::extension::CCTableView::insertCellAtIndex @ 0x1800153dd\n// > cocos2d::extension::CCTableView::removeCellAtIndex @ 0x1800155ec\n// > cocos2d::extension::CCTableView::ccTouchBegan @ 0x1800165bf\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a6a4\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\nstruct cocos2d::extension::CCSortableObject *__fastcall cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(\n        cocos2d::extension::CCArrayForObjectSorting *this,\n        int a2)\n{\n  int v2; // r14d\n  __int64 v5; // r15\n  unsigned int v6; // esi\n  unsigned int v7; // ebp\n  unsigned int v8; // edi\n  unsigned int *v9; // rbx\n  __int64 v10; // rax\n  _QWORD *v11; // rbx\n  _QWORD *i; // r14\n  __int64 v13; // rax\n  unsigned int v14; // eax\n  struct cocos2d::CCObject *v15; // rax\n  __int64 v16; // rbx\n  _DWORD *v18; // [rsp+80h] [rbp+18h]\n\n  v2 = a2;\n  if ( !cocos2d::CCArray::count(this) )\n    return nullptr;\n  v18 = operator new(0x48u);\n  cocos2d::CCObject::CCObject((cocos2d::CCObject *)v18);\n  *(_QWORD *)v18 = &cocos2d::extension::CCSortedObject::`vftable';\n  *((_QWORD *)v18 + 7) = &cocos2d::extension::CCSortedObject::`vftable';\n  v5 = 0;\n  v18[16] = 0;\n  cocos2d::extension::CCTableViewCell::setObjectID((cocos2d::extension::CCTableViewCell *)(v18 + 14), v2);\n  v6 = 0;\n  v7 = 0;\n  v8 = (*(__int64 (__fastcall **)(_DWORD *))(*((_QWORD *)v18 + 7) + 16LL))(v18 + 14);\n  if ( this )\n  {\n    v9 = *((unsigned int **)this + 7);\n    v10 = *v9;\n    if ( (_DWORD)v10 )\n    {\n      v11 = *((_QWORD **)v9 + 2);\n      for ( i = &v11[v10 - 1]; v11 <= i; ++v11 )\n      {\n        if ( !*v11 )\n          break;\n        v13 = _RTDynamicCast(\n                *v11,\n                0,\n                &cocos2d::CCObject `RTTI Type Descriptor',\n                &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                0);\n        v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 16LL))(v13);\n        if ( v8 == v14 || v8 >= v7 && v8 < v14 )\n          break;\n        v7 = v14;\n        ++v6;\n      }\n      v2 = a2;\n    }\n  }\n  cocos2d::CCObject::release((cocos2d::CCObject *)v18);\n  if ( v6 < cocos2d::CCArray::count(this) && v6 != -1 )\n  {\n    v15 = cocos2d::CCArray::objectAtIndex(this, v6);\n    v16 = _RTDynamicCast(\n            v15,\n            0,\n            &cocos2d::CCObject `RTTI Type Descriptor',\n            &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n            0);\n    if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v16 + 16LL))(v16) != v2 )\n      return nullptr;\n    return (struct cocos2d::extension::CCSortableObject *)v16;\n  }\n  return (struct cocos2d::extension::CCSortableObject *)v5;\n}", "assembly": "; \n; cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID from 0x180014910 to 0x180014a7c (364 bytes)\n; \n; 7 xrefs:\n; > cocos2d::extension::CCTableView::cellAtIndex @ 0x180015282\n; > cocos2d::extension::CCTableView::updateCellAtIndex @ 0x180015326\n; > cocos2d::extension::CCTableView::insertCellAtIndex @ 0x1800153dd\n; > cocos2d::extension::CCTableView::removeCellAtIndex @ 0x1800155ec\n; > cocos2d::extension::CCTableView::ccTouchBegan @ 0x1800165bf\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a6a4\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_0], rbx                                               ; +0x0, 0x180014910\nmov     [rsp+arg_8], edx                                               ; +0x5, 0x180014915\npush    rbp                                                            ; +0x9, 0x180014919\npush    rsi                                                            ; +0xa, 0x18001491a\npush    rdi                                                            ; +0xb, 0x18001491b\npush    r12                                                            ; +0xc, 0x18001491c\npush    r13                                                            ; +0xe, 0x18001491e\npush    r14                                                            ; +0x10, 0x180014920\npush    r15                                                            ; +0x12, 0x180014922\nsub     rsp, 30h                                                       ; +0x14, 0x180014924\nmov     r14d, edx                                                      ; +0x18, 0x180014928\nmov     r13, rcx                                                       ; +0x1b, 0x18001492b\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1e, 0x18001492e\ntest    eax, eax                                                       ; +0x24, 0x180014934\njnz     short loc_18001493F                                            ; +0x26, 0x180014936\nxor     eax, eax                                                       ; +0x28, 0x180014938\njmp     loc_180014A67                                                  ; +0x2a, 0x18001493a\nmov     ecx, 48h ; 'H'; Size                                           ; +0x2f, 0x18001493f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x34, 0x180014944\nmov     rbx, rax                                                       ; +0x39, 0x180014949\nmov     [rsp+68h+arg_10], rax                                          ; +0x3c, 0x18001494c\nmov     rcx, rax                                                       ; +0x44, 0x180014954\ncall    cs:??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x47, 0x180014957\nlea     r12, [rbx+38h]                                                 ; +0x4d, 0x18001495d\nlea     rax, ??_7CCSortedObject@extension@cocos2d@@6B@; const cocos2d::extension::CCSortedObject::`vftable' ; +0x51, 0x180014961\nmov     [rbx], rax                                                     ; +0x58, 0x180014968\nlea     rax, ??_7CCSortedObject@extension@cocos2d@@6B@_0; const cocos2d::extension::CCSortedObject::`vftable' ; +0x5b, 0x18001496b\nmov     [r12], rax                                                     ; +0x62, 0x180014972\nxor     r15d, r15d                                                     ; +0x66, 0x180014976\nmov     [rbx+40h], r15d                                                ; +0x69, 0x180014979\nmov     edx, r14d; unsigned int                                        ; +0x6d, 0x18001497d\nmov     rcx, r12; this                                                 ; +0x70, 0x180014980\nmov     rax, cs:off_180028740                                          ; +0x73, 0x180014983\ncall    rax ; cocos2d::extension::CCTableViewCell::setObjectID(uint); cocos2d::extension::CCTableViewCell::setObjectID(uint) ; +0x7a, 0x18001498a\nmov     esi, r15d                                                      ; +0x7c, 0x18001498c\nmov     ebp, r15d                                                      ; +0x7f, 0x18001498f\nmov     rax, [r12]                                                     ; +0x82, 0x180014992\nmov     rcx, r12                                                       ; +0x86, 0x180014996\ncall    qword ptr [rax+10h]                                            ; +0x89, 0x180014999\nmov     edi, eax                                                       ; +0x8c, 0x18001499c\ntest    r13, r13                                                       ; +0x8e, 0x18001499e\njz      short loc_180014A09                                            ; +0x91, 0x1800149a1\nmov     rbx, [r13+38h]                                                 ; +0x93, 0x1800149a3\nmov     eax, [rbx]                                                     ; +0x97, 0x1800149a7\ntest    eax, eax                                                       ; +0x99, 0x1800149a9\njz      short loc_180014A09                                            ; +0x9b, 0x1800149ab\nmov     rbx, [rbx+10h]                                                 ; +0x9d, 0x1800149ad\nlea     r14, [rax-1]                                                   ; +0xa1, 0x1800149b1\nlea     r14, [rbx+r14*8]                                               ; +0xa5, 0x1800149b5\ncmp     rbx, r14                                                       ; +0xa9, 0x1800149b9\nja      short loc_180014A04                                            ; +0xac, 0x1800149bc\nxchg    ax, ax                                                         ; +0xae, 0x1800149be\nmov     rcx, [rbx]                                                     ; +0xb0, 0x1800149c0\ntest    rcx, rcx                                                       ; +0xb3, 0x1800149c3\njz      short loc_180014A04                                            ; +0xb6, 0x1800149c6\nmov     [rsp+68h+var_48], r15d                                         ; +0xb8, 0x1800149c8\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0xbd, 0x1800149cd\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xc4, 0x1800149d4\nxor     edx, edx                                                       ; +0xcb, 0x1800149db\ncall    __RTDynamicCast                                                ; +0xcd, 0x1800149dd\nmov     rdx, [rax]                                                     ; +0xd2, 0x1800149e2\nmov     rcx, rax                                                       ; +0xd5, 0x1800149e5\ncall    qword ptr [rdx+10h]                                            ; +0xd8, 0x1800149e8\ncmp     edi, eax                                                       ; +0xdb, 0x1800149eb\njz      short loc_180014A04                                            ; +0xdd, 0x1800149ed\ncmp     edi, ebp                                                       ; +0xdf, 0x1800149ef\njb      short loc_1800149F7                                            ; +0xe1, 0x1800149f1\ncmp     edi, eax                                                       ; +0xe3, 0x1800149f3\njb      short loc_180014A04                                            ; +0xe5, 0x1800149f5\nmov     ebp, eax                                                       ; +0xe7, 0x1800149f7\ninc     esi                                                            ; +0xe9, 0x1800149f9\nadd     rbx, 8                                                         ; +0xeb, 0x1800149fb\ncmp     rbx, r14                                                       ; +0xef, 0x1800149ff\njbe     short loc_1800149C0                                            ; +0xf2, 0x180014a02\nmov     r14d, [rsp+68h+arg_8]                                          ; +0xf4, 0x180014a04\nlea     rcx, [r12-38h]                                                 ; +0xf9, 0x180014a09\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xfe, 0x180014a0e\nmov     rcx, r13                                                       ; +0x104, 0x180014a14\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x107, 0x180014a17\ncmp     esi, eax                                                       ; +0x10d, 0x180014a1d\njnb     short loc_180014A64                                            ; +0x10f, 0x180014a1f\ncmp     esi, 0FFFFFFFFh                                                ; +0x111, 0x180014a21\njz      short loc_180014A64                                            ; +0x114, 0x180014a24\nmov     edx, esi                                                       ; +0x116, 0x180014a26\nmov     rcx, r13                                                       ; +0x118, 0x180014a28\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x11b, 0x180014a2b\nmov     rcx, rax                                                       ; +0x121, 0x180014a31\nmov     [rsp+68h+var_48], r15d                                         ; +0x124, 0x180014a34\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x129, 0x180014a39\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x130, 0x180014a40\nxor     edx, edx                                                       ; +0x137, 0x180014a47\ncall    __RTDynamicCast                                                ; +0x139, 0x180014a49\nmov     rbx, rax                                                       ; +0x13e, 0x180014a4e\nmov     rdx, [rax]                                                     ; +0x141, 0x180014a51\nmov     rcx, rax                                                       ; +0x144, 0x180014a54\ncall    qword ptr [rdx+10h]                                            ; +0x147, 0x180014a57\ncmp     eax, r14d                                                      ; +0x14a, 0x180014a5a\ncmovnz  rbx, r15                                                       ; +0x14d, 0x180014a5d\nmov     r15, rbx                                                       ; +0x151, 0x180014a61\nmov     rax, r15                                                       ; +0x154, 0x180014a64\nmov     rbx, [rsp+68h+arg_0]                                           ; +0x157, 0x180014a67\nadd     rsp, 30h                                                       ; +0x15c, 0x180014a6c\npop     r15                                                            ; +0x160, 0x180014a70\npop     r14                                                            ; +0x162, 0x180014a72\npop     r13                                                            ; +0x164, 0x180014a74\npop     r12                                                            ; +0x166, 0x180014a76\npop     rdi                                                            ; +0x168, 0x180014a78\npop     rsi                                                            ; +0x169, 0x180014a79\npop     rbp                                                            ; +0x16a, 0x180014a7a\nretn                                                                   ; +0x16b, 0x180014a7b", "xrefs": ["cocos2d::extension::CCTableView::cellAtIndex @ 0x180015282", "cocos2d::extension::CCTableView::updateCellAtIndex @ 0x180015326", "cocos2d::extension::CCTableView::insertCellAtIndex @ 0x1800153dd", "cocos2d::extension::CCTableView::removeCellAtIndex @ 0x1800155ec", "cocos2d::extension::CCTableView::ccTouchBegan @ 0x1800165bf", "<???> @ 0x18002fdf8", "<???> @ 0x18004a6a4"], "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"}