{"type": "func", "start": 6442539056, "end": 6442539236, "name": "cocos2d::extension::CCTableView::__indexFromOffset", "pseudocode": "// \n// cocos2d::extension::CCTableView::__indexFromOffset from 0x180015830 to 0x1800158e4 (180 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCTableView::_indexFromOffset @ 0x180015804\n// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015db4\n// > cocos2d::extension::CCTableView::ccTouchBegan @ 0x1800161ca\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c7a0\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::CCTableView::__indexFromOffset(__int64 a1, float *a2)\n{\n  int v4; // esi\n  int v5; // edi\n  int v6; // eax\n  float *v7; // rdx\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 = (v8 - v5) / 2 + v5;\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 0x180015830 to 0x1800158e4 (180 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCTableView::_indexFromOffset @ 0x180015804\n; > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015db4\n; > cocos2d::extension::CCTableView::ccTouchBegan @ 0x1800161ca\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c7a0\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, 0x180015830\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180015835\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18001583a\npush    rdi                                                            ; +0xf, 0x18001583f\nsub     rsp, 20h                                                       ; +0x10, 0x180015840\nmov     rbp, rcx                                                       ; +0x14, 0x180015844\nmov     rbx, rdx                                                       ; +0x17, 0x180015847\nmov     rcx, [rcx+280h]                                                ; +0x1a, 0x18001584a\nxor     esi, esi                                                       ; +0x21, 0x180015851\nmov     rdx, rbp                                                       ; +0x23, 0x180015853\nmov     edi, esi                                                       ; +0x26, 0x180015856\nmov     rax, [rcx]                                                     ; +0x28, 0x180015858\ncall    qword ptr [rax+20h]                                            ; +0x2b, 0x18001585b\ncmp     [rbp+1B0h], esi                                                ; +0x2e, 0x18001585e\nlea     rdx, [rbx+4]                                                   ; +0x34, 0x180015864\ncmovz   rdx, rbx                                                       ; +0x38, 0x180015868\nsub     eax, 1                                                         ; +0x3c, 0x18001586c\nmovss   xmm1, dword ptr [rdx]                                          ; +0x3f, 0x18001586f\njs      short loc_1800158CD                                            ; +0x43, 0x180015873\nmov     r8, [rbp+258h]                                                 ; +0x45, 0x180015875\nnop     dword ptr [rax+00h]                                            ; +0x4c, 0x18001587c\nmov     r9d, eax                                                       ; +0x50, 0x180015880\nsub     eax, edi                                                       ; +0x53, 0x180015883\njns     short loc_180015889                                            ; +0x55, 0x180015885\ninc     eax                                                            ; +0x57, 0x180015887\nsar     eax, 1                                                         ; +0x59, 0x180015889\nlea     ecx, [rax+rdi]                                                 ; +0x5b, 0x18001588b\nmovsxd  rax, ecx                                                       ; +0x5e, 0x18001588e\nlea     edx, [rcx+1]                                                   ; +0x61, 0x180015891\nmovss   xmm2, dword ptr [r8+rax*4]                                     ; +0x64, 0x180015894\ncomiss  xmm1, xmm2                                                     ; +0x6a, 0x18001589a\njb      short loc_1800158AD                                            ; +0x6d, 0x18001589d\nmovsxd  rax, edx                                                       ; +0x6f, 0x18001589f\nmovss   xmm0, dword ptr [r8+rax*4]                                     ; +0x72, 0x1800158a2\ncomiss  xmm0, xmm1                                                     ; +0x78, 0x1800158a8\njnb     short loc_1800158C9                                            ; +0x7b, 0x1800158ab\ncomiss  xmm2, xmm1                                                     ; +0x7d, 0x1800158ad\nlea     eax, [rcx-1]                                                   ; +0x80, 0x1800158b0\ncmovbe  eax, r9d                                                       ; +0x83, 0x1800158b3\ncmovbe  edi, edx                                                       ; +0x87, 0x1800158b7\ncmp     eax, edi                                                       ; +0x8a, 0x1800158ba\njge     short loc_180015880                                            ; +0x8c, 0x1800158bc\ntest    edi, edi                                                       ; +0x8e, 0x1800158be\nsetle   sil                                                            ; +0x90, 0x1800158c0\nlea     eax, [rsi-1]                                                   ; +0x94, 0x1800158c4\njmp     short loc_1800158CF                                            ; +0x97, 0x1800158c7\nmov     eax, ecx                                                       ; +0x99, 0x1800158c9\njmp     short loc_1800158CF                                            ; +0x9b, 0x1800158cb\nxor     eax, eax                                                       ; +0x9d, 0x1800158cd\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x9f, 0x1800158cf\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xa4, 0x1800158d4\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xa9, 0x1800158d9\nadd     rsp, 20h                                                       ; +0xae, 0x1800158de\npop     rdi                                                            ; +0xb2, 0x1800158e2\nretn                                                                   ; +0xb3, 0x1800158e3", "xrefs": ["cocos2d::extension::CCTableView::_indexFromOffset @ 0x180015804", "cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015db4", "cocos2d::extension::CCTableView::ccTouchBegan @ 0x1800161ca", "<???> @ 0x180032408", "<???> @ 0x18004c7a0"], "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"}