{"type": "func", "start": 6442537872, "end": 6442538326, "name": "cocos2d::extension::CCTableView::insertCellAtIndex", "pseudocode": "// \n// cocos2d::extension::CCTableView::insertCellAtIndex from 0x180015390 to 0x180015556 (454 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x18002edec\n// > <???> @ 0x18002ee2c\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a788\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\nvoid __fastcall cocos2d::extension::CCTableView::insertCellAtIndex(\n        cocos2d::extension::CCTableView *this,\n        unsigned int a2)\n{\n  int v4; // eax\n  struct cocos2d::extension::CCSortableObject *v5; // rax\n  char *v6; // rcx\n  unsigned int v7; // ebx\n  __int64 v8; // rsi\n  char *v9; // rcx\n  unsigned int v10; // r14d\n  unsigned int v11; // ebp\n  unsigned int *v12; // rsi\n  __int64 v13; // rax\n  _QWORD *v14; // rsi\n  _QWORD *i; // r15\n  __int64 v16; // rax\n  unsigned int v17; // eax\n  struct cocos2d::CCObject *v18; // rax\n  struct cocos2d::extension::CCTableViewCell *v19; // rbx\n\n  if ( a2 != -1 )\n  {\n    v4 = (*(__int64 (__fastcall **)(_QWORD, cocos2d::extension::CCTableView *))(**((_QWORD **)this + 80) + 32LL))(\n           *((_QWORD *)this + 80),\n           this);\n    if ( v4 )\n    {\n      if ( a2 <= v4 - 1 )\n      {\n        v5 = cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(\n               *((cocos2d::extension::CCArrayForObjectSorting **)this + 78),\n               a2);\n        v6 = (char *)v5 - 320;\n        if ( !v5 )\n          v6 = nullptr;\n        if ( v6 )\n        {\n          v7 = 0;\n          v8 = *((_QWORD *)this + 78);\n          v9 = v6 + 320;\n          if ( v9 )\n          {\n            v10 = 0;\n            v11 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v9 + 16LL))(v9);\n            if ( v8 )\n            {\n              v12 = *(unsigned int **)(v8 + 56);\n              v13 = *v12;\n              if ( (_DWORD)v13 )\n              {\n                v14 = *((_QWORD **)v12 + 2);\n                for ( i = &v14[v13 - 1]; v14 <= i; v10 = v17 )\n                {\n                  if ( !*v14 )\n                    break;\n                  v16 = _RTDynamicCast(\n                          *v14,\n                          0,\n                          &cocos2d::CCObject `RTTI Type Descriptor',\n                          &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n                          0);\n                  v17 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 16LL))(v16);\n                  if ( v11 == v17 || v11 >= v10 && v11 < v17 )\n                    break;\n                  ++v7;\n                  ++v14;\n                }\n              }\n            }\n          }\n          else\n          {\n            v7 = -1;\n          }\n          for ( ; v7 < cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 78)); ++v7 )\n          {\n            v18 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 78), v7);\n            cocos2d::extension::CCTableView::_setIndexForCell(this, *((_DWORD *)v18 + 82) + 1, v18);\n          }\n        }\n        v19 = (struct cocos2d::extension::CCTableViewCell *)(*(__int64 (__fastcall **)(_QWORD, cocos2d::extension::CCTableView *, _QWORD))(**((_QWORD **)this + 80) + 24LL))(\n                                                              *((_QWORD *)this + 80),\n                                                              this,\n                                                              a2);\n        cocos2d::extension::CCTableView::_setIndexForCell(this, a2, v19);\n        cocos2d::extension::CCTableView::_addCellIfNecessary(this, v19);\n        cocos2d::extension::CCTableView::_updateCellPositions(this);\n        cocos2d::extension::CCTableView::_updateContentSize(this);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::extension::CCTableView::insertCellAtIndex from 0x180015390 to 0x180015556 (454 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x18002edec\n; > <???> @ 0x18002ee2c\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a788\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\ncmp     edx, 0FFFFFFFFh                                                ; +0x0, 0x180015390\njz      locret_180015555                                               ; +0x3, 0x180015393\npush    rdi                                                            ; +0x9, 0x180015399\npush    r12                                                            ; +0xa, 0x18001539a\nsub     rsp, 48h                                                       ; +0xc, 0x18001539c\nmov     rdi, rcx                                                       ; +0x10, 0x1800153a0\nmov     r12d, edx                                                      ; +0x13, 0x1800153a3\nmov     rcx, [rcx+280h]                                                ; +0x16, 0x1800153a6\nmov     rdx, rdi                                                       ; +0x1d, 0x1800153ad\nmov     rax, [rcx]                                                     ; +0x20, 0x1800153b0\ncall    qword ptr [rax+20h]                                            ; +0x23, 0x1800153b3\ntest    eax, eax                                                       ; +0x26, 0x1800153b6\njz      loc_18001554E                                                  ; +0x28, 0x1800153b8\ndec     eax                                                            ; +0x2e, 0x1800153be\ncmp     r12d, eax                                                      ; +0x30, 0x1800153c0\nja      loc_18001554E                                                  ; +0x33, 0x1800153c3\nmov     rcx, [rdi+270h]; this                                          ; +0x39, 0x1800153c9\nmov     edx, r12d; unsigned int                                        ; +0x40, 0x1800153d0\nmov     [rsp+58h+arg_0], rbx                                           ; +0x43, 0x1800153d3\nmov     [rsp+58h+var_18], r13                                          ; +0x48, 0x1800153d8\ncall    ?objectWithObjectID@CCArrayForObjectSorting@extension@cocos2d@@QEAAPEAVCCSortableObject@23@I@Z; cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(uint) ; +0x4d, 0x1800153dd\nxor     r13d, r13d                                                     ; +0x52, 0x1800153e2\ntest    rax, rax                                                       ; +0x55, 0x1800153e5\nlea     rcx, [rax-140h]                                                ; +0x58, 0x1800153e8\ncmovz   rcx, r13                                                       ; +0x5f, 0x1800153ef\ntest    rcx, rcx                                                       ; +0x63, 0x1800153f3\njz      loc_180015505                                                  ; +0x66, 0x1800153f6\nmov     [rsp+58h+arg_10], rsi                                          ; +0x6c, 0x1800153fc\nmov     ebx, r13d                                                      ; +0x71, 0x180015401\nmov     rsi, [rdi+270h]                                                ; +0x74, 0x180015404\nmov     [rsp+58h+arg_8], rbp                                           ; +0x7b, 0x18001540b\nmov     [rsp+58h+var_20], r14                                          ; +0x80, 0x180015410\nmov     [rsp+58h+var_28], r15                                          ; +0x85, 0x180015415\nadd     rcx, 140h                                                      ; +0x8a, 0x18001541a\njz      short loc_180015498                                            ; +0x91, 0x180015421\nmov     rax, [rcx]                                                     ; +0x93, 0x180015423\nmov     r14d, r13d                                                     ; +0x96, 0x180015426\ncall    qword ptr [rax+10h]                                            ; +0x99, 0x180015429\nmov     ebp, eax                                                       ; +0x9c, 0x18001542c\ntest    rsi, rsi                                                       ; +0x9e, 0x18001542e\njz      short loc_18001549D                                            ; +0xa1, 0x180015431\nmov     rsi, [rsi+38h]                                                 ; +0xa3, 0x180015433\nmov     eax, [rsi]                                                     ; +0xa7, 0x180015437\ntest    eax, eax                                                       ; +0xa9, 0x180015439\njz      short loc_18001549D                                            ; +0xab, 0x18001543b\nmov     rsi, [rsi+10h]                                                 ; +0xad, 0x18001543d\nlea     r15, [rax-1]                                                   ; +0xb1, 0x180015441\nlea     r15, [rsi+r15*8]                                               ; +0xb5, 0x180015445\ncmp     rsi, r15                                                       ; +0xb9, 0x180015449\nja      short loc_18001549D                                            ; +0xbc, 0x18001544c\nxchg    ax, ax                                                         ; +0xbe, 0x18001544e\nmov     rcx, [rsi]                                                     ; +0xc0, 0x180015450\ntest    rcx, rcx                                                       ; +0xc3, 0x180015453\njz      short loc_18001549D                                            ; +0xc6, 0x180015456\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0xc8, 0x180015458\nmov     [rsp+58h+var_38], r13d                                         ; +0xcf, 0x18001545f\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0xd4, 0x180015464\nxor     edx, edx                                                       ; +0xdb, 0x18001546b\ncall    __RTDynamicCast                                                ; +0xdd, 0x18001546d\nmov     rcx, rax                                                       ; +0xe2, 0x180015472\nmov     rdx, [rax]                                                     ; +0xe5, 0x180015475\ncall    qword ptr [rdx+10h]                                            ; +0xe8, 0x180015478\ncmp     ebp, eax                                                       ; +0xeb, 0x18001547b\njz      short loc_18001549D                                            ; +0xed, 0x18001547d\ncmp     ebp, r14d                                                      ; +0xef, 0x18001547f\njb      short loc_180015488                                            ; +0xf2, 0x180015482\ncmp     ebp, eax                                                       ; +0xf4, 0x180015484\njb      short loc_18001549D                                            ; +0xf6, 0x180015486\ninc     ebx                                                            ; +0xf8, 0x180015488\nadd     rsi, 8                                                         ; +0xfa, 0x18001548a\nmov     r14d, eax                                                      ; +0xfe, 0x18001548e\ncmp     rsi, r15                                                       ; +0x101, 0x180015491\njbe     short loc_180015450                                            ; +0x104, 0x180015494\njmp     short loc_18001549D                                            ; +0x106, 0x180015496\nmov     ebx, 0FFFFFFFFh                                                ; +0x108, 0x180015498\nmov     rcx, [rdi+270h]                                                ; +0x10d, 0x18001549d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x114, 0x1800154a4\nmov     r15, [rsp+58h+var_28]                                          ; +0x11a, 0x1800154aa\nmov     r14, [rsp+58h+var_20]                                          ; +0x11f, 0x1800154af\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x124, 0x1800154b4\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x129, 0x1800154b9\ncmp     ebx, eax                                                       ; +0x12e, 0x1800154be\njnb     short loc_180015505                                            ; +0x130, 0x1800154c0\nnop     dword ptr [rax+00h]                                            ; +0x132, 0x1800154c2\nnop     word ptr [rax+rax+00000000h]                                   ; +0x136, 0x1800154c6\nmov     rcx, [rdi+270h]                                                ; +0x140, 0x1800154d0\nmov     edx, ebx                                                       ; +0x147, 0x1800154d7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x149, 0x1800154d9\nmov     r8, rax; struct cocos2d::extension::CCTableViewCell *          ; +0x14f, 0x1800154df\nmov     rcx, rdi; this                                                 ; +0x152, 0x1800154e2\nmov     edx, [rax+148h]                                                ; +0x155, 0x1800154e5\ninc     edx; unsigned int                                              ; +0x15b, 0x1800154eb\ncall    ?_setIndexForCell@CCTableView@extension@cocos2d@@IEAAXIPEAVCCTableViewCell@23@@Z; cocos2d::extension::CCTableView::_setIndexForCell(uint,cocos2d::extension::CCTableViewCell *) ; +0x15d, 0x1800154ed\nmov     rcx, [rdi+270h]                                                ; +0x162, 0x1800154f2\ninc     ebx                                                            ; +0x169, 0x1800154f9\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x16b, 0x1800154fb\ncmp     ebx, eax                                                       ; +0x171, 0x180015501\njb      short loc_1800154D0                                            ; +0x173, 0x180015503\nmov     rcx, [rdi+280h]                                                ; +0x175, 0x180015505\nmov     r8d, r12d                                                      ; +0x17c, 0x18001550c\nmov     rdx, rdi                                                       ; +0x17f, 0x18001550f\nmov     rax, [rcx]                                                     ; +0x182, 0x180015512\ncall    qword ptr [rax+18h]                                            ; +0x185, 0x180015515\nmov     edx, r12d; unsigned int                                        ; +0x188, 0x180015518\nmov     rcx, rdi; this                                                 ; +0x18b, 0x18001551b\nmov     r8, rax; struct cocos2d::extension::CCTableViewCell *          ; +0x18e, 0x18001551e\nmov     rbx, rax                                                       ; +0x191, 0x180015521\ncall    ?_setIndexForCell@CCTableView@extension@cocos2d@@IEAAXIPEAVCCTableViewCell@23@@Z; cocos2d::extension::CCTableView::_setIndexForCell(uint,cocos2d::extension::CCTableViewCell *) ; +0x194, 0x180015524\nmov     rdx, rbx; struct cocos2d::extension::CCTableViewCell *         ; +0x199, 0x180015529\nmov     rcx, rdi; this                                                 ; +0x19c, 0x18001552c\ncall    ?_addCellIfNecessary@CCTableView@extension@cocos2d@@IEAAXPEAVCCTableViewCell@23@@Z; cocos2d::extension::CCTableView::_addCellIfNecessary(cocos2d::extension::CCTableViewCell *) ; +0x19f, 0x18001552f\nmov     rcx, rdi; this                                                 ; +0x1a4, 0x180015534\ncall    ?_updateCellPositions@CCTableView@extension@cocos2d@@IEAAXXZ; cocos2d::extension::CCTableView::_updateCellPositions(void) ; +0x1a7, 0x180015537\nmov     rcx, rdi; this                                                 ; +0x1ac, 0x18001553c\ncall    ?_updateContentSize@CCTableView@extension@cocos2d@@QEAAXXZ; cocos2d::extension::CCTableView::_updateContentSize(void) ; +0x1af, 0x18001553f\nmov     r13, [rsp+58h+var_18]                                          ; +0x1b4, 0x180015544\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x1b9, 0x180015549\nadd     rsp, 48h                                                       ; +0x1be, 0x18001554e\npop     r12                                                            ; +0x1c2, 0x180015552\npop     rdi                                                            ; +0x1c4, 0x180015554\nretn                                                                   ; +0x1c5, 0x180015555", "xrefs": ["<???> @ 0x18002edec", "<???> @ 0x18002ee2c", "<???> @ 0x18002fdf8", "<???> @ 0x18004a788"], "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"}