// // sub_8100C from 0x8100c to 0x81310 (772 bytes) // // 1 xrefs: // > sub_82024 @ 0x82214 // // 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 // float __fastcall sub_8100C(int a1, int a2, float *a3, float a4, float a5) { float v6; // s0 float v9; // s0 float v10; // s11 float v11; // s12 float v12; // s1 float v13; // s2 float v14; // s3 float v15; // s6 float v16; // s0 float v17; // s4 float v18; // s5 float v19; // s2 float v20; // s3 float v21; // s0 float v22; // s6 float v23; // s4 float v24; // s7 float v25; // s16 float v26; // s2 float v27; // s0 float v28; // s1 float v29; // s5 float v30; // s7 float v31; // s16 float v32; // s0 float v33; // s4 float v34; // s6 float v35; // s3 float v36; // s0 float v37; // s4 float result; // s0 float cosx; // [xsp+8h] [xbp-48h] BYREF float sinx; // [xsp+Ch] [xbp-44h] BYREF v6 = a4 / (float)((float)a2 * 0.5); if ( v6 >= 0.001 ) v9 = fminf(v6, 0.95) * 3.1416; else v9 = 0.0031416; sincosf(v9, &sinx, &cosx); v10 = cosx; v11 = sinx; switch ( a1 ) { case 2: case 5: a5 = sqrtf(a5); break; case 3: case 6: a5 = sqrtf(sqrtf(a5)); break; default: break; } v12 = 0.0; switch ( a1 ) { case 1: case 2: case 3: v13 = 1.0; v12 = 1.0 - cosx; v14 = -2.0; v15 = sinx / (float)(a5 + a5); v16 = (float)(1.0 - cosx) * 0.5; goto LABEL_10; case 4: case 5: case 6: v13 = 1.0; v14 = -2.0; v15 = sinx / (float)(a5 + a5); v16 = (float)(cosx + 1.0) * 0.5; v12 = -(float)(cosx + 1.0); LABEL_10: v17 = v15 + v13; v18 = cosx * v14; v19 = v13 - v15; v20 = v16; break; case 7: v21 = sub_827F0(0.025, 0.0); v22 = v11 * sqrtf(v21 + v21); v23 = v10 * (float)(v21 + -1.0); v24 = v10 * (float)(v21 + 1.0); v25 = (float)(v21 + 1.0) - v23; v26 = v23 + (float)(v21 + 1.0); v12 = (float)((float)(v21 + -1.0) - v24) * (float)(v21 + v21); v17 = v26 + v22; v18 = (float)(v24 + (float)(v21 + -1.0)) * -2.0; v20 = (float)(v25 + v22) * v21; v16 = (float)(v25 - v22) * v21; goto LABEL_13; case 8: v27 = sub_827F0(0.025, 0.0); v22 = v11 * sqrtf(v27 + v27); v28 = v10 * (float)(v27 + -1.0); v29 = v10 * (float)(v27 + 1.0); v30 = v28 + (float)(v27 + 1.0); v26 = (float)(v27 + 1.0) - v28; v31 = -2.0 * (float)(v29 + (float)(v27 + -1.0)); v17 = v26 + v22; v18 = (float)((float)(v27 + -1.0) - v29) + (float)((float)(v27 + -1.0) - v29); v20 = (float)(v30 + v22) * v27; v12 = v27 * v31; v16 = (float)(v30 - v22) * v27; LABEL_13: v19 = v26 - v22; break; case 9: v32 = sub_827F0(0.025, 0.0); v33 = v11 / (float)(a5 + a5); v12 = v10 * -2.0; v34 = v33 / v32; v20 = (float)(v33 * v32) + 1.0; v16 = 1.0 - (float)(v33 * v32); v17 = v34 + 1.0; v19 = 1.0 - v34; goto LABEL_17; case 10: v20 = sinx / (float)(a5 + a5); v18 = cosx * -2.0; v16 = -v20; v17 = v20 + 1.0; v19 = 1.0 - v20; break; case 11: v16 = 1.0; v35 = sinx / (float)(a5 + a5); v12 = cosx * -2.0; v17 = v35 + 1.0; v19 = 1.0 - v35; v20 = 1.0; LABEL_17: v18 = v12; break; case 12: v36 = sinx / (float)(a5 + a5); v12 = cosx * -2.0; v20 = 1.0 - v36; v16 = v36 + 1.0; v19 = v20; v18 = cosx * -2.0; v17 = v16; break; default: v16 = 0.0; v20 = 1.0; v19 = 0.0; v18 = 0.0; v17 = 1.0; break; } v37 = 1.0 / v17; result = v37 * v16; *a3 = v37 * v20; a3[1] = v37 * v12; a3[2] = result; a3[3] = v37 * v18; a3[4] = v37 * v19; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source