{"type": "func", "start": 6442489280, "end": 6442489617, "name": "cocos2d::extension::CCControlPotentiometer::potentiometerMoved", "pseudocode": "// \n// cocos2d::extension::CCControlPotentiometer::potentiometerMoved from 0x1800095c0 to 0x180009711 (337 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::CCControlPotentiometer::ccTouchMoved @ 0x180009457\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x1800499f0\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\ndouble __fastcall cocos2d::extension::CCControlPotentiometer::potentiometerMoved(\n        __int64 a1,\n        const struct cocos2d::CCPoint *a2)\n{\n  float *v4; // rsi\n  const struct cocos2d::CCPoint *v5; // rax\n  float *v6; // rdi\n  float *v7; // rbx\n  const struct cocos2d::CCPoint *v8; // rax\n  float *v9; // rax\n  float v10; // xmm6_4\n  float v11; // xmm2_4\n  _BYTE v13[16]; // [rsp+20h] [rbp-48h] BYREF\n  char v14; // [rsp+70h] [rbp+8h] BYREF\n  char v15; // [rsp+80h] [rbp+18h] BYREF\n  char v16; // [rsp+88h] [rbp+20h] BYREF\n\n  v4 = (float *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, (const struct cocos2d::CCPoint *)(a1 + 488));\n  v5 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 480) + 200LL))(*(_QWORD *)(a1 + 480));\n  v6 = (float *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, v5);\n  v7 = (float *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16, a2);\n  v8 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 480) + 200LL))(*(_QWORD *)(a1 + 480));\n  v9 = (float *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, v8);\n  v10 = atan2f(*v7 - *v9, v7[1] - v9[1]);\n  v11 = (float)((float)(v10 - atan2f(*v4 - *v6, v4[1] - v6[1])) * 180.0) / 3.141592653589793;\n  if ( v11 <= 180.0 )\n  {\n    if ( v11 < -180.0 )\n      v11 = v11 + 360.0;\n  }\n  else\n  {\n    v11 = v11 + -360.0;\n  }\n  cocos2d::extension::CCControlPotentiometer::setValue(\n    (cocos2d::extension::CCControlPotentiometer *)a1,\n    (float)((float)(*(float *)(a1 + 504) - *(float *)(a1 + 500)) * (float)(v11 / 360.0)) + *(float *)(a1 + 496));\n  return cocos2d::CCPoint::operator=(a1 + 488, a2);\n}", "assembly": "; \n; cocos2d::extension::CCControlPotentiometer::potentiometerMoved from 0x1800095c0 to 0x180009711 (337 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::CCControlPotentiometer::ccTouchMoved @ 0x180009457\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x1800499f0\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, 0x1800095c0\npush    rbp                                                            ; +0x5, 0x1800095c5\npush    rsi                                                            ; +0x6, 0x1800095c6\npush    rdi                                                            ; +0x7, 0x1800095c7\npush    r14                                                            ; +0x8, 0x1800095c8\npush    r15                                                            ; +0xa, 0x1800095ca\nsub     rsp, 40h                                                       ; +0xc, 0x1800095cc\nmov     r14, rdx                                                       ; +0x10, 0x1800095d0\nmovaps  [rsp+68h+var_38], xmm6                                         ; +0x13, 0x1800095d3\nlea     rdx, [rcx+1E8h]                                                ; +0x18, 0x1800095d8\nmov     rbp, rcx                                                       ; +0x1f, 0x1800095df\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x22, 0x1800095e2\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x27, 0x1800095e7\nmov     rcx, [rbp+1E0h]                                                ; +0x2d, 0x1800095ed\nmov     rsi, rax                                                       ; +0x34, 0x1800095f4\nmov     r8, [rcx]                                                      ; +0x37, 0x1800095f7\ncall    qword ptr [r8+0C8h]                                            ; +0x3a, 0x1800095fa\nmov     rdx, rax                                                       ; +0x41, 0x180009601\nlea     rcx, [rsp+68h+arg_10]                                          ; +0x44, 0x180009604\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x4c, 0x18000960c\nmov     rdx, r14                                                       ; +0x52, 0x180009612\nlea     rcx, [rsp+68h+arg_18]                                          ; +0x55, 0x180009615\nmov     rdi, rax                                                       ; +0x5d, 0x18000961d\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x60, 0x180009620\nmov     rcx, [rbp+1E0h]                                                ; +0x66, 0x180009626\nmov     rbx, rax                                                       ; +0x6d, 0x18000962d\nmov     rdx, [rcx]                                                     ; +0x70, 0x180009630\ncall    qword ptr [rdx+0C8h]                                           ; +0x73, 0x180009633\nmov     rdx, rax                                                       ; +0x79, 0x180009639\nlea     rcx, [rsp+68h+var_48]                                          ; +0x7c, 0x18000963c\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x81, 0x180009641\nmovss   xmm0, dword ptr [rbx]                                          ; +0x87, 0x180009647\nmovss   xmm1, dword ptr [rbx+4]                                        ; +0x8b, 0x18000964b\nsubss   xmm0, dword ptr [rax]; Y                                       ; +0x90, 0x180009650\nsubss   xmm1, dword ptr [rax+4]; X                                     ; +0x94, 0x180009654\ncall    atan2f                                                         ; +0x99, 0x180009659\nmovss   xmm1, dword ptr [rsi+4]                                        ; +0x9e, 0x18000965e\nmovaps  xmm6, xmm0                                                     ; +0xa3, 0x180009663\nmovss   xmm0, dword ptr [rsi]                                          ; +0xa6, 0x180009666\nsubss   xmm0, dword ptr [rdi]; Y                                       ; +0xaa, 0x18000966a\nsubss   xmm1, dword ptr [rdi+4]; X                                     ; +0xae, 0x18000966e\ncall    atan2f                                                         ; +0xb3, 0x180009673\nmovss   xmm3, cs:dword_1800295C8                                       ; +0xb8, 0x180009678\nsubss   xmm6, xmm0                                                     ; +0xc0, 0x180009680\nxorps   xmm0, xmm0                                                     ; +0xc4, 0x180009684\nmulss   xmm6, cs:dword_1800295BC                                       ; +0xc7, 0x180009687\ncvtss2sd xmm0, xmm6                                                    ; +0xcf, 0x18000968f\ndivsd   xmm0, cs:qword_180029548                                       ; +0xd3, 0x180009693\ncvtpd2ps xmm2, xmm0                                                    ; +0xdb, 0x18000969b\ncomiss  xmm2, cs:dword_1800295BC                                       ; +0xdf, 0x18000969f\njbe     short loc_1800096B2                                            ; +0xe6, 0x1800096a6\naddss   xmm2, cs:dword_1800295DC                                       ; +0xe8, 0x1800096a8\njmp     short loc_1800096C3                                            ; +0xf0, 0x1800096b0\nmovss   xmm0, cs:dword_1800295D8                                       ; +0xf2, 0x1800096b2\ncomiss  xmm0, xmm2                                                     ; +0xfa, 0x1800096ba\njbe     short loc_1800096C3                                            ; +0xfd, 0x1800096bd\naddss   xmm2, xmm3                                                     ; +0xff, 0x1800096bf\nmovss   xmm1, dword ptr [rbp+1F8h]                                     ; +0x103, 0x1800096c3\nmov     rcx, rbp; this                                                 ; +0x10b, 0x1800096cb\nsubss   xmm1, dword ptr [rbp+1F4h]                                     ; +0x10e, 0x1800096ce\ndivss   xmm2, xmm3                                                     ; +0x116, 0x1800096d6\nmulss   xmm1, xmm2                                                     ; +0x11a, 0x1800096da\naddss   xmm1, dword ptr [rbp+1F0h]; float                              ; +0x11e, 0x1800096de\ncall    ?setValue@CCControlPotentiometer@extension@cocos2d@@QEAAXM@Z; cocos2d::extension::CCControlPotentiometer::setValue(float) ; +0x126, 0x1800096e6\nmov     rdx, r14                                                       ; +0x12b, 0x1800096eb\nlea     rcx, [rbp+1E8h]                                                ; +0x12e, 0x1800096ee\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x135, 0x1800096f5\nmovaps  xmm6, [rsp+68h+var_38]                                         ; +0x13a, 0x1800096fa\nadd     rsp, 40h                                                       ; +0x13f, 0x1800096ff\npop     r15                                                            ; +0x143, 0x180009703\npop     r14                                                            ; +0x145, 0x180009705\npop     rdi                                                            ; +0x147, 0x180009707\npop     rsi                                                            ; +0x148, 0x180009708\npop     rbp                                                            ; +0x149, 0x180009709\njmp     cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x14a, 0x18000970a", "xrefs": ["cocos2d::extension::CCControlPotentiometer::ccTouchMoved @ 0x180009457", "<???> @ 0x18002fdf8", "<???> @ 0x1800499f0"], "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"}