r3 = r11 + 4;
r5 = *((unsigned int*)r3);
- printf(", length: %d\n", r5);
+ printf(", length: %d", r5);
if ((r7 = malloc(r5)) == NULL) {
perror("malloc");
for(i = 0; i < len - 4; i++) {
if (*((unsigned int*)(fw+i)) == LZ_MAGIC) {
j = fw + i - 1;
- if (*j != 0x00)
- continue;
printf("0x%02x: ", i);
j--;
while (j > fw) {
+ if (!strncmp("SP3", (char*)j, 3)) {
+ unsigned char fname[5];
+
+ bzero(fname, sizeof(fname));
+ memcpy(fname, j, 4);
+ printf("Firmware found: %s", fname);
+ extract_lz_file(fw + i, fname);
+ break;
+ }
if (*j == 0x00) {
- if ( *(j+1) != '/') {
+ if ((*(j+1) != '/')) {
printf("ignoring...\n");
break;
}