DownloadFileOpen
function · net · primitive
- Address
0x5b05f0· 643 bytes, up to0x5b0872- Signature
bool __thiscall (void *this, const char *path, const uint8_t digest[16], uint64_t size, uint64_t *offset)- Meaning
- Resumes a valid .partial file or a complete final one, else creates a .partial sized for the data and trailer
- Confidence
- verified, proof one
- Finding
- net/download#opening-a-download
- Test
net::download_open
Finding: Opening a download in net: download
0x5b05f0(path, digest, total, &offset) releases the file it held, keeps the total and the MD5, copies the path, and sets the offset to 0. An existing .partial whose trailer reads resumes: the offset is the bytes received and it returns 1, or, when complete, sets state 2 and returns 0. Otherwise an existing final file that is complete sets state 2, gives the offset +0x20 already held, and returns 0. Otherwise it creates the .partial, sized to the total's low dword plus a trailer, and returns 1; a failed create or resize sets state 3 and returns 0.
The derivation is in the doc.
Callers 2
- BeginSurveyDownload glue
- BeginPatchDownload glue
Callees 8
- OsFileExists os
- ReleaseRefChain net
- DownloadFileCloseOrDelete net
- DownloadFileIsComplete net
- DownloadFileReadTrailer net
- SStrCopy storm
- SStrPrintf storm
- 0x662910 storm
Calls and jumps by a bare address, from tables/calls.tsv.