; ; BrowseSmartKeyLayer::addChanceToSelected from 0x1405f1e70 to 0x1405f1f51 (225 bytes) ; ; 3 xrefs: ; > BrowseSmartKeyLayer::onButton @ 0x1405f19e3 ; > @ 0x14092f2c4 ; > @ 0x14092f2d0 ; ; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 11:35:06 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x1405f1e70 mov [rsp+arg_8], rbp ; +0x5, 0x1405f1e75 mov [rsp+arg_10], rsi ; +0xa, 0x1405f1e7a push rdi ; +0xf, 0x1405f1e7f push r12 ; +0x10, 0x1405f1e80 push r13 ; +0x12, 0x1405f1e82 push r14 ; +0x14, 0x1405f1e84 push r15 ; +0x16, 0x1405f1e86 sub rsp, 40h ; +0x18, 0x1405f1e88 movzx r12d, r8b ; +0x1c, 0x1405f1e8c mov r13d, edx ; +0x20, 0x1405f1e90 mov r15, rcx ; +0x23, 0x1405f1e93 call BrowseSmartKeyLayer__getAllSelectedBlocks ; +0x26, 0x1405f1e96 mov r14, rax ; +0x2b, 0x1405f1e9b xor ebp, ebp ; +0x2e, 0x1405f1e9e mov rcx, rax ; +0x30, 0x1405f1ea0 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x33, 0x1405f1ea3 test eax, eax ; +0x39, 0x1405f1ea9 jz short loc_1405F1F2A ; +0x3b, 0x1405f1eab lea rbx, [r15+2C8h] ; +0x3d, 0x1405f1ead mov edx, ebp ; +0x44, 0x1405f1eb4 mov rcx, r14 ; +0x46, 0x1405f1eb6 call cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x49, 0x1405f1eb9 mov rsi, rax ; +0x4f, 0x1405f1ebf lea rax, [rsp+68h+var_48] ; +0x52, 0x1405f1ec2 mov [rsp+68h+arg_18], rax ; +0x57, 0x1405f1ec7 mov rdx, rbx ; +0x5f, 0x1405f1ecf lea rcx, [rsp+68h+var_48] ; +0x62, 0x1405f1ed2 call sub_14003F4F0 ; +0x67, 0x1405f1ed7 mov rdi, rax ; +0x6c, 0x1405f1edc mov rbx, [r15+298h] ; +0x6f, 0x1405f1edf mov rdx, [rsi] ; +0x76, 0x1405f1ee6 mov rcx, rsi ; +0x79, 0x1405f1ee9 call qword ptr [rdx+38h] ; +0x7c, 0x1405f1eec mov r8d, eax ; +0x7f, 0x1405f1eef mov rdx, rdi ; +0x82, 0x1405f1ef2 mov rcx, rbx ; +0x85, 0x1405f1ef5 call GJSmartTemplate__getPrefabWithID ; +0x88, 0x1405f1ef8 test rax, rax ; +0x8d, 0x1405f1efd jz short loc_1405F1F14 ; +0x90, 0x1405f1f00 test r12b, r12b ; +0x92, 0x1405f1f02 jz short loc_1405F1F10 ; +0x95, 0x1405f1f05 mov dword ptr [rax+7Ch], 0 ; +0x97, 0x1405f1f07 jmp short loc_1405F1F14 ; +0x9e, 0x1405f1f0e add [rax+7Ch], r13d ; +0xa0, 0x1405f1f10 inc ebp ; +0xa4, 0x1405f1f14 mov rcx, r14 ; +0xa6, 0x1405f1f16 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa9, 0x1405f1f19 cmp ebp, eax ; +0xaf, 0x1405f1f1f lea rbx, [r15+2C8h] ; +0xb1, 0x1405f1f21 jb short loc_1405F1EB4 ; +0xb8, 0x1405f1f28 mov rcx, r15 ; +0xba, 0x1405f1f2a mov rbx, [rsp+68h+arg_0] ; +0xbd, 0x1405f1f2d mov rbp, [rsp+68h+arg_8] ; +0xc2, 0x1405f1f32 mov rsi, [rsp+68h+arg_10] ; +0xc7, 0x1405f1f37 add rsp, 40h ; +0xcf, 0x1405f1f3f pop r15 ; +0xd3, 0x1405f1f43 pop r14 ; +0xd5, 0x1405f1f45 pop r13 ; +0xd7, 0x1405f1f47 pop r12 ; +0xd9, 0x1405f1f49 pop rdi ; +0xdb, 0x1405f1f4b jmp BrowseSmartKeyLayer__updateChanceValues ; +0xdc, 0x1405f1f4c