// // sub_652D0 from 0x652d0 to 0x65446 (374 bytes) // // 2 xrefs: // > sub_53944 @ 0x5395e // > sub_6505C @ 0x650d6 // // 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 // int __fastcall sub_652D0(int a1) { float v2; // s16 float *v3; // r5 _DWORD *v4; // r11 _DWORD *v5; // r10 _DWORD *v6; // r9 int v7; // r0 int v8; // r1 float v9; // s0 bool v10; // zf unsigned int *v11; // r6 _DWORD *v12; // r5 int v14; // [sp+Ch] [bp-ACh] float v15[12]; // [sp+10h] [bp-A8h] BYREF float v16; // [sp+40h] [bp-78h] BYREF char v17; // [sp+47h] [bp-71h] BYREF float v18; // [sp+48h] [bp-70h] BYREF float v19; // [sp+4Ch] [bp-6Ch] BYREF float v20[12]; // [sp+50h] [bp-68h] BYREF memset(v20, 0, sizeof(v20)); v2 = 0.0; v3 = (float *)(a1 + 67356); v4 = (_DWORD *)(a1 + 71928); v5 = (_DWORD *)(a1 + 71928); while ( 1 ) { v5 = (_DWORD *)*v5; if ( v5 == v4 ) break; v6 = (_DWORD *)v5[2]; sub_53C3A((int)v6, &v17); if ( !v17 ) goto LABEL_11; sub_53C60(*(float *)&v6, v3, &v19, &v18); if ( v19 <= 0.0 ) { v9 = v18; goto LABEL_9; } sub_53BEC(v6, v15, nullptr, nullptr); v7 = sub_4CE80(a1 + 71272, v3, v15, nullptr, &v16); if ( !v7 ) { v19 = v19 * (float)(1.0 - v16); v9 = v18 * (float)(1.0 - v16); v18 = v9; LABEL_9: if ( v9 >= 0.001 ) { memset(v15, 0, sizeof(v15)); sub_53C16((int)v6, v15); sub_53D1C(v20, v15, v18); v2 = v18 + v2; } LABEL_11: v8 = 1; goto LABEL_12; } v8 = 0; v14 = v7; LABEL_12: if ( !v8 ) return v14; } v10 = *v4 == (_DWORD)v4; if ( (_DWORD *)*v4 == v4 ) v10 = *(_DWORD *)(a1 + 71932) == a1 + 71928; if ( !v10 ) { if ( v2 >= 1.0 ) { v11 = (unsigned int *)(a1 + 68736); v12 = (_DWORD *)a1; } else { memset(v15, 0, sizeof(v15)); v11 = (unsigned int *)(a1 + 68736); v12 = (_DWORD *)a1; sub_5ADC8(a1, *(_DWORD *)(a1 + 68736), (int *)v15); sub_53D1C(v20, v15, 1.0 - v2); v2 = 1.0; } sub_53E90(v15, v20, 1.0 / v2); sub_62010(v12, *v11, v15, 1); } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source