{"type": "func", "start": 5370423904, "end": 5370424257, "name": "GJRotationControl::ccTouchBegan", "pseudocode": "// \n// GJRotationControl::ccTouchBegan from 0x1401a2a60 to 0x1401a2bc1 (353 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140751128\n// > <???> @ 0x140919958\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 11:27:48 +0000\n// \n\nchar __fastcall GJRotationControl::ccTouchBegan(__int64 a1, __int64 a2, __int64 a3)\n{\n  __int64 Location; // rax\n  __int64 v6; // rcx\n  __int64 v7; // rax\n  const struct cocos2d::CCPoint *v8; // r8\n  __int64 v9; // rcx\n  cocos2d::CCSpriteFrameCache *v10; // rax\n  struct cocos2d::CCSpriteFrame *v11; // rax\n  char v13; // [rsp+30h] [rbp+8h] BYREF\n  char v14; // [rsp+48h] [rbp+20h] BYREF\n\n  if ( *(_DWORD *)(a1 + 120) == -1 )\n  {\n    if ( ControlMenuTouch::began((__int64 *)(a1 + 160), a2, a3) )\n      return 1;\n    if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 144) + 344LL))(*(_QWORD *)(a1 + 144)) )\n    {\n      Location = cocos2d::CCTouch::getLocation(a2, &v14);\n      if ( CCTextInputNode::containsTouchPoint(*(_QWORD *)(a1 + 144), Location) )\n        return 1;\n    }\n    v6 = *(_QWORD *)(a1 + 144);\n    if ( v6 )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 1032LL))(v6, 0);\n    cocos2d::CCTouch::getLocation(a2, &v13);\n    cocos2d::CCNode::convertToNodeSpace(a1 - 320, &v14, &v13);\n    cocos2d::CCPoint::operator=(&v13, v7);\n    if ( cocos2d::ccpDistance((cocos2d *)&v13, (const struct cocos2d::CCPoint *)(a1 + 96), v8) < 24.0 )\n    {\n      *(_DWORD *)(a1 + 112) = *(_DWORD *)(a1 + 116);\n      cocos2d::CCPoint::operator-(&v13, &v14, a1 + 96);\n      cocos2d::CCPoint::operator=(a1 + 88, &v14);\n      v9 = *(_QWORD *)(a1 + 192);\n      *(_DWORD *)(a1 + 120) = *(_DWORD *)(a2 + 56);\n      if ( v9 )\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 8LL))(v9);\n      v10 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n      v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v10, \"GJ_rotationControlBtn02_001.png\");\n      (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSpriteFrame *))(**(_QWORD **)(a1 + 104) + 1008LL))(\n        *(_QWORD *)(a1 + 104),\n        v11);\n      return 1;\n    }\n  }\n  return 0;\n}", "assembly": "; \n; GJRotationControl::ccTouchBegan from 0x1401a2a60 to 0x1401a2bc1 (353 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140751128\n; > <???> @ 0x140919958\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 11:27:48 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401a2a60\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1401a2a65\npush    rdi                                                            ; +0xa, 0x1401a2a6a\nsub     rsp, 20h                                                       ; +0xb, 0x1401a2a6b\ncmp     dword ptr [rcx+78h], 0FFFFFFFFh                                ; +0xf, 0x1401a2a6f\nmov     rdi, rdx                                                       ; +0x13, 0x1401a2a73\nmov     rbx, rcx                                                       ; +0x16, 0x1401a2a76\njnz     loc_1401A2BAF                                                  ; +0x19, 0x1401a2a79\nadd     rcx, 0A0h                                                      ; +0x1f, 0x1401a2a7f\ncall    ControlMenuTouch__began                                        ; +0x26, 0x1401a2a86\ntest    al, al                                                         ; +0x2b, 0x1401a2a8b\njnz     loc_1401A2B9D                                                  ; +0x2d, 0x1401a2a8d\nmov     rcx, [rbx+90h]                                                 ; +0x33, 0x1401a2a93\nmov     rax, [rcx]                                                     ; +0x3a, 0x1401a2a9a\ncall    qword ptr [rax+158h]                                           ; +0x3d, 0x1401a2a9d\ntest    al, al                                                         ; +0x43, 0x1401a2aa3\njz      short loc_1401A2ACC                                            ; +0x45, 0x1401a2aa5\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x47, 0x1401a2aa7\nmov     rcx, rdi                                                       ; +0x4c, 0x1401a2aac\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x4f, 0x1401a2aaf\nmov     rcx, [rbx+90h]                                                 ; +0x55, 0x1401a2ab5\nmov     rdx, rax                                                       ; +0x5c, 0x1401a2abc\ncall    CCTextInputNode__containsTouchPoint                            ; +0x5f, 0x1401a2abf\ntest    al, al                                                         ; +0x64, 0x1401a2ac4\njnz     loc_1401A2B9D                                                  ; +0x66, 0x1401a2ac6\nmov     rcx, [rbx+90h]                                                 ; +0x6c, 0x1401a2acc\ntest    rcx, rcx                                                       ; +0x73, 0x1401a2ad3\njz      short loc_1401A2AE3                                            ; +0x76, 0x1401a2ad6\nmov     rax, [rcx]                                                     ; +0x78, 0x1401a2ad8\nxor     edx, edx                                                       ; +0x7b, 0x1401a2adb\ncall    qword ptr [rax+408h]                                           ; +0x7d, 0x1401a2add\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x83, 0x1401a2ae3\nmov     rcx, rdi                                                       ; +0x88, 0x1401a2ae8\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x8b, 0x1401a2aeb\nlea     r8, [rsp+28h+arg_0]                                            ; +0x91, 0x1401a2af1\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x96, 0x1401a2af6\nlea     rcx, [rbx-140h]                                                ; +0x9b, 0x1401a2afb\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xa2, 0x1401a2b02\nmov     rdx, rax                                                       ; +0xa8, 0x1401a2b08\nlea     rcx, [rsp+28h+arg_0]                                           ; +0xab, 0x1401a2b0b\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0xb0, 0x1401a2b10\nlea     rdx, [rbx+60h]                                                 ; +0xb6, 0x1401a2b16\nlea     rcx, [rsp+28h+arg_0]                                           ; +0xba, 0x1401a2b1a\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0xbf, 0x1401a2b1f\nmovss   xmm1, cs:dword_1408355E4                                       ; +0xc5, 0x1401a2b25\ncomiss  xmm1, xmm0                                                     ; +0xcd, 0x1401a2b2d\njbe     short loc_1401A2BAF                                            ; +0xd0, 0x1401a2b30\nmov     eax, [rbx+74h]                                                 ; +0xd2, 0x1401a2b32\nlea     r8, [rbx+60h]                                                  ; +0xd5, 0x1401a2b35\nlea     rdx, [rsp+28h+arg_18]                                          ; +0xd9, 0x1401a2b39\nmov     [rbx+70h], eax                                                 ; +0xde, 0x1401a2b3e\nlea     rcx, [rsp+28h+arg_0]                                           ; +0xe1, 0x1401a2b41\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0xe6, 0x1401a2b46\nlea     rcx, [rbx+58h]                                                 ; +0xec, 0x1401a2b4c\nlea     rdx, [rsp+28h+arg_18]                                          ; +0xf0, 0x1401a2b50\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0xf5, 0x1401a2b55\nmov     rcx, [rbx+0C0h]                                                ; +0xfb, 0x1401a2b5b\nmov     eax, [rdi+38h]                                                 ; +0x102, 0x1401a2b62\nmov     [rbx+78h], eax                                                 ; +0x105, 0x1401a2b65\ntest    rcx, rcx                                                       ; +0x108, 0x1401a2b68\njz      short loc_1401A2B73                                            ; +0x10b, 0x1401a2b6b\nmov     rax, [rcx]                                                     ; +0x10d, 0x1401a2b6d\ncall    qword ptr [rax+8]                                              ; +0x110, 0x1401a2b70\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x113, 0x1401a2b73\nmov     rcx, rax                                                       ; +0x119, 0x1401a2b79\nlea     rdx, aGjRotationcont_0; \"GJ_rotationControlBtn02_001.png\"      ; +0x11c, 0x1401a2b7c\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x123, 0x1401a2b83\nmov     rcx, [rbx+68h]                                                 ; +0x129, 0x1401a2b89\nmov     rdx, [rcx]                                                     ; +0x12d, 0x1401a2b8d\nmov     r8, [rdx+3F0h]                                                 ; +0x130, 0x1401a2b90\nmov     rdx, rax                                                       ; +0x137, 0x1401a2b97\ncall    r8                                                             ; +0x13a, 0x1401a2b9a\nmov     al, 1                                                          ; +0x13d, 0x1401a2b9d\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x13f, 0x1401a2b9f\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x144, 0x1401a2ba4\nadd     rsp, 20h                                                       ; +0x149, 0x1401a2ba9\npop     rdi                                                            ; +0x14d, 0x1401a2bad\nretn                                                                   ; +0x14e, 0x1401a2bae\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x14f, 0x1401a2baf\nxor     al, al                                                         ; +0x154, 0x1401a2bb4\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x156, 0x1401a2bb6\nadd     rsp, 20h                                                       ; +0x15b, 0x1401a2bbb\npop     rdi                                                            ; +0x15f, 0x1401a2bbf\nretn                                                                   ; +0x160, 0x1401a2bc0", "xrefs": ["<???> @ 0x140751128", "<???> @ 0x140919958"], "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"}