// // sub_1800BCE10 from 0x1800bce10 to 0x1800bd1d4 (964 bytes) // // 4 xrefs: // > sub_1800BDAA0 @ 0x1800bdb38 // > @ 0x180189e10 // > @ 0x180189e50 // > @ 0x1801fd710 // // 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 10:54:01 +0000 // __int64 __fastcall sub_1800BCE10(__int64 a1, __int64 a2, int a3) { __int64 v6; // rcx __int64 result; // rax int v8; // r15d __int64 v9; // rdx int v10; // r8d unsigned int v11; // r15d unsigned int v12; // r12d unsigned __int64 v13; // rsi unsigned int v14; // r14d __int64 v15; // rax unsigned int v16; // esi int v17; // edx int v18; // edx int v19; // edx unsigned __int64 v20; // rdi __int64 v21; // rax unsigned int v22; // edi float *v23; // r11 float *v24; // rdi __int64 v25; // r9 float *v26; // r10 unsigned int v27; // r8d int v28; // ecx __int64 v29; // rcx unsigned int v30; // [rsp+50h] [rbp-9h] BYREF unsigned int v31; // [rsp+54h] [rbp-5h] BYREF int v32; // [rsp+58h] [rbp-1h] BYREF float *v33; // [rsp+60h] [rbp+7h] BYREF float *v34; // [rsp+68h] [rbp+Fh] BYREF int v35; // [rsp+C8h] [rbp+6Fh] BYREF unsigned int v36; // [rsp+D8h] [rbp+7Fh] BYREF v33 = nullptr; v34 = nullptr; v6 = *(_QWORD *)(a2 + 64); v36 = 0; v30 = 0; result = (*(__int64 (__fastcall **)(__int64, _QWORD, unsigned int *, int *, _QWORD))(*(_QWORD *)v6 + 160LL))( v6, 0, &v31, &v35, 0); if ( (_DWORD)result ) return result; v8 = 2; result = (*(__int64 (__fastcall **)(_QWORD, int *, __int64))(**(_QWORD **)(a2 + 64) + 152LL))( *(_QWORD *)(a2 + 64), &v32, 2); if ( (_DWORD)result ) return result; v9 = v31; if ( v31 != 1 ) { if ( v31 == 2 ) goto LABEL_10; if ( v31 == 3 ) { v8 = 3; goto LABEL_10; } if ( v31 - 4 <= 1 ) { v8 = 4; goto LABEL_10; } } v8 = 1; LABEL_10: v10 = v35; v11 = v35 * v8; v12 = (int)(float)((float)((float)a3 * *(float *)(*(_QWORD *)(a2 + 64) + 108LL)) / (float)*(int *)(a2 + 28)); if ( !v12 ) goto LABEL_52; while ( 1 ) { v13 = *(unsigned int *)(a2 + 52); v14 = v12; if ( v12 > 0x800 ) v14 = 2048; switch ( (_DWORD)v9 ) { case 1: v15 = 8; break; case 2: v15 = 16; break; case 3: v15 = 24; break; default: if ( (unsigned int)(v9 - 4) > 1 ) goto LABEL_22; v15 = 32; break; } v13 = (v15 * v13) >> 3; LABEL_22: v16 = v10 * v13; v17 = v9 - 1; if ( !v17 ) { v21 = 8; goto LABEL_31; } v18 = v17 - 1; if ( !v18 ) { v21 = 16; goto LABEL_31; } v19 = v18 - 1; if ( !v19 ) { v21 = 24; goto LABEL_31; } if ( (unsigned int)(v19 - 1) < 2 ) { v21 = 32; LABEL_31: v20 = (v21 * (unsigned __int64)v14) >> 3; goto LABEL_32; } LODWORD(v20) = v14; LABEL_32: v22 = v10 * v20; if ( *(_QWORD *)(a2 + 72) ) { *(_QWORD *)(a1 + 792) = a2; result = (*(__int64 (__fastcall **)(_QWORD, _QWORD, int *, _QWORD))(**(_QWORD **)(a2 + 72) + 72LL))( *(_QWORD *)(a2 + 72), *(_QWORD *)(a2 + 56), &v35, v14); } else { result = sub_1800BD1E0(a1, a2, *(_QWORD *)(a2 + 56), v14); } if ( (_DWORD)result ) return result; result = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD, float **, float **, unsigned int *, unsigned int *))(**(_QWORD **)(a2 + 64) + 40LL))( *(_QWORD *)(a2 + 64), v16, v22, &v33, &v34, &v36, &v30); if ( (_DWORD)result ) return result; v23 = v33; v24 = *(float **)(a2 + 56); v25 = v36; if ( v33 && v36 ) { sub_180062BA0(v33, v24, v31, 5, v35 * (v36 / v11), 1u, 1, 1.0, 1); v25 = v36; v23 = v33; v24 += v35 * (v36 / v11); } v26 = v34; v27 = v30; if ( v34 && v30 ) { sub_180062BA0(v34, v24, v31, 5, v35 * (v30 / v11), 1u, 1, 1.0, 1); v23 = v33; v26 = v34; v25 = v36; v27 = v30; } result = (*(__int64 (__fastcall **)(_QWORD, float *, float *, __int64, unsigned int))(**(_QWORD **)(a2 + 64) + 48LL))( *(_QWORD *)(a2 + 64), v23, v26, v25, v27); if ( (_DWORD)result ) return result; v28 = v14 + *(_DWORD *)(a2 + 52); if ( v30 || v28 >= v32 ) break; LABEL_49: *(_DWORD *)(a2 + 52) = v28; v12 -= v14; if ( !v12 ) goto LABEL_52; v10 = v35; LODWORD(v9) = v31; } if ( *(_BYTE *)(a2 + 48) ) { v28 -= v32; if ( v28 < 0 ) v28 = 0; goto LABEL_49; } *(_BYTE *)(a2 + 49) = 1; LABEL_52: v29 = *(_QWORD *)(a1 + 72); if ( !*(_QWORD *)(v29 + 70192) ) return 0; if ( (*(_DWORD *)(v29 + 70200) & 0x10000) == 0 ) return 0; LOBYTE(v9) = 1; result = sub_180102260(v29, v9); if ( !(_DWORD)result ) { (*(void (__fastcall **)(_QWORD, __int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 72) + 70192LL))( *(_QWORD *)(a1 + 72), 0x10000, *(_QWORD *)(a2 + 64), *(int *)(a2 + 52), *(_QWORD *)(*(_QWORD *)(a1 + 72) + 69736LL)); result = sub_180102340(*(_QWORD *)(a1 + 72)); if ( !(_DWORD)result ) return 0; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source