benilla-re systems structs docs

DownloadFileFeed

function · net · primitive

Address
0x5b0bc0 · 288 bytes, up to 0x5b0cdf
Signature
uint32_t __thiscall (void *this, const void *data, uint32_t size)
Meaning
Writes data at the received offset, advances it, writes the trailer per MiB and checks the MD5 at the end
Confidence
verified, proof one
Finding
net/download#feeding-a-download
Test
net::download_feed

Finding: Feeding a download in net: download

0x5b0bc0(data, size) writes the data at the received count's low dword, then adds the size to the count and to +0x144. Past the total it sets state 3, error 1; otherwise, at the total or once +0x144 reaches 1 MiB, it rewrites the trailer. Nothing but 0x5b03f0 resets +0x144, so after the first MiB every feed rewrites it. At the total the MD5 sets state 2 or 3. Without a file, or when the write fails, it returns 0 and sets state 3; else 1. 0x5b0ce0 returns the count over the total as a float, both read as unsigned 64-bit at the x87's 53-bit precision, or 0 for a total of 0.

The derivation is in the doc.

Callers 2

Callees 4

Calls and jumps by a bare address, from tables/calls.tsv.