; ; GJBaseGameLayer::processItems from 0x140216290 to 0x1402166fa (1130 bytes) ; ; 2 xrefs: ; > PlayLayer::levelComplete @ 0x1403a858d ; > @ 0x1406cd128 ; ; 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-8+arg_8], rbx ; +0x0, 0x140216290 mov [rsp-8+arg_10], rsi ; +0x5, 0x140216295 push rbp ; +0xa, 0x14021629a push rdi ; +0xb, 0x14021629b push r12 ; +0xc, 0x14021629c push r14 ; +0xe, 0x14021629e push r15 ; +0x10, 0x1402162a0 lea rbp, [rsp-37h] ; +0x12, 0x1402162a2 sub rsp, 90h ; +0x17, 0x1402162a7 mov rax, cs:__security_cookie ; +0x1e, 0x1402162ae xor rax, rsp ; +0x25, 0x1402162b5 mov [rbp+57h+var_30], rax ; +0x28, 0x1402162b8 mov r14, rcx ; +0x2c, 0x1402162bc mov rcx, [rcx+3218h] ; +0x2f, 0x1402162bf call cs:?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ ; +0x36, 0x1402162c6 mov r15, rax ; +0x3c, 0x1402162cc xor r12d, r12d ; +0x3f, 0x1402162cf mov esi, r12d ; +0x42, 0x1402162d2 mov rcx, rax ; +0x45, 0x1402162d5 call cs:?count@CCArray@cocos2d@@QEBAIXZ ; +0x48, 0x1402162d8 test eax, eax ; +0x4e, 0x1402162de jz loc_1402166C4 ; +0x50, 0x1402162e0 nop word ptr [rax+rax+00000000h] ; +0x56, 0x1402162e6 mov edx, esi ; +0x60, 0x1402162f0 mov rcx, r15 ; +0x62, 0x1402162f2 call cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z ; +0x65, 0x1402162f5 mov rcx, rax ; +0x6b, 0x1402162fb call cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ ; +0x6e, 0x1402162fe xorps xmm0, xmm0 ; +0x74, 0x140216304 movups [rbp+57h+var_50], xmm0 ; +0x77, 0x140216307 mov [rbp+57h+var_40], r12 ; +0x7b, 0x14021630b mov [rbp+57h+var_38], r12 ; +0x7f, 0x14021630f mov r8, 0FFFFFFFFFFFFFFFFh ; +0x83, 0x140216313 nop word ptr [rax+rax+00h] ; +0x8a, 0x14021631a inc r8 ; +0x90, 0x140216320 cmp byte ptr [rax+r8], 0 ; +0x93, 0x140216323 jnz short loc_140216320 ; +0x98, 0x140216328 mov rdx, rax ; +0x9a, 0x14021632a lea rcx, [rbp+57h+var_50] ; +0x9d, 0x14021632d call sub_14003A930 ; +0xa1, 0x140216331 nop ; +0xa6, 0x140216336 lea rdx, [rbp+57h+var_50] ; +0xa7, 0x140216337 mov rcx, [r14+3218h] ; +0xab, 0x14021633b call cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z ; +0xb2, 0x140216342 mov rbx, rax ; +0xb8, 0x140216348 mov rdx, [rbp+57h+var_38] ; +0xbb, 0x14021634b cmp rdx, 0Fh ; +0xbf, 0x14021634f jbe short loc_140216386 ; +0xc3, 0x140216353 inc rdx ; +0xc5, 0x140216355 mov rcx, qword ptr [rbp+57h+var_50] ; +0xc8, 0x140216358 mov rax, rcx ; +0xcc, 0x14021635c cmp rdx, 1000h ; +0xcf, 0x14021635f jb short loc_140216381 ; +0xd6, 0x140216366 add rdx, 27h ; ''' ; +0xd8, 0x140216368 mov rcx, [rcx-8]; Block ; +0xdc, 0x14021636c sub rax, rcx ; +0xe0, 0x140216370 add rax, 0FFFFFFFFFFFFFFF8h ; +0xe3, 0x140216373 cmp rax, 1Fh ; +0xe7, 0x140216377 ja loc_1402166EC ; +0xeb, 0x14021637b call j_j_free ; +0xf1, 0x140216381 mov [rbp+57h+var_40], r12 ; +0xf6, 0x140216386 mov [rbp+57h+var_38], 0Fh ; +0xfa, 0x14021638a mov byte ptr [rbp+57h+var_50], 0 ; +0x102, 0x140216392 mov rax, [rbx] ; +0x106, 0x140216396 mov rcx, rbx ; +0x109, 0x140216399 call qword ptr [rax+660h] ; +0x10c, 0x14021639c cmp eax, 16h ; +0x112, 0x1402163a2 jz loc_1402165C4 ; +0x115, 0x1402163a5 cmp eax, 1Fh ; +0x11b, 0x1402163ab jnz loc_1402166B1 ; +0x11e, 0x1402163ae mov edx, [rbx+710h] ; +0x124, 0x1402163b4 mov rcx, [r14+878h] ; +0x12a, 0x1402163ba call GJGameLevel__getCoinKey ; +0x131, 0x1402163c1 mov rbx, rax ; +0x136, 0x1402163c6 mov rcx, [r14+878h] ; +0x139, 0x1402163c9 mov edx, [rcx+3A0h] ; +0x140, 0x1402163d0 cmp [rcx+39Ch], edx ; +0x146, 0x1402163d6 mov rcx, cs:qword_1406C2EE8 ; +0x14c, 0x1402163dc jz loc_1402164B4 ; +0x153, 0x1402163e3 test rcx, rcx ; +0x159, 0x1402163e9 jnz short loc_14021641C ; +0x15c, 0x1402163ec mov ecx, 3E0h; Size ; +0x15e, 0x1402163ee call ??2@YAPEAX_K@Z ; +0x163, 0x1402163f3 mov [rbp+57h+var_90], rax ; +0x168, 0x1402163f8 mov rcx, rax ; +0x16c, 0x1402163fc call sub_1401D0AE0 ; +0x16f, 0x1402163ff nop ; +0x174, 0x140216404 mov cs:qword_1406C2EE8, rax ; +0x175, 0x140216405 mov rdx, [rax] ; +0x17c, 0x14021640c mov rcx, rax ; +0x17f, 0x14021640f call qword ptr [rdx+48h] ; +0x182, 0x140216412 mov rcx, cs:qword_1406C2EE8 ; +0x185, 0x140216415 mov rdx, rbx ; +0x18c, 0x14021641c call GameStatsManager__hasUserCoin ; +0x18f, 0x14021641f test al, al ; +0x194, 0x140216424 jnz loc_1402166B1 ; +0x196, 0x140216426 mov rcx, cs:qword_1406C2EE8 ; +0x19c, 0x14021642c test rcx, rcx ; +0x1a3, 0x140216433 jnz short loc_140216466 ; +0x1a6, 0x140216436 mov ecx, 3E0h; Size ; +0x1a8, 0x140216438 call ??2@YAPEAX_K@Z ; +0x1ad, 0x14021643d mov [rbp+57h+var_88], rax ; +0x1b2, 0x140216442 mov rcx, rax ; +0x1b6, 0x140216446 call sub_1401D0AE0 ; +0x1b9, 0x140216449 nop ; +0x1be, 0x14021644e mov cs:qword_1406C2EE8, rax ; +0x1bf, 0x14021644f mov rdx, [rax] ; +0x1c6, 0x140216456 mov rcx, rax ; +0x1c9, 0x140216459 call qword ptr [rdx+48h] ; +0x1cc, 0x14021645c mov rcx, cs:qword_1406C2EE8 ; +0x1cf, 0x14021645f mov rdx, rbx ; +0x1d6, 0x140216466 call GameStatsManager__storeUserCoin ; +0x1d9, 0x140216469 mov rcx, cs:qword_1406C2EE8 ; +0x1de, 0x14021646e test rcx, rcx ; +0x1e5, 0x140216475 jnz short loc_1402164A8 ; +0x1e8, 0x140216478 mov ecx, 3E0h; Size ; +0x1ea, 0x14021647a call ??2@YAPEAX_K@Z ; +0x1ef, 0x14021647f mov [rbp+57h+var_80], rax ; +0x1f4, 0x140216484 mov rcx, rax ; +0x1f8, 0x140216488 call sub_1401D0AE0 ; +0x1fb, 0x14021648b nop ; +0x200, 0x140216490 mov cs:qword_1406C2EE8, rax ; +0x201, 0x140216491 mov rdx, [rax] ; +0x208, 0x140216498 mov rcx, rax ; +0x20b, 0x14021649b call qword ptr [rdx+48h] ; +0x20e, 0x14021649e mov rcx, cs:qword_1406C2EE8 ; +0x211, 0x1402164a1 lea rdx, a12 ; +0x218, 0x1402164a8 jmp loc_1402166A6 ; +0x21f, 0x1402164af test rcx, rcx ; +0x224, 0x1402164b4 jnz short loc_1402164E7 ; +0x227, 0x1402164b7 mov ecx, 3E0h; Size ; +0x229, 0x1402164b9 call ??2@YAPEAX_K@Z ; +0x22e, 0x1402164be mov [rbp+57h+var_78], rax ; +0x233, 0x1402164c3 mov rcx, rax ; +0x237, 0x1402164c7 call sub_1401D0AE0 ; +0x23a, 0x1402164ca nop ; +0x23f, 0x1402164cf mov cs:qword_1406C2EE8, rax ; +0x240, 0x1402164d0 mov rdx, [rax] ; +0x247, 0x1402164d7 mov rcx, rax ; +0x24a, 0x1402164da call qword ptr [rdx+48h] ; +0x24d, 0x1402164dd mov rcx, cs:qword_1406C2EE8 ; +0x250, 0x1402164e0 mov rdx, rbx ; +0x257, 0x1402164e7 call GameStatsManager__hasPendingUserCoin ; +0x25a, 0x1402164ea test al, al ; +0x25f, 0x1402164ef jnz loc_1402166B1 ; +0x261, 0x1402164f1 mov rdi, cs:qword_1406C2EE8 ; +0x267, 0x1402164f7 test rdi, rdi ; +0x26e, 0x1402164fe jnz short loc_140216531 ; +0x271, 0x140216501 mov ecx, 3E0h; Size ; +0x273, 0x140216503 call ??2@YAPEAX_K@Z ; +0x278, 0x140216508 mov [rbp+57h+var_70], rax ; +0x27d, 0x14021650d mov rcx, rax ; +0x281, 0x140216511 call sub_1401D0AE0 ; +0x284, 0x140216514 nop ; +0x289, 0x140216519 mov cs:qword_1406C2EE8, rax ; +0x28a, 0x14021651a mov rdx, [rax] ; +0x291, 0x140216521 mov rcx, rax ; +0x294, 0x140216524 call qword ptr [rdx+48h] ; +0x297, 0x140216527 mov rdi, cs:qword_1406C2EE8 ; +0x29a, 0x14021652a xorps xmm0, xmm0 ; +0x2a1, 0x140216531 movups [rbp+57h+var_50], xmm0 ; +0x2a4, 0x140216534 mov [rbp+57h+var_40], r12 ; +0x2a8, 0x140216538 mov [rbp+57h+var_38], r12 ; +0x2ac, 0x14021653c mov r8, 0FFFFFFFFFFFFFFFFh ; +0x2b0, 0x140216540 nop word ptr [rax+rax+00000000h] ; +0x2b7, 0x140216547 inc r8 ; +0x2c0, 0x140216550 cmp byte ptr [rbx+r8], 0 ; +0x2c3, 0x140216553 jnz short loc_140216550 ; +0x2c8, 0x140216558 mov rdx, rbx ; +0x2ca, 0x14021655a lea rcx, [rbp+57h+var_50] ; +0x2cd, 0x14021655d call sub_14003A930 ; +0x2d1, 0x140216561 nop ; +0x2d6, 0x140216566 lea r8, [rbp+57h+var_50] ; +0x2d7, 0x140216567 mov rdx, [rdi+148h] ; +0x2db, 0x14021656b mov rcx, [rdi+2D8h] ; +0x2e2, 0x140216572 call cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z ; +0x2e9, 0x140216579 nop ; +0x2ef, 0x14021657f mov rdx, [rbp+57h+var_38] ; +0x2f0, 0x140216580 cmp rdx, 0Fh ; +0x2f4, 0x140216584 jbe loc_1402166B1 ; +0x2f8, 0x140216588 inc rdx ; +0x2fe, 0x14021658e mov rcx, qword ptr [rbp+57h+var_50] ; +0x301, 0x140216591 mov rax, rcx ; +0x305, 0x140216595 cmp rdx, 1000h ; +0x308, 0x140216598 jb short loc_1402165BA ; +0x30f, 0x14021659f add rdx, 27h ; ''' ; +0x311, 0x1402165a1 mov rcx, [rcx-8]; Block ; +0x315, 0x1402165a5 sub rax, rcx ; +0x319, 0x1402165a9 add rax, 0FFFFFFFFFFFFFFF8h ; +0x31c, 0x1402165ac cmp rax, 1Fh ; +0x320, 0x1402165b0 ja loc_1402166F3 ; +0x324, 0x1402165b4 call j_j_free ; +0x32a, 0x1402165ba jmp loc_1402166B1 ; +0x32f, 0x1402165bf mov edx, [rbx+710h] ; +0x334, 0x1402165c4 mov rcx, [r14+878h] ; +0x33a, 0x1402165ca call GJGameLevel__getCoinKey ; +0x341, 0x1402165d1 mov rbx, rax ; +0x346, 0x1402165d6 mov rcx, cs:qword_1406C2EE8 ; +0x349, 0x1402165d9 test rcx, rcx ; +0x350, 0x1402165e0 jnz short loc_140216613 ; +0x353, 0x1402165e3 mov ecx, 3E0h; Size ; +0x355, 0x1402165e5 call ??2@YAPEAX_K@Z ; +0x35a, 0x1402165ea mov [rbp+57h+var_68], rax ; +0x35f, 0x1402165ef mov rcx, rax ; +0x363, 0x1402165f3 call sub_1401D0AE0 ; +0x366, 0x1402165f6 nop ; +0x36b, 0x1402165fb mov cs:qword_1406C2EE8, rax ; +0x36c, 0x1402165fc mov rdx, [rax] ; +0x373, 0x140216603 mov rcx, rax ; +0x376, 0x140216606 call qword ptr [rdx+48h] ; +0x379, 0x140216609 mov rcx, cs:qword_1406C2EE8 ; +0x37c, 0x14021660c mov rdx, rbx ; +0x383, 0x140216613 call GameStatsManager__hasSecretCoin ; +0x386, 0x140216616 test al, al ; +0x38b, 0x14021661b jnz loc_1402166B1 ; +0x38d, 0x14021661d mov rcx, cs:qword_1406C2EE8 ; +0x393, 0x140216623 test rcx, rcx ; +0x39a, 0x14021662a jnz short loc_14021665D ; +0x39d, 0x14021662d mov ecx, 3E0h; Size ; +0x39f, 0x14021662f call ??2@YAPEAX_K@Z ; +0x3a4, 0x140216634 mov [rbp+57h+var_60], rax ; +0x3a9, 0x140216639 mov rcx, rax ; +0x3ad, 0x14021663d call sub_1401D0AE0 ; +0x3b0, 0x140216640 nop ; +0x3b5, 0x140216645 mov cs:qword_1406C2EE8, rax ; +0x3b6, 0x140216646 mov rdx, [rax] ; +0x3bd, 0x14021664d mov rcx, rax ; +0x3c0, 0x140216650 call qword ptr [rdx+48h] ; +0x3c3, 0x140216653 mov rcx, cs:qword_1406C2EE8 ; +0x3c6, 0x140216656 mov rdx, rbx ; +0x3cd, 0x14021665d call GameStatsManager__storeSecretCoin ; +0x3d0, 0x140216660 mov rcx, cs:qword_1406C2EE8 ; +0x3d5, 0x140216665 test rcx, rcx ; +0x3dc, 0x14021666c jnz short loc_14021669F ; +0x3df, 0x14021666f mov ecx, 3E0h; Size ; +0x3e1, 0x140216671 call ??2@YAPEAX_K@Z ; +0x3e6, 0x140216676 mov [rbp+57h+var_58], rax ; +0x3eb, 0x14021667b mov rcx, rax ; +0x3ef, 0x14021667f call sub_1401D0AE0 ; +0x3f2, 0x140216682 nop ; +0x3f7, 0x140216687 mov cs:qword_1406C2EE8, rax ; +0x3f8, 0x140216688 mov rdx, [rax] ; +0x3ff, 0x14021668f mov rcx, rax ; +0x402, 0x140216692 call qword ptr [rdx+48h] ; +0x405, 0x140216695 mov rcx, cs:qword_1406C2EE8 ; +0x408, 0x140216698 lea rdx, a8 ; +0x40f, 0x14021669f mov r8d, 1 ; +0x416, 0x1402166a6 call GameStatsManager__incrementStat ; +0x41c, 0x1402166ac inc esi ; +0x421, 0x1402166b1 mov rcx, r15 ; +0x423, 0x1402166b3 call cs:?count@CCArray@cocos2d@@QEBAIXZ ; +0x426, 0x1402166b6 cmp esi, eax ; +0x42c, 0x1402166bc jb loc_1402162F0 ; +0x42e, 0x1402166be mov rcx, [rbp+57h+var_30] ; +0x434, 0x1402166c4 xor rcx, rsp; StackCookie ; +0x438, 0x1402166c8 call __security_check_cookie ; +0x43b, 0x1402166cb lea r11, [rsp+0B0h+var_20] ; +0x440, 0x1402166d0 mov rbx, [r11+38h] ; +0x448, 0x1402166d8 mov rsi, [r11+40h] ; +0x44c, 0x1402166dc mov rsp, r11 ; +0x450, 0x1402166e0 pop r15 ; +0x453, 0x1402166e3 pop r14 ; +0x455, 0x1402166e5 pop r12 ; +0x457, 0x1402166e7 pop rdi ; +0x459, 0x1402166e9 pop rbp ; +0x45a, 0x1402166ea retn ; +0x45b, 0x1402166eb call cs:_invalid_parameter_noinfo_noreturn ; +0x45c, 0x1402166ec db 0CCh ; +0x462, 0x1402166f2 call cs:_invalid_parameter_noinfo_noreturn ; +0x463, 0x1402166f3 db 0CCh ; +0x469, 0x1402166f9