; ; BoomScrollLayer::init from 0x140040b60 to 0x140040ebe (862 bytes) ; ; 2 xrefs: ; > BoomScrollLayer::create @ 0x140040b0c ; > @ 0x14090f488 ; ; 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:25:29 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x140040b60 mov [rsp+arg_8], rbp ; +0x5, 0x140040b65 mov [rsp+arg_10], r8d ; +0xa, 0x140040b6a push rsi ; +0xf, 0x140040b6f push rdi ; +0x10, 0x140040b70 push r14 ; +0x11, 0x140040b71 sub rsp, 60h ; +0x13, 0x140040b73 movaps [rsp+78h+var_28], xmm6 ; +0x17, 0x140040b77 movzx ebp, r9b ; +0x1c, 0x140040b7c mov r14, rdx ; +0x20, 0x140040b80 mov rdi, rcx ; +0x23, 0x140040b83 call cs:__imp_?init@CCLayer@cocos2d@@UEAA_NXZ; cocos2d::CCLayer::init(void) ; +0x26, 0x140040b86 test al, al ; +0x2c, 0x140040b8c jz loc_140040EA4 ; +0x2e, 0x140040b8e mov ecx, 1A0h; Size ; +0x34, 0x140040b94 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x39, 0x140040b99 mov rbx, rax ; +0x3e, 0x140040b9e mov [rsp+78h+var_48], rax ; +0x41, 0x140040ba1 mov rcx, rax ; +0x46, 0x140040ba6 call cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x49, 0x140040ba9 lea rax, ??_7ExtendedLayer@@6B@; const ExtendedLayer::`vftable' ; +0x4f, 0x140040baf mov [rbx], rax ; +0x56, 0x140040bb6 lea rax, ??_7ExtendedLayer@@6B@_0; const ExtendedLayer::`vftable' ; +0x59, 0x140040bb9 mov [rbx+140h], rax ; +0x60, 0x140040bc0 lea rax, ??_7ExtendedLayer@@6B@_1; const ExtendedLayer::`vftable' ; +0x67, 0x140040bc7 mov [rbx+148h], rax ; +0x6e, 0x140040bce lea rax, ??_7ExtendedLayer@@6B@_2; const ExtendedLayer::`vftable' ; +0x75, 0x140040bd5 mov [rbx+150h], rax ; +0x7c, 0x140040bdc lea rax, ??_7ExtendedLayer@@6B@_3; const ExtendedLayer::`vftable' ; +0x83, 0x140040be3 mov [rbx+158h], rax ; +0x8a, 0x140040bea lea rax, ??_7ExtendedLayer@@6B@_4; const ExtendedLayer::`vftable' ; +0x91, 0x140040bf1 mov [rbx+160h], rax ; +0x98, 0x140040bf8 xor esi, esi ; +0x9f, 0x140040bff mov [rbx+198h], rsi ; +0xa1, 0x140040c01 mov rax, cs:off_1407066E8 ; +0xa8, 0x140040c08 lea rcx, ExtendedLayer__init; Merged with: ExtendedLayer::init, SecretNumberLayer::init ; +0xaf, 0x140040c0f cmp rax, rcx ; +0xb6, 0x140040c16 mov rcx, rbx ; +0xb9, 0x140040c19 jnz short loc_140040C26 ; +0xbc, 0x140040c1c call cs:__imp_?init@CCLayer@cocos2d@@UEAA_NXZ; cocos2d::CCLayer::init(void) ; +0xbe, 0x140040c1e jmp short loc_140040C28 ; +0xc4, 0x140040c24 call rax ; ExtendedLayer__init; Merged with: ExtendedLayer::init, SecretNumberLayer::init ; +0xc6, 0x140040c26 mov rcx, rbx ; +0xc8, 0x140040c28 test al, al ; +0xcb, 0x140040c2b jz short loc_140040C37 ; +0xcd, 0x140040c2d call cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0xcf, 0x140040c2f jmp short loc_140040C45 ; +0xd5, 0x140040c35 mov rax, [rbx] ; +0xd7, 0x140040c37 mov edx, 1 ; +0xda, 0x140040c3a call qword ptr [rax+8] ; +0xdf, 0x140040c3f mov rbx, rsi ; +0xe2, 0x140040c42 mov [rdi+1F8h], rbx ; +0xe5, 0x140040c45 mov rax, [rdi] ; +0xec, 0x140040c4c mov rdx, rbx ; +0xef, 0x140040c4f mov rcx, rdi ; +0xf2, 0x140040c52 call qword ptr [rax+1D0h] ; +0xf5, 0x140040c55 mov dword ptr [rdi+1Ch], 4 ; +0xfb, 0x140040c5b mov rax, [rdi] ; +0x102, 0x140040c62 mov dl, 1 ; +0x105, 0x140040c65 mov rcx, rdi ; +0x107, 0x140040c67 call qword ptr [rax+398h] ; +0x10a, 0x140040c6a mov byte ptr [rdi+238h], 1 ; +0x110, 0x140040c70 mov dword ptr [rdi+22Ch], 42200000h ; +0x117, 0x140040c77 mov dword ptr [rdi+230h], 42C80000h ; +0x121, 0x140040c81 call cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x12b, 0x140040c8b mov rcx, rax ; +0x131, 0x140040c91 lea rdx, [rsp+78h+var_48] ; +0x134, 0x140040c94 call cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x139, 0x140040c99 mov ecx, [rax] ; +0x13f, 0x140040c9f mov [rdi+234h], ecx ; +0x141, 0x140040ca1 mov byte ptr [rdi+239h], 1 ; +0x147, 0x140040ca7 mov rax, [rdi] ; +0x14e, 0x140040cae mov rcx, rdi ; +0x151, 0x140040cb1 call qword ptr [rax+140h] ; +0x154, 0x140040cb4 movss xmm1, dword ptr [rax] ; +0x15a, 0x140040cba mulss xmm1, cs:dword_140834F20 ; +0x15e, 0x140040cbe movss xmm2, cs:dword_1408356E4 ; +0x166, 0x140040cc6 lea rcx, [rsp+78h+var_48] ; +0x16e, 0x140040cce call cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x173, 0x140040cd3 lea rcx, [rdi+23Ch] ; +0x179, 0x140040cd9 mov rdx, rax ; +0x180, 0x140040ce0 call cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x183, 0x140040ce3 xorps xmm1, xmm1 ; +0x189, 0x140040ce9 mov rcx, rdi ; +0x18c, 0x140040cec call BoomScrollLayer__updateDots ; +0x18f, 0x140040cef mov [rsp+78h+arg_10], 0FF969696h ; +0x194, 0x140040cf4 mov eax, [rsp+78h+arg_10] ; +0x19f, 0x140040cff mov [rdi+248h], eax ; +0x1a6, 0x140040d06 mov [rsp+78h+arg_10], 0FFFFFFFFh ; +0x1ac, 0x140040d0c mov eax, [rsp+78h+arg_10] ; +0x1b7, 0x140040d17 mov [rdi+244h], eax ; +0x1be, 0x140040d1e call cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1c4, 0x140040d24 mov rcx, rax ; +0x1ca, 0x140040d2a lea rdx, [rsp+78h+var_48] ; +0x1cd, 0x140040d2d call cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x1d2, 0x140040d32 movss xmm6, dword ptr [rax+4] ; +0x1d8, 0x140040d38 call cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1dd, 0x140040d3d mov rcx, rax ; +0x1e3, 0x140040d43 lea rdx, [rsp+78h+var_40] ; +0x1e6, 0x140040d46 call cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x1eb, 0x140040d4b movss [rsp+78h+var_58], xmm6 ; +0x1f1, 0x140040d51 movss xmm3, dword ptr [rax] ; +0x1f7, 0x140040d57 xorps xmm2, xmm2 ; +0x1fb, 0x140040d5b xorps xmm1, xmm1 ; +0x1fe, 0x140040d5e lea rcx, [rsp+78h+var_38] ; +0x201, 0x140040d61 call cs:??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0x206, 0x140040d66 lea rcx, [rdi+200h] ; +0x20c, 0x140040d6c mov rdx, rax ; +0x213, 0x140040d73 call cs:??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0x216, 0x140040d76 mov [rdi+24Ch], rsi ; +0x21c, 0x140040d7c mov dword ptr [rdi+210h], 3E99999Ah ; +0x223, 0x140040d83 mov dword ptr [rdi+218h], 3ECCCCCDh ; +0x22d, 0x140040d8d mov dword ptr [rdi+214h], 3F19999Ah ; +0x237, 0x140040d97 mov [rdi+1E0h], r14 ; +0x241, 0x140040da1 mov rcx, r14 ; +0x248, 0x140040da8 call cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x24b, 0x140040dab lea rcx, aSmalldotPng; "smallDot.png" ; +0x251, 0x140040db1 call cs:?create@CCSpriteBatchNode@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSpriteBatchNode::create(char const *) ; +0x258, 0x140040db8 mov r14, rax ; +0x25e, 0x140040dbe mov rcx, [rdi] ; +0x261, 0x140040dc1 mov r9, [rcx+1C8h] ; +0x264, 0x140040dc4 mov r8d, 5 ; +0x26b, 0x140040dcb mov rdx, rax ; +0x271, 0x140040dd1 mov rcx, rdi ; +0x274, 0x140040dd4 call r9 ; +0x277, 0x140040dd7 mov rcx, rdi ; +0x27a, 0x140040dda call BoomScrollLayer__updatePages ; +0x27d, 0x140040ddd mov [rdi+1B4h], bpl ; +0x282, 0x140040de2 test bpl, bpl ; +0x289, 0x140040de9 jz short loc_140040DF6 ; +0x28c, 0x140040dec mov rcx, rdi ; +0x28e, 0x140040dee call BoomScrollLayer__repositionPagesLooped ; +0x291, 0x140040df1 mov rdx, [rsp+78h+arg_20] ; +0x296, 0x140040df6 test rdx, rdx ; +0x29e, 0x140040dfe jz short loc_140040E13 ; +0x2a1, 0x140040e01 mov r8, [rsp+78h+arg_28] ; +0x2a3, 0x140040e03 mov rcx, rdi ; +0x2ab, 0x140040e0b call BoomScrollLayer__setupDynamicScrolling ; +0x2ae, 0x140040e0e call cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x2b3, 0x140040e13 mov [rdi+1A0h], rax ; +0x2b9, 0x140040e19 mov rcx, rax ; +0x2c0, 0x140040e20 call cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x2c3, 0x140040e23 nop dword ptr [rax+00000000h] ; +0x2c9, 0x140040e29 cmp byte ptr [rdi+1C8h], 0 ; +0x2d0, 0x140040e30 jz short loc_140040E42 ; +0x2d7, 0x140040e37 mov rcx, [rdi+1C0h] ; +0x2d9, 0x140040e39 jmp short loc_140040E49 ; +0x2e0, 0x140040e40 mov rcx, [rdi+1E0h] ; +0x2e2, 0x140040e42 call cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x2e9, 0x140040e49 cmp esi, eax ; +0x2ef, 0x140040e4f jge short loc_140040E8A ; +0x2f1, 0x140040e51 lea rcx, aSmalldotPng; "smallDot.png" ; +0x2f3, 0x140040e53 call cs:?create@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::create(char const *) ; +0x2fa, 0x140040e5a mov rbx, rax ; +0x300, 0x140040e60 mov rcx, [r14] ; +0x303, 0x140040e63 mov r8, [rcx+1D0h] ; +0x306, 0x140040e66 mov rdx, rax ; +0x30d, 0x140040e6d mov rcx, r14 ; +0x310, 0x140040e70 call r8 ; +0x313, 0x140040e73 mov rdx, rbx ; +0x316, 0x140040e76 mov rcx, [rdi+1A0h] ; +0x319, 0x140040e79 call cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x320, 0x140040e80 inc esi ; +0x326, 0x140040e86 jmp short loc_140040E30 ; +0x328, 0x140040e88 movss xmm2, cs:dword_140834E00 ; +0x32a, 0x140040e8a lea rdx, BoomScrollLayer__updateDots ; +0x332, 0x140040e92 mov rcx, rdi ; +0x339, 0x140040e99 call cs:?schedule@CCNode@cocos2d@@QEAAXP8CCObject@2@EAAXM@ZM@Z; cocos2d::CCNode::schedule(void (cocos2d::CCObject::*)(float),float) ; +0x33c, 0x140040e9c mov al, 1 ; +0x342, 0x140040ea2 lea r11, [rsp+78h+var_18] ; +0x344, 0x140040ea4 mov rbx, [r11+20h] ; +0x349, 0x140040ea9 mov rbp, [r11+28h] ; +0x34d, 0x140040ead movaps xmm6, [rsp+78h+var_28] ; +0x351, 0x140040eb1 mov rsp, r11 ; +0x356, 0x140040eb6 pop r14 ; +0x359, 0x140040eb9 pop rdi ; +0x35b, 0x140040ebb pop rsi ; +0x35c, 0x140040ebc retn ; +0x35d, 0x140040ebd