{"type": "func", "start": 6442534480, "end": 6442534680, "name": "cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject", "pseudocode": "// \n// cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject from 0x180014650 to 0x180014718 (200 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1800311e4\n// > <???> @ 0x180031220\n// > <???> @ 0x180031230\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c5cc\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__int64 __fastcall cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject(\n        cocos2d::extension::CCArrayForObjectSorting *this,\n        struct cocos2d::extension::CCSortableObject *a2)\n{\n  unsigned int v3; // ebx\n  unsigned int v4; // ebp\n  unsigned int v5; // esi\n  unsigned int *v6; // rdi\n  __int64 v7; // rax\n  _QWORD *v8; // rdi\n  _QWORD *i; // r14\n  __int64 v10; // rax\n  unsigned int v11; // eax\n\n  v3 = 0;\n  if ( !a2 )\n    return 0xFFFFFFFFLL;\n  v4 = 0;\n  v5 = (*(__int64 (__fastcall **)(struct cocos2d::extension::CCSortableObject *))(*(_QWORD *)a2 + 16LL))(a2);\n  if ( !this )\n    return 0;\n  v6 = *((unsigned int **)this + 7);\n  v7 = *v6;\n  if ( !(_DWORD)v7 )\n    return 0;\n  v8 = *((_QWORD **)v6 + 2);\n  for ( i = &v8[v7 - 1]; v8 <= i; v4 = v11 )\n  {\n    if ( !*v8 )\n      break;\n    v10 = _RTDynamicCast(\n            *v8,\n            0,\n            &cocos2d::CCObject `RTTI Type Descriptor',\n            &cocos2d::extension::CCSortableObject `RTTI Type Descriptor',\n            0);\n    v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 16LL))(v10);\n    if ( v5 == v11 || v5 >= v4 && v5 < v11 )\n      break;\n    ++v3;\n    ++v8;\n  }\n  return v3;\n}", "assembly": "; \n; cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject from 0x180014650 to 0x180014718 (200 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1800311e4\n; > <???> @ 0x180031220\n; > <???> @ 0x180031230\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c5cc\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; \npush    rbx                                                            ; +0x0, 0x180014650\npush    rdi                                                            ; +0x2, 0x180014652\npush    r15                                                            ; +0x3, 0x180014653\nsub     rsp, 30h                                                       ; +0x5, 0x180014655\nxor     r15d, r15d                                                     ; +0x9, 0x180014659\nmov     rdi, rcx                                                       ; +0xc, 0x18001465c\nmov     ebx, r15d                                                      ; +0xf, 0x18001465f\ntest    rdx, rdx                                                       ; +0x12, 0x180014662\njz      loc_18001470A                                                  ; +0x15, 0x180014665\nmov     rax, [rdx]                                                     ; +0x1b, 0x18001466b\nmov     rcx, rdx                                                       ; +0x1e, 0x18001466e\nmov     [rsp+48h+arg_0], rbp                                           ; +0x21, 0x180014671\nmov     ebp, r15d                                                      ; +0x26, 0x180014676\nmov     [rsp+48h+arg_8], rsi                                           ; +0x29, 0x180014679\ncall    qword ptr [rax+10h]                                            ; +0x2e, 0x18001467e\nmov     esi, eax                                                       ; +0x31, 0x180014681\ntest    rdi, rdi                                                       ; +0x33, 0x180014683\njz      short loc_180014706                                            ; +0x36, 0x180014686\nmov     rdi, [rdi+38h]                                                 ; +0x38, 0x180014688\nmov     eax, [rdi]                                                     ; +0x3c, 0x18001468c\ntest    eax, eax                                                       ; +0x3e, 0x18001468e\njz      short loc_180014706                                            ; +0x40, 0x180014690\nmov     rdi, [rdi+10h]                                                 ; +0x42, 0x180014692\nmov     [rsp+48h+arg_10], r14                                          ; +0x46, 0x180014696\nlea     r14, [rax-1]                                                   ; +0x4b, 0x18001469b\nlea     r14, [rdi+r14*8]                                               ; +0x4f, 0x18001469f\ncmp     rdi, r14                                                       ; +0x53, 0x1800146a3\nja      short loc_1800146EC                                            ; +0x56, 0x1800146a6\nmov     rcx, [rdi]                                                     ; +0x58, 0x1800146a8\ntest    rcx, rcx                                                       ; +0x5b, 0x1800146ab\njz      short loc_1800146EC                                            ; +0x5e, 0x1800146ae\nlea     r9, ??_R0?AVCCSortableObject@extension@cocos2d@@@8; cocos2d::extension::CCSortableObject `RTTI Type Descriptor' ; +0x60, 0x1800146b0\nmov     [rsp+48h+var_28], r15d                                         ; +0x67, 0x1800146b7\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x6c, 0x1800146bc\nxor     edx, edx                                                       ; +0x73, 0x1800146c3\ncall    __RTDynamicCast                                                ; +0x75, 0x1800146c5\nmov     rcx, rax                                                       ; +0x7a, 0x1800146ca\nmov     rax, [rax]                                                     ; +0x7d, 0x1800146cd\ncall    qword ptr [rax+10h]                                            ; +0x80, 0x1800146d0\ncmp     esi, eax                                                       ; +0x83, 0x1800146d3\njz      short loc_1800146EC                                            ; +0x85, 0x1800146d5\ncmp     esi, ebp                                                       ; +0x87, 0x1800146d7\njb      short loc_1800146DF                                            ; +0x89, 0x1800146d9\ncmp     esi, eax                                                       ; +0x8b, 0x1800146db\njb      short loc_1800146EC                                            ; +0x8d, 0x1800146dd\ninc     ebx                                                            ; +0x8f, 0x1800146df\nadd     rdi, 8                                                         ; +0x91, 0x1800146e1\nmov     ebp, eax                                                       ; +0x95, 0x1800146e5\ncmp     rdi, r14                                                       ; +0x97, 0x1800146e7\njbe     short loc_1800146A8                                            ; +0x9a, 0x1800146ea\nmov     r14, [rsp+48h+arg_10]                                          ; +0x9c, 0x1800146ec\nmov     eax, ebx                                                       ; +0xa1, 0x1800146f1\nmov     rbp, [rsp+48h+arg_0]                                           ; +0xa3, 0x1800146f3\nmov     rsi, [rsp+48h+arg_8]                                           ; +0xa8, 0x1800146f8\nadd     rsp, 30h                                                       ; +0xad, 0x1800146fd\npop     r15                                                            ; +0xb1, 0x180014701\npop     rdi                                                            ; +0xb3, 0x180014703\npop     rbx                                                            ; +0xb4, 0x180014704\nretn                                                                   ; +0xb5, 0x180014705\nmov     eax, ebx                                                       ; +0xb6, 0x180014706\njmp     short loc_1800146F3                                            ; +0xb8, 0x180014708\nmov     eax, 0FFFFFFFFh                                                ; +0xba, 0x18001470a\nadd     rsp, 30h                                                       ; +0xbf, 0x18001470f\npop     r15                                                            ; +0xc3, 0x180014713\npop     rdi                                                            ; +0xc5, 0x180014715\npop     rbx                                                            ; +0xc6, 0x180014716\nretn                                                                   ; +0xc7, 0x180014717", "xrefs": ["<???> @ 0x1800311e4", "<???> @ 0x180031220", "<???> @ 0x180031230", "<???> @ 0x180032408", "<???> @ 0x18004c5cc"], "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"}