{"type": "func", "start": 6442538912, "end": 6442539055, "name": "cocos2d::extension::CCTableView::_indexFromOffset", "pseudocode": "// \n// cocos2d::extension::CCTableView::_indexFromOffset from 0x1800157a0 to 0x18001582f (143 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015e79\n// > <???> @ 0x180032408\n// > <???> @ 0x18004c794\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  __int64 v5; // rax\n  __int64 result; // rax\n  char v7; // [rsp+30h] [rbp+8h] BYREF\n\n  v4 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 640) + 32LL))(*(_QWORD *)(a1 + 640), a1) - 1;\n  if ( !*(_DWORD *)(a1 + 584) )\n    a2[1] = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 448) + 320LL))(*(_QWORD *)(a1 + 448)) + 4)\n          - a2[1];\n  v5 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v7, (const struct cocos2d::CCPoint *)a2);\n  result = cocos2d::extension::CCTableView::__indexFromOffset(a1, v5);\n  if ( (_DWORD)result != -1 )\n  {\n    if ( (int)result < 0 )\n      result = 0;\n    if ( (int)result > v4 )\n      return 0xFFFFFFFFLL;\n  }\n  return result;\n}", "assembly": "; \n; cocos2d::extension::CCTableView::_indexFromOffset from 0x1800157a0 to 0x18001582f (143 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015e79\n; > <???> @ 0x180032408\n; > <???> @ 0x18004c794\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_8], rbx                                               ; +0x0, 0x1800157a0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800157a5\npush    rdi                                                            ; +0xa, 0x1800157aa\nsub     rsp, 20h                                                       ; +0xb, 0x1800157ab\nmov     rbx, rcx                                                       ; +0xf, 0x1800157af\nmov     rdi, rdx                                                       ; +0x12, 0x1800157b2\nmov     rcx, [rcx+280h]                                                ; +0x15, 0x1800157b5\nmov     rdx, rbx                                                       ; +0x1c, 0x1800157bc\nmov     rax, [rcx]                                                     ; +0x1f, 0x1800157bf\ncall    qword ptr [rax+20h]                                            ; +0x22, 0x1800157c2\ncmp     dword ptr [rbx+248h], 0                                        ; +0x25, 0x1800157c5\nlea     esi, [rax-1]                                                   ; +0x2c, 0x1800157cc\njnz     short loc_1800157F0                                            ; +0x2f, 0x1800157cf\nmov     rcx, [rbx+1C0h]                                                ; +0x31, 0x1800157d1\nmov     rdx, [rcx]                                                     ; +0x38, 0x1800157d8\ncall    qword ptr [rdx+140h]                                           ; +0x3b, 0x1800157db\nmovss   xmm0, dword ptr [rax+4]                                        ; +0x41, 0x1800157e1\nsubss   xmm0, dword ptr [rdi+4]                                        ; +0x46, 0x1800157e6\nmovss   dword ptr [rdi+4], xmm0                                        ; +0x4b, 0x1800157eb\nmov     rdx, rdi                                                       ; +0x50, 0x1800157f0\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x53, 0x1800157f3\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x58, 0x1800157f8\nmov     rdx, rax                                                       ; +0x5e, 0x1800157fe\nmov     rcx, rbx                                                       ; +0x61, 0x180015801\ncall    ?__indexFromOffset@CCTableView@extension@cocos2d@@IEAAHVCCPoint@3@@Z; cocos2d::extension::CCTableView::__indexFromOffset(cocos2d::CCPoint) ; +0x64, 0x180015804\ncmp     eax, 0FFFFFFFFh                                                ; +0x69, 0x180015809\njz      short loc_18001581F                                            ; +0x6c, 0x18001580c\nxor     ecx, ecx                                                       ; +0x6e, 0x18001580e\ntest    eax, eax                                                       ; +0x70, 0x180015810\ncmovs   eax, ecx                                                       ; +0x72, 0x180015812\nmov     ecx, 0FFFFFFFFh                                                ; +0x75, 0x180015815\ncmp     eax, esi                                                       ; +0x7a, 0x18001581a\ncmovg   eax, ecx                                                       ; +0x7c, 0x18001581c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x7f, 0x18001581f\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x84, 0x180015824\nadd     rsp, 20h                                                       ; +0x89, 0x180015829\npop     rdi                                                            ; +0x8d, 0x18001582d\nretn                                                                   ; +0x8e, 0x18001582e", "xrefs": ["cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015e79", "<???> @ 0x180032408", "<???> @ 0x18004c794"], "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"}