// // sub_B7C8E0 from 0xb7c8e0 to 0xb7caa0 (448 bytes) // // 3 xrefs: // > sub_B7E560 @ 0xb7e704 // > sub_B7F490 @ 0xb80504 // > sub_B80C64 @ 0xb812f0 // // 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_B7C8E0(__int64 a1, __int64 a2, __int64 a3) { __int64 v3; // x19 __int64 v5; // x0 __int64 v6; // x21 __int64 result; // x0 __int64 v8; // x2 __int64 v9; // x23 __int64 v10; // x20 const char *v11; // x2 __int64 v12; // x20 v3 = *(_QWORD *)a1; v5 = *(_QWORD *)(*(_QWORD *)a1 + 1520LL); v6 = *(_QWORD *)(v3 + 536); if ( v5 < a2 && v5 ) { sub_B7B690(v3, "Maximum file size exceeded", a3, a2); return 63; } *(_QWORD *)(v6 + 32) = a2; v8 = *(_QWORD *)(v3 + 36056); if ( v8 ) { if ( a2 == -1 ) { sub_B7B528(v3, "ftp server doesn't support SIZE\n"); v9 = *(_QWORD *)(v6 + 32); if ( v9 ) { LABEL_11: v10 = a1 + 1560; sub_B7B528(v3, "Instructs server to resume from offset %ld\n", *(_QWORD *)(v3 + 36056)); result = sub_BAA4B0(v10, "REST %ld", *(_QWORD *)(v3 + 36056)); if ( !(_DWORD)result ) *(_DWORD *)(v10 + 176) = 27; return result; } LABEL_17: sub_B94394(a1, 0xFFFFFFFFLL, -1, (unsigned int)v9, v9, 0xFFFFFFFFLL, v9); sub_B7B528(v3, "File already completely downloaded\n"); *(_DWORD *)(v6 + 24) = 2; *(_DWORD *)(a1 + 1736) = v9; return (unsigned int)v9; } if ( v8 < 0 ) { v9 = -v8; if ( a2 >= -v8 ) { *(_QWORD *)(v6 + 32) = v9; *(_QWORD *)(v3 + 36056) = a2 + v8; LABEL_10: if ( v9 ) goto LABEL_11; goto LABEL_17; } } else if ( a2 >= v8 ) { v9 = a2 - v8; *(_QWORD *)(v6 + 32) = a2 - v8; goto LABEL_10; } sub_B7B690(v3, "Offset (%ld) was beyond file size (%ld)", v8, a2); return 36; } v11 = *(const char **)(a1 + 1696); v12 = a1 + 1560; result = sub_BAA4B0(v12, "RETR %s", v11); if ( !(_DWORD)result ) *(_DWORD *)(v12 + 176) = 32; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source