{"type": "func", "start": 6766460, "end": 6766624, "name": "BrowseSmartKeyLayer::addChanceToSelected", "pseudocode": "// \n// BrowseSmartKeyLayer::addChanceToSelected from 0x673f7c to 0x674020 (164 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::onButton @ 0x67424c\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::addChanceToSelected(cocos2d::CCArray **this, int a2, int a3)\n{\n  char *v5; // r10\n  unsigned int v6; // r4\n  cocos2d::CCArray *AllSelectedBlocks; // r7\n  int v8; // r0\n  int v9; // r11\n  int v10; // r0\n  int PrefabWithID; // r11\n  int v12; // r3\n  int v14; // [sp+0h] [bp-1Ch]\n  int v16[3]; // [sp+8h] [bp-14h] BYREF\n\n  v5 = (char *)(this + 136);\n  v6 = 0;\n  AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks(this);\n  while ( v6 < cocos2d::CCArray::count(AllSelectedBlocks) )\n  {\n    v8 = cocos2d::CCArray::objectAtIndex(AllSelectedBlocks, v6);\n    v14 = (int)*(this + 130);\n    v9 = v8;\n    std::string::basic_string(v16, (int)v5);\n    v10 = (*(int (__fastcall **)(int))(*(_DWORD *)v9 + 32))(v9);\n    PrefabWithID = GJSmartTemplate::getPrefabWithID(v14, (int)v16, v10);\n    std::string::~string((int)v16);\n    if ( PrefabWithID )\n    {\n      if ( a3 )\n        v12 = 0;\n      else\n        v12 = *(_DWORD *)(PrefabWithID + 80) + a2;\n      *(_DWORD *)(PrefabWithID + 80) = v12;\n    }\n    ++v6;\n  }\n  return BrowseSmartKeyLayer::updateChanceValues((BrowseSmartKeyLayer *)this);\n}", "assembly": "; \n; BrowseSmartKeyLayer::addChanceToSelected from 0x673f7c to 0x674020 (164 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::onButton @ 0x67424c\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, 0x673f7c\nSUB             SP, SP, #0x1C                                          ; +0x4, 0x673f80\nLDR             R5, =(__stack_chk_guard_ptr - 0x673F8E)                ; +0x6, 0x673f82\nMOV             R6, R0                                                 ; +0x8, 0x673f84\nMOV             R8, R1                                                 ; +0xa, 0x673f86\nSTR             R2, [SP,#0x1C+var_18]                                  ; +0xc, 0x673f88\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xe, 0x673f8a\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x10, 0x673f8c\nADD.W           R10, R6, #0x220                                        ; +0x12, 0x673f8e\nMOVS            R4, #0                                                 ; +0x16, 0x673f92\nLDR             R3, [R5]                                               ; +0x18, 0x673f94\nMOV             R9, R5                                                 ; +0x1a, 0x673f96\nADD             R5, SP, #0x1C+var_14                                   ; +0x1c, 0x673f98\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x1e, 0x673f9a\nBL              _ZN19BrowseSmartKeyLayer20getAllSelectedBlocksEv; BrowseSmartKeyLayer::getAllSelectedBlocks(void) ; +0x20, 0x673f9c\nMOV             R7, R0                                                 ; +0x24, 0x673fa0\nMOV             R0, R7; this                                           ; +0x26, 0x673fa2\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x28, 0x673fa4\nCMP             R4, R0                                                 ; +0x2c, 0x673fa8\nBCS             loc_673FFC                                             ; +0x2e, 0x673faa\nMOV             R1, R4; unsigned int                                   ; +0x30, 0x673fac\nMOV             R0, R7; this                                           ; +0x32, 0x673fae\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x34, 0x673fb0\nLDR.W           R3, [R6,#0x208]                                        ; +0x38, 0x673fb4\nMOV             R1, R10                                                ; +0x3c, 0x673fb8\nSTR             R3, [SP,#0x1C+var_1C]                                  ; +0x3e, 0x673fba\nMOV             R11, R0                                                ; +0x40, 0x673fbc\nMOV             R0, R5                                                 ; +0x42, 0x673fbe\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x44, 0x673fc0\nLDR.W           R2, [R11]                                              ; +0x48, 0x673fc4\nMOV             R0, R11                                                ; +0x4c, 0x673fc8\nLDR             R2, [R2,#0x20]                                         ; +0x4e, 0x673fca\nBLX             R2                                                     ; +0x50, 0x673fcc\nMOV             R2, R0                                                 ; +0x52, 0x673fce\nMOV             R1, R5                                                 ; +0x54, 0x673fd0\nLDR             R0, [SP,#0x1C+var_1C]                                  ; +0x56, 0x673fd2\nBL              _ZN15GJSmartTemplate15getPrefabWithIDENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEi; GJSmartTemplate::getPrefabWithID(std::string,int) ; +0x58, 0x673fd4\nMOV             R11, R0                                                ; +0x5c, 0x673fd8\nMOV             R0, R5                                                 ; +0x5e, 0x673fda\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x60, 0x673fdc\nCMP.W           R11, #0                                                ; +0x64, 0x673fe0\nBEQ             loc_673FF8                                             ; +0x68, 0x673fe4\nLDR             R3, [SP,#0x1C+var_18]                                  ; +0x6a, 0x673fe6\nCBZ             R3, loc_673FEE                                         ; +0x6c, 0x673fe8\nMOVS            R3, #0                                                 ; +0x6e, 0x673fea\nB               loc_673FF4                                             ; +0x70, 0x673fec\nLDR.W           R3, [R11,#0x50]                                        ; +0x72, 0x673fee\nADD             R3, R8                                                 ; +0x76, 0x673ff2\nSTR.W           R3, [R11,#0x50]                                        ; +0x78, 0x673ff4\nADDS            R4, #1                                                 ; +0x7c, 0x673ff8\nB               loc_673FA2                                             ; +0x7e, 0x673ffa\nMOV             R0, R6; this                                           ; +0x80, 0x673ffc\nBL              _ZN19BrowseSmartKeyLayer18updateChanceValuesEv; BrowseSmartKeyLayer::updateChanceValues(void) ; +0x82, 0x673ffe\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x86, 0x674002\nLDR.W           R3, [R9]                                               ; +0x88, 0x674004\nCMP             R2, R3                                                 ; +0x8c, 0x674008\nBEQ             loc_67401A                                             ; +0x8e, 0x67400a\nBLX             __stack_chk_fail                                       ; +0x90, 0x67400c\nMOV             R0, R5                                                 ; +0x94, 0x674010\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x96, 0x674012\nBL              __cxa_end_cleanup                                      ; +0x9a, 0x674016\nADD             SP, SP, #0x1C                                          ; +0x9e, 0x67401a\nPOP.W           {R4-R11,PC}                                            ; +0xa0, 0x67401c", "xrefs": ["BrowseSmartKeyLayer::onButton @ 0x67424c"], "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"}