{"type": "func", "start": 5109780, "end": 5110088, "name": "ColorSelectPopup::colorSelectClosed", "pseudocode": "// \n// ColorSelectPopup::colorSelectClosed from 0x4df814 to 0x4df948 (308 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'ColorSelectPopup::colorSelectClosed @ 0x4df958\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:50:59 +0000\n// \n\nEffectGameObject *__fastcall ColorSelectPopup::colorSelectClosed(\n        EffectGameObject *this,\n        GJSpecialColorSelect *a2,\n        GJSpecialColorSelect *a3,\n        int a4)\n{\n  EffectGameObject *v5; // r4\n  int v7; // r8\n  float *v8; // r8\n  int v9; // r1\n  const char *v10; // r0\n  const char *v11; // r6\n  size_t v12; // r0\n  int v13; // r8\n  float *v14; // r8\n  int v15; // r1\n  const char *v16; // r0\n  const char *v17; // r6\n  size_t v18; // r0\n  EffectGameObject *v19; // [sp+0h] [bp-10h] BYREF\n  GJSpecialColorSelect *v20; // [sp+4h] [bp-Ch]\n  GJSpecialColorSelect *v21; // [sp+8h] [bp-8h]\n  int v22; // [sp+Ch] [bp-4h]\n\n  v19 = this;\n  v20 = a2;\n  v21 = a3;\n  v22 = a4;\n  v5 = this;\n  if ( (int)a3 >= 1000 )\n  {\n    if ( (*(int (__fastcall **)(GJSpecialColorSelect *))(*(_DWORD *)a2 + 32))(a2) == 6 )\n    {\n      v7 = *((_DWORD *)v5 + 197);\n      *((_DWORD *)v5 + 200) = a3;\n      *((_BYTE *)v5 + 568) = 1;\n      v19 = nullptr;\n      v20 = nullptr;\n      v21 = nullptr;\n      std::string::__init((int *)&v19, \"0\", 1u);\n      CCTextInputNode::setString(v7, (int)&v19);\n      std::string::~string((int)&v19);\n      v8 = *((float **)v5 + 197);\n      v10 = (const char *)GJSpecialColorSelect::textForColorIdx(a3, v9);\n      v19 = nullptr;\n      v20 = nullptr;\n      v21 = nullptr;\n      v11 = v10;\n      v12 = strlen(v10);\n      std::string::__init((int *)&v19, v11, v12);\n      CCTextInputNode::updateLabel(v8, (int)&v19);\n      std::string::~string((int)&v19);\n      ColorSelectPopup::updateCustomColorIdx(v5);\n      this = (EffectGameObject *)SetupTriggerPopup::updateEditorLabel(v5);\n    }\n    else\n    {\n      this = (EffectGameObject *)(*(int (__fastcall **)(GJSpecialColorSelect *))(*(_DWORD *)a2 + 32))(a2);\n      if ( this != (EffectGameObject *)&byte_7 )\n        return this;\n      v13 = *((_DWORD *)v5 + 211);\n      *((_DWORD *)v5 + 202) = a3;\n      *((_BYTE *)v5 + 568) = 1;\n      v19 = nullptr;\n      v20 = nullptr;\n      v21 = nullptr;\n      std::string::__init((int *)&v19, \"0\", 1u);\n      CCTextInputNode::setString(v13, (int)&v19);\n      std::string::~string((int)&v19);\n      v14 = *((float **)v5 + 211);\n      v16 = (const char *)GJSpecialColorSelect::textForColorIdx(a3, v15);\n      v19 = nullptr;\n      v20 = nullptr;\n      v21 = nullptr;\n      v17 = v16;\n      v18 = strlen(v16);\n      std::string::__init((int *)&v19, v17, v18);\n      CCTextInputNode::updateLabel(v14, (int)&v19);\n      std::string::~string((int)&v19);\n      this = ColorSelectPopup::updateCopyColor(v5);\n    }\n    *((_BYTE *)v5 + 568) = 0;\n  }\n  return this;\n}", "assembly": "; \n; ColorSelectPopup::colorSelectClosed from 0x4df814 to 0x4df948 (308 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'ColorSelectPopup::colorSelectClosed @ 0x4df958\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:50:59 +0000\n; \nPUSH.W          {R0-R8,LR}                                             ; +0x0, 0x4df814\nMOV             R6, R2                                                 ; +0x4, 0x4df818\nLDR             R3, =(__stack_chk_guard_ptr - 0x4DF828)                ; +0x6, 0x4df81a\nCMP.W           R6, #0x3E8                                             ; +0x8, 0x4df81c\nMOV             R4, R0                                                 ; +0xc, 0x4df820\nMOV             R5, R1                                                 ; +0xe, 0x4df822\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x10, 0x4df824\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x12, 0x4df826\nLDR             R2, [R3]                                               ; +0x14, 0x4df828\nMOV             R7, R3                                                 ; +0x16, 0x4df82a\nSTR             R2, [SP,#0x10+var_4]                                   ; +0x18, 0x4df82c\nBLT.W           loc_4DF936                                             ; +0x1a, 0x4df82e\nLDR             R3, [R1]                                               ; +0x1e, 0x4df832\nMOV             R0, R1                                                 ; +0x20, 0x4df834\nLDR             R3, [R3,#0x20]                                         ; +0x22, 0x4df836\nBLX             R3                                                     ; +0x24, 0x4df838\nCMP             R0, #6                                                 ; +0x26, 0x4df83a\nBNE             loc_4DF8AC                                             ; +0x28, 0x4df83c\nLDR.W           R8, [R4,#0x314]                                        ; +0x2a, 0x4df83e\nMOVS            R2, #1                                                 ; +0x2e, 0x4df842\nLDR             R1, =(a0 - 0x4DF852); \"0\"                              ; +0x30, 0x4df844\nMOV             R0, SP                                                 ; +0x32, 0x4df846\nSTR.W           R6, [R4,#0x320]                                        ; +0x34, 0x4df848\nMOVS            R3, #0                                                 ; +0x38, 0x4df84c\nADD             R1, PC; \"0\"                                            ; +0x3a, 0x4df84e\nSTRB.W          R2, [R4,#0x238]                                        ; +0x3c, 0x4df850\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x40, 0x4df854\nMOV             R5, SP                                                 ; +0x42, 0x4df856\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x44, 0x4df858\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x46, 0x4df85a\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x48, 0x4df85c\nMOV             R0, R8                                                 ; +0x4c, 0x4df860\nMOV             R1, SP                                                 ; +0x4e, 0x4df862\nBL              _ZN15CCTextInputNode9setStringENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; CCTextInputNode::setString(std::string) ; +0x50, 0x4df864\nMOV             R0, SP                                                 ; +0x54, 0x4df868\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x56, 0x4df86a\nMOV             R0, R6; this                                           ; +0x5a, 0x4df86e\nLDR.W           R8, [R4,#0x314]                                        ; +0x5c, 0x4df870\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x60, 0x4df874\nMOVS            R3, #0                                                 ; +0x64, 0x4df878\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x66, 0x4df87a\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x68, 0x4df87c\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x6a, 0x4df87e\nMOV             R6, R0                                                 ; +0x6c, 0x4df880\nBLX             strlen                                                 ; +0x6e, 0x4df882\nMOV             R1, R6                                                 ; +0x72, 0x4df886\nMOV             R2, R0                                                 ; +0x74, 0x4df888\nMOV             R0, SP                                                 ; +0x76, 0x4df88a\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x78, 0x4df88c\nMOV             R0, R8                                                 ; +0x7c, 0x4df890\nMOV             R1, SP                                                 ; +0x7e, 0x4df892\nBL              _ZN15CCTextInputNode11updateLabelENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; CCTextInputNode::updateLabel(std::string) ; +0x80, 0x4df894\nMOV             R0, SP                                                 ; +0x84, 0x4df898\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x86, 0x4df89a\nMOV             R0, R4; this                                           ; +0x8a, 0x4df89e\nBL              _ZN16ColorSelectPopup20updateCustomColorIdxEv; ColorSelectPopup::updateCustomColorIdx(void) ; +0x8c, 0x4df8a0\nMOV             R0, R4; this                                           ; +0x90, 0x4df8a4\nBL              _ZN17SetupTriggerPopup17updateEditorLabelEv; SetupTriggerPopup::updateEditorLabel(void) ; +0x92, 0x4df8a6\nB               loc_4DF91E                                             ; +0x96, 0x4df8aa\nLDR             R3, [R5]                                               ; +0x98, 0x4df8ac\nMOV             R0, R5                                                 ; +0x9a, 0x4df8ae\nLDR             R3, [R3,#0x20]                                         ; +0x9c, 0x4df8b0\nBLX             R3                                                     ; +0x9e, 0x4df8b2\nCMP             R0, #7                                                 ; +0xa0, 0x4df8b4\nBNE             loc_4DF936                                             ; +0xa2, 0x4df8b6\nLDR.W           R8, [R4,#0x34C]                                        ; +0xa4, 0x4df8b8\nMOVS            R2, #1                                                 ; +0xa8, 0x4df8bc\nLDR             R1, =(a0 - 0x4DF8CC); \"0\"                              ; +0xaa, 0x4df8be\nMOV             R0, SP                                                 ; +0xac, 0x4df8c0\nSTR.W           R6, [R4,#0x328]                                        ; +0xae, 0x4df8c2\nMOVS            R3, #0                                                 ; +0xb2, 0x4df8c6\nADD             R1, PC; \"0\"                                            ; +0xb4, 0x4df8c8\nSTRB.W          R2, [R4,#0x238]                                        ; +0xb6, 0x4df8ca\nSTR             R3, [SP,#0x10+var_10]                                  ; +0xba, 0x4df8ce\nMOV             R5, SP                                                 ; +0xbc, 0x4df8d0\nSTR             R3, [SP,#0x10+var_C]                                   ; +0xbe, 0x4df8d2\nSTR             R3, [SP,#0x10+var_8]                                   ; +0xc0, 0x4df8d4\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0xc2, 0x4df8d6\nMOV             R0, R8                                                 ; +0xc6, 0x4df8da\nMOV             R1, SP                                                 ; +0xc8, 0x4df8dc\nBL              _ZN15CCTextInputNode9setStringENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; CCTextInputNode::setString(std::string) ; +0xca, 0x4df8de\nMOV             R0, SP                                                 ; +0xce, 0x4df8e2\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xd0, 0x4df8e4\nMOV             R0, R6; this                                           ; +0xd4, 0x4df8e8\nLDR.W           R8, [R4,#0x34C]                                        ; +0xd6, 0x4df8ea\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0xda, 0x4df8ee\nMOVS            R3, #0                                                 ; +0xde, 0x4df8f2\nSTR             R3, [SP,#0x10+var_10]                                  ; +0xe0, 0x4df8f4\nSTR             R3, [SP,#0x10+var_C]                                   ; +0xe2, 0x4df8f6\nSTR             R3, [SP,#0x10+var_8]                                   ; +0xe4, 0x4df8f8\nMOV             R6, R0                                                 ; +0xe6, 0x4df8fa\nBLX             strlen                                                 ; +0xe8, 0x4df8fc\nMOV             R1, R6                                                 ; +0xec, 0x4df900\nMOV             R2, R0                                                 ; +0xee, 0x4df902\nMOV             R0, SP                                                 ; +0xf0, 0x4df904\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0xf2, 0x4df906\nMOV             R0, R8                                                 ; +0xf6, 0x4df90a\nMOV             R1, SP                                                 ; +0xf8, 0x4df90c\nBL              _ZN15CCTextInputNode11updateLabelENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; CCTextInputNode::updateLabel(std::string) ; +0xfa, 0x4df90e\nMOV             R0, SP                                                 ; +0xfe, 0x4df912\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x100, 0x4df914\nMOV             R0, R4; this                                           ; +0x104, 0x4df918\nBL              _ZN16ColorSelectPopup15updateCopyColorEv; ColorSelectPopup::updateCopyColor(void) ; +0x106, 0x4df91a\nMOVS            R3, #0                                                 ; +0x10a, 0x4df91e\nSTRB.W          R3, [R4,#0x238]                                        ; +0x10c, 0x4df920\nB               loc_4DF936                                             ; +0x110, 0x4df924\nB               loc_4DF928                                             ; +0x112, 0x4df926\nMOV             R0, R5                                                 ; +0x114, 0x4df928\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x116, 0x4df92a\nBL              __cxa_end_cleanup                                      ; +0x11a, 0x4df92e\nB               loc_4DF928                                             ; +0x11e, 0x4df932\nB               loc_4DF928                                             ; +0x120, 0x4df934\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x122, 0x4df936\nLDR             R3, [R7]                                               ; +0x124, 0x4df938\nCMP             R2, R3                                                 ; +0x126, 0x4df93a\nBEQ             loc_4DF942                                             ; +0x128, 0x4df93c\nBLX             __stack_chk_fail                                       ; +0x12a, 0x4df93e\nADD             SP, SP, #0x10                                          ; +0x12e, 0x4df942\nPOP.W           {R4-R8,PC}                                             ; +0x130, 0x4df944", "xrefs": ["`non-virtual thunk to'ColorSelectPopup::colorSelectClosed @ 0x4df958"], "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"}