; ; GameLevelManager::onGetLeaderboardScoresCompleted from 0x140157d70 to 0x140158037 (711 bytes) ; ; 2 xrefs: ; > GameLevelManager::handleIt @ 0x140143386 ; > @ 0x1406ca980 ; ; 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 ; push rbx ; +0x0, 0x140157d70 push rsi ; +0x2, 0x140157d72 push rdi ; +0x3, 0x140157d73 push r12 ; +0x4, 0x140157d74 push r13 ; +0x6, 0x140157d76 push r14 ; +0x8, 0x140157d78 push r15 ; +0xa, 0x140157d7a sub rsp, 80h ; +0xc, 0x140157d7c mov rax, cs:__security_cookie ; +0x13, 0x140157d83 xor rax, rsp ; +0x1a, 0x140157d8a mov [rsp+0B8h+var_40], rax ; +0x1d, 0x140157d8d mov rsi, r8 ; +0x22, 0x140157d92 mov r14, rdx ; +0x25, 0x140157d95 mov r13, rcx ; +0x28, 0x140157d98 mov [rsp+0B8h+var_70], rdx ; +0x2b, 0x140157d9b mov [rsp+0B8h+var_68], r8 ; +0x30, 0x140157da0 mov r15, r8 ; +0x35, 0x140157da5 cmp qword ptr [r8+18h], 0Fh ; +0x38, 0x140157da8 jbe short loc_140157DB2 ; +0x3d, 0x140157dad mov r15, [r8] ; +0x3f, 0x140157daf mov rdx, r15 ; +0x42, 0x140157db2 call GameLevelManager__removeDLFromActive ; +0x45, 0x140157db5 lea rdx, asc_140537224; "_" ; +0x4a, 0x140157dba mov rcx, rsi ; +0x51, 0x140157dc1 call sub_140140F70 ; +0x54, 0x140157dc4 mov rbx, rax ; +0x59, 0x140157dc9 mov rcx, rax ; +0x5c, 0x140157dcc call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5f, 0x140157dcf xor edi, edi ; +0x65, 0x140157dd5 cmp eax, 3 ; +0x67, 0x140157dd7 jnz short loc_140157DF6 ; +0x6a, 0x140157dda lea edx, [rdi+1] ; +0x6c, 0x140157ddc mov rcx, rbx ; +0x6f, 0x140157ddf call cs:?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x72, 0x140157de2 mov rcx, rax ; +0x78, 0x140157de8 call cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x7b, 0x140157deb mov r12d, eax ; +0x81, 0x140157df1 jmp short loc_140157DF9 ; +0x84, 0x140157df4 mov r12d, edi ; +0x86, 0x140157df6 mov rcx, rbx ; +0x89, 0x140157df9 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x8c, 0x140157dfc mov edx, 2 ; +0x92, 0x140157e02 cmp eax, 3 ; +0x97, 0x140157e07 jnz short loc_140157E25 ; +0x9a, 0x140157e0a mov rcx, rbx ; +0x9c, 0x140157e0c call cs:?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x9f, 0x140157e0f mov rcx, rax ; +0xa5, 0x140157e15 call cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0xa8, 0x140157e18 mov edx, 2 ; +0xae, 0x140157e1e jmp short loc_140157E27 ; +0xb3, 0x140157e23 mov eax, edi ; +0xb5, 0x140157e25 mov ebx, edi ; +0xb7, 0x140157e27 cmp r12d, 3 ; +0xb9, 0x140157e29 cmovnz ebx, eax ; +0xbd, 0x140157e2d xorps xmm0, xmm0 ; +0xc0, 0x140157e30 movups [rsp+0B8h+Buf2], xmm0 ; +0xc3, 0x140157e33 mov [rsp+0B8h+var_50], rdx ; +0xc8, 0x140157e38 mov [rsp+0B8h+var_48], 0Fh ; +0xcd, 0x140157e3d mov eax, 312Dh ; +0xd6, 0x140157e46 mov word ptr [rsp+0B8h+Buf2], ax ; +0xdb, 0x140157e4b mov byte ptr [rsp+0B8h+Buf2+2], dil ; +0xe0, 0x140157e50 mov rcx, r14 ; +0xe5, 0x140157e55 cmp qword ptr [r14+18h], 0Fh ; +0xe8, 0x140157e58 jbe short loc_140157E62 ; +0xed, 0x140157e5d mov rcx, [r14]; Buf1 ; +0xef, 0x140157e5f mov r8, [r14+10h] ; +0xf2, 0x140157e62 cmp r8, 2 ; +0xf6, 0x140157e66 cmova r8, rdx; Size ; +0xfa, 0x140157e6a lea rdx, [rsp+0B8h+Buf2]; Buf2 ; +0xfe, 0x140157e6e call memcmp ; +0x103, 0x140157e73 test eax, eax ; +0x108, 0x140157e78 jnz short loc_140157EA1 ; +0x10a, 0x140157e7a cmp qword ptr [r14+10h], 2 ; +0x10c, 0x140157e7c jnz short loc_140157EA1 ; +0x111, 0x140157e81 mov rcx, [r13+308h] ; +0x113, 0x140157e83 test rcx, rcx ; +0x11a, 0x140157e8a jz loc_140158006 ; +0x11d, 0x140157e8d mov rax, [rcx] ; +0x123, 0x140157e93 mov rdx, r15 ; +0x126, 0x140157e96 call qword ptr [rax+18h] ; +0x129, 0x140157e99 jmp loc_140158006 ; +0x12c, 0x140157e9c mov rdx, r14 ; +0x131, 0x140157ea1 lea rcx, [rsp+0B8h+var_90] ; +0x134, 0x140157ea4 call sub_14003BDB0 ; +0x139, 0x140157ea9 cmp r12d, 3 ; +0x13e, 0x140157eae setz dil ; +0x142, 0x140157eb2 mov r8d, edi ; +0x146, 0x140157eb6 mov rdx, rax ; +0x149, 0x140157eb9 mov rcx, r13 ; +0x14c, 0x140157ebc call GameLevelManager__createAndGetScores ; +0x14f, 0x140157ebf mov rdi, rax ; +0x154, 0x140157ec4 mov rcx, rax ; +0x157, 0x140157ec7 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x15a, 0x140157eca test eax, eax ; +0x160, 0x140157ed0 jz short loc_140157F0F ; +0x162, 0x140157ed2 test ebx, ebx ; +0x164, 0x140157ed4 jz short loc_140157F0F ; +0x166, 0x140157ed6 test rdi, rdi ; +0x168, 0x140157ed8 jz short loc_140157F0F ; +0x16b, 0x140157edb mov rcx, [rdi+38h] ; +0x16d, 0x140157edd mov eax, [rcx] ; +0x171, 0x140157ee1 test eax, eax ; +0x173, 0x140157ee3 jz short loc_140157F0F ; +0x175, 0x140157ee5 mov rcx, [rcx+10h] ; +0x177, 0x140157ee7 lea rdx, [rax-1] ; +0x17b, 0x140157eeb lea rdx, [rcx+rdx*8] ; +0x17f, 0x140157eef cmp rcx, rdx ; +0x183, 0x140157ef3 ja short loc_140157F0F ; +0x186, 0x140157ef6 mov rax, [rcx] ; +0x188, 0x140157ef8 test rax, rax ; +0x18b, 0x140157efb jz short loc_140157F0F ; +0x18e, 0x140157efe mov [rax+390h], ebx ; +0x190, 0x140157f00 add rcx, 8 ; +0x196, 0x140157f06 cmp rcx, rdx ; +0x19a, 0x140157f0a jbe short loc_140157EF8 ; +0x19d, 0x140157f0d mov rcx, rdi ; +0x19f, 0x140157f0f call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1a2, 0x140157f12 test eax, eax ; +0x1a8, 0x140157f18 jz loc_140157FB9 ; +0x1aa, 0x140157f1a cmp r12d, 4 ; +0x1b0, 0x140157f20 jnz loc_140157FB9 ; +0x1b4, 0x140157f24 mov rax, [rdi+38h] ; +0x1ba, 0x140157f2a mov edx, [rax]; NumOfElements ; +0x1be, 0x140157f2e mov rcx, [rax+10h]; Base ; +0x1c0, 0x140157f30 sub ebx, 1 ; +0x1c4, 0x140157f34 jz short loc_140157F63 ; +0x1c7, 0x140157f37 sub ebx, 1 ; +0x1c9, 0x140157f39 jz short loc_140157F5A ; +0x1cc, 0x140157f3c lea r8d, [r12+4] ; +0x1ce, 0x140157f3e cmp ebx, 1 ; +0x1d3, 0x140157f43 jz short loc_140157F51 ; +0x1d6, 0x140157f46 lea r9, sub_140142A00 ; +0x1d8, 0x140157f48 jmp short loc_140157F70 ; +0x1df, 0x140157f4f lea r9, sub_140142B00 ; +0x1e1, 0x140157f51 jmp short loc_140157F70 ; +0x1e8, 0x140157f58 lea r9, sub_140142AD0 ; +0x1ea, 0x140157f5a jmp short loc_140157F6A ; +0x1f1, 0x140157f61 lea r9, sub_140142AA0; CompareFunction ; +0x1f3, 0x140157f63 mov r8d, 8; SizeOfElements ; +0x1fa, 0x140157f6a call cs:qsort ; +0x200, 0x140157f70 mov edx, 1 ; +0x206, 0x140157f76 test rdi, rdi ; +0x20b, 0x140157f7b jz short loc_140157FB9 ; +0x20e, 0x140157f7e mov rcx, [rdi+38h] ; +0x210, 0x140157f80 mov eax, [rcx] ; +0x214, 0x140157f84 test eax, eax ; +0x216, 0x140157f86 jz short loc_140157FB9 ; +0x218, 0x140157f88 mov rcx, [rcx+10h] ; +0x21a, 0x140157f8a lea r8, [rax-1] ; +0x21e, 0x140157f8e lea r8, [rcx+r8*8] ; +0x222, 0x140157f92 cmp rcx, r8 ; +0x226, 0x140157f96 ja short loc_140157FB9 ; +0x229, 0x140157f99 nop dword ptr [rax+rax+00h] ; +0x22b, 0x140157f9b mov rax, [rcx] ; +0x230, 0x140157fa0 test rax, rax ; +0x233, 0x140157fa3 jz short loc_140157FB9 ; +0x236, 0x140157fa6 mov [rax+19Ch], edx ; +0x238, 0x140157fa8 inc edx ; +0x23e, 0x140157fae add rcx, 8 ; +0x240, 0x140157fb0 cmp rcx, r8 ; +0x244, 0x140157fb4 jbe short loc_140157FA0 ; +0x247, 0x140157fb7 xorps xmm0, xmm0 ; +0x249, 0x140157fb9 movups [rsp+0B8h+Buf2], xmm0 ; +0x24c, 0x140157fbc mov [rsp+0B8h+var_50], 1 ; +0x251, 0x140157fc1 mov [rsp+0B8h+var_48], 0Fh ; +0x25a, 0x140157fca mov word ptr [rsp+0B8h+Buf2], 20h ; ' ' ; +0x263, 0x140157fd3 mov r9, r15 ; +0x26a, 0x140157fda lea r8, [rsp+0B8h+Buf2] ; +0x26d, 0x140157fdd mov rdx, rdi ; +0x272, 0x140157fe2 mov rcx, r13 ; +0x275, 0x140157fe5 call GameLevelManager__storeSearchResult ; +0x278, 0x140157fe8 mov rcx, [r13+308h] ; +0x27d, 0x140157fed test rcx, rcx ; +0x284, 0x140157ff4 jz short loc_140158006 ; +0x287, 0x140157ff7 mov rax, [rcx] ; +0x289, 0x140157ff9 mov r8, r15 ; +0x28c, 0x140157ffc mov rdx, rdi ; +0x28f, 0x140157fff call qword ptr [rax+10h] ; +0x292, 0x140158002 nop ; +0x295, 0x140158005 mov rcx, r14 ; +0x296, 0x140158006 call sub_14003A830 ; +0x299, 0x140158009 nop ; +0x29e, 0x14015800e mov rcx, rsi ; +0x29f, 0x14015800f call sub_14003A830 ; +0x2a2, 0x140158012 mov rcx, [rsp+0B8h+var_40] ; +0x2a7, 0x140158017 xor rcx, rsp; StackCookie ; +0x2ac, 0x14015801c call __security_check_cookie ; +0x2af, 0x14015801f add rsp, 80h ; +0x2b4, 0x140158024 pop r15 ; +0x2bb, 0x14015802b pop r14 ; +0x2bd, 0x14015802d pop r13 ; +0x2bf, 0x14015802f pop r12 ; +0x2c1, 0x140158031 pop rdi ; +0x2c3, 0x140158033 pop rsi ; +0x2c4, 0x140158034 pop rbx ; +0x2c5, 0x140158035 retn ; +0x2c6, 0x140158036