{"type": "func", "start": 6442539936, "end": 6442540079, "name": "cocos2d::extension::CCTableView::_indexFromOffset", "pseudocode": "// \n// cocos2d::extension::CCTableView::_indexFromOffset from 0x180015ba0 to 0x180015c2f (143 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180016219\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a860\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  __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) + 304LL))(*(_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 0x180015ba0 to 0x180015c2f (143 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180016219\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a860\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_8], rbx                                               ; +0x0, 0x180015ba0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x180015ba5\npush    rdi                                                            ; +0xa, 0x180015baa\nsub     rsp, 20h                                                       ; +0xb, 0x180015bab\nmov     rbx, rcx                                                       ; +0xf, 0x180015baf\nmov     rdi, rdx                                                       ; +0x12, 0x180015bb2\nmov     rcx, [rcx+280h]                                                ; +0x15, 0x180015bb5\nmov     rdx, rbx                                                       ; +0x1c, 0x180015bbc\nmov     rax, [rcx]                                                     ; +0x1f, 0x180015bbf\ncall    qword ptr [rax+20h]                                            ; +0x22, 0x180015bc2\ncmp     dword ptr [rbx+248h], 0                                        ; +0x25, 0x180015bc5\nlea     esi, [rax-1]                                                   ; +0x2c, 0x180015bcc\njnz     short loc_180015BF0                                            ; +0x2f, 0x180015bcf\nmov     rcx, [rbx+1C0h]                                                ; +0x31, 0x180015bd1\nmov     rdx, [rcx]                                                     ; +0x38, 0x180015bd8\ncall    qword ptr [rdx+130h]                                           ; +0x3b, 0x180015bdb\nmovss   xmm0, dword ptr [rax+4]                                        ; +0x41, 0x180015be1\nsubss   xmm0, dword ptr [rdi+4]                                        ; +0x46, 0x180015be6\nmovss   dword ptr [rdi+4], xmm0                                        ; +0x4b, 0x180015beb\nmov     rdx, rdi                                                       ; +0x50, 0x180015bf0\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x53, 0x180015bf3\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x58, 0x180015bf8\nmov     rdx, rax                                                       ; +0x5e, 0x180015bfe\nmov     rcx, rbx                                                       ; +0x61, 0x180015c01\ncall    ?__indexFromOffset@CCTableView@extension@cocos2d@@IEAAHVCCPoint@3@@Z; cocos2d::extension::CCTableView::__indexFromOffset(cocos2d::CCPoint) ; +0x64, 0x180015c04\ncmp     eax, 0FFFFFFFFh                                                ; +0x69, 0x180015c09\njz      short loc_180015C1F                                            ; +0x6c, 0x180015c0c\nxor     ecx, ecx                                                       ; +0x6e, 0x180015c0e\ntest    eax, eax                                                       ; +0x70, 0x180015c10\ncmovs   eax, ecx                                                       ; +0x72, 0x180015c12\nmov     ecx, 0FFFFFFFFh                                                ; +0x75, 0x180015c15\ncmp     eax, esi                                                       ; +0x7a, 0x180015c1a\ncmovg   eax, ecx                                                       ; +0x7c, 0x180015c1c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x7f, 0x180015c1f\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x84, 0x180015c24\nadd     rsp, 20h                                                       ; +0x89, 0x180015c29\npop     rdi                                                            ; +0x8d, 0x180015c2d\nretn                                                                   ; +0x8e, 0x180015c2e", "xrefs": ["cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180016219", "<???> @ 0x18002fdf8", "<???> @ 0x18004a860"], "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"}