{"type": "func", "start": 5369931104, "end": 5369931621, "name": "GJScaleControl::ccTouchBegan", "pseudocode": "// \n// GJScaleControl::ccTouchBegan from 0x14012a560 to 0x14012a765 (517 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140552be0\n// > <???> @ 0x1406c9b04\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 GJScaleControl::ccTouchBegan(GJScaleControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  struct cocos2d::CCPoint v6; // rax\n  float Value; // xmm0_4\n  cocos2d::CCString *v8; // rax\n  float v9; // xmm0_4\n  __int64 v10; // rcx\n  float v12; // xmm0_4\n  cocos2d::CCString *v13; // rax\n  float v14; // xmm0_4\n  __int64 v15; // rcx\n  __int64 v16; // rcx\n  char v17; // [rsp+30h] [rbp+8h] BYREF\n  struct cocos2d::CCPoint v18; // [rsp+48h] [rbp+20h] BYREF\n\n  if ( LODWORD(a1->m_obContentSize.height) != -1 )\n    return 0;\n  cocos2d::CCTouch::getLocation(a2);\n  v6 = cocos2d::CCNode::convertToNodeSpace((GJScaleControl *)((char *)a1 - 320), &v18);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v17, v6);\n  if ( (*(unsigned __int8 (__fastcall **)(__int64, cocos2d::CCTouch *, cocos2d::CCEvent *))(*(_QWORD *)(*(_QWORD *)&a1->m_fSkewY + 320LL)\n                                                                                          + 8LL))(\n         *(_QWORD *)&a1->m_fSkewY + 320LL,\n         a2,\n         a3) )\n  {\n    LODWORD(a1->m_obContentSize.height) = a2->m_nId;\n    Value = SliderThumb::getValue(*(SliderThumb **)(*(_QWORD *)(*(_QWORD *)&a1->m_fSkewY + 408LL) + 456LL));\n    v8 = cocos2d::CCString::createWithFormat(\n           \"%.02f\",\n           (float)((float)((float)(a1->m_sInverse.d - a1->m_sInverse.tx) * Value) + a1->m_sInverse.tx));\n    v9 = cocos2d::CCString::floatValue(v8);\n    v10 = *(_QWORD *)&a1->m_sInverse.b;\n    a1->m_sAdditionalTransform.a = v9;\n    if ( v10 )\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 24LL))(v10);\n    HIWORD(a1->m_sAdditionalTransform.ty) = 0;\n    return 1;\n  }\n  if ( (*(unsigned __int8 (__fastcall **)(__int64, cocos2d::CCTouch *, cocos2d::CCEvent *))(*(_QWORD *)(*(_QWORD *)&a1->m_obAnchorPointInPoints.y + 320LL)\n                                                                                          + 8LL))(\n         *(_QWORD *)&a1->m_obAnchorPointInPoints.y + 320LL,\n         a2,\n         a3) )\n  {\n    LODWORD(a1->m_obContentSize.height) = a2->m_nId;\n    v12 = SliderThumb::getValue(*(SliderThumb **)(*(_QWORD *)(*(_QWORD *)&a1->m_obAnchorPointInPoints.y + 408LL) + 456LL));\n    v13 = cocos2d::CCString::createWithFormat(\n            \"%.02f\",\n            (float)((float)((float)(a1->m_sInverse.d - a1->m_sInverse.tx) * v12) + a1->m_sInverse.tx));\n    v14 = cocos2d::CCString::floatValue(v13);\n    v15 = *(_QWORD *)&a1->m_sInverse.b;\n    a1->m_sAdditionalTransform.b = v14;\n    if ( v15 )\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v15 + 24LL))(v15);\n    HIWORD(a1->m_sAdditionalTransform.ty) = 1;\n    return 1;\n  }\n  if ( !(*(unsigned __int8 (__fastcall **)(__int64, cocos2d::CCTouch *, cocos2d::CCEvent *))(*(_QWORD *)(*(_QWORD *)&a1->m_obAnchorPoint.y + 320LL)\n                                                                                           + 8LL))(\n          *(_QWORD *)&a1->m_obAnchorPoint.y + 320LL,\n          a2,\n          a3) )\n    return 0;\n  v16 = *(_QWORD *)&a1->m_sInverse.b;\n  LODWORD(a1->m_obContentSize.height) = a2->m_nId;\n  if ( v16 )\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v16 + 24LL))(v16);\n  HIWORD(a1->m_sAdditionalTransform.ty) = 2;\n  return 1;\n}", "assembly": "; \n; GJScaleControl::ccTouchBegan from 0x14012a560 to 0x14012a765 (517 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140552be0\n; > <???> @ 0x1406c9b04\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, 0x14012a560\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x14012a565\npush    rdi                                                            ; +0xa, 0x14012a56a\nsub     rsp, 20h                                                       ; +0xb, 0x14012a56b\ncmp     dword ptr [rcx+70h], 0FFFFFFFFh                                ; +0xf, 0x14012a56f\nmov     rsi, r8                                                        ; +0x13, 0x14012a573\nmov     rdi, rdx                                                       ; +0x16, 0x14012a576\nmov     rbx, rcx                                                       ; +0x19, 0x14012a579\njnz     loc_14012A753                                                  ; +0x1c, 0x14012a57c\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x22, 0x14012a582\nmov     rcx, rdi                                                       ; +0x27, 0x14012a587\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x2a, 0x14012a58a\nlea     rcx, [rbx-140h]                                                ; +0x30, 0x14012a590\nlea     r8, [rsp+28h+arg_0]                                            ; +0x37, 0x14012a597\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x3c, 0x14012a59c\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x41, 0x14012a5a1\nmov     rdx, rax                                                       ; +0x47, 0x14012a5a7\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x4a, 0x14012a5aa\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x4f, 0x14012a5af\nmov     rcx, [rbx+58h]                                                 ; +0x55, 0x14012a5b5\nmov     r8, rsi                                                        ; +0x59, 0x14012a5b9\nadd     rcx, 140h                                                      ; +0x5c, 0x14012a5bc\nmov     rdx, rdi                                                       ; +0x63, 0x14012a5c3\nmov     rax, [rcx]                                                     ; +0x66, 0x14012a5c6\ncall    qword ptr [rax+8]                                              ; +0x69, 0x14012a5c9\ntest    al, al                                                         ; +0x6c, 0x14012a5cc\njz      loc_14012A65D                                                  ; +0x6e, 0x14012a5ce\nmov     eax, [rdi+38h]                                                 ; +0x74, 0x14012a5d4\nmov     [rbx+70h], eax                                                 ; +0x77, 0x14012a5d7\nmov     rax, [rbx+58h]                                                 ; +0x7a, 0x14012a5da\nmov     rcx, [rax+198h]                                                ; +0x7e, 0x14012a5de\nmov     rcx, [rcx+1C8h]                                                ; +0x85, 0x14012a5e5\ncall    SliderThumb__getValue                                          ; +0x8c, 0x14012a5ec\nmovss   xmm1, dword ptr [rbx+0B4h]                                     ; +0x91, 0x14012a5f1\nlea     rcx, a02f; \"%.02f\"                                             ; +0x99, 0x14012a5f9\nmovss   xmm2, dword ptr [rbx+0B0h]                                     ; +0xa0, 0x14012a600\nsubss   xmm2, xmm1                                                     ; +0xa8, 0x14012a608\nmulss   xmm2, xmm0                                                     ; +0xac, 0x14012a60c\naddss   xmm2, xmm1                                                     ; +0xb0, 0x14012a610\ncvtps2pd xmm1, xmm2                                                    ; +0xb4, 0x14012a614\nmovq    rdx, xmm1                                                      ; +0xb7, 0x14012a617\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xbc, 0x14012a61c\nmov     rcx, rax                                                       ; +0xc2, 0x14012a622\ncall    cs:?floatValue@CCString@cocos2d@@QEBAMXZ; cocos2d::CCString::floatValue(void) ; +0xc5, 0x14012a625\nmov     rcx, [rbx+0A8h]                                                ; +0xcb, 0x14012a62b\nmovss   dword ptr [rbx+74h], xmm0                                      ; +0xd2, 0x14012a632\ntest    rcx, rcx                                                       ; +0xd7, 0x14012a637\njz      short loc_14012A642                                            ; +0xda, 0x14012a63a\nmov     rax, [rcx]                                                     ; +0xdc, 0x14012a63c\ncall    qword ptr [rax+18h]                                            ; +0xdf, 0x14012a63f\nxor     eax, eax                                                       ; +0xe2, 0x14012a642\nmov     [rbx+8Ah], ax                                                  ; +0xe4, 0x14012a644\nmov     al, 1                                                          ; +0xeb, 0x14012a64b\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xed, 0x14012a64d\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xf2, 0x14012a652\nadd     rsp, 20h                                                       ; +0xf7, 0x14012a657\npop     rdi                                                            ; +0xfb, 0x14012a65b\nretn                                                                   ; +0xfc, 0x14012a65c\nmov     rcx, [rbx+60h]                                                 ; +0xfd, 0x14012a65d\nmov     r8, rsi                                                        ; +0x101, 0x14012a661\nadd     rcx, 140h                                                      ; +0x104, 0x14012a664\nmov     rdx, rdi                                                       ; +0x10b, 0x14012a66b\nmov     rax, [rcx]                                                     ; +0x10e, 0x14012a66e\ncall    qword ptr [rax+8]                                              ; +0x111, 0x14012a671\ntest    al, al                                                         ; +0x114, 0x14012a674\njz      loc_14012A705                                                  ; +0x116, 0x14012a676\nmov     eax, [rdi+38h]                                                 ; +0x11c, 0x14012a67c\nmov     [rbx+70h], eax                                                 ; +0x11f, 0x14012a67f\nmov     rax, [rbx+60h]                                                 ; +0x122, 0x14012a682\nmov     rcx, [rax+198h]                                                ; +0x126, 0x14012a686\nmov     rcx, [rcx+1C8h]                                                ; +0x12d, 0x14012a68d\ncall    SliderThumb__getValue                                          ; +0x134, 0x14012a694\nmovss   xmm1, dword ptr [rbx+0B4h]                                     ; +0x139, 0x14012a699\nlea     rcx, a02f; \"%.02f\"                                             ; +0x141, 0x14012a6a1\nmovss   xmm2, dword ptr [rbx+0B0h]                                     ; +0x148, 0x14012a6a8\nsubss   xmm2, xmm1                                                     ; +0x150, 0x14012a6b0\nmulss   xmm2, xmm0                                                     ; +0x154, 0x14012a6b4\naddss   xmm2, xmm1                                                     ; +0x158, 0x14012a6b8\ncvtps2pd xmm1, xmm2                                                    ; +0x15c, 0x14012a6bc\nmovq    rdx, xmm1                                                      ; +0x15f, 0x14012a6bf\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x164, 0x14012a6c4\nmov     rcx, rax                                                       ; +0x16a, 0x14012a6ca\ncall    cs:?floatValue@CCString@cocos2d@@QEBAMXZ; cocos2d::CCString::floatValue(void) ; +0x16d, 0x14012a6cd\nmov     rcx, [rbx+0A8h]                                                ; +0x173, 0x14012a6d3\nmovss   dword ptr [rbx+78h], xmm0                                      ; +0x17a, 0x14012a6da\ntest    rcx, rcx                                                       ; +0x17f, 0x14012a6df\njz      short loc_14012A6EA                                            ; +0x182, 0x14012a6e2\nmov     rax, [rcx]                                                     ; +0x184, 0x14012a6e4\ncall    qword ptr [rax+18h]                                            ; +0x187, 0x14012a6e7\nmov     word ptr [rbx+8Ah], 1                                          ; +0x18a, 0x14012a6ea\nmov     al, 1                                                          ; +0x193, 0x14012a6f3\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x195, 0x14012a6f5\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x19a, 0x14012a6fa\nadd     rsp, 20h                                                       ; +0x19f, 0x14012a6ff\npop     rdi                                                            ; +0x1a3, 0x14012a703\nretn                                                                   ; +0x1a4, 0x14012a704\nmov     rcx, [rbx+68h]                                                 ; +0x1a5, 0x14012a705\nmov     r8, rsi                                                        ; +0x1a9, 0x14012a709\nadd     rcx, 140h                                                      ; +0x1ac, 0x14012a70c\nmov     rdx, rdi                                                       ; +0x1b3, 0x14012a713\nmov     rax, [rcx]                                                     ; +0x1b6, 0x14012a716\ncall    qword ptr [rax+8]                                              ; +0x1b9, 0x14012a719\ntest    al, al                                                         ; +0x1bc, 0x14012a71c\njz      short loc_14012A753                                            ; +0x1be, 0x14012a71e\nmov     rcx, [rbx+0A8h]                                                ; +0x1c0, 0x14012a720\nmov     eax, [rdi+38h]                                                 ; +0x1c7, 0x14012a727\nmov     [rbx+70h], eax                                                 ; +0x1ca, 0x14012a72a\ntest    rcx, rcx                                                       ; +0x1cd, 0x14012a72d\njz      short loc_14012A738                                            ; +0x1d0, 0x14012a730\nmov     rax, [rcx]                                                     ; +0x1d2, 0x14012a732\ncall    qword ptr [rax+18h]                                            ; +0x1d5, 0x14012a735\nmov     word ptr [rbx+8Ah], 2                                          ; +0x1d8, 0x14012a738\nmov     al, 1                                                          ; +0x1e1, 0x14012a741\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1e3, 0x14012a743\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x1e8, 0x14012a748\nadd     rsp, 20h                                                       ; +0x1ed, 0x14012a74d\npop     rdi                                                            ; +0x1f1, 0x14012a751\nretn                                                                   ; +0x1f2, 0x14012a752\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1f3, 0x14012a753\nxor     al, al                                                         ; +0x1f8, 0x14012a758\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x1fa, 0x14012a75a\nadd     rsp, 20h                                                       ; +0x1ff, 0x14012a75f\npop     rdi                                                            ; +0x203, 0x14012a763\nretn                                                                   ; +0x204, 0x14012a764", "xrefs": ["<???> @ 0x140552be0", "<???> @ 0x1406c9b04"], "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"}