{"type": "func", "start": 5372646000, "end": 5372646446, "name": "HSVLiveOverlay::createHSVWidget", "pseudocode": "// \n// HSVLiveOverlay::createHSVWidget from 0x1403c1270 to 0x1403c142e (446 bytes)\n// \n// 5 xrefs:\n// > HSVLiveOverlay::init @ 0x1403c0fbd\n// > HSVLiveOverlay::onSelectTab @ 0x1403c1264\n// > <???> @ 0x1408c1f90\n// > <???> @ 0x1408c1fa0\n// > <???> @ 0x140924068\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 11:31:28 +0000\n// \n\n__int64 __fastcall HSVLiveOverlay::createHSVWidget(__int64 a1, unsigned int a2)\n{\n  cocos2d::CCArray *v3; // rcx\n  unsigned int v5; // edi\n  struct cocos2d::CCObject *v6; // rbx\n  int v7; // eax\n  const char *v8; // rdx\n  __int64 v9; // rcx\n  __int64 v10; // rax\n  __int64 v11; // rdx\n  cocos2d::CCNode *v12; // rax\n  __int64 *v13; // rdi\n  __int64 v14; // rbx\n  __int64 v15; // rax\n  __int64 v16; // rcx\n  __int64 v17; // rcx\n  char v18; // al\n  __int64 v19; // rcx\n  __m128 v21; // [rsp+20h] [rbp-48h] BYREF\n  __m128 v22[3]; // [rsp+30h] [rbp-38h] BYREF\n  __int16 v23; // [rsp+70h] [rbp+8h] BYREF\n  char v24; // [rsp+72h] [rbp+Ah]\n  char v25; // [rsp+80h] [rbp+18h] BYREF\n\n  *(_DWORD *)(a1 + 712) = a2;\n  v3 = *(cocos2d::CCArray **)(a1 + 696);\n  if ( v3 )\n  {\n    v5 = 0;\n    if ( cocos2d::CCArray::count(v3) )\n    {\n      do\n      {\n        v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 696), v5);\n        v7 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v6 + 56LL))(v6);\n        v8 = \"GJ_button_04.png\";\n        if ( v7 == a2 )\n          v8 = \"GJ_button_01.png\";\n        ButtonSprite::updateBGImage((__int64)v6, v8);\n        ++v5;\n      }\n      while ( v5 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 696)) );\n    }\n  }\n  v9 = *(_QWORD *)(a1 + 720);\n  if ( v9 )\n  {\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 528LL))(v9);\n    *(_QWORD *)(a1 + 720) = 0;\n  }\n  v10 = cocos2d::CCDirector::sharedDirector(v9);\n  cocos2d::CCDirector::getWinSize(v10, &v25);\n  v21 = *ConfigureHSVWidget::getHSV(v22, *(struct cocos2d::CCObject **)(a1 + 672), *(cocos2d::CCArray **)(a1 + 680), a2);\n  v12 = ConfigureHSVWidget::create((__int128 *)&v21, v11, 0);\n  *(_QWORD *)(a1 + 720) = v12;\n  (*(void (__fastcall **)(cocos2d::CCNode *, _QWORD))(*(_QWORD *)v12 + 64LL))(v12, a2);\n  (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))(\n    *(_QWORD *)(a1 + 584),\n    *(_QWORD *)(a1 + 720));\n  v13 = *(__int64 **)(a1 + 720);\n  v14 = *v13;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v23, 157.0, 163.0);\n  (*(void (__fastcall **)(__int64 *, __int64))(v14 + 184))(v13, v15);\n  (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 160LL))(*(_QWORD *)(a1 + 720));\n  v16 = a1 + 664;\n  if ( !a1 )\n    v16 = 0;\n  *(_QWORD *)(*(_QWORD *)(a1 + 720) + 400LL) = v16;\n  v17 = 731;\n  if ( a2 != 1 )\n    v17 = 734;\n  v23 = *(_WORD *)(v17 + a1);\n  v18 = *(_BYTE *)(v17 + a1 + 2);\n  v19 = *(_QWORD *)(a1 + 720);\n  v24 = v18;\n  return ConfigureHSVWidget::setBaseColor(v19, (__int64)&v23);\n}", "assembly": "; \n; HSVLiveOverlay::createHSVWidget from 0x1403c1270 to 0x1403c142e (446 bytes)\n; \n; 5 xrefs:\n; > HSVLiveOverlay::init @ 0x1403c0fbd\n; > HSVLiveOverlay::onSelectTab @ 0x1403c1264\n; > <???> @ 0x1408c1f90\n; > <???> @ 0x1408c1fa0\n; > <???> @ 0x140924068\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 11:31:28 +0000\n; \npush    rbx                                                            ; +0x0, 0x1403c1270\npush    rbp                                                            ; +0x2, 0x1403c1272\npush    rsi                                                            ; +0x3, 0x1403c1273\npush    rdi                                                            ; +0x4, 0x1403c1274\npush    r15                                                            ; +0x5, 0x1403c1275\nsub     rsp, 40h                                                       ; +0x7, 0x1403c1277\nmov     rsi, rcx                                                       ; +0xb, 0x1403c127b\nmov     [rcx+2C8h], edx                                                ; +0xe, 0x1403c127e\nmov     rcx, [rcx+2B8h]                                                ; +0x14, 0x1403c1284\nxor     r15d, r15d                                                     ; +0x1b, 0x1403c128b\nmov     ebp, edx                                                       ; +0x1e, 0x1403c128e\ntest    rcx, rcx                                                       ; +0x20, 0x1403c1290\njz      short loc_1403C12FB                                            ; +0x23, 0x1403c1293\nmov     edi, r15d                                                      ; +0x25, 0x1403c1295\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x28, 0x1403c1298\ntest    eax, eax                                                       ; +0x2e, 0x1403c129e\njz      short loc_1403C12FB                                            ; +0x30, 0x1403c12a0\nmov     [rsp+68h+arg_8], r14                                           ; +0x32, 0x1403c12a2\nlea     r14, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x37, 0x1403c12a7\nxchg    ax, ax                                                         ; +0x3e, 0x1403c12ae\nmov     rcx, [rsi+2B8h]                                                ; +0x40, 0x1403c12b0\nmov     edx, edi                                                       ; +0x47, 0x1403c12b7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x49, 0x1403c12b9\nmov     rbx, rax                                                       ; +0x4f, 0x1403c12bf\nmov     rcx, [rax]                                                     ; +0x52, 0x1403c12c2\nmov     rdx, [rcx+38h]                                                 ; +0x55, 0x1403c12c5\nmov     rcx, rax                                                       ; +0x59, 0x1403c12c9\ncall    rdx                                                            ; +0x5c, 0x1403c12cc\ncmp     eax, ebp                                                       ; +0x5e, 0x1403c12ce\nlea     rdx, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x60, 0x1403c12d0\nmov     rcx, rbx                                                       ; +0x67, 0x1403c12d7\ncmovz   rdx, r14                                                       ; +0x6a, 0x1403c12da\ncall    ButtonSprite__updateBGImage                                    ; +0x6e, 0x1403c12de\nmov     rcx, [rsi+2B8h]                                                ; +0x73, 0x1403c12e3\ninc     edi                                                            ; +0x7a, 0x1403c12ea\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7c, 0x1403c12ec\ncmp     edi, eax                                                       ; +0x82, 0x1403c12f2\njb      short loc_1403C12B0                                            ; +0x84, 0x1403c12f4\nmov     r14, [rsp+68h+arg_8]                                           ; +0x86, 0x1403c12f6\nmov     rcx, [rsi+2D0h]                                                ; +0x8b, 0x1403c12fb\ntest    rcx, rcx                                                       ; +0x92, 0x1403c1302\njz      short loc_1403C1317                                            ; +0x95, 0x1403c1305\nmov     rax, [rcx]                                                     ; +0x97, 0x1403c1307\ncall    qword ptr [rax+210h]                                           ; +0x9a, 0x1403c130a\nmov     [rsi+2D0h], r15                                                ; +0xa0, 0x1403c1310\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xa7, 0x1403c1317\nmov     rcx, rax                                                       ; +0xad, 0x1403c131d\nlea     rdx, [rsp+68h+arg_10]                                          ; +0xb0, 0x1403c1320\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xb8, 0x1403c1328\nmov     r8, [rsi+2A8h]                                                 ; +0xbe, 0x1403c132e\nlea     rcx, [rsp+68h+var_38]                                          ; +0xc5, 0x1403c1335\nmov     rdx, [rsi+2A0h]                                                ; +0xca, 0x1403c133a\nmov     r9d, ebp                                                       ; +0xd1, 0x1403c1341\ncall    ConfigureHSVWidget__getHSV                                     ; +0xd4, 0x1403c1344\nxor     r8d, r8d                                                       ; +0xd9, 0x1403c1349\nlea     rcx, [rsp+68h+var_48]                                          ; +0xdc, 0x1403c134c\nmovups  xmm0, xmmword ptr [rax]                                        ; +0xe1, 0x1403c1351\nmovaps  [rsp+68h+var_48], xmm0                                         ; +0xe4, 0x1403c1354\ncall    ConfigureHSVWidget__create                                     ; +0xe9, 0x1403c1359\nmov     [rsi+2D0h], rax                                                ; +0xee, 0x1403c135e\nmov     edx, ebp                                                       ; +0xf5, 0x1403c1365\nmov     rcx, [rax]                                                     ; +0xf7, 0x1403c1367\nmov     r8, [rcx+40h]                                                  ; +0xfa, 0x1403c136a\nmov     rcx, rax                                                       ; +0xfe, 0x1403c136e\ncall    r8                                                             ; +0x101, 0x1403c1371\nmov     rcx, [rsi+248h]                                                ; +0x104, 0x1403c1374\nmov     rdx, [rsi+2D0h]                                                ; +0x10b, 0x1403c137b\nmov     rax, [rcx]                                                     ; +0x112, 0x1403c1382\ncall    qword ptr [rax+1D0h]                                           ; +0x115, 0x1403c1385\nmov     rdi, [rsi+2D0h]                                                ; +0x11b, 0x1403c138b\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x122, 0x1403c1392\nmovss   xmm2, cs:dword_140835888                                       ; +0x127, 0x1403c1397\nmovss   xmm1, cs:dword_140835874                                       ; +0x12f, 0x1403c139f\nmov     rbx, [rdi]                                                     ; +0x137, 0x1403c13a7\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x13a, 0x1403c13aa\nmov     rdx, rax                                                       ; +0x140, 0x1403c13b0\nmov     rcx, rdi                                                       ; +0x143, 0x1403c13b3\ncall    qword ptr [rbx+0B8h]                                           ; +0x146, 0x1403c13b6\nmov     rcx, [rsi+2D0h]                                                ; +0x14c, 0x1403c13bc\nmovss   xmm1, cs:dword_140834F64                                       ; +0x153, 0x1403c13c3\nmov     rax, [rcx]                                                     ; +0x15b, 0x1403c13cb\ncall    qword ptr [rax+0A0h]                                           ; +0x15e, 0x1403c13ce\nmov     rax, [rsi+2D0h]                                                ; +0x164, 0x1403c13d4\nlea     rcx, [rsi+298h]                                                ; +0x16b, 0x1403c13db\ntest    rsi, rsi                                                       ; +0x172, 0x1403c13e2\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x175, 0x1403c13e5\ncmovz   rcx, r15                                                       ; +0x17a, 0x1403c13ea\ncmp     ebp, 1                                                         ; +0x17e, 0x1403c13ee\nmov     [rax+190h], rcx                                                ; +0x181, 0x1403c13f1\nmov     eax, 2DEh                                                      ; +0x188, 0x1403c13f8\nmov     ecx, 2DBh                                                      ; +0x18d, 0x1403c13fd\ncmovnz  ecx, eax                                                       ; +0x192, 0x1403c1402\nmovzx   eax, word ptr [rcx+rsi]                                        ; +0x195, 0x1403c1405\nmov     [rsp+68h+arg_0], ax                                            ; +0x199, 0x1403c1409\nmovzx   eax, byte ptr [rcx+rsi+2]                                      ; +0x19e, 0x1403c140e\nmov     rcx, [rsi+2D0h]                                                ; +0x1a3, 0x1403c1413\nmov     [rsp+68h+arg_2], al                                            ; +0x1aa, 0x1403c141a\ncall    ConfigureHSVWidget__setBaseColor                               ; +0x1ae, 0x1403c141e\nadd     rsp, 40h                                                       ; +0x1b3, 0x1403c1423\npop     r15                                                            ; +0x1b7, 0x1403c1427\npop     rdi                                                            ; +0x1b9, 0x1403c1429\npop     rsi                                                            ; +0x1ba, 0x1403c142a\npop     rbp                                                            ; +0x1bb, 0x1403c142b\npop     rbx                                                            ; +0x1bc, 0x1403c142c\nretn                                                                   ; +0x1bd, 0x1403c142d", "xrefs": ["HSVLiveOverlay::init @ 0x1403c0fbd", "HSVLiveOverlay::onSelectTab @ 0x1403c1264", "<???> @ 0x1408c1f90", "<???> @ 0x1408c1fa0", "<???> @ 0x140924068"], "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"}