function decodeAmf0Cmd(dbuf) {
  let buffer = dbuf;
  let resp = {};

  let cmd = amf0DecodeOne(buffer);
  if (!cmd) {
    logger.error("Failed to decode AMF0 command");
    return resp;
  }
  
  resp.cmd = cmd.value;
  buffer = buffer.slice(cmd.len);

  if (rtmpCmdCode[cmd.value]) {
    rtmpCmdCode[cmd.value].forEach(function (n) {
      if (buffer.length > 0) {
        let r = amf0DecodeOne(buffer);
        buffer = buffer.slice(r.len);
        resp[n] = r.value;
      }
    });
  } else {
    logger.error("Unknown command", resp);
  }
  return resp;
}
Decode a command!
@param {Buffer} dbuf
@returns {{cmd: (* | string | string | *), value: *}}