// // std::__ndk1::basic_filebuf>::sync from 0x80a4e0 to 0x80a624 (324 bytes) // // 1 xrefs: // > std::__ndk1::basic_filebuf>::~basic_filebuf @ 0x80a856 // // 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:01:29 +0000 // int __fastcall std::filebuf::sync(int a1) { int v2; // r3 int v3; // r7 const void *v4; // r0 int v5; // r6 int v6; // r8 int v7; // r1 int v8; // r6 int v9; // r0 int v10; // r2 int v11; // r1 int v12; // r1 int v13; // r2 int v15; // [sp+Ch] [bp-10h] BYREF int v16; // [sp+10h] [bp-Ch] v2 = *(_DWORD *)(a1 + 64); if ( v2 ) { if ( (*(_DWORD *)(a1 + 92) & 0x10) != 0 ) { if ( *(_DWORD *)(a1 + 24) == *(_DWORD *)(a1 + 20) || (*(int (__fastcall **)(int, int))(*(_DWORD *)a1 + 52))(a1, -1) != -1 ) { while ( 1 ) { v3 = (*(int (__fastcall **)(_DWORD, int, _DWORD, int, int *))(**(_DWORD **)(a1 + 68) + 20))( *(_DWORD *)(a1 + 68), a1 + 72, *(_DWORD *)(a1 + 32), *(_DWORD *)(a1 + 52) + *(_DWORD *)(a1 + 32), &v15); v4 = *(const void **)(a1 + 32); v5 = v15 - (_DWORD)v4; if ( fwrite(v4, 1u, v15 - (_DWORD)v4, *(FILE **)(a1 + 64)) != v5 ) break; if ( v3 != 1 ) { if ( v3 == 2 ) return -1; return -(fflush(*(FILE **)(a1 + 64)) != 0); } } } return -1; } v2 = *(_DWORD *)(a1 + 92) & 8; if ( v2 ) { v6 = *(unsigned __int8 *)(a1 + 98); v7 = *(_DWORD *)(a1 + 84); v15 = *(_DWORD *)(a1 + 80); v16 = v7; if ( v6 ) { v6 = 0; v8 = *(_DWORD *)(a1 + 16) - *(_DWORD *)(a1 + 12); } else { v9 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 68) + 24))(*(_DWORD *)(a1 + 68)); v10 = *(_DWORD *)(a1 + 16); v8 = *(_DWORD *)(a1 + 40) - *(_DWORD *)(a1 + 36); v11 = *(_DWORD *)(a1 + 12); if ( v9 <= 0 ) { if ( v11 != v10 ) { v6 = 1; v8 += *(_DWORD *)(a1 + 36) - *(_DWORD *)(a1 + 32) - (*(int (__fastcall **)(_DWORD, int *, _DWORD))(**(_DWORD **)(a1 + 68) + 32))( *(_DWORD *)(a1 + 68), &v15, *(_DWORD *)(a1 + 32)); } } else { v8 += (v10 - v11) * v9; } } v2 = fseeko(*(FILE **)(a1 + 64), -v8, 1); if ( v2 ) return -1; if ( v6 ) { v12 = v16; *(_DWORD *)(a1 + 72) = v15; *(_DWORD *)(a1 + 76) = v12; } v13 = *(_DWORD *)(a1 + 32); *(_DWORD *)(a1 + 40) = v13; *(_DWORD *)(a1 + 36) = v13; *(_DWORD *)(a1 + 8) = 0; *(_DWORD *)(a1 + 12) = 0; *(_DWORD *)(a1 + 16) = 0; *(_DWORD *)(a1 + 92) = 0; } } return v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source