{"type": "func", "start": 8015736, "end": 8015928, "name": "ControlSlotsPopup::onSave", "pseudocode": "// \n// ControlSlotsPopup::onSave from 0x7a4f78 to 0x7a5038 (192 bytes)\n// \n// 0 xrefs:\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:59:56 +0000\n// \n\nint __fastcall ControlSlotsPopup::onSave(ControlSlotsPopup *this, cocos2d::CCObject *a2)\n{\n  const char *v3; // r4\n  cocos2d::CCDirector *v4; // r0\n  GameManager *v5; // r0\n  void (__fastcall *v6)(ControlSlotsPopup *, cocos2d::CCNode *, int); // r9\n  cocos2d::CCString *v7; // r0\n  const char *CString; // r6\n  size_t v9; // r0\n  cocos2d::CCNode *v10; // r0\n  int v12[3]; // [sp+Ch] [bp-20h] BYREF\n  int v13[3]; // [sp+18h] [bp-14h] BYREF\n\n  v3 = (const char *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n  v4 = *((cocos2d::CCDirector **)this + 178);\n  if ( v4 )\n    v4 = TouchControlEditLayer::commitToTarget(v4);\n  v5 = (GameManager *)GameManager::sharedState(v4);\n  GameManager::saveDPadLayout(v5, (int)v3, *((unsigned __int8 *)this + 716));\n  v6 = *(void (__fastcall **)(ControlSlotsPopup *, cocos2d::CCNode *, int))(*(_DWORD *)this + 232);\n  v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"Slot %i saved\", v3);\n  memset(v12, 0, sizeof(v12));\n  CString = (const char *)cocos2d::CCString::getCString(v7);\n  v9 = strlen(CString);\n  std::string::__init(v12, CString, v9);\n  memset(v13, 0, sizeof(v13));\n  std::string::__init(v13, &unk_B6B226, 0);\n  v10 = TextAlertPopup::create((int)v12, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v13);\n  v6(this, v10, 100);\n  std::string::~string((int)v13);\n  return std::string::~string((int)v12);\n}", "assembly": "; \n; ControlSlotsPopup::onSave from 0x7a4f78 to 0x7a5038 (192 bytes)\n; \n; 0 xrefs:\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:59:56 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x7a4f78\nSUB             SP, SP, #0x2C                                          ; +0x4, 0x7a4f7c\nLDR             R7, =(__stack_chk_guard_ptr - 0x7A4F88)                ; +0x6, 0x7a4f7e\nMOV             R8, R0                                                 ; +0x8, 0x7a4f80\nMOV             R0, R1                                                 ; +0xa, 0x7a4f82\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xc, 0x7a4f84\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xe, 0x7a4f86\nLDR             R3, [R7]                                               ; +0x10, 0x7a4f88\nSTR             R3, [SP,#0x2C+var_8]                                   ; +0x12, 0x7a4f8a\nLDR             R3, [R1]                                               ; +0x14, 0x7a4f8c\nLDR             R3, [R3,#0x20]                                         ; +0x16, 0x7a4f8e\nBLX             R3                                                     ; +0x18, 0x7a4f90\nMOV             R4, R0                                                 ; +0x1a, 0x7a4f92\nLDR.W           R0, [R8,#0x2C8]; this                                  ; +0x1c, 0x7a4f94\nCBZ             R0, loc_7A4F9E                                         ; +0x20, 0x7a4f98\nBL              _ZN21TouchControlEditLayer14commitToTargetEv; TouchControlEditLayer::commitToTarget(void) ; +0x22, 0x7a4f9a\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x26, 0x7a4f9e\nLDRB.W          R2, [R8,#0x2CC]; bool                                  ; +0x2a, 0x7a4fa2\nMOV             R1, R4; int                                            ; +0x2e, 0x7a4fa6\nADD             R5, SP, #0x2C+var_20                                   ; +0x30, 0x7a4fa8\nBL              _ZN11GameManager14saveDPadLayoutEib; GameManager::saveDPadLayout(int,bool) ; +0x32, 0x7a4faa\nLDR.W           R3, [R8]                                               ; +0x36, 0x7a4fae\nLDR             R0, =(aSlotISaved - 0x7A4FBC); \"Slot %i saved\"         ; +0x3a, 0x7a4fb2\nMOV             R1, R4; char *                                         ; +0x3c, 0x7a4fb4\nMOVS            R4, #0                                                 ; +0x3e, 0x7a4fb6\nADD             R0, PC; \"Slot %i saved\"                                ; +0x40, 0x7a4fb8\nLDR.W           R9, [R3,#0xE8]                                         ; +0x42, 0x7a4fba\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x46, 0x7a4fbe\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x4a, 0x7a4fc2\nSTR             R4, [SP,#0x2C+var_20]                                  ; +0x4e, 0x7a4fc6\nSTR             R4, [SP,#0x2C+var_1C]                                  ; +0x50, 0x7a4fc8\nSTR             R4, [SP,#0x2C+var_18]                                  ; +0x52, 0x7a4fca\nMOV             R6, R0                                                 ; +0x54, 0x7a4fcc\nBLX             strlen                                                 ; +0x56, 0x7a4fce\nMOV             R1, R6                                                 ; +0x5a, 0x7a4fd2\nADD             R6, SP, #0x2C+var_14                                   ; +0x5c, 0x7a4fd4\nMOV             R2, R0                                                 ; +0x5e, 0x7a4fd6\nMOV             R0, R5                                                 ; +0x60, 0x7a4fd8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x62, 0x7a4fda\nLDR             R1, =(unk_B6B226 - 0x7A4FE8)                           ; +0x66, 0x7a4fde\nMOV             R0, R6                                                 ; +0x68, 0x7a4fe0\nMOV             R2, R4                                                 ; +0x6a, 0x7a4fe2\nADD             R1, PC; unk_B6B226                                     ; +0x6c, 0x7a4fe4\nSTR             R4, [SP,#0x2C+var_14]                                  ; +0x6e, 0x7a4fe6\nSTR             R4, [SP,#0x2C+var_10]                                  ; +0x70, 0x7a4fe8\nSTR             R4, [SP,#0x2C+var_C]                                   ; +0x72, 0x7a4fea\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x74, 0x7a4fec\nSTR             R6, [SP,#0x2C+var_2C]                                  ; +0x78, 0x7a4ff0\nMOV             R0, R5                                                 ; +0x7a, 0x7a4ff2\nMOV.W           R1, #0x3F000000                                        ; +0x7c, 0x7a4ff4\nLDR             R2, =0x3F19999A                                        ; +0x80, 0x7a4ff8\nMOVS            R3, #0x96                                              ; +0x82, 0x7a4ffa\nBL              _ZN14TextAlertPopup6createENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEffiS6_; TextAlertPopup::create(std::string,float,float,int,std::string) ; +0x84, 0x7a4ffc\nMOV             R1, R0                                                 ; +0x88, 0x7a5000\nMOVS            R2, #0x64 ; 'd'                                        ; +0x8a, 0x7a5002\nMOV             R0, R8                                                 ; +0x8c, 0x7a5004\nBLX             R9                                                     ; +0x8e, 0x7a5006\nMOV             R0, R6                                                 ; +0x90, 0x7a5008\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x92, 0x7a500a\nMOV             R0, R5                                                 ; +0x96, 0x7a500e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x98, 0x7a5010\nLDR             R2, [SP,#0x2C+var_8]                                   ; +0x9c, 0x7a5014\nLDR             R3, [R7]                                               ; +0x9e, 0x7a5016\nCMP             R2, R3                                                 ; +0xa0, 0x7a5018\nBEQ             loc_7A5032                                             ; +0xa2, 0x7a501a\nBLX             __stack_chk_fail                                       ; +0xa4, 0x7a501c\nMOV             R0, R6                                                 ; +0xa8, 0x7a5020\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xaa, 0x7a5022\nB               loc_7A5028                                             ; +0xae, 0x7a5026\nMOV             R0, R5                                                 ; +0xb0, 0x7a5028\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xb2, 0x7a502a\nBL              __cxa_end_cleanup                                      ; +0xb6, 0x7a502e\nADD             SP, SP, #0x2C ; ','                                    ; +0xba, 0x7a5032\nPOP.W           {R4-R9,PC}                                             ; +0xbc, 0x7a5034", "xrefs": [], "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"}