{"type": "func", "start": 6442483920, "end": 6442484436, "name": "cocos2d::extension::CCControlHuePicker::initWithTargetAndPos", "pseudocode": "// \n// cocos2d::extension::CCControlHuePicker::initWithTargetAndPos from 0x1800080d0 to 0x1800082d4 (516 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x180027358\n// > <???> @ 0x180030054\n// > <???> @ 0x180030094\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b7d4\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:36 +0000\n// \n\nchar __fastcall cocos2d::extension::CCControlHuePicker::initWithTargetAndPos(\n        cocos2d::extension::CCControl *a1,\n        __int64 a2,\n        float *a3)\n{\n  __int64 v6; // rdx\n  __int64 v7; // rax\n  __int64 v8; // r14\n  __int64 v9; // r15\n  struct cocos2d::CCSprite *v10; // rax\n  cocos2d::CCObject *v11; // rbx\n  cocos2d::CCObject *v12; // rcx\n  __int64 v13; // rax\n  __int64 v14; // r14\n  __int64 v15; // r15\n  struct cocos2d::CCSprite *v16; // rax\n  cocos2d::CCObject *v17; // rbx\n  cocos2d::CCObject *v18; // rcx\n  float v19; // xmm6_4\n  __int64 v20; // rax\n  __int64 *v21; // rdi\n  __int64 v22; // rbx\n  __int64 v23; // rax\n  _BYTE v25[16]; // [rsp+20h] [rbp-38h] BYREF\n  char v26; // [rsp+78h] [rbp+20h] BYREF\n\n  if ( !cocos2d::extension::CCControl::init(a1) )\n    return 0;\n  LOBYTE(v6) = 1;\n  (*(void (__fastcall **)(cocos2d::extension::CCControl *, __int64))(*(_QWORD *)a1 + 920LL))(a1, v6);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, 0.0, 0.0);\n  v8 = v7;\n  v9 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, (const struct cocos2d::CCPoint *)a3);\n  v10 = cocos2d::CCSprite::createWithSpriteFrameName(\"huePickerBackground.png\");\n  v11 = v10;\n  if ( v10 )\n  {\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v10 + 184LL))(v10, v9);\n    (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v11 + 288LL))(v11, v8);\n    (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)a2 + 464LL))(a2, v11);\n  }\n  if ( *((cocos2d::CCObject **)a1 + 60) != v11 )\n  {\n    if ( v11 )\n      cocos2d::CCObject::retain(v11);\n    v12 = *((cocos2d::CCObject **)a1 + 60);\n    if ( v12 )\n      cocos2d::CCObject::release(v12);\n    *((_QWORD *)a1 + 60) = v11;\n  }\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, 0.5, 0.5);\n  v14 = v13;\n  v15 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, (const struct cocos2d::CCPoint *)a3);\n  v16 = cocos2d::CCSprite::createWithSpriteFrameName(\"colourPicker.png\");\n  v17 = v16;\n  if ( v16 )\n  {\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v16 + 184LL))(v16, v15);\n    (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v17 + 288LL))(v17, v14);\n    (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)a2 + 464LL))(a2, v17);\n  }\n  if ( *((cocos2d::CCObject **)a1 + 61) != v17 )\n  {\n    if ( v17 )\n      cocos2d::CCObject::retain(v17);\n    v18 = *((cocos2d::CCObject **)a1 + 61);\n    if ( v18 )\n      cocos2d::CCObject::release(v18);\n    *((_QWORD *)a1 + 61) = v17;\n  }\n  v19 = a3[1];\n  v20 = cocos2d::CCNode::boundingBox(*((_QWORD *)a1 + 60), v25);\n  v21 = *((__int64 **)a1 + 61);\n  v22 = *v21;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, *a3, (float)(*(float *)(v20 + 12) * 0.5) + v19);\n  (*(void (__fastcall **)(__int64 *, __int64))(v22 + 184))(v21, v23);\n  cocos2d::CCPoint::operator=((char *)a1 + 496, a3);\n  *((_QWORD *)a1 + 59) = 0;\n  return 1;\n}", "assembly": "; \n; cocos2d::extension::CCControlHuePicker::initWithTargetAndPos from 0x1800080d0 to 0x1800082d4 (516 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x180027358\n; > <???> @ 0x180030054\n; > <???> @ 0x180030094\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b7d4\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:36 +0000\n; \npush    rbp                                                            ; +0x0, 0x1800080d0\npush    rsi                                                            ; +0x2, 0x1800080d2\npush    rdi                                                            ; +0x3, 0x1800080d3\nsub     rsp, 40h                                                       ; +0x4, 0x1800080d4\nmov     rbp, r8                                                        ; +0x8, 0x1800080d8\nmov     rdi, rdx                                                       ; +0xb, 0x1800080db\nmov     rsi, rcx                                                       ; +0xe, 0x1800080de\ncall    ?init@CCControl@extension@cocos2d@@UEAA_NXZ; cocos2d::extension::CCControl::init(void) ; +0x11, 0x1800080e1\ntest    al, al                                                         ; +0x16, 0x1800080e6\njz      loc_1800082CA                                                  ; +0x18, 0x1800080e8\nmov     rax, [rsi]                                                     ; +0x1e, 0x1800080ee\nmov     dl, 1                                                          ; +0x21, 0x1800080f1\nmov     [rsp+58h+arg_0], rbx                                           ; +0x23, 0x1800080f3\nmov     rcx, rsi                                                       ; +0x28, 0x1800080f8\nmov     [rsp+58h+arg_8], r14                                           ; +0x2b, 0x1800080fb\nmov     [rsp+58h+arg_10], r15                                          ; +0x30, 0x180008100\nmovaps  [rsp+58h+var_28], xmm6                                         ; +0x35, 0x180008105\ncall    qword ptr [rax+398h]                                           ; +0x3a, 0x18000810a\nxorps   xmm2, xmm2                                                     ; +0x40, 0x180008110\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x43, 0x180008113\nxorps   xmm1, xmm1                                                     ; +0x48, 0x180008118\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x4b, 0x18000811b\nmov     rdx, rbp                                                       ; +0x51, 0x180008121\nlea     rcx, [rsp+58h+var_38]                                          ; +0x54, 0x180008124\nmov     r14, rax                                                       ; +0x59, 0x180008129\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x5c, 0x18000812c\nlea     rcx, aHuepickerbackg; \"huePickerBackground.png\"                ; +0x62, 0x180008132\nmov     r15, rax                                                       ; +0x69, 0x180008139\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x6c, 0x18000813c\nmov     rbx, rax                                                       ; +0x72, 0x180008142\ntest    rax, rax                                                       ; +0x75, 0x180008145\njz      short loc_180008177                                            ; +0x78, 0x180008148\nmov     rax, [rax]                                                     ; +0x7a, 0x18000814a\nmov     rdx, r15                                                       ; +0x7d, 0x18000814d\nmov     rcx, rbx                                                       ; +0x80, 0x180008150\ncall    qword ptr [rax+0B8h]                                           ; +0x83, 0x180008153\nmov     rax, [rbx]                                                     ; +0x89, 0x180008159\nmov     rdx, r14                                                       ; +0x8c, 0x18000815c\nmov     rcx, rbx                                                       ; +0x8f, 0x18000815f\ncall    qword ptr [rax+120h]                                           ; +0x92, 0x180008162\nmov     rax, [rdi]                                                     ; +0x98, 0x180008168\nmov     rdx, rbx                                                       ; +0x9b, 0x18000816b\nmov     rcx, rdi                                                       ; +0x9e, 0x18000816e\ncall    qword ptr [rax+1D0h]                                           ; +0xa1, 0x180008171\ncmp     [rsi+1E0h], rbx                                                ; +0xa7, 0x180008177\njz      short loc_1800081A7                                            ; +0xae, 0x18000817e\ntest    rbx, rbx                                                       ; +0xb0, 0x180008180\njz      short loc_18000818E                                            ; +0xb3, 0x180008183\nmov     rcx, rbx                                                       ; +0xb5, 0x180008185\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xb8, 0x180008188\nmov     rcx, [rsi+1E0h]                                                ; +0xbe, 0x18000818e\ntest    rcx, rcx                                                       ; +0xc5, 0x180008195\njz      short loc_1800081A0                                            ; +0xc8, 0x180008198\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xca, 0x18000819a\nmov     [rsi+1E0h], rbx                                                ; +0xd0, 0x1800081a0\nmovss   xmm2, cs:dword_18002BBD8                                       ; +0xd7, 0x1800081a7\nlea     rcx, [rsp+58h+arg_18]                                          ; +0xdf, 0x1800081af\nmovaps  xmm1, xmm2                                                     ; +0xe4, 0x1800081b4\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xe7, 0x1800081b7\nmov     rdx, rbp                                                       ; +0xed, 0x1800081bd\nlea     rcx, [rsp+58h+var_38]                                          ; +0xf0, 0x1800081c0\nmov     r14, rax                                                       ; +0xf5, 0x1800081c5\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xf8, 0x1800081c8\nlea     rcx, aColourpickerPn; \"colourPicker.png\"                       ; +0xfe, 0x1800081ce\nmov     r15, rax                                                       ; +0x105, 0x1800081d5\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x108, 0x1800081d8\nmov     rbx, rax                                                       ; +0x10e, 0x1800081de\ntest    rax, rax                                                       ; +0x111, 0x1800081e1\njz      short loc_180008213                                            ; +0x114, 0x1800081e4\nmov     rax, [rax]                                                     ; +0x116, 0x1800081e6\nmov     rdx, r15                                                       ; +0x119, 0x1800081e9\nmov     rcx, rbx                                                       ; +0x11c, 0x1800081ec\ncall    qword ptr [rax+0B8h]                                           ; +0x11f, 0x1800081ef\nmov     rax, [rbx]                                                     ; +0x125, 0x1800081f5\nmov     rdx, r14                                                       ; +0x128, 0x1800081f8\nmov     rcx, rbx                                                       ; +0x12b, 0x1800081fb\ncall    qword ptr [rax+120h]                                           ; +0x12e, 0x1800081fe\nmov     rax, [rdi]                                                     ; +0x134, 0x180008204\nmov     rdx, rbx                                                       ; +0x137, 0x180008207\nmov     rcx, rdi                                                       ; +0x13a, 0x18000820a\ncall    qword ptr [rax+1D0h]                                           ; +0x13d, 0x18000820d\nmov     r15, [rsp+58h+arg_10]                                          ; +0x143, 0x180008213\nmov     r14, [rsp+58h+arg_8]                                           ; +0x148, 0x180008218\ncmp     [rsi+1E8h], rbx                                                ; +0x14d, 0x18000821d\njz      short loc_18000824D                                            ; +0x154, 0x180008224\ntest    rbx, rbx                                                       ; +0x156, 0x180008226\njz      short loc_180008234                                            ; +0x159, 0x180008229\nmov     rcx, rbx                                                       ; +0x15b, 0x18000822b\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x15e, 0x18000822e\nmov     rcx, [rsi+1E8h]                                                ; +0x164, 0x180008234\ntest    rcx, rcx                                                       ; +0x16b, 0x18000823b\njz      short loc_180008246                                            ; +0x16e, 0x18000823e\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x170, 0x180008240\nmov     [rsi+1E8h], rbx                                                ; +0x176, 0x180008246\nmov     rcx, [rsi+1E0h]                                                ; +0x17d, 0x18000824d\nlea     rdx, [rsp+58h+var_38]                                          ; +0x184, 0x180008254\nmovss   xmm6, dword ptr [rbp+4]                                        ; +0x189, 0x180008259\ncall    cs:?boundingBox@CCNode@cocos2d@@QEAA?AVCCRect@2@XZ; cocos2d::CCNode::boundingBox(void) ; +0x18e, 0x18000825e\nmov     rdi, [rsi+1E8h]                                                ; +0x194, 0x180008264\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x19b, 0x18000826b\nmovss   xmm1, dword ptr [rbp+0]                                        ; +0x1a0, 0x180008270\nmovss   xmm2, dword ptr [rax+0Ch]                                      ; +0x1a5, 0x180008275\nmulss   xmm2, cs:dword_18002BBD8                                       ; +0x1aa, 0x18000827a\nmov     rbx, [rdi]                                                     ; +0x1b2, 0x180008282\naddss   xmm2, xmm6                                                     ; +0x1b5, 0x180008285\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1b9, 0x180008289\nmov     rdx, rax                                                       ; +0x1bf, 0x18000828f\nmov     rcx, rdi                                                       ; +0x1c2, 0x180008292\ncall    qword ptr [rbx+0B8h]                                           ; +0x1c5, 0x180008295\nlea     rcx, [rsi+1F0h]                                                ; +0x1cb, 0x18000829b\nmov     rdx, rbp                                                       ; +0x1d2, 0x1800082a2\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x1d5, 0x1800082a5\nmovaps  xmm6, [rsp+58h+var_28]                                         ; +0x1db, 0x1800082ab\nmov     al, 1                                                          ; +0x1e0, 0x1800082b0\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x1e2, 0x1800082b2\nmov     qword ptr [rsi+1D8h], 0                                        ; +0x1e7, 0x1800082b7\nadd     rsp, 40h                                                       ; +0x1f2, 0x1800082c2\npop     rdi                                                            ; +0x1f6, 0x1800082c6\npop     rsi                                                            ; +0x1f7, 0x1800082c7\npop     rbp                                                            ; +0x1f8, 0x1800082c8\nretn                                                                   ; +0x1f9, 0x1800082c9\nxor     al, al                                                         ; +0x1fa, 0x1800082ca\nadd     rsp, 40h                                                       ; +0x1fc, 0x1800082cc\npop     rdi                                                            ; +0x200, 0x1800082d0\npop     rsi                                                            ; +0x201, 0x1800082d1\npop     rbp                                                            ; +0x202, 0x1800082d2\nretn                                                                   ; +0x203, 0x1800082d3", "xrefs": ["<???> @ 0x180027358", "<???> @ 0x180030054", "<???> @ 0x180030094", "<???> @ 0x180032408", "<???> @ 0x18004b7d4"], "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"}