; ; BrowseSmartKeyLayer::updateChanceValues from 0x14045c340 to 0x14045c46b (299 bytes) ; ; 4 xrefs: ; > BrowseSmartKeyLayer::onButton @ 0x14045bf1f ; > BrowseSmartKeyLayer::onButton @ 0x14045bfb1 ; > BrowseSmartKeyLayer::onButton @ 0x14045c12a ; > @ 0x1406dac10 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; mov [rsp+arg_8], rbx ; +0x0, 0x14045c340 mov [rsp+arg_10], rbp ; +0x5, 0x14045c345 mov [rsp+arg_18], rsi ; +0xa, 0x14045c34a push rdi ; +0xf, 0x14045c34f push r12 ; +0x10, 0x14045c350 push r13 ; +0x12, 0x14045c352 push r14 ; +0x14, 0x14045c354 push r15 ; +0x16, 0x14045c356 sub rsp, 40h ; +0x18, 0x14045c358 mov r13, rcx ; +0x1c, 0x14045c35c lea rdx, [rcx+2A8h] ; +0x1f, 0x14045c35f lea rcx, [rsp+68h+var_48] ; +0x26, 0x14045c366 call sub_14003BDB0 ; +0x2b, 0x14045c36b mov rdx, rax ; +0x30, 0x14045c370 mov rcx, [r13+278h] ; +0x33, 0x14045c373 call GJSmartTemplate__getTotalChanceForPrefab ; +0x3a, 0x14045c37a mov r15d, eax ; +0x3f, 0x14045c37f xor ebp, ebp ; +0x42, 0x14045c382 mov rcx, [r13+280h] ; +0x44, 0x14045c384 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4b, 0x14045c38b test eax, eax ; +0x51, 0x14045c391 jz loc_14045C44D ; +0x53, 0x14045c393 nop dword ptr [rax+00000000h] ; +0x59, 0x14045c399 mov edx, ebp ; +0x60, 0x14045c3a0 mov rcx, [r13+280h] ; +0x62, 0x14045c3a2 call cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x69, 0x14045c3a9 mov rsi, rax ; +0x6f, 0x14045c3af xor ebx, ebx ; +0x72, 0x14045c3b2 mov rcx, rax ; +0x74, 0x14045c3b4 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x77, 0x14045c3b7 test eax, eax ; +0x7d, 0x14045c3bd jz short loc_14045C436 ; +0x7f, 0x14045c3bf mov edx, ebx ; +0x81, 0x14045c3c1 mov rcx, rsi ; +0x83, 0x14045c3c3 call cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x86, 0x14045c3c6 mov rdx, [rax] ; +0x8c, 0x14045c3cc mov rcx, rax ; +0x8f, 0x14045c3cf call qword ptr [rdx+3A8h] ; +0x92, 0x14045c3d2 mov r14, rax ; +0x98, 0x14045c3d8 lea rax, [rsp+68h+var_48] ; +0x9b, 0x14045c3db mov [rsp+68h+arg_0], rax ; +0xa0, 0x14045c3e0 lea rdx, [r13+2A8h] ; +0xa5, 0x14045c3e5 lea rcx, [rsp+68h+var_48] ; +0xac, 0x14045c3ec call sub_14003BDB0 ; +0xb1, 0x14045c3f1 mov rdi, rax ; +0xb6, 0x14045c3f6 mov rdx, [r14] ; +0xb9, 0x14045c3f9 mov rcx, r14 ; +0xbc, 0x14045c3fc call qword ptr [rdx+38h] ; +0xbf, 0x14045c3ff mov r8d, eax ; +0xc2, 0x14045c402 mov rdx, rdi ; +0xc5, 0x14045c405 mov rcx, [r13+278h] ; +0xc8, 0x14045c408 call GJSmartTemplate__getPrefabWithID ; +0xcf, 0x14045c40f test rax, rax ; +0xd4, 0x14045c414 jz short loc_14045C427 ; +0xd7, 0x14045c417 mov r8d, r15d ; +0xd9, 0x14045c419 mov edx, [rax+7Ch] ; +0xdc, 0x14045c41c mov rcx, r14 ; +0xdf, 0x14045c41f call GJSmartBlockPreview__addChance ; +0xe2, 0x14045c422 inc ebx ; +0xe7, 0x14045c427 mov rcx, rsi ; +0xe9, 0x14045c429 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xec, 0x14045c42c cmp ebx, eax ; +0xf2, 0x14045c432 jb short loc_14045C3C1 ; +0xf4, 0x14045c434 inc ebp ; +0xf6, 0x14045c436 mov rcx, [r13+280h] ; +0xf8, 0x14045c438 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xff, 0x14045c43f cmp ebp, eax ; +0x105, 0x14045c445 jb loc_14045C3A0 ; +0x107, 0x14045c447 lea r11, [rsp+68h+var_28] ; +0x10d, 0x14045c44d mov rbx, [r11+38h] ; +0x112, 0x14045c452 mov rbp, [r11+40h] ; +0x116, 0x14045c456 mov rsi, [r11+48h] ; +0x11a, 0x14045c45a mov rsp, r11 ; +0x11e, 0x14045c45e pop r15 ; +0x121, 0x14045c461 pop r14 ; +0x123, 0x14045c463 pop r13 ; +0x125, 0x14045c465 pop r12 ; +0x127, 0x14045c467 pop rdi ; +0x129, 0x14045c469 retn ; +0x12a, 0x14045c46a