async function decodeMessage(buffer: Buffer): Promise<any> {
    /*
    const offset = 16 * 3 + 6;
    buffer = buffer.slice(offset);
    */
    const messageBuilder = new MessageBuilder({});
    messageBuilder.setSecurity(MessageSecurityMode.None, SecurityPolicy.None);
    let objMessage: any = null;
    messageBuilder.once("full_message_body", (fullMessageBody: Buffer) => {
        const stream = new BinaryStream(fullMessageBody);
        const id = decodeExpandedNodeId(stream);
        objMessage = constructObject(id);
        objMessage.decode(stream);
    });
    messageBuilder.feed(buffer);

    return objMessage;
}
The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.