ParseSwitchNumber
function · storm · boundary
- Address
0x64f940· 132 bytes, up to0x64f9c3- Signature
void __fastcall (void *node, const char *text, uint32_t *length)- Meaning
- Converts a text to a switch's number with strtol or strtoul and copies it to the switch's output
- Confidence
- verified, proof one
- Finding
- storm/scmd#switch-name-and-number-parsing
Finding: Switch name and number parsing in storm: command-line switches
0x64fac0(text, node, minimum) walks a switch list from node and returns the node whose name is
the longest prefix of text, of at least minimum and at most strlen(text) characters, or 0.
A node with flag bit 0x100 compares case-sensitively (strncmp), any other ignoring case
(_strnicmp); of two names of equal length the first in the list wins. 0x64f940(node, text, &length) converts text to the node's value +0x3c with strtol when the node's flag bit 0 is
set and strtoul otherwise, both in base 0, stores the number of characters the conversion used in
length, and copies the low min(size, 4) bytes of the value to the node's output +0x2c when it
has one, size being +0x30.
The derivation is in the doc.
Callers 1
- 0x64f740 storm
Callees 3
Calls and jumps by a bare address, from tables/calls.tsv.