{"type": "func", "start": 4295304752, "end": 4295305192, "name": "GJScaleControl::ccTouchBegan", "pseudocode": "// \n// GJScaleControl::ccTouchBegan from 0x100052630 to 0x1000527e8 (440 bytes)\n// \n// 2 xrefs:\n// > sub_1000527F0 @ 0x1000527fc\n// > <???> @ 0x1008b1888\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\nbool __fastcall GJScaleControl::ccTouchBegan(GJScaleControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  double v6; // xmm0_8\n  cocos2d::CCString *v7; // rax\n  GJScaleControlDelegate *m_delegate; // rdi\n  ScaleButtonType v9; // r14\n  cocos2d::CCString *v10; // rax\n  char v11; // [rsp-48h] [rbp-48h]\n  __int64 v12; // [rsp-40h] [rbp-40h] BYREF\n  __int64 v13; // [rsp-38h] [rbp-38h] BYREF\n\n  if ( a1->m_touchID != -1 )\n    return 0;\n  cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)&v12);\n  cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v13, (const cocos2d::CCPoint *)a1);\n  v6 = sub_10028CC90();\n  if ( ((unsigned __int8 (__fastcall *)(Slider *, cocos2d::CCTouch *, cocos2d::CCEvent *, double))a1->m_sliderX->ccTouchBegan)(\n         a1->m_sliderX,\n         a2,\n         a3,\n         v6) )\n  {\n    a1->m_touchID = a2->m_nId;\n    Slider::getValue(a1->m_sliderX);\n    v7 = (cocos2d::CCString *)sub_1007AB580(\"%.02f\", v11);\n    a1->m_valueX = cocos2d::CCString::floatValue(v7);\n    m_delegate = a1->m_delegate;\n    v9 = X;\n    if ( !m_delegate )\n      goto LABEL_9;\n    goto LABEL_8;\n  }\n  if ( ((unsigned __int8 (__fastcall *)(Slider *, cocos2d::CCTouch *, cocos2d::CCEvent *))a1->m_sliderY->ccTouchBegan)(\n         a1->m_sliderY,\n         a2,\n         a3) )\n  {\n    a1->m_touchID = a2->m_nId;\n    Slider::getValue(a1->m_sliderY);\n    v10 = (cocos2d::CCString *)sub_1007AB580(\"%.02f\", v11);\n    a1->m_valueY = cocos2d::CCString::floatValue(v10);\n    m_delegate = a1->m_delegate;\n    v9 = Y;\n    if ( !m_delegate )\n    {\nLABEL_9:\n      a1->m_scaleButtonType = v9;\n      return 1;\n    }\nLABEL_8:\n    ((void (__fastcall *)(GJScaleControlDelegate *))m_delegate->scaleChangeBegin)(m_delegate);\n    goto LABEL_9;\n  }\n  if ( ((unsigned __int8 (__fastcall *)(Slider *, cocos2d::CCTouch *, cocos2d::CCEvent *))a1->m_sliderXY->ccTouchBegan)(\n         a1->m_sliderXY,\n         a2,\n         a3) )\n  {\n    a1->m_touchID = a2->m_nId;\n    m_delegate = a1->m_delegate;\n    v9 = XY;\n    if ( !m_delegate )\n      goto LABEL_9;\n    goto LABEL_8;\n  }\n  return 0;\n}", "assembly": "; \n; GJScaleControl::ccTouchBegan from 0x100052630 to 0x1000527e8 (440 bytes)\n; \n; 2 xrefs:\n; > sub_1000527F0 @ 0x1000527fc\n; > <???> @ 0x1008b1888\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\ncmp     dword ptr [rdi+1B0h], 0FFFFFFFFh                               ; +0x0, 0x100052630\njz      short loc_10005263C                                            ; +0x7, 0x100052637\nxor     eax, eax                                                       ; +0x9, 0x100052639\nretn                                                                   ; +0xb, 0x10005263b\npush    rbp                                                            ; +0xc, 0x10005263c\nmov     rbp, rsp                                                       ; +0xd, 0x10005263d\npush    r15                                                            ; +0x10, 0x100052640\npush    r14                                                            ; +0x12, 0x100052642\npush    r13                                                            ; +0x14, 0x100052644\npush    r12                                                            ; +0x16, 0x100052646\npush    rbx                                                            ; +0x18, 0x100052648\nsub     rsp, 18h                                                       ; +0x19, 0x100052649\nmov     r15, rdx                                                       ; +0x1d, 0x10005264d\nmov     r14, rsi                                                       ; +0x20, 0x100052650\nmov     rbx, rdi                                                       ; +0x23, 0x100052653\nlea     r12, [rbp-38h]                                                 ; +0x26, 0x100052656\nmov     rdi, r12                                                       ; +0x2a, 0x10005265a\ncall    cocos2d__CCTouch__getLocation                                  ; +0x2d, 0x10005265d\nlea     r13, [rbp-30h]                                                 ; +0x32, 0x100052662\nmov     rdi, r13                                                       ; +0x36, 0x100052666\nmov     rsi, rbx                                                       ; +0x39, 0x100052669\nmov     rdx, r12                                                       ; +0x3c, 0x10005266c\ncall    cocos2d__CCNode__convertToNodeSpace                            ; +0x3f, 0x10005266f\nmov     rdi, r12                                                       ; +0x44, 0x100052674\nmov     rsi, r13                                                       ; +0x47, 0x100052677\ncall    sub_10028CC90                                                  ; +0x4a, 0x10005267a\nmov     rdi, [rbx+198h]                                                ; +0x4f, 0x10005267f\nmov     rax, [rdi]                                                     ; +0x56, 0x100052686\nmov     rsi, r14                                                       ; +0x59, 0x100052689\nmov     rdx, r15                                                       ; +0x5c, 0x10005268c\ncall    qword ptr [rax+370h]                                           ; +0x5f, 0x10005268f\ntest    al, al                                                         ; +0x65, 0x100052695\njz      short loc_100052708                                            ; +0x67, 0x100052697\nmov     eax, [r14+38h]                                                 ; +0x69, 0x100052699\nmov     [rbx+1B0h], eax                                                ; +0x6d, 0x10005269d\nmov     rdi, [rbx+198h]                                                ; +0x73, 0x1000526a3\ncall    Slider__getValue                                               ; +0x7a, 0x1000526aa\nmovss   xmm1, dword ptr [rbx+1F0h]                                     ; +0x7f, 0x1000526af\nmovss   xmm2, dword ptr [rbx+1F4h]                                     ; +0x87, 0x1000526b7\nsubss   xmm1, xmm2                                                     ; +0x8f, 0x1000526bf\nmulss   xmm1, xmm0                                                     ; +0x93, 0x1000526c3\naddss   xmm1, xmm2                                                     ; +0x97, 0x1000526c7\nxorps   xmm0, xmm0                                                     ; +0x9b, 0x1000526cb\ncvtss2sd xmm0, xmm1                                                    ; +0x9e, 0x1000526ce\nlea     rdi, a02f; \"%.02f\"                                             ; +0xa2, 0x1000526d2\nmov     al, 1                                                          ; +0xa9, 0x1000526d9\ncall    sub_1007AB580                                                  ; +0xab, 0x1000526db\nmov     rdi, rax                                                       ; +0xb0, 0x1000526e0\ncall    cocos2d__CCString__floatValue                                  ; +0xb3, 0x1000526e3\nmovss   dword ptr [rbx+1B4h], xmm0                                     ; +0xb8, 0x1000526e8\nmov     rdi, [rbx+1E8h]                                                ; +0xc0, 0x1000526f0\nxor     r14d, r14d                                                     ; +0xc7, 0x1000526f7\ntest    rdi, rdi                                                       ; +0xca, 0x1000526fa\njnz     loc_10005278E                                                  ; +0xcd, 0x1000526fd\njmp     loc_100052794                                                  ; +0xd3, 0x100052703\nmov     rdi, [rbx+1A0h]                                                ; +0xd8, 0x100052708\nmov     rax, [rdi]                                                     ; +0xdf, 0x10005270f\nmov     rsi, r14                                                       ; +0xe2, 0x100052712\nmov     rdx, r15                                                       ; +0xe5, 0x100052715\ncall    qword ptr [rax+370h]                                           ; +0xe8, 0x100052718\ntest    al, al                                                         ; +0xee, 0x10005271e\njz      loc_1000527AD                                                  ; +0xf0, 0x100052720\nmov     eax, [r14+38h]                                                 ; +0xf6, 0x100052726\nmov     [rbx+1B0h], eax                                                ; +0xfa, 0x10005272a\nmov     rdi, [rbx+1A0h]                                                ; +0x100, 0x100052730\ncall    Slider__getValue                                               ; +0x107, 0x100052737\nmovss   xmm1, dword ptr [rbx+1F0h]                                     ; +0x10c, 0x10005273c\nmovss   xmm2, dword ptr [rbx+1F4h]                                     ; +0x114, 0x100052744\nsubss   xmm1, xmm2                                                     ; +0x11c, 0x10005274c\nmulss   xmm1, xmm0                                                     ; +0x120, 0x100052750\naddss   xmm1, xmm2                                                     ; +0x124, 0x100052754\nxorps   xmm0, xmm0                                                     ; +0x128, 0x100052758\ncvtss2sd xmm0, xmm1                                                    ; +0x12b, 0x10005275b\nlea     rdi, a02f; \"%.02f\"                                             ; +0x12f, 0x10005275f\nmov     al, 1                                                          ; +0x136, 0x100052766\ncall    sub_1007AB580                                                  ; +0x138, 0x100052768\nmov     rdi, rax                                                       ; +0x13d, 0x10005276d\ncall    cocos2d__CCString__floatValue                                  ; +0x140, 0x100052770\nmovss   dword ptr [rbx+1B8h], xmm0                                     ; +0x145, 0x100052775\nmov     rdi, [rbx+1E8h]                                                ; +0x14d, 0x10005277d\nmov     r14w, 1                                                        ; +0x154, 0x100052784\ntest    rdi, rdi                                                       ; +0x159, 0x100052789\njz      short loc_100052794                                            ; +0x15c, 0x10005278c\nmov     rax, [rdi]                                                     ; +0x15e, 0x10005278e\ncall    qword ptr [rax+18h]                                            ; +0x161, 0x100052791\nmov     [rbx+1CAh], r14w                                               ; +0x164, 0x100052794\nmov     al, 1                                                          ; +0x16c, 0x10005279c\nadd     rsp, 18h                                                       ; +0x16e, 0x10005279e\npop     rbx                                                            ; +0x172, 0x1000527a2\npop     r12                                                            ; +0x173, 0x1000527a3\npop     r13                                                            ; +0x175, 0x1000527a5\npop     r14                                                            ; +0x177, 0x1000527a7\npop     r15                                                            ; +0x179, 0x1000527a9\npop     rbp                                                            ; +0x17b, 0x1000527ab\nretn                                                                   ; +0x17c, 0x1000527ac\nmov     rdi, [rbx+1A8h]                                                ; +0x17d, 0x1000527ad\nmov     rax, [rdi]                                                     ; +0x184, 0x1000527b4\nmov     rsi, r14                                                       ; +0x187, 0x1000527b7\nmov     rdx, r15                                                       ; +0x18a, 0x1000527ba\ncall    qword ptr [rax+370h]                                           ; +0x18d, 0x1000527bd\ntest    al, al                                                         ; +0x193, 0x1000527c3\njz      short loc_1000527E4                                            ; +0x195, 0x1000527c5\nmov     eax, [r14+38h]                                                 ; +0x197, 0x1000527c7\nmov     [rbx+1B0h], eax                                                ; +0x19b, 0x1000527cb\nmov     rdi, [rbx+1E8h]                                                ; +0x1a1, 0x1000527d1\nmov     r14w, 2                                                        ; +0x1a8, 0x1000527d8\ntest    rdi, rdi                                                       ; +0x1ad, 0x1000527dd\njnz     short loc_10005278E                                            ; +0x1b0, 0x1000527e0\njmp     short loc_100052794                                            ; +0x1b2, 0x1000527e2\nxor     eax, eax                                                       ; +0x1b4, 0x1000527e4\njmp     short loc_10005279E                                            ; +0x1b6, 0x1000527e6", "xrefs": ["sub_1000527F0 @ 0x1000527fc", "<???> @ 0x1008b1888"], "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"}