; ; GJSmartTemplate::getTotalChanceForPrefab from 0x1402b2970 to 0x1402b2a30 (192 bytes) ; ; 4 xrefs: ; > GJSmartTemplate::getRandomPrefab @ 0x1402b2acc ; > BrowseSmartKeyLayer::init @ 0x14045b772 ; > BrowseSmartKeyLayer::updateChanceValues @ 0x14045c37a ; > @ 0x1406d2384 ; ; 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_10], rbx ; +0x0, 0x1402b2970 mov [rsp+arg_18], rsi ; +0x5, 0x1402b2975 push rdi ; +0xa, 0x1402b297a sub rsp, 60h ; +0xb, 0x1402b297b mov rax, cs:__security_cookie ; +0xf, 0x1402b297f xor rax, rsp ; +0x16, 0x1402b2986 mov [rsp+68h+var_18], rax ; +0x19, 0x1402b2989 mov rsi, rdx ; +0x1e, 0x1402b298e mov rdi, rcx ; +0x21, 0x1402b2991 mov [rsp+68h+var_20], rdx ; +0x24, 0x1402b2994 lea rcx, [rsp+68h+var_40] ; +0x29, 0x1402b2999 call sub_14003BDB0 ; +0x2e, 0x1402b299e mov rbx, rax ; +0x33, 0x1402b29a3 mov [rsp+68h+var_48], rax ; +0x36, 0x1402b29a6 mov rdx, rax ; +0x3b, 0x1402b29ab mov rcx, [rdi+38h] ; +0x3e, 0x1402b29ae call cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x42, 0x1402b29b2 mov rdi, rax ; +0x48, 0x1402b29b8 mov rcx, rbx ; +0x4b, 0x1402b29bb call sub_14003A830 ; +0x4e, 0x1402b29be xor ebx, ebx ; +0x53, 0x1402b29c3 test rdi, rdi ; +0x55, 0x1402b29c5 jz short loc_1402B2A07 ; +0x58, 0x1402b29c8 mov rcx, rdi ; +0x5a, 0x1402b29ca call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5d, 0x1402b29cd test eax, eax ; +0x63, 0x1402b29d3 jz short loc_1402B2A07 ; +0x65, 0x1402b29d5 mov rdx, [rdi+38h] ; +0x67, 0x1402b29d7 mov eax, [rdx] ; +0x6b, 0x1402b29db test eax, eax ; +0x6d, 0x1402b29dd jz short loc_1402B2A07 ; +0x6f, 0x1402b29df mov rdx, [rdx+10h] ; +0x71, 0x1402b29e1 lea r9, [rax-1] ; +0x75, 0x1402b29e5 lea r9, [rdx+r9*8] ; +0x79, 0x1402b29e9 cmp rdx, r9 ; +0x7d, 0x1402b29ed ja short loc_1402B2A07 ; +0x80, 0x1402b29f0 mov r8, [rdx] ; +0x82, 0x1402b29f2 test r8, r8 ; +0x85, 0x1402b29f5 jz short loc_1402B2A07 ; +0x88, 0x1402b29f8 add ebx, [r8+7Ch] ; +0x8a, 0x1402b29fa add rdx, 8 ; +0x8e, 0x1402b29fe cmp rdx, r9 ; +0x92, 0x1402b2a02 jbe short loc_1402B29F2 ; +0x95, 0x1402b2a05 mov rcx, rsi ; +0x97, 0x1402b2a07 call sub_14003A830 ; +0x9a, 0x1402b2a0a mov eax, ebx ; +0x9f, 0x1402b2a0f mov rcx, [rsp+68h+var_18] ; +0xa1, 0x1402b2a11 xor rcx, rsp; StackCookie ; +0xa6, 0x1402b2a16 call __security_check_cookie ; +0xa9, 0x1402b2a19 lea r11, [rsp+68h+var_8] ; +0xae, 0x1402b2a1e mov rbx, [r11+20h] ; +0xb3, 0x1402b2a23 mov rsi, [r11+28h] ; +0xb7, 0x1402b2a27 mov rsp, r11 ; +0xbb, 0x1402b2a2b pop rdi ; +0xbe, 0x1402b2a2e retn ; +0xbf, 0x1402b2a2f