{"type": "func", "start": 6442485280, "end": 6442485785, "name": "cocos2d::extension::CCControlHuePicker::initWithTargetAndPos", "pseudocode": "// \n// cocos2d::extension::CCControlHuePicker::initWithTargetAndPos from 0x180008620 to 0x180008819 (505 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x180024dd0\n// > <???> @ 0x18002dad8\n// > <???> @ 0x18002db10\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x1800498a0\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\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; // rax\n  cocos2d::CCObject *v19; // rcx\n  __int64 v20; // rbx\n  __int64 v21; // rax\n  __int64 v22; // rax\n  _BYTE v24[40]; // [rsp+20h] [rbp-28h] BYREF\n  char v25; // [rsp+68h] [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 + 904LL))(a1, v6);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, 0.0, 0.0);\n  v8 = v7;\n  v9 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, (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 + 272LL))(v11, v8);\n    (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)a2 + 448LL))(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 *)&v25, 0.5, 0.5);\n  v14 = v13;\n  v15 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, (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 + 272LL))(v17, v14);\n    (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)a2 + 448LL))(a2, v17);\n  }\n  v18 = *((cocos2d::CCObject **)a1 + 61);\n  if ( v18 != v17 )\n  {\n    if ( v17 )\n      cocos2d::CCObject::retain(v17);\n    v19 = *((cocos2d::CCObject **)a1 + 61);\n    if ( v19 )\n      cocos2d::CCObject::release(v19);\n    *((_QWORD *)a1 + 61) = v17;\n    v18 = v17;\n  }\n  v20 = *(_QWORD *)v18;\n  v21 = cocos2d::CCNode::boundingBox(*((_QWORD *)a1 + 60), v24);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, *a3, (float)(*(float *)(v21 + 12) * 0.5) + a3[1]);\n  (*(void (__fastcall **)(_QWORD, __int64))(v20 + 184))(*((_QWORD *)a1 + 61), v22);\n  cocos2d::CCPoint::operator=((char *)a1 + 496, a3);\n  *((_QWORD *)a1 + 59) = 0;\n  return 1;\n}", "assembly": "; \n; cocos2d::extension::CCControlHuePicker::initWithTargetAndPos from 0x180008620 to 0x180008819 (505 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x180024dd0\n; > <???> @ 0x18002dad8\n; > <???> @ 0x18002db10\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x1800498a0\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\npush    rbp                                                            ; +0x0, 0x180008620\npush    rsi                                                            ; +0x2, 0x180008622\npush    rdi                                                            ; +0x3, 0x180008623\nsub     rsp, 30h                                                       ; +0x4, 0x180008624\nmov     rbp, r8                                                        ; +0x8, 0x180008628\nmov     rsi, rdx                                                       ; +0xb, 0x18000862b\nmov     rdi, rcx                                                       ; +0xe, 0x18000862e\ncall    ?init@CCControl@extension@cocos2d@@UEAA_NXZ; cocos2d::extension::CCControl::init(void) ; +0x11, 0x180008631\ntest    al, al                                                         ; +0x16, 0x180008636\njz      loc_18000880F                                                  ; +0x18, 0x180008638\nmov     rax, [rdi]                                                     ; +0x1e, 0x18000863e\nmov     dl, 1                                                          ; +0x21, 0x180008641\nmov     [rsp+48h+arg_0], rbx                                           ; +0x23, 0x180008643\nmov     rcx, rdi                                                       ; +0x28, 0x180008648\nmov     [rsp+48h+arg_8], r14                                           ; +0x2b, 0x18000864b\nmov     [rsp+48h+arg_10], r15                                          ; +0x30, 0x180008650\ncall    qword ptr [rax+388h]                                           ; +0x35, 0x180008655\nxorps   xmm2, xmm2                                                     ; +0x3b, 0x18000865b\nlea     rcx, [rsp+48h+arg_18]                                          ; +0x3e, 0x18000865e\nxorps   xmm1, xmm1                                                     ; +0x43, 0x180008663\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x46, 0x180008666\nmov     rdx, rbp                                                       ; +0x4c, 0x18000866c\nlea     rcx, [rsp+48h+var_28]                                          ; +0x4f, 0x18000866f\nmov     r14, rax                                                       ; +0x54, 0x180008674\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x57, 0x180008677\nlea     rcx, aHuepickerbackg; \"huePickerBackground.png\"                ; +0x5d, 0x18000867d\nmov     r15, rax                                                       ; +0x64, 0x180008684\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x67, 0x180008687\nmov     rbx, rax                                                       ; +0x6d, 0x18000868d\ntest    rax, rax                                                       ; +0x70, 0x180008690\njz      short loc_1800086C2                                            ; +0x73, 0x180008693\nmov     rax, [rax]                                                     ; +0x75, 0x180008695\nmov     rdx, r15                                                       ; +0x78, 0x180008698\nmov     rcx, rbx                                                       ; +0x7b, 0x18000869b\ncall    qword ptr [rax+0B8h]                                           ; +0x7e, 0x18000869e\nmov     rax, [rbx]                                                     ; +0x84, 0x1800086a4\nmov     rdx, r14                                                       ; +0x87, 0x1800086a7\nmov     rcx, rbx                                                       ; +0x8a, 0x1800086aa\ncall    qword ptr [rax+110h]                                           ; +0x8d, 0x1800086ad\nmov     rax, [rsi]                                                     ; +0x93, 0x1800086b3\nmov     rdx, rbx                                                       ; +0x96, 0x1800086b6\nmov     rcx, rsi                                                       ; +0x99, 0x1800086b9\ncall    qword ptr [rax+1C0h]                                           ; +0x9c, 0x1800086bc\ncmp     [rdi+1E0h], rbx                                                ; +0xa2, 0x1800086c2\njz      short loc_1800086F2                                            ; +0xa9, 0x1800086c9\ntest    rbx, rbx                                                       ; +0xab, 0x1800086cb\njz      short loc_1800086D9                                            ; +0xae, 0x1800086ce\nmov     rcx, rbx                                                       ; +0xb0, 0x1800086d0\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xb3, 0x1800086d3\nmov     rcx, [rdi+1E0h]                                                ; +0xb9, 0x1800086d9\ntest    rcx, rcx                                                       ; +0xc0, 0x1800086e0\njz      short loc_1800086EB                                            ; +0xc3, 0x1800086e3\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xc5, 0x1800086e5\nmov     [rdi+1E0h], rbx                                                ; +0xcb, 0x1800086eb\nmovss   xmm2, cs:dword_180029510                                       ; +0xd2, 0x1800086f2\nlea     rcx, [rsp+48h+arg_18]                                          ; +0xda, 0x1800086fa\nmovaps  xmm1, xmm2                                                     ; +0xdf, 0x1800086ff\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xe2, 0x180008702\nmov     rdx, rbp                                                       ; +0xe8, 0x180008708\nlea     rcx, [rsp+48h+var_28]                                          ; +0xeb, 0x18000870b\nmov     r14, rax                                                       ; +0xf0, 0x180008710\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xf3, 0x180008713\nlea     rcx, aColourpickerPn; \"colourPicker.png\"                       ; +0xf9, 0x180008719\nmov     r15, rax                                                       ; +0x100, 0x180008720\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x103, 0x180008723\nmov     rbx, rax                                                       ; +0x109, 0x180008729\ntest    rax, rax                                                       ; +0x10c, 0x18000872c\njz      short loc_18000875E                                            ; +0x10f, 0x18000872f\nmov     rax, [rax]                                                     ; +0x111, 0x180008731\nmov     rdx, r15                                                       ; +0x114, 0x180008734\nmov     rcx, rbx                                                       ; +0x117, 0x180008737\ncall    qword ptr [rax+0B8h]                                           ; +0x11a, 0x18000873a\nmov     rax, [rbx]                                                     ; +0x120, 0x180008740\nmov     rdx, r14                                                       ; +0x123, 0x180008743\nmov     rcx, rbx                                                       ; +0x126, 0x180008746\ncall    qword ptr [rax+110h]                                           ; +0x129, 0x180008749\nmov     rax, [rsi]                                                     ; +0x12f, 0x18000874f\nmov     rdx, rbx                                                       ; +0x132, 0x180008752\nmov     rcx, rsi                                                       ; +0x135, 0x180008755\ncall    qword ptr [rax+1C0h]                                           ; +0x138, 0x180008758\nmov     rax, [rdi+1E8h]                                                ; +0x13e, 0x18000875e\nmov     r15, [rsp+48h+arg_10]                                          ; +0x145, 0x180008765\nmov     r14, [rsp+48h+arg_8]                                           ; +0x14a, 0x18000876a\ncmp     rax, rbx                                                       ; +0x14f, 0x18000876f\njz      short loc_18000879E                                            ; +0x152, 0x180008772\ntest    rbx, rbx                                                       ; +0x154, 0x180008774\njz      short loc_180008782                                            ; +0x157, 0x180008777\nmov     rcx, rbx                                                       ; +0x159, 0x180008779\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x15c, 0x18000877c\nmov     rcx, [rdi+1E8h]                                                ; +0x162, 0x180008782\ntest    rcx, rcx                                                       ; +0x169, 0x180008789\njz      short loc_180008794                                            ; +0x16c, 0x18000878c\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x16e, 0x18000878e\nmov     [rdi+1E8h], rbx                                                ; +0x174, 0x180008794\nmov     rax, rbx                                                       ; +0x17b, 0x18000879b\nmov     rcx, [rdi+1E0h]                                                ; +0x17e, 0x18000879e\nlea     rdx, [rsp+48h+var_28]                                          ; +0x185, 0x1800087a5\nmov     rbx, [rax]                                                     ; +0x18a, 0x1800087aa\ncall    cs:?boundingBox@CCNode@cocos2d@@QEAA?AVCCRect@2@XZ; cocos2d::CCNode::boundingBox(void) ; +0x18d, 0x1800087ad\nmovss   xmm1, dword ptr [rbp+0]                                        ; +0x193, 0x1800087b3\nlea     rcx, [rsp+48h+arg_18]                                          ; +0x198, 0x1800087b8\nmovss   xmm2, dword ptr [rax+0Ch]                                      ; +0x19d, 0x1800087bd\nmulss   xmm2, cs:dword_180029510                                       ; +0x1a2, 0x1800087c2\naddss   xmm2, dword ptr [rbp+4]                                        ; +0x1aa, 0x1800087ca\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1af, 0x1800087cf\nmov     rcx, [rdi+1E8h]                                                ; +0x1b5, 0x1800087d5\nmov     rdx, rax                                                       ; +0x1bc, 0x1800087dc\ncall    qword ptr [rbx+0B8h]                                           ; +0x1bf, 0x1800087df\nlea     rcx, [rdi+1F0h]                                                ; +0x1c5, 0x1800087e5\nmov     rdx, rbp                                                       ; +0x1cc, 0x1800087ec\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x1cf, 0x1800087ef\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x1d5, 0x1800087f5\nmov     al, 1                                                          ; +0x1da, 0x1800087fa\nmov     qword ptr [rdi+1D8h], 0                                        ; +0x1dc, 0x1800087fc\nadd     rsp, 30h                                                       ; +0x1e7, 0x180008807\npop     rdi                                                            ; +0x1eb, 0x18000880b\npop     rsi                                                            ; +0x1ec, 0x18000880c\npop     rbp                                                            ; +0x1ed, 0x18000880d\nretn                                                                   ; +0x1ee, 0x18000880e\nxor     al, al                                                         ; +0x1ef, 0x18000880f\nadd     rsp, 30h                                                       ; +0x1f1, 0x180008811\npop     rdi                                                            ; +0x1f5, 0x180008815\npop     rsi                                                            ; +0x1f6, 0x180008816\npop     rbp                                                            ; +0x1f7, 0x180008817\nretn                                                                   ; +0x1f8, 0x180008818", "xrefs": ["<???> @ 0x180024dd0", "<???> @ 0x18002dad8", "<???> @ 0x18002db10", "<???> @ 0x18002fdf8", "<???> @ 0x1800498a0"], "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"}