; ; GJBaseGameLayer::createBackground from 0x14020b820 to 0x14020bad4 (692 bytes) ; ; 7 xrefs: ; > GameManager::finishedLoadingBGAsync @ 0x140182990 ; > GJBaseGameLayer::syncBGTextures @ 0x14023afc3 ; > LevelEditorLayer::init @ 0x1402d2b9f ; > LevelSettingsLayer::selectArtClosed @ 0x140321f3d ; > PlayLayer::setupHasCompleted @ 0x1403a6a59 ; > ArtTriggerGameObject::triggerObject @ 0x1404c2721 ; > @ 0x1406ccd08 ; ; 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, 0x14020b820 mov [rsp+arg_18], rbp ; +0x5, 0x14020b825 push rsi ; +0xa, 0x14020b82a push rdi ; +0xb, 0x14020b82b push r14 ; +0xc, 0x14020b82c sub rsp, 60h ; +0xe, 0x14020b82e mov rax, cs:__security_cookie ; +0x12, 0x14020b832 xor rax, rsp ; +0x19, 0x14020b839 mov [rsp+78h+var_28], rax ; +0x1c, 0x14020b83c mov edi, edx ; +0x21, 0x14020b841 mov rsi, rcx ; +0x23, 0x14020b843 mov rcx, [rcx+1000h] ; +0x26, 0x14020b846 test rcx, rcx ; +0x2d, 0x14020b84d jz short loc_14020B860 ; +0x30, 0x14020b850 mov rax, [rcx] ; +0x32, 0x14020b852 call qword ptr [rax+38h] ; +0x35, 0x14020b855 cmp eax, edi ; +0x38, 0x14020b858 jz loc_14020BA7B ; +0x3a, 0x14020b85a mov rcx, [rsi+1000h] ; +0x40, 0x14020b860 test rcx, rcx ; +0x47, 0x14020b867 jz short loc_14020B880 ; +0x4a, 0x14020b86a mov rax, [rcx] ; +0x4c, 0x14020b86c call qword ptr [rax+1F0h] ; +0x4f, 0x14020b86f mov qword ptr [rsi+1000h], 0 ; +0x55, 0x14020b875 mov ebp, 3Bh ; ';' ; +0x60, 0x14020b880 cmp edi, ebp ; +0x65, 0x14020b885 cmovg edi, ebp ; +0x67, 0x14020b887 mov r14b, 1 ; +0x6a, 0x14020b88a lea eax, [rdi-10h]; switch 44 cases ; +0x6d, 0x14020b88d cmp eax, 2Bh ; +0x70, 0x14020b890 ja short def_14020B8B0; jumptable 000000014020B8B0 default case, cases 17-34,36,38,39,52 ; +0x73, 0x14020b893 cdqe ; +0x75, 0x14020b895 lea rdx, cs:140000000h ; +0x77, 0x14020b897 movzx eax, ds:(byte_14020BAA8 - 140000000h)[rdx+rax] ; +0x7e, 0x14020b89e mov ecx, ds:(jpt_14020B8B0 - 140000000h)[rdx+rax*4] ; +0x86, 0x14020b8a6 add rcx, rdx ; +0x8d, 0x14020b8ad jmp rcx; switch jump ; +0x90, 0x14020b8b0 xor r14b, r14b; jumptable 000000014020B8B0 cases 16,35,37,40-51,53-59 ; +0x92, 0x14020b8b2 mov rcx, cs:qword_1406C2ED8; jumptable 000000014020B8B0 default case, cases 17-34,36,38,39,52 ; +0x95, 0x14020b8b5 test rcx, rcx ; +0x9c, 0x14020b8bc jnz short loc_14020B8F0 ; +0x9f, 0x14020b8bf mov ecx, 668h; Size ; +0xa1, 0x14020b8c1 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0xa6, 0x14020b8c6 mov [rsp+78h+var_50], rax ; +0xab, 0x14020b8cb mov rcx, rax ; +0xb0, 0x14020b8d0 call sub_14017AB00 ; +0xb3, 0x14020b8d3 nop ; +0xb8, 0x14020b8d8 mov cs:qword_1406C2ED8, rax ; +0xb9, 0x14020b8d9 mov rdx, [rax] ; +0xc0, 0x14020b8e0 mov rcx, rax ; +0xc3, 0x14020b8e3 call qword ptr [rdx+48h] ; +0xc6, 0x14020b8e6 mov rcx, cs:qword_1406C2ED8 ; +0xc9, 0x14020b8e9 cmp edi, 3Bh ; ';' ; +0xd0, 0x14020b8f0 cmovl ebp, edi ; +0xd3, 0x14020b8f3 mov ebx, 1 ; +0xd6, 0x14020b8f6 cmp ebp, ebx ; +0xdb, 0x14020b8fb cmovg ebx, ebp ; +0xdd, 0x14020b8fd mov edx, ebx ; +0xe0, 0x14020b900 call GameManager__loadBackground ; +0xe2, 0x14020b902 mov edx, ebx ; +0xe7, 0x14020b907 lea rcx, aGameBg02d001Pn; "game_bg_%02d_001.png" ; +0xe9, 0x14020b909 call cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xf0, 0x14020b910 mov rcx, rax ; +0xf6, 0x14020b916 call cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xf9, 0x14020b919 mov rcx, rax ; +0xff, 0x14020b91f call cs:?create@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::create(char const *) ; +0x102, 0x14020b922 mov [rsi+1000h], rax ; +0x108, 0x14020b928 mov r8, [rax] ; +0x10f, 0x14020b92f mov edx, edi ; +0x112, 0x14020b932 mov rcx, rax ; +0x114, 0x14020b934 call qword ptr [r8+40h] ; +0x117, 0x14020b937 mov [rsp+78h+var_38], 2601h ; +0x11b, 0x14020b93b mov [rsp+78h+var_34], 2601h ; +0x123, 0x14020b943 mov eax, 2901h ; +0x12b, 0x14020b94b mov [rsp+78h+var_30], eax ; +0x130, 0x14020b950 mov ecx, 8370h ; +0x134, 0x14020b954 test r14b, r14b ; +0x139, 0x14020b959 cmovnz eax, ecx ; +0x13c, 0x14020b95c mov [rsp+78h+var_2C], eax ; +0x13f, 0x14020b95f mov rcx, [rsi+1000h] ; +0x143, 0x14020b963 add rcx, 158h ; +0x14a, 0x14020b96a mov rax, [rcx] ; +0x151, 0x14020b971 call qword ptr [rax+10h] ; +0x154, 0x14020b974 mov rcx, rax ; +0x157, 0x14020b977 lea rdx, [rsp+78h+var_38] ; +0x15a, 0x14020b97a call cs:?setTexParameters@CCTexture2D@cocos2d@@QEAAXPEAU_ccTexParams@2@@Z; cocos2d::CCTexture2D::setTexParameters(cocos2d::_ccTexParams *) ; +0x15f, 0x14020b97f mov rcx, [rsi+0FD0h] ; +0x165, 0x14020b985 mov rax, [rcx] ; +0x16c, 0x14020b98c mov r8d, 0FFFFFFC4h ; +0x16f, 0x14020b98f mov rdx, [rsi+1000h] ; +0x175, 0x14020b995 call qword ptr [rax+1B8h] ; +0x17c, 0x14020b99c mov rax, [rsi+1000h] ; +0x182, 0x14020b9a2 mov rbx, [rax] ; +0x189, 0x14020b9a9 xorps xmm2, xmm2 ; +0x18c, 0x14020b9ac xorps xmm1, xmm1 ; +0x18f, 0x14020b9af lea rcx, [rsp+78h+var_50] ; +0x192, 0x14020b9b2 call cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x197, 0x14020b9b7 mov rdx, rax ; +0x19d, 0x14020b9bd mov rcx, [rsi+1000h] ; +0x1a0, 0x14020b9c0 call qword ptr [rbx+110h] ; +0x1a7, 0x14020b9c7 call cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x1ad, 0x14020b9cd call cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1b3, 0x14020b9d3 mov rcx, rax ; +0x1b9, 0x14020b9d9 call cs:?getScreenScaleFactorMax@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenScaleFactorMax(void) ; +0x1bc, 0x14020b9dc mov rcx, [rsi+1000h] ; +0x1c2, 0x14020b9e2 mov rax, [rcx] ; +0x1c9, 0x14020b9e9 movaps xmm1, xmm0 ; +0x1cc, 0x14020b9ec call qword ptr [rax+0A0h] ; +0x1cf, 0x14020b9ef mov [rsp+78h+var_50], 1 ; +0x1d5, 0x14020b9f5 mov rcx, [rsi+1000h] ; +0x1de, 0x14020b9fe add rcx, 158h ; +0x1e5, 0x14020ba05 mov rax, [rcx] ; +0x1ec, 0x14020ba0c mov rdx, [rsp+78h+var_50] ; +0x1ef, 0x14020ba0f call qword ptr [rax] ; +0x1f4, 0x14020ba14 mov [rsp+78h+var_58], 7D28h ; +0x1f6, 0x14020ba16 movzx eax, [rsp+78h+var_58] ; +0x1fd, 0x14020ba1d mov [rsp+78h+var_58], ax ; +0x202, 0x14020ba22 mov [rsp+78h+var_56], 0FFh ; +0x207, 0x14020ba27 mov rcx, [rsi+1000h] ; +0x20c, 0x14020ba2c add rcx, 140h ; +0x213, 0x14020ba33 mov rax, [rcx] ; +0x21a, 0x14020ba3a lea rdx, [rsp+78h+var_58] ; +0x21d, 0x14020ba3d call qword ptr [rax] ; +0x222, 0x14020ba42 mov rdx, [rsi+1000h] ; +0x224, 0x14020ba44 add rdx, 1A8h ; +0x22b, 0x14020ba4b lea rcx, [rsp+78h+var_48] ; +0x232, 0x14020ba52 call cs:??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x237, 0x14020ba57 mov rcx, [rsi+1000h] ; +0x23d, 0x14020ba5d mov rax, [rcx] ; +0x244, 0x14020ba64 call qword ptr [rax+0A8h] ; +0x247, 0x14020ba67 mulss xmm0, [rsp+78h+var_40] ; +0x24d, 0x14020ba6d movss dword ptr [rsi+4E4h], xmm0 ; +0x253, 0x14020ba73 mov rcx, [rsp+78h+var_28] ; +0x25b, 0x14020ba7b xor rcx, rsp; StackCookie ; +0x260, 0x14020ba80 call __security_check_cookie ; +0x263, 0x14020ba83 lea r11, [rsp+78h+var_18] ; +0x268, 0x14020ba88 mov rbx, [r11+30h] ; +0x26d, 0x14020ba8d mov rbp, [r11+38h] ; +0x271, 0x14020ba91 mov rsp, r11 ; +0x275, 0x14020ba95 pop r14 ; +0x278, 0x14020ba98 pop rdi ; +0x27a, 0x14020ba9a pop rsi ; +0x27b, 0x14020ba9b retn ; +0x27c, 0x14020ba9c align 20h ; +0x27d, 0x14020ba9d dd offset loc_14020B8B2 - 140000000h; jump table for switch statement ; +0x280, 0x14020baa0 db 0, 1, 1, 1; indirect table for switch statement ; +0x288, 0x14020baa8