{"type": "func", "start": 6766044, "end": 6766252, "name": "BrowseSmartKeyLayer::updateChanceValues", "pseudocode": "// \n// BrowseSmartKeyLayer::updateChanceValues from 0x673ddc to 0x673eac (208 bytes)\n// \n// 2 xrefs:\n// > BrowseSmartKeyLayer::deletedSelectedItems @ 0x673f54\n// > BrowseSmartKeyLayer::addChanceToSelected @ 0x673ffe\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:55:54 +0000\n// \n\nunsigned int __fastcall BrowseSmartKeyLayer::updateChanceValues(BrowseSmartKeyLayer *this)\n{\n  char *v1; // r9\n  int v2; // r7\n  int v4; // r2\n  int v5; // r3\n  unsigned int i; // r6\n  unsigned int result; // r0\n  unsigned int v8; // r7\n  cocos2d::CCArray *v9; // r10\n  int v10; // r0\n  int v11; // r0\n  int v12; // r11\n  GJSmartBlockPreview *v13; // r8\n  int v14; // r0\n  int PrefabWithID; // r11\n  const char *TotalChanceForPrefab; // [sp+0h] [bp-1Ch]\n  int v17[3]; // [sp+8h] [bp-14h] BYREF\n\n  v1 = (char *)this + 544;\n  v2 = *((_DWORD *)this + 130);\n  std::string::basic_string(v17, (int)this + 544);\n  TotalChanceForPrefab = (const char *)GJSmartTemplate::getTotalChanceForPrefab(v2, (int)v17, v4, v5);\n  std::string::~string((int)v17);\n  for ( i = 0; ; ++i )\n  {\n    result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 131));\n    if ( i >= result )\n      break;\n    v8 = 0;\n    v9 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 131), i);\n    while ( v8 < cocos2d::CCArray::count(v9) )\n    {\n      v10 = cocos2d::CCArray::objectAtIndex(v9, v8);\n      v11 = (*(int (__fastcall **)(int))(*(_DWORD *)v10 + 536))(v10);\n      v12 = *((_DWORD *)this + 130);\n      v13 = (GJSmartBlockPreview *)v11;\n      std::string::basic_string(v17, (int)v1);\n      v14 = (*(int (__fastcall **)(GJSmartBlockPreview *))(*(_DWORD *)v13 + 32))(v13);\n      PrefabWithID = GJSmartTemplate::getPrefabWithID(v12, (int)v17, v14);\n      std::string::~string((int)v17);\n      if ( PrefabWithID )\n        GJSmartBlockPreview::addChance(v13, *(const char **)(PrefabWithID + 80), TotalChanceForPrefab);\n      ++v8;\n    }\n  }\n  return result;\n}", "assembly": "; \n; BrowseSmartKeyLayer::updateChanceValues from 0x673ddc to 0x673eac (208 bytes)\n; \n; 2 xrefs:\n; > BrowseSmartKeyLayer::deletedSelectedItems @ 0x673f54\n; > BrowseSmartKeyLayer::addChanceToSelected @ 0x673ffe\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:55:54 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x673ddc\nSUB             SP, SP, #0x1C                                          ; +0x4, 0x673de0\nLDR             R6, =(__stack_chk_guard_ptr - 0x673DF2)                ; +0x6, 0x673de2\nADD.W           R9, R0, #0x220                                         ; +0x8, 0x673de4\nLDR.W           R7, [R0,#0x208]                                        ; +0xc, 0x673de8\nADD             R4, SP, #0x1C+var_14                                   ; +0x10, 0x673dec\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x12, 0x673dee\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x14, 0x673df0\nMOV             R1, R9                                                 ; +0x16, 0x673df2\nMOV             R5, R0                                                 ; +0x18, 0x673df4\nMOV             R0, R4                                                 ; +0x1a, 0x673df6\nLDR             R3, [R6]                                               ; +0x1c, 0x673df8\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x1e, 0x673dfa\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x20, 0x673dfc\nMOV             R0, R7                                                 ; +0x24, 0x673e00\nMOV             R1, R4                                                 ; +0x26, 0x673e02\nSTR             R6, [SP,#0x1C+var_18]                                  ; +0x28, 0x673e04\nBL              _ZN15GJSmartTemplate23getTotalChanceForPrefabENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; GJSmartTemplate::getTotalChanceForPrefab(std::string) ; +0x2a, 0x673e06\nSTR             R0, [SP,#0x1C+var_1C]                                  ; +0x2e, 0x673e0a\nMOV             R0, R4                                                 ; +0x30, 0x673e0c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x32, 0x673e0e\nMOVS            R6, #0                                                 ; +0x36, 0x673e12\nLDR.W           R0, [R5,#0x20C]; this                                  ; +0x38, 0x673e14\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x3c, 0x673e18\nCMP             R6, R0                                                 ; +0x40, 0x673e1c\nBCS             loc_673E98                                             ; +0x42, 0x673e1e\nLDR.W           R0, [R5,#0x20C]; this                                  ; +0x44, 0x673e20\nMOV             R1, R6; unsigned int                                   ; +0x48, 0x673e24\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x4a, 0x673e26\nMOVS            R7, #0                                                 ; +0x4e, 0x673e2a\nMOV             R10, R0                                                ; +0x50, 0x673e2c\nMOV             R0, R10; this                                          ; +0x52, 0x673e2e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x54, 0x673e30\nCMP             R7, R0                                                 ; +0x58, 0x673e34\nBCS             loc_673E88                                             ; +0x5a, 0x673e36\nMOV             R1, R7; unsigned int                                   ; +0x5c, 0x673e38\nMOV             R0, R10; this                                          ; +0x5e, 0x673e3a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x60, 0x673e3c\nLDR             R3, [R0]                                               ; +0x64, 0x673e40\nLDR.W           R3, [R3,#0x218]                                        ; +0x66, 0x673e42\nBLX             R3                                                     ; +0x6a, 0x673e46\nMOV             R1, R9                                                 ; +0x6c, 0x673e48\nLDR.W           R11, [R5,#0x208]                                       ; +0x6e, 0x673e4a\nMOV             R8, R0                                                 ; +0x72, 0x673e4e\nMOV             R0, R4                                                 ; +0x74, 0x673e50\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x76, 0x673e52\nLDR.W           R3, [R8]                                               ; +0x7a, 0x673e56\nMOV             R0, R8                                                 ; +0x7e, 0x673e5a\nLDR             R3, [R3,#0x20]                                         ; +0x80, 0x673e5c\nBLX             R3                                                     ; +0x82, 0x673e5e\nMOV             R2, R0                                                 ; +0x84, 0x673e60\nMOV             R1, R4                                                 ; +0x86, 0x673e62\nMOV             R0, R11                                                ; +0x88, 0x673e64\nBL              _ZN15GJSmartTemplate15getPrefabWithIDENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEi; GJSmartTemplate::getPrefabWithID(std::string,int) ; +0x8a, 0x673e66\nMOV             R11, R0                                                ; +0x8e, 0x673e6a\nMOV             R0, R4                                                 ; +0x90, 0x673e6c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x92, 0x673e6e\nCMP.W           R11, #0                                                ; +0x96, 0x673e72\nBEQ             loc_673E84                                             ; +0x9a, 0x673e76\nMOV             R0, R8; this                                           ; +0x9c, 0x673e78\nLDR.W           R1, [R11,#0x50]; int                                   ; +0x9e, 0x673e7a\nLDR             R2, [SP,#0x1C+var_1C]; int                             ; +0xa2, 0x673e7e\nBL              _ZN19GJSmartBlockPreview9addChanceEii; GJSmartBlockPreview::addChance(int,int) ; +0xa4, 0x673e80\nADDS            R7, #1                                                 ; +0xa8, 0x673e84\nB               loc_673E2E                                             ; +0xaa, 0x673e86\nADDS            R6, #1                                                 ; +0xac, 0x673e88\nB               loc_673E14                                             ; +0xae, 0x673e8a\nB               loc_673E8E                                             ; +0xb0, 0x673e8c\nMOV             R0, R4                                                 ; +0xb2, 0x673e8e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xb4, 0x673e90\nBL              __cxa_end_cleanup                                      ; +0xb8, 0x673e94\nLDR             R3, [SP,#0x1C+var_18]                                  ; +0xbc, 0x673e98\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xbe, 0x673e9a\nLDR             R3, [R3]                                               ; +0xc0, 0x673e9c\nCMP             R2, R3                                                 ; +0xc2, 0x673e9e\nBEQ             loc_673EA6                                             ; +0xc4, 0x673ea0\nBLX             __stack_chk_fail                                       ; +0xc6, 0x673ea2\nADD             SP, SP, #0x1C                                          ; +0xca, 0x673ea6\nPOP.W           {R4-R11,PC}                                            ; +0xcc, 0x673ea8", "xrefs": ["BrowseSmartKeyLayer::deletedSelectedItems @ 0x673f54", "BrowseSmartKeyLayer::addChanceToSelected @ 0x673ffe"], "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"}