{"type": "func", "start": 6442487920, "end": 6442488257, "name": "cocos2d::extension::CCControlPotentiometer::potentiometerMoved", "pseudocode": "// \n// cocos2d::extension::CCControlPotentiometer::potentiometerMoved from 0x180009070 to 0x1800091c1 (337 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::CCControlPotentiometer::ccTouchMoved @ 0x180008f07\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b924\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 12:15:37 +0000\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 0x180009070 to 0x1800091c1 (337 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::CCControlPotentiometer::ccTouchMoved @ 0x180008f07\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b924\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 12:15:37 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180009070\npush    rbp                                                            ; +0x5, 0x180009075\npush    rsi                                                            ; +0x6, 0x180009076\npush    rdi                                                            ; +0x7, 0x180009077\npush    r14                                                            ; +0x8, 0x180009078\npush    r15                                                            ; +0xa, 0x18000907a\nsub     rsp, 40h                                                       ; +0xc, 0x18000907c\nmov     r14, rdx                                                       ; +0x10, 0x180009080\nmovaps  [rsp+68h+var_38], xmm6                                         ; +0x13, 0x180009083\nlea     rdx, [rcx+1E8h]                                                ; +0x18, 0x180009088\nmov     rbp, rcx                                                       ; +0x1f, 0x18000908f\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x22, 0x180009092\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x27, 0x180009097\nmov     rcx, [rbp+1E0h]                                                ; +0x2d, 0x18000909d\nmov     rsi, rax                                                       ; +0x34, 0x1800090a4\nmov     r8, [rcx]                                                      ; +0x37, 0x1800090a7\ncall    qword ptr [r8+0C8h]                                            ; +0x3a, 0x1800090aa\nmov     rdx, rax                                                       ; +0x41, 0x1800090b1\nlea     rcx, [rsp+68h+arg_10]                                          ; +0x44, 0x1800090b4\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x4c, 0x1800090bc\nmov     rdx, r14                                                       ; +0x52, 0x1800090c2\nlea     rcx, [rsp+68h+arg_18]                                          ; +0x55, 0x1800090c5\nmov     rdi, rax                                                       ; +0x5d, 0x1800090cd\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x60, 0x1800090d0\nmov     rcx, [rbp+1E0h]                                                ; +0x66, 0x1800090d6\nmov     rbx, rax                                                       ; +0x6d, 0x1800090dd\nmov     rdx, [rcx]                                                     ; +0x70, 0x1800090e0\ncall    qword ptr [rdx+0C8h]                                           ; +0x73, 0x1800090e3\nmov     rdx, rax                                                       ; +0x79, 0x1800090e9\nlea     rcx, [rsp+68h+var_48]                                          ; +0x7c, 0x1800090ec\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x81, 0x1800090f1\nmovss   xmm0, dword ptr [rbx]                                          ; +0x87, 0x1800090f7\nmovss   xmm1, dword ptr [rbx+4]                                        ; +0x8b, 0x1800090fb\nsubss   xmm0, dword ptr [rax]; Y                                       ; +0x90, 0x180009100\nsubss   xmm1, dword ptr [rax+4]; X                                     ; +0x94, 0x180009104\ncall    atan2f                                                         ; +0x99, 0x180009109\nmovss   xmm1, dword ptr [rsi+4]                                        ; +0x9e, 0x18000910e\nmovaps  xmm6, xmm0                                                     ; +0xa3, 0x180009113\nmovss   xmm0, dword ptr [rsi]                                          ; +0xa6, 0x180009116\nsubss   xmm0, dword ptr [rdi]; Y                                       ; +0xaa, 0x18000911a\nsubss   xmm1, dword ptr [rdi+4]; X                                     ; +0xae, 0x18000911e\ncall    atan2f                                                         ; +0xb3, 0x180009123\nmovss   xmm3, cs:dword_18002BC90                                       ; +0xb8, 0x180009128\nsubss   xmm6, xmm0                                                     ; +0xc0, 0x180009130\nxorps   xmm0, xmm0                                                     ; +0xc4, 0x180009134\nmulss   xmm6, cs:dword_18002BC84                                       ; +0xc7, 0x180009137\ncvtss2sd xmm0, xmm6                                                    ; +0xcf, 0x18000913f\ndivsd   xmm0, cs:qword_18002BC10                                       ; +0xd3, 0x180009143\ncvtpd2ps xmm2, xmm0                                                    ; +0xdb, 0x18000914b\ncomiss  xmm2, cs:dword_18002BC84                                       ; +0xdf, 0x18000914f\njbe     short loc_180009162                                            ; +0xe6, 0x180009156\naddss   xmm2, cs:dword_18002BCA4                                       ; +0xe8, 0x180009158\njmp     short loc_180009173                                            ; +0xf0, 0x180009160\nmovss   xmm0, cs:dword_18002BCA0                                       ; +0xf2, 0x180009162\ncomiss  xmm0, xmm2                                                     ; +0xfa, 0x18000916a\njbe     short loc_180009173                                            ; +0xfd, 0x18000916d\naddss   xmm2, xmm3                                                     ; +0xff, 0x18000916f\nmovss   xmm1, dword ptr [rbp+1F8h]                                     ; +0x103, 0x180009173\nmov     rcx, rbp; this                                                 ; +0x10b, 0x18000917b\nsubss   xmm1, dword ptr [rbp+1F4h]                                     ; +0x10e, 0x18000917e\ndivss   xmm2, xmm3                                                     ; +0x116, 0x180009186\nmulss   xmm1, xmm2                                                     ; +0x11a, 0x18000918a\naddss   xmm1, dword ptr [rbp+1F0h]; float                              ; +0x11e, 0x18000918e\ncall    ?setValue@CCControlPotentiometer@extension@cocos2d@@QEAAXM@Z; cocos2d::extension::CCControlPotentiometer::setValue(float) ; +0x126, 0x180009196\nmov     rdx, r14                                                       ; +0x12b, 0x18000919b\nlea     rcx, [rbp+1E8h]                                                ; +0x12e, 0x18000919e\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x135, 0x1800091a5\nmovaps  xmm6, [rsp+68h+var_38]                                         ; +0x13a, 0x1800091aa\nadd     rsp, 40h                                                       ; +0x13f, 0x1800091af\npop     r15                                                            ; +0x143, 0x1800091b3\npop     r14                                                            ; +0x145, 0x1800091b5\npop     rdi                                                            ; +0x147, 0x1800091b7\npop     rsi                                                            ; +0x148, 0x1800091b8\npop     rbp                                                            ; +0x149, 0x1800091b9\njmp     cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x14a, 0x1800091ba", "xrefs": ["cocos2d::extension::CCControlPotentiometer::ccTouchMoved @ 0x180008f07", "<???> @ 0x180032408", "<???> @ 0x18004b924"], "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"}