// // sub_927730 from 0x927730 to 0x92800a (2266 bytes) // // 0 xrefs: // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:04:45 +0000 // int __fastcall sub_927730( unsigned __int8 *a1, unsigned __int8 *a2, char *a3, char *a4, unsigned __int8 *a5, unsigned __int8 *a6, char *a7, char *a8, int a9) { unsigned __int64 v9; // d16 int16x8_t v10; // q1 int v11; // r9 int v12; // lr int16x8_t v13; // q0 int v14; // r0 int v15; // r8 int v16; // r9 int v17; // lr int v18; // r2 int v19; // r12 int v20; // r0 int v21; // r1 char v22; // r1 int v23; // r3 char v24; // r3 int v25; // lr char v26; // lr int v27; // r8 int v28; // lr int v29; // r12 int v30; // r2 char v31; // r2 int v32; // r3 char v33; // r3 int v34; // lr char v35; // lr unsigned __int8 *v36; // r1 uint8x8_t *v37; // r11 unsigned __int8 *v38; // r0 char *v39; // r4 char *v40; // r2 char *v41; // r3 uint8x8_t v42; // d28 uint8x8_t v43; // d27 unsigned __int64 v44; // d17 uint8x8_t v45; // d19 int8x8x2_t v46; // q2 uint8x8_t v47; // d26 uint8x8_t v48; // d18 uint8x8_t v49; // d17 int16x4_t v50; // d6 int16x8_t v51; // q5 uint8x8_t v52; // d16 unsigned __int64 v53; // d16 uint8x8_t v54; // d17 uint8x8_t v55; // d16 uint8x8_t v56; // d24 int16x8_t v57; // q14 int16x8_t v58; // q9 int16x8_t v59; // q8 int16x8_t v60; // q9 int16x8_t v61; // q12 int16x8_t v62; // q8 int16x4_t v63; // d6 int16x8_t v64; // q9 int16x8_t v65; // q13 int16x8_t v66; // q15 int16x4_t v67; // d6 int16x8_t v68; // q8 int16x8_t v69; // q9 int16x8_t v70; // q12 int16x8_t v71; // q8 char *v72; // r5 int16x8_t v73; // q8 uint8x8_t v74; // d18 int result; // r0 int v76; // r2 bool v77; // cc int16x8_t v78; // q8 uint8x8_t v79; // d18 __int8 *v80; // r12 uint8x8_t *v81; // r11 uint8x8_t *v82; // r6 unsigned __int8 *v83; // r7 char *v84; // r4 int v85; // r3 int v86; // t1 int v87; // r2 int v88; // t1 int v89; // r0 int v90; // t1 int v91; // r3 int v92; // r1 char v93; // r5 int v94; // r2 char v95; // r5 int v96; // r3 char v97; // r1 __int8 *v98; // r12 __int8 *v99; // lr int v100; // r5 char *v101; // r4 unsigned __int8 *v102; // r8 int v103; // r3 int v104; // t1 int v105; // r2 int v106; // t1 int v107; // r0 int v108; // t1 int v109; // r3 int v110; // r1 char v111; // r7 int v112; // r2 char v113; // r1 int v114; // r3 char v115; // r1 char *v116; // [sp+0h] [bp-104h] int v117; // [sp+0h] [bp-104h] unsigned __int64 *v118; // [sp+4h] [bp-100h] int v119; // [sp+4h] [bp-100h] int16x4_t v120; // [sp+8h] [bp-FCh] unsigned __int64 v121; // [sp+18h] [bp-ECh] uint8x8_t *v122; // [sp+40h] [bp-C4h] uint8x8_t *v123; // [sp+44h] [bp-C0h] int v124; // [sp+48h] [bp-BCh] unsigned __int64 v125; // [sp+50h] [bp-B4h] unsigned __int64 v126; // [sp+58h] [bp-ACh] unsigned __int64 v127; // [sp+60h] [bp-A4h] int v129; // [sp+70h] [bp-94h] size_t v130; // [sp+80h] [bp-84h] char *v131; // [sp+84h] [bp-80h] char *v132; // [sp+88h] [bp-7Ch] int v133; // [sp+8Ch] [bp-78h] int v135; // [sp+94h] [bp-70h] _BYTE v136[9]; // [sp+98h] [bp-6Ch] BYREF _BYTE v137[9]; // [sp+A4h] [bp-60h] BYREF uint8x8_t v138; // [sp+B0h] [bp-54h] BYREF uint8x8_t v139; // [sp+B8h] [bp-4Ch] BYREF uint8x8_t v140; // [sp+C0h] [bp-44h] BYREF uint8x8_t v141; // [sp+C8h] [bp-3Ch] BYREF uint8x8_t v142; // [sp+D0h] [bp-34h] BYREF uint8x8_t v143; // [sp+D8h] [bp-2Ch] BYREF _DWORD v144[9]; // [sp+E0h] [bp-24h] BYREF int8x8x2_t v145; // 0:^20.16 int8x8x2_t v146; // 0:d8.8,8:d9.8 int8x8x2_t v147; // 0:d16.8,8:d17.8 int8x8x2_t v148; // 0:d24.8,8:d25.8 int8x8x2_t v149; // 0:d26.8,8:d27.8 int8x8x4_t v150; // 0:d12.8,8:d13.8,16:d14.8,24:d15.8 int8x8x4_t v151; // 0:d20.8,8:d21.8,16:d22.8,24:d23.8 v10.n128_u64[0] = 0x2204220422042204LL; v10.n128_u64[1] = 0x2204220422042204LL; v11 = (unsigned __int8)*a3; v131 = a3; v132 = a4; v12 = 19077 * *a1; v13.n128_u64[0] = 0xBAEBBAEBBAEBBAEBLL; v13.n128_u64[1] = 0xBAEBBAEBBAEBBAEBLL; v14 = (unsigned __int8)*a4; v15 = ((v11 + *a5) >> 1) + 1; v16 = (v11 + v15) >> 1; v17 = v12 >> 8; v18 = (a9 + 1) >> 1; v19 = ((*a6 + v14) >> 1) + 1; v129 = (v18 - 1) >> 3; v133 = 16 * v129; v20 = (v14 + v19) >> 1; v21 = v17 + ((33050 * v16) >> 8) - 17685; v135 = 16 * v129 + 1; v130 = v18 - 8 * v129; if ( (v21 & 0xFFFFC000) != 0 ) { if ( v21 < 0 ) v22 = 0; else v22 = -1; } else { v22 = (unsigned int)v21 >> 6; } *a7 = v22; v23 = v17 - ((6419 * v16) >> 8) - ((13320 * v20) >> 8) + 8708; if ( (v23 & 0xFFFFC000) != 0 ) { if ( v23 < 0 ) v24 = 0; else v24 = -1; } else { v24 = (unsigned int)v23 >> 6; } a7[1] = v24; v25 = v17 + ((26149 * v20) >> 8) - 14234; if ( (v25 & 0xFFFFC000) != 0 ) { if ( v25 < 0 ) v26 = 0; else v26 = -1; } else { v26 = (unsigned int)v25 >> 6; } a7[2] = v26; a7[3] = -1; if ( a2 ) { v27 = (v15 + *a5) >> 1; v28 = (19077 * *a2) >> 8; v29 = (v19 + *a6) >> 1; v30 = v28 + ((33050 * v27) >> 8) - 17685; if ( (v30 & 0xFFFFC000) != 0 ) { if ( v30 < 0 ) v31 = 0; else v31 = -1; } else { v31 = (unsigned int)v30 >> 6; } *a8 = v31; v32 = v28 - ((6419 * v27) >> 8) - ((13320 * v29) >> 8) + 8708; if ( (v32 & 0xFFFFC000) != 0 ) { if ( v32 < 0 ) v33 = 0; else v33 = -1; } else { v33 = (unsigned int)v32 >> 6; } a8[1] = v33; v34 = v28 + ((26149 * v29) >> 8) - 14234; if ( (v34 & 0xFFFFC000) != 0 ) { if ( v34 < 0 ) v35 = 0; else v35 = -1; } else { v35 = (unsigned int)v34 >> 6; } a8[2] = v35; a8[3] = -1; } if ( v129 > 0 ) { v36 = a5; v37 = (uint8x8_t *)(a1 + 9); v38 = a6; v39 = a7; v118 = (unsigned __int64 *)(a1 + 1); v122 = (uint8x8_t *)(a2 + 1); v123 = (uint8x8_t *)(a2 + 9); v40 = v132; v41 = v131; v124 = 0; v116 = a8; v120.n64_u64[0] = v9; do { v42.n64_u64[0] = *(unsigned __int64 *)(v41 + 1); v151.val[3].n64_u64[0] = -1; v43.n64_u64[0] = *(unsigned __int64 *)(v36 + 1); v44 = v120.n64_u64[0]; LOWORD(v44) = 282; v45.n64_u64[0] = *(unsigned __int64 *)(v40 + 1); v46 = (int8x8x2_t)vaddw_u8(vaddw_u8(vaddl_u8(*(uint8x8_t *)v41, v42), *(uint8x8_t *)v36), v43); v120.n64_u64[0] = v44; v47.n64_u64[0] = *(unsigned __int64 *)v40; v48.n64_u64[0] = *(unsigned __int64 *)(v38 + 1); v49.n64_u64[0] = vshrn_n_s16( vaddq_s16(vaddq_s16((int16x8_t)v46, vshll_n_u8(v42, 1u)), vshll_n_u8(*(uint8x8_t *)v36, 1u)), 3u).n64_u64[0]; v50.n64_u64[0] = v125; v50.n64_u16[0] = 282; v125 = v50.n64_u64[0]; v51 = vaddw_u8(vaddw_u8(vaddl_u8(*(uint8x8_t *)v40, v45), *(uint8x8_t *)v38), v48); v52.n64_u64[0] = vshrn_n_s16( vaddq_s16(vaddq_s16((int16x8_t)v46, vshll_n_u8(*(uint8x8_t *)v41, 1u)), vshll_n_u8(v43, 1u)), 3u).n64_u64[0]; v145.val[0] = vrhadd_u8(*(uint8x8_t *)v36, v52); v121 = vrhadd_u8(v42, v52).n64_u64[0]; v53 = vrhadd_u8(v43, v49).n64_u64[0]; v46.val[0] = vrhadd_u8(*(uint8x8_t *)v41, v49); v46.val[1].n64_u64[0] = v121; v54.n64_u64[0] = vshrn_n_s16( vaddq_s16(vaddq_s16(v51, vshll_n_u8(v45, 1u)), vshll_n_u8(*(uint8x8_t *)v38, 1u)), 3u).n64_u64[0]; v145.val[1].n64_u64[0] = v53; v146.val[1] = vrhadd_u8(v48, v54); v55.n64_u64[0] = *v118; v56.n64_u64[0] = vshrn_n_s16( vaddq_s16(vaddq_s16(v51, vshll_n_u8(*(uint8x8_t *)v40, 1u)), vshll_n_u8(v48, 1u)), 3u).n64_u64[0]; v146.val[0] = vrhadd_u8(*(uint8x8_t *)v38, v56); vst2_s8((char *)&v138, v46); vst2_s8((char *)&v142, v145); v57 = vqdmulhq_lane_s16(vshll_n_u8(v55, 7u), (int16x4_t)0x3408191366254A85LL, 0); v147.val[0] = vrhadd_u8(v47, v54); v147.val[1] = vrhadd_u8(v45, v56); vst2_s8((char *)&v140, v147); vst2_s8((char *)v144, v146); v58 = vshll_n_u8(v138, 7u); v59 = vshll_n_u8(v140, 7u); v151.val[0] = vqshrun_n_s16( vqaddq_s16(vqaddq_s16(vqdmulhq_lane_s16(v58, v120, 0), vqaddq_s16(v57, v13)), v58), 6u); v151.val[2] = vqshrun_n_s16( vqaddq_s16( vqdmulhq_lane_s16(v59, (int16x4_t)0x3408191366254A85LL, 1), vqaddq_s16(v57, vdupq_n_s16(0xC866u))), 6u); v151.val[1] = vqshrun_n_s16( vqsubq_s16( vqaddq_s16(v57, v10), vqaddq_s16( vqdmulhq_lane_s16(v58, (int16x4_t)0x3408191366254A85LL, 2), vqdmulhq_lane_s16(v59, (int16x4_t)0x3408191366254A85LL, 3))), 6u); vst4_s8(v39 + 4, v151); v60 = vshll_n_u8(v139, 7u); v61 = vqdmulhq_lane_s16(vshll_n_u8((uint8x8_t)v37->n64_u64[0], 7u), (int16x4_t)0x3408191366254A85LL, 0); v62 = vshll_n_u8(v141, 7u); v151.val[0] = vqshrun_n_s16(vqaddq_s16(vqaddq_s16(vqdmulhq_lane_s16(v60, v50, 0), vqaddq_s16(v61, v13)), v60), 6u); v151.val[1] = vqshrun_n_s16( vqsubq_s16( vqaddq_s16(v61, v10), vqaddq_s16( vqdmulhq_lane_s16(v60, (int16x4_t)0x3408191366254A85LL, 2), vqdmulhq_lane_s16(v62, (int16x4_t)0x3408191366254A85LL, 3))), 6u); v151.val[2] = vqshrun_n_s16( vqaddq_s16( vqdmulhq_lane_s16(v62, (int16x4_t)0x3408191366254A85LL, 1), vqaddq_s16(v61, vdupq_n_s16(0xC866u))), 6u); vst4_s8(v39 + 36, v151); if ( a2 ) { v150.val[3].n64_u64[0] = -1; v63.n64_u64[0] = v126; v64 = vqdmulhq_lane_s16(vshll_n_u8((uint8x8_t)v122->n64_u64[0], 7u), (int16x4_t)0x3408191366254A85LL, 0); v63.n64_u16[0] = 282; v65 = vshll_n_u8(v142, 7u); v66 = vqdmulhq_lane_s16(v65, v63, 0); v126 = v63.n64_u64[0]; v67.n64_u64[0] = v127; v68 = vshll_n_u8(*(uint8x8_t *)v144, 7u); v67.n64_u16[0] = 282; v127 = v67.n64_u64[0]; v150.val[0] = vqshrun_n_s16(vqaddq_s16(vqaddq_s16(v66, vqaddq_s16(v64, v13)), v65), 6u); v150.val[2] = vqshrun_n_s16( vqaddq_s16( vqdmulhq_lane_s16(v68, (int16x4_t)0x3408191366254A85LL, 1), vqaddq_s16(v64, vdupq_n_s16(0xC866u))), 6u); v150.val[1] = vqshrun_n_s16( vqsubq_s16( vqaddq_s16(v64, v10), vqaddq_s16( vqdmulhq_lane_s16(v65, (int16x4_t)0x3408191366254A85LL, 2), vqdmulhq_lane_s16(v68, (int16x4_t)0x3408191366254A85LL, 3))), 6u); vst4_s8(v116 + 4, v150); v69 = vshll_n_u8(v143, 7u); v70 = vqdmulhq_lane_s16(vshll_n_u8((uint8x8_t)v123->n64_u64[0], 7u), (int16x4_t)0x3408191366254A85LL, 0); v71 = vshll_n_u8(*(uint8x8_t *)&v144[2], 7u); v150.val[0] = vqshrun_n_s16( vqaddq_s16(vqaddq_s16(vqdmulhq_lane_s16(v69, v67, 0), vqaddq_s16(v70, v13)), v69), 6u); v150.val[1] = vqshrun_n_s16( vqsubq_s16( vqaddq_s16(v70, v10), vqaddq_s16( vqdmulhq_lane_s16(v69, (int16x4_t)0x3408191366254A85LL, 2), vqdmulhq_lane_s16(v71, (int16x4_t)0x3408191366254A85LL, 3))), 6u); v150.val[2] = vqshrun_n_s16( vqaddq_s16( vqdmulhq_lane_s16(v71, (int16x4_t)0x3408191366254A85LL, 1), vqaddq_s16(v70, vdupq_n_s16(0xC866u))), 6u); vst4_s8(v116 + 36, v150); } v41 += 8; v36 += 8; v118 += 2; v40 += 8; ++v124; v122 += 2; v38 += 8; v39 += 64; v37 += 2; v116 += 64; v123 += 2; } while ( v124 != v129 ); v131 += 8 * v124; a5 += 8 * v124; v132 += 8 * v124; a6 += 8 * v124; } memcpy(v136, v131, v130); memcpy(v137, a5, v130); v72 = (char *)&v144[7] + v130 + 3; memset(&v136[v130], (unsigned __int8)*(v72 - 104), 9 - v130); memset(&v137[v130], (unsigned __int8)*(v72 - 92), 9 - v130); v73 = vaddw_u8( vaddw_u8(vaddl_u8(*(uint8x8_t *)v136, *(uint8x8_t *)&v136[1]), *(uint8x8_t *)v137), *(uint8x8_t *)&v137[1]); v74.n64_u64[0] = vshrn_n_s16( vaddq_s16( vaddq_s16(v73, vshll_n_u8(*(uint8x8_t *)&v136[1], 1u)), vshll_n_u8(*(uint8x8_t *)v137, 1u)), 3u).n64_u64[0]; v73.n128_u64[0] = vshrn_n_s16( vaddq_s16( vaddq_s16(v73, vshll_n_u8(*(uint8x8_t *)v136, 1u)), vshll_n_u8(*(uint8x8_t *)&v137[1], 1u)), 3u).n64_u64[0]; v149.val[0] = vrhadd_u8(*(uint8x8_t *)v136, v74); v148.val[0] = vrhadd_u8(*(uint8x8_t *)v137, (uint8x8_t)v73.n128_u64[0]); v149.val[1] = vrhadd_u8(*(uint8x8_t *)&v136[1], (uint8x8_t)v73.n128_u64[0]); v148.val[1] = vrhadd_u8(*(uint8x8_t *)&v137[1], v74); vst2_s8((char *)&v138, v149); vst2_s8((char *)&v142, v148); memcpy(v136, v132, v130); memcpy(v137, a6, v130); memset(&v136[v130], (unsigned __int8)*(v72 - 104), 9 - v130); result = (int)memset(&v137[v130], (unsigned __int8)*(v72 - 92), 9 - v130); v76 = a9 - v135; v77 = a9 - v135 <= 0; v117 = a9 - v135; v78 = vaddw_u8( vaddw_u8(vaddl_u8(*(uint8x8_t *)v136, *(uint8x8_t *)&v136[1]), *(uint8x8_t *)v137), *(uint8x8_t *)&v137[1]); v79.n64_u64[0] = vshrn_n_s16( vaddq_s16( vaddq_s16(v78, vshll_n_u8(*(uint8x8_t *)&v136[1], 1u)), vshll_n_u8(*(uint8x8_t *)v137, 1u)), 3u).n64_u64[0]; v78.n128_u64[0] = vshrn_n_s16( vaddq_s16( vaddq_s16(v78, vshll_n_u8(*(uint8x8_t *)v136, 1u)), vshll_n_u8(*(uint8x8_t *)&v137[1], 1u)), 3u).n64_u64[0]; v149.val[0] = vrhadd_u8(*(uint8x8_t *)v136, v79); v149.val[1] = vrhadd_u8(*(uint8x8_t *)&v136[1], (uint8x8_t)v78.n128_u64[0]); v148.val[0] = vrhadd_u8(*(uint8x8_t *)v137, (uint8x8_t)v78.n128_u64[0]); v148.val[1] = vrhadd_u8(*(uint8x8_t *)&v137[1], v79); vst2_s8((char *)&v140, v149); vst2_s8((char *)v144, v148); if ( !v77 ) { v80 = &v139.n64_i8[7]; v81 = (uint8x8_t *)((char *)&v138 + v76); v82 = &v138; v83 = &a1[v133]; v119 = v129 << 6; v84 = &a7[64 * v129]; do { v86 = *++v83; v85 = v86; v88 = v82->n64_u8[0]; v82 = (uint8x8_t *)((char *)v82 + 1); v87 = v88; v90 = (unsigned __int8)*++v80; v89 = v90; v91 = (19077 * v85) >> 8; v92 = v91 + ((33050 * v87) >> 8) - 17685; if ( v92 < 0 ) v93 = 0; else v93 = -1; if ( (v92 & 0xFFFFC000) == 0 ) v93 = (unsigned int)v92 >> 6; v84[4] = v93; v94 = v91 - ((6419 * v87) >> 8) - ((13320 * v89) >> 8) + 8708; if ( v94 < 0 ) v95 = 0; else v95 = -1; if ( (v94 & 0xFFFFC000) == 0 ) v95 = (unsigned int)v94 >> 6; v84[5] = v95; result = 26149 * v89; v96 = v91 + (result >> 8) - 14234; if ( v96 < 0 ) v97 = 0; else v97 = -1; if ( (v96 & 0xFFFFC000) == 0 ) v97 = (unsigned int)v96 >> 6; v84[6] = v97; v84[7] = -1; v84 += 4; } while ( v82 != v81 ); if ( a2 ) { v98 = &v141.n64_i8[7]; v99 = &v143.n64_i8[7]; v100 = 0; v101 = &a8[v119]; v102 = &a2[v133]; do { v104 = *++v102; v103 = v104; ++v100; v106 = (unsigned __int8)*++v98; v105 = v106; v108 = (unsigned __int8)*++v99; v107 = v108; v109 = (19077 * v103) >> 8; v110 = v109 + ((33050 * v105) >> 8) - 17685; if ( v110 < 0 ) v111 = 0; else v111 = -1; if ( (v110 & 0xFFFFC000) == 0 ) v111 = (unsigned int)v110 >> 6; a8[4 * v100 + v119] = v111; v112 = v109 - ((6419 * v105) >> 8) - ((13320 * v107) >> 8) + 8708; if ( v112 < 0 ) v113 = 0; else v113 = -1; if ( (v112 & 0xFFFFC000) == 0 ) v113 = (unsigned int)v112 >> 6; v101[5] = v113; result = 26149 * v107; v114 = v109 + (result >> 8) - 14234; if ( v114 < 0 ) v115 = 0; else v115 = -1; if ( (v114 & 0xFFFFC000) == 0 ) v115 = (unsigned int)v114 >> 6; v101[7] = -1; v101 += 4; v101[2] = v115; } while ( v117 > v100 ); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source