{"type": "func", "start": 6179852, "end": 6180194, "name": "ConfigureHSVWidget::getHSV", "pseudocode": "// \n// ConfigureHSVWidget::getHSV from 0x5e4c0c to 0x5e4d62 (342 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::getHSV @ 0x57e40c\n// > HSVLiveOverlay::createHSVWidget @ 0x69c3aa\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:54:19 +0000\n// \n\nConfigureHSVWidget *__fastcall ConfigureHSVWidget::getHSV(\n        ConfigureHSVWidget *this,\n        GameObject *a2,\n        cocos2d::CCArray *a3,\n        int a4)\n{\n  unsigned int v7; // r7\n  int v8; // r10\n  float v9; // s16\n  float v10; // s18\n  float v11; // s17\n  int v12; // r0\n  int v13; // r2\n  float v14; // r0\n  float v15; // r1\n  float v16; // r2\n  int v17; // r3\n  float v18; // s15\n  float v19; // s13\n  float v20; // s14\n  int RelativeSpriteColor; // r0\n  int v23; // [sp+Ch] [bp-28h]\n  int v24; // [sp+1Ch] [bp-18h]\n\n  if ( a2 )\n    a3 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(a2, a2);\n  if ( a3 )\n  {\n    v7 = 0;\n    v8 = 1;\n    v9 = flt_D2C4E0;\n    v10 = flt_D2C4E4;\n    v23 = *(_DWORD *)&byte_D2C4EC;\n    v11 = flt_D2C4E8;\n    while ( 1 )\n    {\n      if ( v7 >= cocos2d::CCArray::count(a3) )\n      {\n        v14 = v9;\n        v15 = v10;\n        v16 = v11;\n        v17 = v23;\n        goto LABEL_11;\n      }\n      v12 = cocos2d::CCArray::objectAtIndex(a3, v7);\n      v13 = *(_DWORD *)(v12 + 892);\n      if ( v13 == 1006 || v13 == 899 )\n      {\n        if ( a4 != 1 )\n          goto LABEL_23;\n        v18 = *(float *)(v12 + 1432);\n        v24 = *(_DWORD *)(v12 + 1444);\n        v19 = *(float *)(v12 + 1436);\n        v20 = *(float *)(v12 + 1440);\n      }\n      else\n      {\n        RelativeSpriteColor = GameObject::getRelativeSpriteColor((GameObject *)v12, a4);\n        if ( !RelativeSpriteColor )\n          goto LABEL_23;\n        v18 = *(float *)(RelativeSpriteColor + 16);\n        v19 = *(float *)(RelativeSpriteColor + 20);\n        v20 = *(float *)(RelativeSpriteColor + 24);\n        v24 = *(_DWORD *)(RelativeSpriteColor + 28);\n      }\n      if ( v18 != -0.001 )\n      {\n        if ( v8 )\n        {\n          v8 = 0;\n          v11 = v20;\n          v10 = v19;\n          v23 = v24;\n          v9 = v18;\n        }\n        else if ( v9 != v18 || v10 != v19 || v11 != v20 || (unsigned __int16)v23 != (unsigned __int16)v24 )\n        {\n          *(_DWORD *)this = -1165815185;\n          *((_DWORD *)this + 1) = 0;\n          *((_DWORD *)this + 2) = 0;\n          *((_BYTE *)this + 12) = 0;\n          *((_BYTE *)this + 13) = 0;\n          return this;\n        }\n      }\nLABEL_23:\n      ++v7;\n    }\n  }\n  v14 = flt_D2C4E0;\n  v15 = flt_D2C4E4;\n  v16 = flt_D2C4E8;\n  v17 = *(_DWORD *)&byte_D2C4EC;\nLABEL_11:\n  *(float *)this = v14;\n  *((float *)this + 1) = v15;\n  *((float *)this + 2) = v16;\n  *((_DWORD *)this + 3) = v17;\n  return this;\n}", "assembly": "; \n; ConfigureHSVWidget::getHSV from 0x5e4c0c to 0x5e4d62 (342 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::getHSV @ 0x57e40c\n; > HSVLiveOverlay::createHSVWidget @ 0x69c3aa\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:54:19 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x5e4c0c\nMOV             R4, R0                                                 ; +0x4, 0x5e4c10\nVPUSH           {D8-D9}                                                ; +0x6, 0x5e4c12\nMOV             R8, R2                                                 ; +0xa, 0x5e4c16\nMOV             R9, R3                                                 ; +0xc, 0x5e4c18\nSUB             SP, SP, #0x34                                          ; +0xe, 0x5e4c1a\nCBZ             R1, loc_5E4C26                                         ; +0x10, 0x5e4c1c\nMOV             R0, R1; this                                           ; +0x12, 0x5e4c1e\nBL              _ZN7cocos2d7CCArray16createWithObjectEPNS_8CCObjectE; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0x14, 0x5e4c20\nMOV             R8, R0                                                 ; +0x18, 0x5e4c24\nCMP.W           R8, #0                                                 ; +0x1a, 0x5e4c26\nBEQ             loc_5E4C8C                                             ; +0x1e, 0x5e4c2a\nLDR             R6, =(flt_D2C4E0 - 0x5E4C3A)                           ; +0x20, 0x5e4c2c\nMOV             R5, SP                                                 ; +0x22, 0x5e4c2e\nVLDR            S19, =-0.001                                           ; +0x24, 0x5e4c30\nMOVS            R7, #0                                                 ; +0x28, 0x5e4c34\nADD             R6, PC; flt_D2C4E0                                     ; +0x2a, 0x5e4c36\nMOV.W           R10, #1                                                ; +0x2c, 0x5e4c38\nMOVW            R11, #0x3EE                                            ; +0x30, 0x5e4c3c\nLDM.W           R6, {R0-R3}                                            ; +0x34, 0x5e4c40\nVLDR            S16, [R6]                                              ; +0x38, 0x5e4c44\nVLDR            S18, [R6,#(flt_D2C4E4 - 0xD2C4E0)]                     ; +0x3c, 0x5e4c48\nSTMEA.W         SP, {R0-R3}                                            ; +0x40, 0x5e4c4c\nVLDR            S17, [R6,#(flt_D2C4E8 - 0xD2C4E0)]                     ; +0x44, 0x5e4c50\nMOV             R0, R8; this                                           ; +0x48, 0x5e4c54\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x4a, 0x5e4c56\nCMP             R7, R0                                                 ; +0x4e, 0x5e4c5a\nBCS             loc_5E4C7A                                             ; +0x50, 0x5e4c5c\nMOV             R0, R8; this                                           ; +0x52, 0x5e4c5e\nMOV             R1, R7; unsigned int                                   ; +0x54, 0x5e4c60\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x56, 0x5e4c62\nLDR.W           R2, [R0,#0x37C]                                        ; +0x5a, 0x5e4c66\nMOV             R3, R0                                                 ; +0x5e, 0x5e4c6a\nCMP             R2, R11                                                ; +0x60, 0x5e4c6c\nBEQ             loc_5E4C98                                             ; +0x62, 0x5e4c6e\nMOVW            R1, #0x383                                             ; +0x64, 0x5e4c70\nCMP             R2, R1                                                 ; +0x68, 0x5e4c74\nBNE             loc_5E4CBE                                             ; +0x6a, 0x5e4c76\nB               loc_5E4C98                                             ; +0x6c, 0x5e4c78\nVSTR            S16, [SP,#0x34+var_34]                                 ; +0x6e, 0x5e4c7a\nVSTR            S18, [SP,#0x34+var_30]                                 ; +0x72, 0x5e4c7e\nVSTR            S17, [SP,#0x34+var_2C]                                 ; +0x76, 0x5e4c82\nLDM.W           R5, {R0-R3}                                            ; +0x7a, 0x5e4c86\nB               loc_5E4C92                                             ; +0x7e, 0x5e4c8a\nLDR             R3, =(flt_D2C4E0 - 0x5E4C92)                           ; +0x80, 0x5e4c8c\nADD             R3, PC; flt_D2C4E0                                     ; +0x82, 0x5e4c8e\nLDM             R3, {R0-R3}                                            ; +0x84, 0x5e4c90\nSTM.W           R4, {R0-R3}                                            ; +0x86, 0x5e4c92\nB               loc_5E4D56                                             ; +0x8a, 0x5e4c96\nCMP.W           R9, #1                                                 ; +0x8c, 0x5e4c98\nBNE             loc_5E4D42                                             ; +0x90, 0x5e4c9c\nADD.W           R3, R3, #0x598                                         ; +0x92, 0x5e4c9e\nADD             R6, SP, #0x34+var_14                                   ; +0x96, 0x5e4ca2\nLDM             R3, {R0-R3}                                            ; +0x98, 0x5e4ca4\nSTM.W           R6, {R0-R3}                                            ; +0x9a, 0x5e4ca6\nADD             R6, SP, #0x34+var_24                                   ; +0x9e, 0x5e4caa\nVLDR            S15, [SP,#0x34+var_14]                                 ; +0xa0, 0x5e4cac\nSTM.W           R6, {R0-R3}                                            ; +0xa4, 0x5e4cb0\nVLDR            S13, [SP,#0x34+var_10]                                 ; +0xa8, 0x5e4cb4\nVLDR            S14, [SP,#0x34+var_C]                                  ; +0xac, 0x5e4cb8\nB               loc_5E4CE2                                             ; +0xb0, 0x5e4cbc\nMOV             R1, R9; int                                            ; +0xb2, 0x5e4cbe\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0xb4, 0x5e4cc0\nMOV             LR, R0                                                 ; +0xb8, 0x5e4cc4\nCMP             R0, #0                                                 ; +0xba, 0x5e4cc6\nBEQ             loc_5E4D42                                             ; +0xbc, 0x5e4cc8\nADD.W           R3, LR, #0x10                                          ; +0xbe, 0x5e4cca\nVLDR            S15, [LR,#0x10]                                        ; +0xc2, 0x5e4cce\nADD             R6, SP, #0x34+var_24                                   ; +0xc6, 0x5e4cd2\nLDM             R3, {R0-R3}                                            ; +0xc8, 0x5e4cd4\nVLDR            S13, [LR,#0x14]                                        ; +0xca, 0x5e4cd6\nVLDR            S14, [LR,#0x18]                                        ; +0xce, 0x5e4cda\nSTM.W           R6, {R0-R3}                                            ; +0xd2, 0x5e4cde\nVCMP.F32        S15, S19                                               ; +0xd6, 0x5e4ce2\nVMRS            APSR_nzcv, FPSCR                                       ; +0xda, 0x5e4ce6\nBEQ             loc_5E4D42                                             ; +0xde, 0x5e4cea\nCMP.W           R10, #0                                                ; +0xe0, 0x5e4cec\nBEQ             loc_5E4D18                                             ; +0xe4, 0x5e4cf0\nVSTR            S15, [SP,#0x34+var_24]                                 ; +0xe6, 0x5e4cf2\nADD             R3, SP, #0x34+var_24                                   ; +0xea, 0x5e4cf6\nMOV.W           R10, #0                                                ; +0xec, 0x5e4cf8\nVSTR            S13, [SP,#0x34+var_20]                                 ; +0xf0, 0x5e4cfc\nVSTR            S14, [SP,#0x34+var_1C]                                 ; +0xf4, 0x5e4d00\nVMOV.F32        S17, S14                                               ; +0xf8, 0x5e4d04\nLDM             R3, {R0-R3}                                            ; +0xfc, 0x5e4d08\nVMOV.F32        S18, S13                                               ; +0xfe, 0x5e4d0a\nSTM.W           R5, {R0-R3}                                            ; +0x102, 0x5e4d0e\nVMOV.F32        S16, S15                                               ; +0x106, 0x5e4d12\nB               loc_5E4D42                                             ; +0x10a, 0x5e4d16\nVCMP.F32        S16, S15                                               ; +0x10c, 0x5e4d18\nVMRS            APSR_nzcv, FPSCR                                       ; +0x110, 0x5e4d1c\nBNE             loc_5E4D46                                             ; +0x114, 0x5e4d20\nVCMP.F32        S18, S13                                               ; +0x116, 0x5e4d22\nVMRS            APSR_nzcv, FPSCR                                       ; +0x11a, 0x5e4d26\nBNE             loc_5E4D46                                             ; +0x11e, 0x5e4d2a\nVCMP.F32        S17, S14                                               ; +0x120, 0x5e4d2c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x124, 0x5e4d30\nBNE             loc_5E4D46                                             ; +0x128, 0x5e4d34\nLDRH.W          R2, [SP,#0x34+var_28]                                  ; +0x12a, 0x5e4d36\nLDRH.W          R3, [SP,#0x34+var_18]                                  ; +0x12e, 0x5e4d3a\nCMP             R2, R3                                                 ; +0x132, 0x5e4d3e\nBNE             loc_5E4D46                                             ; +0x134, 0x5e4d40\nADDS            R7, #1                                                 ; +0x136, 0x5e4d42\nB               loc_5E4C54                                             ; +0x138, 0x5e4d44\nLDR             R3, =0xBA83126F                                        ; +0x13a, 0x5e4d46\nSTR             R3, [R4]                                               ; +0x13c, 0x5e4d48\nMOVS            R3, #0                                                 ; +0x13e, 0x5e4d4a\nSTR             R3, [R4,#4]                                            ; +0x140, 0x5e4d4c\nSTR             R3, [R4,#8]                                            ; +0x142, 0x5e4d4e\nMOVS            R3, #0                                                 ; +0x144, 0x5e4d50\nSTRB            R3, [R4,#0xC]                                          ; +0x146, 0x5e4d52\nSTRB            R3, [R4,#0xD]                                          ; +0x148, 0x5e4d54\nMOV             R0, R4                                                 ; +0x14a, 0x5e4d56\nADD             SP, SP, #0x34 ; '4'                                    ; +0x14c, 0x5e4d58\nVPOP            {D8-D9}                                                ; +0x14e, 0x5e4d5a\nPOP.W           {R4-R11,PC}                                            ; +0x152, 0x5e4d5e", "xrefs": ["CustomizeObjectLayer::getHSV @ 0x57e40c", "HSVLiveOverlay::createHSVWidget @ 0x69c3aa"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}