{"type": "func", "start": 6442534096, "end": 6442534466, "name": "cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID from 0x1800144d0 to 0x180014642 (370 bytes)\n// \n// 8 xrefs:\n// > cocos2d::extension::CCTableView::cellAtIndex @ 0x180014e02\n// > cocos2d::extension::CCTableView::updateCellAtIndex @ 0x180014ea6\n// > cocos2d::extension::CCTableView::insertCellAtIndex @ 0x180014f5d\n// > cocos2d::extension::CCTableView::removeCellAtIndex @ 0x18001516c\n// > cocos2d::extension::CCTableView::ccTouchBegan @ 0x180016234\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c5b4\n// > <???> @ 0x18004c5c0\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 12:15:41 +0000\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; // edi\n  unsigned int v7; // ebp\n  unsigned int v8; // esi\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 = (_DWORD *)sub_18001F040(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 0x1800144d0 to 0x180014642 (370 bytes)\n; \n; 8 xrefs:\n; > cocos2d::extension::CCTableView::cellAtIndex @ 0x180014e02\n; > cocos2d::extension::CCTableView::updateCellAtIndex @ 0x180014ea6\n; > cocos2d::extension::CCTableView::insertCellAtIndex @ 0x180014f5d\n; > cocos2d::extension::CCTableView::removeCellAtIndex @ 0x18001516c\n; > cocos2d::extension::CCTableView::ccTouchBegan @ 0x180016234\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c5b4\n; > <???> @ 0x18004c5c0\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 12:15:41 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800144d0\nmov     [rsp+arg_8], edx                                               ; +0x5, 0x1800144d5\npush    rbp                                                            ; +0x9, 0x1800144d9\npush    rsi                                                            ; +0xa, 0x1800144da\npush    rdi                                                            ; +0xb, 0x1800144db\npush    r12                                                            ; +0xc, 0x1800144dc\npush    r13                                                            ; +0xe, 0x1800144de\npush    r14                                                            ; +0x10, 0x1800144e0\npush    r15                                                            ; +0x12, 0x1800144e2\nsub     rsp, 30h                                                       ; +0x14, 0x1800144e4\nmov     r14d, edx                                                      ; +0x18, 0x1800144e8\nmov     r13, rcx                                                       ; +0x1b, 0x1800144eb\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1e, 0x1800144ee\ntest    eax, eax                                                       ; +0x24, 0x1800144f4\njnz     short loc_1800144FF                                            ; +0x26, 0x1800144f6\nxor     eax, eax                                                       ; +0x28, 0x1800144f8\njmp     loc_18001462D                                                  ; +0x2a, 0x1800144fa\nmov     ecx, 48h ; 'H'; Size                                           ; +0x2f, 0x1800144ff\ncall    sub_18001F040                                                  ; +0x34, 0x180014504\nmov     rbx, rax                                                       ; +0x39, 0x180014509\nmov     [rsp+68h+arg_10], rax                                          ; +0x3c, 0x18001450c\nmov     rcx, rax                                                       ; +0x44, 0x180014514\ncall    cs:??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x47, 0x180014517\nlea     r12, [rbx+38h]                                                 ; +0x4d, 0x18001451d\nlea     rax, ??_7CCSortedObject@extension@cocos2d@@6B@; const cocos2d::extension::CCSortedObject::`vftable' ; +0x51, 0x180014521\nmov     [rbx], rax                                                     ; +0x58, 0x180014528\nlea     rax, ??_7CCSortedObject@extension@cocos2d@@6B@_0; const cocos2d::extension::CCSortedObject::`vftable' ; +0x5b, 0x18001452b\nmov     [r12], rax                                                     ; +0x62, 0x180014532\nxor     r15d, r15d                                                     ; +0x66, 0x180014536\nmov     [rbx+40h], r15d                                                ; +0x69, 0x180014539\nmov     rax, cs:off_18002ADD8                                          ; +0x6d, 0x18001453d\nmov     edx, r14d; unsigned int                                        ; +0x74, 0x180014544\nmov     rcx, r12; this                                                 ; +0x77, 0x180014547\ncall    rax ; cocos2d::extension::CCTableViewCell::setObjectID(uint); cocos2d::extension::CCTableViewCell::setObjectID(uint) ; +0x7a, 0x18001454a\nmov     edi, r15d                                                      ; +0x7c, 0x18001454c\nmov     ebp, r15d                                                      ; +0x7f, 0x18001454f\nmov     rax, [r12]                                                     ; +0x82, 0x180014552\nmov     rcx, r12                                                       ; +0x86, 0x180014556\ncall    qword ptr [rax+10h]                                            ; +0x89, 0x180014559\nmov     esi, eax                                                       ; +0x8c, 0x18001455c\ntest    r13, r13                                                       ; +0x8e, 0x18001455e\njz      short loc_1800145CC                                            ; +0x91, 0x180014561\nmov     rbx, [r13+38h]                                                 ; +0x93, 0x180014563\nmov     eax, [rbx]                                                     ; +0x97, 0x180014567\ntest    eax, eax                                                       ; +0x99, 0x180014569\njz      short loc_1800145CC                                            ; +0x9b, 0x18001456b\nmov     rbx, [rbx+10h]                                                 ; +0x9d, 0x18001456d\nlea     r14, [rax-1]                                                   ; +0xa1, 0x180014571\nlea     r14, [rbx+r14*8]                                               ; +0xa5, 0x180014575\ncmp     rbx, r14                                                       ; +0xa9, 0x180014579\nja      short loc_1800145C7                                            ; +0xac, 0x18001457c\nxchg    ax, ax                                                         ; +0xae, 0x18001457e\nmov     rcx, [rbx]                                                     ; +0xb0, 0x180014580\ntest    rcx, rcx                                                       ; +0xb3, 0x180014583\njz      short loc_1800145C7                                            ; +0xb6, 0x180014586\nmov     [rsp+68h+var_48], r15d                                         ; +0xb8, 0x180014588\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0xbd, 0x18001458d\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xc4, 0x180014594\nxor     edx, edx                                                       ; +0xcb, 0x18001459b\ncall    __RTDynamicCast                                                ; +0xcd, 0x18001459d\nmov     rcx, [rax]                                                     ; +0xd2, 0x1800145a2\nmov     rdx, [rcx+10h]                                                 ; +0xd5, 0x1800145a5\nmov     rcx, rax                                                       ; +0xd9, 0x1800145a9\ncall    rdx                                                            ; +0xdc, 0x1800145ac\ncmp     esi, eax                                                       ; +0xde, 0x1800145ae\njz      short loc_1800145C7                                            ; +0xe0, 0x1800145b0\ncmp     esi, ebp                                                       ; +0xe2, 0x1800145b2\njb      short loc_1800145BA                                            ; +0xe4, 0x1800145b4\ncmp     esi, eax                                                       ; +0xe6, 0x1800145b6\njb      short loc_1800145C7                                            ; +0xe8, 0x1800145b8\nmov     ebp, eax                                                       ; +0xea, 0x1800145ba\ninc     edi                                                            ; +0xec, 0x1800145bc\nadd     rbx, 8                                                         ; +0xee, 0x1800145be\ncmp     rbx, r14                                                       ; +0xf2, 0x1800145c2\njbe     short loc_180014580                                            ; +0xf5, 0x1800145c5\nmov     r14d, [rsp+68h+arg_8]                                          ; +0xf7, 0x1800145c7\nlea     rcx, [r12-38h]                                                 ; +0xfc, 0x1800145cc\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x101, 0x1800145d1\nmov     rcx, r13                                                       ; +0x107, 0x1800145d7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x10a, 0x1800145da\ncmp     edi, eax                                                       ; +0x110, 0x1800145e0\njnb     short loc_18001462A                                            ; +0x112, 0x1800145e2\ncmp     edi, 0FFFFFFFFh                                                ; +0x114, 0x1800145e4\njz      short loc_18001462A                                            ; +0x117, 0x1800145e7\nmov     edx, edi                                                       ; +0x119, 0x1800145e9\nmov     rcx, r13                                                       ; +0x11b, 0x1800145eb\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x11e, 0x1800145ee\nmov     rcx, rax                                                       ; +0x124, 0x1800145f4\nmov     [rsp+68h+var_48], r15d                                         ; +0x127, 0x1800145f7\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x12c, 0x1800145fc\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x133, 0x180014603\nxor     edx, edx                                                       ; +0x13a, 0x18001460a\ncall    __RTDynamicCast                                                ; +0x13c, 0x18001460c\nmov     rbx, rax                                                       ; +0x141, 0x180014611\nmov     rcx, [rax]                                                     ; +0x144, 0x180014614\nmov     rdx, [rcx+10h]                                                 ; +0x147, 0x180014617\nmov     rcx, rax                                                       ; +0x14b, 0x18001461b\ncall    rdx                                                            ; +0x14e, 0x18001461e\ncmp     eax, r14d                                                      ; +0x150, 0x180014620\ncmovnz  rbx, r15                                                       ; +0x153, 0x180014623\nmov     r15, rbx                                                       ; +0x157, 0x180014627\nmov     rax, r15                                                       ; +0x15a, 0x18001462a\nmov     rbx, [rsp+68h+arg_0]                                           ; +0x15d, 0x18001462d\nadd     rsp, 30h                                                       ; +0x162, 0x180014632\npop     r15                                                            ; +0x166, 0x180014636\npop     r14                                                            ; +0x168, 0x180014638\npop     r13                                                            ; +0x16a, 0x18001463a\npop     r12                                                            ; +0x16c, 0x18001463c\npop     rdi                                                            ; +0x16e, 0x18001463e\npop     rsi                                                            ; +0x16f, 0x18001463f\npop     rbp                                                            ; +0x170, 0x180014640\nretn                                                                   ; +0x171, 0x180014641", "xrefs": ["cocos2d::extension::CCTableView::cellAtIndex @ 0x180014e02", "cocos2d::extension::CCTableView::updateCellAtIndex @ 0x180014ea6", "cocos2d::extension::CCTableView::insertCellAtIndex @ 0x180014f5d", "cocos2d::extension::CCTableView::removeCellAtIndex @ 0x18001516c", "cocos2d::extension::CCTableView::ccTouchBegan @ 0x180016234", "<???> @ 0x180032408", "<???> @ 0x18004c5b4", "<???> @ 0x18004c5c0"], "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"}