{"type": "func", "start": 6443098880, "end": 6443098973, "name": "sub_18009E300", "pseudocode": "// \n// sub_18009E300 from 0x18009e300 to 0x18009e35d (93 bytes)\n// \n// 2 xrefs:\n// > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b2aed\n// > cocos2d::CCTouchDispatcher::addTargetedDelegate @ 0x1800b2bc4\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 sub_18009E300(__int64 a1, __int64 a2)\n{\n  __int64 result; // rax\n  unsigned int v4; // ecx\n  __int64 v5; // r8\n  __int64 v6; // rdx\n  __int64 v7; // r9\n  __int64 v8; // rcx\n\n  result = 0;\n  v4 = *(_DWORD *)a1;\n  if ( v4 )\n  {\n    while ( 1 )\n    {\n      v5 = 8 * result;\n      if ( *(_QWORD *)(8 * result + *(_QWORD *)(a1 + 16)) == a2 )\n        break;\n      result = (unsigned int)(result + 1);\n      if ( (unsigned int)result >= v4 )\n        return result;\n    }\n    if ( (_DWORD)result != -1 )\n    {\n      *(_DWORD *)a1 = v4 - 1;\n      if ( (unsigned int)result < v4 - 1 )\n      {\n        v6 = 8LL * (unsigned int)(result + 1);\n        v7 = v4 - 1 - (unsigned int)result;\n        do\n        {\n          v8 = *(_QWORD *)(a1 + 16);\n          v5 += 8;\n          v6 += 8;\n          result = *(_QWORD *)(v6 + v8 - 8);\n          *(_QWORD *)(v5 + v8 - 8) = result;\n          --v7;\n        }\n        while ( v7 );\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_18009E300 from 0x18009e300 to 0x18009e35d (93 bytes)\n; \n; 2 xrefs:\n; > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b2aed\n; > cocos2d::CCTouchDispatcher::addTargetedDelegate @ 0x1800b2bc4\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     r10, rcx                                                       ; +0x0, 0x18009e300\nxor     eax, eax                                                       ; +0x3, 0x18009e303\nmov     ecx, [rcx]                                                     ; +0x5, 0x18009e305\ntest    ecx, ecx                                                       ; +0x7, 0x18009e307\njz      short locret_18009E35C                                         ; +0x9, 0x18009e309\nmov     r9, [r10+10h]                                                  ; +0xb, 0x18009e30b\nnop                                                                    ; +0xf, 0x18009e30f\nlea     r8, ds:0[rax*8]                                                ; +0x10, 0x18009e310\ncmp     [r8+r9], rdx                                                   ; +0x18, 0x18009e318\njz      short loc_18009E325                                            ; +0x1c, 0x18009e31c\ninc     eax                                                            ; +0x1e, 0x18009e31e\ncmp     eax, ecx                                                       ; +0x20, 0x18009e320\njb      short loc_18009E310                                            ; +0x22, 0x18009e322\nretn                                                                   ; +0x24, 0x18009e324\ncmp     eax, 0FFFFFFFFh                                                ; +0x25, 0x18009e325\njz      short locret_18009E35C                                         ; +0x28, 0x18009e328\nlea     r9d, [rcx-1]                                                   ; +0x2a, 0x18009e32a\nmov     [r10], r9d                                                     ; +0x2e, 0x18009e32e\ncmp     eax, r9d                                                       ; +0x31, 0x18009e331\njnb     short locret_18009E35C                                         ; +0x34, 0x18009e334\nlea     edx, [rax+1]                                                   ; +0x36, 0x18009e336\nshl     rdx, 3                                                         ; +0x39, 0x18009e339\nsub     r9d, eax                                                       ; +0x3d, 0x18009e33d\nmov     rcx, [r10+10h]                                                 ; +0x40, 0x18009e340\nlea     r8, [r8+8]                                                     ; +0x44, 0x18009e344\nlea     rdx, [rdx+8]                                                   ; +0x48, 0x18009e348\nmov     rax, [rdx+rcx-8]                                               ; +0x4c, 0x18009e34c\nmov     [r8+rcx-8], rax                                                ; +0x51, 0x18009e351\nsub     r9, 1                                                          ; +0x56, 0x18009e356\njnz     short loc_18009E340                                            ; +0x5a, 0x18009e35a\nretn                                                                   ; +0x5c, 0x18009e35c", "xrefs": ["cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b2aed", "cocos2d::CCTouchDispatcher::addTargetedDelegate @ 0x1800b2bc4"], "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"}