; ; GJBaseGameLayer::getSavedPosition from 0x140320820 to 0x140320b42 (802 bytes) ; ; 4 xrefs: ; > GJBaseGameLayer::processAdvancedFollowAction @ 0x140338118 ; > @ 0x1408b56c8 ; > @ 0x1408b56fc ; > @ 0x14091ee30 ; ; 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:30:22 +0000 ; push rbx ; +0x0, 0x140320820 push rbp ; +0x2, 0x140320822 push rsi ; +0x3, 0x140320823 push r12 ; +0x4, 0x140320824 push r14 ; +0x6, 0x140320826 sub rsp, 60h ; +0x8, 0x140320828 xorps xmm0, xmm0 ; +0xc, 0x14032082c movaps [rsp+88h+var_38], xmm6 ; +0xf, 0x14032082f comiss xmm0, xmm3 ; +0x14, 0x140320834 mov ebx, r8d ; +0x17, 0x140320837 mov rsi, rdx ; +0x1a, 0x14032083a mov rbp, rcx ; +0x1d, 0x14032083d jb short loc_1403208B4 ; +0x20, 0x140320840 cmp ebx, 0FFFFFFFFh ; +0x22, 0x140320842 jnz short loc_140320868 ; +0x25, 0x140320845 mov rcx, [rcx+0DB8h] ; +0x27, 0x140320847 mov rax, [rcx] ; +0x2e, 0x14032084e call qword ptr [rax+0C8h] ; +0x31, 0x140320851 mov rdx, rax ; +0x37, 0x140320857 mov rcx, rsi ; +0x3a, 0x14032085a call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x3d, 0x14032085d jmp loc_140320B2E ; +0x43, 0x140320863 cmp ebx, 0FFFFFFFEh ; +0x48, 0x140320868 jnz short loc_140320876 ; +0x4b, 0x14032086b mov rcx, [rcx+0DC0h] ; +0x4d, 0x14032086d jmp short loc_14032084E ; +0x54, 0x140320874 cmp ebx, 0FFFFFFFDh ; +0x56, 0x140320876 jnz short loc_140320890 ; +0x59, 0x140320879 lea rdx, [rcx+410h] ; +0x5b, 0x14032087b mov rcx, rsi ; +0x62, 0x140320882 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x65, 0x140320885 jmp loc_140320B2E ; +0x6b, 0x14032088b mov edx, ebx ; +0x70, 0x140320890 call GJBaseGameLayer__tryGetMainObject ; +0x72, 0x140320892 test rax, rax ; +0x77, 0x140320897 jz short loc_140320907 ; +0x7a, 0x14032089a mov rcx, [rax] ; +0x7c, 0x14032089c mov rdx, rsi ; +0x7f, 0x14032089f mov r8, [rcx+4B8h] ; +0x82, 0x1403208a2 mov rcx, rax ; +0x89, 0x1403208a9 call r8 ; +0x8c, 0x1403208ac jmp loc_140320B2E ; +0x8f, 0x1403208af mov eax, [rcx+3F4h] ; +0x94, 0x1403208b4 xorps xmm0, xmm0 ; +0x9a, 0x1403208ba sub eax, [rcx+3F0h] ; +0x9d, 0x1403208bd xorps xmm2, xmm2 ; +0xa3, 0x1403208c3 cvtss2sd xmm2, xmm3 ; +0xa6, 0x1403208c6 cvtsi2ss xmm0, rax ; +0xaa, 0x1403208ca divsd xmm2, cs:qword_140835040 ; +0xaf, 0x1403208cf divss xmm0, cs:dword_140835AA4 ; +0xb7, 0x1403208d7 xorps xmm1, xmm1 ; +0xbf, 0x1403208df cvtps2pd xmm0, xmm0 ; +0xc2, 0x1403208e2 subsd xmm2, xmm0 ; +0xc5, 0x1403208e5 maxsd xmm1, xmm2 ; +0xc9, 0x1403208e9 cvtpd2ps xmm6, xmm1 ; +0xcd, 0x1403208ed movaps xmm0, xmm6; X ; +0xd1, 0x1403208f1 call ceilf ; +0xd4, 0x1403208f4 cvttss2si r12d, xmm0 ; +0xd9, 0x1403208f9 cmp r12d, [rbp+4D4h] ; +0xde, 0x1403208fe jl short loc_14032091C ; +0xe5, 0x140320905 lea rdx, dword_14090AA70 ; +0xe7, 0x140320907 mov rcx, rsi ; +0xee, 0x14032090e call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xf1, 0x140320911 jmp loc_140320B2E ; +0xf7, 0x140320917 mov [rsp+88h+arg_18], ebx ; +0xfc, 0x14032091c cmp ebx, 0FFFFFFFFh ; +0x103, 0x140320923 jnz short loc_140320938 ; +0x106, 0x140320926 mov rax, [rbp+0DB8h] ; +0x108, 0x140320928 mov r14d, [rax+544h] ; +0x10f, 0x14032092f jmp short loc_14032097E ; +0x116, 0x140320936 cmp ebx, 0FFFFFFFEh ; +0x118, 0x140320938 jnz short loc_14032094D ; +0x11b, 0x14032093b mov rax, [rbp+0DC0h] ; +0x11d, 0x14032093d mov r14d, [rax+544h] ; +0x124, 0x140320944 jmp short loc_14032097E ; +0x12b, 0x14032094b mov edx, ebx ; +0x12d, 0x14032094d cmp ebx, 0FFFFFFFDh ; +0x12f, 0x14032094f jnz short loc_14032095D ; +0x132, 0x140320952 mov r14d, [rbp+4D8h] ; +0x134, 0x140320954 jmp short loc_140320980 ; +0x13b, 0x14032095b mov rcx, rbp ; +0x13d, 0x14032095d call GJBaseGameLayer__tryGetMainObject ; +0x140, 0x140320960 test rax, rax ; +0x145, 0x140320965 jz short loc_140320907 ; +0x148, 0x140320968 mov r14d, [rax+544h] ; +0x14a, 0x14032096a mov ebx, [rax+39Ch] ; +0x151, 0x140320971 mov [rsp+88h+arg_18], ebx ; +0x157, 0x140320977 mov edx, ebx ; +0x15e, 0x14032097e mov r9d, ebx ; +0x160, 0x140320980 mov r8d, ebx ; +0x163, 0x140320983 mov eax, ebx ; +0x166, 0x140320986 test r14d, r14d ; +0x168, 0x140320988 js loc_140320907 ; +0x16b, 0x14032098b sar eax, 8 ; +0x171, 0x140320991 movzx ecx, al ; +0x174, 0x140320994 movzx eax, r9b ; +0x177, 0x140320997 mov r9, 0CBF29CE484222325h ; +0x17b, 0x14032099b xor rax, r9 ; +0x185, 0x1403209a5 sar edx, 10h ; +0x188, 0x1403209a8 mov r9, 100000001B3h ; +0x18b, 0x1403209ab sar r8d, 18h ; +0x195, 0x1403209b5 imul rax, r9 ; +0x199, 0x1403209b9 mov [rsp+88h+arg_8], r15 ; +0x19d, 0x1403209bd xor r15d, r15d ; +0x1a5, 0x1403209c5 xor rcx, rax ; +0x1a8, 0x1403209c8 movzx eax, dl ; +0x1ab, 0x1403209cb mov rdx, [rbp+3608h] ; +0x1ae, 0x1403209ce imul rcx, r9 ; +0x1b5, 0x1403209d5 xor rcx, rax ; +0x1b9, 0x1403209d9 movzx eax, r8b ; +0x1bc, 0x1403209dc imul rcx, r9 ; +0x1c0, 0x1403209e0 xor rcx, rax ; +0x1c4, 0x1403209e4 imul rcx, r9 ; +0x1c7, 0x1403209e7 and rcx, [rbp+3620h] ; +0x1cb, 0x1403209eb add rcx, rcx ; +0x1d2, 0x1403209f2 mov rax, [rdx+rcx*8+8] ; +0x1d5, 0x1403209f5 cmp rax, [rbp+35F8h] ; +0x1da, 0x1403209fa jz short loc_140320A20 ; +0x1e1, 0x140320a01 mov rdx, [rdx+rcx*8] ; +0x1e3, 0x140320a03 cmp ebx, [rax+10h] ; +0x1e7, 0x140320a07 jz short loc_140320A23 ; +0x1ea, 0x140320a0a nop dword ptr [rax+00h] ; +0x1ec, 0x140320a0c cmp rax, rdx ; +0x1f0, 0x140320a10 jz short loc_140320A20 ; +0x1f3, 0x140320a13 mov rax, [rax+8] ; +0x1f5, 0x140320a15 cmp ebx, [rax+10h] ; +0x1f9, 0x140320a19 jnz short loc_140320A10 ; +0x1fc, 0x140320a1c jmp short loc_140320A23 ; +0x1fe, 0x140320a1e mov rax, r15 ; +0x200, 0x140320a20 test rax, rax ; +0x203, 0x140320a23 jnz short loc_140320A3D ; +0x206, 0x140320a26 lea rdx, dword_14090AA70 ; +0x208, 0x140320a28 mov rcx, rsi ; +0x20f, 0x140320a2f call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x212, 0x140320a32 jmp loc_140320B26 ; +0x218, 0x140320a38 lea rcx, [rbp+35F0h] ; +0x21d, 0x140320a3d mov [rsp+88h+arg_0], rdi ; +0x224, 0x140320a44 lea r8, [rsp+88h+arg_18] ; +0x22c, 0x140320a4c lea rdx, [rsp+88h+var_50] ; +0x234, 0x140320a54 call sub_140067F60 ; +0x239, 0x140320a59 mov rcx, [rax] ; +0x23e, 0x140320a5e mov eax, [rbp+4D4h] ; +0x241, 0x140320a61 cdq ; +0x247, 0x140320a67 mov edi, [rcx+14h] ; +0x248, 0x140320a68 idiv edi ; +0x24b, 0x140320a6b sub edx, r12d ; +0x24d, 0x140320a6d lea eax, [rdx+rdi] ; +0x250, 0x140320a70 cmovns eax, edx ; +0x253, 0x140320a73 lea ebx, [rax+1] ; +0x256, 0x140320a76 add eax, r14d ; +0x259, 0x140320a79 add eax, eax ; +0x25c, 0x140320a7c movsxd rcx, eax ; +0x25e, 0x140320a7e mov rax, [rbp+4B8h] ; +0x261, 0x140320a81 movss xmm2, dword ptr [rax+rcx*4+4] ; +0x268, 0x140320a88 movss xmm1, dword ptr [rax+rcx*4] ; +0x26e, 0x140320a8e lea rcx, [rsp+88h+var_68] ; +0x273, 0x140320a93 call cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x278, 0x140320a98 mov rax, [rbp+4B8h] ; +0x27e, 0x140320a9e cmp ebx, edi ; +0x285, 0x140320aa5 cmovl r15d, ebx ; +0x287, 0x140320aa7 add r15d, r14d ; +0x28b, 0x140320aab add r15d, r15d ; +0x28e, 0x140320aae movsxd rcx, r15d ; +0x291, 0x140320ab1 movss xmm2, dword ptr [rax+rcx*4+4] ; +0x294, 0x140320ab4 movss xmm1, dword ptr [rax+rcx*4] ; +0x29a, 0x140320aba lea rcx, [rsp+88h+var_60] ; +0x29f, 0x140320abf call cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x2a4, 0x140320ac4 lea r8, [rsp+88h+var_68] ; +0x2aa, 0x140320aca lea rdx, [rsp+88h+var_58] ; +0x2af, 0x140320acf lea rcx, [rsp+88h+var_60] ; +0x2b4, 0x140320ad4 call cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x2b9, 0x140320ad9 movd xmm2, r12d ; +0x2bf, 0x140320adf lea rdx, [rsp+88h+var_50] ; +0x2c4, 0x140320ae4 cvtdq2ps xmm2, xmm2 ; +0x2c9, 0x140320ae9 lea rcx, [rsp+88h+var_58] ; +0x2cc, 0x140320aec subss xmm2, xmm6 ; +0x2d1, 0x140320af1 call cs:??DCCPoint@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCPoint::operator*(float) ; +0x2d5, 0x140320af5 lea r8, [rsp+88h+var_50] ; +0x2db, 0x140320afb lea rdx, [rsp+88h+var_40] ; +0x2e0, 0x140320b00 lea rcx, [rsp+88h+var_68] ; +0x2e5, 0x140320b05 call cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x2ea, 0x140320b0a lea rdx, [rsp+88h+var_40] ; +0x2f0, 0x140320b10 mov rcx, rsi ; +0x2f5, 0x140320b15 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x2f8, 0x140320b18 mov rdi, [rsp+88h+arg_0] ; +0x2fe, 0x140320b1e mov r15, [rsp+88h+arg_8] ; +0x306, 0x140320b26 movaps xmm6, [rsp+88h+var_38] ; +0x30e, 0x140320b2e mov rax, rsi ; +0x313, 0x140320b33 add rsp, 60h ; +0x316, 0x140320b36 pop r14 ; +0x31a, 0x140320b3a pop r12 ; +0x31c, 0x140320b3c pop rsi ; +0x31e, 0x140320b3e pop rbp ; +0x31f, 0x140320b3f pop rbx ; +0x320, 0x140320b40 retn ; +0x321, 0x140320b41