; ; sub_180002B20 from 0x180002b20 to 0x180002ded (717 bytes) ; ; 2 xrefs: ; > sub_180002930 @ 0x180002ae8 ; > @ 0x18004b174 ; ; 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 12:15:34 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x180002b20 mov [rsp+arg_10], rbp ; +0x5, 0x180002b25 push rsi ; +0xa, 0x180002b2a push rdi ; +0xb, 0x180002b2b push r12 ; +0xc, 0x180002b2c push r14 ; +0xe, 0x180002b2e push r15 ; +0x10, 0x180002b30 sub rsp, 80h ; +0x12, 0x180002b32 mov rax, cs:__security_cookie ; +0x19, 0x180002b39 xor rax, rsp ; +0x20, 0x180002b40 mov [rsp+0A8h+var_30], rax ; +0x23, 0x180002b43 xor r12d, r12d ; +0x28, 0x180002b48 mov rsi, [rdx+8] ; +0x2b, 0x180002b4b lea rdx, [rsi+28h] ; +0x2f, 0x180002b4f cmp qword ptr [rdx+18h], 0Fh ; +0x33, 0x180002b53 jbe short loc_180002B5D ; +0x38, 0x180002b58 mov rdx, [rdx] ; +0x3a, 0x180002b5a xorps xmm0, xmm0 ; +0x3d, 0x180002b5d movups xmmword ptr [rsp+0A8h+Block], xmm0 ; +0x40, 0x180002b60 xorps xmm1, xmm1 ; +0x45, 0x180002b65 movdqu [rsp+0A8h+var_60], xmm1 ; +0x48, 0x180002b68 mov r8, 0FFFFFFFFFFFFFFFFh ; +0x4e, 0x180002b6e inc r8 ; +0x55, 0x180002b75 cmp [rdx+r8], r12b ; +0x58, 0x180002b78 jnz short loc_180002B75 ; +0x5c, 0x180002b7c lea rcx, [rsp+0A8h+Block] ; +0x5e, 0x180002b7e call sub_180003520 ; +0x63, 0x180002b83 nop ; +0x68, 0x180002b88 call cs:?sharedUserDefault@CCUserDefault@cocos2d@@SAPEAV12@XZ; cocos2d::CCUserDefault::sharedUserDefault(void) ; +0x69, 0x180002b89 mov rcx, rax ; +0x6f, 0x180002b8f lea r8, [rsp+0A8h+Block] ; +0x72, 0x180002b92 lea rdx, aCurrentVersion; "current-version-code" ; +0x77, 0x180002b97 call cs:?setStringForKey@CCUserDefault@cocos2d@@QEAAXPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCUserDefault::setStringForKey(char const *,std::string const &) ; +0x7e, 0x180002b9e nop ; +0x84, 0x180002ba4 mov rdx, qword ptr [rsp+0A8h+var_60+8] ; +0x85, 0x180002ba5 cmp rdx, 0Fh ; +0x8a, 0x180002baa jbe short loc_180002BF4 ; +0x8e, 0x180002bae inc rdx ; +0x90, 0x180002bb0 mov rcx, [rsp+0A8h+Block]; Block ; +0x93, 0x180002bb3 mov rax, rcx ; +0x98, 0x180002bb8 cmp rdx, 1000h ; +0x9b, 0x180002bbb jb short loc_180002BEF ; +0xa2, 0x180002bc2 add rdx, 27h ; ''' ; +0xa4, 0x180002bc4 mov rcx, [rcx-8] ; +0xa8, 0x180002bc8 sub rax, rcx ; +0xac, 0x180002bcc sub rax, 8 ; +0xaf, 0x180002bcf cmp rax, 1Fh ; +0xb3, 0x180002bd3 jbe short loc_180002BEF ; +0xb7, 0x180002bd7 mov [rsp+0A8h+Reserved], r12; Reserved ; +0xb9, 0x180002bd9 xor r9d, r9d; LineNo ; +0xbe, 0x180002bde xor r8d, r8d; FileName ; +0xc1, 0x180002be1 xor edx, edx; FunctionName ; +0xc4, 0x180002be4 xor ecx, ecx; Expression ; +0xc6, 0x180002be6 call cs:_invoke_watson ; +0xc8, 0x180002be8 db 0CCh ; +0xce, 0x180002bee call j_j_free ; +0xcf, 0x180002bef xorps xmm0, xmm0 ; +0xd4, 0x180002bf4 movups xmmword ptr [rsp+0A8h+Block], xmm0 ; +0xd7, 0x180002bf7 movdqa xmm1, cs:xmmword_18002BCB0 ; +0xdc, 0x180002bfc movdqu [rsp+0A8h+var_60], xmm1 ; +0xe4, 0x180002c04 mov byte ptr [rsp+0A8h+Block], 0 ; +0xea, 0x180002c0a call cs:?sharedUserDefault@CCUserDefault@cocos2d@@SAPEAV12@XZ; cocos2d::CCUserDefault::sharedUserDefault(void) ; +0xef, 0x180002c0f mov rcx, rax ; +0xf5, 0x180002c15 lea r8, [rsp+0A8h+Block] ; +0xf8, 0x180002c18 lea rdx, aDownloadedVers; "downloaded-version-code" ; +0xfd, 0x180002c1d call cs:?setStringForKey@CCUserDefault@cocos2d@@QEAAXPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCUserDefault::setStringForKey(char const *,std::string const &) ; +0x104, 0x180002c24 nop ; +0x10a, 0x180002c2a mov rdx, qword ptr [rsp+0A8h+var_60+8] ; +0x10b, 0x180002c2b cmp rdx, 0Fh ; +0x110, 0x180002c30 jbe short loc_180002C7A ; +0x114, 0x180002c34 inc rdx ; +0x116, 0x180002c36 mov rcx, [rsp+0A8h+Block]; Block ; +0x119, 0x180002c39 mov rax, rcx ; +0x11e, 0x180002c3e cmp rdx, 1000h ; +0x121, 0x180002c41 jb short loc_180002C75 ; +0x128, 0x180002c48 add rdx, 27h ; ''' ; +0x12a, 0x180002c4a mov rcx, [rcx-8] ; +0x12e, 0x180002c4e sub rax, rcx ; +0x132, 0x180002c52 sub rax, 8 ; +0x135, 0x180002c55 cmp rax, 1Fh ; +0x139, 0x180002c59 jbe short loc_180002C75 ; +0x13d, 0x180002c5d mov [rsp+0A8h+Reserved], r12; Reserved ; +0x13f, 0x180002c5f xor r9d, r9d; LineNo ; +0x144, 0x180002c64 xor r8d, r8d; FileName ; +0x147, 0x180002c67 xor edx, edx; FunctionName ; +0x14a, 0x180002c6a xor ecx, ecx; Expression ; +0x14c, 0x180002c6c call cs:_invoke_watson ; +0x14e, 0x180002c6e db 0CCh ; +0x154, 0x180002c74 call j_j_free ; +0x155, 0x180002c75 call cs:?sharedUserDefault@CCUserDefault@cocos2d@@SAPEAV12@XZ; cocos2d::CCUserDefault::sharedUserDefault(void) ; +0x15a, 0x180002c7a mov rcx, rax ; +0x160, 0x180002c80 call cs:?flush@CCUserDefault@cocos2d@@QEAAXXZ; cocos2d::CCUserDefault::flush(void) ; +0x163, 0x180002c83 mov rcx, rsi; this ; +0x169, 0x180002c89 call ?setSearchPath@AssetsManager@extension@cocos2d@@IEAAXXZ; cocos2d::extension::AssetsManager::setSearchPath(void) ; +0x16c, 0x180002c8c lea rdi, [rsi+8] ; +0x171, 0x180002c91 mov r15, [rdi+10h] ; +0x175, 0x180002c95 mov rcx, 7FFFFFFFFFFFFFFFh ; +0x179, 0x180002c99 mov rax, rcx ; +0x183, 0x180002ca3 sub rax, r15 ; +0x186, 0x180002ca6 cmp rax, 20h ; ' ' ; +0x189, 0x180002ca9 jb loc_180002DE7 ; +0x18d, 0x180002cad cmp qword ptr [rdi+18h], 0Fh ; +0x193, 0x180002cb3 jbe short loc_180002CBD ; +0x198, 0x180002cb8 mov rdi, [rdi] ; +0x19a, 0x180002cba xorps xmm0, xmm0 ; +0x19d, 0x180002cbd movups xmmword ptr [rsp+0A8h+FileName], xmm0 ; +0x1a0, 0x180002cc0 xorps xmm1, xmm1 ; +0x1a5, 0x180002cc5 movdqu [rsp+0A8h+var_40], xmm1 ; +0x1a8, 0x180002cc8 lea rbp, [r15+20h] ; +0x1ae, 0x180002cce mov ebx, 0Fh ; +0x1b2, 0x180002cd2 lea r14, [rsp+0A8h+FileName] ; +0x1b7, 0x180002cd7 cmp rbp, rbx ; +0x1bc, 0x180002cdc jbe short loc_180002D0F ; +0x1bf, 0x180002cdf mov rbx, rbp ; +0x1c1, 0x180002ce1 or rbx, 0Fh ; +0x1c4, 0x180002ce4 cmp rbx, rcx ; +0x1c8, 0x180002ce8 jbe short loc_180002CF2 ; +0x1cb, 0x180002ceb mov rbx, rcx ; +0x1cd, 0x180002ced jmp short loc_180002CFE ; +0x1d0, 0x180002cf0 mov eax, 16h ; +0x1d2, 0x180002cf2 cmp rbx, rax ; +0x1d7, 0x180002cf7 cmovb rbx, rax ; +0x1da, 0x180002cfa lea rcx, [rbx+1] ; +0x1de, 0x180002cfe call sub_180003940 ; +0x1e2, 0x180002d02 mov r14, rax ; +0x1e7, 0x180002d07 mov [rsp+0A8h+FileName], rax ; +0x1ea, 0x180002d0a mov qword ptr [rsp+0A8h+var_40], rbp ; +0x1ef, 0x180002d0f mov qword ptr [rsp+0A8h+var_40+8], rbx ; +0x1f4, 0x180002d14 mov r8, r15; Size ; +0x1f9, 0x180002d19 mov rdx, rdi; Src ; +0x1fc, 0x180002d1c mov rcx, r14; void * ; +0x1ff, 0x180002d1f call memcpy ; +0x202, 0x180002d22 movups xmm0, cs:xmmword_1800258D0 ; +0x207, 0x180002d27 movups xmmword ptr [r14+r15], xmm0 ; +0x20e, 0x180002d2e movups xmm1, cs:xmmword_1800258E0 ; +0x213, 0x180002d33 movups xmmword ptr [r14+r15+10h], xmm1 ; +0x21a, 0x180002d3a mov byte ptr [r14+rbp], 0 ; +0x220, 0x180002d40 lea rcx, [rsp+0A8h+FileName] ; +0x225, 0x180002d45 cmp qword ptr [rsp+0A8h+var_40+8], 0Fh ; +0x22a, 0x180002d4a cmova rcx, [rsp+0A8h+FileName]; FileName ; +0x230, 0x180002d50 call cs:remove ; +0x236, 0x180002d56 test rsi, rsi ; +0x23c, 0x180002d5c jz short loc_180002D6F ; +0x23f, 0x180002d5f mov rcx, [rsi+0C8h] ; +0x241, 0x180002d61 mov rax, [rcx] ; +0x248, 0x180002d68 call qword ptr [rax+10h] ; +0x24b, 0x180002d6b nop ; +0x24e, 0x180002d6e mov rdx, qword ptr [rsp+0A8h+var_40+8] ; +0x24f, 0x180002d6f cmp rdx, 0Fh ; +0x254, 0x180002d74 jbe short loc_180002DBE ; +0x258, 0x180002d78 inc rdx ; +0x25a, 0x180002d7a mov rcx, [rsp+0A8h+FileName]; Block ; +0x25d, 0x180002d7d mov rax, rcx ; +0x262, 0x180002d82 cmp rdx, 1000h ; +0x265, 0x180002d85 jb short loc_180002DB9 ; +0x26c, 0x180002d8c add rdx, 27h ; ''' ; +0x26e, 0x180002d8e mov rcx, [rcx-8] ; +0x272, 0x180002d92 sub rax, rcx ; +0x276, 0x180002d96 sub rax, 8 ; +0x279, 0x180002d99 cmp rax, 1Fh ; +0x27d, 0x180002d9d jbe short loc_180002DB9 ; +0x281, 0x180002da1 mov [rsp+0A8h+Reserved], r12; Reserved ; +0x283, 0x180002da3 xor r9d, r9d; LineNo ; +0x288, 0x180002da8 xor r8d, r8d; FileName ; +0x28b, 0x180002dab xor edx, edx; FunctionName ; +0x28e, 0x180002dae xor ecx, ecx; Expression ; +0x290, 0x180002db0 call cs:_invoke_watson ; +0x292, 0x180002db2 db 0CCh ; +0x298, 0x180002db8 call j_j_free ; +0x299, 0x180002db9 mov rcx, [rsp+0A8h+var_30] ; +0x29e, 0x180002dbe xor rcx, rsp; StackCookie ; +0x2a3, 0x180002dc3 call __security_check_cookie ; +0x2a6, 0x180002dc6 lea r11, [rsp+0A8h+var_28] ; +0x2ab, 0x180002dcb mov rbx, [r11+30h] ; +0x2b3, 0x180002dd3 mov rbp, [r11+40h] ; +0x2b7, 0x180002dd7 mov rsp, r11 ; +0x2bb, 0x180002ddb pop r15 ; +0x2be, 0x180002dde pop r14 ; +0x2c0, 0x180002de0 pop r12 ; +0x2c2, 0x180002de2 pop rdi ; +0x2c4, 0x180002de4 pop rsi ; +0x2c5, 0x180002de5 retn ; +0x2c6, 0x180002de6 call sub_180003780 ; +0x2c7, 0x180002de7 db 0CCh ; +0x2cc, 0x180002dec