{"type": "func", "start": 6442504176, "end": 6442504421, "name": "cocos2d::extension::CCControlSwitch::ccTouchBegan", "pseudocode": "// \n// cocos2d::extension::CCControlSwitch::ccTouchBegan from 0x18000cff0 to 0x18000d0e5 (245 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x180026650\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049dc8\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\nchar __fastcall cocos2d::extension::CCControlSwitch::ccTouchBegan(\n        cocos2d::extension::CCControlSwitch *this,\n        struct cocos2d::CCTouch *a2,\n        struct cocos2d::CCEvent *a3)\n{\n  char *v3; // rbx\n  __int64 v6; // rax\n  __int64 v7; // rax\n  float v9; // [rsp+30h] [rbp+8h] BYREF\n  char v10; // [rsp+48h] [rbp+20h] BYREF\n\n  v3 = (char *)this - 320;\n  if ( !(*(unsigned __int8 (__fastcall **)(char *, struct cocos2d::CCTouch *, struct cocos2d::CCEvent *))(*((_QWORD *)this - 40) + 1104LL))(\n          (char *)this - 320,\n          a2,\n          a3)\n    || !(*(unsigned __int8 (__fastcall **)(char *))(*(_QWORD *)v3 + 1024LL))(v3)\n    || !(*(unsigned __int8 (__fastcall **)(char *))(*(_QWORD *)v3 + 328LL))(v3) )\n  {\n    return 0;\n  }\n  *((_BYTE *)this + 164) = 0;\n  cocos2d::CCTouch::getLocation(a2);\n  v6 = cocos2d::CCNode::convertToNodeSpace(v3, &v10, &v9);\n  cocos2d::CCPoint::operator=(&v9, v6);\n  v7 = *((_QWORD *)this + 19);\n  *((float *)this + 40) = v9 - *(float *)(v7 + 608);\n  (**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(v7 + 656) + 320LL))(\n    *(_QWORD *)(v7 + 656) + 320LL,\n    &unk_1800234BC);\n  sub_18000C670(*((_QWORD *)this + 19));\n  return 1;\n}", "assembly": "; \n; cocos2d::extension::CCControlSwitch::ccTouchBegan from 0x18000cff0 to 0x18000d0e5 (245 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x180026650\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049dc8\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, 0x18000cff0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18000cff5\npush    rdi                                                            ; +0xa, 0x18000cffa\nsub     rsp, 20h                                                       ; +0xb, 0x18000cffb\nlea     rbx, [rcx-140h]                                                ; +0xf, 0x18000cfff\nmov     rdi, rcx                                                       ; +0x16, 0x18000d006\nmov     rax, [rbx]                                                     ; +0x19, 0x18000d009\nmov     rcx, rbx                                                       ; +0x1c, 0x18000d00c\nmov     rsi, rdx                                                       ; +0x1f, 0x18000d00f\ncall    qword ptr [rax+450h]                                           ; +0x22, 0x18000d012\ntest    al, al                                                         ; +0x28, 0x18000d018\njz      loc_18000D0D3                                                  ; +0x2a, 0x18000d01a\nmov     rax, [rbx]                                                     ; +0x30, 0x18000d020\nmov     rcx, rbx                                                       ; +0x33, 0x18000d023\ncall    qword ptr [rax+400h]                                           ; +0x36, 0x18000d026\ntest    al, al                                                         ; +0x3c, 0x18000d02c\njz      loc_18000D0D3                                                  ; +0x3e, 0x18000d02e\nmov     rax, [rbx]                                                     ; +0x44, 0x18000d034\nmov     rcx, rbx                                                       ; +0x47, 0x18000d037\ncall    qword ptr [rax+148h]                                           ; +0x4a, 0x18000d03a\ntest    al, al                                                         ; +0x50, 0x18000d040\njz      loc_18000D0D3                                                  ; +0x52, 0x18000d042\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x58, 0x18000d048\nmov     byte ptr [rdi+0A4h], 0                                         ; +0x5d, 0x18000d04d\nmov     rcx, rsi                                                       ; +0x64, 0x18000d054\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x67, 0x18000d057\nlea     r8, [rsp+28h+arg_0]                                            ; +0x6d, 0x18000d05d\nmov     rcx, rbx                                                       ; +0x72, 0x18000d062\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x75, 0x18000d065\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x7a, 0x18000d06a\nmov     rdx, rax                                                       ; +0x80, 0x18000d070\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x83, 0x18000d073\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x88, 0x18000d078\nmov     rax, [rdi+98h]                                                 ; +0x8e, 0x18000d07e\nlea     rdx, unk_1800234BC                                             ; +0x95, 0x18000d085\nmovss   xmm0, [rsp+28h+arg_0]                                          ; +0x9c, 0x18000d08c\nsubss   xmm0, dword ptr [rax+260h]                                     ; +0xa2, 0x18000d092\nmovss   dword ptr [rdi+0A0h], xmm0                                     ; +0xaa, 0x18000d09a\nmov     rcx, [rax+290h]                                                ; +0xb2, 0x18000d0a2\nadd     rcx, 140h                                                      ; +0xb9, 0x18000d0a9\nmov     rax, [rcx]                                                     ; +0xc0, 0x18000d0b0\ncall    qword ptr [rax]                                                ; +0xc3, 0x18000d0b3\nmov     rcx, [rdi+98h]                                                 ; +0xc5, 0x18000d0b5\ncall    sub_18000C670                                                  ; +0xcc, 0x18000d0bc\nmov     al, 1                                                          ; +0xd1, 0x18000d0c1\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xd3, 0x18000d0c3\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xd8, 0x18000d0c8\nadd     rsp, 20h                                                       ; +0xdd, 0x18000d0cd\npop     rdi                                                            ; +0xe1, 0x18000d0d1\nretn                                                                   ; +0xe2, 0x18000d0d2\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xe3, 0x18000d0d3\nxor     al, al                                                         ; +0xe8, 0x18000d0d8\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xea, 0x18000d0da\nadd     rsp, 20h                                                       ; +0xef, 0x18000d0df\npop     rdi                                                            ; +0xf3, 0x18000d0e3\nretn                                                                   ; +0xf4, 0x18000d0e4", "xrefs": ["<???> @ 0x180026650", "<???> @ 0x18002fdf8", "<???> @ 0x180049dc8"], "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"}