// // PlayerObject::setPosition from 0x1404fa970 to 0x1404fb621 (3249 bytes) // // 5 xrefs: // > @ 0x1407d4880 // > @ 0x1408d5634 // > @ 0x1408d56dc // > @ 0x14092a338 // > @ 0x14092a344 // // 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:33:22 +0000 // __int64 __fastcall PlayerObject::setPosition(__int64 a1, float *a2) { const struct cocos2d::CCPoint *v3; // rax __int64 v4; // rbx float *v5; // rdx __int64 v6; // rcx float *v7; // rax float *v8; // r8 float v9; // xmm1_4 float v10; // xmm2_4 __int64 v11; // rax __int64 v12; // rax __int64 *v13; // rdi __int64 v14; // rbx __int64 v15; // rax __int64 v16; // rax __int64 *v17; // rdi __int64 v18; // rbx __int64 v19; // rax __int64 *v20; // rdi __int64 v21; // rbx __int64 v22; // rax __int64 *v23; // rdi __int64 v24; // rbx __int64 v25; // rax __int64 v26; // r15 float *v27; // rax __int64 *v28; // r14 __int64 v29; // rsi __int64 (__fastcall *v30)(__int64 *); // rdi __int64 v31; // rax __int64 v32; // rax __int64 v33; // rbx __int64 v34; // rax __int64 v35; // rax __int64 *v36; // rsi __int64 v37; // rbx __int64 v38; // rdi __int64 v39; // r14 __int64 *v40; // r12 __int64 v41; // r15 __int64 (__fastcall *v42)(__int64); // rdi __int64 (__fastcall *v43)(__int64 *); // rsi __int64 v44; // rbx __int64 v45; // rax __int64 v46; // rax __int64 v47; // rbx __int64 v48; // rax __int64 v49; // rax __int64 v50; // r14 __int64 *v51; // r12 __int64 v52; // r15 __int64 (__fastcall *v53)(__int64); // rdi __int64 (__fastcall *v54)(__int64 *); // rsi __int64 v55; // rbx __int64 v56; // rax __int64 v57; // rax __int64 v58; // rbx __int64 v59; // rax __int64 v60; // rax __int64 v61; // r14 __int64 *v62; // r12 __int64 v63; // r15 __int64 (__fastcall *v64)(__int64); // rdi __int64 (__fastcall *v65)(__int64 *); // rsi __int64 v66; // rbx __int64 v67; // rax __int64 v68; // rax __int64 v69; // rbx __int64 v70; // rax __int64 v71; // rax int v72; // esi int v73; // eax unsigned int v74; // ebx __int64 v75; // rax int v76; // eax __m128i v77; // xmm0 char v78; // bl int v79; // eax float v80; // xmm7_4 float v81; // xmm8_4 float v82; // xmm10_4 float v83; // xmm1_4 float v84; // xmm0_4 double v85; // xmm6_8 double v86; // xmm12_8 float v87; // xmm0_4 char v88; // cl bool v89; // al double v90; // xmm0_8 double v91; // xmm6_8 float v92; // xmm7_4 int v93; // eax double v94; // xmm8_8 float v95; // xmm6_4 float v96; // xmm0_4 float v97; // xmm1_4 float *v98; // rbx int v99; // xmm1_4 unsigned int v100; // eax __m128i v101; // xmm2 int v102; // eax float v103; // xmm1_4 int v104; // eax __int64 *v105; // rdi __int64 v106; // rbx __int64 v107; // rax int v108; // eax float v109; // xmm2_4 float v110; // xmm1_4 __int64 v111; // rax __int64 v112; // rbx __int64 v113; // rax float v114; // xmm2_4 float v115; // xmm1_4 __int64 v116; // rax __int64 v117; // rbx __int64 v118; // rax __int64 v119; // rsi __int64 *v120; // r15 __int64 v121; // r14 __int64 (__fastcall *v122)(__int64); // rdi __int64 v123; // rax __int64 v124; // rbx __int64 v125; // rax __int64 v126; // rax __int64 *v127; // r14 __int64 v128; // rbx __int64 v129; // rsi __int64 (__fastcall *v130)(__int64 *); // rdi __int64 v131; // rax __int64 v132; // rax __int64 v133; // rbx __int64 v134; // rax char *v135; // rdx __int64 v136; // rax __int64 v137; // rbx __int64 v138; // rax __int64 (__fastcall *v139)(__int64 *); // rdi __int64 v140; // rax __int64 v141; // rax __int64 *v142; // rdi __int64 v143; // rbx __int64 v144; // rax __int64 v145; // rax __int64 v146; // rax const struct cocos2d::CCPoint *v147; // rax __int64 v148; // rax __int64 *v149; // rdi __int64 v150; // rbx __int64 v151; // rax int v153; // [rsp+28h] [rbp-79h] BYREF int v154; // [rsp+2Ch] [rbp-75h] char v155[8]; // [rsp+30h] [rbp-71h] BYREF float v156[2]; // [rsp+38h] [rbp-69h] BYREF char v157[8]; // [rsp+40h] [rbp-61h] BYREF char v158[8]; // [rsp+48h] [rbp-59h] BYREF char v159[8]; // [rsp+50h] [rbp-51h] BYREF char v160[8]; // [rsp+58h] [rbp-49h] BYREF float v161; // [rsp+108h] [rbp+67h] BYREF float v162; // [rsp+10Ch] [rbp+6Bh] float *v163; // [rsp+110h] [rbp+6Fh] float v164; // [rsp+118h] [rbp+77h] BYREF float v165; // [rsp+11Ch] [rbp+7Bh] char v166; // [rsp+120h] [rbp+7Fh] BYREF v163 = a2; *(_WORD *)(a1 + 872) = 257; GameObject::setPosition(a1, a2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166); v3 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1888) + 200LL))(*(_QWORD *)(a1 + 1888)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v155, v3); if ( *(_BYTE *)(a1 + 2508) ) { v4 = *(_QWORD *)(a1 + 1368); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, *(float *)(a1 + 2552) * -10.0, 0.0); v5 = &v164; v6 = v4; v8 = v7; } else { if ( *(_BYTE *)(a1 + 2936) && *(_BYTE *)(a1 + 2497) ) { v9 = *(float *)(a1 + 2552) * -10.0; v10 = -18.0; } else if ( *(_BYTE *)(a1 + 2498) ) { v10 = -3.0; v9 = 0.0; } else { v9 = *(float *)(a1 + 2552) * -12.0; v10 = -4.0; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, v9, v10); cocos2d::CCPoint::operator+(v155, &v161, v11); v6 = *(_QWORD *)(a1 + 1368); v8 = &v161; v5 = (float *)v157; } cocos2d::CCNode::convertToWorldSpace(v6, v5, v8); cocos2d::CCPoint::operator=(&v166, v12); if ( (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2248) + 504LL))(*(_QWORD *)(a1 + 2248)) ) { v13 = *(__int64 **)(a1 + 2248); v14 = *v13; v15 = (*(__int64 (__fastcall **)(__int64 *))(*v13 + 504))(v13); cocos2d::CCNode::convertToNodeSpace(v15, &v161, &v166); (*(void (__fastcall **)(__int64 *, __int64))(v14 + 184))(v13, v16); } v17 = *(__int64 **)(a1 + 2256); v18 = *v17; v19 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2248) + 200LL))(*(_QWORD *)(a1 + 2248)); (*(void (__fastcall **)(__int64 *, __int64))(v18 + 184))(v17, v19); v20 = *(__int64 **)(a1 + 2272); v21 = *v20; v22 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2248) + 200LL))(*(_QWORD *)(a1 + 2248)); (*(void (__fastcall **)(__int64 *, __int64))(v21 + 184))(v20, v22); v23 = *(__int64 **)(a1 + 2288); v24 = *v23; v25 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2248) + 200LL))(*(_QWORD *)(a1 + 2248)); (*(void (__fastcall **)(__int64 *, __int64))(v24 + 184))(v23, v25); v26 = *(_QWORD *)(*(_QWORD *)(a1 + 2216) + 800LL); v27 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 320LL))(v26); v28 = *(__int64 **)(a1 + 3096); v29 = *v28; v30 = *(__int64 (__fastcall **)(__int64 *))(*v28 + 504); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, *v27 * 0.5, 2.5); cocos2d::CCNode::convertToWorldSpace(v26, &v164, v31); v33 = v32; v34 = v30(v28); cocos2d::CCNode::convertToNodeSpace(v34, v157, v33); (*(void (__fastcall **)(__int64 *, __int64))(v29 + 184))(v28, v35); v36 = *(__int64 **)(a1 + 3096); v37 = *(_QWORD *)(*(_QWORD *)(a1 + 2216) + 688LL); v38 = *v36; (*(void (__fastcall **)(__int64))(*(_QWORD *)v37 + 128LL))(v37); (*(void (__fastcall **)(__int64))(*(_QWORD *)v26 + 360LL))(v26); (*(void (__fastcall **)(__int64))(*(_QWORD *)v37 + 360LL))(v37); (*(void (__fastcall **)(__int64 *))(v38 + 352))(v36); if ( (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2280) + 504LL))(*(_QWORD *)(a1 + 2280)) ) { v39 = *(_QWORD *)(a1 + 3096); v40 = *(__int64 **)(a1 + 2280); v41 = *v40; v42 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 504LL); v43 = *(__int64 (__fastcall **)(__int64 *))(*v40 + 504); v44 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 200LL))(v39); v45 = v42(v39); cocos2d::CCNode::convertToWorldSpace(v45, &v161, v44); v47 = v46; v48 = v43(v40); cocos2d::CCNode::convertToNodeSpace(v48, &v164, v47); (*(void (__fastcall **)(__int64 *, __int64))(v41 + 184))(v40, v49); } if ( (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2296) + 504LL))(*(_QWORD *)(a1 + 2296)) ) { v50 = *(_QWORD *)(a1 + 1936); v51 = *(__int64 **)(a1 + 2296); v52 = *v51; v53 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v50 + 504LL); v54 = *(__int64 (__fastcall **)(__int64 *))(*v51 + 504); v55 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v50 + 200LL))(v50); v56 = v53(v50); cocos2d::CCNode::convertToWorldSpace(v56, &v161, v55); v58 = v57; v59 = v54(v51); cocos2d::CCNode::convertToNodeSpace(v59, &v164, v58); (*(void (__fastcall **)(__int64 *, __int64))(v52 + 184))(v51, v60); } if ( (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2304) + 504LL))(*(_QWORD *)(a1 + 2304)) ) { v61 = *(_QWORD *)(a1 + 1944); v62 = *(__int64 **)(a1 + 2304); v63 = *v62; v64 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v61 + 504LL); v65 = *(__int64 (__fastcall **)(__int64 *))(*v62 + 504); v66 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v61 + 200LL))(v61); v67 = v64(v61); cocos2d::CCNode::convertToWorldSpace(v67, &v161, v66); v69 = v68; v70 = v65(v62); cocos2d::CCNode::convertToNodeSpace(v70, &v164, v69); (*(void (__fastcall **)(__int64 *, __int64))(v63 + 184))(v62, v71); } v72 = -1; v73 = -1; if ( !*(_BYTE *)(a1 + 2503) ) v73 = 1; if ( *(_BYTE *)(a1 + 2508) ) v73 = 1; v74 = -v73; if ( *(_BYTE *)(a1 + 2032) ) v74 = v73; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v156, 0.0, 0.0); if ( *(_BYTE *)(a1 + 2501) ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, 0.0, -2.0); cocos2d::CCPoint::operator=(v156, v75); } v76 = -1; v77 = _mm_cvtsi32_si128(v74); if ( !*(_BYTE *)(a1 + 2506) ) v76 = 1; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v153, (float)((float)(v156[0] - 10.0) * *(float *)(a1 + 2552)) * (float)v76, (float)((float)(v156[1] - 13.0) * _mm_cvtepi32_ps(v77).m128_f32[0]) * *(float *)(a1 + 2552)); if ( *(_BYTE *)(a1 + 2488) ) { v78 = *(_BYTE *)(a1 + 1532); v79 = 1; v80 = *(float *)(a1 + 2552) * *(float *)(a1 + 768); if ( !v78 ) v79 = -1; v81 = *(float *)(a1 + 2552) * 20.0; v82 = (float)v79; v83 = (float)(v81 * v81) + (float)(v80 * v80); if ( v83 < 0.0 ) v84 = sqrtf(v83); else v84 = fsqrt(v83); v85 = *(float *)(a1 + 1696); v86 = (float)(v84 * 0.5); if ( v82 == -1.0 ) v85 = -v85; v87 = atanf(v80 / v81); v88 = *(_BYTE *)(a1 + 2506); v89 = v88 != v78; if ( *(_BYTE *)(a1 + 2503) ) v89 = v88 == v78; v90 = v82 * v87; if ( v89 ) v91 = v85 + v90; else v91 = v85 - v90; v92 = v91; v93 = -1; if ( !v88 ) v93 = 1; v94 = (double)v93; v95 = sinf(v92) * v86 * (double)v93; v96 = cosf(v92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, v96 * v86 * v94, v95); if ( *(_BYTE *)(a1 + 2507) ) { v97 = v161; v161 = v162; v162 = v97; } v98 = v163; cocos2d::CCPoint::operator-(v163, &v164, &v161); (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 2240) + 184LL))(*(_QWORD *)(a1 + 2240), &v164); } else if ( *(_BYTE *)(a1 + 2580) ) { if ( *(_BYTE *)(a1 + 2507) ) { v99 = v153; v153 = v154; v154 = v99; } v98 = v163; cocos2d::CCPoint::operator+(v163, &v161, &v153); (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 2240) + 184LL))(*(_QWORD *)(a1 + 2240), &v161); } else { v98 = v163; } if ( *(_BYTE *)(a1 + 2609) ) { v100 = -1; if ( !*(_BYTE *)(a1 + 2503) ) v100 = 1; v101 = _mm_cvtsi32_si128(v100); v102 = -1; if ( !*(_BYTE *)(a1 + 2506) ) v102 = 1; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v161, (float)v102 * *(float *)(a1 + 2552), _mm_cvtepi32_ps(v101).m128_f32[0] * (float)(*(float *)(a1 + 2552) * -15.0)); if ( *(_BYTE *)(a1 + 2507) ) { v103 = v161; v161 = v162; v162 = v103; } cocos2d::CCPoint::operator+(v98, &v164, &v161); (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 2264) + 184LL))(*(_QWORD *)(a1 + 2264), &v164); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2264) + 1000LL))(*(_QWORD *)(a1 + 2264)); v104 = 300; v105 = *(__int64 **)(a1 + 2264); if ( !*(_BYTE *)(a1 + 2503) ) v104 = -300; v106 = *v105; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, -350.0, (float)v104); (*(void (__fastcall **)(__int64 *, __int64))(v106 + 1040))(v105, v107); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2264) + 352LL))(*(_QWORD *)(a1 + 2264)); } if ( !*(_BYTE *)(a1 + 2497) ) { if ( !*(_BYTE *)(a1 + 2498) ) { if ( *(_BYTE *)(a1 + 2508) ) { v142 = *(__int64 **)(a1 + 1960); v143 = *v142; v144 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2248) + 200LL))(*(_QWORD *)(a1 + 2248)); (*(void (__fastcall **)(__int64 *, __int64))(v143 + 184))(v142, v144); } else { if ( !*(_BYTE *)(a1 + 2506) ) v72 = 1; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, (float)v72 * (float)(*(float *)(a1 + 2552) * -2.0), 0.0); if ( *(_BYTE *)(a1 + 2507) ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, v162, v161); cocos2d::CCPoint::operator=(&v161, v145); } v146 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1); cocos2d::CCPoint::operator+(v146, &v164, &v161); (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 1960) + 184LL))(*(_QWORD *)(a1 + 1960), &v164); } goto LABEL_95; } if ( !(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1960) + 504LL))(*(_QWORD *)(a1 + 1960)) ) goto LABEL_95; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, 0.0, 0.0); v137 = v136; v138 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1888) + 200LL))(*(_QWORD *)(a1 + 1888)); cocos2d::CCPoint::operator+(v138, &v161, v137); v127 = *(__int64 **)(a1 + 1960); v129 = *v127; v139 = *(__int64 (__fastcall **)(__int64 *))(*v127 + 504); cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 1368), v160, &v161); v133 = v140; v134 = v139(v127); v135 = v159; LABEL_87: cocos2d::CCNode::convertToNodeSpace(v134, v135, v133); (*(void (__fastcall **)(__int64 *, __int64))(v129 + 184))(v127, v141); goto LABEL_95; } if ( *(_BYTE *)(a1 + 2936) ) { v127 = *(__int64 **)(a1 + 1960); v128 = *(_QWORD *)(a1 + 1368); v129 = *v127; v130 = *(__int64 (__fastcall **)(__int64 *))(*v127 + 504); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, *(float *)(a1 + 2552) * -10.0, *(float *)(a1 + 2552) * -12.0); cocos2d::CCNode::convertToWorldSpace(v128, &v164, v131); v133 = v132; v134 = v130(v127); v135 = v160; goto LABEL_87; } v108 = -4; if ( !*(_BYTE *)(a1 + 2506) ) v108 = 4; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, (float)v108, 0.0); if ( *(_BYTE *)(a1 + 2507) ) { v109 = v161; v110 = v162; v161 = v162; v162 = v109; } else { v109 = v162; v110 = v161; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, v110, v109); v112 = v111; v113 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2248) + 200LL))(*(_QWORD *)(a1 + 2248)); cocos2d::CCPoint::operator+(v113, &v164, v112); (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 1960) + 184LL))(*(_QWORD *)(a1 + 1960), &v164); if ( *(_QWORD *)(a1 + 1968) ) { if ( *(_DWORD *)(a1 + 2356) == 2 ) { v115 = -8.0; } else { if ( *(_DWORD *)(a1 + 2356) == 3 ) { v114 = -3.5; v115 = -8.0; LABEL_80: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, v115, v114); if ( !*(_BYTE *)(a1 + 2506) ) v72 = 1; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v158, (float)v72 * v164, v165); v117 = v116; v118 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1888) + 200LL))(*(_QWORD *)(a1 + 1888)); cocos2d::CCPoint::operator+(v118, v157, v117); v119 = *(_QWORD *)(a1 + 1960); v120 = *(__int64 **)(a1 + 1968); v121 = *v120; v122 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v119 + 504LL); cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 1368), v159, v157); v124 = v123; v125 = v122(v119); cocos2d::CCNode::convertToNodeSpace(v125, v160, v124); (*(void (__fastcall **)(__int64 *, __int64))(v121 + 184))(v120, v126); goto LABEL_95; } if ( *(_DWORD *)(a1 + 2356) != 4 && *(_DWORD *)(a1 + 2356) != 5 ) { if ( *(_DWORD *)(a1 + 2356) == 6 ) { v114 = -2.5; v115 = -14.0; } else { v114 = 0.0; v115 = 0.0; } goto LABEL_80; } v115 = -14.0; } v114 = -3.0; goto LABEL_80; } LABEL_95: if ( *(_BYTE *)(a1 + 2432) && *(_BYTE *)(a1 + 2500) ) { v147 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v161, v147); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 1976) + 424LL, v148); } v149 = *(__int64 **)(a1 + 1976); v150 = *v149; v151 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1); return (*(__int64 (__fastcall **)(__int64 *, __int64))(v150 + 184))(v149, v151); }
GD Web Decomp Icon

GD Web Decomp

Raw Source