{"type": "func", "start": 6442490304, "end": 6442490939, "name": "cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos", "pseudocode": "// \n// cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos from 0x1800099c0 to 0x180009c3b (635 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x180025958\n// > <???> @ 0x18002dc84\n// > <???> @ 0x18002dc94\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049a38\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::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 + 904LL))(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 + 272LL))(v12, v8);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 448LL))(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 + 272LL))(v17, v14);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 448LL))(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 + 272LL))(v22, v19);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 448LL))(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 + 272LL))(v27, v24);\n    (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 448LL))(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 + 304LL))(v28) * 0.5);\n  return 1;\n}", "assembly": "; \n; cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos from 0x1800099c0 to 0x180009c3b (635 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x180025958\n; > <???> @ 0x18002dc84\n; > <???> @ 0x18002dc94\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049a38\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    rbx                                                            ; +0x0, 0x1800099c0\npush    rbp                                                            ; +0x2, 0x1800099c2\npush    r14                                                            ; +0x3, 0x1800099c3\nsub     rsp, 40h                                                       ; +0x5, 0x1800099c5\nmov     rbp, r8                                                        ; +0x9, 0x1800099c9\nmov     r14, rdx                                                       ; +0xc, 0x1800099cc\nmov     rbx, rcx                                                       ; +0xf, 0x1800099cf\ncall    ?init@CCControl@extension@cocos2d@@UEAA_NXZ; cocos2d::extension::CCControl::init(void) ; +0x12, 0x1800099d2\ntest    al, al                                                         ; +0x17, 0x1800099d7\njz      loc_180009C30                                                  ; +0x19, 0x1800099d9\nmov     rax, [rbx]                                                     ; +0x1f, 0x1800099df\nmov     dl, 1                                                          ; +0x22, 0x1800099e2\nmov     [rsp+58h+arg_0], rsi                                           ; +0x24, 0x1800099e4\nmov     rcx, rbx                                                       ; +0x29, 0x1800099e9\nmov     [rsp+58h+arg_8], rdi                                           ; +0x2c, 0x1800099ec\nmov     [rsp+58h+var_20], r12                                          ; +0x31, 0x1800099f1\nmov     [rsp+58h+var_28], r15                                          ; +0x36, 0x1800099f6\ncall    qword ptr [rax+388h]                                           ; +0x3b, 0x1800099fb\nxorps   xmm2, xmm2                                                     ; +0x41, 0x180009a01\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x44, 0x180009a04\nxorps   xmm1, xmm1                                                     ; +0x49, 0x180009a09\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x4c, 0x180009a0c\nmov     rdx, rbp                                                       ; +0x52, 0x180009a12\nlea     rcx, [rsp+58h+var_38]                                          ; +0x55, 0x180009a15\nmov     r15, rax                                                       ; +0x5a, 0x180009a1a\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x5d, 0x180009a1d\nlea     rcx, aColourpickerba; \"colourPickerBackground.png\"             ; +0x63, 0x180009a23\nmov     r12, rax                                                       ; +0x6a, 0x180009a2a\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x6d, 0x180009a2d\nxor     esi, esi                                                       ; +0x73, 0x180009a33\nmov     rdi, rax                                                       ; +0x75, 0x180009a35\ntest    rax, rax                                                       ; +0x78, 0x180009a38\njnz     short loc_180009A41                                            ; +0x7b, 0x180009a3b\nmov     edi, esi                                                       ; +0x7d, 0x180009a3d\njmp     short loc_180009A6E                                            ; +0x7f, 0x180009a3f\nmov     rax, [rax]                                                     ; +0x81, 0x180009a41\nmov     rdx, r12                                                       ; +0x84, 0x180009a44\nmov     rcx, rdi                                                       ; +0x87, 0x180009a47\ncall    qword ptr [rax+0B8h]                                           ; +0x8a, 0x180009a4a\nmov     rax, [rdi]                                                     ; +0x90, 0x180009a50\nmov     rdx, r15                                                       ; +0x93, 0x180009a53\nmov     rcx, rdi                                                       ; +0x96, 0x180009a56\ncall    qword ptr [rax+110h]                                           ; +0x99, 0x180009a59\nmov     rax, [r14]                                                     ; +0x9f, 0x180009a5f\nmov     rdx, rdi                                                       ; +0xa2, 0x180009a62\nmov     rcx, r14                                                       ; +0xa5, 0x180009a65\ncall    qword ptr [rax+1C0h]                                           ; +0xa8, 0x180009a68\nxorps   xmm2, xmm2                                                     ; +0xae, 0x180009a6e\nmov     [rbx+1E0h], rdi                                                ; +0xb1, 0x180009a71\nxorps   xmm1, xmm1                                                     ; +0xb8, 0x180009a78\nlea     rcx, [rsp+58h+arg_18]                                          ; +0xbb, 0x180009a7b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xc0, 0x180009a80\nmov     rdx, rbp                                                       ; +0xc6, 0x180009a86\nlea     rcx, [rsp+58h+var_38]                                          ; +0xc9, 0x180009a89\nmov     r15, rax                                                       ; +0xce, 0x180009a8e\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xd1, 0x180009a91\nlea     rcx, aColourpickerov; \"colourPickerOverlay.png\"                ; +0xd7, 0x180009a97\nmov     r12, rax                                                       ; +0xde, 0x180009a9e\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xe1, 0x180009aa1\nmov     rdi, rax                                                       ; +0xe7, 0x180009aa7\ntest    rax, rax                                                       ; +0xea, 0x180009aaa\njnz     short loc_180009AB4                                            ; +0xed, 0x180009aad\nmov     rdi, rsi                                                       ; +0xef, 0x180009aaf\njmp     short loc_180009AE1                                            ; +0xf2, 0x180009ab2\nmov     rax, [rax]                                                     ; +0xf4, 0x180009ab4\nmov     rdx, r12                                                       ; +0xf7, 0x180009ab7\nmov     rcx, rdi                                                       ; +0xfa, 0x180009aba\ncall    qword ptr [rax+0B8h]                                           ; +0xfd, 0x180009abd\nmov     rax, [rdi]                                                     ; +0x103, 0x180009ac3\nmov     rdx, r15                                                       ; +0x106, 0x180009ac6\nmov     rcx, rdi                                                       ; +0x109, 0x180009ac9\ncall    qword ptr [rax+110h]                                           ; +0x10c, 0x180009acc\nmov     rax, [r14]                                                     ; +0x112, 0x180009ad2\nmov     rdx, rdi                                                       ; +0x115, 0x180009ad5\nmov     rcx, r14                                                       ; +0x118, 0x180009ad8\ncall    qword ptr [rax+1C0h]                                           ; +0x11b, 0x180009adb\nxorps   xmm2, xmm2                                                     ; +0x121, 0x180009ae1\nmov     [rbx+1E8h], rdi                                                ; +0x124, 0x180009ae4\nxorps   xmm1, xmm1                                                     ; +0x12b, 0x180009aeb\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x12e, 0x180009aee\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x133, 0x180009af3\nmov     rdx, rbp                                                       ; +0x139, 0x180009af9\nlea     rcx, [rsp+58h+var_38]                                          ; +0x13c, 0x180009afc\nmov     r15, rax                                                       ; +0x141, 0x180009b01\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x144, 0x180009b04\nlea     rcx, aColourpickersh; \"colourPickerShadow.png\"                 ; +0x14a, 0x180009b0a\nmov     r12, rax                                                       ; +0x151, 0x180009b11\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x154, 0x180009b14\nmov     rdi, rax                                                       ; +0x15a, 0x180009b1a\ntest    rax, rax                                                       ; +0x15d, 0x180009b1d\njnz     short loc_180009B27                                            ; +0x160, 0x180009b20\nmov     rdi, rsi                                                       ; +0x162, 0x180009b22\njmp     short loc_180009B54                                            ; +0x165, 0x180009b25\nmov     rax, [rax]                                                     ; +0x167, 0x180009b27\nmov     rdx, r12                                                       ; +0x16a, 0x180009b2a\nmov     rcx, rdi                                                       ; +0x16d, 0x180009b2d\ncall    qword ptr [rax+0B8h]                                           ; +0x170, 0x180009b30\nmov     rax, [rdi]                                                     ; +0x176, 0x180009b36\nmov     rdx, r15                                                       ; +0x179, 0x180009b39\nmov     rcx, rdi                                                       ; +0x17c, 0x180009b3c\ncall    qword ptr [rax+110h]                                           ; +0x17f, 0x180009b3f\nmov     rax, [r14]                                                     ; +0x185, 0x180009b45\nmov     rdx, rdi                                                       ; +0x188, 0x180009b48\nmov     rcx, r14                                                       ; +0x18b, 0x180009b4b\ncall    qword ptr [rax+1C0h]                                           ; +0x18e, 0x180009b4e\nmovss   xmm2, cs:dword_180029510                                       ; +0x194, 0x180009b54\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x19c, 0x180009b5c\nmovaps  xmm1, xmm2                                                     ; +0x1a1, 0x180009b61\nmov     [rbx+1F0h], rdi                                                ; +0x1a4, 0x180009b64\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1ab, 0x180009b6b\nmov     rdx, rbp                                                       ; +0x1b1, 0x180009b71\nlea     rcx, [rsp+58h+var_38]                                          ; +0x1b4, 0x180009b74\nmov     r15, rax                                                       ; +0x1b9, 0x180009b79\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1bc, 0x180009b7c\nlea     rcx, aColourpickerPn; \"colourPicker.png\"                       ; +0x1c2, 0x180009b82\nmov     r12, rax                                                       ; +0x1c9, 0x180009b89\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x1cc, 0x180009b8c\nmov     rdi, rax                                                       ; +0x1d2, 0x180009b92\ntest    rax, rax                                                       ; +0x1d5, 0x180009b95\njz      short loc_180009BCA                                            ; +0x1d8, 0x180009b98\nmov     rax, [rax]                                                     ; +0x1da, 0x180009b9a\nmov     rdx, r12                                                       ; +0x1dd, 0x180009b9d\nmov     rcx, rdi                                                       ; +0x1e0, 0x180009ba0\ncall    qword ptr [rax+0B8h]                                           ; +0x1e3, 0x180009ba3\nmov     rax, [rdi]                                                     ; +0x1e9, 0x180009ba9\nmov     rdx, r15                                                       ; +0x1ec, 0x180009bac\nmov     rcx, rdi                                                       ; +0x1ef, 0x180009baf\ncall    qword ptr [rax+110h]                                           ; +0x1f2, 0x180009bb2\nmov     rax, [r14]                                                     ; +0x1f8, 0x180009bb8\nmov     rdx, rdi                                                       ; +0x1fb, 0x180009bbb\nmov     rcx, r14                                                       ; +0x1fe, 0x180009bbe\ncall    qword ptr [rax+1C0h]                                           ; +0x201, 0x180009bc1\nmov     rsi, rdi                                                       ; +0x207, 0x180009bc7\nlea     rcx, [rbx+200h]                                                ; +0x20a, 0x180009bca\nmov     [rbx+1F8h], rsi                                                ; +0x211, 0x180009bd1\nmov     rdx, rbp                                                       ; +0x218, 0x180009bd8\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x21b, 0x180009bdb\nmov     rcx, [rbx+1E0h]                                                ; +0x221, 0x180009be1\nmov     dword ptr [rbx+208h], 23h ; '#'                                ; +0x228, 0x180009be8\nmov     rax, [rcx]                                                     ; +0x232, 0x180009bf2\ncall    qword ptr [rax+130h]                                           ; +0x235, 0x180009bf5\nmov     r15, [rsp+58h+var_28]                                          ; +0x23b, 0x180009bfb\nmov     r12, [rsp+58h+var_20]                                          ; +0x240, 0x180009c00\nmov     rdi, [rsp+58h+arg_8]                                           ; +0x245, 0x180009c05\nmovss   xmm0, dword ptr [rax]                                          ; +0x24a, 0x180009c0a\nmulss   xmm0, cs:dword_180029510                                       ; +0x24e, 0x180009c0e\nmov     rsi, [rsp+58h+arg_0]                                           ; +0x256, 0x180009c16\ncvttss2si eax, xmm0                                                    ; +0x25b, 0x180009c1b\nmov     [rbx+20Ch], eax                                                ; +0x25f, 0x180009c1f\nmov     al, 1                                                          ; +0x265, 0x180009c25\nadd     rsp, 40h                                                       ; +0x267, 0x180009c27\npop     r14                                                            ; +0x26b, 0x180009c2b\npop     rbp                                                            ; +0x26d, 0x180009c2d\npop     rbx                                                            ; +0x26e, 0x180009c2e\nretn                                                                   ; +0x26f, 0x180009c2f\nxor     al, al                                                         ; +0x270, 0x180009c30\nadd     rsp, 40h                                                       ; +0x272, 0x180009c32\npop     r14                                                            ; +0x276, 0x180009c36\npop     rbp                                                            ; +0x278, 0x180009c38\npop     rbx                                                            ; +0x279, 0x180009c39\nretn                                                                   ; +0x27a, 0x180009c3a", "xrefs": ["<???> @ 0x180025958", "<???> @ 0x18002dc84", "<???> @ 0x18002dc94", "<???> @ 0x18002fdf8", "<???> @ 0x180049a38"], "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"}