{"type": "func", "start": 6442488944, "end": 6442489579, "name": "cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos", "pseudocode": "// \n// cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos from 0x180009470 to 0x1800096eb (635 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x180027f20\n// > <???> @ 0x1800301fc\n// > <???> @ 0x18003020c\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b96c\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\nchar __fastcall cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos(\n        __int64 a1,\n        __int64 a2,\n        const struct cocos2d::CCPoint *a3)\n{\n  __int64 v6; // rdx\n  __int64 v7; // rax\n  __int64 v8; // r15\n  __int64 v9; // r12\n  struct cocos2d::CCSprite *v10; // rax\n  struct cocos2d::CCSprite *v11; // rsi\n  struct cocos2d::CCSprite *v12; // rdi\n  __int64 v13; // rax\n  __int64 v14; // r15\n  __int64 v15; // r12\n  struct cocos2d::CCSprite *v16; // rax\n  struct cocos2d::CCSprite *v17; // rdi\n  __int64 v18; // rax\n  __int64 v19; // r15\n  __int64 v20; // r12\n  struct cocos2d::CCSprite *v21; // rax\n  struct cocos2d::CCSprite *v22; // rdi\n  __int64 v23; // rax\n  __int64 v24; // r15\n  __int64 v25; // r12\n  struct cocos2d::CCSprite *v26; // rax\n  struct cocos2d::CCSprite *v27; // rdi\n  __int64 v28; // rcx\n  _BYTE v30[16]; // [rsp+20h] [rbp-38h] BYREF\n  char v31; // [rsp+78h] [rbp+20h] BYREF\n\n  if ( !cocos2d::extension::CCControl::init((cocos2d::extension::CCControl *)a1) )\n    return 0;\n  LOBYTE(v6) = 1;\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v6);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, 0.0, 0.0);\n  v8 = v7;\n  v9 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, a3);\n  v10 = cocos2d::CCSprite::createWithSpriteFrameName(\"colourPickerBackground.png\");\n  v11 = nullptr;\n  v12 = v10;\n  if ( v10 )\n  {\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v10 + 184LL))(v10, v9);\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v12 + 288LL))(v12, v8);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 464LL))(a2, v12);\n  }\n  else\n  {\n    v12 = nullptr;\n  }\n  *(_QWORD *)(a1 + 480) = v12;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, 0.0, 0.0);\n  v14 = v13;\n  v15 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, a3);\n  v16 = cocos2d::CCSprite::createWithSpriteFrameName(\"colourPickerOverlay.png\");\n  v17 = v16;\n  if ( v16 )\n  {\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v16 + 184LL))(v16, v15);\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v17 + 288LL))(v17, v14);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 464LL))(a2, v17);\n  }\n  else\n  {\n    v17 = nullptr;\n  }\n  *(_QWORD *)(a1 + 488) = v17;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, 0.0, 0.0);\n  v19 = v18;\n  v20 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, a3);\n  v21 = cocos2d::CCSprite::createWithSpriteFrameName(\"colourPickerShadow.png\");\n  v22 = v21;\n  if ( v21 )\n  {\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v21 + 184LL))(v21, v20);\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v22 + 288LL))(v22, v19);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 464LL))(a2, v22);\n  }\n  else\n  {\n    v22 = nullptr;\n  }\n  *(_QWORD *)(a1 + 496) = v22;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, 0.5, 0.5);\n  v24 = v23;\n  v25 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, a3);\n  v26 = cocos2d::CCSprite::createWithSpriteFrameName(\"colourPicker.png\");\n  v27 = v26;\n  if ( v26 )\n  {\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v26 + 184LL))(v26, v25);\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v27 + 288LL))(v27, v24);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 464LL))(a2, v27);\n    v11 = v27;\n  }\n  *(_QWORD *)(a1 + 504) = v11;\n  cocos2d::CCPoint::operator=(a1 + 512, a3);\n  v28 = *(_QWORD *)(a1 + 480);\n  *(_DWORD *)(a1 + 520) = 35;\n  *(_DWORD *)(a1 + 524) = (int)(float)(*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v28 + 320LL))(v28) * 0.5);\n  return 1;\n}", "assembly": "; \n; cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos from 0x180009470 to 0x1800096eb (635 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x180027f20\n; > <???> @ 0x1800301fc\n; > <???> @ 0x18003020c\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b96c\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; \npush    rbx                                                            ; +0x0, 0x180009470\npush    rbp                                                            ; +0x2, 0x180009472\npush    r14                                                            ; +0x3, 0x180009473\nsub     rsp, 40h                                                       ; +0x5, 0x180009475\nmov     rbp, r8                                                        ; +0x9, 0x180009479\nmov     r14, rdx                                                       ; +0xc, 0x18000947c\nmov     rbx, rcx                                                       ; +0xf, 0x18000947f\ncall    ?init@CCControl@extension@cocos2d@@UEAA_NXZ; cocos2d::extension::CCControl::init(void) ; +0x12, 0x180009482\ntest    al, al                                                         ; +0x17, 0x180009487\njz      loc_1800096E0                                                  ; +0x19, 0x180009489\nmov     rax, [rbx]                                                     ; +0x1f, 0x18000948f\nmov     dl, 1                                                          ; +0x22, 0x180009492\nmov     [rsp+58h+arg_0], rsi                                           ; +0x24, 0x180009494\nmov     rcx, rbx                                                       ; +0x29, 0x180009499\nmov     [rsp+58h+arg_8], rdi                                           ; +0x2c, 0x18000949c\nmov     [rsp+58h+var_20], r12                                          ; +0x31, 0x1800094a1\nmov     [rsp+58h+var_28], r15                                          ; +0x36, 0x1800094a6\ncall    qword ptr [rax+398h]                                           ; +0x3b, 0x1800094ab\nxorps   xmm2, xmm2                                                     ; +0x41, 0x1800094b1\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x44, 0x1800094b4\nxorps   xmm1, xmm1                                                     ; +0x49, 0x1800094b9\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x4c, 0x1800094bc\nmov     rdx, rbp                                                       ; +0x52, 0x1800094c2\nlea     rcx, [rsp+58h+var_38]                                          ; +0x55, 0x1800094c5\nmov     r15, rax                                                       ; +0x5a, 0x1800094ca\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x5d, 0x1800094cd\nlea     rcx, aColourpickerba; \"colourPickerBackground.png\"             ; +0x63, 0x1800094d3\nmov     r12, rax                                                       ; +0x6a, 0x1800094da\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x6d, 0x1800094dd\nxor     esi, esi                                                       ; +0x73, 0x1800094e3\nmov     rdi, rax                                                       ; +0x75, 0x1800094e5\ntest    rax, rax                                                       ; +0x78, 0x1800094e8\njnz     short loc_1800094F1                                            ; +0x7b, 0x1800094eb\nmov     edi, esi                                                       ; +0x7d, 0x1800094ed\njmp     short loc_18000951E                                            ; +0x7f, 0x1800094ef\nmov     rax, [rax]                                                     ; +0x81, 0x1800094f1\nmov     rdx, r12                                                       ; +0x84, 0x1800094f4\nmov     rcx, rdi                                                       ; +0x87, 0x1800094f7\ncall    qword ptr [rax+0B8h]                                           ; +0x8a, 0x1800094fa\nmov     rax, [rdi]                                                     ; +0x90, 0x180009500\nmov     rdx, r15                                                       ; +0x93, 0x180009503\nmov     rcx, rdi                                                       ; +0x96, 0x180009506\ncall    qword ptr [rax+120h]                                           ; +0x99, 0x180009509\nmov     rax, [r14]                                                     ; +0x9f, 0x18000950f\nmov     rdx, rdi                                                       ; +0xa2, 0x180009512\nmov     rcx, r14                                                       ; +0xa5, 0x180009515\ncall    qword ptr [rax+1D0h]                                           ; +0xa8, 0x180009518\nxorps   xmm2, xmm2                                                     ; +0xae, 0x18000951e\nmov     [rbx+1E0h], rdi                                                ; +0xb1, 0x180009521\nxorps   xmm1, xmm1                                                     ; +0xb8, 0x180009528\nlea     rcx, [rsp+58h+arg_18]                                          ; +0xbb, 0x18000952b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xc0, 0x180009530\nmov     rdx, rbp                                                       ; +0xc6, 0x180009536\nlea     rcx, [rsp+58h+var_38]                                          ; +0xc9, 0x180009539\nmov     r15, rax                                                       ; +0xce, 0x18000953e\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xd1, 0x180009541\nlea     rcx, aColourpickerov; \"colourPickerOverlay.png\"                ; +0xd7, 0x180009547\nmov     r12, rax                                                       ; +0xde, 0x18000954e\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xe1, 0x180009551\nmov     rdi, rax                                                       ; +0xe7, 0x180009557\ntest    rax, rax                                                       ; +0xea, 0x18000955a\njnz     short loc_180009564                                            ; +0xed, 0x18000955d\nmov     rdi, rsi                                                       ; +0xef, 0x18000955f\njmp     short loc_180009591                                            ; +0xf2, 0x180009562\nmov     rax, [rax]                                                     ; +0xf4, 0x180009564\nmov     rdx, r12                                                       ; +0xf7, 0x180009567\nmov     rcx, rdi                                                       ; +0xfa, 0x18000956a\ncall    qword ptr [rax+0B8h]                                           ; +0xfd, 0x18000956d\nmov     rax, [rdi]                                                     ; +0x103, 0x180009573\nmov     rdx, r15                                                       ; +0x106, 0x180009576\nmov     rcx, rdi                                                       ; +0x109, 0x180009579\ncall    qword ptr [rax+120h]                                           ; +0x10c, 0x18000957c\nmov     rax, [r14]                                                     ; +0x112, 0x180009582\nmov     rdx, rdi                                                       ; +0x115, 0x180009585\nmov     rcx, r14                                                       ; +0x118, 0x180009588\ncall    qword ptr [rax+1D0h]                                           ; +0x11b, 0x18000958b\nxorps   xmm2, xmm2                                                     ; +0x121, 0x180009591\nmov     [rbx+1E8h], rdi                                                ; +0x124, 0x180009594\nxorps   xmm1, xmm1                                                     ; +0x12b, 0x18000959b\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x12e, 0x18000959e\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x133, 0x1800095a3\nmov     rdx, rbp                                                       ; +0x139, 0x1800095a9\nlea     rcx, [rsp+58h+var_38]                                          ; +0x13c, 0x1800095ac\nmov     r15, rax                                                       ; +0x141, 0x1800095b1\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x144, 0x1800095b4\nlea     rcx, aColourpickersh; \"colourPickerShadow.png\"                 ; +0x14a, 0x1800095ba\nmov     r12, rax                                                       ; +0x151, 0x1800095c1\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x154, 0x1800095c4\nmov     rdi, rax                                                       ; +0x15a, 0x1800095ca\ntest    rax, rax                                                       ; +0x15d, 0x1800095cd\njnz     short loc_1800095D7                                            ; +0x160, 0x1800095d0\nmov     rdi, rsi                                                       ; +0x162, 0x1800095d2\njmp     short loc_180009604                                            ; +0x165, 0x1800095d5\nmov     rax, [rax]                                                     ; +0x167, 0x1800095d7\nmov     rdx, r12                                                       ; +0x16a, 0x1800095da\nmov     rcx, rdi                                                       ; +0x16d, 0x1800095dd\ncall    qword ptr [rax+0B8h]                                           ; +0x170, 0x1800095e0\nmov     rax, [rdi]                                                     ; +0x176, 0x1800095e6\nmov     rdx, r15                                                       ; +0x179, 0x1800095e9\nmov     rcx, rdi                                                       ; +0x17c, 0x1800095ec\ncall    qword ptr [rax+120h]                                           ; +0x17f, 0x1800095ef\nmov     rax, [r14]                                                     ; +0x185, 0x1800095f5\nmov     rdx, rdi                                                       ; +0x188, 0x1800095f8\nmov     rcx, r14                                                       ; +0x18b, 0x1800095fb\ncall    qword ptr [rax+1D0h]                                           ; +0x18e, 0x1800095fe\nmovss   xmm2, cs:dword_18002BBD8                                       ; +0x194, 0x180009604\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x19c, 0x18000960c\nmovaps  xmm1, xmm2                                                     ; +0x1a1, 0x180009611\nmov     [rbx+1F0h], rdi                                                ; +0x1a4, 0x180009614\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1ab, 0x18000961b\nmov     rdx, rbp                                                       ; +0x1b1, 0x180009621\nlea     rcx, [rsp+58h+var_38]                                          ; +0x1b4, 0x180009624\nmov     r15, rax                                                       ; +0x1b9, 0x180009629\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1bc, 0x18000962c\nlea     rcx, aColourpickerPn; \"colourPicker.png\"                       ; +0x1c2, 0x180009632\nmov     r12, rax                                                       ; +0x1c9, 0x180009639\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x1cc, 0x18000963c\nmov     rdi, rax                                                       ; +0x1d2, 0x180009642\ntest    rax, rax                                                       ; +0x1d5, 0x180009645\njz      short loc_18000967A                                            ; +0x1d8, 0x180009648\nmov     rax, [rax]                                                     ; +0x1da, 0x18000964a\nmov     rdx, r12                                                       ; +0x1dd, 0x18000964d\nmov     rcx, rdi                                                       ; +0x1e0, 0x180009650\ncall    qword ptr [rax+0B8h]                                           ; +0x1e3, 0x180009653\nmov     rax, [rdi]                                                     ; +0x1e9, 0x180009659\nmov     rdx, r15                                                       ; +0x1ec, 0x18000965c\nmov     rcx, rdi                                                       ; +0x1ef, 0x18000965f\ncall    qword ptr [rax+120h]                                           ; +0x1f2, 0x180009662\nmov     rax, [r14]                                                     ; +0x1f8, 0x180009668\nmov     rdx, rdi                                                       ; +0x1fb, 0x18000966b\nmov     rcx, r14                                                       ; +0x1fe, 0x18000966e\ncall    qword ptr [rax+1D0h]                                           ; +0x201, 0x180009671\nmov     rsi, rdi                                                       ; +0x207, 0x180009677\nlea     rcx, [rbx+200h]                                                ; +0x20a, 0x18000967a\nmov     [rbx+1F8h], rsi                                                ; +0x211, 0x180009681\nmov     rdx, rbp                                                       ; +0x218, 0x180009688\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x21b, 0x18000968b\nmov     rcx, [rbx+1E0h]                                                ; +0x221, 0x180009691\nmov     dword ptr [rbx+208h], 23h ; '#'                                ; +0x228, 0x180009698\nmov     rax, [rcx]                                                     ; +0x232, 0x1800096a2\ncall    qword ptr [rax+140h]                                           ; +0x235, 0x1800096a5\nmov     r15, [rsp+58h+var_28]                                          ; +0x23b, 0x1800096ab\nmov     r12, [rsp+58h+var_20]                                          ; +0x240, 0x1800096b0\nmov     rdi, [rsp+58h+arg_8]                                           ; +0x245, 0x1800096b5\nmovss   xmm0, dword ptr [rax]                                          ; +0x24a, 0x1800096ba\nmulss   xmm0, cs:dword_18002BBD8                                       ; +0x24e, 0x1800096be\nmov     rsi, [rsp+58h+arg_0]                                           ; +0x256, 0x1800096c6\ncvttss2si eax, xmm0                                                    ; +0x25b, 0x1800096cb\nmov     [rbx+20Ch], eax                                                ; +0x25f, 0x1800096cf\nmov     al, 1                                                          ; +0x265, 0x1800096d5\nadd     rsp, 40h                                                       ; +0x267, 0x1800096d7\npop     r14                                                            ; +0x26b, 0x1800096db\npop     rbp                                                            ; +0x26d, 0x1800096dd\npop     rbx                                                            ; +0x26e, 0x1800096de\nretn                                                                   ; +0x26f, 0x1800096df\nxor     al, al                                                         ; +0x270, 0x1800096e0\nadd     rsp, 40h                                                       ; +0x272, 0x1800096e2\npop     r14                                                            ; +0x276, 0x1800096e6\npop     rbp                                                            ; +0x278, 0x1800096e8\npop     rbx                                                            ; +0x279, 0x1800096e9\nretn                                                                   ; +0x27a, 0x1800096ea", "xrefs": ["<???> @ 0x180027f20", "<???> @ 0x1800301fc", "<???> @ 0x18003020c", "<???> @ 0x180032408", "<???> @ 0x18004b96c"], "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"}