{"type": "func", "start": 5370753280, "end": 5370753505, "name": "DpadMenu::ccTouchBegan", "pseudocode": "// \n// DpadMenu::ccTouchBegan from 0x1401f3100 to 0x1401f31e1 (225 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x140752cb8\n// > <???> @ 0x14091a9d8\n// > <???> @ 0x14091a9e4\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:28:08 +0000\n// \n\nchar __fastcall DpadMenu::ccTouchBegan(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rbx\n  __int64 Location; // rax\n  __int64 v6; // rax\n  char v8; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( !*(_DWORD *)(a1 + 116)\n    && *(_BYTE *)(a1 - 34)\n    && (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)(a1 - 320) + 1032LL))(a1 - 320) )\n  {\n    v4 = *(_QWORD *)(a1 - 104);\n    if ( v4 )\n    {\n      while ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v4 + 344LL))(v4) )\n      {\n        v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 504LL))(v4);\n        if ( !v4 )\n          goto LABEL_7;\n      }\n    }\n    else\n    {\nLABEL_7:\n      Location = cocos2d::CCTouch::getLocation(a2, &v8);\n      if ( !sub_14004A7E0(a1 - 320, Location) )\n      {\n        v6 = DpadMenu::arrowForTouch(a1 - 320, a2);\n        *(_QWORD *)(a1 + 120) = v6;\n        if ( v6 )\n        {\n          *(_DWORD *)(a1 + 116) = 1;\n          (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 896LL))(v6);\n          return 1;\n        }\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; DpadMenu::ccTouchBegan from 0x1401f3100 to 0x1401f31e1 (225 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x140752cb8\n; > <???> @ 0x14091a9d8\n; > <???> @ 0x14091a9e4\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:28:08 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401f3100\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1401f3105\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1401f310a\npush    rdi                                                            ; +0xf, 0x1401f310f\nsub     rsp, 20h                                                       ; +0x10, 0x1401f3110\ncmp     dword ptr [rcx+74h], 0                                         ; +0x14, 0x1401f3114\nmov     rbp, rdx                                                       ; +0x18, 0x1401f3118\nmov     rdi, rcx                                                       ; +0x1b, 0x1401f311b\njnz     loc_1401F31CA                                                  ; +0x1e, 0x1401f311e\ncmp     byte ptr [rcx-22h], 0                                          ; +0x24, 0x1401f3124\njz      loc_1401F31CA                                                  ; +0x28, 0x1401f3128\nmov     rax, [rcx-140h]                                                ; +0x2e, 0x1401f312e\nadd     rcx, 0FFFFFFFFFFFFFEC0h                                        ; +0x35, 0x1401f3135\ncall    qword ptr [rax+408h]                                           ; +0x3c, 0x1401f313c\ntest    al, al                                                         ; +0x42, 0x1401f3142\njz      loc_1401F31CA                                                  ; +0x44, 0x1401f3144\nmov     rbx, [rdi-68h]                                                 ; +0x4a, 0x1401f314a\ntest    rbx, rbx                                                       ; +0x4e, 0x1401f314e\njz      short loc_1401F3177                                            ; +0x51, 0x1401f3151\nmov     rax, [rbx]                                                     ; +0x53, 0x1401f3153\nmov     rcx, rbx                                                       ; +0x56, 0x1401f3156\ncall    qword ptr [rax+158h]                                           ; +0x59, 0x1401f3159\ntest    al, al                                                         ; +0x5f, 0x1401f315f\njz      short loc_1401F31CA                                            ; +0x61, 0x1401f3161\nmov     rax, [rbx]                                                     ; +0x63, 0x1401f3163\nmov     rcx, rbx                                                       ; +0x66, 0x1401f3166\ncall    qword ptr [rax+1F8h]                                           ; +0x69, 0x1401f3169\nmov     rbx, rax                                                       ; +0x6f, 0x1401f316f\ntest    rax, rax                                                       ; +0x72, 0x1401f3172\njnz     short loc_1401F3153                                            ; +0x75, 0x1401f3175\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x77, 0x1401f3177\nmov     rcx, rbp                                                       ; +0x7c, 0x1401f317c\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x7f, 0x1401f317f\nmov     rdx, rax                                                       ; +0x85, 0x1401f3185\nlea     rcx, [rdi-140h]                                                ; +0x88, 0x1401f3188\ncall    sub_14004A7E0                                                  ; +0x8f, 0x1401f318f\ntest    al, al                                                         ; +0x94, 0x1401f3194\njnz     short loc_1401F31CA                                            ; +0x96, 0x1401f3196\nmov     rdx, rbp                                                       ; +0x98, 0x1401f3198\nlea     rcx, [rdi-140h]                                                ; +0x9b, 0x1401f319b\ncall    DpadMenu__arrowForTouch                                        ; +0xa2, 0x1401f31a2\nmov     [rdi+78h], rax                                                 ; +0xa7, 0x1401f31a7\ntest    rax, rax                                                       ; +0xab, 0x1401f31ab\njz      short loc_1401F31CA                                            ; +0xae, 0x1401f31ae\nmov     dword ptr [rdi+74h], 1                                         ; +0xb0, 0x1401f31b0\nmov     rcx, [rax]                                                     ; +0xb7, 0x1401f31b7\nmov     rdx, [rcx+380h]                                                ; +0xba, 0x1401f31ba\nmov     rcx, rax                                                       ; +0xc1, 0x1401f31c1\ncall    rdx                                                            ; +0xc4, 0x1401f31c4\nmov     al, 1                                                          ; +0xc6, 0x1401f31c6\njmp     short loc_1401F31CC                                            ; +0xc8, 0x1401f31c8\nxor     al, al                                                         ; +0xca, 0x1401f31ca\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xcc, 0x1401f31cc\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xd1, 0x1401f31d1\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xd6, 0x1401f31d6\nadd     rsp, 20h                                                       ; +0xdb, 0x1401f31db\npop     rdi                                                            ; +0xdf, 0x1401f31df\nretn                                                                   ; +0xe0, 0x1401f31e0", "xrefs": ["<???> @ 0x140752cb8", "<???> @ 0x14091a9d8", "<???> @ 0x14091a9e4"], "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"}