{"type": "func", "start": 5374942832, "end": 5374943057, "name": "BrowseSmartKeyLayer::addChanceToSelected", "pseudocode": "// \n// BrowseSmartKeyLayer::addChanceToSelected from 0x1405f1e70 to 0x1405f1f51 (225 bytes)\n// \n// 3 xrefs:\n// > BrowseSmartKeyLayer::onButton @ 0x1405f19e3\n// > <???> @ 0x14092f2c4\n// > <???> @ 0x14092f2d0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:35:06 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall BrowseSmartKeyLayer::addChanceToSelected(__int64 a1, int a2, char a3)\n{\n  cocos2d::CCArray *AllSelectedBlocks; // r14\n  unsigned int v7; // ebp\n  __int64 v8; // rbx\n  struct cocos2d::CCObject *v9; // rsi\n  __int64 v10; // rdi\n  __int64 v11; // rbx\n  int v12; // eax\n  struct cocos2d::CCObject *PrefabWithID; // rax\n  _BYTE v15[72]; // [rsp+20h] [rbp-48h] BYREF\n\n  AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks(a1);\n  v7 = 0;\n  if ( cocos2d::CCArray::count(AllSelectedBlocks) )\n  {\n    v8 = a1 + 712;\n    do\n    {\n      v9 = cocos2d::CCArray::objectAtIndex(AllSelectedBlocks, v7);\n      v10 = sub_14003F4F0((__int64)v15, v8);\n      v11 = *(_QWORD *)(a1 + 664);\n      v12 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 56LL))(v9);\n      PrefabWithID = GJSmartTemplate::getPrefabWithID(v11, v10, v12);\n      if ( PrefabWithID )\n      {\n        if ( a3 )\n          *((_DWORD *)PrefabWithID + 31) = 0;\n        else\n          *((_DWORD *)PrefabWithID + 31) += a2;\n      }\n      ++v7;\n      v8 = a1 + 712;\n    }\n    while ( v7 < cocos2d::CCArray::count(AllSelectedBlocks) );\n  }\n  return BrowseSmartKeyLayer::updateChanceValues(a1);\n}", "assembly": "; \n; BrowseSmartKeyLayer::addChanceToSelected from 0x1405f1e70 to 0x1405f1f51 (225 bytes)\n; \n; 3 xrefs:\n; > BrowseSmartKeyLayer::onButton @ 0x1405f19e3\n; > <???> @ 0x14092f2c4\n; > <???> @ 0x14092f2d0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:35:06 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1405f1e70\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1405f1e75\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1405f1e7a\npush    rdi                                                            ; +0xf, 0x1405f1e7f\npush    r12                                                            ; +0x10, 0x1405f1e80\npush    r13                                                            ; +0x12, 0x1405f1e82\npush    r14                                                            ; +0x14, 0x1405f1e84\npush    r15                                                            ; +0x16, 0x1405f1e86\nsub     rsp, 40h                                                       ; +0x18, 0x1405f1e88\nmovzx   r12d, r8b                                                      ; +0x1c, 0x1405f1e8c\nmov     r13d, edx                                                      ; +0x20, 0x1405f1e90\nmov     r15, rcx                                                       ; +0x23, 0x1405f1e93\ncall    BrowseSmartKeyLayer__getAllSelectedBlocks                      ; +0x26, 0x1405f1e96\nmov     r14, rax                                                       ; +0x2b, 0x1405f1e9b\nxor     ebp, ebp                                                       ; +0x2e, 0x1405f1e9e\nmov     rcx, rax                                                       ; +0x30, 0x1405f1ea0\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x33, 0x1405f1ea3\ntest    eax, eax                                                       ; +0x39, 0x1405f1ea9\njz      short loc_1405F1F2A                                            ; +0x3b, 0x1405f1eab\nlea     rbx, [r15+2C8h]                                                ; +0x3d, 0x1405f1ead\nmov     edx, ebp                                                       ; +0x44, 0x1405f1eb4\nmov     rcx, r14                                                       ; +0x46, 0x1405f1eb6\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x49, 0x1405f1eb9\nmov     rsi, rax                                                       ; +0x4f, 0x1405f1ebf\nlea     rax, [rsp+68h+var_48]                                          ; +0x52, 0x1405f1ec2\nmov     [rsp+68h+arg_18], rax                                          ; +0x57, 0x1405f1ec7\nmov     rdx, rbx                                                       ; +0x5f, 0x1405f1ecf\nlea     rcx, [rsp+68h+var_48]                                          ; +0x62, 0x1405f1ed2\ncall    sub_14003F4F0                                                  ; +0x67, 0x1405f1ed7\nmov     rdi, rax                                                       ; +0x6c, 0x1405f1edc\nmov     rbx, [r15+298h]                                                ; +0x6f, 0x1405f1edf\nmov     rdx, [rsi]                                                     ; +0x76, 0x1405f1ee6\nmov     rcx, rsi                                                       ; +0x79, 0x1405f1ee9\ncall    qword ptr [rdx+38h]                                            ; +0x7c, 0x1405f1eec\nmov     r8d, eax                                                       ; +0x7f, 0x1405f1eef\nmov     rdx, rdi                                                       ; +0x82, 0x1405f1ef2\nmov     rcx, rbx                                                       ; +0x85, 0x1405f1ef5\ncall    GJSmartTemplate__getPrefabWithID                               ; +0x88, 0x1405f1ef8\ntest    rax, rax                                                       ; +0x8d, 0x1405f1efd\njz      short loc_1405F1F14                                            ; +0x90, 0x1405f1f00\ntest    r12b, r12b                                                     ; +0x92, 0x1405f1f02\njz      short loc_1405F1F10                                            ; +0x95, 0x1405f1f05\nmov     dword ptr [rax+7Ch], 0                                         ; +0x97, 0x1405f1f07\njmp     short loc_1405F1F14                                            ; +0x9e, 0x1405f1f0e\nadd     [rax+7Ch], r13d                                                ; +0xa0, 0x1405f1f10\ninc     ebp                                                            ; +0xa4, 0x1405f1f14\nmov     rcx, r14                                                       ; +0xa6, 0x1405f1f16\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa9, 0x1405f1f19\ncmp     ebp, eax                                                       ; +0xaf, 0x1405f1f1f\nlea     rbx, [r15+2C8h]                                                ; +0xb1, 0x1405f1f21\njb      short loc_1405F1EB4                                            ; +0xb8, 0x1405f1f28\nmov     rcx, r15                                                       ; +0xba, 0x1405f1f2a\nmov     rbx, [rsp+68h+arg_0]                                           ; +0xbd, 0x1405f1f2d\nmov     rbp, [rsp+68h+arg_8]                                           ; +0xc2, 0x1405f1f32\nmov     rsi, [rsp+68h+arg_10]                                          ; +0xc7, 0x1405f1f37\nadd     rsp, 40h                                                       ; +0xcf, 0x1405f1f3f\npop     r15                                                            ; +0xd3, 0x1405f1f43\npop     r14                                                            ; +0xd5, 0x1405f1f45\npop     r13                                                            ; +0xd7, 0x1405f1f47\npop     r12                                                            ; +0xd9, 0x1405f1f49\npop     rdi                                                            ; +0xdb, 0x1405f1f4b\njmp     BrowseSmartKeyLayer__updateChanceValues                        ; +0xdc, 0x1405f1f4c", "xrefs": ["BrowseSmartKeyLayer::onButton @ 0x1405f19e3", "<???> @ 0x14092f2c4", "<???> @ 0x14092f2d0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}