+ for (i = 0; i < (len-100 /* XXX */); i++) {
+ if (FINDSTR(fw+i, "/default/fw_prop/") ||
+ FINDSTR(fw+i, "/default/fw_setup/") ||
+ FINDSTR(fw+i, "/default/oem_prop/")) {
+ unsigned char *pos = fw + i;
+ unsigned char type1, type2;
+ unsigned char right_rw, rw_mask;
+ unsigned char *val;
+
+ printf("0x%08x: found setting: %s: ", i, pos);
+
+ pos += strlen((char*)pos) + 1;
+
+ if ((pos[0] != 0x11) ||
+ (pos[1] != 0x11) ||
+ (pos[2] != 0x01) ||
+ (pos[3] != 0x83)) {
+ printf("ignoring...\n");
+ continue;
+ }
+
+
+ pos += 4;
+
+ right_rw = pos[2];
+ rw_mask = pos[3];
+
+ type1 = pos[4];
+ type2 = pos[8];
+ val = pos + 9;
+
+ if (type1 == 0x00 && type2 == 0x04) {
+ printf("STRING: %s ", val);
+ } else if (type1 == 0x01 && type2 == 0x01) {
+ printf("BOOL: %s ",(*val ? "TRUE" : "FALSE"));
+ } else if (type1 == 0x04 && type2 == 0x02) {
+ printf("VAL: 0x%x ", *((unsigned int*)val));
+ } else {
+ printf("0x%02x 0x%2x...ignoring\n", type1, type2);
+ continue;
+ }
+
+ if (right_rw == 0x00 && rw_mask == 0x00) {
+ printf("(R-) ");
+ } else if (right_rw == 0x01) {
+ printf("(RW mask: 0x%02x) ", rw_mask);
+ } else {
+ printf("(UNK 0x%02x 0x%02x) ", right_rw, rw_mask);
+ }
+ printf("\n");
+ }
+ }
+}