// // sub_B7CAA0 from 0xb7caa0 to 0xb7cca8 (520 bytes) // // 2 xrefs: // > sub_B7E560 @ 0xb7e6d4 // > sub_B7F490 @ 0xb7f6bc // // 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 // __int64 __fastcall sub_B7CAA0(__int64 a1, unsigned __int8 a2) { int v3; // w0 __int64 v4; // x21 __int64 v5; // x20 __int64 v6; // x24 __int64 v7; // x1 __int64 (__fastcall *v8)(_QWORD); // x3 int v9; // w0 __int64 result; // x0 __int64 v11; // x19 __int64 v12; // x0 __int64 v13; // x1 __int64 v14; // x1 __int64 v15; // x22 unsigned __int64 v16; // x0 unsigned __int64 v17; // x23 const char *v18; // x2 __int64 v19; // x19 v3 = a2; v4 = *(_QWORD *)a1; v5 = *(_QWORD *)a1 + 0x8000LL; v6 = *(_QWORD *)(*(_QWORD *)a1 + 536LL); v7 = *(_QWORD *)(*(_QWORD *)a1 + 36056LL); if ( !v7 ) goto LABEL_10; if ( v3 ) { if ( v7 <= 0 ) goto LABEL_10; } else if ( v7 < 0 ) { v18 = *(const char **)(a1 + 1696); v19 = a1 + 1560; result = sub_BAA4B0(v19, "SIZE %s", v18); if ( !(_DWORD)result ) *(_DWORD *)(v19 + 176) = 25; return result; } v8 = *(__int64 (__fastcall **)(_QWORD))(a1 + 1184); *(_BYTE *)(v4 + 1556) = 1; if ( !v8 ) { v12 = *(_QWORD *)(v5 + 3320); if ( v12 <= 0 ) { v11 = a1 + 1560; result = sub_BAA4B0(v11, "APPE %s", *(_QWORD *)(v11 + 136)); LABEL_12: if ( !(_DWORD)result ) *(_DWORD *)(v11 + 176) = 33; return result; } goto LABEL_17; } v9 = v8(*(_QWORD *)(a1 + 1192)); if ( !v9 ) { LABEL_15: v12 = *(_QWORD *)(v5 + 3320); if ( v12 > 0 ) { v7 = *(_QWORD *)(v5 + 3288); LABEL_17: v13 = v12 - v7; *(_QWORD *)(v5 + 3320) = v13; if ( v13 <= 0 ) { sub_B7B528(v4, "File already completely uploaded\n"); sub_B94394(a1, 0xFFFFFFFFLL, -1, 0, 0, 0xFFFFFFFFLL, 0); *(_DWORD *)(v6 + 24) = 2; *(_DWORD *)(a1 + 1736) = 0; return 0; } } LABEL_10: v11 = a1 + 1560; if ( *(_BYTE *)(v4 + 1556) ) result = sub_BAA4B0(v11, "APPE %s", *(_QWORD *)(v11 + 136)); else result = sub_BAA4B0(v11, "STOR %s", *(_QWORD *)(v11 + 136)); goto LABEL_12; } if ( v9 == 2 ) { v14 = *(_QWORD *)(v5 + 3288); v15 = 0; while ( 1 ) { v17 = 0x4000; if ( v14 - v15 <= 0x4000 ) v17 = nullsub_13(v14 - v15); v16 = (*(__int64 (__fastcall **)(__int64, __int64, unsigned __int64, _QWORD))(v5 + 3344))( v4 + 2824, 1, v17, *(_QWORD *)(v5 + 3352)); v15 += v16; if ( v17 < v16 || !v16 ) break; v14 = *(_QWORD *)(v5 + 3288); if ( v15 >= v14 ) goto LABEL_15; } sub_B7B690(v4, "Failed to read data"); return 31; } else { sub_B7B690(v4, "Could not seek stream"); return 31; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source