{"type": "func", "start": 6442540080, "end": 6442540259, "name": "cocos2d::extension::CCTableView::__indexFromOffset", "pseudocode": "// \n// cocos2d::extension::CCTableView::__indexFromOffset from 0x180015c30 to 0x180015ce3 (179 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCTableView::_indexFromOffset @ 0x180015c04\n// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x18001615c\n// > cocos2d::extension::CCTableView::ccTouchBegan @ 0x180016557\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a86c\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__int64 __fastcall cocos2d::extension::CCTableView::__indexFromOffset(__int64 a1, float *a2)\n{\n  int v4; // esi\n  int v5; // edi\n  int v6; // eax\n  float *v7; // r8\n  int v8; // eax\n  float v9; // xmm1_4\n  __int64 v10; // r8\n  int v11; // r9d\n  unsigned int v12; // ecx\n  float v13; // xmm2_4\n\n  v4 = 0;\n  v5 = 0;\n  v6 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 640) + 32LL))(*(_QWORD *)(a1 + 640), a1);\n  v7 = a2 + 1;\n  if ( !*(_DWORD *)(a1 + 432) )\n    v7 = a2;\n  v8 = v6 - 1;\n  v9 = *v7;\n  if ( v8 < 0 )\n    return 0;\n  v10 = *(_QWORD *)(a1 + 600);\n  while ( 1 )\n  {\n    v11 = v8;\n    v12 = v5 + (v8 - v5) / 2;\n    v13 = *(float *)(v10 + 4LL * (int)v12);\n    if ( v9 >= v13 && *(float *)(v10 + 4LL * (int)(v12 + 1)) >= v9 )\n      break;\n    v8 = v12 - 1;\n    if ( v13 <= v9 )\n    {\n      v8 = v11;\n      v5 = v12 + 1;\n    }\n    if ( v8 < v5 )\n    {\n      LOBYTE(v4) = v5 <= 0;\n      return (unsigned int)(v4 - 1);\n    }\n  }\n  return v12;\n}", "assembly": "; \n; cocos2d::extension::CCTableView::__indexFromOffset from 0x180015c30 to 0x180015ce3 (179 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCTableView::_indexFromOffset @ 0x180015c04\n; > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x18001615c\n; > cocos2d::extension::CCTableView::ccTouchBegan @ 0x180016557\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a86c\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, 0x180015c30\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180015c35\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x180015c3a\npush    rdi                                                            ; +0xf, 0x180015c3f\nsub     rsp, 20h                                                       ; +0x10, 0x180015c40\nmov     rbp, rcx                                                       ; +0x14, 0x180015c44\nmov     rbx, rdx                                                       ; +0x17, 0x180015c47\nmov     rcx, [rcx+280h]                                                ; +0x1a, 0x180015c4a\nxor     esi, esi                                                       ; +0x21, 0x180015c51\nmov     rdx, rbp                                                       ; +0x23, 0x180015c53\nmov     edi, esi                                                       ; +0x26, 0x180015c56\nmov     rax, [rcx]                                                     ; +0x28, 0x180015c58\ncall    qword ptr [rax+20h]                                            ; +0x2b, 0x180015c5b\ncmp     [rbp+1B0h], esi                                                ; +0x2e, 0x180015c5e\nlea     r8, [rbx+4]                                                    ; +0x34, 0x180015c64\ncmovz   r8, rbx                                                        ; +0x38, 0x180015c68\nsub     eax, 1                                                         ; +0x3c, 0x180015c6c\nmovss   xmm1, dword ptr [r8]                                           ; +0x3f, 0x180015c6f\njs      short loc_180015CCC                                            ; +0x44, 0x180015c74\nmov     r8, [rbp+258h]                                                 ; +0x46, 0x180015c76\nnop     dword ptr [rax]                                                ; +0x4d, 0x180015c7d\nmov     r9d, eax                                                       ; +0x50, 0x180015c80\nsub     eax, edi                                                       ; +0x53, 0x180015c83\ncdq                                                                    ; +0x55, 0x180015c85\nsub     eax, edx                                                       ; +0x56, 0x180015c86\nsar     eax, 1                                                         ; +0x58, 0x180015c88\nlea     ecx, [rdi+rax]                                                 ; +0x5a, 0x180015c8a\nmovsxd  rax, ecx                                                       ; +0x5d, 0x180015c8d\nlea     edx, [rcx+1]                                                   ; +0x60, 0x180015c90\nmovss   xmm2, dword ptr [r8+rax*4]                                     ; +0x63, 0x180015c93\ncomiss  xmm1, xmm2                                                     ; +0x69, 0x180015c99\njb      short loc_180015CAC                                            ; +0x6c, 0x180015c9c\nmovsxd  rax, edx                                                       ; +0x6e, 0x180015c9e\nmovss   xmm0, dword ptr [r8+rax*4]                                     ; +0x71, 0x180015ca1\ncomiss  xmm0, xmm1                                                     ; +0x77, 0x180015ca7\njnb     short loc_180015CC8                                            ; +0x7a, 0x180015caa\ncomiss  xmm2, xmm1                                                     ; +0x7c, 0x180015cac\nlea     eax, [rcx-1]                                                   ; +0x7f, 0x180015caf\ncmovbe  eax, r9d                                                       ; +0x82, 0x180015cb2\ncmovbe  edi, edx                                                       ; +0x86, 0x180015cb6\ncmp     eax, edi                                                       ; +0x89, 0x180015cb9\njge     short loc_180015C80                                            ; +0x8b, 0x180015cbb\ntest    edi, edi                                                       ; +0x8d, 0x180015cbd\nsetle   sil                                                            ; +0x8f, 0x180015cbf\nlea     eax, [rsi-1]                                                   ; +0x93, 0x180015cc3\njmp     short loc_180015CCE                                            ; +0x96, 0x180015cc6\nmov     eax, ecx                                                       ; +0x98, 0x180015cc8\njmp     short loc_180015CCE                                            ; +0x9a, 0x180015cca\nxor     eax, eax                                                       ; +0x9c, 0x180015ccc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x9e, 0x180015cce\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xa3, 0x180015cd3\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xa8, 0x180015cd8\nadd     rsp, 20h                                                       ; +0xad, 0x180015cdd\npop     rdi                                                            ; +0xb1, 0x180015ce1\nretn                                                                   ; +0xb2, 0x180015ce2", "xrefs": ["cocos2d::extension::CCTableView::_indexFromOffset @ 0x180015c04", "cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x18001615c", "cocos2d::extension::CCTableView::ccTouchBegan @ 0x180016557", "<???> @ 0x18002fdf8", "<???> @ 0x18004a86c"], "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"}