; ; cocos2d::CCImage::initWithImageFileThreadSafe from 0x18007feb0 to 0x18007ffca (282 bytes) ; ; 3 xrefs: ; > sub_1800ACB60 @ 0x1800acc8f ; > @ 0x18014cf68 ; > @ 0x1801bf130 ; ; 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:22:02 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x18007feb0 mov [rsp+arg_8], rbp ; +0x5, 0x18007feb5 mov [rsp+arg_10], rsi ; +0xa, 0x18007feba push rdi ; +0xf, 0x18007febf sub rsp, 20h ; +0x10, 0x18007fec0 mov ebp, r8d ; +0x14, 0x18007fec4 mov [rsp+28h+arg_18], 0 ; +0x17, 0x18007fec7 mov rbx, rdx ; +0x1f, 0x18007fecf mov rsi, rcx ; +0x22, 0x18007fed2 xor dil, dil ; +0x25, 0x18007fed5 call ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x28, 0x18007fed8 mov rcx, rax ; +0x2d, 0x18007fedd lea r9, [rsp+28h+arg_18] ; +0x30, 0x18007fee0 lea r8, aRb_0; "rb" ; +0x35, 0x18007fee5 mov rdx, rbx ; +0x3c, 0x18007feec mov rax, [rax] ; +0x3f, 0x18007feef call qword ptr [rax+18h] ; +0x42, 0x18007fef2 mov rbx, rax ; +0x45, 0x18007fef5 test rax, rax ; +0x48, 0x18007fef8 jz loc_18007FFB1 ; +0x4b, 0x18007fefb mov r8d, [rsp+28h+arg_18]; int ; +0x51, 0x18007ff01 test r8d, r8d ; +0x56, 0x18007ff06 jle loc_18007FFA9 ; +0x59, 0x18007ff09 cmp ebp, 1 ; +0x5f, 0x18007ff0f jnz short loc_18007FF24 ; +0x62, 0x18007ff12 mov rdx, rbx; void * ; +0x64, 0x18007ff14 mov rcx, rsi; this ; +0x67, 0x18007ff17 call ?_initWithPngData@CCImage@cocos2d@@IEAA_NPEAXH@Z; cocos2d::CCImage::_initWithPngData(void *,int) ; +0x6a, 0x18007ff1a jmp loc_18007FFA6 ; +0x6f, 0x18007ff1f test ebp, ebp ; +0x74, 0x18007ff24 jz short loc_18007FF9B ; +0x76, 0x18007ff26 cmp ebp, 2 ; +0x78, 0x18007ff28 jz short loc_18007FF84 ; +0x7b, 0x18007ff2b cmp ebp, 4 ; +0x7d, 0x18007ff2d jz short loc_18007FFA9 ; +0x80, 0x18007ff30 cmp r8d, 8 ; +0x82, 0x18007ff32 jle short loc_18007FF67 ; +0x86, 0x18007ff36 cmp byte ptr [rax], 89h ; +0x88, 0x18007ff38 jnz short loc_18007FF67 ; +0x8b, 0x18007ff3b cmp byte ptr [rax+1], 50h ; 'P' ; +0x8d, 0x18007ff3d jnz short loc_18007FF67 ; +0x91, 0x18007ff41 cmp byte ptr [rax+2], 4Eh ; 'N' ; +0x93, 0x18007ff43 jnz short loc_18007FF67 ; +0x97, 0x18007ff47 cmp byte ptr [rax+3], 47h ; 'G' ; +0x99, 0x18007ff49 jnz short loc_18007FF67 ; +0x9d, 0x18007ff4d cmp byte ptr [rax+4], 0Dh ; +0x9f, 0x18007ff4f jnz short loc_18007FF67 ; +0xa3, 0x18007ff53 cmp byte ptr [rax+5], 0Ah ; +0xa5, 0x18007ff55 jnz short loc_18007FF67 ; +0xa9, 0x18007ff59 cmp byte ptr [rax+6], 1Ah ; +0xab, 0x18007ff5b jnz short loc_18007FF67 ; +0xaf, 0x18007ff5f cmp byte ptr [rax+7], 0Ah ; +0xb1, 0x18007ff61 jz short loc_18007FF14 ; +0xb5, 0x18007ff65 cmp r8d, 2 ; +0xb7, 0x18007ff67 jle short loc_18007FFA9 ; +0xbb, 0x18007ff6b movzx eax, byte ptr [rax] ; +0xbd, 0x18007ff6d cmp al, 49h ; 'I' ; +0xc0, 0x18007ff70 jnz short loc_18007FF7B ; +0xc2, 0x18007ff72 cmp [rbx+1], al ; +0xc4, 0x18007ff74 jz short loc_18007FF84 ; +0xc7, 0x18007ff77 jmp short loc_18007FFA9 ; +0xc9, 0x18007ff79 cmp al, 4Dh ; 'M' ; +0xcb, 0x18007ff7b jnz short loc_18007FF91 ; +0xcd, 0x18007ff7d cmp [rbx+1], al ; +0xcf, 0x18007ff7f jnz short loc_18007FFA9 ; +0xd2, 0x18007ff82 mov rdx, rbx; void * ; +0xd4, 0x18007ff84 mov rcx, rsi; this ; +0xd7, 0x18007ff87 call ?_initWithTiffData@CCImage@cocos2d@@IEAA_NPEAXH@Z; cocos2d::CCImage::_initWithTiffData(void *,int) ; +0xda, 0x18007ff8a jmp short loc_18007FFA6 ; +0xdf, 0x18007ff8f cmp al, 0FFh ; +0xe1, 0x18007ff91 jnz short loc_18007FFA9 ; +0xe3, 0x18007ff93 cmp byte ptr [rbx+1], 0D8h ; +0xe5, 0x18007ff95 jnz short loc_18007FFA9 ; +0xe9, 0x18007ff99 mov rdx, rbx; void * ; +0xeb, 0x18007ff9b mov rcx, rsi; this ; +0xee, 0x18007ff9e call ?_initWithJpgData@CCImage@cocos2d@@IEAA_NPEAXH@Z; cocos2d::CCImage::_initWithJpgData(void *,int) ; +0xf1, 0x18007ffa1 movzx edi, al ; +0xf6, 0x18007ffa6 mov rcx, rbx; Block ; +0xf9, 0x18007ffa9 call j_j_free_0 ; +0xfc, 0x18007ffac mov rbx, [rsp+28h+arg_0] ; +0x101, 0x18007ffb1 movzx eax, dil ; +0x106, 0x18007ffb6 mov rbp, [rsp+28h+arg_8] ; +0x10a, 0x18007ffba mov rsi, [rsp+28h+arg_10] ; +0x10f, 0x18007ffbf add rsp, 20h ; +0x114, 0x18007ffc4 pop rdi ; +0x118, 0x18007ffc8 retn ; +0x119, 0x18007ffc9