{"type": "func", "start": 5373281088, "end": 5373281387, "name": "BrowseSmartKeyLayer::updateChanceValues", "pseudocode": "// \n// BrowseSmartKeyLayer::updateChanceValues from 0x14045c340 to 0x14045c46b (299 bytes)\n// \n// 4 xrefs:\n// > BrowseSmartKeyLayer::onButton @ 0x14045bf1f\n// > BrowseSmartKeyLayer::onButton @ 0x14045bfb1\n// > BrowseSmartKeyLayer::onButton @ 0x14045c12a\n// > <???> @ 0x1406dac10\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Hidden C++ exception states: #wind=1\nvoid BrowseSmartKeyLayer::updateChanceValues(BrowseSmartKeyLayer *a1)\n{\n  __int64 v2; // rax\n  int TotalChanceForPrefab; // r15d\n  unsigned int i; // ebp\n  cocos2d::CCArray *v5; // rsi\n  unsigned int j; // ebx\n  struct cocos2d::CCObject *v7; // rax\n  GJSmartBlockPreview *v8; // r14\n  __int64 v9; // rdi\n  int v10; // eax\n  struct cocos2d::CCObject *PrefabWithID; // rax\n  _BYTE v12[32]; // [rsp+20h] [rbp-48h] BYREF\n\n  v2 = sub_14003BDB0((__int64)v12, (__int64)&a1->m_prefabKey);\n  TotalChanceForPrefab = GJSmartTemplate::getTotalChanceForPrefab((__int64)a1->m_template, v2);\n  for ( i = 0; i < cocos2d::CCArray::count(a1->m_pages); ++i )\n  {\n    v5 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pages, i);\n    for ( j = 0; j < cocos2d::CCArray::count(v5); ++j )\n    {\n      v7 = cocos2d::CCArray::objectAtIndex(v5, j);\n      v8 = (GJSmartBlockPreview *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v7->__vftable[13].copyWithZone)(v7);\n      v9 = sub_14003BDB0((__int64)v12, (__int64)&a1->m_prefabKey);\n      v10 = v8->getTag(v8);\n      PrefabWithID = GJSmartTemplate::getPrefabWithID((__int64)a1->m_template, v9, v10);\n      if ( PrefabWithID )\n        GJSmartBlockPreview::addChance(v8, PrefabWithID[2].m_nLuaID, TotalChanceForPrefab);\n    }\n  }\n}", "assembly": "; \n; BrowseSmartKeyLayer::updateChanceValues from 0x14045c340 to 0x14045c46b (299 bytes)\n; \n; 4 xrefs:\n; > BrowseSmartKeyLayer::onButton @ 0x14045bf1f\n; > BrowseSmartKeyLayer::onButton @ 0x14045bfb1\n; > BrowseSmartKeyLayer::onButton @ 0x14045c12a\n; > <???> @ 0x1406dac10\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14045c340\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14045c345\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14045c34a\npush    rdi                                                            ; +0xf, 0x14045c34f\npush    r12                                                            ; +0x10, 0x14045c350\npush    r13                                                            ; +0x12, 0x14045c352\npush    r14                                                            ; +0x14, 0x14045c354\npush    r15                                                            ; +0x16, 0x14045c356\nsub     rsp, 40h                                                       ; +0x18, 0x14045c358\nmov     r13, rcx                                                       ; +0x1c, 0x14045c35c\nlea     rdx, [rcx+2A8h]                                                ; +0x1f, 0x14045c35f\nlea     rcx, [rsp+68h+var_48]                                          ; +0x26, 0x14045c366\ncall    sub_14003BDB0                                                  ; +0x2b, 0x14045c36b\nmov     rdx, rax                                                       ; +0x30, 0x14045c370\nmov     rcx, [r13+278h]                                                ; +0x33, 0x14045c373\ncall    GJSmartTemplate__getTotalChanceForPrefab                       ; +0x3a, 0x14045c37a\nmov     r15d, eax                                                      ; +0x3f, 0x14045c37f\nxor     ebp, ebp                                                       ; +0x42, 0x14045c382\nmov     rcx, [r13+280h]                                                ; +0x44, 0x14045c384\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4b, 0x14045c38b\ntest    eax, eax                                                       ; +0x51, 0x14045c391\njz      loc_14045C44D                                                  ; +0x53, 0x14045c393\nnop     dword ptr [rax+00000000h]                                      ; +0x59, 0x14045c399\nmov     edx, ebp                                                       ; +0x60, 0x14045c3a0\nmov     rcx, [r13+280h]                                                ; +0x62, 0x14045c3a2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x69, 0x14045c3a9\nmov     rsi, rax                                                       ; +0x6f, 0x14045c3af\nxor     ebx, ebx                                                       ; +0x72, 0x14045c3b2\nmov     rcx, rax                                                       ; +0x74, 0x14045c3b4\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x77, 0x14045c3b7\ntest    eax, eax                                                       ; +0x7d, 0x14045c3bd\njz      short loc_14045C436                                            ; +0x7f, 0x14045c3bf\nmov     edx, ebx                                                       ; +0x81, 0x14045c3c1\nmov     rcx, rsi                                                       ; +0x83, 0x14045c3c3\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x86, 0x14045c3c6\nmov     rdx, [rax]                                                     ; +0x8c, 0x14045c3cc\nmov     rcx, rax                                                       ; +0x8f, 0x14045c3cf\ncall    qword ptr [rdx+3A8h]                                           ; +0x92, 0x14045c3d2\nmov     r14, rax                                                       ; +0x98, 0x14045c3d8\nlea     rax, [rsp+68h+var_48]                                          ; +0x9b, 0x14045c3db\nmov     [rsp+68h+arg_0], rax                                           ; +0xa0, 0x14045c3e0\nlea     rdx, [r13+2A8h]                                                ; +0xa5, 0x14045c3e5\nlea     rcx, [rsp+68h+var_48]                                          ; +0xac, 0x14045c3ec\ncall    sub_14003BDB0                                                  ; +0xb1, 0x14045c3f1\nmov     rdi, rax                                                       ; +0xb6, 0x14045c3f6\nmov     rdx, [r14]                                                     ; +0xb9, 0x14045c3f9\nmov     rcx, r14                                                       ; +0xbc, 0x14045c3fc\ncall    qword ptr [rdx+38h]                                            ; +0xbf, 0x14045c3ff\nmov     r8d, eax                                                       ; +0xc2, 0x14045c402\nmov     rdx, rdi                                                       ; +0xc5, 0x14045c405\nmov     rcx, [r13+278h]                                                ; +0xc8, 0x14045c408\ncall    GJSmartTemplate__getPrefabWithID                               ; +0xcf, 0x14045c40f\ntest    rax, rax                                                       ; +0xd4, 0x14045c414\njz      short loc_14045C427                                            ; +0xd7, 0x14045c417\nmov     r8d, r15d                                                      ; +0xd9, 0x14045c419\nmov     edx, [rax+7Ch]                                                 ; +0xdc, 0x14045c41c\nmov     rcx, r14                                                       ; +0xdf, 0x14045c41f\ncall    GJSmartBlockPreview__addChance                                 ; +0xe2, 0x14045c422\ninc     ebx                                                            ; +0xe7, 0x14045c427\nmov     rcx, rsi                                                       ; +0xe9, 0x14045c429\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xec, 0x14045c42c\ncmp     ebx, eax                                                       ; +0xf2, 0x14045c432\njb      short loc_14045C3C1                                            ; +0xf4, 0x14045c434\ninc     ebp                                                            ; +0xf6, 0x14045c436\nmov     rcx, [r13+280h]                                                ; +0xf8, 0x14045c438\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xff, 0x14045c43f\ncmp     ebp, eax                                                       ; +0x105, 0x14045c445\njb      loc_14045C3A0                                                  ; +0x107, 0x14045c447\nlea     r11, [rsp+68h+var_28]                                          ; +0x10d, 0x14045c44d\nmov     rbx, [r11+38h]                                                 ; +0x112, 0x14045c452\nmov     rbp, [r11+40h]                                                 ; +0x116, 0x14045c456\nmov     rsi, [r11+48h]                                                 ; +0x11a, 0x14045c45a\nmov     rsp, r11                                                       ; +0x11e, 0x14045c45e\npop     r15                                                            ; +0x121, 0x14045c461\npop     r14                                                            ; +0x123, 0x14045c463\npop     r13                                                            ; +0x125, 0x14045c465\npop     r12                                                            ; +0x127, 0x14045c467\npop     rdi                                                            ; +0x129, 0x14045c469\nretn                                                                   ; +0x12a, 0x14045c46a", "xrefs": ["BrowseSmartKeyLayer::onButton @ 0x14045bf1f", "BrowseSmartKeyLayer::onButton @ 0x14045bfb1", "BrowseSmartKeyLayer::onButton @ 0x14045c12a", "<???> @ 0x1406dac10"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}