[*] Binary protection state of ntpq
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of ntpq
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2f678 */
| #include <stdint.h>
|
; (fcn) aav.0x0002f678 () | void aav_0x0002f678 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| FILE * stream;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_1h;
| int32_t var_22ch;
| r0 = arg1;
| r1 = arg2;
0x0002f678 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002f67c sub sp, sp, 0x22c |
0x0002f680 add r6, sp, 0x28 | r6 += var_28h;
0x0002f684 mov sb, r0 | sb = r0;
0x0002f688 mov sl, r1 | sl = r1;
0x0002f68c mov r8, r2 | r8 = r2;
0x0002f690 mov r1, 0x80 | r1 = 0x80;
0x0002f694 add r2, sp, 0x1c | r2 += var_1ch;
0x0002f698 mov r0, r6 | r0 = r6;
0x0002f69c mov fp, r3 |
0x0002f6a0 bl 0x2f884 | fcn_0002f884 (r0);
0x0002f6a4 subs r4, r0, 0 | r4 -= var_28h;
| if (r4 == var_28h) {
0x0002f6a8 ldrne r7, [pc, 0xfc] | r7 = *((pc + 0xfc));
| }
| if (r4 == var_28h) {
0x0002f6ac bne 0x2f6c4 |
0x0002f6b0 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0002f6b4 ldr r3, [pc, 0xf4] | r3 = *(0x2f7ac);
0x0002f6b8 cmp r2, 0 |
0x0002f6bc ldr r7, [pc, 0xe8] | r7 = *(0x2f7a8);
| if (r2 > 0) {
0x0002f6c0 movgt r7, r3 | r7 = r3;
| goto label_3;
| }
| }
| label_3:
0x0002f6c4 ldr r5, [pc, 0xe8] | r5 = "__back_trace";
0x0002f6c8 cmp r8, 3 |
0x0002f6cc ldr r3, [r5] | r3 = "__back_trace";
0x0002f6d0 ldr r0, [pc, 0xe0] |
0x0002f6d4 str r3, [sp, 0x14] | stream = r3;
| if (r8 > 3) {
0x0002f6d8 ldrls r3, [pc, 0xdc] | r3 = *((pc + 0xdc));
| }
0x0002f6dc mov r2, 0x65 | r2 = 0x65;
| if (r8 > 3) {
0x0002f6e0 ldrls r8, [r3, r8, lsl 2] | offset_0 = r8 << 2;
| r8 = *((r3 + offset_0));
| }
0x0002f6e4 mov r1, 1 | r1 = 1;
0x0002f6e8 ldr r3, [pc, 0xd0] | r3 = *(0x2f7bc);
0x0002f6ec ldr r0, [r0] | r0 = stderr;
| if (r8 <= 3) {
0x0002f6f0 movhi r8, 0 | r8 = 0;
| }
0x0002f6f4 bl 0x2fb58 | fcn_0002fb58 (r0, r1);
0x0002f6f8 str r7, [sp, 0xc] | var_ch = r7;
0x0002f6fc stm sp, {r8, fp} | *(sp) = r8;
| *((sp + 4)) = fp;
0x0002f700 ldr r1, [pc, 0xbc] | r1 = "failed";
0x0002f704 mov r3, sl | r3 = sl;
0x0002f708 mov r2, sb | r2 = sb;
0x0002f70c str r0, [sp, 8] | var_8h = r0;
0x0002f710 ldr r0, [sp, 0x14] | r0 = stream;
0x0002f714 bl 0x12910 | fprintf (r0, "failed", r2, r3)
0x0002f718 cmp r4, 0 |
| if (r4 == 0) {
0x0002f71c beq 0x2f79c | goto label_4;
| }
| label_0:
0x0002f720 ldr r0, [r5] | r0 = *(r5);
0x0002f724 bl 0x128a4 | fflush (r0);
0x0002f728 add sp, sp, 0x22c |
0x0002f72c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| do {
0x0002f730 add r2, sp, 0x24 | r2 += var_24h;
0x0002f734 add r1, sp, 0x20 | r1 += var_20h;
0x0002f738 ldr r0, [r6, r4, lsl 2] | offset_1 = r4 << 2;
| r0 = *((r6 + offset_1));
0x0002f73c str r7, [sp, 0x20] | var_20h = r7;
0x0002f740 bl 0x2f93c | r0 = fcn_0002f93c (r0, r1);
0x0002f744 cmp r0, 0 |
| if (r0 != 0) {
0x0002f748 bne 0x2f784 | goto label_5;
| }
0x0002f74c ldr r3, [sp, 0x24] | r3 = var_24h;
0x0002f750 mov r2, r4 | r2 = r4;
0x0002f754 str r3, [sp, 4] | var_4h = r3;
0x0002f758 ldr r3, [sp, 0x20] | r3 = var_20h;
0x0002f75c mov r1, sb | r1 = sb;
0x0002f760 str r3, [sp] | *(sp) = r3;
0x0002f764 ldr r0, [r5] | r0 = *(r5);
0x0002f768 ldr r3, [r6, r4, lsl 2] | offset_2 = r4 << 2;
| r3 = *((r6 + offset_2));
0x0002f76c bl 0x12910 | fprintf (r0, r1, r2, r3)
| label_1:
0x0002f770 add r4, r4, 1 | r4 += var_1h;
| label_2:
0x0002f774 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0002f778 cmp r3, r4 |
0x0002f77c bgt 0x2f730 |
| } while (r3 > r4);
0x0002f780 b 0x2f720 | goto label_0;
| label_5:
0x0002f784 ldr r3, [r6, r4, lsl 2] | offset_3 = r4 << 2;
| r3 = *((r6 + offset_3));
0x0002f788 mov r2, r4 | r2 = r4;
0x0002f78c mov r1, r8 | r1 = r8;
0x0002f790 ldr r0, [r5] | r0 = *(r5);
0x0002f794 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0002f798 b 0x2f770 | goto label_1;
| label_4:
0x0002f79c mov r7, r4 | r7 = r4;
0x0002f7a0 ldr r8, [pc, 0x20] | r8 = "%s:%d: %s(%s) %s%s\n";
0x0002f7a4 ldr sb, [pc, 0x20] | sb = "#%d %p in %s()+0x%lx\n";
0x0002f7a8 b 0x2f774 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x320c0 */
| #include <stdint.h>
|
; (fcn) aav.0x000320c0 () | void aav_0x000320c0 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000320c0 push {r4, r5, r6, lr} |
0x000320c4 ldr r4, [pc, 0x40] | r4 = *(0x32108);
0x000320c8 mov r5, r2 | r5 = r2;
0x000320cc mov r6, r3 | r6 = r3;
0x000320d0 mov r2, r0 | r2 = r0;
0x000320d4 mov r3, r1 | r3 = r1;
0x000320d8 ldr r0, [r4] | r0 = *(0x32108);
0x000320dc ldr r1, [pc, 0x2c] | r1 = stderr;
0x000320e0 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5, r6)
0x000320e4 mov r2, r6 | r2 = r6;
0x000320e8 mov r1, r5 | r1 = r5;
0x000320ec ldr r0, [r4] | r0 = *(0x32108);
0x000320f0 bl 0x124e4 | vfprintf (r0, r1, r2)
0x000320f4 ldr r1, [r4] | r1 = *(0x32108);
0x000320f8 mov r0, 0xa | r0 = 0xa;
0x000320fc bl 0x127fc | fputc (r0, r1);
0x00032100 ldr r0, [r4] | r0 = *(0x32108);
0x00032104 pop {r4, r5, r6, lr} |
0x00032108 b 0x128a4 | return void (*0x128a4)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x32114 */
| #include <stdint.h>
|
; (fcn) aav.0x00032114 () | void aav_0x00032114 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x00032114 push {r0, r1, r2, r4, r5, r6, r7, r8, sb, lr} |
0x00032118 ldr r4, [pc, 0x6c] | r4 = *(0x32188);
0x0003211c mov r8, r0 | r8 = r0;
0x00032120 ldr r0, [pc, 0x68] |
0x00032124 mov sb, r1 | sb = r1;
0x00032128 mov r5, r2 | r5 = r2;
0x0003212c mov r6, r3 | r6 = r3;
0x00032130 mov r2, 0x6e | r2 = 0x6e;
0x00032134 ldr r3, [pc, 0x58] | r3 = *(0x32190);
0x00032138 mov r1, 1 | r1 = 1;
0x0003213c ldr r0, [r0] | r0 = stderr;
0x00032140 ldr r7, [r4] | r7 = *(0x32188);
0x00032144 bl 0x2fb58 | fcn_0002fb58 (r0, r1);
0x00032148 mov r3, sb | r3 = sb;
0x0003214c mov r2, r8 | r2 = r8;
0x00032150 ldr r1, [pc, 0x40] | r1 = "fatal error";
0x00032154 str r0, [sp] | *(sp) = r0;
0x00032158 mov r0, r7 | r0 = r7;
0x0003215c bl 0x12910 | fprintf (r0, "fatal error", r2, r3)
0x00032160 mov r2, r6 | r2 = r6;
0x00032164 mov r1, r5 | r1 = r5;
0x00032168 ldr r0, [r4] | r0 = *(0x32188);
0x0003216c bl 0x124e4 | vfprintf (r0, r1, r2)
0x00032170 ldr r1, [r4] | r1 = *(0x32188);
0x00032174 mov r0, 0xa | r0 = 0xa;
0x00032178 bl 0x127fc | fputc (r0, r1);
0x0003217c ldr r0, [r4] | r0 = *(0x32188);
0x00032180 add sp, sp, 0xc |
0x00032184 pop {r4, r5, r6, r7, r8, sb, lr} |
0x00032188 b 0x128a4 | return void (*0x128a4)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x13108 */
| #include <stdint.h>
|
; (fcn) fcn.00013108 () | void fcn_00013108 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00013108 push {r4, r5, r6, r7, r8, lr} |
0x0001310c ldr r4, [pc, 0x50] |
0x00013110 mov r7, r1 | r7 = r1;
0x00013114 mov r6, r0 | r6 = r0;
0x00013118 bl 0x12430 | errno_location ();
0x0001311c ldr r3, [pc, 0x44] | r3 = stderr;
0x00013120 ldr r1, [pc, 0x44] | r1 = *(0x13168);
0x00013124 ldr r2, [r3] | r2 = stderr;
0x00013128 ldr r5, [r0] | r5 = *(r0);
0x0001312c ldr r0, [r4] | r0 = *(0x13160);
0x00013130 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5)
0x00013134 mov r2, r7 | r2 = r7;
0x00013138 mov r1, r6 | r1 = r6;
0x0001313c ldr r0, [r4] | r0 = *(0x13160);
0x00013140 bl 0x124e4 | vfprintf (r0, r1, r2)
0x00013144 mov r0, r5 | r0 = r5;
0x00013148 ldr r4, [r4] | r4 = *(0x13160);
0x0001314c bl 0x12a9c | strerror (r0);
0x00013150 ldr r1, [pc, 0x18] | r1 = *(0x1316c);
0x00013154 mov r2, r0 | r2 = r0;
0x00013158 mov r0, r4 | r0 = r4;
0x0001315c pop {r4, r5, r6, r7, r8, lr} |
0x00013160 b 0x12910 | return void (*0x12910)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1319c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0001319c () | void fcn_0001319c (int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| int32_t domain;
| char * src;
| int32_t var_eh;
| void * s;
| int32_t var_2ch;
| int32_t var_30h;
| int32_t var_30h_2;
| char * dest;
| void * s1;
| int32_t var_248h;
| r0 = arg1;
| r1 = arg2;
0x0001319c ldr r3, [pc, 0x2e0] | r3 = *(0x13480);
0x000131a0 push {r4, r5, r6, lr} |
0x000131a4 sub sp, sp, 0x248 |
0x000131a8 str r3, [sp, 4] | var_4h = r3;
0x000131ac ldrb r3, [r0] | r3 = *(r0);
0x000131b0 mov r4, r0 | r4 = r0;
0x000131b4 cmp r3, 0x5b |
0x000131b8 mov r6, r1 | r6 = r1;
| if (r3 != 0x5b) {
0x000131bc bne 0x13230 | goto label_1;
| }
0x000131c0 add r5, r0, 1 | r5 = r0 + 1;
0x000131c4 mov r1, 0x5d | r1 = 0x5d;
0x000131c8 mov r0, r5 | r0 = r5;
0x000131cc bl 0x12a78 | r0 = strchr (r0, r1);
0x000131d0 cmp r0, 0 |
| if (r0 != 0) {
0x000131d4 beq 0x131e8 |
0x000131d8 sub r4, r0, r4 | r4 = r0 - r4;
0x000131dc sub r4, r4, 1 | r4--;
0x000131e0 cmp r4, 0xff |
| if (r4 < 0xff) {
0x000131e4 bls 0x1320c | goto label_2;
| }
| }
0x000131e8 bl 0x12430 | errno_location ();
0x000131ec mov r3, 0x16 | r3 = 0x16;
0x000131f0 ldr r1, [pc, 0x290] | r1 = *(0x13484);
0x000131f4 str r3, [r0] | *(r0) = r3;
0x000131f8 ldr r0, [pc, 0x28c] | r0 = "bad_hostname_address";
0x000131fc bl 0x13174 | fcn_00013174 ();
| do {
0x00013200 mov r0, 0 | r0 = 0;
| label_0:
0x00013204 add sp, sp, 0x248 |
0x00013208 pop {r4, r5, r6, pc} |
| label_2:
0x0001320c mov r2, r4 | r2 = r4;
0x00013210 mov r1, r5 | r1 = r5;
0x00013214 add r0, sp, 0x148 | r0 += s1;
0x00013218 bl 0x124a8 | memcpy (r0, r1, r2);
0x0001321c add r3, sp, 0x248 | r3 += var_248h;
0x00013220 add r4, r3, r4 | r4 = r3 + r4;
0x00013224 mov r3, 0 | r3 = 0;
0x00013228 strb r3, [r4, -0x100] | s1 = r3;
0x0001322c add r4, sp, 0x148 | r4 += s1;
| label_1:
0x00013230 mov r2, 0x20 | r2 = 0x20;
0x00013234 mov r1, 0 | r1 = 0;
0x00013238 add r0, sp, 0x28 | r0 += s;
0x0001323c bl 0x128b0 | memset (r0, r1, r2);
0x00013240 mov r3, 4 | r3 = 4;
0x00013244 str r6, [sp, 0x2c] | var_2ch = r6;
0x00013248 mov r0, 2 | r0 = 2;
0x0001324c mov r1, 0x11 | r1 = 0x11;
0x00013250 str r3, [sp, 0x28] | s = r3;
0x00013254 add r6, sp, 0x248 | r6 += var_248h;
0x00013258 mov r3, 0 | r3 = 0;
0x0001325c strd r0, r1, [sp, 0x30] | __asm ("strd r0, r1, [var_30h]");
0x00013260 str r3, [r6, -0x240]! | *((r6 -= 0x240)) = r3;
0x00013264 add r2, sp, 0x28 | r2 += s;
0x00013268 mov r3, r6 | r3 = r6;
0x0001326c add r1, sp, 4 | r1 += var_4h;
0x00013270 mov r0, r4 | r0 = r4;
0x00013274 bl 0x12b08 | r0 = getaddrinfo ();
0x00013278 cmn r0, 2 |
0x0001327c cmnne r0, 5 | __asm ("cmnne r0, 5");
0x00013280 mov r5, r0 | r5 = r0;
| if (r0 == 2) {
0x00013284 bne 0x132a8 |
0x00013288 mov r3, 0x22 | r3 = 0x22;
0x0001328c str r3, [sp, 0x28] | s = r3;
0x00013290 add r2, sp, 0x28 | r2 += s;
0x00013294 mov r3, r6 | r3 = r6;
0x00013298 add r1, sp, 4 | r1 += var_4h;
0x0001329c mov r0, r4 | r0 = r4;
0x000132a0 bl 0x12b08 | r0 = getaddrinfo ();
0x000132a4 mov r5, r0 | r5 = r0;
| }
0x000132a8 cmn r5, 1 |
| if (r5 == 1) {
0x000132ac bne 0x132d4 |
0x000132b0 ldr r3, [sp, 0x28] | r3 = s;
0x000132b4 add r2, sp, 0x28 | r2 += s;
0x000132b8 bic r3, r3, 0x20 | r3 = BIT_MASK (r3, 0x20);
0x000132bc str r3, [sp, 0x28] | s = r3;
0x000132c0 add r1, sp, 4 | r1 += var_4h;
0x000132c4 mov r3, r6 | r3 = r6;
0x000132c8 mov r0, r4 | r0 = r4;
0x000132cc bl 0x12b08 | r0 = getaddrinfo ();
0x000132d0 mov r5, r0 | r5 = r0;
| }
0x000132d4 cmp r5, 0 |
| if (r5 == 0) {
0x000132d8 beq 0x13300 | goto label_3;
| }
0x000132dc ldr r3, [pc, 0x1ac] | r3 = "_s";
0x000132e0 mov r0, r5 | r0 = r5;
0x000132e4 ldr r4, [r3] | r4 = "_s";
0x000132e8 bl 0x12808 | gai_strerror ();
0x000132ec ldr r1, [pc, 0x1a0] | r1 = stderr;
0x000132f0 mov r2, r0 | r2 = r0;
0x000132f4 mov r0, r4 | r0 = r4;
0x000132f8 bl 0x12910 | fprintf (r0, r1, r2)
0x000132fc b 0x13200 |
| } while (1);
| label_3:
0x00013300 ldr r3, [sp, 8] | r3 = domain;
0x00013304 cmp r3, 0 |
| if (r3 == 0) {
0x00013308 bne 0x13320 |
0x0001330c ldr r3, [pc, 0x184] | r3 = "_s";
0x00013310 mov r2, 2 | r2 = 2;
0x00013314 ldr r1, [pc, 0x180] | r1 = "ai != ((void *)0)";
0x00013318 ldr r0, [pc, 0x180] | r0 = *(0x1349c);
0x0001331c bl 0x2f7d0 | fcn_0002f7d0 ();
| }
0x00013320 mov r2, 0x1c | r2 = 0x1c;
0x00013324 mov r1, r5 | r1 = r5;
0x00013328 add r0, sp, 0xc | r0 += src;
0x0001332c bl 0x128b0 | memset (r0, r1, r2);
0x00013330 ldr r4, [sp, 8] | r4 = domain;
0x00013334 add r0, sp, 0xc | r0 += src;
0x00013338 ldr r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x0001333c ldr r1, [r4, 0x14] | r1 = *((r4 + 0x14));
0x00013340 cmp r2, 0x1c |
| if (r2 < 0x1c) {
0x00013344 movhs r2, 0x1c | r2 = 0x1c;
| }
0x00013348 bl 0x124a8 | memcpy (r0, r1, r2);
0x0001334c ldr r1, [r4, 0x18] | r1 = *((r4 + 0x18));
0x00013350 ldr r4, [pc, 0x14c] | r4 = "ntpq.c";
0x00013354 cmp r1, 0 |
| if (r1 != 0) {
0x00013358 bne 0x13450 | goto label_4;
| }
0x0001335c add r0, sp, 0xc | r0 += src;
0x00013360 bl 0x2e774 | fcn_0002e774 (r0);
0x00013364 mov r2, 0x100 | r2 = 0x100;
0x00013368 mov r1, r0 | r1 = r0;
0x0001336c add r0, sp, 0x48 | r0 += dest;
0x00013370 bl 0x1246c | strlcpy (r0, r1, r2);
0x00013374 mov r3, 1 | r3 = 1;
0x00013378 str r3, [r4] | *(r4) = r3;
| do {
0x0001337c ldr r3, [pc, 0x124] | r3 = *(0x134a4);
0x00013380 ldr r2, [r3] | r2 = *(0x134a4);
0x00013384 mov r6, r3 | r6 = r3;
0x00013388 cmp r2, 2 |
| if (r2 > 2) {
0x0001338c ble 0x133c0 |
0x00013390 ldr r3, [sp, 8] | r3 = domain;
0x00013394 ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00013398 cmp r3, 2 |
| if (r3 != 2) {
0x0001339c ldreq r2, [pc, 0x108] | r2 = "AF_INET";
| }
| if (r3 != 2) {
0x000133a0 beq 0x133b4 |
0x000133a4 ldr r1, [pc, 0x104] | r1 = "AF_INET";
0x000133a8 cmp r3, 0xa |
0x000133ac ldr r2, [pc, 0x100] | r2 = "AF____";
| if (r3 != 0xa) {
0x000133b0 movne r2, r1 | r2 = r1;
| goto label_5;
| }
| }
| label_5:
0x000133b4 add r1, sp, 0x48 | r1 += dest;
0x000133b8 ldr r0, [pc, 0xf8] | r0 = "AF_INET6";
0x000133bc bl 0x12ab4 | printf ("AF_INET6", "AF_INET", "AF____", r3);
| }
0x000133c0 ldr r4, [pc, 0xf4] | r4 = "Opening_host__s___s_";
0x000133c4 ldr r5, [pc, 0xf4] | r5 = *(0x134bc);
0x000133c8 ldr r3, [r4, 0x18] | r3 = "connect";
0x000133cc cmp r3, 1 |
| if (r3 == 1) {
0x000133d0 bne 0x133fc |
0x000133d4 ldr r3, [r6] | r3 = *(r6);
0x000133d8 cmp r3, 2 |
| if (r3 > 2) {
0x000133dc ble 0x133ec |
0x000133e0 ldr r1, [pc, 0xdc] | r1 = *(0x134c0);
0x000133e4 ldr r0, [pc, 0xdc] | r0 = *(0x134c4);
0x000133e8 bl 0x12ab4 | printf (r0, r1);
| }
0x000133ec ldr r0, [r5] | r0 = *(r5);
0x000133f0 bl 0x127f0 | close (r0);
0x000133f4 mov r3, 0 | r3 = 0;
0x000133f8 str r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
| }
0x000133fc mov r2, 0x100 | r2 = 0x100;
0x00013400 add r1, sp, 0x48 | r1 += dest;
0x00013404 ldr r0, [pc, 0xb8] | r0 = *(0x134c0);
0x00013408 bl 0x1246c | strlcpy (r0, r1, r2);
0x0001340c ldrh r3, [sp, 0xe] | r3 = var_eh;
0x00013410 str r3, [r4, 0x1c] | *((r4 + 0x1c)) = r3;
0x00013414 ldr r3, [sp, 8] | r3 = domain;
0x00013418 ldmib r3, {r0, r1, r2} | __asm ("ldmib r3, {r0, r1, r2}");
0x0001341c bl 0x12988 | r0 = socket (r0, r1, r2);
0x00013420 cmn r0, 1 |
0x00013424 str r0, [r5] | *(r5) = r0;
| if (r0 != 1) {
0x00013428 ldreq r0, [pc, 0x9c] | r0 = *(0x000134cc);
| }
| if (r0 != 1) {
0x0001342c beq 0x1344c |
0x00013430 ldr r3, [sp, 8] | r3 = domain;
0x00013434 ldr r2, [r3, 0x10] | r2 = *((r3 + 0x10));
0x00013438 ldr r1, [r3, 0x14] | r1 = *((r3 + 0x14));
0x0001343c bl 0x124b4 | r0 = connect (r0, r1, r2);
0x00013440 cmn r0, 1 |
| if (r0 != 1) {
0x00013444 bne 0x13464 | goto label_6;
| }
0x00013448 ldr r0, [pc, 0x80] | r0 = "socket";
| }
0x0001344c bl 0x12b50 | fcn_00012b50 ();
| label_4:
0x00013450 mov r2, 0x100 | r2 = 0x100;
0x00013454 add r0, sp, 0x48 | r0 += dest;
0x00013458 bl 0x1246c | strlcpy (r0, r1, r2);
0x0001345c str r5, [r4] | *(r4) = r5;
0x00013460 b 0x1337c |
| } while (1);
| label_6:
0x00013464 ldr r0, [sp, 8] | r0 = domain;
0x00013468 bl 0x12568 | freeaddrinfo ();
0x0001346c ldr r3, [pc, 0x60] | r3 = "connect";
0x00013470 mov r0, 1 | r0 = 1;
0x00013474 mov r2, 0 | r2 = 0;
0x00013478 str r0, [r4, 0x18] | *((r4 + 0x18)) = r0;
0x0001347c str r2, [r3] | *(r3) = r2;
0x00013480 b 0x13204 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x135f8 */
| #include <stdint.h>
|
; (fcn) fcn.000135f8 () | void fcn_000135f8 (int32_t arg1, FILE * stream) {
| r0 = arg1;
| r1 = stream;
0x000135f8 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000135fc ldr r8, [pc, 0x60] | r8 = *(0x13660);
0x00013600 mov r5, r1 | r5 = r1;
0x00013604 mov r6, r0 | r6 = r0;
0x00013608 mov r4, r0 | r4 = r0;
0x0001360c ldr r2, [r6], 8 | r2 = *(r6);
| r6 += 8;
0x00013610 ldr r1, [pc, 0x50] | r1 = *(0x13664);
0x00013614 mov r0, r5 | r0 = r5;
0x00013618 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5, r6)
0x0001361c ldr sb, [pc, 0x48] | sb = " [ %s ]";
0x00013620 add r7, r4, 0xc | r7 = r4 + 0xc;
0x00013624 add r4, r4, 0x1c | r4 += 0x1c;
| do {
0x00013628 ldrb r3, [r6], 1 | r3 = *(r6);
| r6++;
0x0001362c cmp r3, 0 |
| if (r3 == 0) {
0x00013630 beq 0x13654 | goto label_0;
| }
0x00013634 ldr r2, [r7], 4 | r2 = *(r7);
| r7 += 4;
0x00013638 tst r3, 0x80 |
| if ((r3 & 0x80) == 0) {
0x0001363c movne r1, sb | r1 = sb;
| }
| if ((r3 & 0x80) != 0) {
0x00013640 moveq r1, r8 | r1 = r8;
| }
0x00013644 mov r0, r5 | r0 = r5;
0x00013648 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001364c cmp r7, r4 |
0x00013650 bne 0x13628 |
| } while (r7 != r4);
| label_0:
0x00013654 mov r1, r5 | r1 = r5;
0x00013658 mov r0, 0xa | r0 = 0xa;
0x0001365c pop {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00013660 b 0x127fc | return void (*0x127fc)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x13870 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00013870 () | void fcn_00013870 (int32_t arg_360h, int32_t arg_364h, int32_t arg1, int32_t arg2) {
| int32_t var_2h;
| int32_t var_bp_4h;
| int32_t var_6h;
| int32_t var_8h;
| int32_t var_ah;
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_0h_3;
| void * s;
| int32_t var_sp_2h;
| int32_t var_0h_4;
| void * var_70h;
| int32_t var_0h_2;
| int32_t var_b4h;
| void * buffer;
| int32_t var_135h;
| void * s2;
| int32_t var_338h;
| int32_t var_33ch;
| r0 = arg1;
| r1 = arg2;
0x00013870 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00013874 sub sp, sp, 0x33c |
0x00013878 mov r8, r2 | r8 = r2;
0x0001387c str r0, [sp, 0x10] | var_10h = r0;
0x00013880 str r1, [sp, 0x14] | var_14h = r1;
0x00013884 mov r2, 0x42 | r2 = 0x42;
0x00013888 mov r1, 0 | r1 = 0;
0x0001388c add r0, sp, 0x2c | r0 += s;
0x00013890 str r3, [sp, 0x18] | var_18h = r3;
0x00013894 bl 0x128b0 | memset (r0, r1, r2);
0x00013898 mov r1, 0 | r1 = 0;
0x0001389c mov r2, 0x42 | r2 = 0x42;
0x000138a0 add r0, sp, 0x70 | r0 += var_70h;
0x000138a4 bl 0x128b0 | memset (r0, r1, r2);
0x000138a8 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000138ac mov r3, 0 | r3 = 0;
0x000138b0 cmp r8, r3 |
0x000138b4 str r3, [r2] | *(r2) = r3;
0x000138b8 strhne r3, [r8] | __asm ("strhne r3, [r8]");
0x000138bc ldr r2, [pc, 0x724] | r2 = *(0x13fe4);
0x000138c0 ldr r3, [sp, 0x360] | r3 = *(arg_360h);
0x000138c4 mov r0, 0 | r0 = 0;
0x000138c8 str r2, [r3] | *(r3) = r2;
0x000138cc bl 0x1279c | time (r0);
0x000138d0 mov r3, 0 | r3 = 0;
0x000138d4 add r2, sp, 0xb4 | r2 += var_b4h;
0x000138d8 mov r1, r3 | r1 = r3;
0x000138dc str r0, [sp, 0xc] | var_ch = r0;
| do {
0x000138e0 str r1, [r2, r3, lsl 2] | offset_0 = r3 << 2;
| *((r2 + offset_0)) = r1;
0x000138e4 add r3, r3, 1 | r3++;
0x000138e8 cmp r3, 0x20 |
0x000138ec bne 0x138e0 |
| } while (r3 != 0x20);
0x000138f0 ldr r4, [pc, 0x6f4] | r4 = *(0x13fe8);
0x000138f4 mov r6, 0 | r6 = 0;
0x000138f8 mov r5, r6 | r5 = r6;
0x000138fc add sl, sp, 0x24 | sl += var_24h;
| label_2:
0x00013900 cmp r5, 0 |
| if (r5 != 0) {
0x00013904 ldreq r3, [pc, 0x6e4] | r3 = *(0x00013ff0);
| }
| if (r5 == 0) {
0x00013908 ldrne r3, [pc, 0x6e4] | r3 = *(0x00013ff4);
| }
0x0001390c ldr sb, [pc, 0x6e4] | sb = *(0x00013ff8);
0x00013910 ldm r3, {r0, r1} | r0 = *(r3);
| r1 = *((r3 + 4));
0x00013914 add r2, sp, 0x338 | r2 += var_338h;
0x00013918 stm sl, {r0, r1} | *(sl) = r0;
| *((sl + 4)) = r1;
0x0001391c ldr r0, [sb] | r0 = *(sb);
0x00013920 ldr r3, [sp, 0x28] | r3 = var_28h;
0x00013924 and r1, r0, 0x1f | r1 = r0 & 0x1f;
0x00013928 str r3, [sp, 0x1c] | var_1ch = r3;
0x0001392c lsr r3, r0, 5 | r3 = r0 >> 5;
0x00013930 add r3, r2, r3, lsl 2 | r3 = r2 + (r3 << 2);
0x00013934 ldr r2, [r3, -0x284] | r2 = var_b4h;
0x00013938 mov ip, 1 |
0x0001393c orr r2, r2, ip, lsl r1 | r2 |= (ip << r1);
0x00013940 str r2, [r3, -0x284] | var_b4h = r2;
0x00013944 mov r3, 0 | r3 = 0;
0x00013948 str sl, [sp] | *(sp) = sl;
0x0001394c mov r2, r3 | r2 = r3;
0x00013950 add r1, sp, 0xb4 | r1 += var_b4h;
0x00013954 add r0, r0, ip | r0 += ip;
0x00013958 ldr r7, [sp, 0x24] | r7 = var_24h;
0x0001395c bl 0x126b8 | r0 = select ();
0x00013960 cmn r0, 1 |
0x00013964 mov fp, r0 |
| if (r0 != 1) {
0x00013968 bne 0x13990 | goto label_17;
| }
0x0001396c bl 0x12430 | r0 = errno_location ();
0x00013970 ldr r3, [r0] | r3 = *(r0);
0x00013974 cmp r3, 4 |
| if (r3 == 4) {
0x00013978 beq 0x13ecc | goto label_18;
| }
0x0001397c ldr r0, [pc, 0x678] | r0 = *(0x13ff8);
0x00013980 bl 0x13174 | fcn_00013174 ();
| do {
| label_1:
0x00013984 mov r0, fp | r0 = fp;
0x00013988 add sp, sp, 0x33c |
0x0001398c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_17:
0x00013990 mov r0, 0 | r0 = 0;
0x00013994 bl 0x1279c | time (r0);
0x00013998 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001399c cmp r3, 0 |
| if (r3 == 0) {
0x000139a0 addne r7, r7, 1 | r7++;
| }
0x000139a4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000139a8 sub r3, r0, r3 | r3 = r0 - r3;
0x000139ac bic r3, r3, 0x80000000 | r3 = BIT_MASK (r3, 0x80000000);
0x000139b0 cmp r7, r3 |
| if (r7 < r3) {
0x000139b4 movhs r2, 0 | r2 = 0;
| }
| if (r7 >= r3) {
0x000139b8 movlo r2, 1 | r2 = 1;
| }
0x000139bc cmp fp, 0 |
| if (fp > 0) {
0x000139c0 movle r2, 0 | r2 = 0;
| }
0x000139c4 cmp r2, 0 |
| if (r2 == 0) {
0x000139c8 beq 0x13a10 | goto label_19;
| }
0x000139cc mov r3, 0 | r3 = 0;
0x000139d0 mov r2, 0x204 | r2 = 0x204;
0x000139d4 add r1, sp, 0x134 | r1 += buffer;
0x000139d8 ldr r0, [sb] | r0 = *(sb);
0x000139dc bl 0x12610 | recv (r0, r1);
| label_0:
0x000139e0 cmp r5, 0 |
0x000139e4 ldr r3, [sp, 0x364] | r3 = *(arg_364h);
| if (r5 != 0) {
0x000139e8 bne 0x13a48 | goto label_20;
| }
0x000139ec cmp r3, 0 |
| if (r3 != 0) {
0x000139f0 beq 0x13a08 |
0x000139f4 ldr r3, [pc, 0x604] | r3 = "select fails";
0x000139f8 ldr r2, [pc, 0x604] | r2 = stderr;
0x000139fc ldr r1, [pc, 0x604] | r1 = *(0x14004);
0x00013a00 ldr r0, [r3] | r0 = "select fails";
0x00013a04 bl 0x12910 | fprintf ("select fails", r1, r2, "select fails")
| }
0x00013a08 ldr fp, [pc, 0x5fc] | fp = *(0x0001400c);
0x00013a0c b 0x13984 |
| } while (1);
| label_19:
0x00013a10 cmp fp, 0 |
| if (fp <= 0) {
0x00013a14 ble 0x139e0 | goto label_0;
| }
0x00013a18 add fp, sp, 0x134 |
0x00013a1c mov r3, r2 | r3 = r2;
0x00013a20 ldr r0, [sb] | r0 = *(sb);
0x00013a24 mov r2, 0x204 | r2 = 0x204;
0x00013a28 mov r1, fp | r1 = fp;
0x00013a2c bl 0x12610 | r0 = recv (r0, r1);
0x00013a30 subs sb, r0, 0 | sb = r0 - 0;
| if (sb >= r0) {
0x00013a34 bge 0x13aec | goto label_21;
| }
0x00013a38 ldr r0, [pc, 0x5d0] | r0 = *(0x1400c);
0x00013a3c bl 0x13174 | fcn_00013174 ();
0x00013a40 mvn fp, 0 |
0x00013a44 b 0x13984 | goto label_1;
| label_20:
0x00013a48 cmp r3, 0 |
| if (r3 != 0) {
0x00013a4c beq 0x13a64 |
0x00013a50 ldr r3, [pc, 0x5a8] | r3 = "select fails";
0x00013a54 ldr r2, [pc, 0x5a8] | r2 = stderr;
0x00013a58 ldr r1, [pc, 0x5b4] | r1 = "read";
0x00013a5c ldr r0, [r3] | r0 = "select fails";
0x00013a60 bl 0x12910 | fprintf ("select fails", "read", r2, "select fails")
| }
0x00013a64 ldr r3, [pc, 0x580] |
0x00013a68 ldr r3, [r3] | r3 = *(0x13fe8);
0x00013a6c cmp r3, 0 |
| if (r3 == 0) {
0x00013a70 beq 0x13ae4 | goto label_5;
| }
0x00013a74 ldr r4, [pc, 0x584] | r4 = "select fails";
0x00013a78 ldr r0, [pc, 0x598] | r0 = "%s: timed out with incomplete data\n";
0x00013a7c ldr r1, [r4] | r1 = "select fails";
0x00013a80 bl 0x12874 | fputs ("%s: timed out with incomplete data\n", "select fails");
0x00013a84 ldr r8, [pc, 0x590] | r8 = "ERR_INCOMPLETE: Received fragments:\n";
0x00013a88 mov r7, 0 | r7 = 0;
0x00013a8c add sl, sp, 0x2c | sl += s;
0x00013a90 add sb, sp, 0x70 | sb += var_70h;
| do {
0x00013a94 lsl r2, r7, 1 | r2 = r7 << 1;
0x00013a98 ldrh r3, [r2, sl] | r3 = *((r2 + sl));
0x00013a9c ldrh r2, [r2, sb] | r2 = *((r2 + sb));
0x00013aa0 mov r1, r8 | r1 = r8;
0x00013aa4 str r2, [sp, 4] | var_4h = r2;
0x00013aa8 add r2, r3, r2 | r2 = r3 + r2;
0x00013aac str r2, [sp] | *(sp) = r2;
0x00013ab0 mov r2, r7 | r2 = r7;
0x00013ab4 ldr r0, [r4] | r0 = *(r4);
0x00013ab8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00013abc add r7, r7, 1 | r7++;
0x00013ac0 cmp r5, r7 |
0x00013ac4 bne 0x13a94 |
| } while (r5 != r7);
0x00013ac8 ldr r3, [pc, 0x550] | r3 = "_2u:__5d__5d_3d_octets";
0x00013acc cmp r6, 0 |
0x00013ad0 ldr r2, [pc, 0x54c] | r2 = *(0x14020);
0x00013ad4 ldr r1, [pc, 0x54c] | r1 = "not_";
| if (r6 == 0) {
0x00013ad8 movne r2, r3 | r2 = r3;
| }
0x00013adc ldr r0, [r4] | r0 = *(r4);
0x00013ae0 bl 0x12910 | fprintf (r0, "not_", r2, "_2u:__5d__5d_3d_octets", r4, r5, r6)
| label_5:
0x00013ae4 ldr fp, [pc, 0x540] | fp = *(0x0001402c);
0x00013ae8 b 0x13984 | goto label_1;
| label_21:
0x00013aec ldr r3, [r4] | r3 = *(r4);
0x00013af0 cmp r3, 3 |
| if (r3 > 3) {
0x00013af4 ble 0x13b0c |
0x00013af8 ldr r0, [pc, 0x530] | r0 = *(0x1402c);
0x00013afc bl 0x12ad8 | puts (r0);
0x00013b00 mov r1, sb | r1 = sb;
0x00013b04 mov r0, fp | r0 = fp;
0x00013b08 bl 0x13784 | fcn_00013784 (r0, r1, r2);
| }
0x00013b0c cmp sb, 0xb |
| if (sb > 0xb) {
0x00013b10 bgt 0x13b30 | goto label_22;
| }
0x00013b14 ldr r3, [r4] | r3 = *(r4);
0x00013b18 cmp r3, 0 |
| if (r3 == 0) {
0x00013b1c movne r1, sb | r1 = sb;
| }
| if (r3 != 0) {
0x00013b20 ldrne r0, [pc, 0x50c] | r0 = "Short (%d byte) packet received\n";
| goto label_23;
| }
| if (r3 == 0) {
| label_23:
0x00013b24 beq 0x13900 | goto label_2;
| }
| label_3:
0x00013b28 bl 0x12ab4 | printf (r0);
0x00013b2c b 0x13900 | goto label_2;
| label_22:
0x00013b30 ldrb r3, [sp, 0x134] | r3 = buffer;
0x00013b34 lsr r1, r3, 3 | r1 = r3 >> 3;
0x00013b38 and r1, r1, 7 | r1 &= 7;
0x00013b3c sub r2, r1, 1 | r2 = r1 - 1;
0x00013b40 cmp r2, 3 |
| if (r2 < 3) {
0x00013b44 bls 0x13b5c | goto label_24;
| }
0x00013b48 ldr r3, [r4] | r3 = *(r4);
0x00013b4c cmp r3, 0 |
| if (r3 == 0) {
0x00013b50 beq 0x13900 | goto label_2;
| }
0x00013b54 ldr r0, [pc, 0x4dc] | r0 = "Short (%d byte) packet received\n";
0x00013b58 b 0x13b28 | goto label_3;
| label_24:
0x00013b5c and r1, r3, 7 | r1 = r3 & 7;
0x00013b60 cmp r1, 6 |
| if (r1 == 6) {
0x00013b64 beq 0x13b7c | goto label_25;
| }
0x00013b68 ldr r3, [r4] | r3 = *(r4);
0x00013b6c cmp r3, 0 |
| if (r3 != 0) {
0x00013b70 ldrne r0, [pc, 0x4c4] | r0 = "Packet received with mode %d\n";
| goto label_26;
| }
| if (r3 == 0) {
| label_26:
0x00013b74 beq 0x13900 | goto label_2;
| }
0x00013b78 b 0x13b28 | goto label_3;
| label_25:
0x00013b7c ldrb r3, [sp, 0x135] | r3 = var_135h;
0x00013b80 tst r3, 0x80 |
| if ((r3 & 0x80) != 0) {
0x00013b84 bne 0x13ba0 | goto label_27;
| }
0x00013b88 ldr r3, [r4] | r3 = *(r4);
0x00013b8c cmp r3, 0 |
| if (r3 == 0) {
0x00013b90 beq 0x13900 | goto label_2;
| }
0x00013b94 ldr r0, [pc, 0x4a4] | r0 = "Packet received with mode %d\n";
0x00013b98 bl 0x12ad8 | puts ("Packet received with mode %d\n");
0x00013b9c b 0x13900 | goto label_2;
| label_27:
0x00013ba0 ldrh r2, [fp, 2] | r2 = var_2h;
0x00013ba4 lsr r1, r2, 8 | r1 = r2 >> 8;
0x00013ba8 orr r1, r1, r2, lsl 8 | r1 |= (r2 << 8);
0x00013bac ldr r2, [pc, 0x490] | r2 = "Received request packet, wanted response";
0x00013bb0 lsl r1, r1, 0x10 | r1 <<= 0x10;
0x00013bb4 ldrh r2, [r2] | r2 = *(r2);
0x00013bb8 lsr r1, r1, 0x10 | r1 >>= 0x10;
0x00013bbc cmp r2, r1 |
| if (r2 == r1) {
0x00013bc0 beq 0x13bdc | goto label_28;
| }
0x00013bc4 ldr r3, [r4] | r3 = *(r4);
0x00013bc8 cmp r3, 0 |
| if (r3 != 0) {
0x00013bcc ldrne r0, [pc, 0x474] | r0 = "Received sequnce number %d, wanted %d\n";
| goto label_29;
| }
| if (r3 == 0) {
| label_29:
0x00013bd0 beq 0x13900 | goto label_2;
| }
| label_4:
0x00013bd4 bl 0x12ab4 | printf (r0);
0x00013bd8 b 0x13900 | goto label_2;
| label_28:
0x00013bdc ldr r2, [sp, 0x10] | r2 = var_10h;
0x00013be0 and r1, r3, 0x1f | r1 = r3 & 0x1f;
0x00013be4 cmp r1, r2 |
| if (r1 == r2) {
0x00013be8 beq 0x13c00 | goto label_30;
| }
0x00013bec ldr r3, [r4] | r3 = *(r4);
0x00013bf0 cmp r3, 0 |
| if (r3 == 0) {
0x00013bf4 beq 0x13900 | goto label_2;
| }
0x00013bf8 ldr r0, [pc, 0x44c] | r0 = "Received sequnce number %d, wanted %d\n";
0x00013bfc b 0x13bd4 | goto label_4;
| label_30:
0x00013c00 tst r3, 0x40 |
| if ((r3 & 0x40) != 0) {
0x00013c04 beq 0x13c3c |
0x00013c08 tst r3, 0x20 |
0x00013c0c ldrb fp, [fp, 4] | fp = var_bp_4h;
| if ((r3 & 0x20) != 0) {
0x00013c10 beq 0x13c30 |
0x00013c14 ldr r3, [pc, 0x3d0] |
0x00013c18 ldr r3, [r3] | r3 = *(0x13fe8);
0x00013c1c cmp r3, 0 |
| if (r3 <= 0) {
0x00013c20 ble 0x13c30 | goto label_31;
| }
0x00013c24 mov r1, fp | r1 = fp;
0x00013c28 ldr r0, [pc, 0x420] | r0 = "Received opcode %d, wanted %d (sequence number okay)\n";
0x00013c2c bl 0x2b4ec | fcn_0002b4ec ();
| }
| label_31:
0x00013c30 cmp fp, 0 |
| if (fp != 0) {
0x00013c34 moveq fp, 0x100 |
| }
0x00013c38 b 0x13984 | goto label_1;
| }
0x00013c3c ldrh r3, [fp, 6] | r3 = var_6h;
0x00013c40 lsr r1, r3, 8 | r1 = r3 >> 8;
0x00013c44 orr r1, r1, r3, lsl 8 | r1 |= (r3 << 8);
0x00013c48 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00013c4c lsl r1, r1, 0x10 | r1 <<= 0x10;
0x00013c50 lsr r1, r1, 0x10 | r1 >>= 0x10;
0x00013c54 cmp r1, r3 |
| if (r1 != r3) {
0x00013c58 beq 0x13c74 |
0x00013c5c ldr r3, [r4] | r3 = *(r4);
0x00013c60 cmp r3, 0 |
| if (r3 <= 0) {
0x00013c64 ble 0x13c74 | goto label_32;
| }
0x00013c68 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00013c6c ldr r0, [pc, 0x3e0] | r0 = "Error code %d received on not-final packet\n";
0x00013c70 bl 0x2b4ec | fcn_0002b4ec ();
| }
| label_32:
0x00013c74 tst sb, 3 |
| if ((sb & 3) == 0) {
0x00013c78 beq 0x13c98 | goto label_33;
| }
0x00013c7c ldr r3, [r4] | r3 = *(r4);
0x00013c80 cmp r3, 0 |
| if (r3 <= 0) {
0x00013c84 ble 0x13900 | goto label_2;
| }
0x00013c88 mov r1, sb | r1 = sb;
0x00013c8c ldr r0, [pc, 0x3c4] | r0 = "Association ID %d doesn't match expected %d\n";
0x00013c90 bl 0x2b4ec | fcn_0002b4ec ();
0x00013c94 b 0x13900 | goto label_2;
| label_33:
0x00013c98 ldrh r3, [fp, 0xa] | r3 = var_ah;
0x00013c9c sub r2, sb, 0xc | r2 = sb - 0xc;
0x00013ca0 lsr r7, r3, 8 | r7 = r3 >> 8;
0x00013ca4 orr r7, r7, r3, lsl 8 | r7 |= (r3 << 8);
0x00013ca8 lsl r7, r7, 0x10 | r7 <<= 0x10;
0x00013cac lsr r7, r7, 0x10 | r7 >>= 0x10;
0x00013cb0 add r3, r7, 0xf | r3 = r7 + 0xf;
0x00013cb4 bic r3, r3, 3 | r3 = BIT_MASK (r3, 3);
0x00013cb8 cmp sb, r3 |
| if (sb < r3) {
0x00013cbc bge 0x13cd0 |
0x00013cc0 mov r1, r7 | r1 = r7;
0x00013cc4 ldr r0, [pc, 0x390] | r0 = "Response_packet_not_padded__size___d";
0x00013cc8 bl 0x12ab4 | printf ("Response_packet_not_padded__size___d", r1);
0x00013ccc b 0x13ae4 | goto label_5;
| }
0x00013cd0 ldr r3, [r4] | r3 = *(r4);
0x00013cd4 ldrh fp, [fp, 8] | fp = var_8h;
0x00013cd8 cmp r3, 1 |
| if (r3 > 1) {
0x00013cdc ble 0x13cf4 |
0x00013ce0 mov r1, sb | r1 = sb;
0x00013ce4 ldr r0, [pc, 0x374] | r0 = "Response packet claims %u octets payload, above %ld received\n";
0x00013ce8 str r2, [sp, 0x1c] | var_1ch = r2;
0x00013cec bl 0x2b4ec | fcn_0002b4ec ();
0x00013cf0 ldr r2, [sp, 0x1c] | r2 = var_1ch;
| }
0x00013cf4 cmp r7, r2 |
0x00013cf8 ldr r3, [r4] | r3 = *(r4);
| if (r7 < r2) {
0x00013cfc bls 0x13d18 | goto label_34;
| }
0x00013d00 cmp r3, 0 |
| if (r3 <= 0) {
0x00013d04 ble 0x13900 | goto label_2;
| }
0x00013d08 mov r1, r7 | r1 = r7;
0x00013d0c ldr r0, [pc, 0x350] | r0 = "Got packet, size = %d\n";
0x00013d10 bl 0x2b4ec | fcn_0002b4ec ();
0x00013d14 b 0x13900 | goto label_2;
| label_34:
0x00013d18 cmp r7, 0 |
| if (r7 != 0) {
0x00013d1c bne 0x13d40 | goto label_35;
| }
0x00013d20 ldrb r2, [sp, 0x135] | r2 = var_135h;
0x00013d24 tst r2, 0x20 |
| if ((r2 & 0x20) == 0) {
0x00013d28 beq 0x13d40 | goto label_35;
| }
0x00013d2c cmp r3, 0 |
| if (r3 > 0) {
0x00013d30 ldrgt r0, [pc, 0x330] | r0 = "Received count of 0 in non-final fragment\n";
| goto label_36;
| }
| if (r3 <= 0) {
| label_36:
0x00013d34 ble 0x13900 | goto label_2;
| }
| label_6:
0x00013d38 bl 0x2b4ec | fcn_0002b4ec ();
0x00013d3c b 0x13900 | goto label_2;
| label_35:
0x00013d40 lsr sb, fp, 8 | sb = fp >> 8;
0x00013d44 orr sb, sb, fp, lsl 8 | sb |= (fp << 8);
0x00013d48 lsl sb, sb, 0x10 | sb <<= 0x10;
0x00013d4c lsr sb, sb, 0x10 | sb >>= 0x10;
0x00013d50 add fp, sb, r7 |
0x00013d54 cmp fp, 0x3c00 |
| if (fp <= 0x3c00) {
0x00013d58 ble 0x13d80 | goto label_37;
| }
0x00013d5c cmp r3, 0 |
0x00013d60 bgt 0x13d6c |
| while (1) {
| label_7:
0x00013d64 ldr fp, [pc, 0x300] | fp = *(0x0001406c);
0x00013d68 b 0x13984 | goto label_1;
0x00013d6c mov r2, r7 | r2 = r7;
0x00013d70 mov r1, sb | r1 = sb;
0x00013d74 ldr r0, [pc, 0x2f4] | r0 = *(0x1406c);
0x00013d78 bl 0x2b4ec | fcn_0002b4ec ();
0x00013d7c b 0x13d64 |
| }
| label_37:
0x00013d80 cmp r6, 0 |
| if (r6 == 0) {
0x00013d84 beq 0x13da4 | goto label_38;
| }
0x00013d88 ldrb r2, [sp, 0x135] | r2 = var_135h;
0x00013d8c tst r2, 0x20 |
| if ((r2 & 0x20) != 0) {
0x00013d90 bne 0x13da4 | goto label_38;
| }
0x00013d94 cmp r3, 0 |
| if (r3 <= 0) {
0x00013d98 ble 0x13900 | goto label_2;
| }
0x00013d9c ldr r0, [pc, 0x2d0] | r0 = "Offset %u, count %u, too big for buffer\n";
0x00013da0 b 0x13d38 | goto label_6;
| label_38:
0x00013da4 cmp r3, 1 |
| if (r3 > 1) {
0x00013da8 ble 0x13db4 |
0x00013dac ldr r0, [pc, 0x2c4] | r0 = "Received_second_last_fragment_packet";
0x00013db0 bl 0x2b4ec | fcn_0002b4ec ();
| }
0x00013db4 cmp r5, 0x1f |
| if (r5 < 0x1f) {
0x00013db8 bls 0x13e24 | goto label_39;
| }
0x00013dbc ldr r3, [r4] | r3 = *(r4);
0x00013dc0 cmp r3, 1 |
| if (r3 <= 1) {
0x00013dc4 ble 0x13d64 | goto label_7;
| }
0x00013dc8 mov r1, 0x1f | r1 = 0x1f;
0x00013dcc ldr r0, [pc, 0x2a8] | r0 = "Packet_okay";
0x00013dd0 bl 0x2b4ec | fcn_0002b4ec ();
0x00013dd4 b 0x13d64 | goto label_7;
| do {
0x00013dd8 add r1, r1, 1 | r1++;
| label_8:
0x00013ddc cmp r5, r1 |
| if (r5 == r1) {
0x00013de0 beq 0x13e30 | goto label_40;
| }
0x00013de4 lsl r3, r1, 1 | r3 = r1 << 1;
0x00013de8 ldrh r2, [r3, r0] | r2 = *((r3 + r0));
0x00013dec cmp r2, sb |
0x00013df0 blo 0x13dd8 |
| } while (r2 <= sb);
| if (r2 != sb) {
0x00013df4 bne 0x13f98 | goto label_41;
| }
0x00013df8 ldr r2, [r4] | r2 = *(r4);
0x00013dfc cmp r2, 0 |
| if (r2 <= 0) {
0x00013e00 ble 0x13900 | goto label_2;
| }
0x00013e04 add r2, sp, 0x70 | r2 += var_70h;
0x00013e08 ldrh r3, [r2, r3] | r3 = *((r2 + r3));
0x00013e0c mov r1, r7 | r1 = r7;
0x00013e10 str sb, [sp] | *(sp) = sb;
0x00013e14 mov r2, sb | r2 = sb;
0x00013e18 ldr r0, [pc, 0x260] | r0 = "Number of fragments exceeds maximum %d\n";
0x00013e1c bl 0x2b4ec | fcn_0002b4ec ();
0x00013e20 b 0x13900 | goto label_2;
| label_39:
0x00013e24 mov r1, 0 | r1 = 0;
0x00013e28 add r0, sp, 0x2c | r0 += s;
0x00013e2c b 0x13ddc | goto label_8;
| label_40:
0x00013e30 cmp r5, 0 |
| if (r5 == 0) {
0x00013e34 beq 0x13e80 | goto label_15;
| }
| label_13:
0x00013e38 sub r2, r1, 1 | r2 = r1 - 1;
0x00013e3c lsl r2, r2, 1 | r2 <<= 1;
0x00013e40 add r0, sp, 0x70 | r0 += var_70h;
0x00013e44 add r3, sp, 0x2c | r3 += s;
0x00013e48 ldrh r3, [r3, r2] | r3 = *((r3 + r2));
0x00013e4c ldrh r2, [r0, r2] | r2 = *((r0 + r2));
0x00013e50 add r0, r3, r2 | r0 = r3 + r2;
0x00013e54 cmp sb, r0 |
| if (sb >= r0) {
0x00013e58 bge 0x13e78 | goto label_42;
| }
0x00013e5c ldr r1, [r4] | r1 = *(r4);
0x00013e60 cmp r1, 0 |
| if (r1 <= 0) {
0x00013e64 movgt r1, sb | r1 = sb;
| }
| if (r1 > 0) {
0x00013e68 ldrgt r0, [pc, 0x214] | r0 = "received frag at %u overlaps with %u octet frag at %u\n";
| goto label_43;
| }
| if (r1 <= 0) {
| label_43:
0x00013e6c ble 0x13900 | goto label_2;
| }
| label_9:
0x00013e70 bl 0x2b4ec | fcn_0002b4ec ();
0x00013e74 b 0x13900 | goto label_2;
| label_42:
0x00013e78 cmp r5, r1 |
| if (r5 > r1) {
0x00013e7c bhi 0x13fa0 | goto label_44;
| }
| label_15:
0x00013e80 lsl r1, r1, 1 | r1 <<= 1;
0x00013e84 add r3, sp, 0x2c | r3 += s;
0x00013e88 strh sb, [r3, r1] | *((r3 + r1)) = sb;
0x00013e8c add r3, sp, 0x70 | r3 += var_70h;
0x00013e90 strh r7, [r3, r1] | *((r3 + r1)) = r7;
0x00013e94 ldrb r3, [sp, 0x135] | r3 = var_135h;
0x00013e98 add r5, r5, 1 | r5++;
0x00013e9c tst r3, 0x20 |
| if ((r3 & 0x20) == 0) {
0x00013ea0 beq 0x13f08 | goto label_45;
| }
| label_10:
0x00013ea4 ldr r0, [pc, 0x13c] | r0 = *(0x13fe4);
0x00013ea8 mov r2, r7 | r2 = r7;
0x00013eac add r1, sp, 0x140 | r1 += s2;
0x00013eb0 add r0, r0, sb | r0 += sb;
0x00013eb4 bl 0x124a8 | memcpy (r0, r1, r2);
0x00013eb8 mov r0, 0 | r0 = 0;
0x00013ebc bl 0x1279c | time (r0);
0x00013ec0 cmp r6, 0 |
0x00013ec4 str r0, [sp, 0xc] | var_ch = r0;
| if (r6 == 0) {
0x00013ec8 beq 0x13900 | goto label_2;
| }
| label_18:
0x00013ecc add r2, sp, 0x2c | r2 += s;
0x00013ed0 ldrh r3, [r2] | r3 = *(r2);
0x00013ed4 cmp r3, 0 |
| if (r3 != 0) {
0x00013ed8 moveq r0, r2 | r0 = r2;
| }
| if (r3 != 0) {
0x00013edc moveq r1, 1 | r1 = 1;
| }
| if (r3 == 0) {
0x00013ee0 beq 0x13f4c | goto label_46;
| }
| label_11:
0x00013ee4 mov r6, 1 | r6 = 1;
0x00013ee8 b 0x13900 | goto label_2;
| label_14:
0x00013eec ldr r2, [r4] | r2 = *(r4);
0x00013ef0 cmp r2, 0 |
| if (r2 <= 0) {
0x00013ef4 ble 0x13900 | goto label_2;
| }
0x00013ef8 mov r2, sb | r2 = sb;
0x00013efc mov r1, r7 | r1 = r7;
0x00013f00 ldr r0, [pc, 0x180] | r0 = "received frag at %u overlaps with %u octet frag at %u\n";
0x00013f04 b 0x13e70 | goto label_9;
| label_45:
0x00013f08 cmp r8, 0 |
| if (r8 == 0) {
0x00013f0c addne r3, sp, 0x134 | r3 += buffer;
| }
0x00013f10 ldrhne r2, [r3, 4] | __asm ("ldrhne r2, [r3, 4]");
0x00013f14 mov r6, 1 | r6 = 1;
| if (r8 == 0) {
0x00013f18 lsrne r3, r2, 8 | r3 = r2 >> 8;
| }
| if (r8 == 0) {
0x00013f1c orrne r3, r3, r2, lsl 8 | r3 |= (r2 << 8);
| }
0x00013f20 strhne r3, [r8] | __asm ("strhne r3, [r8]");
0x00013f24 b 0x13ea4 | goto label_10;
| label_12:
0x00013f28 add r3, sp, 0x70 | r3 += var_70h;
0x00013f2c add r3, r3, r1, lsl 1 | r3 += (r1 << 1);
0x00013f30 ldrh ip, [r0] | ip = *(r0);
0x00013f34 ldrh r3, [r3, -2] | r3 = var_70h;
0x00013f38 add r3, r3, ip | r3 += ip;
0x00013f3c ldrh ip, [r0, 2]! | ip = var_sp_2h;
0x00013f40 cmp r3, ip |
| if (r3 != ip) {
0x00013f44 bne 0x13ee4 | goto label_11;
| }
0x00013f48 add r1, r1, 1 | r1++;
| label_46:
0x00013f4c cmp r1, r5 |
| if (r1 <= r5) {
0x00013f50 blo 0x13f28 | goto label_12;
| }
| if (r1 != r5) {
0x00013f54 bne 0x13ee4 | goto label_11;
| }
0x00013f58 sub r3, r1, 1 | r3 = r1 - 1;
0x00013f5c lsl r3, r3, 1 | r3 <<= 1;
0x00013f60 add r0, sp, 0x70 | r0 += var_70h;
0x00013f64 ldrh r2, [r2, r3] | r2 = *((r2 + r3));
0x00013f68 ldrh r3, [r0, r3] | r3 = *((r0 + r3));
0x00013f6c add r3, r2, r3 | r3 = r2 + r3;
0x00013f70 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00013f74 str r3, [r2] | *(r2) = r3;
0x00013f78 ldr r3, [pc, 0x6c] |
0x00013f7c ldr r3, [r3] | r3 = *(0x13fe8);
0x00013f80 cmp r3, 0 |
| if (r3 > 0) {
0x00013f84 ble 0x13f90 |
0x00013f88 ldr r0, [pc, 0xfc] | r0 = "received %u octet frag at %u overlaps with frag at %u\n";
0x00013f8c bl 0x2b4ec | fcn_0002b4ec ();
| }
0x00013f90 mov fp, 0 |
0x00013f94 b 0x13984 | goto label_1;
| label_41:
0x00013f98 cmp r1, 0 |
| if (r1 != 0) {
0x00013f9c bne 0x13e38 | goto label_13;
| }
| label_44:
0x00013fa0 add r0, sp, 0x2c | r0 += s;
0x00013fa4 lsl r3, r1, 1 | r3 = r1 << 1;
0x00013fa8 ldrh r3, [r0, r3] | r3 = *((r0 + r3));
0x00013fac cmp fp, r3 |
| if (fp > r3) {
0x00013fb0 bgt 0x13eec | goto label_14;
| }
0x00013fb4 lsl r3, r5, 1 | r3 = r5 << 1;
0x00013fb8 add r2, sp, 0x70 | r2 += var_70h;
0x00013fbc add r0, r0, r3 | r0 += r3;
0x00013fc0 add r3, r2, r3 | r3 = r2 + r3;
0x00013fc4 mov r2, r5 | r2 = r5;
| label_16:
0x00013fc8 cmp r2, r1 |
| if (r2 < r1) {
0x00013fcc bls 0x13e80 | goto label_15;
| }
0x00013fd0 ldrh ip, [r0, -2]! | ip = var_0h_3;
0x00013fd4 sub r2, r2, 1 | r2--;
0x00013fd8 strh ip, [r0, 2] | var_sp_2h = ip;
0x00013fdc ldrh ip, [r3, -2]! | ip = var_0h_4;
0x00013fe0 strh ip, [r3, 2] | var_0h_2 = ip;
0x00013fe4 b 0x13fc8 | goto label_16;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x14d98 */
| #include <stdint.h>
|
; (fcn) fcn.00014d98 () | void fcn_00014d98 (void * s2, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_dh;
| int16_t var_2h;
| int16_t var_4h;
| int16_t var_6h;
| int16_t var_8h;
| int16_t var_ah;
| void * s1;
| int32_t var_210h;
| r0 = arg1;
| r1 = arg2;
0x00014d98 cmp r3, 0x1d4 |
0x00014d9c push {r4, r5, r6, r7, r8, lr} |
0x00014da0 mov r4, r3 | r4 = r3;
0x00014da4 sub sp, sp, 0x210 |
| if (r3 < 0x1d4) {
0x00014da8 bls 0x14dcc | goto label_5;
| }
0x00014dac mov r2, r3 | r2 = r3;
0x00014db0 ldr r3, [pc, 0x1d8] | r3 = *(0x14f8c);
0x00014db4 ldr r1, [pc, 0x1d8] | r1 = stderr;
0x00014db8 ldr r0, [r3] | r0 = *(0x14f8c);
0x00014dbc bl 0x12910 | fprintf (r0, r1, r2, r3)
| label_1:
0x00014dc0 mov r0, 1 | r0 = 1;
| do {
0x00014dc4 add sp, sp, 0x210 |
0x00014dc8 pop {r4, r5, r6, r7, r8, pc} |
| label_5:
0x00014dcc ldr r7, [pc, 0x1c4] | r7 = "_Internal_error___qsize___zu__too_large";
0x00014dd0 mov r6, r2 | r6 = r2;
0x00014dd4 ldrb r3, [r7, 0x18] | r3 = *((r7 + 0x18));
0x00014dd8 add r5, sp, 0xc | r5 += var_ch;
0x00014ddc lsl r3, r3, 3 | r3 <<= 3;
0x00014de0 and r3, r3, 0x38 | r3 &= 0x38;
0x00014de4 orr r3, r3, 6 | r3 |= 6;
0x00014de8 strb r3, [sp, 0xc] | var_ch = r3;
0x00014dec ldr r3, [pc, 0x1a8] | r3 = *(0x14f98);
0x00014df0 mov r8, 0 | r8 = 0;
0x00014df4 ldrh r2, [r3] | r2 = *(r3);
0x00014df8 and r0, r0, 0x1f | r0 &= s2x1f;
0x00014dfc lsr r3, r2, 8 | r3 = r2 >> 8;
0x00014e00 orr r3, r3, r2, lsl 8 | r3 |= (r2 << 8);
0x00014e04 strh r3, [r5, 2] | var_2h = r3;
0x00014e08 lsr r3, r1, 8 | r3 = r1 >> 8;
0x00014e0c orr r1, r3, r1, lsl 8 | r1 = r3 | (r1 << 8);
0x00014e10 lsl r3, r4, 0x10 | r3 = r4 << 0x10;
0x00014e14 lsr r3, r3, 0x18 | r3 >>= 0x18;
0x00014e18 orr r3, r3, r4, lsl 8 | r3 |= (r4 << 8);
0x00014e1c cmp r4, r8 |
0x00014e20 strh r1, [r5, 6] | var_6h = r1;
0x00014e24 strb r0, [sp, 0xd] | var_dh = r0;
0x00014e28 strh r8, [r5, 4] | var_4h = r8;
0x00014e2c strh r8, [r5, 8] | var_8h = r8;
0x00014e30 strh r3, [r5, 0xa] | var_ah = r3;
| if (r4 != r8) {
0x00014e34 moveq r1, 0xc | r1 = 0xc;
| }
| if (r4 != r8) {
0x00014e38 beq 0x14e5c |
0x00014e3c ldr r1, [sp, 0x228] | r1 = *(s2);
0x00014e40 mov r2, r4 | r2 = r4;
0x00014e44 add r0, sp, 0x18 | r0 += s1;
0x00014e48 bl 0x124a8 | memcpy (r0, r1, r2);
0x00014e4c add r1, r4, 0xc | r1 = r4 + 0xc;
| label_0:
0x00014e50 tst r1, 3 |
0x00014e54 sub r4, r1, 0xc | r4 = r1 - 0xc;
| if ((r1 & 3) != 0) {
0x00014e58 bne 0x14e80 | goto label_6;
| }
| }
0x00014e5c cmp r6, 0 |
| if (r6 != 0) {
0x00014e60 bne 0x14ee0 | goto label_7;
| }
0x00014e64 ldr r3, [pc, 0x134] |
0x00014e68 ldr r3, [r3, 0x24] | r3 = *(0x14fc0);
0x00014e6c cmp r3, 0 |
| if (r3 != 0) {
0x00014e70 bne 0x14ee0 | goto label_7;
| }
| label_4:
0x00014e74 mov r0, r5 | r0 = r5;
0x00014e78 bl 0x14878 | fcn_00014878 (r0, r1);
0x00014e7c b 0x14dc4 |
| } while (1);
| label_6:
0x00014e80 strb r8, [r5, r1] | *((r5 + r1)) = r8;
0x00014e84 add r1, r1, 1 | r1++;
0x00014e88 b 0x14e50 | goto label_0;
| do {
0x00014e8c add r3, r4, r6 | r3 = r4 + r6;
0x00014e90 add r3, r5, r3 | r3 = r5 + r3;
0x00014e94 add r6, r6, 1 | r6++;
0x00014e98 strb r2, [r3, 0xc] | s1 = r2;
| label_2:
0x00014e9c tst r6, 7 |
0x00014ea0 bne 0x14e8c |
| } while ((r6 & 7) != 0);
0x00014ea4 ldr r4, [pc, 0xf4] | r4 = *(0x14f9c);
0x00014ea8 ldr r3, [r4, 0x20] | r3 = *(0x14fbc);
0x00014eac cmp r3, 0 |
| if (r3 != 0) {
0x00014eb0 bne 0x14ef0 | goto label_8;
| }
0x00014eb4 bl 0x14c94 | fcn_00014c94 ();
0x00014eb8 ldr r3, [pc, 0xe4] | r3 = *(0x14fa0);
0x00014ebc sub r2, r0, 1 | r2 = r0 - 1;
0x00014ec0 cmp r2, r3 |
| if (r2 > r3) {
0x00014ec4 strls r0, [r4, 0x20] | *((r4 + 0x20)) = r0;
| }
| if (r2 < r3) {
0x00014ec8 bls 0x14ef0 | goto label_8;
| }
0x00014ecc ldr r3, [pc, 0xbc] | r3 = *(0x14f8c);
0x00014ed0 ldr r0, [pc, 0xd0] | r0 = *(0x14fa4);
0x00014ed4 ldr r1, [r3] | r1 = *(0x14f8c);
| do {
| label_3:
0x00014ed8 bl 0x12874 | fputs (r0, r1);
0x00014edc b 0x14dc0 | goto label_1;
| label_7:
0x00014ee0 mov r6, r1 | r6 = r1;
0x00014ee4 sub r4, r4, r1 | r4 -= r1;
0x00014ee8 mov r2, 0 | r2 = 0;
0x00014eec b 0x14e9c | goto label_2;
| label_8:
0x00014ef0 ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x00014ef4 bl 0x2a010 | r0 = fcn_0002a010 (r0);
0x00014ef8 cmp r0, 0 |
| if (r0 != 0) {
0x00014efc bne 0x14f3c | goto label_9;
| }
0x00014f00 ldr r0, [r7] | r0 = *(r7);
0x00014f04 bl 0x2f0c8 | r0 = fcn_0002f0c8 (r0);
0x00014f08 ldrb r3, [r0] | r3 = *(r0);
0x00014f0c mov r2, r0 | r2 = r0;
0x00014f10 cmp r3, 0 |
| if (r3 != 0) {
0x00014f14 ldreq r3, [pc, 0x74] | r3 = obj.stderr;
| }
| if (r3 != 0) {
0x00014f18 ldreq r0, [pc, 0x8c] | r0 = "Invalid password\n";
| }
| if (r3 != 0) {
0x00014f1c ldreq r1, [r3] | r1 = *(r3);
| }
0x00014f20 beq 0x14ed8 |
| } while (r3 == 0);
0x00014f24 ldr r1, [r7] | r1 = *(r7);
0x00014f28 ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x00014f2c bl 0x2a42c | fcn_0002a42c (r0, r1);
0x00014f30 mov r1, 1 | r1 = 1;
0x00014f34 ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x00014f38 bl 0x29f5c | fcn_00029f5c (r0);
| label_9:
0x00014f3c mov r2, r6 | r2 = r6;
0x00014f40 mov r1, r5 | r1 = r5;
0x00014f44 ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x00014f48 bl 0x2a328 | r0 = fcn_0002a328 (r0, r1);
0x00014f4c subs r2, r0, 0 | r2 = r0 - 0;
| if (r2 != r0) {
0x00014f50 ldreq r3, [pc, 0x38] | r3 = obj.stderr;
| }
| if (r2 != r0) {
0x00014f54 ldreq r0, [pc, 0x54] | r0 = "Key not found\n";
| }
| if (r2 == r0) {
0x00014f58 ldreq r1, [r3] | r1 = *(r3);
| goto label_10;
| }
| if (r2 == r0) {
| label_10:
0x00014f5c beq 0x14ed8 | goto label_3;
| }
0x00014f60 ldr r1, [r7, 4] | r1 = *((r7 + 4));
0x00014f64 add r3, r1, 4 | r3 = r1 + 4;
0x00014f68 cmp r3, r2 |
| if (r3 != r2) {
0x00014f6c beq 0x14f88 |
0x00014f70 ldr r0, [pc, 0x18] |
0x00014f74 str r1, [sp] | *(sp) = r1;
0x00014f78 ldr r1, [pc, 0x34] | r1 = "Key not found\n";
0x00014f7c ldr r0, [r0] | r0 = *(0x14f8c);
0x00014f80 bl 0x12910 | fprintf (r0, r1)
0x00014f84 b 0x14dc0 | goto label_1;
| }
0x00014f88 add r1, r6, r3 | r1 = r6 + r3;
0x00014f8c b 0x14e74 | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x151f8 */
| #include <stdint.h>
|
; (fcn) fcn.000151f8 () | void fcn_000151f8 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000151f8 ldr r3, [pc, 0x11c] |
0x000151fc push {r4, r5, r6, lr} |
0x00015200 ldr r3, [r3] | r3 = *(0x15318);
0x00015204 mov r4, r0 | r4 = r0;
0x00015208 cmp r3, 1 |
0x0001520c mov r6, r1 | r6 = r1;
0x00015210 ldr r5, [pc, 0x108] | r5 = *(0x1531c);
| if (r3 >= 1) {
0x00015214 bls 0x15228 |
0x00015218 ldr r2, [pc, 0x104] | r2 = stderr;
0x0001521c ldr r1, [pc, 0x104] | r1 = *(0x15324);
0x00015220 ldr r0, [r5] | r0 = *(r5);
0x00015224 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x00015228 cmp r4, 5 |
0x0001522c ldr r0, [r5] | r0 = *(r5);
| if (r4 == 5) {
0x00015230 beq 0x152ec | goto label_2;
| }
| if (r4 > 5) {
0x00015234 bgt 0x15280 | goto label_3;
| }
0x00015238 cmp r4, 2 |
| if (r4 == 2) {
0x0001523c beq 0x152d4 | goto label_4;
| }
| if (r4 > 2) {
0x00015240 bgt 0x15260 | goto label_5;
| }
0x00015244 cmp r4, 1 |
| if (r4 != 1) {
0x00015248 moveq r1, r0 | r1 = r0;
| }
| if (r4 != 1) {
0x0001524c ldreq r0, [pc, 0xd8] | r0 = "***Server disallowed request (authentication?)\n";
| }
| if (r4 == 1) {
0x00015250 beq 0x152a8 | goto label_1;
| }
| do {
| label_0:
0x00015254 mov r2, r4 | r2 = r4;
0x00015258 ldr r1, [pc, 0xd0] | r1 = "***Server disallowed request (authentication?)\n";
0x0001525c b 0x15278 | goto label_6;
| label_5:
0x00015260 cmp r4, 3 |
| if (r4 == 3) {
0x00015264 beq 0x152e0 | goto label_7;
| }
0x00015268 cmp r4, 4 |
| if (r4 != 4) {
0x0001526c moveq r2, r6 | r2 = r6;
| }
| if (r4 != 4) {
0x00015270 ldreq r1, [pc, 0xbc] | r1 = "***Association ID %d unknown to server\n";
| }
0x00015274 bne 0x15254 |
| } while (r4 != 4);
| label_6:
0x00015278 pop {r4, r5, r6, lr} |
0x0001527c b 0x12910 | void (*0x12910)() ();
| label_3:
0x00015280 ldr r3, [pc, 0xb0] | r3 = "***Association ID %d unknown to server\n";
0x00015284 cmp r4, r3 |
| if (r4 == r3) {
0x00015288 beq 0x15310 | goto label_8;
| }
| if (r4 > r3) {
0x0001528c bgt 0x152b0 | goto label_9;
| }
0x00015290 cmp r4, 6 |
| if (r4 == 6) {
0x00015294 beq 0x152f8 | goto label_10;
| }
0x00015298 cmp r4, 0x100 |
| if (r4 != 0x100) {
0x0001529c moveq r1, r0 | r1 = r0;
| }
| if (r4 == 0x100) {
0x000152a0 ldreq r0, [pc, 0x94] | r0 = "***Server returned an unspecified error\n";
| goto label_11;
| }
| if (r4 != 0x100) {
| label_11:
0x000152a4 bne 0x15254 | goto label_0;
| }
| do {
| label_1:
0x000152a8 pop {r4, r5, r6, lr} |
0x000152ac b 0x12874 | void (*0x12874)() ();
| label_9:
0x000152b0 ldr r3, [pc, 0x88] | r3 = "***Server returned an unspecified error\n";
0x000152b4 cmp r4, r3 |
| if (r4 == r3) {
0x000152b8 beq 0x15304 | goto label_12;
| }
0x000152bc add r3, r3, 1 | r3++;
0x000152c0 cmp r4, r3 |
| if (r4 != r3) {
0x000152c4 moveq r1, r0 | r1 = r0;
| }
| if (r4 != r3) {
0x000152c8 ldreq r0, [pc, 0x74] | r0 = "***Buffer size exceeded for returned data\n";
| }
0x000152cc beq 0x152a8 |
| } while (r4 == r3);
0x000152d0 b 0x15254 | goto label_0;
| label_4:
0x000152d4 mov r1, r0 | r1 = r0;
0x000152d8 ldr r0, [pc, 0x68] | r0 = "***Buffer size exceeded for returned data\n";
0x000152dc b 0x152a8 | goto label_1;
| label_7:
0x000152e0 mov r1, r0 | r1 = r0;
0x000152e4 ldr r0, [pc, 0x60] | r0 = "***Server reports a bad format request packet\n";
0x000152e8 b 0x152a8 | goto label_1;
| label_2:
0x000152ec mov r1, r0 | r1 = r0;
0x000152f0 ldr r0, [pc, 0x58] | r0 = "_Server_reports_a_bad_opcode_in_request";
0x000152f4 b 0x152a8 | goto label_1;
| label_10:
0x000152f8 mov r1, r0 | r1 = r0;
0x000152fc ldr r0, [pc, 0x50] | r0 = "***A request variable unknown to the server\n";
0x00015300 b 0x152a8 | goto label_1;
| label_12:
0x00015304 mov r1, r0 | r1 = r0;
0x00015308 ldr r0, [pc, 0x48] | r0 = "_Server_indicates_a_request_variable_was_bad";
0x0001530c b 0x152a8 | goto label_1;
| label_8:
0x00015310 mov r1, r0 | r1 = r0;
0x00015314 ldr r0, [pc, 0x40] | r0 = "***Request timed out\n";
0x00015318 b 0x152a8 | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x154b0 */
| #include <stdint.h>
|
; (fcn) fcn.000154b0 () | void fcn_000154b0 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_14h;
| void * s;
| int32_t var_38h;
| r0 = arg1;
| r1 = arg2;
0x000154b0 push {r4, r5, r6, r7, r8, lr} |
0x000154b4 mov r6, 0 | r6 = 0;
0x000154b8 sub sp, sp, 0x38 |
0x000154bc mov r8, r0 | r8 = r0;
0x000154c0 mov r4, r1 | r4 = r1;
0x000154c4 mov r5, r2 | r5 = r2;
0x000154c8 mov r1, r6 | r1 = r6;
0x000154cc mov r2, 0x20 | r2 = 0x20;
0x000154d0 add r0, sp, 0x18 | r0 += s;
0x000154d4 str r6, [sp, 0x14] | var_14h = r6;
0x000154d8 bl 0x128b0 | memset (r0, r1, r2);
0x000154dc mov r3, 0x22 | r3 = 0x22;
0x000154e0 mov r1, r4 | r1 = r4;
0x000154e4 mov r0, r8 | r0 = r8;
0x000154e8 str r3, [sp, 0x18] | s = r3;
0x000154ec bl 0x2a5a8 | r0 = fcn_0002a5a8 (r0, r1);
0x000154f0 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x000154f4 beq 0x15534 | goto label_1;
| }
0x000154f8 cmp r5, r6 |
| if (r5 == r6) {
0x000154fc beq 0x1552c | goto label_2;
| }
0x00015500 ldrh r3, [r4] | r3 = *(r4);
0x00015504 str r6, [sp, 8] | var_8h = r6;
0x00015508 cmp r3, 2 |
0x0001550c str r6, [sp, 4] | var_4h = r6;
0x00015510 str r6, [sp] | *(sp) = r6;
0x00015514 mov r3, 0x100 | r3 = 0x100;
0x00015518 mov r2, r5 | r2 = r5;
| if (r3 != 2) {
0x0001551c moveq r1, 0x10 | r1 = 0x10;
| }
| if (r3 == 2) {
0x00015520 movne r1, 0x1c | r1 = 0x1c;
| }
0x00015524 mov r0, r4 | r0 = r4;
0x00015528 bl 0x1255c | getnameinfo ();
| do {
| label_2:
0x0001552c mov r7, 1 | r7 = 1;
0x00015530 b 0x155f0 | goto label_3;
| label_1:
0x00015534 add r3, sp, 0x14 | r3 += var_14h;
0x00015538 add r2, sp, 0x18 | r2 += s;
0x0001553c ldr r1, [pc, 0xb8] | r1 = *(0x155f8);
0x00015540 mov r0, r8 | r0 = r8;
0x00015544 bl 0x12b08 | r0 = getaddrinfo ();
0x00015548 cmp r0, 0 |
| if (r0 != 0) {
0x0001554c bne 0x155dc | goto label_4;
| }
0x00015550 ldr r6, [sp, 0x14] | r6 = var_14h;
0x00015554 ldr r2, [r6, 0x10] | r2 = *((r6 + 0x10));
0x00015558 cmp r2, 0x1c |
| if (r2 >= 0x1c) {
0x0001555c bls 0x15574 |
0x00015560 ldr r3, [pc, 0x98] | r3 = "ntp";
0x00015564 mov r2, 2 | r2 = 2;
0x00015568 ldr r1, [pc, 0x94] | r1 = "sizeof_num____ai__ai_addrlen";
0x0001556c ldr r0, [pc, 0x94] | r0 = *(0x15604);
0x00015570 bl 0x2f7d0 | fcn_0002f7d0 ();
| }
0x00015574 ldr r1, [r6, 0x14] | r1 = *((r6 + 0x14));
0x00015578 mov r0, r4 | r0 = r4;
0x0001557c bl 0x124a8 | memcpy (r0, r1, r2);
0x00015580 cmp r5, 0 |
| if (r5 != 0) {
0x00015584 beq 0x155a0 |
0x00015588 ldr r1, [r6, 0x18] | r1 = *((r6 + 0x18));
0x0001558c cmp r1, 0 |
| if (r1 == 0) {
0x00015590 beq 0x155ac | goto label_5;
| }
0x00015594 mov r2, 0x100 | r2 = 0x100;
0x00015598 mov r0, r5 | r0 = r5;
0x0001559c bl 0x1246c | strlcpy (r0, r1, r2);
| }
| label_0:
0x000155a0 ldr r0, [sp, 0x14] | r0 = var_14h;
0x000155a4 bl 0x12568 | freeaddrinfo ();
0x000155a8 b 0x1552c |
| } while (1);
| label_5:
0x000155ac ldrh r3, [r4] | r3 = *(r4);
0x000155b0 str r1, [sp, 8] | var_8h = r1;
0x000155b4 cmp r3, 2 |
0x000155b8 str r1, [sp, 4] | var_4h = r1;
0x000155bc str r1, [sp] | *(sp) = r1;
0x000155c0 mov r3, 0x100 | r3 = 0x100;
0x000155c4 mov r2, r5 | r2 = r5;
| if (r3 != 2) {
0x000155c8 moveq r1, 0x10 | r1 = 0x10;
| }
| if (r3 == 2) {
0x000155cc movne r1, 0x1c | r1 = 0x1c;
| }
0x000155d0 mov r0, r4 | r0 = r4;
0x000155d4 bl 0x1255c | getnameinfo ();
0x000155d8 b 0x155a0 | goto label_0;
| label_4:
0x000155dc ldr r3, [pc, 0x28] | r3 = "ntpq.c";
0x000155e0 mov r2, r8 | r2 = r8;
0x000155e4 ldr r1, [pc, 0x24] | r1 = stderr;
0x000155e8 ldr r0, [r3] | r0 = "ntpq.c";
0x000155ec bl 0x12910 | fprintf ("ntpq.c", r1, r2, "ntpq.c")
| label_3:
0x000155f0 mov r0, r7 | r0 = r7;
0x000155f4 add sp, sp, 0x38 |
0x000155f8 pop {r4, r5, r6, r7, r8, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x15614 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00015614 () | void fcn_00015614 (int32_t arg1) {
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_94h;
| int32_t var_28h;
| int32_t var_74h;
| int32_t var_9ch;
| int32_t var_a0h;
| int32_t var_0h;
| r0 = arg1;
0x00015614 ldr ip, [pc, 0x5b0] | ip = *(0x00015bcc);
0x00015618 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0001561c ldr r7, [pc, 0x5ac] | r7 = *(0x15bcc);
0x00015620 ldr r5, [pc, 0x5ac] | r5 = *(0x15bd0);
0x00015624 ldr sb, [pc, 0x5ac] | sb = *(0x00015bd8);
0x00015628 sub sp, sp, 0xa0 |
0x0001562c mov r6, 0 | r6 = 0;
0x00015630 mov r2, r0 | r2 = r0;
0x00015634 mov lr, r0 | lr = r0;
0x00015638 add r8, sp, 0xc | r8 += var_ch;
0x0001563c mov r4, ip | r4 = ip;
0x00015640 mov r0, r6 | r0 = r6;
| label_1:
0x00015644 str ip, [r8, r6, lsl 2] | offset_0 = r6 << 2;
| *((r8 + offset_0)) = ip;
| do {
0x00015648 mov r3, lr | r3 = lr;
0x0001564c ldrb r1, [lr], 1 | r1 = *(lr);
| lr++;
0x00015650 cmp r1, 9 |
0x00015654 cmpne r1, 0x20 | __asm ("cmpne r1, 0x20");
0x00015658 beq 0x15648 |
| } while (r1 == 9);
0x0001565c cmp r1, 0xd |
| if (r1 <= 0xd) {
0x00015660 bhi 0x15670 |
0x00015664 mvn lr, r7, lsr r1 | lr = ~r7;
0x00015668 tst lr, 1 |
| if ((lr & 1) == 0) {
0x0001566c beq 0x157c0 | goto label_12;
| }
| }
0x00015670 cmp r6, 1 |
| if (r6 == 1) {
0x00015674 bne 0x1568c |
0x00015678 ldr lr, [sp, 0xc] | lr = var_ch;
0x0001567c ldrb lr, [lr] |
0x00015680 cmp lr, 0x3a |
| if (lr != 0x3a) {
0x00015684 addeq r3, r3, 1 | r3++;
| }
| if (lr == 0x3a) {
0x00015688 beq 0x156e8 | goto label_13;
| }
| }
0x0001568c cmp r1, 0x22 |
| if (r1 != 0x22) {
0x00015690 addeq r3, r3, 2 | r3 += 2;
| }
| if (r1 == 0x22) {
0x00015694 beq 0x1576c | goto label_14;
| }
0x00015698 add r3, r3, 1 | r3++;
0x0001569c mov r1, ip | r1 = ip;
| do {
0x000156a0 sub ip, r1, r4 |
0x000156a4 cmp ip, r5 |
| if (ip > r5) {
0x000156a8 bgt 0x157ac | goto label_15;
| }
0x000156ac ldrb ip, [r3, -1] | ip = *((r3 - 1));
0x000156b0 mov lr, r3 | lr = r3;
0x000156b4 strb ip, [r1], 1 | *(r1) = ip;
| r1++;
0x000156b8 ldrb sl, [r3], 1 | sl = *(r3);
| r3++;
0x000156bc sub ip, sl, 9 |
0x000156c0 and ip, ip, 0xff |
0x000156c4 cmp ip, 0x19 |
| if (ip <= 0x19) {
0x000156c8 bhi 0x156d8 |
0x000156cc mvn ip, sb, lsr ip |
0x000156d0 tst ip, 1 |
| if ((ip & 1) == 0) {
0x000156d4 beq 0x1571c | goto label_2;
| }
| }
0x000156d8 tst sl, 0xdf |
0x000156dc bne 0x156a0 |
| } while ((sl & 0xdf) != 0);
0x000156e0 b 0x1571c | goto label_2;
| do {
| label_0:
0x000156e4 mov ip, r1 |
| label_13:
0x000156e8 sub r1, ip, r4 | r1 = ip - r4;
0x000156ec cmp r1, r5 |
| if (r1 > r5) {
0x000156f0 bgt 0x157ac | goto label_15;
| }
0x000156f4 mov r1, ip | r1 = ip;
0x000156f8 ldrb ip, [r3, -1] | ip = *((r3 - 1));
0x000156fc mov lr, r3 | lr = r3;
0x00015700 strb ip, [r1], 1 | *(r1) = ip;
| r1++;
0x00015704 ldrb ip, [r3], 1 | ip = *(r3);
| r3++;
0x00015708 cmp ip, 0xd |
0x0001570c bhi 0x156e4 |
| } while (ip > 0xd);
0x00015710 mvn ip, r7, lsr ip |
0x00015714 tst ip, 1 |
| if ((ip & 1) != 0) {
0x00015718 bne 0x156e4 | goto label_0;
| }
| label_2:
0x0001571c sub r3, r1, r4 | r3 = r1 - r4;
0x00015720 cmp r3, r5 |
| if (r3 > r5) {
0x00015724 bgt 0x157ac | goto label_15;
| }
0x00015728 add r6, r6, 1 | r6++;
0x0001572c cmp r6, 7 |
0x00015730 add ip, r1, 1 |
0x00015734 strb r0, [r1] | *(r1) = r0;
| if (r6 != 7) {
0x00015738 bne 0x15644 | goto label_1;
| }
| label_4:
0x0001573c ldr r5, [sp, 0xc] | r5 = var_ch;
0x00015740 add r1, sp, 4 | r1 += var_4h;
0x00015744 mov r0, r5 | r0 = r5;
0x00015748 bl 0x149e0 | fcn_000149e0 (r0, r1);
0x0001574c ldr r3, [pc, 0x488] | r3 = *(0x15bd8);
0x00015750 cmp r0, 0 |
0x00015754 str r0, [r3, 0x340] | *((r3 + 0x340)) = r0;
| if (r0 != 0) {
0x00015758 bne 0x157d0 | goto label_16;
| }
0x0001575c mov r2, r5 | r2 = r5;
0x00015760 ldr r1, [pc, 0x478] | r1 = *(0x15bdc);
0x00015764 b 0x157b0 | goto label_5;
| label_3:
0x00015768 mov ip, r1 |
| label_14:
0x0001576c sub r1, ip, r4 | r1 = ip - r4;
0x00015770 cmp r1, r5 |
| if (r1 > r5) {
0x00015774 bgt 0x157ac | goto label_15;
| }
0x00015778 mov r1, ip | r1 = ip;
0x0001577c ldrb ip, [r3, -1] | ip = *((r3 - 1));
0x00015780 mov lr, r3 | lr = r3;
0x00015784 strb ip, [r1], 1 | *(r1) = ip;
| r1++;
0x00015788 ldrb ip, [r3], 1 | ip = *(r3);
| r3++;
0x0001578c cmp ip, 0x22 |
| if (ip == 0x22) {
0x00015790 beq 0x1571c | goto label_2;
| }
0x00015794 cmp ip, 0xd |
| if (ip > 0xd) {
0x00015798 bhi 0x15768 | goto label_3;
| }
0x0001579c mvn ip, r7, lsr ip |
0x000157a0 tst ip, 1 |
| if ((ip & 1) != 0) {
0x000157a4 bne 0x15768 | goto label_3;
| }
0x000157a8 b 0x1571c | goto label_2;
| label_15:
0x000157ac ldr r1, [pc, 0x430] | r1 = "***Command `%s' unknown\n";
| label_5:
0x000157b0 ldr r3, [pc, 0x430] | r3 = "_Line___s_is_too_big";
0x000157b4 ldr r0, [r3] | r0 = "_Line___s_is_too_big";
0x000157b8 bl 0x12910 | fprintf ("_Line___s_is_too_big", "***Command `%s' unknown\n", r2, "_Line___s_is_too_big")
0x000157bc b 0x157c8 | goto label_7;
| label_12:
0x000157c0 cmp r6, 0 |
| if (r6 != 0) {
0x000157c4 bne 0x1573c | goto label_4;
| }
| label_7:
0x000157c8 add sp, sp, 0xa0 |
0x000157cc pop {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_16:
0x000157d0 cmp r0, 1 |
| if (r0 <= 1) {
0x000157d4 movgt r2, r5 | r2 = r5;
| }
| if (r0 > 1) {
0x000157d8 ldrgt r1, [pc, 0x40c] | r1 = "***Command `%s' ambiguous\n";
| goto label_17;
| }
| if (r0 > 1) {
| label_17:
0x000157dc bgt 0x157b0 | goto label_5;
| }
0x000157e0 ldr r7, [pc, 0x408] | r7 = "***Command `%s' ambiguous\n";
0x000157e4 ldr r8, [pc, 0x3fc] | r8 = "_Line___s_is_too_big";
0x000157e8 mov r2, 5 | r2 = 5;
0x000157ec mov r4, r3 | r4 = r3;
0x000157f0 str r2, [r3, 0x340] | *((r3 + 0x340)) = r2;
| do {
0x000157f4 ldr r3, [r4, 0x340] | r3 = *((r4 + 0x340));
0x000157f8 cmp r3, r6 |
| if (r3 >= r6) {
0x000157fc blt 0x158a0 |
0x00015800 ldr r7, [pc, 0x3d4] | r7 = *(0x15bd8);
0x00015804 ldr r8, [pc, 0x3e8] | r8 = "***Extra arg `%s' ignored\n";
0x00015808 ldr sb, [pc, 0x3e8] | sb = "_4";
0x0001580c mov r3, 0 | r3 = 0;
0x00015810 str r5, [sp, 0x28] | var_28h = r5;
0x00015814 str r3, [sp, 0x9c] | var_9ch = r3;
0x00015818 str r3, [r4, 0x340] | *((r4 + 0x340)) = r3;
| label_8:
0x0001581c ldr r4, [r7, 0x340] | r4 = *((r7 + 0x340));
0x00015820 cmp r4, 3 |
0x00015824 add r3, r4, 1 | r3 = r4 + 1;
| if (r4 <= 3) {
0x00015828 bgt 0x15840 |
0x0001582c ldr r0, [sp, 4] | r0 = var_4h;
0x00015830 add r2, r0, r4 | r2 = r0 + r4;
0x00015834 ldrb ip, [r2, 8] | ip = *((r2 + 8));
0x00015838 cmp ip, 0 |
| if (ip != 0) {
0x0001583c bne 0x158c8 | goto label_18;
| }
| }
| label_6:
0x00015840 ldr r2, [pc, 0x394] | r2 = *(0x15bd8);
0x00015844 cmp r3, r6 |
0x00015848 str r3, [r2, 0x340] | *((r2 + 0x340)) = r3;
| if (r3 >= r6) {
0x0001584c bge 0x15b04 | goto label_19;
| }
0x00015850 add r2, sp, 0xa0 | r2 += var_a0h;
0x00015854 add r3, r2, r3, lsl 2 | r3 = r2 + (r3 << 2);
0x00015858 ldr r2, [r3, -0x94] | r2 = var_94h;
0x0001585c ldrb r3, [r2] | r3 = *(r2);
0x00015860 cmp r3, 0x3e |
| if (r3 != 0x3e) {
0x00015864 bne 0x15b04 | goto label_19;
| }
0x00015868 ldrb r3, [r2, 1] | r3 = *((r2 + 1));
0x0001586c cmp r3, 0 |
| if (r3 == 0) {
0x00015870 addne r4, r2, 1 | r4 = r2 + 1;
| }
| if (r3 != 0) {
0x00015874 bne 0x15ac8 | goto label_20;
| }
0x00015878 add r3, r4, 2 | r3 = r4 + 2;
0x0001587c cmp r3, r6 |
| if (r3 >= r6) {
0x00015880 addlt r2, sp, 0xa0 | r2 += var_a0h;
| }
| if (r3 >= r6) {
0x00015884 addlt r3, r2, r3, lsl 2 | r3 = r2 + (r3 << 2);
| }
| if (r3 >= r6) {
0x00015888 ldrlt r4, [r3, -0x94] | r4 = *((r3 - 0x94));
| }
| if (r3 < r6) {
0x0001588c blt 0x15ac8 | goto label_20;
| }
0x00015890 ldr r3, [pc, 0x350] | r3 = "_Line___s_is_too_big";
0x00015894 ldr r0, [pc, 0x360] | r0 = "_4";
0x00015898 ldr r1, [r3] | r1 = "_Line___s_is_too_big";
0x0001589c b 0x15ac0 | goto label_21;
| }
0x000158a0 add r2, sp, 0xa0 | r2 += var_a0h;
0x000158a4 add r3, r2, r3, lsl 2 | r3 = r2 + (r3 << 2);
0x000158a8 ldr r2, [r3, -0x94] | r2 = var_ch;
0x000158ac mov r1, r7 | r1 = r7;
0x000158b0 ldr r0, [r8] | r0 = *(r8);
0x000158b4 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x000158b8 ldr r3, [r4, 0x340] | r3 = *((r4 + 0x340));
0x000158bc add r3, r3, 1 | r3++;
0x000158c0 str r3, [r4, 0x340] | *((r4 + 0x340)) = r3;
0x000158c4 b 0x157f4 |
| } while (1);
| label_18:
0x000158c8 lsl r2, ip, 0x18 | r2 = ip << 0x18;
0x000158cc cmp r3, r6 |
0x000158d0 asr r2, r2, 0x18 | r2 >>= 0x18;
| if (r3 < r6) {
0x000158d4 blt 0x158f0 | goto label_22;
| }
0x000158d8 cmp r2, 0 |
| if (r2 < 0) {
0x000158dc blt 0x15840 | goto label_6;
| }
0x000158e0 ldr r3, [pc, 0x300] | r3 = "_Line___s_is_too_big";
0x000158e4 ldr r1, [r3] | r1 = "_Line___s_is_too_big";
0x000158e8 bl 0x135f8 | fcn_000135f8 (r0, "_Line___s_is_too_big");
0x000158ec b 0x157c8 | goto label_7;
| label_22:
0x000158f0 add r1, sp, 0xa0 | r1 += var_a0h;
0x000158f4 add r1, r1, r3, lsl 2 | r1 += (r3 << 2);
0x000158f8 cmp r2, 0 |
0x000158fc ldr r5, [r1, -0x94] | r5 = var_94h;
| if (r2 >= 0) {
0x00015900 bge 0x15910 | goto label_23;
| }
0x00015904 ldrb r2, [r5] | r2 = *(r5);
0x00015908 cmp r2, 0x3e |
| if (r2 == 0x3e) {
0x0001590c beq 0x15840 | goto label_6;
| }
| label_23:
0x00015910 mov r1, 0x1c | r1 = 0x1c;
0x00015914 add r3, sp, 0xa0 | r3 += var_a0h;
0x00015918 mla r3, r1, r4, r3 | __asm ("mla r3, r1, r4, r3");
0x0001591c sub r1, r3, 0x74 | r1 -= var_74h;
0x00015920 bic r3, ip, 0x80 | r3 = BIT_MASK (ip, 0x80);
0x00015924 sub r3, r3, 1 | r3--;
0x00015928 cmp r3, 4 |
| if (r3 > 4) {
| /* switch table (5 cases) at 0x15934 */
0x0001592c ldrls pc, [pc, r3, lsl 2] | offset_1 = r3 << 2;
| pc = *((pc + offset_1));
| }
0x00015930 b 0x15958 | goto label_9;
0x00015948 mov r3, 0x1c | r3 = 0x1c;
0x0001594c add r2, sp, 0xa0 | r2 += var_a0h;
0x00015950 mla r2, r3, r4, r2 | __asm ("mla r2, r3, r4, r2");
0x00015954 str r5, [r2, -0x74] | var_74h = r5;
| do {
| label_9:
0x00015958 ldr r3, [sp, 0x9c] | r3 = var_9ch;
0x0001595c add r3, r3, 1 | r3++;
0x00015960 str r3, [sp, 0x9c] | var_9ch = r3;
0x00015964 ldr r3, [r7, 0x340] | r3 = *((r7 + 0x340));
0x00015968 add r3, r3, 1 | r3++;
0x0001596c str r3, [r7, 0x340] | *((r7 + 0x340)) = r3;
0x00015970 b 0x1581c | goto label_8;
0x00015974 mov r3, 0 | r3 = 0;
0x00015978 mov r2, r3 | r2 = r3;
0x0001597c mov r0, r5 | r0 = r5;
0x00015980 bl 0x154b0 | r0 = fcn_000154b0 (r0, r1);
0x00015984 cmp r0, 0 |
0x00015988 bne 0x15958 |
| } while (r0 != 0);
0x0001598c b 0x157c8 | goto label_7;
0x00015990 ldrb r3, [r5] | r3 = *(r5);
0x00015994 cmp r3, 0x26 |
| if (r3 != 0x26) {
0x00015998 bne 0x15a24 | goto label_24;
| }
0x0001599c add r1, sp, 8 | r1 += var_8h;
0x000159a0 add r0, r5, 1 | r0 = r5 + 1;
0x000159a4 bl 0x2973c | r0 = fcn_0002973c (r0, r1);
0x000159a8 cmp r0, 0 |
| if (r0 != 0) {
0x000159ac moveq r2, r5 | r2 = r5;
| }
| if (r0 == 0) {
0x000159b0 ldreq r1, [pc, 0x248] | r1 = "***Association index `%s' invalid/undecodable\n";
| goto label_25;
| }
| if (r0 == 0) {
| label_25:
0x000159b4 beq 0x157b0 | goto label_5;
| }
0x000159b8 ldr sl, [pc, 0x244] | sl = *(0x00015c04);
0x000159bc ldr r3, [sl] | r3 = *(sl);
0x000159c0 cmp r3, 0 |
| if (r3 != 0) {
0x000159c4 bne 0x159e8 | goto label_26;
| }
0x000159c8 ldr r3, [pc, 0x238] | r3 = *(0x15c04);
0x000159cc ldr r0, [r3] | r0 = *(0x15c04);
0x000159d0 bl 0x1c138 | fcn_0001c138 (r0);
0x000159d4 ldr r3, [sl] | r3 = *(sl);
0x000159d8 cmp r3, 0 |
| if (r3 != 0) {
0x000159dc moveq r2, r5 | r2 = r5;
| }
| if (r3 == 0) {
0x000159e0 ldreq r1, [pc, 0x224] | r1 = "***No associations found, `%s' unknown\n";
| goto label_27;
| }
| if (r3 == 0) {
| label_27:
0x000159e4 beq 0x157b0 | goto label_5;
| }
| label_26:
0x000159e8 mov r3, 0x1c | r3 = 0x1c;
0x000159ec add r2, sp, 0xa0 | r2 += var_a0h;
0x000159f0 mla r2, r3, r4, r2 | __asm ("mla r2, r3, r4, r2");
0x000159f4 ldr r1, [sp, 8] | r1 = var_8h;
0x000159f8 mov r3, r2 | r3 = r2;
0x000159fc ldr r2, [pc, 0x200] |
0x00015a00 ldr r2, [r2] | r2 = "***Association index `%s' invalid/undecodable\n";
0x00015a04 cmp r2, r1 |
| if (r2 < r1) {
0x00015a08 movhs r2, r1 | r2 = r1;
| }
0x00015a0c ldr r1, [pc, 0x1fc] |
0x00015a10 ldr r1, [r1] | r1 = "***No associations found, `%s' unknown\n";
0x00015a14 add r2, r1, r2, lsl 2 | r2 = r1 + (r2 << 2);
0x00015a18 ldrh r2, [r2, -4] | r2 = *((r2 - 4));
| label_10:
0x00015a1c str r2, [r3, -0x74] | var_74h = r2;
0x00015a20 b 0x15958 | goto label_9;
| label_24:
0x00015a24 mov r0, r5 | r0 = r5;
0x00015a28 bl 0x2973c | r0 = fcn_0002973c (r0, r1);
0x00015a2c cmp r0, 0 |
| if (r0 != 0) {
0x00015a30 bne 0x15958 | goto label_9;
| }
0x00015a34 mov r2, r5 | r2 = r5;
0x00015a38 ldr r1, [pc, 0x1d4] | r1 = *(0x15c10);
0x00015a3c b 0x157b0 | goto label_5;
0x00015a40 mov r0, r5 | r0 = r5;
0x00015a44 bl 0x29490 | r0 = fcn_00029490 (r0, r1);
0x00015a48 cmp r0, 0 |
| if (r0 != 0) {
0x00015a4c bne 0x15958 | goto label_9;
| }
0x00015a50 mov r2, r5 | r2 = r5;
0x00015a54 ldr r1, [pc, 0x1bc] | r1 = "***Illegal unsigned value %s\n";
0x00015a58 b 0x157b0 | goto label_5;
0x00015a5c mov r1, r5 | r1 = r5;
0x00015a60 mov r0, r8 | r0 = r8;
0x00015a64 bl 0x12a24 | r0 = strcmp (r0, r1);
0x00015a68 cmp r0, 0 |
| if (r0 == 0) {
0x00015a6c bne 0x15a88 |
0x00015a70 mov r3, 0x1c | r3 = 0x1c;
0x00015a74 add r2, sp, 0xa0 | r2 += var_a0h;
0x00015a78 mla r2, r3, r4, r2 | __asm ("mla r2, r3, r4, r2");
0x00015a7c mov r3, r2 | r3 = r2;
0x00015a80 mov r2, 6 | r2 = 6;
0x00015a84 b 0x15a1c | goto label_10;
| }
0x00015a88 mov r1, r5 | r1 = r5;
0x00015a8c mov r0, sb | r0 = sb;
0x00015a90 bl 0x12a24 | r0 = strcmp (r0, r1);
0x00015a94 cmp r0, 0 |
| if (r0 == 0) {
0x00015a98 bne 0x15ab4 |
0x00015a9c mov r3, 0x1c | r3 = 0x1c;
0x00015aa0 add r2, sp, 0xa0 | r2 += var_a0h;
0x00015aa4 mla r2, r3, r4, r2 | __asm ("mla r2, r3, r4, r2");
0x00015aa8 mov r3, r2 | r3 = r2;
0x00015aac mov r2, 4 | r2 = 4;
0x00015ab0 b 0x15a1c | goto label_10;
| }
0x00015ab4 ldr r3, [pc, 0x12c] | r3 = "_Line___s_is_too_big";
0x00015ab8 ldr r0, [pc, 0x15c] | r0 = "***Illegal integer value %s\n";
0x00015abc ldr r1, [r3] | r1 = "_Line___s_is_too_big";
| label_21:
0x00015ac0 bl 0x12874 | fputs ("***Illegal integer value %s\n", "_Line___s_is_too_big");
0x00015ac4 b 0x157c8 | goto label_7;
| label_20:
0x00015ac8 ldr r1, [pc, 0x150] | r1 = "_Version_must_be_either_4_or_6";
0x00015acc mov r0, r4 | r0 = r4;
0x00015ad0 bl 0x125c8 | fopen64 ();
0x00015ad4 ldr r3, [pc, 0x100] | r3 = *(0x15bd8);
0x00015ad8 cmp r0, 0 |
0x00015adc str r0, [r3, 0x28] | *((r3 + 0x28)) = r0;
| if (r0 == 0) {
0x00015ae0 bne 0x15b14 |
0x00015ae4 ldr r3, [pc, 0xfc] | r3 = "_Line___s_is_too_big";
0x00015ae8 mov r2, r4 | r2 = r4;
0x00015aec ldr r1, [pc, 0x130] | r1 = *(0x15c20);
0x00015af0 ldr r0, [r3] | r0 = "_Line___s_is_too_big";
0x00015af4 bl 0x12910 | fprintf ("_Line___s_is_too_big", r1, r2, "_Line___s_is_too_big")
0x00015af8 ldr r0, [pc, 0x128] | r0 = "***Error opening %s: ";
0x00015afc bl 0x128c8 | perror ("***Error opening %s: ");
0x00015b00 b 0x157c8 | goto label_7;
| label_19:
0x00015b04 ldr r3, [pc, 0xfc] | r3 = *(0x15c04);
0x00015b08 ldr r2, [r3] | r2 = *(0x15c04);
0x00015b0c ldr r3, [pc, 0xc8] | r3 = *(0x15bd8);
0x00015b10 str r2, [r3, 0x28] | *((r3 + 0x28)) = r2;
| }
0x00015b14 ldr r0, [pc, 0xc0] | r0 = *(0x15bd8);
0x00015b18 ldr r3, [r0, 0x344] | r3 = *(0x15f1c);
0x00015b1c cmp r3, 0 |
| if (r3 == 0) {
0x00015b20 beq 0x15bb0 | goto label_28;
| }
0x00015b24 mov r1, 1 | r1 = 1;
0x00015b28 add r0, r0, 0x30 | r0 += 0x30;
0x00015b2c bl 0x12898 | sigsetjmp ();
0x00015b30 ldr r4, [pc, 0xa4] | r4 = *(0x15bd8);
0x00015b34 ldr r1, [r4, 0x28] | r1 = "***Association index `%s' invalid/undecodable\n";
0x00015b38 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00015b3c bne 0x15b8c | goto label_29;
| }
0x00015b40 mov r3, 1 | r3 = 1;
0x00015b44 str r3, [r4, 0x2c] | *((r4 + 0x2c)) = r3;
0x00015b48 ldr r3, [sp, 4] | r3 = var_4h;
0x00015b4c add r0, sp, 0x28 | r0 += var_28h;
0x00015b50 ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00015b54 blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x00015b58 str r5, [r4, 0x2c] | *((r4 + 0x2c)) = r5;
| label_11:
0x00015b5c ldr r4, [pc, 0x78] | r4 = *(0x15bd8);
0x00015b60 ldr r0, [r4, 0x28] | r0 = "***Association index `%s' invalid/undecodable\n";
0x00015b64 cmp r0, 0 |
| if (r0 == 0) {
0x00015b68 beq 0x157c8 | goto label_7;
| }
0x00015b6c ldr r3, [pc, 0x94] |
0x00015b70 ldr r3, [r3] | r3 = *(0x15c04);
0x00015b74 cmp r0, r3 |
| if (r0 == r3) {
0x00015b78 beq 0x157c8 | goto label_7;
| }
0x00015b7c bl 0x1276c | fclose (r0);
0x00015b80 mov r3, 0 | r3 = 0;
0x00015b84 str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
0x00015b88 b 0x157c8 | goto label_7;
| label_29:
0x00015b8c ldr r4, [pc, 0x54] | r4 = "_Line___s_is_too_big";
0x00015b90 mov r0, r1 | r0 = r1;
0x00015b94 bl 0x128a4 | fflush (r0);
0x00015b98 ldr r1, [r4] | r1 = "_Line___s_is_too_big";
0x00015b9c ldr r0, [pc, 0x88] | r0 = *(0x15c28);
0x00015ba0 bl 0x12874 | fputs (r0, "_Line___s_is_too_big");
0x00015ba4 ldr r0, [r4] | r0 = "_Line___s_is_too_big";
0x00015ba8 bl 0x128a4 | fflush ("_Line___s_is_too_big");
0x00015bac b 0x15b5c | goto label_11;
| label_28:
0x00015bb0 str r3, [r0, 0x2c] | *((r0 + 0x2c)) = r3;
0x00015bb4 ldr r3, [sp, 4] | r3 = var_4h;
0x00015bb8 ldr r1, [r0, 0x28] | r1 = *((r0 + 0x28));
0x00015bbc ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00015bc0 add r0, sp, 0x28 | r0 += var_28h;
0x00015bc4 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00015bc8 b 0x15b5c | goto label_11;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x16bd0 */
| #include <stdint.h>
|
; (fcn) fcn.00016bd0 () | void fcn_00016bd0 (int32_t arg_18h, int32_t arg_1ch, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| char * var_24h;
| char * s;
| int32_t var_2ch;
| int32_t var_30h;
| int32_t var_38h;
| int32_t var_39h;
| int32_t var_3ah;
| int32_t var_44h;
| int32_t var_48h;
| int32_t var_60h;
| int32_t var_a0h;
| int32_t var_dbh;
| int32_t var_1a0h;
| char * var_3a0h;
| int32_t var_13c0h;
| r0 = arg1;
| r1 = arg2;
| label_17:
0x00016580 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00016584 sub sp, sp, 0x1380 |
0x00016588 sub sp, sp, 0x24 |
0x0001658c mov r5, r3 | r5 = r3;
0x00016590 add r3, sp, 0x13c0 | r3 += var_13c0h;
0x00016594 add r3, r3, 0xc | r3 += 0xc;
0x00016598 ldr r4, [r3] | r4 = *(r3);
0x0001659c add r3, sp, 0x13c0 | r3 += var_13c0h;
0x000165a0 add r3, r3, 8 | r3 += 8;
0x000165a4 ldr r3, [r3] | r3 = *(r3);
0x000165a8 str r1, [sp, 0x1c] | var_1ch = r1;
0x000165ac cmp r3, 0 |
0x000165b0 str r2, [sp, 0x18] | var_18h = r2;
| if (r3 == 0) {
0x000165b4 bne 0x165d4 |
0x000165b8 mov r1, r5 | r1 = r5;
0x000165bc bl 0x2f3a4 | fcn_0002f3a4 (r0, r1);
0x000165c0 mov r2, r5 | r2 = r5;
0x000165c4 ldr r1, [pc, 0x5bc] | r1 = *(0x16b84);
0x000165c8 mov r3, r0 | r3 = r0;
0x000165cc mov r0, r4 | r0 = r4;
0x000165d0 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x000165d4 ldr r3, [pc, 0x5b0] | r3 = *(0x16b88);
0x000165d8 ldr r1, [pc, 0x5b0] | r1 = *(0x16b8c);
0x000165dc add r6, sp, 0x60 | r6 += var_60h;
0x000165e0 mov r2, 0 | r2 = 0;
0x000165e4 sub fp, r6, 0x34 |
0x000165e8 str r2, [r3] | *(r3) = r2;
0x000165ec str r2, [r1] | *(r1) = r2;
0x000165f0 str r3, [sp, 0x10] | var_10h = r3;
| label_0:
0x000165f4 sub r3, r6, 0x38 | r3 = r6 - 0x38;
0x000165f8 sub r2, r6, 0x3c | r2 = r6 - 0x3c;
0x000165fc add r1, sp, 0x18 | r1 += var_18h;
0x00016600 add r0, sp, 0x1c | r0 += var_1ch;
0x00016604 bl 0x162e4 | r0 = fcn_000162e4 (r0, r1);
0x00016608 cmp r0, 0 |
| if (r0 == 0) {
0x0001660c bne 0x16658 |
0x00016610 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00016614 ldr r3, [r3] | r3 = *(r3);
0x00016618 cmp r3, 0 |
| if (r3 != 0) {
0x0001661c beq 0x1664c |
0x00016620 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00016624 cmp r3, 0 |
| if (r3 == 0) {
0x00016628 beq 0x16b78 | goto label_18;
| }
0x0001662c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00016630 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00016634 cmp r3, r2 |
| if (r3 >= r2) {
0x00016638 bhs 0x16b68 | goto label_19;
| }
0x0001663c add r2, r3, 1 | r2 = r3 + 1;
0x00016640 str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x00016644 mov r2, 0xa | r2 = 0xa;
0x00016648 strb r2, [r3] | *(r3) = r2;
| }
| label_14:
0x0001664c add sp, sp, 0x1380 |
0x00016650 add sp, sp, 0x24 |
0x00016654 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00016658 ldr r7, [sp, 0x24] | r7 = var_24h;
0x0001665c mov r0, r7 | r0 = r7;
0x00016660 bl 0x16530 | r0 = fcn_00016530 (r0);
0x00016664 mov r5, r0 | r5 = r0;
0x00016668 cmp r0, 8 |
| if (r0 > 8) {
| /* switch table (9 cases) at 0x16674 */
0x0001666c ldrls pc, [pc, r0, lsl 2] | offset_0 = r0 << 2;
| pc = *((pc + offset_0));
| }
0x00016670 b 0x16ad8 | goto label_20;
0x00016698 ldr r0, [sp, 0x28] | r0 = s;
0x0001669c cmp r0, 0 |
0x000166a0 bne 0x166ac |
| while (r0 == 0) {
| label_1:
0x000166a4 mov r5, 0x3f | r5 = 0x3f;
0x000166a8 b 0x16afc | goto label_21;
0x000166ac add r1, sp, 0x30 | r1 += var_30h;
0x000166b0 bl 0x15d50 | r0 = fcn_00015d50 (r0, r1);
0x000166b4 cmp r0, 0 |
0x000166b8 beq 0x166a4 |
| }
0x000166bc add r0, sp, 0x30 | r0 += var_30h;
0x000166c0 ldr r5, [sp, 0x24] | r5 = var_24h;
0x000166c4 bl 0x2d09c | r0 = fcn_0002d09c (r0);
| label_2:
0x000166c8 mov r2, r0 | r2 = r0;
0x000166cc mov r1, r5 | r1 = r5;
| label_3:
0x000166d0 mov r0, r4 | r0 = r4;
0x000166d4 bl 0x13670 | fcn_00013670 (r0, r1);
0x000166d8 b 0x165f4 | goto label_0;
0x000166dc ldr r0, [sp, 0x28] | r0 = s;
0x000166e0 cmp r0, 0 |
| if (r0 == 0) {
0x000166e4 beq 0x166a4 | goto label_1;
| }
0x000166e8 add r1, sp, 0x44 | r1 += var_44h;
0x000166ec bl 0x2a5a8 | r0 = fcn_0002a5a8 (r0, r1);
0x000166f0 cmp r0, 0 |
| if (r0 == 0) {
0x000166f4 beq 0x166a4 | goto label_1;
| }
0x000166f8 cmp r5, 1 |
0x000166fc add r0, sp, 0x44 | r0 += var_44h;
0x00016700 ldr r5, [sp, 0x24] | r5 = var_24h;
| if (r5 != 1) {
0x00016704 bne 0x1676c | goto label_22;
| }
0x00016708 bl 0x162d8 | fcn_000162d8 (r0);
0x0001670c b 0x166c8 | goto label_2;
0x00016710 ldr r0, [sp, 0x28] | r0 = s;
0x00016714 cmp r0, 0 |
| if (r0 == 0) {
0x00016718 beq 0x166a4 | goto label_1;
| }
0x0001671c add r1, sp, 0x44 | r1 += var_44h;
0x00016720 bl 0x2a5a8 | r0 = fcn_0002a5a8 (r0, r1);
0x00016724 cmp r0, 0 |
| if (r0 != 0) {
0x00016728 beq 0x16774 |
0x0001672c add r3, sp, 0x44 | r3 += var_44h;
0x00016730 ldrh r3, [r3] | r3 = *(r3);
0x00016734 ldr r5, [sp, 0x24] | r5 = var_24h;
0x00016738 cmp r3, 2 |
| if (r3 == 2) {
0x0001673c bne 0x16768 |
0x00016740 ldr r0, [sp, 0x48] | r0 = var_48h;
0x00016744 bl 0x374d8 | fcn_000374d8 (r0);
0x00016748 ldr r3, [pc, 0x444] | r3 = *(0x16b90);
0x0001674c lsr r0, r0, 0x10 | r0 >>= 0x10;
0x00016750 lsl r0, r0, 0x10 | r0 <<= 0x10;
0x00016754 cmp r0, r3 |
| if (r0 != r3) {
0x00016758 bne 0x16768 | goto label_23;
| }
0x0001675c add r0, sp, 0x44 | r0 += var_44h;
0x00016760 bl 0x2d0e0 | fcn_0002d0e0 (r0);
0x00016764 b 0x166c8 | goto label_2;
| }
| label_23:
0x00016768 add r0, sp, 0x44 | r0 += var_44h;
| label_22:
0x0001676c bl 0x2e774 | fcn_0002e774 (r0);
0x00016770 b 0x166c8 | goto label_2;
| }
0x00016774 ldr r5, [sp, 0x28] | r5 = s;
0x00016778 mov r0, r5 | r0 = r5;
0x0001677c bl 0x1261c | r0 = strlen (r0);
0x00016780 cmp r0, 4 |
| if (r0 <= 4) {
0x00016784 movls r2, r5 | r2 = r5;
| goto label_24;
| }
| if (r0 > 4) {
| label_24:
0x00016788 bhi 0x166a4 | goto label_1;
| }
| label_4:
0x0001678c ldr r1, [sp, 0x24] | r1 = var_24h;
0x00016790 b 0x166d0 | goto label_3;
0x00016794 ldr r0, [sp, 0x28] | r0 = s;
0x00016798 cmp r0, 0 |
| if (r0 == 0) {
0x0001679c beq 0x166a4 | goto label_1;
| }
0x000167a0 mov r1, fp | r1 = fp;
0x000167a4 bl 0x15e40 | r0 = fcn_00015e40 (r0, r1);
0x000167a8 cmp r0, 0 |
| if (r0 == 0) {
0x000167ac beq 0x166a4 | goto label_1;
| }
0x000167b0 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x000167b4 cmp r3, 3 |
| if (r3 > 3) {
0x000167b8 bhi 0x166a4 | goto label_1;
| }
0x000167bc tst r3, 2 |
| if ((r3 & 2) != 0) {
0x000167c0 moveq r2, 0x30 | r2 = 0x30;
| }
| if ((r3 & 2) == 0) {
0x000167c4 movne r2, 0x31 | r2 = 0x31;
| }
0x000167c8 tst r3, 1 |
| if ((r3 & 1) != 0) {
0x000167cc moveq r3, 0x30 | r3 = 0x30;
| }
| if ((r3 & 1) == 0) {
0x000167d0 movne r3, 0x31 | r3 = 0x31;
| }
0x000167d4 strb r3, [sp, 0x39] | var_39h = r3;
0x000167d8 mov r3, 0 | r3 = 0;
0x000167dc strb r2, [sp, 0x38] | var_38h = r2;
0x000167e0 strb r3, [sp, 0x3a] | var_3ah = r3;
0x000167e4 sub r2, r6, 0x28 | r2 = r6 - 0x28;
0x000167e8 b 0x1678c | goto label_4;
0x000167ec ldr r0, [sp, 0x28] | r0 = s;
0x000167f0 cmp r0, 0 |
| if (r0 == 0) {
0x000167f4 beq 0x166a4 | goto label_1;
| }
0x000167f8 mov r1, fp | r1 = fp;
0x000167fc bl 0x15e40 | r0 = fcn_00015e40 (r0, r1);
0x00016800 cmp r0, 0 |
| if (r0 == 0) {
0x00016804 beq 0x166a4 | goto label_1;
| }
0x00016808 ldr r2, [pc, 0x388] | r2 = *(0x16b94);
0x0001680c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00016810 mov r1, 0xc | r1 = 0xc;
0x00016814 add r0, sp, 0x38 | r0 += var_38h;
0x00016818 bl 0x2e74c | fcn_0002e74c ();
0x0001681c add r2, sp, 0x38 | r2 += var_38h;
0x00016820 b 0x1678c | goto label_4;
0x00016824 ldr r5, [sp, 0x28] | r5 = s;
0x00016828 cmp r5, 0 |
| if (r5 == 0) {
0x0001682c movne r8, 0 | r8 = 0;
| }
| if (r5 == 0) {
0x00016830 movne r7, r6 | r7 = r6;
| }
| if (r5 != 0) {
0x00016834 addne sb, sp, 0xdb | sb += var_dbh;
| goto label_25;
| }
| if (r5 == 0) {
| label_25:
0x00016838 beq 0x166a4 | goto label_1;
| }
| label_5:
0x0001683c ldrb r3, [r5] | r3 = *(r5);
0x00016840 cmp r3, 0 |
| if (r3 == 0) {
0x00016844 beq 0x16884 | goto label_26;
| }
0x00016848 ldr r2, [pc, 0x34c] | r2 = "%03lo";
0x0001684c lsl r3, r3, 1 | r3 <<= 1;
0x00016850 ldr r1, [r2] | r1 = "%03lo";
0x00016854 ldrh r3, [r1, r3] | r3 = *((r1 + r3));
0x00016858 tst r3, 0x20 |
| if ((r3 & 0x20) == 0) {
0x0001685c beq 0x168a4 | goto label_27;
| }
| do {
0x00016860 ldrb r3, [r5, 1]! | r3 = *((r5 += 1));
0x00016864 cmp r3, 0 |
| if (r3 == 0) {
0x00016868 beq 0x1687c | goto label_6;
| }
0x0001686c lsl r3, r3, 1 | r3 <<= 1;
0x00016870 ldrh r3, [r1, r3] | r3 = *((r1 + r3));
0x00016874 tst r3, 0x20 |
0x00016878 bne 0x16860 |
| } while ((r3 & 0x20) != 0);
| label_6:
0x0001687c cmp r8, 8 |
| if (r8 != 8) {
0x00016880 bne 0x1683c | goto label_5;
| }
| label_26:
0x00016884 ldr sb, [sp, 0x24] | sb = var_24h;
0x00016888 add r5, sp, 0xa0 | r5 += var_a0h;
0x0001688c mov r0, sb | r0 = sb;
0x00016890 bl 0x1261c | strlen (r0);
0x00016894 mov r3, r5 | r3 = r5;
0x00016898 mov r2, 0x20 | r2 = 0x20;
0x0001689c sub r0, r0, r5 | r0 -= r5;
0x000168a0 b 0x16900 | goto label_28;
| label_27:
0x000168a4 add r3, sp, 0xa0 | r3 += var_a0h;
| do {
0x000168a8 cmp r3, sb |
| if (r3 == sb) {
0x000168ac ldrbne r2, [r5] | r2 = *(r5);
| }
| if (r3 == sb) {
0x000168b0 strbne r2, [r3] | *(r3) = r2;
| }
0x000168b4 ldrb r2, [r5, 1]! | r2 = *((r5 += 1));
| if (r3 == sb) {
0x000168b8 addne r3, r3, 1 | r3++;
| }
0x000168bc cmp r2, 0 |
| if (r2 == 0) {
0x000168c0 beq 0x168d4 | goto label_29;
| }
0x000168c4 lsl r2, r2, 1 | r2 <<= 1;
0x000168c8 ldrh r2, [r1, r2] | r2 = *((r1 + r2));
0x000168cc tst r2, 0x20 |
0x000168d0 beq 0x168a8 |
| } while ((r2 & 0x20) == 0);
| label_29:
0x000168d4 mov r2, 0 | r2 = 0;
0x000168d8 strb r2, [r3] | *(r3) = r2;
0x000168dc mov r1, r7 | r1 = r7;
0x000168e0 add r0, sp, 0xa0 | r0 += var_a0h;
0x000168e4 bl 0x2afb0 | r0 = fcn_0002afb0 (r0, r1);
0x000168e8 cmp r0, 0 |
| if (r0 == 0) {
0x000168ec beq 0x166a4 | goto label_1;
| }
0x000168f0 add r8, r8, 1 | r8++;
0x000168f4 add r7, r7, 8 | r7 += 8;
0x000168f8 b 0x1687c | goto label_6;
| do {
0x000168fc strb r2, [r5], 1 | *(r5) = r2;
| r5++;
| label_28:
0x00016900 add r1, r5, r0 | r1 = r5 + r0;
0x00016904 cmp r1, 0xa |
0x00016908 bls 0x168fc |
| } while (r1 < 0xa);
0x0001690c mov r7, 0 | r7 = 0;
0x00016910 mov sl, 0x20 | sl = 0x20;
| label_7:
0x00016914 cmp r8, r7 |
| if (r8 != r7) {
0x00016918 moveq r2, 0 | r2 = 0;
| }
| if (r8 != r7) {
0x0001691c strbeq r2, [r5] | *(r5) = r2;
| }
| if (r8 != r7) {
0x00016920 moveq r1, sb | r1 = sb;
| }
| if (r8 == r7) {
0x00016924 moveq r2, r3 | r2 = r3;
| goto label_30;
| }
| if (r8 == r7) {
| label_30:
0x00016928 beq 0x166d0 | goto label_3;
| }
0x0001692c cmp r7, 0 |
0x00016930 add r1, r6, r7, lsl 3 | r1 = r6 + (r7 << 3);
| if (r7 == 0) {
0x00016934 strbne sl, [r5] | *(r5) = sl;
| }
0x00016938 mov r2, 2 | r2 = 2;
0x0001693c ldr r1, [r1, 4] | r1 = *((r1 + 4));
0x00016940 ldr r0, [r6, r7, lsl 3] | offset_1 = r7 << 3;
| r0 = *((r6 + offset_1));
| if (r7 == 0) {
0x00016944 addne r5, r5, 1 | r5++;
| }
0x00016948 str r3, [sp, 0x14] | var_14h = r3;
0x0001694c bl 0x2a9d0 | fcn_0002a9d0 (r0, r1);
0x00016950 str r0, [sp, 0xc] | var_ch = r0;
0x00016954 bl 0x1261c | strlen (r0);
0x00016958 ldr r2, [sp, 0xc] | r2 = var_ch;
0x0001695c ldr r3, [sp, 0x14] | r3 = var_14h;
0x00016960 cmp r0, 7 |
| if (r0 < 7) {
0x00016964 bls 0x169a4 | goto label_31;
| }
0x00016968 mov r1, 0 | r1 = 0;
0x0001696c strb r1, [r2, 7] | *((r2 + 7)) = r1;
| label_8:
0x00016970 sub r2, r2, 1 | r2--;
| label_10:
0x00016974 ldrb r1, [r2, 1]! | r1 = *((r2 += 1));
0x00016978 cmp r1, 0 |
| if (r1 != 0) {
0x0001697c bne 0x169b0 | goto label_32;
| }
0x00016980 add r7, r7, 1 | r7++;
0x00016984 b 0x16914 | goto label_7;
| do {
0x00016988 strb sl, [r1], 1 | *(r1) = sl;
| r1++;
| label_9:
0x0001698c add ip, r1, lr |
0x00016990 cmp ip, 7 |
0x00016994 bne 0x16988 |
| } while (ip != 7);
0x00016998 rsb r0, r0, 7 | r0 = 7 - r0;
0x0001699c add r5, r5, r0 | r5 += r0;
0x000169a0 b 0x16970 | goto label_8;
| label_31:
0x000169a4 mov r1, r5 | r1 = r5;
0x000169a8 sub lr, r0, r5 | lr = r0 - r5;
0x000169ac b 0x1698c | goto label_9;
| label_32:
0x000169b0 strb r1, [r5], 1 | *(r5) = r1;
| r5++;
0x000169b4 b 0x16974 | goto label_10;
0x000169b8 ldr r0, [sp, 0x28] | r0 = s;
0x000169bc cmp r0, 0 |
| if (r0 == 0) {
0x000169c0 beq 0x166a4 | goto label_1;
| }
0x000169c4 mov r1, fp | r1 = fp;
0x000169c8 bl 0x15e40 | r0 = fcn_00015e40 (r0, r1);
0x000169cc cmp r0, 0 |
| if (r0 == 0) {
0x000169d0 beq 0x166a4 | goto label_1;
| }
0x000169d4 ldr r3, [sp, 0x24] | r3 = var_24h;
0x000169d8 ldr r2, [pc, 0x1c0] | r2 = __ctype_b;
0x000169dc str r3, [sp, 0xc] | var_ch = r3;
0x000169e0 ldr r1, [pc, 0x1bc] | r1 = *(0x16ba0);
0x000169e4 ldr r3, [r2, 0xc48] | r3 = *(0x177e4);
0x000169e8 mov r8, 0x50 | r8 = 0x50;
0x000169ec mla r0, r3, r8, r1 | __asm ("mla r0, r3, r8, r1");
0x000169f0 ldr sb, [sp, 0x2c] | sb = var_2ch;
0x000169f4 add r3, r3, 1 | r3++;
0x000169f8 cmp r3, 5 |
| if (r3 <= 5) {
0x000169fc movgt r3, 0 | r3 = 0;
| }
0x00016a00 str r3, [r2, 0xc48] | *((r2 + 0xc48)) = r3;
0x00016a04 mov r1, 0x50 | r1 = 0x50;
0x00016a08 mov r3, sb | r3 = sb;
0x00016a0c ldr r2, [pc, 0x194] | r2 = *(0x16ba4);
0x00016a10 mov r8, r0 | r8 = r0;
0x00016a14 bl 0x2e74c | r0 = fcn_0002e74c ();
0x00016a18 cmp r0, 0x4f |
| if (r0 > 0x4f) {
0x00016a1c bhi 0x16ac8 | goto label_33;
| }
0x00016a20 cmp sb, 0 |
0x00016a24 mov r3, r8 | r3 = r8;
0x00016a28 add r7, r8, r0 | r7 = r8 + r0;
0x00016a2c rsb r5, r0, 0x50 | r5 = 0x50 - r0;
| if (sb == 0) {
0x00016a30 ldrne r3, [pc, 0x174] | r3 = *((pc + 0x174));
| }
| if (sb == 0) {
0x00016a34 movne sl, 0 | sl = 0;
| }
| if (sb != 0) {
0x00016a38 bne 0x16a7c | goto label_34;
| }
0x00016a3c mov r2, r5 | r2 = r5;
0x00016a40 ldr r1, [pc, 0x168] | r1 = *(0x16bac);
0x00016a44 mov r0, r7 | r0 = r7;
0x00016a48 bl 0x129b8 | r0 = strlcat ();
0x00016a4c cmp r5, r0 |
| if (r5 < r0) {
0x00016a50 bls 0x16acc | goto label_35;
| }
| do {
| label_13:
0x00016a54 mov r2, r8 | r2 = r8;
0x00016a58 ldr r1, [sp, 0xc] | r1 = var_ch;
0x00016a5c b 0x166d0 | goto label_3;
| label_12:
0x00016a60 ldr r3, [pc, 0x14c] | r3 = *(0x16bb0);
0x00016a64 add r7, r7, r0 | r7 += r0;
0x00016a68 sub r5, r5, r0 | r5 -= r0;
| label_11:
0x00016a6c add sl, sl, 1 | sl++;
0x00016a70 cmp sl, 0xd |
0x00016a74 lsr sb, sb, 1 | sb >>= 1;
0x00016a78 beq 0x16a54 |
| } while (sl == 0xd);
| label_34:
0x00016a7c tst sb, 1 |
| if ((sb & 1) == 0) {
0x00016a80 beq 0x16a6c | goto label_11;
| }
0x00016a84 ldr r2, [pc, 0x12c] |
0x00016a88 mov r1, r5 | r1 = r5;
0x00016a8c ldr r2, [r2, sl, lsl 2] | r2 = *(0x16bb4);
0x00016a90 mov r0, r7 | r0 = r7;
0x00016a94 str r2, [sp] | *(sp) = r2;
0x00016a98 ldr r2, [pc, 0x11c] | r2 = "pkt_dup";
0x00016a9c bl 0x2e74c | r0 = fcn_0002e74c ();
0x00016aa0 cmp r0, 0 |
| if (r0 < 0) {
0x00016aa4 blt 0x16acc | goto label_35;
| }
0x00016aa8 cmp r0, r5 |
| if (r0 <= r5) {
0x00016aac blo 0x16a60 | goto label_12;
| }
0x00016ab0 sub r0, r5, 4 | r0 = r5 - 4;
0x00016ab4 mov r2, 4 | r2 = 4;
0x00016ab8 ldr r1, [pc, 0x100] | r1 = *(0x16bbc);
0x00016abc add r0, r7, r0 | r0 = r7 + r0;
0x00016ac0 bl 0x1246c | strlcpy (r0, r1, r2);
0x00016ac4 b 0x16a54 | goto label_13;
| label_33:
0x00016ac8 mov r7, r8 | r7 = r8;
| label_35:
0x00016acc mov r3, 0 | r3 = 0;
0x00016ad0 strb r3, [r7] | *(r7) = r3;
0x00016ad4 b 0x16a54 | goto label_13;
| label_20:
0x00016ad8 str r0, [sp] | *(sp) = r0;
0x00016adc ldr r0, [pc, 0xe0] |
0x00016ae0 ldr r3, [sp, 0x28] | r3 = s;
0x00016ae4 mov r2, r7 | r2 = r7;
0x00016ae8 ldr r1, [pc, 0xd8] | r1 = stderr;
0x00016aec ldr r0, [r0] | r0 = *(0x16bc0);
0x00016af0 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00016af4 b 0x166a4 | goto label_1;
0x00016af8 mov r5, 0x2a | r5 = 0x2a;
| label_21:
0x00016afc mov r3, 0x200 | r3 = 0x200;
0x00016b00 add r2, sp, 0x1a0 | r2 += var_1a0h;
0x00016b04 mov r1, 0x100 | r1 = 0x100;
0x00016b08 ldr r0, [sp, 0x24] | r0 = var_24h;
0x00016b0c bl 0x12c8c | fcn_00012c8c (r0, r1);
0x00016b10 cmp r5, 0x2a |
| if (r5 == 0x2a) {
0x00016b14 beq 0x16b50 | goto label_36;
| }
0x00016b18 ldr r3, [pc, 0xac] | r3 = "Internal error in cookedprint, %s=%s, fmt %d\n";
0x00016b1c add r2, sp, 0x3a0 | r2 += var_3a0h;
0x00016b20 mov r1, 0x800 | r1 = 0x800;
0x00016b24 ldr r0, [sp, 0x28] | r0 = s;
0x00016b28 bl 0x12c8c | fcn_00012c8c (r0, r1);
0x00016b2c add r0, sp, 0x3a0 | r0 += var_3a0h;
0x00016b30 bl 0x1261c | strlen (r0);
0x00016b34 add r3, sp, 0x3a0 | r3 += var_3a0h;
0x00016b38 mov r2, 0 | r2 = 0;
0x00016b3c strb r5, [r3, r0]! | *((r3 += r0)) = r5;
0x00016b40 strb r2, [r3, 1] | *((r3 + 1)) = r2;
| do {
0x00016b44 add r2, sp, 0x3a0 | r2 += var_3a0h;
0x00016b48 add r1, sp, 0x1a0 | r1 += var_1a0h;
0x00016b4c b 0x166d0 | goto label_3;
| label_36:
0x00016b50 mov r3, 0x1000 | r3 = 0x1000;
0x00016b54 add r2, sp, 0x3a0 | r2 += var_3a0h;
0x00016b58 mov r1, 0x800 | r1 = 0x800;
0x00016b5c ldr r0, [sp, 0x28] | r0 = s;
0x00016b60 bl 0x12c8c | fcn_00012c8c (r0, r1);
0x00016b64 b 0x16b44 |
| } while (1);
| label_19:
0x00016b68 mov r1, r4 | r1 = r4;
0x00016b6c mov r0, 0xa | r0 = 0xa;
0x00016b70 bl 0x126d0 | fputc_unlocked ();
0x00016b74 b 0x1664c | goto label_14;
| label_18:
0x00016b78 mov r1, r4 | r1 = r4;
0x00016b7c mov r0, 0xa | r0 = 0xa;
0x00016b80 bl 0x127fc | fputc (r0, r1);
0x00016b84 b 0x1664c | goto label_14;
0x00016bd0 ldr ip, [pc, 0xf0] | ip = *(0x00016cc8);
0x00016bd4 push {r4, r5, r6, r7, r8, lr} |
0x00016bd8 ldr ip, [ip, 0x14] | ip = *((ip + 0x14));
0x00016bdc mov r6, r0 | r6 = r0;
0x00016be0 cmp ip, 0 |
0x00016be4 mov r0, r3 | r0 = r3;
0x00016be8 mov r4, r1 | r4 = r1;
0x00016bec ldr r3, [sp, 0x18] | r3 = *(arg_18h);
0x00016bf0 ldr r5, [sp, 0x1c] | r5 = *(arg_1ch);
| if (ip == 0) {
0x00016bf4 beq 0x16cb4 | goto label_37;
| }
0x00016bf8 cmp r3, 0 |
0x00016bfc add r6, r1, r6 | r6 = r1 + r6;
| if (r3 == 0) {
0x00016c00 bne 0x16c10 |
0x00016c04 ldr r1, [pc, 0xc0] | r1 = *(0x16cc8);
0x00016c08 mov r0, r5 | r0 = r5;
0x00016c0c bl 0x12910 | fprintf (r0, r1)
| }
0x00016c10 ldr r7, [pc, 0xb8] | r7 = "status=0x%04x,\n";
0x00016c14 sub r8, r6, 1 | r8 = r6 - 1;
| label_15:
0x00016c18 cmp r6, r4 |
| if (r6 > r4) {
0x00016c1c popls {r4, r5, r6, r7, r8, pc} |
| }
0x00016c20 ldrb r0, [r4] | r0 = *(r4);
0x00016c24 cmp r0, 0xd |
| if (r0 != 0xd) {
0x00016c28 bne 0x16c54 | goto label_38;
| }
0x00016c2c cmp r4, r8 |
| if (r4 == r8) {
0x00016c30 beq 0x16c40 | goto label_39;
| }
0x00016c34 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x00016c38 cmp r3, 0xa |
| if (r3 == 0xa) {
0x00016c3c beq 0x16c94 | goto label_16;
| }
| do {
| label_39:
0x00016c40 mov r2, r5 | r2 = r5;
0x00016c44 mov r1, r4 | r1 = r4;
0x00016c48 mov r0, 1 | r0 = 1;
0x00016c4c bl 0x15e6c | fcn_00015e6c (r0, r1);
0x00016c50 b 0x16c94 | goto label_16;
| label_38:
0x00016c54 ldr r2, [r7] | r2 = *(r7);
0x00016c58 lsl r3, r0, 1 | r3 = r0 << 1;
0x00016c5c ldrh r3, [r2, r3] | r3 = *((r2 + r3));
0x00016c60 tst r3, 0x60 |
0x00016c64 beq 0x16c40 |
| } while ((r3 & 0x60) == 0);
0x00016c68 ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x00016c6c cmp r3, 0 |
| if (r3 == 0) {
0x00016c70 beq 0x16ca8 | goto label_40;
| }
0x00016c74 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00016c78 ldr r2, [r5, 0x1c] | r2 = *((r5 + 0x1c));
0x00016c7c cmp r3, r2 |
| if (r3 >= r2) {
0x00016c80 bhs 0x16c9c | goto label_41;
| }
0x00016c84 add r2, r3, 1 | r2 = r3 + 1;
0x00016c88 str r2, [r5, 0x10] | *((r5 + 0x10)) = r2;
0x00016c8c ldrb r2, [r4] | r2 = *(r4);
0x00016c90 strb r2, [r3] | *(r3) = r2;
| do {
| label_16:
0x00016c94 add r4, r4, 1 | r4++;
0x00016c98 b 0x16c18 | goto label_15;
| label_41:
0x00016c9c mov r1, r5 | r1 = r5;
0x00016ca0 bl 0x126d0 | fputc_unlocked ();
0x00016ca4 b 0x16c94 |
| } while (1);
| label_40:
0x00016ca8 mov r1, r5 | r1 = r5;
0x00016cac bl 0x127fc | fputc (r0, r1);
0x00016cb0 b 0x16c94 | goto label_16;
| label_37:
0x00016cb4 mov r3, r2 | r3 = r2;
0x00016cb8 mov r1, r6 | r1 = r6;
0x00016cbc mov r2, r4 | r2 = r4;
0x00016cc0 pop {r4, r5, r6, r7, r8, lr} |
0x00016cc4 b 0x16580 | goto label_17;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x17604 */
| #include <stdint.h>
|
; (fcn) fcn.00017604 () | void fcn_00017604 (uint32_t arg1) {
| r0 = arg1;
0x00017604 mov r2, r0 | r2 = r0;
0x00017608 lsl r0, r0, 0x10 | r0 <<= 0x10;
0x0001760c lsr r0, r0, 0x10 | r0 >>= 0x10;
0x00017610 cmp r0, 0 |
| if (r0 != 0) {
0x00017614 beq 0x17620 |
0x00017618 cmp r2, r0 |
| if (r2 == r0) {
0x0001761c bxeq lr | return;
| goto label_0;
| }
| }
| label_0:
0x00017620 ldr r3, [pc, 0x14] | r3 = *(0x17638);
0x00017624 push {r4, lr} |
0x00017628 ldr r1, [pc, 0x10] | r1 = stderr;
0x0001762c ldr r0, [r3] | r0 = *(0x17638);
0x00017630 bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x00017634 mov r0, 0 | r0 = 0;
0x00017638 pop {r4, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x17a40 */
| #include <stdint.h>
|
; (fcn) fcn.00017a40 () | void fcn_00017a40 (int32_t arg1) {
| int32_t var_0h_2;
| int32_t var_4h_2;
| int32_t var_8h_2;
| int32_t var_ch;
| int32_t var_14h;
| int32_t var_2h;
| int32_t var_20h;
| int32_t var_24h;
| int8_t var_0h_3;
| char * s;
| int32_t var_228h;
| int32_t var_22ch;
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch_2;
| int32_t var_10h;
| int32_t var_14h_2;
| int32_t var_1ch;
| int32_t var_20h_2;
| int32_t var_24h_2;
| int32_t var_2ch;
| r0 = arg1;
0x00017a40 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00017a44 ldr r6, [pc, 0x288] | r6 = *(0x17cd0);
0x00017a48 add r8, r0, 0x24 | r8 = r0 + 0x24;
0x00017a4c mov r5, r0 | r5 = r0;
0x00017a50 sub sp, sp, 0x2c |
0x00017a54 mov r0, r8 | r0 = r8;
0x00017a58 bl 0x2e968 | fcn_0002e968 (r0);
0x00017a5c ldr r3, [r6, 0x400] | r3 = *(0x180d0);
0x00017a60 add sl, r5, 0x2c | sl = r5 + 0x2c;
0x00017a64 and r7, r0, 0x7f | r7 = r0 & 0x7f;
0x00017a68 ldr r4, [r3, r7, lsl 2] | r4 = *(0x180d0);
0x00017a6c add sb, r3, r7, lsl 2 | sb = r3 + (r7 << 2);
| do {
0x00017a70 cmp r4, 0 |
| if (r4 == 0) {
0x00017a74 bne 0x17b68 |
| label_2:
0x00017a78 ldr r3, [r6, 0x40c] | r3 = *((r6 + 0x40c));
0x00017a7c str r3, [r5, 8] | *((r5 + 8)) = r3;
0x00017a80 ldr r3, [pc, 0x250] | r3 = *(0x17cd4);
0x00017a84 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00017a88 ldr r3, [r6, 0x40c] | r3 = *((r6 + 0x40c));
0x00017a8c str r5, [r3, 4] | *((r3 + 4)) = r5;
0x00017a90 ldr r3, [r6, 0x400] | r3 = *((r6 + 0x400));
0x00017a94 str r5, [r6, 0x40c] | *((r6 + 0x40c)) = r5;
0x00017a98 ldr r2, [r3, r7, lsl 2] | r2 = *(0x17cd4);
0x00017a9c str r2, [r5] | *(r5) = r2;
0x00017aa0 str r5, [r3, r7, lsl 2] | offset_0 = r7 << 2;
| *((r3 + offset_0)) = r5;
0x00017aa4 ldr r3, [pc, 0x230] |
0x00017aa8 ldr r3, [r3] | r3 = *(0x17cd8);
0x00017aac cmp r3, 1 |
| if (r3 > 1) {
0x00017ab0 ble 0x17b20 |
0x00017ab4 ldrb r3, [r5, 0x21] | r3 = *((r5 + 0x21));
0x00017ab8 ldrh r2, [r5, 0x22] | r2 = *((r5 + 0x22));
0x00017abc ldr r1, [r5, 0x18] | r1 = *((r5 + 0x18));
0x00017ac0 mov r0, r8 | r0 = r8;
0x00017ac4 ldr r7, [r5, 0x10] | r7 = *((r5 + 0x10));
0x00017ac8 ldr sb, [r5, 0x14] | sb = *((r5 + 0x14));
0x00017acc ldr sl, [r5, 0xc] | sl = *((r5 + 0xc));
0x00017ad0 ldrb fp, [r5, 0x20] | fp = *((r5 + 0x20));
0x00017ad4 str r3, [sp, 0x24] | var_24h_2 = r3;
0x00017ad8 str r2, [sp, 0x20] | var_20h_2 = r2;
0x00017adc str r1, [sp, 0x1c] | var_1ch = r1;
0x00017ae0 ldr r5, [r5, 0x1c] | r5 = *((r5 + 0x1c));
0x00017ae4 bl 0x2e8bc | fcn_0002e8bc (r0);
0x00017ae8 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00017aec ldr r2, [sp, 0x20] | r2 = var_20h_2;
0x00017af0 ldr r3, [sp, 0x24] | r3 = var_24h_2;
0x00017af4 str r1, [sp, 0xc] | var_ch_2 = r1;
0x00017af8 str r2, [sp, 8] | var_8h = r2;
0x00017afc str r3, [sp, 4] | var_4h = r3;
0x00017b00 str r5, [sp, 0x10] | var_10h = r5;
0x00017b04 str fp, [sp] | *(sp) = fp;
0x00017b08 mov r3, sl | r3 = sl;
0x00017b0c mov r2, sb | r2 = sb;
0x00017b10 mov r1, r7 | r1 = r7;
0x00017b14 str r0, [sp, 0x14] | var_14h_2 = r0;
0x00017b18 ldr r0, [pc, 0x1c0] | r0 = *(0x17cdc);
0x00017b1c bl 0x2b4ec | fcn_0002b4ec ();
| }
0x00017b20 cmp r4, 0 |
| if (r4 == 0) {
0x00017b24 bne 0x17b4c |
0x00017b28 mov r3, r4 | r3 = r4;
0x00017b2c mov r2, r4 | r2 = r4;
0x00017b30 mov r0, r4 | r0 = r4;
0x00017b34 mov r1, 0x40 | r1 = 0x40;
0x00017b38 bl 0x2aa08 | fcn_0002aa08 (r0, r1);
0x00017b3c ldr r3, [r6, 0x444] | r3 = *((r6 + 0x444));
0x00017b40 add r3, r3, 1 | r3++;
0x00017b44 str r3, [r6, 0x444] | *((r6 + 0x444)) = r3;
0x00017b48 mov r4, r0 | r4 = r0;
| }
0x00017b4c mov r2, 0x40 | r2 = 0x40;
0x00017b50 mov r1, 0 | r1 = 0;
0x00017b54 mov r0, r4 | r0 = r4;
0x00017b58 bl 0x128b0 | memset (r0, r1, r2);
0x00017b5c mov r0, r4 | r0 = r4;
0x00017b60 add sp, sp, 0x2c |
0x00017b64 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00017b68 ldrh r2, [r4, 0x24] | r2 = *((r4 + 0x24));
0x00017b6c ldrh r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x00017b70 cmp r3, r2 |
| if (r3 == r2) {
0x00017b74 bne 0x17b9c |
0x00017b78 cmp r3, 2 |
| if (r3 != 2) {
0x00017b7c bne 0x17ba4 | goto label_7;
| }
0x00017b80 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00017b84 ldr r2, [r5, 0x28] | r2 = *((r5 + 0x28));
0x00017b88 sub r3, r3, r2 | r3 -= r2;
0x00017b8c clz r3, r3 | r3 &= r3;
0x00017b90 lsr r3, r3, 5 | r3 >>= 5;
| label_0:
0x00017b94 cmp r3, 0 |
| if (r3 != 0) {
0x00017b98 bne 0x17c50 | goto label_8;
| }
| }
0x00017b9c ldr r4, [r4] | r4 = *(r4);
0x00017ba0 b 0x17a70 |
| } while (1);
| label_7:
0x00017ba4 mov r2, 0x10 | r2 = 0x10;
0x00017ba8 mov r1, sl | r1 = sl;
0x00017bac add r0, r4, 0x2c | r0 = r4 + 0x2c;
0x00017bb0 bl 0x12940 | r0 = memcmp (r0, r1, r2);
0x00017bb4 cmp r0, 0 |
| if (r0 != 0) {
0x00017bb8 ldreq r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
| }
| if (r0 != 0) {
0x00017bbc ldreq r2, [r5, 0x3c] | r2 = *((r5 + 0x3c));
| }
| if (r0 == 0) {
0x00017bc0 movne r3, 0 | r3 = 0;
| }
| if (r0 != 0) {
0x00017bc4 subeq r3, r3, r2 | r3 -= r2;
| }
0x00017bc8 clzeq r3, r3 | __asm ("clzeq r3, r3");
| if (r0 != 0) {
0x00017bcc lsreq r3, r3, 5 | r3 >>= 5;
| }
0x00017bd0 and r3, r3, 1 | r3 &= 1;
0x00017bd4 b 0x17b94 | goto label_0;
| do {
0x00017bd8 cmp r2, r3 |
| if (r2 == r3) {
0x00017bdc bne 0x17bf0 |
0x00017be0 ldr r2, [r5, 0x1c] | r2 = *((r5 + 0x1c));
0x00017be4 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00017be8 cmp r2, r3 |
| if (r2 >= r3) {
0x00017bec bhs 0x17c68 | goto label_9;
| }
| }
0x00017bf0 ldr r3, [pc, 0xec] | r3 = "add_mru %08x.%08x c %d m %d v %d rest %x first %08x.%08x %s\n";
0x00017bf4 mov r0, r8 | r0 = r8;
0x00017bf8 ldr r6, [r3] | r6 = "add_mru %08x.%08x c %d m %d v %d rest %x first %08x.%08x %s\n";
0x00017bfc bl 0x2e8bc | fcn_0002e8bc (r0);
0x00017c00 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00017c04 ldr r1, [pc, 0xdc] | r1 = stderr;
0x00017c08 str r3, [sp, 8] | var_8h = r3;
0x00017c0c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00017c10 str r3, [sp, 4] | var_4h = r3;
0x00017c14 ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x00017c18 str r3, [sp] | *(sp) = r3;
0x00017c1c ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00017c20 mov r2, r0 | r2 = r0;
0x00017c24 mov r0, r6 | r0 = r6;
0x00017c28 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00017c2c mov r0, 1 | r0 = 1;
0x00017c30 bl 0x129d0 | exit (r0);
| label_1:
0x00017c34 cmp r3, 0 |
| if (r3 == 0) {
0x00017c38 beq 0x17cc0 | goto label_10;
| }
0x00017c3c ldr r2, [r3] | r2 = *(r3);
0x00017c40 cmp r2, 0 |
| if (r2 == 0) {
0x00017c44 beq 0x17cc0 | goto label_10;
| }
0x00017c48 mov sb, r3 | sb = r3;
0x00017c4c b 0x17c7c | goto label_11;
| label_8:
0x00017c50 ldr r2, [r5, 0x18] | r2 = *((r5 + 0x18));
0x00017c54 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00017c58 add r0, r2, 0x80000000 | r0 = r2 + 0x80000000;
0x00017c5c add r1, r3, 0x80000000 | r1 = r3 + 0x80000000;
0x00017c60 cmp r0, r1 |
0x00017c64 bls 0x17bd8 |
| } while (r0 < r1);
| label_9:
0x00017c68 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00017c6c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00017c70 str r2, [r3, 8] | *((r3 + 8)) = r2;
0x00017c74 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00017c78 str r3, [r2, 4] | *((r2 + 4)) = r3;
| label_11:
0x00017c7c ldr r3, [sb] | r3 = *(sb);
0x00017c80 cmp r3, r4 |
| if (r3 != r4) {
0x00017c84 bne 0x17c34 | goto label_1;
| }
0x00017c88 ldr r3, [r4] | r3 = *(r4);
0x00017c8c str r3, [sb] | *(sb) = r3;
0x00017c90 ldr r3, [r6, 0x448] | r3 = *((r6 + 0x448));
0x00017c94 add r3, r3, 1 | r3++;
0x00017c98 str r3, [r6, 0x448] | *((r6 + 0x448)) = r3;
0x00017c9c ldr r3, [pc, 0x38] |
0x00017ca0 ldr r3, [r3] | r3 = *(0x17cd8);
0x00017ca4 cmp r3, 1 |
| if (r3 <= 1) {
0x00017ca8 ble 0x17a78 | goto label_2;
| }
0x00017cac ldr r2, [r4, 0x14] | r2 = *((r4 + 0x14));
0x00017cb0 ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00017cb4 ldr r0, [pc, 0x30] | r0 = "add_mru duplicate %s new first ts %08x.%08x precedes prior %08x.%08x\n";
0x00017cb8 bl 0x2b4ec | fcn_0002b4ec ();
0x00017cbc b 0x17a78 | goto label_2;
| label_10:
0x00017cc0 ldr r3, [pc, 0x28] | r3 = "(updated from %08x.%08x) ";
0x00017cc4 mov r2, 2 | r2 = 2;
0x00017cc8 ldr r1, [pc, 0x24] | r1 = "unlinked__mon";
0x00017ccc ldr r0, [pc, 0x24] | r0 = *(0x17cf4);
0x00017cd0 bl 0x2f7d0 | fcn_0002f7d0 ();
| if (r3 != 1) {
0x00017cd4 andeq r6, r5, r4, ror r5 | r6 = r5 & (r4 >>> r5);
| }
| if (r3 != 1) {
0x00017cd8 andeq r6, r5, r8, ror sb | r6 = r5 & (r8 >>> sb);
| }
| if (r3 != 1) {
0x00017cdc muleq r5, r4, r3 | r5 = r4 * r3;
| }
| if (r3 != 1) {
0x00017ce0 andeq r8, r3, sb, lsr 21 | r8 = r3 & (sb >> 21);
| }
| if (r3 != 1) {
0x00017ce4 andeq r5, r5, r8, ror 17 | r5 &= (r8 >>> 17);
| }
| if (r3 != 1) {
0x00017ce8 andeq r8, r3, sb, asr 20 | r8 = r3 & (sb >> 20);
| }
| if (r3 != 1) {
0x00017cec andeq r8, r3, pc, lsl 21 | r8 = r3 & (pc << 21);
| }
| if (r3 != 1) {
0x00017cf0 andeq r8, r3, r6, ror 21 | r8 = r3 & (r6 >>> 21);
| }
| if (r3 != 1) {
0x00017cf4 andeq r0, r0, sp, lsl 19 | r0 &= (sp << 19);
| }
| if (r3 != 1) {
0x00017cf8 andeq r8, r3, r3, lsl 20 | r8 = r3 & (r3 << 20);
| }
0x00017cfc ldr r3, [pc, 0x190] |
0x00017d00 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00017d04 ldr r3, [r3] | r3 = *(0x17e90);
0x00017d08 sub sp, sp, 0x22c |
0x00017d0c cmp r3, 2 |
0x00017d10 mov r4, r0 | r4 = r0;
| if (r3 > 2) {
0x00017d14 ble 0x17d2c |
0x00017d18 ldm r0, {r2, r3} | r2 = *(r0);
| r3 = *((r0 + 4));
0x00017d1c ldr r0, [pc, 0x174] |
0x00017d20 ldr r1, [pc, 0x174] | r1 = stderr;
0x00017d24 ldr r0, [r0] | r0 = *(0x17e94);
0x00017d28 bl 0x12910 | fprintf (r0, r1)
| }
0x00017d2c ldr r1, [pc, 0x16c] | r1 = "In_ConfigKeyword___sFilename___s";
0x00017d30 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00017d34 bl 0x125c8 | r0 = fopen64 ();
0x00017d38 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00017d3c bne 0x17d54 | goto label_12;
| }
0x00017d40 ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x00017d44 ldr r0, [pc, 0x158] | r0 = *(0x17ea0);
0x00017d48 bl 0x12ab4 | printf (r0, r1);
| do {
0x00017d4c add sp, sp, 0x22c |
0x00017d50 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_12:
0x00017d54 ldr sl, [pc, 0x14c] | sl = "Line_No:__d__.s:__.s";
0x00017d58 ldr r0, [pc, 0x14c] | r0 = "Line_No:__d__.s:__.s";
0x00017d5c bl 0x12ad8 | puts ("Line_No:__d__.s:__.s");
0x00017d60 add sb, sp, 0x20 | sb += var_20h;
0x00017d64 sub r3, sb, 2 | r3 -= var_2h;
0x00017d68 mov r6, 0 | r6 = 0;
0x00017d6c str r3, [sp, 0x14] | var_14h = r3;
| label_3:
0x00017d70 add r5, sp, 0x28 | r5 += s;
0x00017d74 mov r2, r7 | r2 = r7;
0x00017d78 mov r1, 0x200 | r1 = 0x200;
0x00017d7c mov r0, r5 | r0 = r5;
0x00017d80 bl 0x12814 | r0 = fgets (r0, r1, r2);
0x00017d84 cmp r0, 0 |
| if (r0 != 0) {
0x00017d88 bne 0x17da0 | goto label_13;
| }
0x00017d8c ldr r0, [pc, 0x11c] | r0 = "Sending_configuration_file__one_line_at_a_time.";
0x00017d90 bl 0x12ad8 | puts ("Sending_configuration_file__one_line_at_a_time.");
| label_5:
0x00017d94 mov r0, r7 | r0 = r7;
0x00017d98 bl 0x1276c | fclose (r0);
0x00017d9c b 0x17d4c |
| } while (1);
| label_13:
0x00017da0 mov r1, 0x23 | r1 = 0x23;
0x00017da4 mov r0, r5 | r0 = r5;
0x00017da8 bl 0x12a78 | r0 = strchr (r0, r1);
0x00017dac cmp r0, 0 |
| if (r0 == 0) {
0x00017db0 subne r4, r0, r5 | r4 = r0 - r5;
| }
| if (r0 == 0) {
0x00017db4 bne 0x17dc4 |
0x00017db8 mov r0, r5 | r0 = r5;
0x00017dbc bl 0x1261c | r0 = strlen (r0);
0x00017dc0 mov r4, r0 | r4 = r0;
| }
| label_4:
0x00017dc4 cmp r4, 0 |
| if (r4 != 0) {
0x00017dc8 beq 0x17ddc |
0x00017dcc sub r3, r4, 1 | r3 = r4 - 1;
0x00017dd0 ldrb r2, [r5, r3] | r2 = *((r5 + r3));
0x00017dd4 cmp r2, 0x20 |
| if (r2 < 0x20) {
0x00017dd8 bls 0x17e64 | goto label_14;
| }
| }
0x00017ddc mov r2, 0 | r2 = 0;
0x00017de0 add r3, sp, 0x228 | r3 += var_228h;
0x00017de4 add r3, r3, r4 | r3 += r4;
0x00017de8 cmp r4, r2 |
0x00017dec strb r2, [r3, -0x200] | s = r2;
0x00017df0 add r6, r6, 1 | r6++;
| if (r4 == r2) {
0x00017df4 beq 0x17d70 | goto label_3;
| }
0x00017df8 mov r8, 3 | r8 = 3;
0x00017dfc add fp, sp, 0x24 |
| do {
0x00017e00 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00017e04 str fp, [sp, 0xc] | var_ch = fp;
0x00017e08 str r3, [sp, 4] | var_4h_2 = r3;
0x00017e0c str sb, [sp, 8] | var_8h_2 = sb;
0x00017e10 str r5, [sp] | *(sp) = r5;
0x00017e14 mov r3, r4 | r3 = r4;
0x00017e18 mov r2, 1 | r2 = 1;
0x00017e1c mov r1, 0 | r1 = 0;
0x00017e20 mov r0, 8 | r0 = 8;
0x00017e24 bl 0x15478 | r0 = fcn_00015478 (r0, r1, r2, r3, r4, r5);
0x00017e28 cmp r0, 0 |
| if (r0 == 0) {
0x00017e2c bne 0x17e6c |
0x00017e30 ldr r3, [sp, 0x24] | r3 = var_24h;
| label_6:
0x00017e34 ldr r2, [sp, 0x20] | r2 = var_20h;
0x00017e38 cmp r2, 0 |
| if (r2 != 0) {
0x00017e3c beq 0x17e50 |
0x00017e40 sub r1, r2, 1 | r1 = r2 - 1;
0x00017e44 ldrb r0, [r3, r1] | r0 = *((r3 + r1));
0x00017e48 cmp r0, 0x20 |
| if (r0 < 0x20) {
0x00017e4c bls 0x17e8c | goto label_15;
| }
| }
0x00017e50 stm sp, {r4, r5} | *(sp) = r4;
| *((sp + 4)) = r5;
0x00017e54 mov r1, r6 | r1 = r6;
0x00017e58 mov r0, sl | r0 = sl;
0x00017e5c bl 0x12ab4 | printf (r0, r1);
0x00017e60 b 0x17d70 | goto label_3;
| label_14:
0x00017e64 mov r4, r3 | r4 = r3;
0x00017e68 b 0x17dc4 | goto label_4;
| }
0x00017e6c subs r8, r8, 1 | r8--;
0x00017e70 bne 0x17e00 |
| } while (r8 != r8);
0x00017e74 mov r3, r5 | r3 = r5;
0x00017e78 mov r2, r4 | r2 = r4;
0x00017e7c mov r1, r6 | r1 = r6;
0x00017e80 ldr r0, [pc, 0x2c] | r0 = "Done_sending_file";
0x00017e84 bl 0x12ab4 | printf ("Done_sending_file", r1, r2, r3);
0x00017e88 b 0x17d94 | goto label_5;
| label_15:
0x00017e8c str r1, [sp, 0x20] | var_20h = r1;
0x00017e90 b 0x17e34 | goto label_6;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x18d34 */
| #include <stdint.h>
|
; (fcn) fcn.00018d34 () | void fcn_00018d34 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_16h;
| int32_t var_18h;
| int32_t var_1ch;
| char * s2;
| int32_t var_2ch;
| r0 = arg1;
0x00018d34 push {r4, r5, r6, r7, lr} |
0x00018d38 ldr r1, [pc, 0xf8] | r1 = *(0x18e34);
0x00018d3c sub sp, sp, 0x2c |
0x00018d40 mov r2, 7 | r2 = 7;
0x00018d44 mov r6, r0 | r6 = r0;
0x00018d48 add r0, sp, 0x20 | r0 += s2;
0x00018d4c bl 0x124a8 | memcpy (r0, r1, r2);
0x00018d50 add r3, sp, 0x1c | r3 += var_1ch;
0x00018d54 str r3, [sp, 0xc] | var_ch = r3;
0x00018d58 add r3, sp, 0x18 | r3 += var_18h;
0x00018d5c mov r4, 0 | r4 = 0;
0x00018d60 str r3, [sp, 8] | var_8h = r3;
0x00018d64 add r3, sp, 0x16 | r3 += var_16h;
0x00018d68 str r3, [sp, 4] | var_4h = r3;
0x00018d6c str r4, [sp] | *(sp) = r4;
0x00018d70 mov r3, r4 | r3 = r4;
0x00018d74 mov r2, r4 | r2 = r4;
0x00018d78 mov r1, r4 | r1 = r4;
0x00018d7c mov r0, 0xc | r0 = 0xc;
0x00018d80 bl 0x15478 | r0 = fcn_00015478 (r0, r1, r2, r3, r4, r5);
0x00018d84 cmp r0, r4 |
| if (r0 == r4) {
0x00018d88 beq 0x18da8 | goto label_1;
| }
0x00018d8c ldr r3, [pc, 0xa8] | r3 = "nonce";
0x00018d90 ldr r0, [pc, 0xa8] | r0 = stderr;
0x00018d94 ldr r1, [r3] | r1 = "nonce";
0x00018d98 bl 0x12874 | fputs (r0, "nonce");
| do {
0x00018d9c mov r0, 0 | r0 = 0;
| label_0:
0x00018da0 add sp, sp, 0x2c |
0x00018da4 pop {r4, r5, r6, r7, pc} |
| label_1:
0x00018da8 ldr r4, [sp, 0x18] | r4 = var_18h;
0x00018dac ldr r7, [sp, 0x1c] | r7 = var_1ch;
0x00018db0 cmp r4, 6 |
| if (r4 >= 6) {
0x00018db4 bls 0x18dd4 |
0x00018db8 mov r2, 6 | r2 = 6;
0x00018dbc add r1, sp, 0x20 | r1 += s2;
0x00018dc0 mov r0, r7 | r0 = r7;
0x00018dc4 bl 0x125b0 | r0 = strncmp (r0, r1, r2);
0x00018dc8 mov r5, r0 | r5 = r0;
0x00018dcc cmp r0, 0 |
| if (r0 == 0) {
0x00018dd0 beq 0x18df0 | goto label_2;
| }
| }
0x00018dd4 ldr r0, [pc, 0x60] |
0x00018dd8 mov r3, r7 | r3 = r7;
0x00018ddc mov r2, r4 | r2 = r4;
0x00018de0 ldr r1, [pc, 0x5c] | r1 = "nonce_request_failed";
0x00018de4 ldr r0, [r0] | r0 = "nonce";
0x00018de8 bl 0x12910 | fprintf ("nonce", "nonce_request_failed", r2, r3)
0x00018dec b 0x18d9c |
| } while (1);
| label_2:
0x00018df0 sub r4, r4, 6 | r4 -= 6;
0x00018df4 cmp r4, 0x7f |
| if (r4 > 0x7f) {
0x00018df8 bhi 0x18da0 | goto label_0;
| }
0x00018dfc mov r2, r4 | r2 = r4;
0x00018e00 add r1, r7, 6 | r1 = r7 + 6;
0x00018e04 mov r0, r6 | r0 = r6;
0x00018e08 bl 0x124a8 | memcpy (r0, r1, r2);
0x00018e0c strb r5, [r6, r4] | *((r6 + r4)) = r5;
0x00018e10 add r4, r6, r4 | r4 = r6 + r4;
| do {
0x00018e14 ldrb r3, [r4, -1]! | r3 = *((r4 -= 1));
0x00018e18 cmp r3, 0xa |
0x00018e1c cmpne r3, 0xd | __asm ("cmpne r3, 0xd");
| if (r3 != 0xa) {
0x00018e20 bne 0x18e30 | goto label_3;
| }
0x00018e24 cmp r6, r4 |
0x00018e28 strb r5, [r4] | *(r4) = r5;
0x00018e2c bne 0x18e14 |
| } while (r6 != r4);
| label_3:
0x00018e30 mov r0, 1 | r0 = 1;
0x00018e34 b 0x18da0 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1a394 */
| #include <stdint.h>
|
; (fcn) fcn.0001a394 () | void fcn_0001a394 (int32_t arg_220h, int32_t arg_224h, int32_t arg_228h, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_0h_2;
| void * s1;
| int32_t var_1f8h;
| int32_t var_1fch;
| r0 = arg1;
| r1 = arg2;
0x0001a394 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001a398 sub sp, sp, 0x1fc |
0x0001a39c add r5, r0, 0x400 | r5 += arg_220hx400;
0x0001a3a0 add r4, sp, 0x24 | r4 += s1;
0x0001a3a4 add r8, r0, 8 | r8 = r0 + 8;
0x0001a3a8 add r5, r5, 8 | r5 += 8;
0x0001a3ac mov r7, r4 | r7 = r4;
0x0001a3b0 str r1, [sp, 0x14] | var_14h = r1;
0x0001a3b4 str r2, [sp, 0x18] | var_18h = r2;
0x0001a3b8 str r3, [sp, 0x1c] | var_1ch = r3;
| do {
0x0001a3bc cmp r8, r5 |
| if (r8 != r5) {
0x0001a3c0 beq 0x1a434 |
0x0001a3c4 ldr fp, [r8, -8] | fp = *((r8 - 8));
0x0001a3c8 cmp fp, 0 |
| if (fp == 0) {
0x0001a3cc beq 0x1a434 | goto label_0;
| }
0x0001a3d0 mov r0, fp | r0 = fp;
0x0001a3d4 bl 0x1261c | strlen (r0);
0x0001a3d8 ldr sb, [r8, -4] | sb = *((r8 - 4));
0x0001a3dc cmp sb, 0 |
| if (sb != 0) {
0x0001a3e0 moveq r6, sb | r6 = sb;
| }
0x0001a3e4 mov sl, r0 | sl = r0;
| if (sb != 0) {
0x0001a3e8 beq 0x1a3f8 |
0x0001a3ec mov r0, sb | r0 = sb;
0x0001a3f0 bl 0x1261c | r0 = strlen (r0);
0x0001a3f4 mov r6, r0 | r6 = r0;
| }
0x0001a3f8 cmp r4, r7 |
| if (r4 != r7) {
0x0001a3fc moveq r3, sl | r3 = sl;
| }
| if (r4 == r7) {
0x0001a400 addne r3, sl, 1 | r3 = sl + 1;
| }
0x0001a404 add r3, r3, r6 | r3 += r6;
0x0001a408 cmp r6, 0 |
| if (r6 == 0) {
0x0001a40c addne r3, r3, 1 | r3++;
| }
0x0001a410 add r3, r4, r3 | r3 = r4 + r3;
0x0001a414 add r2, sp, 0x1f8 | r2 += var_1f8h;
0x0001a418 cmp r2, r3 |
| if (r2 >= r3) {
0x0001a41c bhs 0x1a468 | goto label_1;
| }
0x0001a420 ldr r3, [pc, 0x98] | r3 = *(0x1a4bc);
0x0001a424 mov r2, fp | r2 = fp;
0x0001a428 ldr r1, [pc, 0x94] | r1 = stderr;
0x0001a42c ldr r0, [r3] | r0 = *(0x1a4bc);
0x0001a430 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
| label_0:
0x0001a434 ldr r3, [sp, 0x228] | r3 = *(arg_228h);
0x0001a438 add r0, sp, 0x14 | r0 += var_14h;
0x0001a43c str r3, [sp, 0xc] | var_ch = r3;
0x0001a440 ldr r3, [sp, 0x224] | r3 = *(arg_224h);
0x0001a444 str r7, [sp] | *(sp) = r7;
0x0001a448 str r3, [sp, 8] | var_8h = r3;
0x0001a44c ldr r3, [sp, 0x220] | r3 = *(arg_220h);
0x0001a450 str r3, [sp, 4] | var_4h = r3;
0x0001a454 sub r3, r4, r7 | r3 = r4 - r7;
0x0001a458 ldm r0, {r0, r1, r2} | r0 = *(r0);
| r1 = *((r0 + 4));
| r2 = *((r0 + 8));
0x0001a45c bl 0x15478 | fcn_00015478 (r0, r1, r2, r3, r4, r5);
0x0001a460 add sp, sp, 0x1fc |
0x0001a464 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0001a468 cmp r4, r7 |
| if (r4 == r7) {
0x0001a46c addne r3, r4, 1 | r3 = r4 + 1;
| }
| if (r4 == r7) {
0x0001a470 movne r2, 0x2c | r2 = 0x2c;
| }
| if (r4 != r7) {
0x0001a474 moveq r3, r7 | r3 = r7;
| }
| if (r4 == r7) {
0x0001a478 strbne r2, [r4] | *(r4) = r2;
| }
0x0001a47c mov r1, fp | r1 = fp;
0x0001a480 mov r2, sl | r2 = sl;
0x0001a484 mov r0, r3 | r0 = r3;
0x0001a488 bl 0x124a8 | memcpy (r0, r1, r2);
0x0001a48c cmp r6, 0 |
0x0001a490 add r4, r0, sl | r4 = r0 + sl;
| if (r6 != 0) {
0x0001a494 beq 0x1a4b8 |
0x0001a498 add r4, r4, 1 | r4 += s1;
0x0001a49c mov r2, 0x3d | r2 = 0x3d;
0x0001a4a0 strb r2, [r0, sl] | *((r0 + sl)) = r2;
0x0001a4a4 mov r1, sb | r1 = sb;
0x0001a4a8 mov r0, r4 | r0 = r4;
0x0001a4ac mov r2, r6 | r2 = r6;
0x0001a4b0 bl 0x124a8 | memcpy (r0, r1, r2);
0x0001a4b4 add r4, r4, r6 | r4 += r6;
| }
0x0001a4b8 add r8, r8, 8 | r8 += 8;
0x0001a4bc b 0x1a3bc |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1a9dc */
| #include <stdint.h>
|
; (fcn) fcn.0001a9dc () | void fcn_0001a9dc (int32_t arg_38h, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_16h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_24h;
| r0 = arg1;
| r1 = arg2;
0x0001a9dc push {r4, r5, r6, r7, lr} |
0x0001a9e0 mov r7, r3 | r7 = r3;
0x0001a9e4 ldr r3, [pc, 0x10c] |
0x0001a9e8 sub sp, sp, 0x24 |
0x0001a9ec ldr r3, [r3] | r3 = *(0x1aaf4);
0x0001a9f0 mov r6, r1 | r6 = r1;
0x0001a9f4 cmp r3, 0 |
0x0001a9f8 mov r1, r2 | r1 = r2;
0x0001a9fc ldr r5, [sp, 0x38] | r5 = *(arg_38h);
| if (r3 == 0) {
0x0001aa00 movne r4, 0 | r4 = 0;
| }
| if (r3 == 0) {
0x0001aa04 bne 0x1aa14 |
0x0001aa08 ldr r4, [r0] | r4 = *(r0);
0x0001aa0c adds r4, r4, 0 | r4 += 0;
| if (r4 != r4) {
0x0001aa10 movne r4, 1 | r4 = 1;
| goto label_1;
| }
| }
| label_1:
0x0001aa14 add r3, sp, 0x18 | r3 += var_18h;
0x0001aa18 str r3, [sp, 8] | var_8h = r3;
0x0001aa1c add r3, sp, 0x1c | r3 += var_1ch;
0x0001aa20 str r3, [sp, 4] | var_4h = r3;
0x0001aa24 add r3, sp, 0x16 | r3 += var_16h;
0x0001aa28 str r3, [sp] | *(sp) = r3;
0x0001aa2c mov r2, r6 | r2 = r6;
0x0001aa30 mov r3, 0 | r3 = 0;
0x0001aa34 bl 0x1a394 | r0 = fcn_0001a394 (r0, r1, r2, r3, r4);
0x0001aa38 cmp r0, 0 |
| if (r0 == 0) {
0x0001aa3c movne r0, 0 | r0 = 0;
| }
| if (r0 != 0) {
0x0001aa40 bne 0x1aa98 | goto label_2;
| }
0x0001aa44 ldr r3, [pc, 0xb0] |
0x0001aa48 ldr r3, [r3] | r3 = *(0x1aaf8);
0x0001aa4c cmp r3, 1 |
| if (r3 >= 1) {
0x0001aa50 bls 0x1aa64 |
0x0001aa54 ldr r2, [pc, 0xa4] | r2 = *(0x1aafc);
0x0001aa58 ldr r1, [pc, 0xa4] | r1 = *(0x1ab00);
0x0001aa5c mov r0, r5 | r0 = r5;
0x0001aa60 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x0001aa64 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001aa68 cmp r3, 0 |
| if (r3 != 0) {
0x0001aa6c bne 0x1aac4 | goto label_3;
| }
0x0001aa70 cmp r6, 0 |
| if (r6 != 0) {
0x0001aa74 bne 0x1aaa0 | goto label_4;
| }
0x0001aa78 ldr r3, [pc, 0x88] | r3 = "server_s_";
0x0001aa7c cmp r7, 3 |
0x0001aa80 ldr r2, [pc, 0x84] | r2 = *(0x1ab08);
0x0001aa84 ldr r1, [pc, 0x84] | r1 = "clock";
| if (r7 == 3) {
0x0001aa88 movne r2, r3 | r2 = r3;
| }
0x0001aa8c mov r0, r5 | r0 = r5;
0x0001aa90 bl 0x12910 | fprintf (r0, "clock", r2, "server_s_")
| do {
| label_0:
0x0001aa94 mov r0, 1 | r0 = 1;
| label_2:
0x0001aa98 add sp, sp, 0x24 |
0x0001aa9c pop {r4, r5, r6, r7, pc} |
| label_4:
0x0001aaa0 ldr r1, [pc, 0x64] | r1 = *(0x1ab08);
0x0001aaa4 cmp r7, 3 |
0x0001aaa8 ldr r2, [pc, 0x58] | r2 = "server_s_";
0x0001aaac mov r3, r6 | r3 = r6;
| if (r7 != 3) {
0x0001aab0 moveq r2, r1 | r2 = r1;
| }
0x0001aab4 mov r0, r5 | r0 = r5;
0x0001aab8 ldr r1, [pc, 0x54] | r1 = "No system%s variables returned\n";
0x0001aabc bl 0x12910 | fprintf (r0, r1, "server_s_", r3)
0x0001aac0 b 0x1aa94 |
| } while (1);
| label_3:
0x0001aac4 cmp r4, 0 |
| if (r4 == 0) {
0x0001aac8 bne 0x1aadc |
0x0001aacc mov r2, r6 | r2 = r6;
0x0001aad0 ldr r1, [pc, 0x40] | r1 = "No information returned for%s association %u\n";
0x0001aad4 mov r0, r5 | r0 = r5;
0x0001aad8 bl 0x12910 | fprintf (r0, "No information returned for%s association %u\n", r2)
| }
0x0001aadc ldrh r2, [sp, 0x16] | r2 = var_16h;
0x0001aae0 stm sp, {r4, r5} | *(sp) = r4;
| *((sp + 4)) = r5;
0x0001aae4 ldr r1, [sp, 0x18] | r1 = var_18h;
0x0001aae8 mov r3, r7 | r3 = r7;
0x0001aaec ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x0001aaf0 bl 0x16bd0 | fcn_00016bd0 (r0, r1, r2, r3);
0x0001aaf4 b 0x1aa94 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1b140 */
| #include <stdint.h>
|
; (fcn) fcn.0001b140 () | void fcn_0001b140 (int32_t arg_94h, int32_t arg_248h, int32_t arg_24ch, int32_t arg_250h, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_14h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_30h;
| int32_t var_34h;
| int32_t var_38h;
| int32_t var_3ch;
| int32_t var_40h;
| int32_t var_44h;
| int32_t var_48h;
| int32_t var_4ch;
| int32_t var_50h;
| int32_t var_54h;
| int32_t var_58h;
| int32_t var_5ch;
| int32_t var_60h;
| int32_t var_64h;
| int32_t var_68h;
| int32_t var_6ch;
| int32_t var_70h;
| int32_t var_74h;
| int32_t var_78h;
| int32_t var_7ch;
| int32_t var_80h;
| int32_t var_84h;
| int32_t var_88h;
| int32_t var_90h;
| int32_t var_98h;
| int32_t var_a4h;
| char * src;
| int32_t var_b4h;
| int32_t var_b8h;
| int32_t var_bch;
| int32_t var_c0h;
| int32_t var_c4h;
| void * var_cch;
| int32_t var_e8h;
| int32_t var_ech;
| int32_t var_f0h;
| int32_t var_104h;
| int32_t var_108h;
| int32_t var_10ch;
| int32_t var_110h;
| int32_t var_114h;
| int32_t var_118h;
| int8_t var_100h;
| char * dest;
| int32_t var_0h_2;
| int32_t var_220h;
| int32_t var_224h;
| r0 = arg1;
| r1 = arg2;
0x0001b140 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001b144 ldr r8, [pc, 0xb34] | r8 = *(0x1bc7c);
0x0001b148 sub sp, sp, 0x224 |
0x0001b14c mov r4, 0 | r4 = 0;
0x0001b150 mov sl, r0 | sl = r0;
0x0001b154 ldr fp, [pc, 0xb28] | fp = *(0x0001bc84);
0x0001b158 add r0, sp, 0x90 | r0 += var_90h;
0x0001b15c str r3, [sp, 0x34] | var_34h = r3;
0x0001b160 str r1, [sp, 0x28] | var_28h = r1;
0x0001b164 str r2, [sp, 0x2c] | var_2ch = r2;
0x0001b168 ldr r7, [sp, 0x24c] | r7 = *(arg_24ch);
0x0001b16c str r4, [sp, 0x3c] | var_3ch = r4;
0x0001b170 str r4, [sp, 0x40] | var_40h = r4;
0x0001b174 str r4, [sp, 0x44] | var_44h = r4;
0x0001b178 str r4, [sp, 0x4c] | var_4ch = r4;
0x0001b17c str r4, [sp, 0x50] | var_50h = r4;
0x0001b180 str r4, [sp, 0x54] | var_54h = r4;
0x0001b184 str r4, [sp, 0x58] | var_58h = r4;
0x0001b188 str r4, [sp, 0x5c] | var_5ch = r4;
0x0001b18c bl 0x28bd4 | fcn_00028bd4 (r0);
0x0001b190 mov r2, 0x1c | r2 = 0x1c;
0x0001b194 mov r1, r4 | r1 = r4;
0x0001b198 add r0, sp, 0xb0 | r0 += src;
0x0001b19c bl 0x128b0 | memset (r0, r1, r2);
0x0001b1a0 mov sb, 0x3f | sb = 0x3f;
0x0001b1a4 mov r2, 0x1c | r2 = 0x1c;
0x0001b1a8 mov r1, r4 | r1 = r4;
0x0001b1ac add r0, sp, 0xcc | r0 += var_cch;
0x0001b1b0 bl 0x128b0 | memset (r0, r1, r2);
0x0001b1b4 strb r4, [sp, 0x120] | dest = r4;
0x0001b1b8 str r4, [sp, 0x60] | var_60h = r4;
0x0001b1bc str r4, [sp, 0x64] | var_64h = r4;
0x0001b1c0 str r4, [sp, 0x68] | var_68h = r4;
0x0001b1c4 str r4, [sp, 0x6c] | var_6ch = r4;
0x0001b1c8 str r4, [sp, 0x70] | var_70h = r4;
0x0001b1cc str r4, [sp, 0x74] | var_74h = r4;
0x0001b1d0 str r4, [sp, 0x78] | var_78h = r4;
0x0001b1d4 str r4, [sp, 0x7c] | var_7ch = r4;
0x0001b1d8 str r4, [sp, 0x1c] | var_1ch = r4;
0x0001b1dc str r4, [sp, 0x20] | var_20h = r4;
0x0001b1e0 str r4, [sp, 0x24] | var_24h = r4;
| do {
| label_0:
0x0001b1e4 add r3, sp, 0x3c | r3 += var_3ch;
0x0001b1e8 add r2, sp, 0x38 | r2 += var_38h;
0x0001b1ec add r1, sp, 0x248 | r1 += arg_248h;
0x0001b1f0 add r0, sp, 0x34 | r0 += var_34h;
0x0001b1f4 bl 0x162e4 | r0 = fcn_000162e4 (r0, r1);
0x0001b1f8 cmp r0, 0 |
| if (r0 == 0) {
0x0001b1fc bne 0x1b22c |
0x0001b200 ldr r3, [sp, 0x40] | r3 = var_40h;
0x0001b204 sub r3, r3, 1 | r3--;
0x0001b208 cmp r3, 5 |
| if (r3 > 5) {
| /* switch table (6 cases) at 0x1b214 */
0x0001b20c ldrls pc, [pc, r3, lsl 2] | offset_0 = r3 << 2;
| pc = *((pc + offset_0));
| }
0x0001b210 b 0x1b828 | goto label_5;
| }
0x0001b22c ldr r6, [sp, 0x38] | r6 = var_38h;
0x0001b230 cmp r6, 0 |
| if (r6 != 0) {
0x0001b234 beq 0x1b244 |
0x0001b238 ldr r5, [sp, 0x3c] | r5 = var_3ch;
0x0001b23c cmp r5, 0 |
| if (r5 != 0) {
0x0001b240 bne 0x1b258 | goto label_16;
| }
| }
0x0001b244 ldr r3, [pc, 0xa3c] | r3 = *(0x1bc84);
0x0001b248 mov r2, 2 | r2 = 2;
0x0001b24c ldr r1, [pc, 0xa38] | r1 = "name && value";
0x0001b250 ldr r0, [pc, 0xa38] | r0 = *(0x1bc8c);
0x0001b254 bl 0x2f7d0 | fcn_0002f7d0 ();
| label_16:
0x0001b258 mov r1, r6 | r1 = r6;
0x0001b25c ldr r0, [pc, 0xa30] | r0 = "ntpq-subs.c";
0x0001b260 bl 0x12a24 | r0 = strcmp ("ntpq-subs.c", r1);
0x0001b264 cmp r0, 0 |
| if (r0 != 0) {
0x0001b268 beq 0x1b280 |
0x0001b26c mov r1, r6 | r1 = r6;
0x0001b270 ldr r0, [pc, 0xa20] | r0 = "srcadr";
0x0001b274 bl 0x12a24 | r0 = strcmp ("srcadr", r1);
0x0001b278 cmp r0, 0 |
| if (r0 != 0) {
0x0001b27c bne 0x1b2ac | goto label_17;
| }
| }
0x0001b280 add r1, sp, 0xb0 | r1 += src;
0x0001b284 mov r0, r5 | r0 = r5;
0x0001b288 bl 0x2a5a8 | r0 = fcn_0002a5a8 (r0, r1);
0x0001b28c cmp r0, 0 |
0x0001b290 bne 0x1b1e4 |
| } while (r0 != 0);
0x0001b294 ldr r0, [pc, 0xa00] |
0x0001b298 ldrd r2, r3, [sp, 0x38] | __asm ("ldrd r2, r3, [var_3ch]");
0x0001b29c ldr r1, [pc, 0x9fc] | r1 = stderr;
0x0001b2a0 ldr r0, [r0] | r0 = "peeradr";
0x0001b2a4 bl 0x12910 | fprintf ("peeradr", r1, r2)
0x0001b2a8 b 0x1b1e4 | goto label_0;
| label_17:
0x0001b2ac mov r1, r6 | r1 = r6;
0x0001b2b0 ldr r0, [pc, 0x9ec] | r0 = "malformed__s_s";
0x0001b2b4 bl 0x12a24 | r0 = strcmp ("malformed__s_s", r1);
0x0001b2b8 subs r3, r0, 0 | r3 = r0 - 0;
0x0001b2bc str r3, [sp, 0x30] | var_30h = r3;
| if (r3 != r0) {
0x0001b2c0 bne 0x1b320 | goto label_18;
| }
0x0001b2c4 ldr r2, [pc, 0x9dc] | r2 = "srchost";
0x0001b2c8 add r3, fp, 0x94 | r3 += arg_94h;
0x0001b2cc cmp sl, r3 |
0x0001b2d0 cmpne sl, r2 | __asm ("cmpne sl, r2");
| if (sl != r3) {
0x0001b2d4 bne 0x1b1e4 | goto label_0;
| }
0x0001b2d8 mov r0, r5 | r0 = r5;
0x0001b2dc bl 0x1261c | r0 = strlen (r0);
0x0001b2e0 sub r3, r0, 3 | r3 = r0 - 3;
0x0001b2e4 cmp r3, 0xfc |
| if (r3 > 0xfc) {
0x0001b2e8 bhi 0x1b1e4 | goto label_0;
| }
0x0001b2ec sub r6, r0, 2 | r6 = r0 - 2;
0x0001b2f0 add r1, r5, 1 | r1 = r5 + 1;
0x0001b2f4 mov r2, r6 | r2 = r6;
0x0001b2f8 add r0, sp, 0x120 | r0 += dest;
0x0001b2fc str r1, [sp, 0x3c] | var_3ch = r1;
0x0001b300 bl 0x124a8 | memcpy (r0, r1, r2);
0x0001b304 add r3, sp, 0x220 | r3 += var_220h;
0x0001b308 add r6, r3, r6 | r6 = r3 + r6;
0x0001b30c ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001b310 strb r3, [r6, -0x100] | var_100h = r3;
0x0001b314 mov r3, 1 | r3 = 1;
0x0001b318 str r3, [sp, 0x24] | var_24h = r3;
0x0001b31c b 0x1b1e4 | goto label_0;
| label_18:
0x0001b320 mov r1, r6 | r1 = r6;
0x0001b324 ldr r0, [pc, 0x980] | r0 = "srcadr";
0x0001b328 bl 0x12a24 | r0 = strcmp ("srcadr", r1);
0x0001b32c cmp r0, 0 |
| if (r0 != 0) {
0x0001b330 bne 0x1b408 | goto label_19;
| }
0x0001b334 add r1, sp, 0xe8 | r1 += var_e8h;
0x0001b338 mov r0, r5 | r0 = r5;
0x0001b33c bl 0x2a5a8 | r0 = fcn_0002a5a8 (r0, r1);
0x0001b340 cmp r0, 0 |
| if (r0 == 0) {
0x0001b344 beq 0x1b1e4 | goto label_0;
| }
0x0001b348 ldrh r3, [sp, 0xe8] | r3 = var_e8h;
0x0001b34c cmp r3, 2 |
| if (r3 != 2) {
0x0001b350 beq 0x1b364 |
0x0001b354 cmp r3, 0xa |
| if (r3 == 0xa) {
0x0001b358 beq 0x1b3f4 | goto label_20;
| }
0x0001b35c mov sb, 0x2d | sb = 0x2d;
0x0001b360 b 0x1b3a8 |
| } else {
0x0001b364 ldr r0, [sp, 0xec] | r0 = var_ech;
0x0001b368 bl 0x374d8 | r0 = fcn_000374d8 (r0);
0x0001b36c and r3, r0, 0xf0000000 | r3 = r0 & 0xf0000000;
0x0001b370 cmp r3, 0xe0000000 |
| if (r3 != 0xe0000000) {
0x0001b374 moveq sb, 0x6d | sb = 0x6d;
| }
| if (r3 == 0xe0000000) {
0x0001b378 beq 0x1b3a8 | goto label_1;
| }
0x0001b37c and r3, r0, 0xff | r3 = r0 & 0xff;
0x0001b380 cmp r3, 0xff |
| if (r3 != 0xff) {
0x0001b384 moveq sb, 0x62 | sb = 0x62;
| }
| if (r3 == 0xff) {
0x0001b388 beq 0x1b3a8 | goto label_1;
| }
0x0001b38c ldr r3, [pc, 0x91c] | r3 = "dstadr";
0x0001b390 cmp r0, r3 |
| if (r0 != r3) {
0x0001b394 moveq sb, 0x6c | sb = 0x6c;
| }
| if (r0 == r3) {
0x0001b398 beq 0x1b3a8 | goto label_1;
| }
0x0001b39c bics r3, r0, 0x1f | __asm ("bics r3, r0, 0x1f");
| if (r0 == r3) {
0x0001b3a0 movne sb, 0x75 | sb = 0x75;
| }
| if (r0 == r3) {
0x0001b3a4 moveq sb, 0x2d | sb = 0x2d;
| goto label_1;
| }
| }
| label_1:
0x0001b3a8 add ip, sp, 0xe8 |
0x0001b3ac ldm ip!, {r0, r1, r2, r3} | r0 = *(ip!);
| r1 = *((ip! + 4));
| r2 = *((ip! + 8));
| r3 = *((ip! + 12));
0x0001b3b0 add lr, sp, 0xcc | lr += var_cch;
0x0001b3b4 stm lr!, {r0, r1, r2, r3} | *(lr!) = r0;
| *((lr! + 4)) = r1;
| *((lr! + 8)) = r2;
| *((lr! + 12)) = r3;
0x0001b3b8 ldr r3, [pc, 0x8f4] | r3 = *(0x1bcb0);
0x0001b3bc ldm ip, {r0, r1, r2} | r0 = *(ip);
| r1 = *((ip + 4));
| r2 = *((ip + 8));
0x0001b3c0 cmp sl, r3 |
| if (sl == r3) {
0x0001b3c4 movne r3, 1 | r3 = 1;
| }
0x0001b3c8 stm lr, {r0, r1, r2} | *(lr) = r0;
| *((lr + 4)) = r1;
| *((lr + 8)) = r2;
| if (sl != r3) {
0x0001b3cc strne r3, [sp, 0x20] | var_20h = r3;
| goto label_21;
| }
| if (sl != r3) {
| label_21:
0x0001b3d0 bne 0x1b1e4 | goto label_0;
| }
0x0001b3d4 add r0, sp, 0xcc | r0 += var_cch;
0x0001b3d8 bl 0x2e774 | fcn_0002e774 (r0);
0x0001b3dc mov r1, 0xf | r1 = 0xf;
0x0001b3e0 bl 0x16178 | fcn_00016178 (r0, r1);
0x0001b3e4 mov r4, 1 | r4 = 1;
0x0001b3e8 str r4, [sp, 0x20] | var_20h = r4;
0x0001b3ec mov r8, r0 | r8 = r0;
0x0001b3f0 b 0x1b1e4 | goto label_0;
| label_20:
0x0001b3f4 ldrb r3, [sp, 0xf0] | r3 = var_f0h;
0x0001b3f8 cmp r3, 0xff |
| if (r3 == 0xff) {
0x0001b3fc movne sb, 0x75 | sb = 0x75;
| }
| if (r3 != 0xff) {
0x0001b400 moveq sb, 0x6d | sb = 0x6d;
| }
0x0001b404 b 0x1b3a8 | goto label_1;
| label_19:
0x0001b408 mov r1, r6 | r1 = r6;
0x0001b40c ldr r0, [pc, 0x8a4] | r0 = "srcadr";
0x0001b410 bl 0x12a24 | r0 = strcmp ("srcadr", r1);
0x0001b414 cmp r0, 0 |
| if (r0 == 0) {
0x0001b418 bne 0x1b42c |
0x0001b41c add r1, sp, 0x40 | r1 += var_40h;
0x0001b420 mov r0, r5 | r0 = r5;
0x0001b424 bl 0x15e14 | fcn_00015e14 (r0, r1);
0x0001b428 b 0x1b1e4 | goto label_0;
| }
0x0001b42c mov r1, r6 | r1 = r6;
0x0001b430 ldr r0, [pc, 0x884] | r0 = "hmode";
0x0001b434 bl 0x12a24 | r0 = strcmp ("hmode", r1);
0x0001b438 cmp r0, 0 |
| if (r0 != 0) {
0x0001b43c bne 0x1b5e0 | goto label_22;
| }
0x0001b440 ldr r3, [pc, 0x878] | r3 = "refid";
0x0001b444 cmp sl, r3 |
| if (sl != r3) {
0x0001b448 bne 0x1bc38 | goto label_23;
| }
0x0001b44c mov r0, r5 | r0 = r5;
0x0001b450 bl 0x1261c | strlen (r0);
0x0001b454 ldr r3, [pc, 0x868] | r3 = "srcadr";
0x0001b458 ldr r6, [r3] | r6 = "srcadr";
0x0001b45c cmp r6, 1 |
0x0001b460 mov r2, r0 | r2 = r0;
| if (r6 != 1) {
0x0001b464 bne 0x1bc44 | goto label_24;
| }
0x0001b468 cmp r0, 0 |
| if (r0 == 0) {
0x0001b46c beq 0x1b7e0 | goto label_13;
| }
0x0001b470 cmp r0, 4 |
| if (r0 > 4) {
0x0001b474 addls r0, sp, 0x220 | r0 += var_220h;
| }
| if (r0 > 4) {
0x0001b478 movls r1, 0 | r1 = 0;
| }
| if (r0 > 4) {
0x0001b47c strls r1, [r0, -0x1d8]! | *((r0 -= 0x1d8)) = r1;
| }
| if (r0 < 4) {
0x0001b480 bls 0x1bc68 | goto label_25;
| }
0x0001b484 add r1, sp, 0x104 | r1 += var_104h;
0x0001b488 mov r0, r5 | r0 = r5;
0x0001b48c bl 0x2a5a8 | r0 = fcn_0002a5a8 (r0, r1);
0x0001b490 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x0001b494 beq 0x1b1e4 | goto label_0;
| }
0x0001b498 add r3, sp, 0x104 | r3 += var_104h;
0x0001b49c ldrh r3, [r3] | r3 = *(r3);
0x0001b4a0 cmp r3, 2 |
| if (r3 != 2) {
0x0001b4a4 bne 0x1b4e0 | goto label_26;
| }
0x0001b4a8 ldr r0, [sp, 0x108] | r0 = var_108h;
0x0001b4ac cmp r0, 0 |
| if (r0 == 0) {
0x0001b4b0 beq 0x1b7e8 | goto label_27;
| }
0x0001b4b4 bl 0x374d8 | fcn_000374d8 (r0);
0x0001b4b8 ldr r3, [pc, 0x808] | r3 = *(0x1bcc4);
0x0001b4bc lsr r0, r0, 0x10 | r0 >>= 0x10;
0x0001b4c0 lsl r0, r0, 0x10 | r0 <<= 0x10;
0x0001b4c4 cmp r0, r3 |
| if (r0 != r3) {
0x0001b4c8 bne 0x1b518 | goto label_28;
| }
| label_2:
0x0001b4cc add r0, sp, 0x104 | r0 += var_104h;
0x0001b4d0 bl 0x2d0e0 | r0 = fcn_0002d0e0 (r0);
| do {
| label_15:
0x0001b4d4 mov r8, r0 | r8 = r0;
| label_3:
0x0001b4d8 mov r4, 1 | r4 = 1;
0x0001b4dc b 0x1b1e4 | goto label_0;
| label_26:
0x0001b4e0 ldr r3, [sp, 0x10c] | r3 = var_10ch;
0x0001b4e4 cmp r3, 0 |
| if (r3 == 0) {
0x0001b4e8 bne 0x1b518 |
0x0001b4ec ldr r3, [sp, 0x110] | r3 = var_110h;
0x0001b4f0 cmp r3, 0 |
| if (r3 != 0) {
0x0001b4f4 bne 0x1b518 | goto label_28;
| }
0x0001b4f8 ldr r3, [sp, 0x114] | r3 = var_114h;
0x0001b4fc cmp r3, 0 |
| if (r3 != 0) {
0x0001b500 bne 0x1b518 | goto label_28;
| }
0x0001b504 ldr r4, [sp, 0x118] | r4 = var_118h;
0x0001b508 clz r4, r4 | r4 &= r4;
0x0001b50c lsr r4, r4, 5 | r4 >>= 5;
0x0001b510 cmp r4, 0 |
| if (r4 != 0) {
0x0001b514 bne 0x1b7f0 | goto label_29;
| }
| }
| label_28:
0x0001b518 add r0, sp, 0x104 | r0 += var_104h;
0x0001b51c bl 0x2e774 | fcn_0002e774 (r0);
0x0001b520 b 0x1b4d4 |
| } while (1);
| label_14:
0x0001b524 add r1, sp, 0x104 | r1 += var_104h;
0x0001b528 mov r0, r5 | r0 = r5;
0x0001b52c bl 0x2a5a8 | r0 = fcn_0002a5a8 (r0, r1);
0x0001b530 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x0001b534 beq 0x1b1e4 | goto label_0;
| }
0x0001b538 add r3, sp, 0x104 | r3 += var_104h;
0x0001b53c ldrh r3, [r3] | r3 = *(r3);
0x0001b540 cmp r3, 2 |
| if (r3 == 2) {
0x0001b544 bne 0x1b570 |
0x0001b548 ldr r0, [sp, 0x108] | r0 = var_108h;
0x0001b54c cmp r0, 0 |
| if (r0 == 0) {
0x0001b550 beq 0x1b7e8 | goto label_27;
| }
0x0001b554 bl 0x374d8 | fcn_000374d8 (r0);
0x0001b558 ldr r3, [pc, 0x768] | r3 = *(0x1bcc4);
0x0001b55c lsr r0, r0, 0x10 | r0 >>= 0x10;
0x0001b560 lsl r0, r0, 0x10 | r0 <<= 0x10;
0x0001b564 cmp r0, r3 |
| if (r0 != r3) {
0x0001b568 bne 0x1b5a8 | goto label_30;
| }
0x0001b56c b 0x1b4cc | goto label_2;
| }
0x0001b570 ldr r3, [sp, 0x10c] | r3 = var_10ch;
0x0001b574 cmp r3, 0 |
| if (r3 == 0) {
0x0001b578 bne 0x1b5a8 |
0x0001b57c ldr r3, [sp, 0x110] | r3 = var_110h;
0x0001b580 cmp r3, 0 |
| if (r3 != 0) {
0x0001b584 bne 0x1b5a8 | goto label_30;
| }
0x0001b588 ldr r3, [sp, 0x114] | r3 = var_114h;
0x0001b58c cmp r3, 0 |
| if (r3 != 0) {
0x0001b590 bne 0x1b5a8 | goto label_30;
| }
0x0001b594 ldr r4, [sp, 0x118] | r4 = var_118h;
0x0001b598 clz r4, r4 | r4 &= r4;
0x0001b59c lsr r4, r4, 5 | r4 >>= 5;
0x0001b5a0 cmp r4, 0 |
| if (r4 != 0) {
0x0001b5a4 bne 0x1b7f0 | goto label_29;
| }
| }
| label_30:
0x0001b5a8 mov r3, 0 | r3 = 0;
0x0001b5ac mov r2, r3 | r2 = r3;
0x0001b5b0 mov r1, 0xa | r1 = 0xa;
0x0001b5b4 mov r0, r3 | r0 = r3;
0x0001b5b8 bl 0x2aa08 | r0 = fcn_0002aa08 (r0, r1);
0x0001b5bc mov r8, r0 | r8 = r0;
0x0001b5c0 ldr r0, [sp, 0x108] | r0 = var_108h;
0x0001b5c4 bl 0x374d8 | fcn_000374d8 (r0);
0x0001b5c8 ldr r2, [pc, 0x6fc] | r2 = *(0x1bcc8);
0x0001b5cc mov r1, 0xa | r1 = 0xa;
0x0001b5d0 mov r3, r0 | r3 = r0;
0x0001b5d4 mov r0, r8 | r0 = r8;
0x0001b5d8 bl 0x2e74c | fcn_0002e74c ();
0x0001b5dc b 0x1b4d8 | goto label_3;
| label_22:
0x0001b5e0 mov r1, r6 | r1 = r6;
0x0001b5e4 ldr r0, [pc, 0x6e4] | r0 = "_0x";
0x0001b5e8 bl 0x12a24 | r0 = strcmp ("_0x", r1);
0x0001b5ec cmp r0, 0 |
| if (r0 != 0) {
0x0001b5f0 addeq r1, sp, 0x4c | r1 += var_4ch;
| }
| if (r0 == 0) {
0x0001b5f4 beq 0x1b788 | goto label_4;
| }
0x0001b5f8 mov r1, r6 | r1 = r6;
0x0001b5fc ldr r0, [pc, 0x6d0] | r0 = *(0x1bcd0);
0x0001b600 bl 0x12a24 | r0 = strcmp (r0, r1);
0x0001b604 cmp r0, 0 |
| if (r0 != 0) {
0x0001b608 bne 0x1b634 | goto label_31;
| }
0x0001b60c add r1, sp, 0x54 | r1 += var_54h;
0x0001b610 mov r0, r5 | r0 = r5;
0x0001b614 bl 0x15e14 | r0 = fcn_00015e14 (r0, r1);
0x0001b618 cmp r0, 0 |
| if (r0 == 0) {
0x0001b61c beq 0x1b1e4 | goto label_0;
| }
0x0001b620 ldr r3, [sp, 0x54] | r3 = var_54h;
0x0001b624 cmp r3, 0 |
| if (r3 >= 0) {
0x0001b628 movlt r3, 3 | r3 = 3;
| }
| if (r3 >= 0) {
0x0001b62c strlt r3, [sp, 0x54] | var_54h = r3;
| }
0x0001b630 b 0x1b1e4 | goto label_0;
| label_31:
0x0001b634 mov r1, r6 | r1 = r6;
0x0001b638 ldr r0, [pc, 0x698] | r0 = "hpoll";
0x0001b63c bl 0x12a24 | r0 = strcmp ("hpoll", r1);
0x0001b640 cmp r0, 0 |
| if (r0 != 0) {
0x0001b644 bne 0x1b670 | goto label_32;
| }
0x0001b648 add r1, sp, 0x50 | r1 += var_50h;
0x0001b64c mov r0, r5 | r0 = r5;
0x0001b650 bl 0x15e14 | r0 = fcn_00015e14 (r0, r1);
0x0001b654 cmp r0, 0 |
| if (r0 == 0) {
0x0001b658 beq 0x1b1e4 | goto label_0;
| }
0x0001b65c ldr r3, [sp, 0x50] | r3 = var_50h;
0x0001b660 cmp r3, 0 |
| if (r3 >= 0) {
0x0001b664 movlt r3, 3 | r3 = 3;
| }
| if (r3 >= 0) {
0x0001b668 strlt r3, [sp, 0x50] | var_50h = r3;
| }
0x0001b66c b 0x1b1e4 | goto label_0;
| label_32:
0x0001b670 mov r1, r6 | r1 = r6;
0x0001b674 ldr r0, [pc, 0x660] | r0 = "ppoll";
0x0001b678 bl 0x12a24 | r0 = strcmp ("ppoll", r1);
0x0001b67c cmp r0, 0 |
| if (r0 != 0) {
0x0001b680 addeq r1, sp, 0x58 | r1 += var_58h;
| }
| if (r0 == 0) {
0x0001b684 beq 0x1b788 | goto label_4;
| }
0x0001b688 mov r1, r6 | r1 = r6;
0x0001b68c ldr r0, [pc, 0x64c] | r0 = *(0x1bcdc);
0x0001b690 bl 0x12a24 | r0 = strcmp (r0, r1);
0x0001b694 cmp r0, 0 |
| if (r0 != 0) {
0x0001b698 addeq r1, sp, 0x68 | r1 += var_68h;
| }
| if (r0 == 0) {
0x0001b69c beq 0x1b72c | goto label_33;
| }
0x0001b6a0 mov r1, r6 | r1 = r6;
0x0001b6a4 ldr r0, [pc, 0x638] | r0 = *(0x1bce0);
0x0001b6a8 bl 0x12a24 | r0 = strcmp (r0, r1);
0x0001b6ac cmp r0, 0 |
| if (r0 != 0) {
0x0001b6b0 addeq r1, sp, 0x60 | r1 += var_60h;
| }
| if (r0 == 0) {
0x0001b6b4 beq 0x1b72c | goto label_33;
| }
0x0001b6b8 mov r1, r6 | r1 = r6;
0x0001b6bc ldr r0, [pc, 0x624] | r0 = *(0x1bce4);
0x0001b6c0 bl 0x12a24 | r0 = strcmp (r0, r1);
0x0001b6c4 cmp r0, 0 |
| if (r0 != 0) {
0x0001b6c8 bne 0x1b700 | goto label_34;
| }
0x0001b6cc ldr r2, [pc, 0x5d4] | r2 = "srchost";
0x0001b6d0 add r3, fp, 0x94 | r3 += arg_94h;
0x0001b6d4 cmp sl, r3 |
0x0001b6d8 cmpne sl, r2 | __asm ("cmpne sl, r2");
| if (sl != r3) {
0x0001b6dc bne 0x1b1e4 | goto label_0;
| }
0x0001b6e0 add r1, sp, 0x70 | r1 += var_70h;
0x0001b6e4 mov r0, r5 | r0 = r5;
0x0001b6e8 bl 0x15e10 | fcn_00015e10 (r0, r1);
0x0001b6ec ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001b6f0 cmp r0, 0 |
| if (r0 == 0) {
0x0001b6f4 movne r3, 1 | r3 = 1;
| }
0x0001b6f8 str r3, [sp, 0x1c] | var_1ch = r3;
0x0001b6fc b 0x1b1e4 | goto label_0;
| label_34:
0x0001b700 mov r1, r6 | r1 = r6;
0x0001b704 ldr r0, [pc, 0x5e0] | r0 = *(0x1bce8);
0x0001b708 bl 0x12a24 | r0 = strcmp (r0, r1);
0x0001b70c cmp r0, 0 |
| if (r0 != 0) {
0x0001b710 beq 0x1b728 |
0x0001b714 mov r1, r6 | r1 = r6;
0x0001b718 ldr r0, [pc, 0x5d0] | r0 = "rootdisp";
0x0001b71c bl 0x12a24 | r0 = strcmp ("rootdisp", r1);
0x0001b720 cmp r0, 0 |
| if (r0 != 0) {
0x0001b724 bne 0x1b738 | goto label_35;
| }
| }
0x0001b728 add r1, sp, 0x78 | r1 += var_78h;
| label_33:
0x0001b72c mov r0, r5 | r0 = r5;
0x0001b730 bl 0x15e10 | fcn_00015e10 (r0, r1);
0x0001b734 b 0x1b1e4 | goto label_0;
| label_35:
0x0001b738 mov r1, r6 | r1 = r6;
0x0001b73c ldr r0, [pc, 0x5b0] | r0 = "dispersion";
0x0001b740 bl 0x12a24 | r0 = strcmp ("dispersion", r1);
0x0001b744 cmp r0, 0 |
| if (r0 == 0) {
0x0001b748 bne 0x1b75c |
0x0001b74c add r1, sp, 0x88 | r1 += var_88h;
0x0001b750 mov r0, r5 | r0 = r5;
0x0001b754 bl 0x15d50 | fcn_00015d50 (r0, r1);
0x0001b758 b 0x1b1e4 | goto label_0;
| }
0x0001b75c mov r1, r6 | r1 = r6;
0x0001b760 ldr r0, [pc, 0x590] | r0 = *(0x1bcf4);
0x0001b764 bl 0x12a24 | r0 = strcmp (r0, r1);
0x0001b768 cmp r0, 0 |
| if (r0 != 0) {
0x0001b76c beq 0x1b784 |
0x0001b770 mov r1, r6 | r1 = r6;
0x0001b774 ldr r0, [pc, 0x580] | r0 = "srcport";
0x0001b778 bl 0x12a24 | r0 = strcmp ("srcport", r1);
0x0001b77c cmp r0, 0 |
| if (r0 != 0) {
0x0001b780 bne 0x1b794 | goto label_36;
| }
| }
0x0001b784 add r1, sp, 0x44 | r1 += var_44h;
| label_4:
0x0001b788 mov r0, r5 | r0 = r5;
0x0001b78c bl 0x15e40 | fcn_00015e40 (r0, r1);
0x0001b790 b 0x1b1e4 | goto label_0;
| label_36:
0x0001b794 mov r1, r6 | r1 = r6;
0x0001b798 ldr r0, [pc, 0x560] | r0 = "peerport";
0x0001b79c bl 0x12a24 | r0 = strcmp ("peerport", r1);
0x0001b7a0 cmp r0, 0 |
| if (r0 == 0) {
0x0001b7a4 bne 0x1b7c4 |
0x0001b7a8 add r1, sp, 0x80 | r1 += var_80h;
0x0001b7ac mov r0, r5 | r0 = r5;
0x0001b7b0 bl 0x15d50 | r0 = fcn_00015d50 (r0, r1);
0x0001b7b4 cmp r0, 0 |
| if (r0 != 0) {
0x0001b7b8 streq r0, [sp, 0x84] | var_84h = r0;
| }
| if (r0 != 0) {
0x0001b7bc streq r0, [sp, 0x80] | var_80h = r0;
| }
0x0001b7c0 b 0x1b1e4 | goto label_0;
| }
0x0001b7c4 mov r1, r6 | r1 = r6;
0x0001b7c8 ldr r0, [pc, 0x534] | r0 = "reftime";
0x0001b7cc bl 0x12a24 | r0 = strcmp ("reftime", r1);
0x0001b7d0 cmp r0, 0 |
| if (r0 != 0) {
0x0001b7d4 bne 0x1b1e4 | goto label_0;
| }
0x0001b7d8 add r1, sp, 0x5c | r1 += var_5ch;
0x0001b7dc b 0x1b788 | goto label_4;
| label_13:
0x0001b7e0 ldr r8, [pc, 0x520] | r8 = "flash";
0x0001b7e4 b 0x1b4d8 | goto label_3;
| label_27:
0x0001b7e8 ldr r8, [pc, 0x490] | r8 = *(0x1bc7c);
0x0001b7ec b 0x1b4d8 | goto label_3;
| label_29:
0x0001b7f0 ldr r8, [pc, 0x488] | r8 = *(0x1bc7c);
0x0001b7f4 b 0x1b1e4 | goto label_0;
0x0001b7f8 ldrh r3, [sp, 0xb0] | r3 = src;
0x0001b7fc cmp r3, 2 |
| if (r3 != 2) {
0x0001b800 bne 0x1ba64 | goto label_37;
| }
0x0001b804 ldr r0, [sp, 0xb4] | r0 = var_b4h;
0x0001b808 bl 0x374d8 | r0 = fcn_000374d8 (r0);
0x0001b80c and r0, r0, 0xf0000000 | r0 &= 0xf0000000;
0x0001b810 cmp r0, 0xe0000000 |
| do {
| if (r0 == 0xe0000000) {
0x0001b814 movne r0, 0 | r0 = 0;
| }
| if (r0 != 0xe0000000) {
0x0001b818 moveq r0, 1 | r0 = 1;
| }
0x0001b81c cmp r0, 0 |
| if (r0 != 0) {
0x0001b820 moveq sb, 0x42 | sb = 0x42;
| }
| if (r0 == 0) {
0x0001b824 movne sb, 0x4d | sb = 0x4d;
| }
| label_5:
0x0001b828 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x0001b82c ldr r5, [sp, 0x54] | r5 = var_54h;
0x0001b830 asr r2, r3, 8 | r2 = r3 >> 8;
0x0001b834 ldr r3, [pc, 0x4d0] | r3 = *(0x1bd08);
0x0001b838 ldr fp, [sp, 0x50] | fp = var_50h;
0x0001b83c ldrb r3, [r3] | r3 = *(r3);
0x0001b840 cmp r3, 1 |
0x0001b844 ldr r3, [pc, 0x4c4] | r3 = *(0x1bd0c);
| if (r3 <= 1) {
0x0001b848 andhi r2, r2, 7 | r2 &= 7;
| }
| if (r3 > 1) {
0x0001b84c andls r2, r2, 3 | r2 &= 3;
| }
| if (r3 <= 1) {
0x0001b850 addhi r3, r3, r2 | r3 += r2;
| }
| if (r3 > 1) {
0x0001b854 addls r3, r3, r2 | r3 += r2;
| }
| if (r3 <= 1) {
0x0001b858 ldrbhi r6, [r3, -0xf9c] | r6 = *((r3 - 0xf9c));
| }
| if (r3 > 1) {
0x0001b85c ldrbls r6, [r3, -0xf93] | r6 = *((r3 - 0xf93));
| }
0x0001b860 ldr r3, [pc, 0x4ac] |
0x0001b864 ldr r3, [r3] | r3 = *(0x1bd10);
0x0001b868 cmp r3, 1 |
| if (r3 >= 1) {
0x0001b86c bls 0x1b8c8 |
0x0001b870 ldr r3, [pc, 0x4a0] | r3 = *(0x1bd14);
0x0001b874 ldr r1, [r3] | r1 = *(0x1bd14);
0x0001b878 ldr r3, [pc, 0x404] |
0x0001b87c add r2, r3, 0xc | r2 = r3 + 0xc;
0x0001b880 add r3, r3, 0x94 | r3 = 0x1bd14;
0x0001b884 cmp sl, r3 |
0x0001b888 cmpne sl, r2 | __asm ("cmpne sl, r2");
| if (sl != r3) {
0x0001b88c bne 0x1bb24 | goto label_38;
| }
0x0001b890 ldr r3, [sp, 0x20] | r3 = var_20h;
0x0001b894 cmp r3, 0 |
| if (r3 == 0) {
0x0001b898 beq 0x1bb24 | goto label_38;
| }
0x0001b89c cmp r1, 0x7f |
0x0001b8a0 mov r2, 1 | r2 = 1;
| if (r1 < 0x7f) {
0x0001b8a4 movhs r1, 0x7f | r1 = 0x7f;
| }
0x0001b8a8 add r0, sp, 0xcc | r0 += var_cch;
0x0001b8ac bl 0x16210 | fcn_00016210 (r0, r1);
| label_6:
0x0001b8b0 ldr r2, [pc, 0x460] |
0x0001b8b4 mov r3, r0 | r3 = r0;
0x0001b8b8 ldr r2, [r2] | r2 = *(0x1bd14);
0x0001b8bc ldr r1, [pc, 0x458] | r1 = *(0x1bd18);
0x0001b8c0 mov r0, r7 | r0 = r7;
0x0001b8c4 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x0001b8c8 ldr r3, [sp, 0x250] | r3 = *(arg_250h);
0x0001b8cc cmp r3, 0 |
| if (r3 != 0) {
0x0001b8d0 beq 0x1b8e4 |
0x0001b8d4 ldrh r3, [sp, 0xb0] | r3 = src;
0x0001b8d8 ldr r2, [sp, 0x250] | r2 = *(arg_250h);
0x0001b8dc cmp r3, r2 |
| if (r3 != r2) {
0x0001b8e0 bne 0x1ba58 | goto label_39;
| }
| }
0x0001b8e4 ldr r3, [sp, 0x24] | r3 = var_24h;
0x0001b8e8 cmp r3, 0 |
| if (r3 == 0) {
0x0001b8ec bne 0x1b908 |
0x0001b8f0 add r0, sp, 0xb0 | r0 += src;
0x0001b8f4 bl 0x162d8 | fcn_000162d8 (r0);
0x0001b8f8 mov r2, 0x100 | r2 = 0x100;
0x0001b8fc mov r1, r0 | r1 = r0;
0x0001b900 add r0, sp, 0x120 | r0 += dest;
0x0001b904 bl 0x1246c | strlcpy (r0, r1, r2);
| }
0x0001b908 ldr r3, [pc, 0x410] |
0x0001b90c ldr r3, [r3] | r3 = "%-*s ";
0x0001b910 cmp r3, 0 |
| if (r3 == 0) {
0x0001b914 beq 0x1bb40 | goto label_40;
| }
0x0001b918 add r0, sp, 0x120 | r0 += dest;
0x0001b91c bl 0x1261c | r0 = strlen (r0);
0x0001b920 cmp r0, 0xf |
| if (r0 < 0xf) {
0x0001b924 bls 0x1bb40 | goto label_40;
| }
0x0001b928 ldr r3, [pc, 0x3e4] |
0x0001b92c ldr r2, [pc, 0x3d4] | r2 = "flash";
0x0001b930 ldr r3, [r3] | r3 = *(0x1bd10);
0x0001b934 ldr r1, [pc, 0x3e8] | r1 = *(0x1bd20);
0x0001b938 cmp r3, 1 |
| if (r3 <= 1) {
0x0001b93c ldrhi r3, [pc, 0x3d4] | r3 = *(0x0001bd18);
| }
| if (r3 > 1) {
0x0001b940 movls r3, 0x11 | r3 = 0x11;
| }
| if (r3 <= 1) {
0x0001b944 ldrhi r3, [r3] | r3 = *(r3);
| }
0x0001b948 mov r0, r7 | r0 = r7;
| if (r3 <= 1) {
0x0001b94c addhi r3, r3, 0x12 | r3 += 0x12;
| }
0x0001b950 str r2, [sp, 4] | var_4h = r2;
0x0001b954 str r3, [sp] | *(sp) = r3;
0x0001b958 mov r2, r6 | r2 = r6;
0x0001b95c add r3, sp, 0x120 | r3 += dest;
0x0001b960 bl 0x12910 | fprintf (r0, r1, "flash", r3)
| label_7:
0x0001b964 ldr r3, [pc, 0x348] | r3 = *(0x1bcb0);
0x0001b968 ldr r2, [sp, 0x5c] | r2 = var_5ch;
0x0001b96c subs r3, sl, r3 | r3 = sl - r3;
| if (r3 == sl) {
0x0001b970 movne r3, 1 | r3 = 1;
| }
0x0001b974 ands r3, r3, r2, lsr 11 | r3 &= (r2 >> 11);
| if (r3 == r3) {
0x0001b978 beq 0x1bb58 | goto label_41;
| }
0x0001b97c ldr r1, [pc, 0x3a4] | r1 = "%c%s\n%*s";
0x0001b980 mov r0, r7 | r0 = r7;
0x0001b984 bl 0x12910 | r0 = fprintf (r0, "%c%s\n%*s")
0x0001b988 mov r4, r0 | r4 = r0;
| label_8:
0x0001b98c ldr r3, [pc, 0x314] | r3 = "srchost";
0x0001b990 mov r6, 0x20 | r6 = 0x20;
0x0001b994 cmp sl, r3 |
| if (sl != r3) {
0x0001b998 bne 0x1bc00 | goto label_42;
| }
| label_9:
0x0001b99c cmp r4, 8 |
| if (r4 < 8) {
0x0001b9a0 bls 0x1bb7c | goto label_43;
| }
0x0001b9a4 ldr r2, [sp, 0x28] | r2 = var_28h;
0x0001b9a8 ldr r1, [pc, 0x37c] | r1 = "_loop_";
0x0001b9ac mov r0, r7 | r0 = r7;
0x0001b9b0 bl 0x12910 | fprintf (r0, "_loop_", r2)
| label_10:
0x0001b9b4 ldr r3, [sp, 0x88] | r3 = var_88h;
0x0001b9b8 ldr r4, [sp, 0x4c] | r4 = var_4ch;
0x0001b9bc cmp r3, 0 |
| if (r3 != 0) {
0x0001b9c0 bne 0x1bc1c | goto label_44;
| }
0x0001b9c4 ldr r1, [sp, 0x80] | r1 = var_80h;
0x0001b9c8 cmp r1, 0 |
| if (r1 == 0) {
0x0001b9cc addne r3, sp, 0x80 | r3 += var_80h;
| }
| if (r1 != 0) {
0x0001b9d0 bne 0x1bc20 | goto label_45;
| }
| label_12:
0x0001b9d4 add r0, sp, 0x98 | r0 += var_98h;
0x0001b9d8 bl 0x1b040 | fcn_0001b040 (r0, r1);
0x0001b9dc cmp r5, fp |
| if (r5 < fp) {
0x0001b9e0 movge r5, fp | r5 = fp;
| }
0x0001b9e4 mov r1, 1 | r1 = 1;
0x0001b9e8 lsl r1, r1, r5 | r1 <<= r5;
0x0001b9ec mov r6, r0 | r6 = r0;
0x0001b9f0 add r0, sp, 0xa4 | r0 += var_a4h;
0x0001b9f4 bl 0x1b040 | fcn_0001b040 (r0, r1);
0x0001b9f8 mov r2, 3 | r2 = 3;
0x0001b9fc ldr r8, [sp, 0x58] | r8 = var_58h;
0x0001ba00 mov r5, r0 | r5 = r0;
0x0001ba04 ldrd r0, r1, [sp, 0x68] | __asm ("ldrd r0, r1, [var_68h]");
0x0001ba08 bl 0x2a9d0 | fcn_0002a9d0 (r0, r1);
0x0001ba0c mov r2, 3 | r2 = 3;
0x0001ba10 mov sl, r0 | sl = r0;
0x0001ba14 ldrd r0, r1, [sp, 0x60] | __asm ("ldrd r0, r1, [var_60h]");
0x0001ba18 bl 0x2a9d0 | fcn_0002a9d0 (r0, r1);
0x0001ba1c ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001ba20 mov r2, 3 | r2 = 3;
0x0001ba24 cmp r3, 0 |
0x0001ba28 mov fp, r0 |
0x0001ba2c ldrd r0, r1, [sp, 0x70] | __asm ("ldrd r0, r1, [var_70h]");
0x0001ba30 ldrdeq r0, r1, [sp, 0x78] | __asm ("ldrdeq r0, r1, [var_78h]");
0x0001ba34 bl 0x2a9d0 | fcn_0002a9d0 (r0, r1);
0x0001ba38 stmib sp, {r5, r8, sl, fp} | __asm ("stmib sp, {r5, r8, sl, fp}");
0x0001ba3c ldr r1, [pc, 0x2ec] | r1 = "%-6d";
0x0001ba40 str r6, [sp] | *(sp) = r6;
0x0001ba44 mov r3, sb | r3 = sb;
0x0001ba48 mov r2, r4 | r2 = r4;
0x0001ba4c str r0, [sp, 0x14] | var_14h = r0;
0x0001ba50 mov r0, r7 | r0 = r7;
0x0001ba54 bl 0x12910 | fprintf (r0, "%-6d", r2, r3, r4, r5, r6)
| label_39:
0x0001ba58 mov r0, 1 | r0 = 1;
0x0001ba5c add sp, sp, 0x224 |
0x0001ba60 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_37:
0x0001ba64 ldrb r0, [sp, 0xb8] | r0 = var_b8h;
0x0001ba68 cmp r0, 0xff |
0x0001ba6c b 0x1b814 |
| } while (1);
0x0001ba70 ldrh r3, [sp, 0xb0] | r3 = src;
0x0001ba74 cmp r3, 2 |
| if (r3 != 2) {
0x0001ba78 bne 0x1bac8 | goto label_46;
| }
0x0001ba7c ldr r5, [sp, 0xb4] | r5 = var_b4h;
0x0001ba80 mov r0, r5 | r0 = r5;
0x0001ba84 bl 0x374d8 | fcn_000374d8 (r0);
0x0001ba88 ldr r2, [pc, 0x238] | r2 = *(0x1bcc4);
0x0001ba8c lsr r3, r0, 0x10 | r3 = r0 >> 0x10;
0x0001ba90 lsl r3, r3, 0x10 | r3 <<= 0x10;
0x0001ba94 cmp r3, r2 |
| if (r3 == r2) {
0x0001ba98 moveq sb, 0x6c | sb = 0x6c;
| goto label_47;
| }
| if (r3 == r2) {
| label_47:
0x0001ba9c beq 0x1b828 | goto label_5;
| }
0x0001baa0 cmp r5, 0 |
| if (r5 == 0) {
0x0001baa4 beq 0x1bb1c | goto label_48;
| }
0x0001baa8 and r0, r0, 0xf0000000 | r0 &= 0xf0000000;
0x0001baac cmp r0, 0xe0000000 |
| if (r0 == 0xe0000000) {
| do {
0x0001bab0 movne r0, 0 | r0 = 0;
| }
| if (r0 != 0xe0000000) {
0x0001bab4 moveq r0, 1 | r0 = 1;
| }
0x0001bab8 cmp r0, 0 |
| if (r0 != 0) {
0x0001babc moveq sb, 0x75 | sb = 0x75;
| }
| if (r0 == 0) {
0x0001bac0 movne sb, 0x61 | sb = 0x61;
| }
0x0001bac4 b 0x1b828 | goto label_5;
| label_46:
0x0001bac8 ldr r3, [sp, 0xb8] | r3 = var_b8h;
0x0001bacc cmp r3, 0 |
| if (r3 == 0) {
0x0001bad0 bne 0x1baf8 |
0x0001bad4 ldr r3, [sp, 0xbc] | r3 = var_bch;
0x0001bad8 cmp r3, 0 |
| if (r3 != 0) {
0x0001badc bne 0x1baf8 | goto label_49;
| }
0x0001bae0 ldr r3, [sp, 0xc0] | r3 = var_c0h;
0x0001bae4 cmp r3, 0 |
| if (r3 != 0) {
0x0001bae8 bne 0x1baf8 | goto label_49;
| }
0x0001baec ldr r3, [sp, 0xc4] | r3 = var_c4h;
0x0001baf0 cmp r3, 0 |
| if (r3 == 0) {
0x0001baf4 beq 0x1bb1c | goto label_48;
| }
| }
| label_49:
0x0001baf8 ldrb r0, [sp, 0xb8] | r0 = var_b8h;
0x0001bafc cmp r0, 0xff |
0x0001bb00 b 0x1bab0 |
| } while (1);
0x0001bb04 mov sb, 0x73 | sb = 0x73;
0x0001bb08 b 0x1b828 | goto label_5;
0x0001bb0c mov sb, 0x53 | sb = 0x53;
0x0001bb10 b 0x1b828 | goto label_5;
0x0001bb14 mov sb, 0x62 | sb = 0x62;
0x0001bb18 b 0x1b828 | goto label_5;
| label_48:
0x0001bb1c mov sb, 0x70 | sb = 0x70;
0x0001bb20 b 0x1b828 | goto label_5;
| label_38:
0x0001bb24 ldr r3, [pc, 0x208] |
0x0001bb28 ldr r0, [pc, 0x208] | r0 = *(0x1bd34);
0x0001bb2c ldr r3, [r3] | r3 = "_2ld__c__4.4s__4.4s___3lo___7.7s__8.7s__7.7s";
0x0001bb30 cmp r3, 0 |
| if (r3 == 0) {
0x0001bb34 beq 0x1b8b0 | goto label_6;
| }
0x0001bb38 bl 0x16178 | fcn_00016178 (r0, r1);
0x0001bb3c b 0x1b8b0 | goto label_6;
| label_40:
0x0001bb40 add r3, sp, 0x120 | r3 += dest;
0x0001bb44 mov r2, r6 | r2 = r6;
0x0001bb48 ldr r1, [pc, 0x1ec] | r1 = *(0x1bd38);
0x0001bb4c mov r0, r7 | r0 = r7;
0x0001bb50 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001bb54 b 0x1b964 | goto label_7;
| label_41:
0x0001bb58 cmp r4, 0 |
| if (r4 == 0) {
0x0001bb5c beq 0x1b98c | goto label_8;
| }
0x0001bb60 mov r0, r8 | r0 = r8;
0x0001bb64 bl 0x1261c | strlen (r0);
0x0001bb68 mov r2, r7 | r2 = r7;
0x0001bb6c mov r1, r8 | r1 = r8;
0x0001bb70 mov r4, r0 | r4 = r0;
0x0001bb74 bl 0x15e6c | fcn_00015e6c (r0, r1);
0x0001bb78 b 0x1b98c | goto label_8;
| label_43:
0x0001bb7c ldr r3, [r7, 0x34] | r3 = *((r7 + 0x34));
0x0001bb80 cmp r3, 0 |
| if (r3 == 0) {
0x0001bb84 beq 0x1bbb8 | goto label_50;
| }
0x0001bb88 ldr r3, [r7, 0x10] | r3 = *((r7 + 0x10));
0x0001bb8c ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001bb90 cmp r3, r2 |
| if (r3 >= r2) {
0x0001bb94 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001bb98 strlo r2, [r7, 0x10] | *((r7 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001bb9c strblo r6, [r3] | *(r3) = r6;
| }
| if (r3 <= r2) {
0x0001bba0 blo 0x1bbb0 | goto label_51;
| }
0x0001bba4 mov r1, r7 | r1 = r7;
0x0001bba8 mov r0, 0x20 | r0 = 0x20;
0x0001bbac bl 0x126d0 | fputc_unlocked ();
| do {
| label_51:
0x0001bbb0 add r4, r4, 1 | r4++;
0x0001bbb4 b 0x1b99c | goto label_9;
| label_50:
0x0001bbb8 mov r1, r7 | r1 = r7;
0x0001bbbc mov r0, 0x20 | r0 = 0x20;
0x0001bbc0 bl 0x127fc | fputc (r0, r1);
0x0001bbc4 b 0x1bbb0 |
| } while (1);
| do {
0x0001bbc8 ldr r3, [r7, 0x34] | r3 = *((r7 + 0x34));
0x0001bbcc cmp r3, 0 |
| if (r3 == 0) {
0x0001bbd0 beq 0x1bc0c | goto label_52;
| }
0x0001bbd4 ldr r3, [r7, 0x10] | r3 = *((r7 + 0x10));
0x0001bbd8 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001bbdc cmp r3, r2 |
| if (r3 >= r2) {
0x0001bbe0 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001bbe4 strlo r2, [r7, 0x10] | *((r7 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001bbe8 strblo r6, [r3] | *(r3) = r6;
| }
| if (r3 > r2) {
0x0001bbec blo 0x1bbfc |
0x0001bbf0 mov r1, r7 | r1 = r7;
0x0001bbf4 mov r0, 0x20 | r0 = 0x20;
0x0001bbf8 bl 0x126d0 | fputc_unlocked ();
| }
| label_11:
0x0001bbfc add r4, r4, 1 | r4++;
| label_42:
0x0001bc00 cmp r4, 0xe |
0x0001bc04 bls 0x1bbc8 |
| } while (r4 < 0xe);
0x0001bc08 b 0x1b9b4 | goto label_10;
| label_52:
0x0001bc0c mov r1, r7 | r1 = r7;
0x0001bc10 mov r0, 0x20 | r0 = 0x20;
0x0001bc14 bl 0x127fc | fputc (r0, r1);
0x0001bc18 b 0x1bbfc | goto label_11;
| label_44:
0x0001bc1c add r3, sp, 0x88 | r3 += var_88h;
| label_45:
0x0001bc20 ldr r1, [sp, 0x90] | r1 = var_90h;
0x0001bc24 ldr r3, [r3] | r3 = *(r3);
0x0001bc28 cmp r1, r3 |
| if (r1 < r3) {
0x0001bc2c subhs r1, r1, r3 | r1 -= r3;
| }
| if (r1 >= r3) {
0x0001bc30 mvnlo r1, 0 | r1 = ~0;
| }
0x0001bc34 b 0x1b9d4 | goto label_12;
| label_23:
0x0001bc38 ldr r3, [pc, 0x68] | r3 = "srchost";
0x0001bc3c cmp sl, r3 |
| if (sl != r3) {
0x0001bc40 bne 0x1b1e4 | goto label_0;
| }
| label_24:
0x0001bc44 mov r0, r5 | r0 = r5;
0x0001bc48 bl 0x1261c | r0 = strlen (r0);
0x0001bc4c subs r2, r0, 0 | r2 = r0 - 0;
| if (r2 == r0) {
0x0001bc50 beq 0x1b7e0 | goto label_13;
| }
0x0001bc54 cmp r2, 4 |
| if (r2 > 4) {
0x0001bc58 bhi 0x1b524 | goto label_14;
| }
0x0001bc5c add r0, sp, 0x220 | r0 += var_220h;
0x0001bc60 mov r3, 0 | r3 = 0;
0x0001bc64 str r3, [r0, -0x1d8]! | *((r0 -= 0x1d8)) = r3;
| label_25:
0x0001bc68 mov r1, r5 | r1 = r5;
0x0001bc6c bl 0x124a8 | memcpy (r0, r1, r2);
0x0001bc70 mov r1, 1 | r1 = 1;
0x0001bc74 ldr r0, [sp, 0x48] | r0 = var_48h;
0x0001bc78 bl 0x2cc70 | fcn_0002cc70 (r0, r1);
0x0001bc7c b 0x1b4d4 | goto label_15;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1bd40 */
| #include <stdint.h>
|
; (fcn) fcn.0001bd40 () | void fcn_0001bd40 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_16h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_24h;
| r0 = arg1;
| r1 = arg2;
0x0001bd40 push {r4, r5, r6, r7, r8, sb, lr} |
0x0001bd44 sub sp, sp, 0x24 |
0x0001bd48 mov sb, r3 | sb = r3;
0x0001bd4c add r3, sp, 0x18 | r3 += var_18h;
0x0001bd50 str r3, [sp, 0xc] | var_ch = r3;
0x0001bd54 add r3, sp, 0x1c | r3 += var_1ch;
0x0001bd58 mov r4, 0 | r4 = 0;
0x0001bd5c str r3, [sp, 8] | var_8h = r3;
0x0001bd60 add r3, sp, 0x16 | r3 += var_16h;
0x0001bd64 str r3, [sp, 4] | var_4h = r3;
0x0001bd68 mov r7, r0 | r7 = r0;
0x0001bd6c mov r8, r2 | r8 = r2;
0x0001bd70 str r4, [sp] | *(sp) = r4;
0x0001bd74 mov r3, r4 | r3 = r4;
0x0001bd78 mov r2, r4 | r2 = r4;
0x0001bd7c mov r0, 2 | r0 = 2;
0x0001bd80 mov r6, r1 | r6 = r1;
0x0001bd84 bl 0x15478 | r0 = fcn_00015478 (r0, r1, r2, r3, r4, r5);
0x0001bd88 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0001bd8c movne r5, r4 | r5 = r4;
| }
| if (r5 != r0) {
0x0001bd90 bne 0x1bdd4 | goto label_0;
| }
0x0001bd94 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001bd98 cmp r3, r4 |
| if (r3 != r4) {
0x0001bd9c bne 0x1bde0 | goto label_1;
| }
0x0001bda0 ldr r3, [pc, 0x5c] |
0x0001bda4 ldr r4, [pc, 0x5c] | r4 = *(0x1be04);
0x0001bda8 ldr r3, [r3] | r3 = *(0x1be00);
0x0001bdac cmp r3, 1 |
| if (r3 >= 1) {
0x0001bdb0 bls 0x1bdc4 |
0x0001bdb4 ldr r2, [pc, 0x50] | r2 = stderr;
0x0001bdb8 ldr r1, [pc, 0x50] | r1 = *(0x1be0c);
0x0001bdbc ldr r0, [r4] | r0 = *(r4);
0x0001bdc0 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x0001bdc4 mov r2, r6 | r2 = r6;
0x0001bdc8 ldr r1, [pc, 0x44] | r1 = "server_s_";
0x0001bdcc ldr r0, [r4] | r0 = *(r4);
0x0001bdd0 bl 0x12910 | fprintf (r0, "server_s_", r2)
| do {
| label_0:
0x0001bdd4 mov r0, r5 | r0 = r5;
0x0001bdd8 add sp, sp, 0x24 |
0x0001bddc pop {r4, r5, r6, r7, r8, sb, pc} |
| label_1:
0x0001bde0 ldr r1, [sp, 0x18] | r1 = var_18h;
0x0001bde4 ldrh r2, [sp, 0x16] | r2 = var_16h;
0x0001bde8 str r1, [sp] | *(sp) = r1;
0x0001bdec stmib sp, {r8, sb} | __asm ("stmib sp, {r8, sb}");
0x0001bdf0 mov r1, r6 | r1 = r6;
0x0001bdf4 mov r0, r7 | r0 = r7;
0x0001bdf8 bl 0x1b140 | r0 = fcn_0001b140 (r0, r1, r2, r3, r4, r5);
0x0001bdfc mov r5, r0 | r5 = r0;
0x0001be00 b 0x1bdd4 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1c138 */
| #include <stdint.h>
|
; (fcn) fcn.0001c138 () | void fcn_0001c138 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_16h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_24h;
| r0 = arg1;
0x0001c138 push {r4, r5, r6, r7, lr} |
0x0001c13c sub sp, sp, 0x24 |
0x0001c140 add r3, sp, 0x18 | r3 += var_18h;
0x0001c144 str r3, [sp, 0xc] | var_ch = r3;
0x0001c148 add r3, sp, 0x1c | r3 += var_1ch;
0x0001c14c mov r4, 0 | r4 = 0;
0x0001c150 str r3, [sp, 8] | var_8h = r3;
0x0001c154 add r3, sp, 0x16 | r3 += var_16h;
0x0001c158 str r3, [sp, 4] | var_4h = r3;
0x0001c15c mov r6, r0 | r6 = r0;
0x0001c160 str r4, [sp] | *(sp) = r4;
0x0001c164 mov r3, r4 | r3 = r4;
0x0001c168 mov r2, r4 | r2 = r4;
0x0001c16c mov r1, r4 | r1 = r4;
0x0001c170 mov r0, 1 | r0 = 1;
0x0001c174 bl 0x15478 | r0 = fcn_00015478 (r0, r1, r2, r3, r4, r5);
0x0001c178 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0001c17c movne r5, r4 | r5 = r4;
| }
| if (r5 != r0) {
0x0001c180 bne 0x1c1bc | goto label_0;
| }
0x0001c184 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001c188 cmp r3, r4 |
| if (r3 != r4) {
0x0001c18c bne 0x1c1c8 | goto label_1;
| }
0x0001c190 ldr r3, [pc, 0x14c] |
0x0001c194 ldr r3, [r3] | r3 = *(0x1c2e0);
0x0001c198 cmp r3, 1 |
| if (r3 >= 1) {
0x0001c19c bls 0x1c1b0 |
0x0001c1a0 ldr r2, [pc, 0x140] | r2 = *(0x1c2e4);
0x0001c1a4 ldr r1, [pc, 0x140] | r1 = *(0x1c2e8);
0x0001c1a8 mov r0, r6 | r0 = r6;
0x0001c1ac bl 0x12910 | fprintf (r0, r1, r2)
| }
0x0001c1b0 mov r1, r6 | r1 = r6;
0x0001c1b4 ldr r0, [pc, 0x134] | r0 = "server_s_";
0x0001c1b8 bl 0x12874 | fputs ("server_s_", r1);
| do {
| label_0:
0x0001c1bc mov r0, r5 | r0 = r5;
0x0001c1c0 add sp, sp, 0x24 |
0x0001c1c4 pop {r4, r5, r6, r7, pc} |
| label_1:
0x0001c1c8 ands r3, r3, 3 | r3 &= 3;
| if (r3 == r3) {
0x0001c1cc beq 0x1c208 | goto label_2;
| }
0x0001c1d0 ldr r3, [pc, 0x10c] |
0x0001c1d4 ldr r4, [pc, 0x118] | r4 = "No association ID's returned\n";
0x0001c1d8 ldr r3, [r3] | r3 = *(0x1c2e0);
0x0001c1dc cmp r3, 1 |
| if (r3 >= 1) {
0x0001c1e0 bls 0x1c1f4 |
0x0001c1e4 ldr r2, [pc, 0xfc] | r2 = *(0x1c2e4);
0x0001c1e8 ldr r1, [pc, 0xfc] | r1 = *(0x1c2e8);
0x0001c1ec ldr r0, [r4] | r0 = *(r4);
0x0001c1f0 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x0001c1f4 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0001c1f8 ldr r1, [pc, 0xf8] | r1 = stderr;
0x0001c1fc ldr r0, [r4] | r0 = *(r4);
0x0001c200 bl 0x12910 | fprintf (r0, r1, r2)
0x0001c204 b 0x1c1bc |
| } while (1);
| label_2:
0x0001c208 ldr r4, [pc, 0xec] | r4 = "***Server returned %zu octets, should be multiple of 4\n";
0x0001c20c ldr r7, [pc, 0xec] | r7 = *(0x1c2fc);
0x0001c210 ldr r5, [pc, 0xec] | r5 = *(0x1c300);
0x0001c214 ldr r6, [pc, 0xec] | r6 = *(0x1c304);
0x0001c218 str r3, [r4] | *(r4) = r3;
| do {
0x0001c21c ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001c220 cmp r3, 0 |
| if (r3 == 0) {
0x0001c224 bne 0x1c254 |
0x0001c228 ldr r3, [r7] | r3 = *(r7);
0x0001c22c cmp r3, 0 |
| if (r3 != 0) {
0x0001c230 beq 0x1c248 |
0x0001c234 ldr r3, [pc, 0xb8] | r3 = "No association ID's returned\n";
0x0001c238 ldr r2, [r4] | r2 = *(r4);
0x0001c23c ldr r1, [pc, 0xc8] | r1 = *(0x1c308);
0x0001c240 ldr r0, [r3] | r0 = "No association ID's returned\n";
0x0001c244 bl 0x12910 | r0 = fprintf ("No association ID's returned\n", r1, r2, "No association ID's returned\n")
| }
0x0001c248 bl 0x16cd4 | fcn_00016cd4 ();
0x0001c24c mov r5, 1 | r5 = 1;
0x0001c250 b 0x1c1bc | goto label_0;
| }
0x0001c254 ldr r2, [r4] | r2 = *(r4);
0x0001c258 ldr r3, [r5] | r3 = *(r5);
0x0001c25c cmp r2, r3 |
| if (r2 > r3) {
0x0001c260 blo 0x1c268 |
0x0001c264 bl 0x16d04 | fcn_00016d04 ();
| }
0x0001c268 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0001c26c ldr r0, [r6] | r0 = *(r6);
0x0001c270 ldrh r1, [r3] | r1 = *(r3);
0x0001c274 add r3, r3, 4 | r3 += 4;
0x0001c278 lsr r2, r1, 8 | r2 = r1 >> 8;
0x0001c27c orr r2, r2, r1, lsl 8 | r2 |= (r1 << 8);
0x0001c280 ldr r1, [r4] | r1 = *(r4);
0x0001c284 lsl r2, r2, 0x10 | r2 <<= 0x10;
0x0001c288 lsl r1, r1, 2 | r1 <<= 2;
0x0001c28c lsr r2, r2, 0x10 | r2 >>= 0x10;
0x0001c290 strh r2, [r0, r1] | *((r0 + r1)) = r2;
0x0001c294 add ip, r0, r1 |
0x0001c298 ldrh r0, [r3, -2] | r0 = *((r3 - 2));
0x0001c29c lsr r1, r0, 8 | r1 = r0 >> 8;
0x0001c2a0 orr r1, r1, r0, lsl 8 | r1 |= (r0 << 8);
0x0001c2a4 strh r1, [ip, 2] | *((ip + 2)) = r1;
0x0001c2a8 str r3, [sp, 0x18] | var_18h = r3;
0x0001c2ac ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001c2b0 sub r3, r3, 4 | r3 -= 4;
0x0001c2b4 str r3, [sp, 0x1c] | var_1ch = r3;
0x0001c2b8 ldr r3, [r7] | r3 = *(r7);
0x0001c2bc cmp r3, 0 |
| if (r3 != 0) {
0x0001c2c0 beq 0x1c2d4 |
0x0001c2c4 ldr r3, [pc, 0x28] | r3 = "No association ID's returned\n";
0x0001c2c8 ldr r1, [pc, 0x40] | r1 = "\n%d associations total\n";
0x0001c2cc ldr r0, [r3] | r0 = "No association ID's returned\n";
0x0001c2d0 bl 0x12910 | fprintf ("No association ID's returned\n", "\n%d associations total\n", r2, "No association ID's returned\n")
| }
0x0001c2d4 ldr r3, [r4] | r3 = *(r4);
0x0001c2d8 add r3, r3, 1 | r3++;
0x0001c2dc str r3, [r4] | *(r4) = r3;
0x0001c2e0 b 0x1c21c |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1c360 */
| #include <stdint.h>
|
; (fcn) fcn.0001c360 () | void fcn_0001c360 (int32_t arg_28h, int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| int32_t var_6h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| r0 = arg1;
| r1 = arg2;
0x0001c360 push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} |
0x0001c364 mov r5, r3 | r5 = r3;
0x0001c368 ldr r3, [pc, 0x12c] | r3 = *(0x1c498);
0x0001c36c mov r4, r2 | r4 = r2;
0x0001c370 ldr r2, [r3] | r2 = *(0x1c498);
0x0001c374 mov r7, r0 | r7 = r0;
0x0001c378 cmp r2, 0 |
0x0001c37c mov r8, r1 | r8 = r1;
0x0001c380 mov r6, r3 | r6 = r3;
| if (r2 == 0) {
0x0001c384 bne 0x1c390 |
0x0001c388 ldr r0, [sp, 0x28] | r0 = *(arg_28h);
0x0001c38c bl 0x1c138 | fcn_0001c138 (r0);
| }
0x0001c390 mov r0, r7 | r0 = r7;
0x0001c394 bl 0x17604 | r0 = fcn_00017604 (r0);
0x0001c398 cmp r0, 0 |
0x0001c39c mov r7, r0 | r7 = r0;
0x0001c3a0 strh r0, [sp, 4] | var_4h = r0;
0x0001c3a4 bne 0x1c3b4 |
| while (r0 == 0) {
| label_1:
0x0001c3a8 mov r0, 0 | r0 = 0;
| label_0:
0x0001c3ac add sp, sp, 0x10 |
0x0001c3b0 pop {r4, r5, r6, r7, r8, pc} |
0x0001c3b4 mov r0, r8 | r0 = r8;
0x0001c3b8 bl 0x17604 | r0 = fcn_00017604 (r0);
0x0001c3bc cmp r0, 0 |
0x0001c3c0 strh r0, [sp, 6] | var_6h = r0;
0x0001c3c4 beq 0x1c3a8 |
| }
0x0001c3c8 ldr r3, [pc, 0xd0] | r3 = *(0x1c49c);
0x0001c3cc ldr r6, [r6] | r6 = *(r6);
0x0001c3d0 mov r1, 0 | r1 = 0;
0x0001c3d4 ldr ip, [r3] | ip = *(0x1c49c);
0x0001c3d8 mvn r2, 0 | r2 = ~0;
0x0001c3dc mov r3, r1 | r3 = r1;
0x0001c3e0 str r2, [sp, 8] | var_8h = r2;
| do {
0x0001c3e4 cmp r6, r3 |
| if (r6 == r3) {
0x0001c3e8 beq 0x1c408 | goto label_2;
| }
0x0001c3ec lsl lr, r3, 2 | lr = r3 << 2;
0x0001c3f0 ldrh lr, [ip, lr] |
0x0001c3f4 cmp lr, r7 |
| if (lr != r7) {
0x0001c3f8 moveq r2, r3 | r2 = r3;
| }
| if (lr != r7) {
0x0001c3fc moveq r1, 1 | r1 = 1;
| }
0x0001c400 add r3, r3, 1 | r3++;
0x0001c404 b 0x1c3e4 |
| } while (1);
| label_2:
0x0001c408 cmp r1, 0 |
| if (r1 == 0) {
0x0001c40c strne r2, [sp, 8] | var_8h = r2;
| }
0x0001c410 mvn r2, 0 | r2 = ~0;
0x0001c414 str r2, [sp, 0xc] | var_ch = r2;
0x0001c418 mov r2, 0 | r2 = 0;
| do {
0x0001c41c cmp r3, r2 |
| if (r3 == r2) {
0x0001c420 bne 0x1c458 |
0x0001c424 ldr r2, [sp, 8] | r2 = var_8h;
0x0001c428 cmn r2, 1 |
| if (r2 == 1) {
0x0001c42c beq 0x1c470 | goto label_3;
| }
0x0001c430 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001c434 cmn r3, 1 |
| if (r3 == 1) {
0x0001c438 beq 0x1c494 | goto label_4;
| }
0x0001c43c cmp r2, r3 |
| if (r2 < r3) {
0x0001c440 strge r2, [r5] | *(r5) = r2;
| }
| if (r2 < r3) {
0x0001c444 strge r3, [r4] | *(r4) = r3;
| }
| if (r2 >= r3) {
0x0001c448 strlt r2, [r4] | *(r4) = r2;
| }
| if (r2 >= r3) {
0x0001c44c strlt r3, [r5] | *(r5) = r3;
| }
0x0001c450 mov r0, 1 | r0 = 1;
0x0001c454 b 0x1c3ac | goto label_0;
| }
0x0001c458 lsl r1, r2, 2 | r1 = r2 << 2;
0x0001c45c ldrh r1, [ip, r1] | r1 = *((ip + r1));
0x0001c460 cmp r1, r0 |
| if (r1 != r0) {
0x0001c464 streq r2, [sp, 0xc] | var_ch = r2;
| }
0x0001c468 add r2, r2, 1 | r2++;
0x0001c46c b 0x1c41c |
| } while (1);
| label_3:
0x0001c470 mov r3, 0 | r3 = 0;
| do {
0x0001c474 add r2, sp, 0x10 | r2 += var_10h;
0x0001c478 add r3, r2, r3, lsl 1 | r3 = r2 + (r3 << 1);
0x0001c47c ldrh r2, [r3, -0xc] | r2 = var_4h;
0x0001c480 ldr r3, [pc, 0x1c] | r3 = *(0x1c4a0);
0x0001c484 ldr r1, [pc, 0x1c] | r1 = stderr;
0x0001c488 ldr r0, [r3] | r0 = *(0x1c4a0);
0x0001c48c bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001c490 b 0x1c3a8 | goto label_1;
| label_4:
0x0001c494 mov r3, 1 | r3 = 1;
0x0001c498 b 0x1c474 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1ccbc */
| #include <stdint.h>
|
; (fcn) fcn.0001ccbc () | void fcn_0001ccbc (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0001ccbc ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001ccc0 push {r4, r5, r6, r7, r8, lr} |
0x0001ccc4 tst r3, 0x20 |
0x0001ccc8 mov r4, r0 | r4 = r0;
0x0001cccc mov r6, r1 | r6 = r1;
0x0001ccd0 mov r5, r2 | r5 = r2;
| if ((r3 & 0x20) != 0) {
0x0001ccd4 beq 0x1cce8 |
0x0001ccd8 ldrh r3, [r1, 8] | r3 = *((r1 + 8));
0x0001ccdc cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x0001cce0 ldreq r8, [r1, 0x38] | r8 = *((r1 + 0x38));
| }
| if (r3 == 0x8000) {
0x0001cce4 beq 0x1ccec | goto label_1;
| }
| }
0x0001cce8 ldr r8, [r6, 0x34] | r8 = *((r6 + 0x34));
| label_1:
0x0001ccec mov r0, r8 | r0 = r8;
0x0001ccf0 bl 0x1261c | strlen (r0);
0x0001ccf4 mov r1, r4 | r1 = r4;
0x0001ccf8 mov r7, r0 | r7 = r0;
0x0001ccfc mov r0, r8 | r0 = r8;
0x0001cd00 bl 0x12874 | fputs (r0, r1);
0x0001cd04 cmp r5, 0 |
| if (r5 == 0) {
0x0001cd08 bne 0x1cd20 |
0x0001cd0c ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001cd10 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001cd14 and r3, r3, 0xf | r3 &= 0xf;
0x0001cd18 cmp r3, 5 |
| if (r3 != 5) {
0x0001cd1c bne 0x1cdf8 | goto label_2;
| }
| }
0x0001cd20 ldr r0, [pc, 0x130] | r0 = *(0x1ce54);
0x0001cd24 mov r1, r4 | r1 = r4;
0x0001cd28 add r0, pc, r0 | r0 = pc + r0;
0x0001cd2c bl 0x12874 | fputs (r0, r1);
0x0001cd30 rsb r7, r7, 0x11 | r7 = 0x11 - r7;
0x0001cd34 mov r8, 0x20 | r8 = 0x20;
| label_0:
0x0001cd38 cmp r7, 0 |
| if (r7 > 0) {
0x0001cd3c bgt 0x1cd98 | goto label_3;
| }
0x0001cd40 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001cd44 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001cd48 and r3, r3, 0xf | r3 &= 0xf;
0x0001cd4c cmp r3, 5 |
| if (r3 == 5) {
0x0001cd50 beq 0x1cde4 | goto label_4;
| }
0x0001cd54 ldr r7, [pc, 0x100] | r7 = *(0x1ce58);
0x0001cd58 add r7, pc, r7 | r7 = pc + r7;
| do {
0x0001cd5c mov r1, 0xa | r1 = 0xa;
0x0001cd60 mov r0, r5 | r0 = r5;
0x0001cd64 bl 0x12a78 | r0 = strchr (r0, r1);
0x0001cd68 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0001cd6c beq 0x1ce28 | goto label_5;
| }
0x0001cd70 sub r1, r6, r5 | r1 = r6 - r5;
0x0001cd74 mov r3, r4 | r3 = r4;
0x0001cd78 mov r2, 1 | r2 = 1;
0x0001cd7c mov r0, r5 | r0 = r5;
0x0001cd80 bl 0x12478 | fwrite (r0, r1, r2, r3);
0x0001cd84 mov r1, r4 | r1 = r4;
0x0001cd88 mov r0, r7 | r0 = r7;
0x0001cd8c add r5, r6, 1 | r5 = r6 + 1;
0x0001cd90 bl 0x12874 | fputs (r0, r1);
0x0001cd94 b 0x1cd5c |
| } while (1);
| label_3:
0x0001cd98 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001cd9c cmp r3, 0 |
| if (r3 == 0) {
0x0001cda0 beq 0x1cdd4 | goto label_6;
| }
0x0001cda4 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001cda8 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001cdac cmp r3, r2 |
| if (r3 >= r2) {
0x0001cdb0 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001cdb4 strlo r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001cdb8 strblo r8, [r3] | *(r3) = r8;
| }
| if (r3 <= r2) {
0x0001cdbc blo 0x1cdcc | goto label_7;
| }
0x0001cdc0 mov r1, r4 | r1 = r4;
0x0001cdc4 mov r0, 0x20 | r0 = 0x20;
0x0001cdc8 bl 0x126d0 | fputc_unlocked ();
| do {
| label_7:
0x0001cdcc sub r7, r7, 1 | r7--;
0x0001cdd0 b 0x1cd38 | goto label_0;
| label_6:
0x0001cdd4 mov r1, r4 | r1 = r4;
0x0001cdd8 mov r0, 0x20 | r0 = 0x20;
0x0001cddc bl 0x127fc | fputc (r0, r1);
0x0001cde0 b 0x1cdcc |
| } while (1);
| label_4:
0x0001cde4 ldr r1, [pc, 0x74] | r1 = *(0x1ce5c);
0x0001cde8 mov r2, r5 | r2 = r5;
0x0001cdec add r1, pc, r1 | r1 = pc + r1;
0x0001cdf0 mov r0, r4 | r0 = r4;
0x0001cdf4 bl 0x12910 | fprintf (r0, r1, r2)
| do {
| label_2:
0x0001cdf8 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001cdfc cmp r3, 0 |
| if (r3 == 0) {
0x0001ce00 beq 0x1ce48 | goto label_8;
| }
0x0001ce04 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001ce08 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001ce0c cmp r3, r2 |
| if (r3 >= r2) {
0x0001ce10 bhs 0x1ce38 | goto label_9;
| }
0x0001ce14 add r2, r3, 1 | r2 = r3 + 1;
0x0001ce18 str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x0001ce1c mov r2, 0xa | r2 = 0xa;
0x0001ce20 strb r2, [r3] | *(r3) = r2;
0x0001ce24 pop {r4, r5, r6, r7, r8, pc} |
| label_5:
0x0001ce28 mov r1, r4 | r1 = r4;
0x0001ce2c mov r0, r5 | r0 = r5;
0x0001ce30 bl 0x12874 | fputs (r0, r1);
0x0001ce34 b 0x1cdf8 |
| } while (1);
| label_9:
0x0001ce38 mov r1, r4 | r1 = r4;
0x0001ce3c mov r0, 0xa | r0 = 0xa;
0x0001ce40 pop {r4, r5, r6, r7, r8, lr} |
0x0001ce44 b 0x126d0 | void (*0x126d0)() ();
| label_8:
0x0001ce48 mov r1, r4 | r1 = r4;
0x0001ce4c mov r0, 0xa | r0 = 0xa;
0x0001ce50 pop {r4, r5, r6, r7, r8, lr} |
0x0001ce54 b 0x127fc | return void (*0x127fc)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1ce64 */
| #include <stdint.h>
|
; (fcn) fcn.0001ce64 () | void fcn_0001ce64 (int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x0001ce64 push {r0, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001ce68 ldr sb, [pc, 0x470] | sb = *(0x1d2dc);
0x0001ce6c mov r4, r0 | r4 = r0;
0x0001ce70 mov r7, r1 | r7 = r1;
0x0001ce74 mov r5, r2 | r5 = r2;
0x0001ce78 mov r6, r3 | r6 = r3;
0x0001ce7c mov r8, 0x20 | r8 = 0x20;
0x0001ce80 add sb, pc, sb | sb = pc + sb;
| do {
| label_0:
0x0001ce84 subs r7, r7, 1 | r7--;
| if (r7 < r7) {
0x0001ce88 bpl 0x1ceb8 |
0x0001ce8c ldm r6, {r3, r7} | r3 = *(r6);
| r7 = *((r6 + 4));
0x0001ce90 sub r2, r3, 1 | r2 = r3 - 1;
0x0001ce94 cmp r2, 5 |
| if (r2 > 5) {
| /* switch table (6 cases) at 0x1cea0 */
0x0001ce98 addls pc, pc, r2, lsl 2 | pc += (r2 << 2);
| }
0x0001ce9c b 0x1cf44 | goto label_13;
0x0001cea0 b 0x1cf5c | goto label_14;
0x0001cea4 b 0x1d0c4 | goto label_15;
0x0001cea8 b 0x1d180 | goto label_16;
0x0001ceac b 0x1d0c4 | goto label_15;
0x0001ceb0 b 0x1d158 | goto label_17;
0x0001ceb4 b 0x1d1b4 | goto label_18;
| }
0x0001ceb8 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001cebc cmp r3, 0 |
| if (r3 == 0) {
0x0001cec0 beq 0x1cf24 | goto label_19;
| }
0x0001cec4 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001cec8 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001cecc cmp r3, r2 |
| if (r3 >= r2) {
0x0001ced0 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001ced4 strlo r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001ced8 strblo r8, [r3] | *(r3) = r8;
| }
| if (r3 > r2) {
0x0001cedc blo 0x1ceec |
0x0001cee0 mov r1, r4 | r1 = r4;
0x0001cee4 mov r0, 0x20 | r0 = 0x20;
0x0001cee8 bl 0x126d0 | fputc_unlocked ();
| }
| label_1:
0x0001ceec ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001cef0 cmp r3, 0 |
| if (r3 == 0) {
0x0001cef4 beq 0x1cf34 | goto label_20;
| }
0x0001cef8 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001cefc ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001cf00 cmp r3, r2 |
| if (r3 >= r2) {
0x0001cf04 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001cf08 strlo r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001cf0c strblo r8, [r3] | *(r3) = r8;
| }
0x0001cf10 blo 0x1ce84 |
| } while (r3 <= r2);
0x0001cf14 mov r1, r4 | r1 = r4;
0x0001cf18 mov r0, 0x20 | r0 = 0x20;
0x0001cf1c bl 0x126d0 | fputc_unlocked ();
0x0001cf20 b 0x1ce84 | goto label_0;
| label_19:
0x0001cf24 mov r1, r4 | r1 = r4;
0x0001cf28 mov r0, 0x20 | r0 = 0x20;
0x0001cf2c bl 0x127fc | fputc (r0, r1);
0x0001cf30 b 0x1ceec | goto label_1;
| label_20:
0x0001cf34 mov r1, r4 | r1 = r4;
0x0001cf38 mov r0, 0x20 | r0 = 0x20;
0x0001cf3c bl 0x127fc | fputc (r0, r1);
0x0001cf40 b 0x1ce84 | goto label_0;
| label_13:
0x0001cf44 ldr r3, [pc, 0x398] | r3 = *(0x1d2e0);
0x0001cf48 ldr r1, [sb, r3] | r1 = *((sb + r3));
| label_9:
0x0001cf4c add r1, r1, 0x1dc | r1 += 0x1dc;
0x0001cf50 mov r2, r7 | r2 = r7;
0x0001cf54 add r1, r1, 3 | r1 += 3;
0x0001cf58 b 0x1d0b4 | goto label_10;
| label_14:
0x0001cf5c ldr r3, [pc, 0x380] | r3 = *(0x1d2e0);
0x0001cf60 mov r2, r7 | r2 = r7;
0x0001cf64 ldr sb, [sb, r3] | sb = *((sb + r3));
0x0001cf68 mov r0, r4 | r0 = r4;
0x0001cf6c add r1, sb, 0x1f8 | r1 = sb + 0x1f8;
0x0001cf70 add r1, r1, 2 | r1 += 2;
0x0001cf74 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001cf78 ldr r8, [pc, 0x368] |
0x0001cf7c add sl, sb, 0x2c8 | sl = sb + 0x2c8;
0x0001cf80 add r8, pc, r8 | r8 = pc + r8;
0x0001cf84 add r6, r6, 7 | r6 += 7;
0x0001cf88 add r8, r8, 0x200 | r8 = 0x1d4e4;
0x0001cf8c add sl, sl, 3 | sl += 3;
| do {
| label_3:
0x0001cf90 ldrb r5, [r6, 1]! | r5 = *((r6 += 1));
0x0001cf94 cmp r5, 0x26 |
| if (r5 != 0x26) {
0x0001cf98 beq 0x1cfb0 |
| if (r5 > 0x26) {
0x0001cf9c bhi 0x1d000 | goto label_21;
| }
0x0001cfa0 cmp r5, 0 |
| if (r5 == 0) {
0x0001cfa4 beq 0x1d0a8 | goto label_22;
| }
0x0001cfa8 cmp r5, 0x1f |
| if (r5 > 0x1f) {
0x0001cfac bhi 0x1d014 | goto label_4;
| }
| }
| label_2:
0x0001cfb0 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001cfb4 cmp r3, 0 |
| if (r3 == 0) {
0x0001cfb8 beq 0x1d068 | goto label_23;
| }
0x0001cfbc ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001cfc0 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001cfc4 cmp r3, r2 |
| if (r3 >= r2) {
0x0001cfc8 bhs 0x1d058 | goto label_24;
| }
0x0001cfcc add r2, r3, 1 | r2 = r3 + 1;
0x0001cfd0 str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x0001cfd4 mov r2, 0x26 | r2 = 0x26;
0x0001cfd8 strb r2, [r3] | *(r3) = r2;
| label_5:
0x0001cfdc mov r3, 0 | r3 = 0;
| label_6:
0x0001cfe0 ldr r2, [r3, r8] | r2 = *((r3 + r8));
0x0001cfe4 add r0, r8, r3 | r0 = r8 + r3;
0x0001cfe8 cmp r5, r2 |
| if (r5 != r2) {
0x0001cfec bne 0x1d078 | goto label_25;
| }
0x0001cff0 mov r1, r4 | r1 = r4;
0x0001cff4 add r0, r0, 8 | r0 += 8;
0x0001cff8 bl 0x12874 | fputs (r0, r1);
0x0001cffc b 0x1cf90 |
| } while (1);
| label_21:
0x0001d000 cmp r5, 0x3e |
| if (r5 == 0x3e) {
0x0001d004 beq 0x1cfb0 | goto label_2;
| }
| if (r5 > 0x3e) {
0x0001d008 bhi 0x1d04c | goto label_26;
| }
0x0001d00c cmp r5, 0x3c |
| if (r5 == 0x3c) {
0x0001d010 beq 0x1cfb0 | goto label_2;
| }
| label_4:
0x0001d014 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001d018 cmp r3, 0 |
| if (r3 == 0) {
0x0001d01c beq 0x1d098 | goto label_27;
| }
0x0001d020 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001d024 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001d028 cmp r3, r2 |
| if (r3 >= r2) {
0x0001d02c addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001d030 strlo r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
| }
| if (r3 < r2) {
0x0001d034 strblo r5, [r3] | *(r3) = r5;
| goto label_28;
| }
| if (r3 <= r2) {
| label_28:
0x0001d038 blo 0x1cf90 | goto label_3;
| }
0x0001d03c mov r1, r4 | r1 = r4;
0x0001d040 mov r0, r5 | r0 = r5;
0x0001d044 bl 0x126d0 | fputc_unlocked ();
0x0001d048 b 0x1cf90 | goto label_3;
| label_26:
0x0001d04c cmp r5, 0x7f |
| if (r5 <= 0x7f) {
0x0001d050 blo 0x1d014 | goto label_4;
| }
0x0001d054 b 0x1cfb0 | goto label_2;
| label_24:
0x0001d058 mov r1, r4 | r1 = r4;
0x0001d05c mov r0, 0x26 | r0 = 0x26;
0x0001d060 bl 0x126d0 | fputc_unlocked ();
0x0001d064 b 0x1cfdc | goto label_5;
| label_23:
0x0001d068 mov r1, r4 | r1 = r4;
0x0001d06c mov r0, 0x26 | r0 = 0x26;
0x0001d070 bl 0x127fc | fputc (r0, r1);
0x0001d074 b 0x1cfdc | goto label_5;
| label_25:
0x0001d078 add r3, r3, 0x10 | r3 += 0x10;
0x0001d07c cmp r3, 0x50 |
| if (r3 != 0x50) {
0x0001d080 bne 0x1cfe0 | goto label_6;
| }
0x0001d084 mov r2, r5 | r2 = r5;
0x0001d088 mov r1, sl | r1 = sl;
0x0001d08c mov r0, r4 | r0 = r4;
0x0001d090 bl 0x12910 | fprintf (r0, r1, r2)
0x0001d094 b 0x1cf90 | goto label_3;
| label_27:
0x0001d098 mov r1, r4 | r1 = r4;
0x0001d09c mov r0, r5 | r0 = r5;
0x0001d0a0 bl 0x127fc | fputc (r0, r1);
0x0001d0a4 b 0x1cf90 | goto label_3;
| label_22:
0x0001d0a8 mov r2, r7 | r2 = r7;
0x0001d0ac add r1, sb, 0x128 | r1 = sb + 0x128;
| do {
0x0001d0b0 add r1, r1, 1 | r1++;
| label_10:
0x0001d0b4 mov r0, r4 | r0 = r4;
0x0001d0b8 add sp, sp, 4 |
0x0001d0bc pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001d0c0 b 0x12910 | void (*0x12910)() ();
| label_15:
0x0001d0c4 cmp r5, 0 |
| if (r5 == 0) {
0x0001d0c8 beq 0x1d158 | goto label_17;
| }
0x0001d0cc cmp r3, 2 |
0x0001d0d0 ldr sl, [r5, 0x10] | sl = *((r5 + 0x10));
0x0001d0d4 ldr fp, [r5, 0x18] | fp = *((r5 + 0x18));
| if (r3 != 2) {
0x0001d0d8 bne 0x1d14c | goto label_29;
| }
0x0001d0dc ldr r3, [pc, 0x208] | r3 = *(0x1d2e8);
0x0001d0e0 add r3, pc, r3 | r3 = pc + r3;
| label_7:
0x0001d0e4 ldr r2, [pc, 0x1f8] | r2 = *(0x1d2e0);
0x0001d0e8 mov r0, r4 | r0 = r4;
0x0001d0ec ldr r8, [sb, r2] | r8 = *((sb + r2));
0x0001d0f0 mov r2, r7 | r2 = r7;
0x0001d0f4 add r1, r8, 0x2b4 | r1 = r8 + 0x2b4;
0x0001d0f8 add r1, r1, 2 | r1 += 2;
0x0001d0fc bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d100 mov r0, 3 | r0 = 3;
0x0001d104 ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x0001d108 mov r1, r5 | r1 = r5;
0x0001d10c blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x0001d110 ldr r0, [r5, 0x18] | r0 = *((r5 + 0x18));
0x0001d114 cmp r0, 0 |
| if (r0 != 0) {
0x0001d118 beq 0x1d138 |
0x0001d11c mov r1, r4 | r1 = r4;
0x0001d120 bl 0x12874 | fputs (r0, r1);
0x0001d124 ldr r3, [r6] | r3 = *(r6);
0x0001d128 cmp r3, 2 |
| if (r3 == 2) {
0x0001d12c beq 0x1d138 | goto label_30;
| }
0x0001d130 ldr r0, [r5, 0x18] | r0 = *((r5 + 0x18));
0x0001d134 bl 0x12a54 | free (r0);
| }
| label_30:
0x0001d138 str fp, [r5, 0x18] | *((r5 + 0x18)) = fp;
0x0001d13c str sl, [r5, 0x10] | *((r5 + 0x10)) = sl;
0x0001d140 ldr r2, [r6, 4] | r2 = *((r6 + 4));
0x0001d144 add r1, r8, 0x128 | r1 = r8 + 0x128;
0x0001d148 b 0x1d0b0 |
| } while (1);
| label_29:
0x0001d14c ldr r3, [pc, 0x19c] | r3 = *(0x1d2ec);
0x0001d150 add r3, pc, r3 | r3 = pc + r3;
0x0001d154 b 0x1d0e4 | goto label_7;
| label_17:
0x0001d158 ldr r3, [pc, 0x184] | r3 = *(0x1d2e0);
0x0001d15c mov r2, r7 | r2 = r7;
0x0001d160 ldr r1, [sb, r3] | r1 = *((sb + r3));
0x0001d164 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x0001d168 add r1, r1, 0x450 | r1 += 0x450;
0x0001d16c add r1, r1, 1 | r1++;
| do {
0x0001d170 mov r0, r4 | r0 = r4;
0x0001d174 add sp, sp, 4 |
0x0001d178 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001d17c b 0x12910 | void (*0x12910)() ();
| label_16:
0x0001d180 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x0001d184 cmp r3, 0 |
| if (r3 == 0) {
0x0001d188 beq 0x1d1a8 | goto label_31;
| }
0x0001d18c ldr r3, [pc, 0x160] | r3 = *(0x1d2f0);
0x0001d190 add r3, pc, r3 | r3 = pc + r3;
| label_8:
0x0001d194 ldr r2, [pc, 0x148] | r2 = *(0x1d2e0);
0x0001d198 ldr r1, [sb, r2] | r1 = *((sb + r2));
0x0001d19c mov r2, r7 | r2 = r7;
0x0001d1a0 add r1, r1, 0x36c | r1 += 0x36c;
0x0001d1a4 b 0x1d170 |
| } while (1);
| label_31:
0x0001d1a8 ldr r3, [pc, 0x148] | r3 = *(0x1d2f4);
0x0001d1ac add r3, pc, r3 | r3 = pc + r3;
0x0001d1b0 b 0x1d194 | goto label_8;
| label_18:
0x0001d1b4 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x0001d1b8 cmp r3, 0 |
| if (r3 == 0) {
0x0001d1bc beq 0x1d2d8 | goto label_32;
| }
0x0001d1c0 ldr r8, [r3] | r8 = *(r3);
0x0001d1c4 ldr r2, [pc, 0x118] | r2 = *(0x1d2e0);
0x0001d1c8 cmp r8, 0 |
0x0001d1cc ldr r1, [sb, r2] | r1 = *((sb + r2));
| if (r8 <= 0) {
0x0001d1d0 ble 0x1cf4c | goto label_9;
| }
0x0001d1d4 add r1, r1, 0x1b0 | r1 += 0x1b0;
0x0001d1d8 mov r2, r7 | r2 = r7;
0x0001d1dc add r1, r1, 1 | r1++;
0x0001d1e0 mov r0, r4 | r0 = r4;
0x0001d1e4 add sb, r3, 8 | sb = r3 + 8;
0x0001d1e8 bl 0x12910 | fprintf (r0, r1, r2)
0x0001d1ec ldr r3, [pc, 0x108] | r3 = *(0x1d2f8);
0x0001d1f0 add r3, pc, r3 | r3 = pc + r3;
0x0001d1f4 ldr r2, [r3] | r2 = *(0x1d2f8);
0x0001d1f8 mov r6, r3 | r6 = r3;
0x0001d1fc add r2, r2, 1 | r2++;
0x0001d200 str r2, [r3] | *(r3) = r2;
| do {
0x0001d204 sub r8, r8, 1 | r8--;
0x0001d208 cmn r8, 1 |
0x0001d20c ldr r1, [r6] | r1 = *(r6);
| if (r8 == 1) {
0x0001d210 bne 0x1d238 |
0x0001d214 sub r5, r1, 1 | r5 = r1 - 1;
0x0001d218 str r5, [r6] | *(r6) = r5;
0x0001d21c mov r6, 0x20 | r6 = 0x20;
| label_11:
0x0001d220 subs r5, r5, 1 | r5--;
| if (r5 >= r5) {
0x0001d224 bpl 0x1d24c | goto label_33;
| }
0x0001d228 ldr r1, [pc, 0xd0] | r1 = "u";
0x0001d22c mov r2, r7 | r2 = r7;
0x0001d230 add r1, pc, r1 | r1 = pc + r1;
0x0001d234 b 0x1d0b4 | goto label_10;
| }
0x0001d238 ldr r3, [sb], 4 | r3 = *(sb);
| sb += 4;
0x0001d23c mov r2, 0 | r2 = 0;
0x0001d240 mov r0, r4 | r0 = r4;
0x0001d244 bl 0x1ce64 | fcn_0001ce64 (r0, r1);
0x0001d248 b 0x1d204 |
| } while (1);
| label_33:
0x0001d24c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001d250 cmp r3, 0 |
| if (r3 == 0) {
0x0001d254 beq 0x1d2b8 | goto label_34;
| }
0x0001d258 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001d25c ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001d260 cmp r3, r2 |
| if (r3 >= r2) {
0x0001d264 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001d268 strlo r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001d26c strblo r6, [r3] | *(r3) = r6;
| }
| if (r3 > r2) {
0x0001d270 blo 0x1d280 |
0x0001d274 mov r1, r4 | r1 = r4;
0x0001d278 mov r0, 0x20 | r0 = 0x20;
0x0001d27c bl 0x126d0 | fputc_unlocked ();
| }
| label_12:
0x0001d280 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001d284 cmp r3, 0 |
| if (r3 == 0) {
0x0001d288 beq 0x1d2c8 | goto label_35;
| }
0x0001d28c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001d290 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001d294 cmp r3, r2 |
| if (r3 >= r2) {
0x0001d298 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001d29c strlo r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
| }
| if (r3 < r2) {
0x0001d2a0 strblo r6, [r3] | *(r3) = r6;
| goto label_36;
| }
| if (r3 <= r2) {
| label_36:
0x0001d2a4 blo 0x1d220 | goto label_11;
| }
0x0001d2a8 mov r1, r4 | r1 = r4;
0x0001d2ac mov r0, 0x20 | r0 = 0x20;
0x0001d2b0 bl 0x126d0 | fputc_unlocked ();
0x0001d2b4 b 0x1d220 | goto label_11;
| label_34:
0x0001d2b8 mov r1, r4 | r1 = r4;
0x0001d2bc mov r0, 0x20 | r0 = 0x20;
0x0001d2c0 bl 0x127fc | fputc (r0, r1);
0x0001d2c4 b 0x1d280 | goto label_12;
| label_35:
0x0001d2c8 mov r1, r4 | r1 = r4;
0x0001d2cc mov r0, 0x20 | r0 = 0x20;
0x0001d2d0 bl 0x127fc | fputc (r0, r1);
0x0001d2d4 b 0x1d220 | goto label_11;
| label_32:
0x0001d2d8 add sp, sp, 4 |
0x0001d2dc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1d304 */
| #include <stdint.h>
|
; (fcn) fcn.0001d304 () | void fcn_0001d304 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0001d304 push {r4, r5, r6, r7, r8, lr} |
0x0001d308 ldr r7, [r0, 0x44] | r7 = *((r0 + 0x44));
0x0001d30c ldr r6, [pc, 0x190] | r6 = *(0x1d4a0);
0x0001d310 ldr r3, [r0, 0x64] | r3 = *((r0 + 0x64));
0x0001d314 mov r4, r0 | r4 = r0;
0x0001d318 mov r8, r1 | r8 = r1;
0x0001d31c mov r5, r7 | r5 = r7;
0x0001d320 add r6, pc, r6 | r6 = pc + r6;
| do {
0x0001d324 ldrh r1, [r5, 2] | r1 = *((r5 + 2));
0x0001d328 cmp r1, r8 |
| if (r1 == r8) {
0x0001d32c beq 0x1d384 | goto label_1;
| }
0x0001d330 sub r3, r3, 1 | r3--;
0x0001d334 cmp r3, 0 |
0x0001d338 add r5, r5, 0x40 | r5 += 0x40;
0x0001d33c bgt 0x1d324 |
| } while (r3 > 0);
0x0001d340 mov r1, 0x30000 | r1 = 0x30000;
0x0001d344 and r0, r8, 0xff | r0 = r8 & 0xff;
0x0001d348 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x0001d34c cmp r0, 0 |
| if (r0 == 0) {
0x0001d350 beq 0x1d468 | goto label_2;
| }
0x0001d354 ldrh r3, [r4, 0x60] | r3 = *((r4 + 0x60));
0x0001d358 cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x0001d35c beq 0x1d468 | goto label_2;
| }
0x0001d360 add r7, r7, r3, lsl 6 | r7 += (r3 << 6);
0x0001d364 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x0001d368 str r7, [r2] | *(r2) = r7;
0x0001d36c sub r3, r3, 1 | r3--;
0x0001d370 str r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
0x0001d374 mov r3, 1 | r3 = 1;
0x0001d378 str r3, [r2, 0xc] | *((r2 + 0xc)) = r3;
0x0001d37c mov r0, 0 | r0 = 0;
0x0001d380 pop {r4, r5, r6, r7, r8, pc} |
| label_1:
0x0001d384 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x0001d388 ands r0, r3, 0x280000 | r0 = r3 & 0x280000;
| if (r0 == r3) {
0x0001d38c beq 0x1d458 | goto label_3;
| }
0x0001d390 ldr r2, [pc, 0x110] | r2 = *(0x1d4a4);
0x0001d394 cmp r3, r2 |
| if (r3 != r2) {
0x0001d398 bne 0x1d468 | goto label_2;
| }
0x0001d39c ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x0001d3a0 cmp r3, 0 |
| if (r3 == 0) {
0x0001d3a4 beq 0x1d468 | goto label_2;
| }
0x0001d3a8 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x0001d3ac tst r2, 4 |
| if ((r2 & 4) == 0) {
0x0001d3b0 beq 0x1d49c | goto label_4;
| }
0x0001d3b4 ldr r2, [pc, 0xf0] | r2 = *(0x1d4a8);
0x0001d3b8 ldr r1, [r6, r2] | r1 = *((r6 + r2));
0x0001d3bc ldr r2, [pc, 0xec] | r2 = *(0x1d4ac);
0x0001d3c0 ldr r1, [r1, 0x70] | r1 = *((r1 + 0x70));
0x0001d3c4 ldr r7, [r6, r2] | r7 = *((r6 + r2));
0x0001d3c8 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x0001d3cc ldr r0, [r7] | r0 = *(r7);
0x0001d3d0 bl 0x12910 | fprintf (r0, r1, r2)
0x0001d3d4 ldr r2, [r5, 0x2c] | r2 = *((r5 + 0x2c));
0x0001d3d8 cmp r2, 0 |
| if (r2 != 0) {
0x0001d3dc beq 0x1d3f8 |
0x0001d3e0 ldr r3, [pc, 0xcc] | r3 = *(0x1d4b0);
0x0001d3e4 ldr r0, [r7] | r0 = *(r7);
0x0001d3e8 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x0001d3ec add r1, r1, 0x240 | r1 += 0x240;
0x0001d3f0 add r1, r1, 2 | r1 += 2;
0x0001d3f4 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x0001d3f8 ldr r1, [r7] | r1 = *(r7);
0x0001d3fc ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d400 cmp r3, 0 |
| if (r3 == 0) {
0x0001d404 beq 0x1d44c | goto label_5;
| }
0x0001d408 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001d40c ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001d410 cmp r3, r2 |
| if (r3 >= r2) {
0x0001d414 bhs 0x1d440 | goto label_6;
| }
0x0001d418 add r2, r3, 1 | r2 = r3 + 1;
0x0001d41c str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0001d420 mov r2, 0xa | r2 = 0xa;
0x0001d424 strb r2, [r3] | *(r3) = r2;
| do {
| label_0:
0x0001d428 mov r0, r4 | r0 = r4;
0x0001d42c ldr r3, [r4, 0x54] | r3 = *((r4 + 0x54));
0x0001d430 mov r1, 1 | r1 = 1;
0x0001d434 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0001d438 mov r0, 1 | r0 = 1;
0x0001d43c bl 0x126c4 | exit (r0);
| label_6:
0x0001d440 mov r0, 0xa | r0 = 0xa;
0x0001d444 bl 0x126d0 | fputc_unlocked ();
0x0001d448 b 0x1d428 |
| } while (1);
| label_5:
0x0001d44c mov r0, 0xa | r0 = 0xa;
0x0001d450 bl 0x127fc | fputc (r0, r1);
0x0001d454 b 0x1d428 | goto label_0;
| label_3:
0x0001d458 mov r3, 1 | r3 = 1;
0x0001d45c str r5, [r2] | *(r2) = r5;
0x0001d460 str r3, [r2, 0xc] | *((r2 + 0xc)) = r3;
0x0001d464 pop {r4, r5, r6, r7, r8, pc} |
| label_2:
0x0001d468 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0001d46c tst r3, 4 |
| if ((r3 & 4) != 0) {
0x0001d470 beq 0x1d49c |
0x0001d474 ldr r3, [pc, 0x30] | r3 = *(0x1d4a8);
0x0001d478 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x0001d47c ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x0001d480 ldr r3, [pc, 0x28] | r3 = *(0x1d4ac);
0x0001d484 ldr r1, [r1, 0x78] | r1 = *((r1 + 0x78));
0x0001d488 ldr r0, [r6, r3] | r0 = *((r6 + r3));
0x0001d48c mov r3, r8 | r3 = r8;
0x0001d490 ldr r0, [r0] | r0 = *(r0);
0x0001d494 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d498 b 0x1d428 | goto label_0;
| }
| label_4:
0x0001d49c mvn r0, 0 | r0 = ~0;
0x0001d4a0 pop {r4, r5, r6, r7, r8, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1d4b8 */
| #include <stdint.h>
|
; (fcn) fcn.0001d4b8 () | void fcn_0001d4b8 (int32_t arg_10h, int32_t arg_34h, uint32_t arg1, int32_t arg2) {
| int32_t var_0h;
| char * format;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| char * var_1ch;
| char * s;
| int32_t var_34h;
| r0 = arg1;
| r1 = arg2;
0x0001d4b8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001d4bc ldr sl, [pc, 0x350] | sl = *(0x1d810);
0x0001d4c0 mov r5, r3 | r5 = r3;
0x0001d4c4 ldr r3, [pc, 0x34c] | r3 = *(0x1d814);
0x0001d4c8 add sl, pc, sl | sl = pc + sl;
0x0001d4cc cmp r0, 0xf |
0x0001d4d0 sub sp, sp, 0x34 |
0x0001d4d4 mov sb, r0 | sb = r0;
0x0001d4d8 mov fp, r1 |
0x0001d4dc mov r6, r2 | r6 = r2;
0x0001d4e0 ldr r4, [sl, r3] | r4 = *(0x1d810);
| if (r0 >= 0xf) {
0x0001d4e4 bls 0x1d50c |
0x0001d4e8 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d4ec str r3, [sp] | *(sp) = r3;
0x0001d4f0 ldr r3, [r1, 0x18] | r3 = *((r1 + 0x18));
0x0001d4f4 ldr r1, [pc, 0x320] |
0x0001d4f8 ldr r2, [r0, 0x1c] | r2 = *((r0 + 0x1c));
0x0001d4fc add r1, pc, r1 | r1 = pc + r1;
0x0001d500 ldr r1, [r1] | r1 = *(0x1d818);
0x0001d504 ldr r0, [r4] | r0 = *(r4);
0x0001d508 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x0001d50c ldr r3, [pc, 0x30c] | r3 = "_s_mismatches__08x._08x";
0x0001d510 ldr r2, [fp, 0x34] | r2 = *(arg_34h);
0x0001d514 ldr r3, [sl, r3] | r3 = *((sl + r3));
0x0001d518 ldr r0, [r4] | r0 = *(r4);
0x0001d51c ldr r1, [r3, 0x1a8] | r1 = *(0x1d9c4);
0x0001d520 str r3, [sp, 0xc] | format = r3;
0x0001d524 bl 0x12910 | fprintf (r0, r1, r2, "_s_mismatches__08x._08x")
0x0001d528 ldr r3, [r6] | r3 = *(r6);
0x0001d52c ldrb r3, [r3] | r3 = *(r3);
0x0001d530 cmp r3, 0x7f |
| if (r3 != 0x7f) {
0x0001d534 addeq r6, r6, 4 | r6 += 4;
| }
| if (r3 != 0x7f) {
0x0001d538 subeq r5, r5, 1 | r5--;
| }
0x0001d53c mov r3, 0 | r3 = 0;
| if (r3 != 0x7f) {
0x0001d540 moveq r8, 1 | r8 = 1;
| }
| if (r3 == 0x7f) {
0x0001d544 movne r8, 0 | r8 = 0;
| }
0x0001d548 mov r1, r6 | r1 = r6;
0x0001d54c mov r2, r5 | r2 = r5;
0x0001d550 mov r7, r3 | r7 = r3;
| do {
0x0001d554 ldr r0, [r1], 4 | r0 = *(r1);
| r1 += 4;
0x0001d558 str r2, [sp, 0x18] | var_18h = r2;
0x0001d55c str r3, [sp, 0x14] | var_14h = r3;
0x0001d560 str r1, [sp, 0x10] | var_10h = r1;
0x0001d564 str r1, [sp, 0x1c] | var_1ch = r1;
0x0001d568 bl 0x1261c | strlen (r0);
0x0001d56c ldr r2, [sp, 0x18] | r2 = var_18h;
0x0001d570 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001d574 sub r2, r2, 1 | r2--;
0x0001d578 ldr r1, [sp, 0x10] | r1 = var_10h;
0x0001d57c add r0, r0, 1 | r0++;
0x0001d580 cmp r7, r0 |
| if (r7 >= r0) {
0x0001d584 movlo r7, r0 | r7 = r0;
| }
0x0001d588 cmp r2, 0 |
0x0001d58c add r3, r3, r0 | r3 += r0;
0x0001d590 bgt 0x1d554 |
| } while (r2 > 0);
0x0001d594 cmp r7, 0x23 |
| if (r7 < 0x23) {
0x0001d598 bls 0x1d63c | goto label_5;
| }
0x0001d59c ldr r3, [pc, 0x280] | r3 = *(0x1d820);
0x0001d5a0 mov r7, r5 | r7 = r5;
0x0001d5a4 ldr sl, [sl, r3] | sl = *((sl + r3));
0x0001d5a8 add sl, sl, 0x130 | sl += 0x130;
| do {
0x0001d5ac ldr r2, [r6], 4 | r2 = *(r6);
| r6 += 4;
0x0001d5b0 mov r1, sl | r1 = sl;
0x0001d5b4 ldr r0, [r4] | r0 = *(r4);
0x0001d5b8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d5bc sub r7, r7, 1 | r7--;
0x0001d5c0 cmp r7, 0 |
0x0001d5c4 bgt 0x1d5ac |
| } while (r7 > 0);
| label_0:
0x0001d5c8 cmp sb, 0xf |
| if (sb >= 0xf) {
0x0001d5cc bls 0x1d5fc |
0x0001d5d0 ldr r1, [sp, 0xc] | r1 = format;
0x0001d5d4 sub r3, r5, 1 | r3 = r5 - 1;
0x0001d5d8 add r3, r3, r8 | r3 += r8;
0x0001d5dc ldr r1, [r1, 0x84] | r1 = *((r1 + 0x84));
0x0001d5e0 mov r2, r8 | r2 = r8;
0x0001d5e4 ldr r0, [r4] | r0 = *(r4);
0x0001d5e8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d5ec ldr r3, [sb, 0x54] | r3 = *((sb + 0x54));
0x0001d5f0 mov r1, 1 | r1 = 1;
0x0001d5f4 mov r0, sb | r0 = sb;
0x0001d5f8 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| }
0x0001d5fc ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x0001d600 ldr r0, [r4] | r0 = *(r4);
0x0001d604 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001d608 and r3, r3, 0xf | r3 &= 0xf;
0x0001d60c cmp r3, 4 |
| if (r3 != 4) {
0x0001d610 bne 0x1d7f8 | goto label_6;
| }
0x0001d614 ldr r3, [sp, 0xc] | r3 = format;
0x0001d618 mov r2, r5 | r2 = r5;
0x0001d61c ldr r1, [r3, 0x128] | r1 = *((r3 + 0x128));
0x0001d620 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d624 ldr r3, [sp, 0xc] | r3 = format;
0x0001d628 ldr r1, [r4] | r1 = *(r4);
0x0001d62c ldr r0, [r3, 0x1a0] | r0 = *((r3 + 0x1a0));
0x0001d630 bl 0x12874 | fputs (r0, r1);
| label_4:
0x0001d634 add sp, sp, 0x34 |
0x0001d638 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x0001d63c cmp r3, 0x4b |
| if (r3 > 0x4b) {
0x0001d640 bhi 0x1d738 | goto label_7;
| }
0x0001d644 ldr r1, [r4] | r1 = *(r4);
0x0001d648 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d64c cmp r3, 0 |
| if (r3 == 0) {
0x0001d650 beq 0x1d708 | goto label_8;
| }
0x0001d654 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001d658 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001d65c cmp r3, r2 |
| if (r3 >= r2) {
0x0001d660 bhs 0x1d6fc | goto label_9;
| }
0x0001d664 add r2, r3, 1 | r2 = r3 + 1;
0x0001d668 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0001d66c mov r2, 0x20 | r2 = 0x20;
0x0001d670 strb r2, [r3] | *(r3) = r2;
| label_1:
0x0001d674 mov r7, r5 | r7 = r5;
0x0001d678 mov sl, 0x20 | sl = 0x20;
| do {
0x0001d67c ldr r1, [r4] | r1 = *(r4);
0x0001d680 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d684 cmp r3, 0 |
| if (r3 == 0) {
0x0001d688 beq 0x1d714 | goto label_10;
| }
0x0001d68c ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001d690 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001d694 cmp r3, r2 |
| if (r3 >= r2) {
0x0001d698 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001d69c strlo r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001d6a0 strblo sl, [r3] | *(r3) = sl;
| }
| if (r3 > r2) {
0x0001d6a4 blo 0x1d6b0 |
0x0001d6a8 mov r0, 0x20 | r0 = 0x20;
0x0001d6ac bl 0x126d0 | fputc_unlocked ();
| }
| label_2:
0x0001d6b0 ldr r1, [r4] | r1 = *(r4);
0x0001d6b4 ldr r0, [r6], 4 | r0 = *(r6);
| r6 += 4;
0x0001d6b8 bl 0x12874 | fputs (r0, r1);
0x0001d6bc sub r7, r7, 1 | r7--;
0x0001d6c0 cmp r7, 0 |
0x0001d6c4 bgt 0x1d67c |
| } while (r7 > 0);
0x0001d6c8 ldr r1, [r4] | r1 = *(r4);
0x0001d6cc ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d6d0 cmp r3, 0 |
| if (r3 != 0) {
0x0001d6d4 beq 0x1d72c |
0x0001d6d8 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001d6dc ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001d6e0 cmp r3, r2 |
| if (r3 < r2) {
0x0001d6e4 bhs 0x1d720 |
0x0001d6e8 add r2, r3, 1 | r2 = r3 + 1;
0x0001d6ec str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0001d6f0 mov r2, 0xa | r2 = 0xa;
0x0001d6f4 strb r2, [r3] | *(r3) = r2;
0x0001d6f8 b 0x1d5c8 | goto label_0;
| label_9:
0x0001d6fc mov r0, 0x20 | r0 = 0x20;
0x0001d700 bl 0x126d0 | fputc_unlocked ();
0x0001d704 b 0x1d674 | goto label_1;
| label_8:
0x0001d708 mov r0, 0x20 | r0 = 0x20;
0x0001d70c bl 0x127fc | fputc (r0, r1);
0x0001d710 b 0x1d674 | goto label_1;
| label_10:
0x0001d714 mov r0, 0x20 | r0 = 0x20;
0x0001d718 bl 0x127fc | fputc (r0, r1);
0x0001d71c b 0x1d6b0 | goto label_2;
| }
0x0001d720 mov r0, 0xa | r0 = 0xa;
0x0001d724 bl 0x126d0 | fputc_unlocked ();
0x0001d728 b 0x1d5c8 | goto label_0;
| }
0x0001d72c mov r0, 0xa | r0 = 0xa;
0x0001d730 bl 0x127fc | fputc (r0, r1);
0x0001d734 b 0x1d5c8 | goto label_0;
| label_7:
0x0001d738 ldr r3, [pc, 0xe4] | r3 = *(0x1d820);
0x0001d73c mov r2, r7 | r2 = r7;
0x0001d740 ldr r3, [sl, r3] | r3 = *((sl + r3));
0x0001d744 add sl, sp, 0x20 | sl += s;
0x0001d748 add r1, r3, 0x134 | r1 = r3 + 0x134;
0x0001d74c add r1, r1, 2 | r1 += 2;
0x0001d750 mov r0, sl | r0 = sl;
0x0001d754 str r3, [sp, 0x10] | var_10h = r3;
0x0001d758 bl 0x12970 | sprintf (r0, r1, r2);
0x0001d75c mov r1, r7 | r1 = r7;
0x0001d760 mov r0, 0x4e | r0 = 0x4e;
0x0001d764 bl 0x3683c | fcn_0003683c (r0, r1);
0x0001d768 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001d76c ldr r1, [r4] | r1 = *(r4);
0x0001d770 mov r7, r5 | r7 = r5;
0x0001d774 str r0, [sp, 0x18] | var_18h = r0;
0x0001d778 add r0, r3, 0xfe | r0 = r3 + 0xfe;
0x0001d77c bl 0x12874 | fputs (r0, r1);
0x0001d780 sub r3, r6, 4 | r3 = r6 - 4;
0x0001d784 str r3, [sp, 0x14] | var_14h = r3;
0x0001d788 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001d78c str sl, [sp, 0x1c] | var_1ch = sl;
0x0001d790 add sl, r3, 0x1c4 | sl = r3 + 0x1c4;
0x0001d794 mov r6, 0 | r6 = 0;
0x0001d798 add sl, sl, 3 | sl += 3;
| do {
| label_3:
0x0001d79c ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001d7a0 sub r7, r7, 1 | r7--;
0x0001d7a4 ldr r2, [r3, 4]! | r2 = *((r3 += 4));
0x0001d7a8 cmp r7, 0 |
0x0001d7ac ldr r0, [r4] | r0 = *(r4);
0x0001d7b0 str r3, [sp, 0x14] | var_14h = r3;
| if (r7 <= 0) {
0x0001d7b4 bgt 0x1d7cc |
0x0001d7b8 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001d7bc add r1, r3, 0x1c0 | r1 = r3 + 0x1c0;
0x0001d7c0 add r1, r1, 3 | r1 += 3;
0x0001d7c4 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d7c8 b 0x1d5c8 | goto label_0;
| }
0x0001d7cc ldr r3, [sp, 0x18] | r3 = var_18h;
0x0001d7d0 add r6, r6, 1 | r6++;
0x0001d7d4 cmp r3, r6 |
| if (r3 != r6) {
0x0001d7d8 bne 0x1d7ec | goto label_11;
| }
0x0001d7dc mov r1, sl | r1 = sl;
0x0001d7e0 bl 0x12910 | fprintf (r0, r1)
0x0001d7e4 mov r6, 0 | r6 = 0;
0x0001d7e8 b 0x1d79c |
| } while (1);
| label_11:
0x0001d7ec ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x0001d7f0 bl 0x12910 | fprintf (r0, r1)
0x0001d7f4 b 0x1d79c | goto label_3;
| label_6:
0x0001d7f8 ldr r1, [sp, 0xc] | r1 = format;
0x0001d7fc sub r3, r5, 1 | r3 = r5 - 1;
0x0001d800 add r3, r3, r8 | r3 += r8;
0x0001d804 mov r2, r8 | r2 = r8;
0x0001d808 ldr r1, [r1, 0x84] | r1 = *((r1 + 0x84));
0x0001d80c bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d810 b 0x1d634 | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1da34 */
| #include <stdint.h>
|
; (fcn) fcn.0001da34 () | void fcn_0001da34 (int32_t arg1) {
| r0 = arg1;
0x0001da34 ldr r3, [pc, 0x2c] |
0x0001da38 ldr r2, [pc, 0x2c] | r2 = *(0x1da68);
0x0001da3c add r3, pc, r3 | r3 = pc + r3;
0x0001da40 push {r4, lr} |
0x0001da44 ldr r1, [r3, r2] |
0x0001da48 ldr r2, [pc, 0x20] | r2 = *(0x1da6c);
0x0001da4c ldr r1, [r1, 0x30] | r1 = *(0x1da94);
0x0001da50 ldr r3, [r3, r2] | r3 = *(0x1da64);
0x0001da54 mov r2, r0 | r2 = r0;
0x0001da58 ldr r0, [r3] | r0 = *(0x1da64);
0x0001da5c bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x0001da60 mov r0, 0x46 | r0 = 0x46;
0x0001da64 bl 0x1d9f8 | fcn_0001d9f8 (r0);
0x0001da68 strheq r5, [r3], -ip | __asm ("strheq r5, [r3], -ip");
| if (? != ?) {
0x0001da6c andeq r0, r0, ip, asr 5 | r0 &= (ip >> 5);
| }
| /* Beware that this jump is a conditional jump.
| * r2dec transformed it as a return, due being the
| * last instruction. Please, check 'pdda' output
| * for more hints. */
0x0001da70 andeq r0, r0, r4, lsr 5 | return r0 &= (r4 >> 5);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1da74 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0001da74 () | void fcn_0001da74 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0001da74 push {r4, lr} |
0x0001da78 ldr lr, [r1] |
0x0001da7c ldr ip, [r1, 8] | ip = *((r1 + 8));
0x0001da80 ldr r3, [lr, 0x10] | r3 = *((lr + 0x10));
0x0001da84 ldr r2, [pc, 0x1cc] | r2 = *(0x1dc54);
0x0001da88 bic r3, r3, 0xf0000000 | r3 = BIT_MASK (r3, 0xf0000000);
0x0001da8c bic r3, r3, 0xff | r3 = BIT_MASK (r3, 0xff);
0x0001da90 orr r3, r3, ip | r3 |= ip;
0x0001da94 tst r3, 0x20 |
0x0001da98 add r2, pc, r2 | r2 = pc + r2;
0x0001da9c str r3, [r1, 8] | *((r1 + 8)) = r3;
0x0001daa0 ldr ip, [r1, 0xc] | ip = *((r1 + 0xc));
| if ((r3 & 0x20) == 0) {
0x0001daa4 bne 0x1dab0 |
0x0001daa8 tst r3, 0xf000 |
| if ((r3 & 0xf000) != 0) {
0x0001daac bne 0x1db04 | goto label_5;
| }
| }
0x0001dab0 cmp ip, 1 |
| if (ip != 1) {
0x0001dab4 bne 0x1dacc | goto label_6;
| }
0x0001dab8 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x0001dabc add r3, r3, 1 | r3++;
| do {
0x0001dac0 str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x0001dac4 mov r0, 0 | r0 = 0;
0x0001dac8 pop {r4, pc} |
| label_6:
0x0001dacc ldr r3, [r1, 4] | r3 = *((r1 + 4));
0x0001dad0 cmp r3, 0 |
| if (r3 != 0) {
0x0001dad4 beq 0x1db48 |
0x0001dad8 ldr r3, [pc, 0x17c] | r3 = *(0x1dc58);
0x0001dadc ldr r1, [r2, r3] | r1 = *((r2 + r3));
0x0001dae0 ldr r3, [pc, 0x178] | r3 = *(0x1dc5c);
0x0001dae4 ldr r1, [r1, 0x9c] | r1 = *((r1 + 0x9c));
0x0001dae8 ldr ip, [r2, r3] | ip = *((r2 + r3));
0x0001daec ldr r3, [lr, 0x34] | r3 = *((lr + 0x34));
0x0001daf0 ldr r2, [r0, 0x18] | r2 = *((r0 + 0x18));
| label_2:
0x0001daf4 ldr r0, [ip] | r0 = *(ip);
0x0001daf8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001dafc mvn r0, 0 | r0 = ~0;
0x0001db00 pop {r4, pc} |
| label_5:
0x0001db04 tst r3, 0x10000 |
| if ((r3 & 0x10000) == 0) {
0x0001db08 beq 0x1dbc0 | goto label_7;
| }
0x0001db0c cmp ip, 1 |
| if (ip != 1) {
0x0001db10 beq 0x1db2c |
0x0001db14 cmp ip, 2 |
| if (ip == 2) {
0x0001db18 beq 0x1db78 | goto label_8;
| }
0x0001db1c ldr r3, [pc, 0x138] | r3 = *(0x1dc58);
0x0001db20 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0001db24 ldr r0, [r3, 0x44] | r0 = *(0x1dc9c);
0x0001db28 bl 0x1da34 | fcn_0001da34 (r0);
| }
0x0001db2c ldr r2, [r0, 0x14] | r2 = *((r0 + 0x14));
0x0001db30 add r3, r2, 1 | r3 = r2 + 1;
0x0001db34 str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x0001db38 ldrb r2, [r2, 1] | r2 = *((r2 + 1));
0x0001db3c cmp r2, 0 |
| if (r2 == 0) {
0x0001db40 beq 0x1db50 | goto label_9;
| }
| label_0:
0x0001db44 str r3, [r1, 4] | *((r1 + 4)) = r3;
| }
| label_1:
0x0001db48 mov r3, 0 | r3 = 0;
0x0001db4c b 0x1dac0 |
| } while (1);
| label_9:
0x0001db50 ldr r3, [r0, 0x10] | r3 = *((r0 + 0x10));
0x0001db54 ldr r2, [r0, 8] | r2 = *((r0 + 8));
0x0001db58 ldr r2, [r2, r3, lsl 2] | offset_0 = r3 << 2;
| r2 = *((r2 + offset_0));
0x0001db5c cmp r2, 0 |
| if (r2 != 0) {
0x0001db60 beq 0x1db70 |
0x0001db64 ldrb ip, [r2] | ip = *(r2);
0x0001db68 cmp ip, 0x2d |
| if (ip != 0x2d) {
0x0001db6c bne 0x1dbb0 | goto label_10;
| }
| }
0x0001db70 mov r3, 0 | r3 = 0;
0x0001db74 b 0x1db44 | goto label_0;
| label_8:
0x0001db78 ldr r3, [r1, 4] | r3 = *((r1 + 4));
0x0001db7c cmp r3, 0 |
| if (r3 != 0) {
0x0001db80 bne 0x1db48 | goto label_1;
| }
0x0001db84 ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x0001db88 tst r3, 3 |
| if ((r3 & 3) == 0) {
0x0001db8c beq 0x1db48 | goto label_1;
| }
0x0001db90 ldr r3, [r0, 0x10] | r3 = *((r0 + 0x10));
0x0001db94 ldr r2, [r0, 8] | r2 = *((r0 + 8));
0x0001db98 ldr r2, [r2, r3, lsl 2] | offset_1 = r3 << 2;
| r2 = *((r2 + offset_1));
0x0001db9c cmp r2, 0 |
| if (r2 == 0) {
0x0001dba0 beq 0x1db48 | goto label_1;
| }
0x0001dba4 ldrb ip, [r2] | ip = *(r2);
0x0001dba8 cmp ip, 0x2d |
| if (ip == 0x2d) {
0x0001dbac beq 0x1db48 | goto label_1;
| }
| label_10:
0x0001dbb0 add r3, r3, 1 | r3++;
0x0001dbb4 str r3, [r0, 0x10] | *((r0 + 0x10)) = r3;
0x0001dbb8 str r2, [r1, 4] | *((r1 + 4)) = r2;
0x0001dbbc b 0x1db48 | goto label_1;
| label_7:
0x0001dbc0 cmp ip, 1 |
0x0001dbc4 ldr r3, [r0, 0x10] | r3 = *((r0 + 0x10));
| if (ip == 1) {
0x0001dbc8 beq 0x1dc04 | goto label_11;
| }
0x0001dbcc cmp ip, 2 |
| if (ip == 2) {
0x0001dbd0 beq 0x1dc38 | goto label_12;
| }
| label_3:
0x0001dbd4 ldr r1, [r0, 0x10] | r1 = *((r0 + 0x10));
0x0001dbd8 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x0001dbdc cmp r1, r3 |
| if (r1 < r3) {
0x0001dbe0 bls 0x1db48 | goto label_1;
| }
0x0001dbe4 ldr r3, [pc, 0x70] | r3 = *(0x1dc58);
0x0001dbe8 ldr r1, [r2, r3] | r1 = *((r2 + r3));
0x0001dbec ldr r3, [pc, 0x6c] | r3 = *(0x1dc5c);
0x0001dbf0 ldr r1, [r1, 0x90] | r1 = *((r1 + 0x90));
0x0001dbf4 ldr ip, [r2, r3] | ip = *((r2 + r3));
0x0001dbf8 ldr r3, [lr, 0x34] | r3 = *((lr + 0x34));
0x0001dbfc ldr r2, [r0, 0x18] | r2 = *((r0 + 0x18));
0x0001dc00 b 0x1daf4 | goto label_2;
| label_11:
0x0001dc04 ldr ip, [r0, 0x14] | ip = *((r0 + 0x14));
0x0001dc08 add r4, ip, 1 | r4 = ip + 1;
0x0001dc0c str r4, [r0, 0x14] | *((r0 + 0x14)) = r4;
0x0001dc10 ldrb ip, [ip, 1] | ip = *((ip + 1));
0x0001dc14 cmp ip, 0 |
| if (ip != 0) {
0x0001dc18 ldreq ip, [r0, 8] | ip = *((r0 + 8));
| }
| if (ip != 0) {
0x0001dc1c addeq r4, r3, 1 | r4 = r3 + 1;
| }
| if (ip != 0) {
0x0001dc20 ldreq r3, [ip, r3, lsl 2] | offset_2 = r3 << 2;
| r3 = *((ip + offset_2));
| }
| if (ip != 0) {
0x0001dc24 streq r4, [r0, 0x10] | *((r0 + 0x10)) = r4;
| }
| if (ip != 0) {
0x0001dc28 streq r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
| }
0x0001dc2c ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
| label_4:
0x0001dc30 str r3, [r1, 4] | *((r1 + 4)) = r3;
0x0001dc34 b 0x1dbd4 | goto label_3;
| label_12:
0x0001dc38 ldr ip, [r1, 4] | ip = *((r1 + 4));
0x0001dc3c cmp ip, 0 |
| if (ip != 0) {
0x0001dc40 bne 0x1dbd4 | goto label_3;
| }
0x0001dc44 ldr ip, [r0, 8] | ip = *((r0 + 8));
0x0001dc48 add r4, r3, 1 | r4 = r3 + 1;
0x0001dc4c str r4, [r0, 0x10] | *((r0 + 0x10)) = r4;
0x0001dc50 ldr r3, [ip, r3, lsl 2] | offset_3 = r3 << 2;
| r3 = *((ip + offset_3));
0x0001dc54 b 0x1dc30 | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1dddc */
| #include <stdint.h>
|
; (fcn) fcn.0001dddc () | void fcn_0001dddc (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0001dddc push {r0, r1, r2, r3, r7, lr} |
0x0001dde0 ldr r3, [pc, 0x54] |
0x0001dde4 mov sb, r2 | sb = r2;
0x0001dde8 ldr r2, [pc, 0x50] | r2 = *(0x1de3c);
0x0001ddec add r3, pc, r3 | r3 = pc + r3;
0x0001ddf0 ldr r2, [r3, r2] | r2 = *(0x1de38);
0x0001ddf4 mov r8, r1 | r8 = r1;
0x0001ddf8 ldr r5, [r2] | r5 = *(0x1de38);
0x0001ddfc ldr r2, [pc, 0x40] | r2 = *(0x1de40);
0x0001de00 mov r7, r0 | r7 = r0;
0x0001de04 ldr r3, [r3, r2] | r3 = *(0x1de38);
0x0001de08 ldr r6, [r3, 0x60] | r6 = *(0x1de98);
0x0001de0c bl 0x12430 | r0 = errno_location ();
0x0001de10 ldr r4, [r0] | r4 = *(r0);
0x0001de14 mov r0, r4 | r0 = r4;
0x0001de18 bl 0x12a9c | strerror (r0);
0x0001de1c mov r3, r4 | r3 = r4;
0x0001de20 mov r2, r7 | r2 = r7;
0x0001de24 mov r1, r6 | r1 = r6;
0x0001de28 stm sp, {r0, r8, sb} | *(sp) = r0;
| *((sp + 4)) = r8;
| *((sp + 8)) = sb;
0x0001de2c mov r0, r5 | r0 = r5;
0x0001de30 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001de34 mov r0, 1 | r0 = 1;
0x0001de38 bl 0x1d9f8 | fcn_0001d9f8 (r0);
| if (? != ?) {
0x0001de3c andeq r5, r3, ip, lsl 4 | r5 = r3 & (ip << 4);
| }
| if (? != ?) {
0x0001de40 andeq r0, r0, r4, lsr 5 | r0 &= (r4 >> 5);
| }
| /* Beware that this jump is a conditional jump.
| * r2dec transformed it as a return, due being the
| * last instruction. Please, check 'pdda' output
| * for more hints. */
0x0001de44 andeq r0, r0, ip, asr 5 | return r0 &= (ip >> 5);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1e11c */
| #include <stdint.h>
|
; (fcn) fcn.0001e11c () | void fcn_0001e11c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x0001e11c ldrh r2, [r1, 8] | r2 = *((r1 + 8));
0x0001e120 ldr r3, [pc, 0x94] | r3 = *(0x1e1b8);
0x0001e124 cmp r2, 0x8000 |
0x0001e128 ldr r2, [pc, 0x90] | r2 = *(0x1e1bc);
0x0001e12c add r3, pc, r3 | r3 = pc + r3;
0x0001e130 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x0001e134 ldr r5, [r3, r2] | r5 = *(0x1e1b8);
0x0001e138 mov r7, r0 | r7 = r0;
0x0001e13c mov r6, r1 | r6 = r1;
| if (r2 == 0x8000) {
0x0001e140 ldrne r4, [r5, 0x74] | r4 = *((r5 + 0x74));
| }
| if (r2 != 0x8000) {
0x0001e144 ldreq r4, [pc, 0x78] | r4 = *((pc + 0x78));
| }
| if (r2 != 0x8000) {
0x0001e148 addeq r4, pc, r4 | r4 = pc + r4;
| }
| if (r2 != 0x8000) {
0x0001e14c addeq r4, r4, 0x250 | r4 += 0x250;
| }
| if (r2 != 0x8000) {
0x0001e150 addeq r4, r4, 2 | r4 += 2;
| }
0x0001e154 ldr r2, [pc, 0x6c] | r2 = *(0x1e1c4);
0x0001e158 ldr r1, [r5, 0x110] | r1 = *(0x1e2c8);
0x0001e15c ldr r8, [r3, r2] | r8 = *(0x1e1b8);
0x0001e160 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001e164 ldr r0, [r8] | r0 = *(0x1e1b8);
0x0001e168 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5, r6)
0x0001e16c ldrh r2, [r6, 0xc] | r2 = *((r6 + 0xc));
0x0001e170 cmp r2, 1 |
| if (r2 < 1) {
0x0001e174 bls 0x1e1a4 | goto label_0;
| }
0x0001e178 str r4, [sp] | *(sp) = r4;
0x0001e17c ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x0001e180 ldr r1, [r5, 0x5c] | r1 = *((r5 + 0x5c));
0x0001e184 ldr r0, [r8] | r0 = *(r8);
0x0001e188 bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
| do {
0x0001e18c ldr r3, [r7, 0x54] | r3 = *((r7 + 0x54));
0x0001e190 mov r1, 1 | r1 = 1;
0x0001e194 mov r0, r7 | r0 = r7;
0x0001e198 add sp, sp, 8 |
0x0001e19c pop {r4, r5, r6, r7, r8, lr} |
0x0001e1a0 bx r3 | return uint32_t (*r3)() ();
| label_0:
0x0001e1a4 mov r3, r4 | r3 = r4;
0x0001e1a8 ldr r2, [r6, 0x34] | r2 = *((r6 + 0x34));
0x0001e1ac ldr r1, [r5, 0xd8] | r1 = *((r5 + 0xd8));
0x0001e1b0 ldr r0, [r8] | r0 = *(r8);
0x0001e1b4 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001e1b8 b 0x1e18c |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1e1cc */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0001e1cc () | void fcn_0001e1cc (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x0001e1cc push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x0001e1d0 ldr r4, [r1] | r4 = *(r1);
0x0001e1d4 ldr r8, [pc, 0x164] | r8 = *(0x1e33c);
0x0001e1d8 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001e1dc add r8, pc, r8 | r8 = pc + r8;
0x0001e1e0 tst r3, 0x40 |
0x0001e1e4 mov r6, r0 | r6 = r0;
0x0001e1e8 mov r7, r1 | r7 = r1;
0x0001e1ec ldr r5, [r4, 0x28] | r5 = *((r4 + 0x28));
| if ((r3 & 0x40) != 0) {
0x0001e1f0 beq 0x1e1fc |
0x0001e1f4 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x0001e1f8 bl 0x12a54 | free (r0);
| }
0x0001e1fc ldr r0, [r6, 0xc] | r0 = *((r6 + 0xc));
0x0001e200 ldr ip, [r7, 4] | ip = *((r7 + 4));
0x0001e204 tst r0, 0x80000 |
0x0001e208 str ip, [r4, 0x18] | *((r4 + 0x18)) = ip;
0x0001e20c ldr lr, [r4, 0x10] |
| if ((r0 & 0x80000) != 0) {
0x0001e210 beq 0x1e220 |
0x0001e214 tst lr, 0x100 |
| if ((lr & 0x100) == 0) {
0x0001e218 movne r0, 1 | r0 = 1;
| }
| if ((lr & 0x100) != 0) {
0x0001e21c bne 0x1e280 | goto label_2;
| }
| }
0x0001e220 ldrh r1, [r4, 8] | r1 = *((r4 + 8));
0x0001e224 ldrh r3, [r4] | r3 = *(r4);
0x0001e228 cmp r1, 0x8000 |
| if (r1 == 0x8000) {
0x0001e22c beq 0x1e310 | goto label_3;
| }
0x0001e230 ldr r2, [r6, 0x44] | r2 = *((r6 + 0x44));
0x0001e234 tst lr, 4 |
0x0001e238 add r1, r2, r1, lsl 6 | r1 = r2 + (r1 << 6);
| if ((lr & 4) == 0) {
0x0001e23c beq 0x1e288 | goto label_4;
| }
0x0001e240 ldrh lr, [r1, 4] |
0x0001e244 cmp lr, r3 |
| if (lr == r3) {
0x0001e248 beq 0x1e290 | goto label_5;
| }
0x0001e24c ldr r3, [pc, 0xf0] | r3 = *(0x1e340);
0x0001e250 add r2, r2, lr, lsl 6 | r2 += (lr << 6);
0x0001e254 ldr ip, [r8, r3] | ip = *((r8 + r3));
0x0001e258 ldr r3, [pc, 0xe8] | r3 = *(0x1e344);
0x0001e25c ldr r0, [r8, r3] | r0 = *((r8 + r3));
0x0001e260 ldr r3, [r2, 0x34] | r3 = *((r2 + 0x34));
0x0001e264 str r3, [sp] | *(sp) = r3;
0x0001e268 ldr r2, [r1, 0x34] | r2 = *((r1 + 0x34));
0x0001e26c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001e270 ldr r1, [ip, 0x94] | r1 = *((ip + 0x94));
0x0001e274 ldr r0, [r0] | r0 = *(r0);
0x0001e278 bl 0x12910 | fprintf (r0, r1, r2, r3)
| do {
| label_0:
0x0001e27c mvn r0, 0 | r0 = ~0;
| label_2:
0x0001e280 add sp, sp, 8 |
0x0001e284 pop {r4, r5, r6, r7, r8, pc} |
| label_4:
0x0001e288 mov r2, 0x8000 | r2 = 0x8000;
0x0001e28c strh r2, [r1, 4] | *((r1 + 4)) = r2;
| label_5:
0x0001e290 ldrh r2, [r1, 4] | r2 = *((r1 + 4));
0x0001e294 cmp r2, r3 |
| if (r2 == r3) {
0x0001e298 ldrne r2, [r7, 8] | r2 = *((r7 + 8));
| }
0x0001e29c ldrhne lr, [r4, 2] | __asm ("ldrhne lr, [r4, 2]");
0x0001e2a0 strhne r3, [r1, 4] | __asm ("strhne r3, [r1, 4]");
| if (r2 == r3) {
0x0001e2a4 orrne r3, r2, 0x10 | r3 = r2 | 0x10;
| }
0x0001e2a8 strhne lr, [r1, 6] | __asm ("strhne lr, [r1, 6]");
| if (r2 == r3) {
0x0001e2ac strne r3, [r7, 8] | *((r7 + 8)) = r3;
| }
0x0001e2b0 str ip, [r1, 0x18] | *((r1 + 0x18)) = ip;
| label_1:
0x0001e2b4 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001e2b8 ldr ip, [r7, 8] | ip = *((r7 + 8));
0x0001e2bc ldr r2, [pc, 0x88] | r2 = *(0x1e348);
0x0001e2c0 bic r3, r3, 0xf0000000 | r3 = BIT_MASK (r3, 0xf0000000);
0x0001e2c4 bic r3, r3, 0xff | r3 = BIT_MASK (r3, 0xff);
0x0001e2c8 and r2, r2, ip | r2 &= ip;
0x0001e2cc orr r3, r3, r2 | r3 |= r2;
0x0001e2d0 tst r3, 4 |
0x0001e2d4 str r3, [r1, 0x10] | *((r1 + 0x10)) = r3;
| if ((r3 & 4) == 0) {
0x0001e2d8 beq 0x1e324 | goto label_6;
| }
0x0001e2dc ldrh r3, [r1, 0xe] | r3 = *((r1 + 0xe));
0x0001e2e0 ldrh r2, [r1, 0xc] | r2 = *((r1 + 0xc));
0x0001e2e4 add r3, r3, 1 | r3++;
0x0001e2e8 lsl r3, r3, 0x10 | r3 <<= 0x10;
0x0001e2ec lsr r3, r3, 0x10 | r3 >>= 0x10;
0x0001e2f0 cmp r2, r3 |
0x0001e2f4 strh r3, [r1, 0xe] | *((r1 + 0xe)) = r3;
| if (r2 >= r3) {
0x0001e2f8 bhs 0x1e324 | goto label_6;
| }
0x0001e2fc tst r0, 4 |
0x0001e300 beq 0x1e27c |
| } while ((r0 & 4) == 0);
0x0001e304 mov r0, r6 | r0 = r6;
0x0001e308 bl 0x1e11c | fcn_0001e11c (r0, r1);
0x0001e30c b 0x1e27c | goto label_0;
| label_3:
0x0001e310 ldrh r2, [r4, 2] | r2 = *((r4 + 2));
0x0001e314 strh r3, [r4, 4] | *((r4 + 4)) = r3;
0x0001e318 strh r2, [r4, 6] | *((r4 + 6)) = r2;
0x0001e31c mov r1, r4 | r1 = r4;
0x0001e320 b 0x1e2b4 | goto label_1;
| label_6:
0x0001e324 cmp r5, 0 |
| if (r5 == 0) {
0x0001e328 moveq r0, r5 | r0 = r5;
| goto label_7;
| }
| if (r5 == 0) {
| label_7:
0x0001e32c beq 0x1e280 | goto label_2;
| }
0x0001e330 mov r0, r6 | r0 = r6;
0x0001e334 blx r5 | uint32_t (*r5)(uint32_t) (r0);
0x0001e338 mov r0, 0 | r0 = 0;
0x0001e33c b 0x1e280 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1e56c */
| #include <stdint.h>
|
; (fcn) fcn.0001e56c () | void fcn_0001e56c (int32_t arg1) {
| r0 = arg1;
0x0001e56c push {r4, r5, r6, lr} |
0x0001e570 ldr r4, [pc, 0x40] | r4 = *(0x1e5b4);
0x0001e574 mov r5, r0 | r5 = r0;
0x0001e578 bl 0x12acc | strdup (r0);
0x0001e57c add r4, pc, r4 | r4 = pc + r4;
0x0001e580 cmp r0, 0 |
0x0001e584 popne {r4, r5, r6, pc} |
0x0001e588 mov r0, r5 | r0 = r5;
0x0001e58c bl 0x1261c | strlen (r0);
0x0001e590 ldr r3, [pc, 0x24] | r3 = *(0x1e5b8);
0x0001e594 ldr r1, [r4, r3] |
0x0001e598 ldr r3, [pc, 0x20] | r3 = *(0x1e5bc);
0x0001e59c ldr r1, [r1, 0x14] | r1 = *(0x1e5c8);
0x0001e5a0 ldr r3, [r4, r3] | r3 = *(0x1e5b4);
0x0001e5a4 mov r2, r0 | r2 = r0;
0x0001e5a8 ldr r0, [r3] | r0 = *(0x1e5b4);
0x0001e5ac bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001e5b0 mov r0, 1 | r0 = 1;
0x0001e5b4 bl 0x1d9f8 | fcn_0001d9f8 (r0);
| if (r0 != 0) {
0x0001e5b8 andeq r4, r3, ip, ror sl | r4 = r3 & (ip >>> sl);
| }
| if (r0 != 0) {
0x0001e5bc andeq r0, r0, ip, asr 5 | r0 &= (ip >> 5);
| }
| if (r0 != 0) {
0x0001e5c0 andeq r0, r0, r4, lsr 5 | r0 &= (r4 >> 5);
| }
0x0001e5c4 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0001e5c8 ldr r7, [r0, 0x50] | r7 = *((r0 + 0x50));
0x0001e5cc ldr r4, [r0, 0x44] | r4 = *((r0 + 0x44));
0x0001e5d0 ldr r6, [r0, 0x64] | r6 = *((r0 + 0x64));
0x0001e5d4 mov r5, r0 | r5 = r0;
0x0001e5d8 mov r8, 0 | r8 = 0;
| do {
0x0001e5dc cmp r6, 0 |
| if (r6 > 0) {
0x0001e5e0 pople {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
0x0001e5e4 ldr r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x0001e5e8 lsr r3, r2, 0xc | r3 = r2 >> 0xc;
0x0001e5ec and r3, r3, 0xf | r3 &= 0xf;
0x0001e5f0 cmp r3, 1 |
| if (r3 == 1) {
0x0001e5f4 beq 0x1e60c | goto label_1;
| }
0x0001e5f8 cmp r3, 6 |
| if (r3 == 6) {
0x0001e5fc beq 0x1e64c | goto label_2;
| }
| label_0:
0x0001e600 add r4, r4, 0x40 | r4 += 0x40;
0x0001e604 sub r6, r6, 1 | r6--;
0x0001e608 b 0x1e5dc |
| } while (1);
| label_1:
0x0001e60c tst r2, 0x400 |
| if ((r2 & 0x400) == 0) {
0x0001e610 ldrne r3, [r5, 0x44] | r3 = *((r5 + 0x44));
| }
| if ((r2 & 0x400) == 0) {
0x0001e614 subne r1, r4, r3 | r1 = r4 - r3;
| }
| if ((r2 & 0x400) == 0) {
0x0001e618 ldrne r3, [r7, 0x44] | r3 = *((r7 + 0x44));
| }
| if ((r2 & 0x400) == 0) {
0x0001e61c addne r3, r3, r1 | r3 += r1;
| }
| if ((r2 & 0x400) == 0) {
0x0001e620 strne r8, [r3, 0x1c] | *((r3 + 0x1c)) = r8;
| }
0x0001e624 tst r2, 0x40 |
| if ((r2 & 0x40) == 0) {
0x0001e628 beq 0x1e600 | goto label_0;
| }
0x0001e62c ldr sb, [r5, 0x44] | sb = *((r5 + 0x44));
0x0001e630 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x0001e634 sub r3, r4, sb | r3 = r4 - sb;
0x0001e638 ldr sb, [r7, 0x44] | sb = *((r7 + 0x44));
0x0001e63c add sb, sb, r3 | sb += r3;
0x0001e640 bl 0x1e56c | fcn_0001e56c (r0);
0x0001e644 str r0, [sb, 0x18] | *((sb + 0x18)) = r0;
0x0001e648 b 0x1e600 | goto label_0;
| label_2:
0x0001e64c ldr r3, [r5, 0x44] | r3 = *((r5 + 0x44));
0x0001e650 sub r2, r4, r3 | r2 = r4 - r3;
0x0001e654 ldr r3, [r7, 0x44] | r3 = *((r7 + 0x44));
0x0001e658 add r3, r3, r2 | r3 += r2;
0x0001e65c str r8, [r3, 0x1c] | *((r3 + 0x1c)) = r8;
0x0001e660 b 0x1e600 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1e664 */
| #include <stdint.h>
|
; (fcn) fcn.0001e664 () | void fcn_0001e664 (void * arg1) {
| r0 = arg1;
0x0001e664 push {r4, r5, r6, lr} |
0x0001e668 ldr r4, [pc, 0x38] | r4 = *(0x1e6a4);
0x0001e66c mov r5, r0 | r5 = r0;
0x0001e670 bl 0x1258c | malloc (r0);
0x0001e674 add r4, pc, r4 | r4 = pc + r4;
0x0001e678 cmp r0, 0 |
0x0001e67c popne {r4, r5, r6, pc} |
0x0001e680 ldr r3, [pc, 0x24] | r3 = *(0x1e6a8);
0x0001e684 mov r2, r5 | r2 = r5;
0x0001e688 ldr r1, [r4, r3] |
0x0001e68c ldr r3, [pc, 0x1c] | r3 = *(0x1e6ac);
0x0001e690 ldr r1, [r1, 0x14] | r1 = *(0x1e6b8);
0x0001e694 ldr r3, [r4, r3] | r3 = *(0x1e6a4);
0x0001e698 ldr r0, [r3] | r0 = *(0x1e6a4);
0x0001e69c bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x0001e6a0 mov r0, 1 | r0 = 1;
0x0001e6a4 bl 0x1d9f8 | fcn_0001d9f8 (r0);
| if (r0 != 0) {
0x0001e6a8 andeq r4, r3, r4, lsl 19 | r4 = r3 & (r4 << 19);
| }
| if (r0 != 0) {
0x0001e6ac andeq r0, r0, ip, asr 5 | r0 &= (ip >> 5);
| }
| /* Beware that this jump is a conditional jump.
| * r2dec transformed it as a return, due being the
| * last instruction. Please, check 'pdda' output
| * for more hints. */
0x0001e6b0 andeq r0, r0, r4, lsr 5 | return r0 &= (r4 >> 5);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1e6b4 */
| #include <stdint.h>
|
; (fcn) fcn.0001e6b4 () | void fcn_0001e6b4 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0001e6b4 push {r4, r5, r6, r7, r8, lr} |
0x0001e6b8 ldr r4, [r0] | r4 = *(r0);
0x0001e6bc ldr r8, [pc, 0xb4] | r8 = *(0x1e774);
0x0001e6c0 cmp r4, 0 |
0x0001e6c4 add r8, pc, r8 | r8 = pc + r8;
0x0001e6c8 mov r6, r0 | r6 = r0;
0x0001e6cc mov r7, r1 | r7 = r1;
| if (r4 != 0) {
0x0001e6d0 bne 0x1e710 | goto label_1;
| }
0x0001e6d4 mov r0, 0x20 | r0 = 0x20;
0x0001e6d8 bl 0x1e664 | r0 = fcn_0001e664 (r0);
0x0001e6dc subs r4, r0, 0 | r4 = r0 - 0;
0x0001e6e0 popeq {r4, r5, r6, r7, r8, pc} |
0x0001e6e4 mov r3, 0 | r3 = 0;
0x0001e6e8 str r3, [r4] | *(r4) = r3;
0x0001e6ec mov r3, 6 | r3 = 6;
0x0001e6f0 str r3, [r4, 4] | *((r4 + 4)) = r3;
0x0001e6f4 str r4, [r6] | *(r6) = r4;
| do {
| label_0:
0x0001e6f8 ldr r3, [r4] | r3 = *(r4);
0x0001e6fc add r2, r3, 1 | r2 = r3 + 1;
0x0001e700 add r3, r3, 2 | r3 += 2;
0x0001e704 str r2, [r4] | *(r4) = r2;
0x0001e708 str r7, [r4, r3, lsl 2] | offset_0 = r3 << 2;
| *((r4 + offset_0)) = r7;
0x0001e70c pop {r4, r5, r6, r7, r8, pc} |
| label_1:
0x0001e710 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0001e714 ldr r3, [r4] | r3 = *(r4);
0x0001e718 cmp r3, r2 |
0x0001e71c blt 0x1e6f8 |
| } while (r3 < r2);
0x0001e720 add r3, r2, 8 | r3 = r2 + 8;
0x0001e724 lsl r2, r2, 2 | r2 <<= 2;
0x0001e728 add r5, r2, 0x28 | r5 = r2 + 0x28;
0x0001e72c str r3, [r4, 4] | *((r4 + 4)) = r3;
0x0001e730 mov r0, r4 | r0 = r4;
0x0001e734 mov r1, r5 | r1 = r5;
0x0001e738 bl 0x124c0 | r0 = realloc (r0, r1);
0x0001e73c cmp r0, 0 |
| if (r0 == 0) {
0x0001e740 strne r0, [r6] | *(r6) = r0;
| }
| if (r0 != 0) {
0x0001e744 movne r4, r0 | r4 = r0;
| goto label_2;
| }
| if (r0 != 0) {
| label_2:
0x0001e748 bne 0x1e6f8 | goto label_0;
| }
0x0001e74c ldr r3, [pc, 0x28] | r3 = "__.._lib_isc_unix_stdio.c";
0x0001e750 mov r2, r5 | r2 = r5;
0x0001e754 ldr r1, [r8, r3] | r1 = *((r8 + r3));
0x0001e758 ldr r3, [pc, 0x20] | r3 = *(0x1e77c);
0x0001e75c ldr r1, [r1, 0x24] | r1 = *((r1 + 0x24));
0x0001e760 ldr r0, [r8, r3] | r0 = *((r8 + r3));
0x0001e764 mov r3, r4 | r3 = r4;
0x0001e768 ldr r0, [r0] | r0 = *(r0);
0x0001e76c bl 0x12910 | fprintf (r0, r1, r2, "__.._lib_isc_unix_stdio.c")
0x0001e770 mov r0, 1 | r0 = 1;
0x0001e774 bl 0x1d9f8 | fcn_0001d9f8 (r0);
| if (r0 != 0) {
0x0001e778 andeq r4, r3, r4, lsr sb | r4 = r3 & (r4 >> sb);
| }
| if (r0 != 0) {
0x0001e77c andeq r0, r0, ip, asr 5 | r0 &= (ip >> 5);
| }
| /* Beware that this jump is a conditional jump.
| * r2dec transformed it as a return, due being the
| * last instruction. Please, check 'pdda' output
| * for more hints. */
0x0001e780 andeq r0, r0, r4, lsr 5 | return r0 &= (r4 >> 5);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1ecfc */
| #include <stdint.h>
|
; (fcn) fcn.0001ecfc () | void fcn_0001ecfc (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0001ecfc ldr r2, [r1, 8] | r2 = *((r1 + 8));
0x0001ed00 ldr r3, [pc, 0x48] | r3 = *(0x1ed4c);
0x0001ed04 tst r2, 4 |
0x0001ed08 add r3, pc, r3 | r3 = pc + r3;
| if ((r2 & 4) != 0) {
0x0001ed0c beq 0x1ed20 |
0x0001ed10 ldr r2, [r1] | r2 = *(r1);
0x0001ed14 ldr ip, [r2, 0x10] | ip = *((r2 + 0x10));
0x0001ed18 tst ip, 0x2000000 |
| if ((ip & 0x2000000) != 0) {
0x0001ed1c bne 0x1ed24 | goto label_0;
| }
| }
0x0001ed20 b 0x1da74 | void (*0x1da74)() ();
| label_0:
0x0001ed24 ldr r0, [pc, 0x28] | r0 = "lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t";
0x0001ed28 ldr r1, [pc, 0x28] |
0x0001ed2c push {r4, lr} |
0x0001ed30 ldr r1, [r3, r1] | r1 = *((r3 + r1));
0x0001ed34 ldr r3, [r3, r0] | r3 = *((r3 + r0));
0x0001ed38 ldr r2, [r2, 0x34] | r2 = *((r2 + 0x34));
0x0001ed3c ldr r1, [r1, 0xb8] | r1 = *(0x1ee0c);
0x0001ed40 ldr r0, [r3] | r0 = *(r3);
0x0001ed44 bl 0x12910 | fprintf ("lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t", r1, r2, r3, r4)
0x0001ed48 mvn r0, 0 | r0 = ~0;
0x0001ed4c pop {r4, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1efe0 */
| #include <stdint.h>
|
; (fcn) fcn.0001efe0 () | void fcn_0001efe0 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0001efe0 ldr r3, [pc, 0xe8] | r3 = *(0x1f0cc);
0x0001efe4 ldr r2, [pc, 0xe8] | r2 = *(0x1f0d0);
0x0001efe8 push {r4, r5, r6, r7, r8, lr} |
0x0001efec ldr r8, [r0] | r8 = *(r0);
0x0001eff0 add r3, pc, r3 | r3 = pc + r3;
0x0001eff4 ldr r6, [r3, r2] | r6 = *(0x1f0cc);
0x0001eff8 tst r8, 2 |
0x0001effc ldr r4, [r6] | r4 = *(0x1f0cc);
| if ((r8 & 2) != 0) {
0x0001f000 bne 0x1f01c | goto label_2;
| }
0x0001f004 ldr r3, [pc, 0xcc] | r3 = *(0x1f0d4);
0x0001f008 mov r1, r4 | r1 = r4;
0x0001f00c add r3, pc, r3 | r3 = pc + r3;
0x0001f010 ldr r0, [r3, 0x38] | r0 = *(0x1f10c);
| do {
| label_1:
0x0001f014 pop {r4, r5, r6, r7, r8, lr} |
0x0001f018 b 0x12874 | void (*0x12874)() ();
| label_2:
0x0001f01c ldrh r2, [r1] | r2 = *(r1);
0x0001f020 mov r5, r0 | r5 = r0;
0x0001f024 mov r1, 0x4000 | r1 = 0x4000;
0x0001f028 and r0, r2, 0xff | r0 = r2 & 0xff;
0x0001f02c bl 0x1c9b0 | fcn_0001c9b0 (r0, r1);
0x0001f030 ldr r7, [pc, 0xa4] | r7 = "t_to__s";
0x0001f034 cmp r0, 0 |
| if (r0 != 0) {
0x0001f038 bne 0x1f0a4 | goto label_3;
| }
0x0001f03c bics r3, r7, r8 | __asm ("bics r3, r7, r8");
| if (r0 == 0) {
0x0001f040 bne 0x1f070 |
0x0001f044 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001f048 cmp r3, 0 |
| if (r3 == 0) {
0x0001f04c beq 0x1f094 | goto label_4;
| }
0x0001f050 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001f054 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0001f058 cmp r3, r2 |
| if (r3 >= r2) {
0x0001f05c bhs 0x1f084 | goto label_5;
| }
0x0001f060 add r2, r3, 1 | r2 = r3 + 1;
0x0001f064 str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x0001f068 mov r2, 0x20 | r2 = 0x20;
0x0001f06c strb r2, [r3] | *(r3) = r2;
| }
| label_0:
0x0001f070 ldr r3, [pc, 0x68] | r3 = *(0x1f0dc);
0x0001f074 ldr r1, [r6] | r1 = *(r6);
0x0001f078 add r3, pc, r3 | r3 = pc + r3;
0x0001f07c ldr r0, [r3, 0x34] | r0 = *(0x1f110);
0x0001f080 b 0x1f014 |
| } while (1);
| label_5:
0x0001f084 mov r1, r4 | r1 = r4;
0x0001f088 mov r0, 0x20 | r0 = 0x20;
0x0001f08c bl 0x126d0 | fputc_unlocked ();
0x0001f090 b 0x1f070 | goto label_0;
| label_4:
0x0001f094 mov r1, r4 | r1 = r4;
0x0001f098 mov r0, 0x20 | r0 = 0x20;
0x0001f09c bl 0x127fc | fputc (r0, r1);
0x0001f0a0 b 0x1f070 | goto label_0;
| label_3:
0x0001f0a4 ldr r1, [pc, 0x38] | r1 = "__0_";
0x0001f0a8 mov r0, r4 | r0 = r4;
0x0001f0ac add r1, pc, r1 | r1 = pc + r1;
0x0001f0b0 bl 0x12910 | fprintf (r0, "__0_")
0x0001f0b4 ldr r3, [r5] | r3 = *(r5);
0x0001f0b8 bics r3, r7, r3 | __asm ("bics r3, r7, r3");
0x0001f0bc popne {r4, r5, r6, r7, r8, pc} |
0x0001f0c0 ldr r0, [pc, 0x20] | r0 = *(0x1f0e4);
0x0001f0c4 ldr r1, [r6] | r1 = *(r6);
0x0001f0c8 add r0, pc, r0 | r0 = pc + r0;
0x0001f0cc b 0x1f014 | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1f0ec */
| #include <stdint.h>
|
; (fcn) fcn.0001f0ec () | void fcn_0001f0ec (int32_t arg_4h, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| char * var_8h;
| FILE * stream;
| int32_t var_10h;
| int32_t var_14h;
| char * format;
| int32_t var_28h;
| int32_t var_7ch;
| r0 = arg1;
| r1 = arg2;
0x0001f0ec ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x0001f0f0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001f0f4 ldr r4, [pc, 0x738] | r4 = *(0x1f830);
0x0001f0f8 tst r3, 0x40000 |
0x0001f0fc add r4, pc, r4 | r4 = pc + r4;
0x0001f100 sub sp, sp, 0x7c |
0x0001f104 mov r5, r0 | r5 = r0;
0x0001f108 mov r6, r1 | r6 = r1;
| if ((r3 & 0x40000) == 0) {
0x0001f10c beq 0x1f418 | goto label_8;
| }
0x0001f110 ldrh r3, [r1, 6] | r3 = *((r1 + 6));
0x0001f114 cmp r3, 0x57 |
| if (r3 != 0x57) {
0x0001f118 bne 0x1f418 | goto label_8;
| }
0x0001f11c ldr r3, [pc, 0x714] | r3 = *(0x1f834);
0x0001f120 mov sl, r2 | sl = r2;
0x0001f124 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001f128 ldr r2, [pc, 0x70c] | r2 = *(0x1f838);
0x0001f12c str r3, [sp, 8] | var_8h = r3;
0x0001f130 ldr r3, [pc, 0x708] |
0x0001f134 ldr r1, [r4, r2] | r1 = *((r4 + r2));
0x0001f138 ldr r2, [pc, 0x704] |
0x0001f13c add r3, pc, r3 | r3 = pc + r3;
0x0001f140 ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x0001f144 ldr r3, [r3, 0x108] |
0x0001f148 str r2, [sp, 0xc] | stream = r2;
0x0001f14c add r3, r3, 0xe5 | r3 = 0x1fa29;
0x0001f150 ldr r2, [sp, 8] | r2 = var_8h;
0x0001f154 add r1, r1, r3 | r1 += r3;
0x0001f158 ldr r3, [sp, 0xc] | r3 = stream;
0x0001f15c ldr r6, [r0, 0x68] | r6 = *((r0 + 0x68));
0x0001f160 ldr r8, [r0, 0x44] | r8 = *((r0 + 0x44));
0x0001f164 ldr r2, [r2, 0x1b0] | r2 = *(0x1f9f0);
0x0001f168 ldr r0, [r3] | r0 = *(0x1fa29);
0x0001f16c bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5, r6)
0x0001f170 ldr r7, [pc, 0x6d0] | r7 = *(0x1f844);
0x0001f174 mov fp, 0 |
| do {
0x0001f178 ldr r3, [r8, 0x10] | r3 = *((r8 + 0x10));
0x0001f17c tst r7, r3 |
| if ((r7 & r3) == 0) {
0x0001f180 bne 0x1f1a8 |
0x0001f184 mov r1, 0x4000 | r1 = 0x4000;
0x0001f188 ldrb r0, [r8, 2] | r0 = *((r8 + 2));
0x0001f18c bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x0001f190 cmp r0, 0 |
| if (r0 != 0) {
0x0001f194 bne 0x1f1a8 | goto label_9;
| }
0x0001f198 ldr r0, [r8, 0x34] | r0 = *((r8 + 0x34));
0x0001f19c bl 0x1261c | r0 = strlen (r0);
0x0001f1a0 cmp fp, r0 |
| if (fp < r0) {
0x0001f1a4 movlo fp, r0 | goto label_9;
| }
| }
| label_9:
0x0001f1a8 sub r6, r6, 1 | r6--;
0x0001f1ac cmp r6, 0 |
0x0001f1b0 add r8, r8, 0x40 | r8 += 0x40;
0x0001f1b4 bgt 0x1f178 |
| } while (r6 > 0);
0x0001f1b8 ldr r2, [pc, 0x68c] |
0x0001f1bc add sb, sp, 0x1c | sb += format;
0x0001f1c0 add r2, pc, r2 | r2 = pc + r2;
0x0001f1c4 add r3, fp, 4 | r3 += arg_4h;
0x0001f1c8 add r2, r2, 0x30c | r2 = 0x1fb54;
0x0001f1cc mov r1, 0xc | r1 = 0xc;
0x0001f1d0 mov r0, sb | r0 = sb;
0x0001f1d4 bl 0x2e74c | fcn_0002e74c ();
0x0001f1d8 ldr r2, [pc, 0x670] | r2 = *(0x1f84c);
0x0001f1dc ldr fp, [pc, 0x670] | fp = "pkt_dup";
0x0001f1e0 add r2, pc, r2 | r2 = pc + r2;
0x0001f1e4 ldr r3, [r2, 0x108] | r3 = *(0x1f954);
0x0001f1e8 ldr r7, [r5, 0x68] | r7 = *((r5 + 0x68));
0x0001f1ec cmp r3, 0 |
| if (r3 == 0) {
0x0001f1f0 subne r3, r3, 1 | r3--;
| }
| if (r3 == 0) {
0x0001f1f4 strne r3, [r2, 0x108] | *((r2 + 0x108)) = r3;
| }
0x0001f1f8 ldr r3, [pc, 0x658] | r3 = *(0x1f854);
0x0001f1fc ldr r6, [r5, 0x44] | r6 = *((r5 + 0x44));
0x0001f200 add r3, pc, r3 | r3 = pc + r3;
0x0001f204 str r3, [sp, 0x10] | var_10h = r3;
0x0001f208 ldr r3, [pc, 0x64c] | r3 = "filtdelay";
0x0001f20c add fp, pc, fp |
0x0001f210 add r3, pc, r3 | r3 = pc + r3;
0x0001f214 str r3, [sp, 0x14] | var_14h = r3;
| do {
0x0001f218 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001f21c ldr r2, [pc, 0x624] | r2 = *(0x1f844);
0x0001f220 tst r2, r3 |
| if ((r2 & r3) == 0) {
0x0001f224 bne 0x1f2f0 |
0x0001f228 mov r1, 0x4000 | r1 = 0x4000;
0x0001f22c ldrb r0, [r6, 2] | r0 = *((r6 + 2));
0x0001f230 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x0001f234 cmp r0, 0 |
| if (r0 != 0) {
0x0001f238 bne 0x1f2f0 | goto label_10;
| }
0x0001f23c add r1, r6, 2 | r1 = r6 + 2;
0x0001f240 add r0, r5, 0xc | r0 = r5 + 0xc;
0x0001f244 bl 0x1efe0 | fcn_0001efe0 (r0, r1);
0x0001f248 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001f24c tst r3, 0x10000 |
| if ((r3 & 0x10000) == 0) {
0x0001f250 beq 0x1f308 | goto label_11;
| }
0x0001f254 ldr r3, [pc, 0x604] | r3 = "peeradr";
0x0001f258 add r3, pc, r3 | r3 = pc + r3;
0x0001f25c ldr r0, [r3, 0x28] | r0 = *(0x1f884);
| label_0:
0x0001f260 mov r1, 0xc | r1 = 0xc;
0x0001f264 bl 0x1e4ac | fcn_0001e4ac (r0, r1);
0x0001f268 add r8, sp, 0x28 | r8 += var_28h;
0x0001f26c ldrb r3, [r0] | r3 = *(r0);
0x0001f270 cmp r3, 0 |
| if (r3 != 0) {
0x0001f274 bne 0x1f3d0 | goto label_12;
| }
0x0001f278 ldr r2, [pc, 0x5e4] | r2 = "reach";
0x0001f27c ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x0001f280 add r2, pc, r2 | r2 = pc + r2;
0x0001f284 mov r1, 0x50 | r1 = 0x50;
0x0001f288 mov r0, r8 | r0 = r8;
0x0001f28c bl 0x2e74c | fcn_0002e74c ();
| label_1:
0x0001f290 ldr r0, [sp, 0xc] | r0 = stream;
0x0001f294 ldr r3, [r6, 0x2c] | r3 = *((r6 + 0x2c));
0x0001f298 mov r2, r8 | r2 = r8;
0x0001f29c mov r1, sb | r1 = sb;
0x0001f2a0 ldr r0, [r0] | r0 = *(r0);
0x0001f2a4 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001f2a8 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001f2ac lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001f2b0 and r3, r3, 0xf | r3 &= 0xf;
0x0001f2b4 cmp r3, 2 |
| if (r3 != 2) {
0x0001f2b8 beq 0x1f2c4 |
0x0001f2bc cmp r3, 4 |
| if (r3 != 4) {
0x0001f2c0 bne 0x1f2e0 | goto label_13;
| }
| }
0x0001f2c4 ldr r3, [r6, 0x28] | r3 = *((r6 + 0x28));
0x0001f2c8 ldr r2, [sp, 0x10] | r2 = var_10h;
0x0001f2cc cmp r3, 0 |
| if (r3 != 0) {
0x0001f2d0 ldreq r3, [sp, 0x14] | r3 = var_14h;
| }
| if (r3 == 0) {
0x0001f2d4 movne r3, 1 | r3 = 1;
| }
| if (r3 != 0) {
0x0001f2d8 ldrbeq r3, [r3, 0x10c] | r3 = *((r3 + 0x10c));
| }
0x0001f2dc strb r3, [r2, 0x10c] | *((r2 + 0x10c)) = r3;
| label_13:
0x0001f2e0 mov r2, sl | r2 = sl;
0x0001f2e4 mov r1, r6 | r1 = r6;
0x0001f2e8 mov r0, r5 | r0 = r5;
0x0001f2ec bl 0x1f0ec | fcn_0001f0ec (r0, r1, r2);
| }
| label_10:
0x0001f2f0 sub r7, r7, 1 | r7--;
0x0001f2f4 cmp r7, 0 |
0x0001f2f8 add r6, r6, 0x40 | r6 += 0x40;
0x0001f2fc bgt 0x1f218 |
| } while (r7 > 0);
| do {
| label_5:
0x0001f300 add sp, sp, 0x7c |
0x0001f304 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_11:
0x0001f308 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001f30c and r3, r3, 0xf | r3 &= 0xf;
0x0001f310 cmp r3, 8 |
| if (r3 > 8) {
| /* switch table (9 cases) at 0x1f31c */
0x0001f314 addls pc, pc, r3, lsl 2 | pc += (r3 << 2);
| }
0x0001f318 b 0x1f3ec | goto label_14;
0x0001f31c b 0x1f340 | goto label_15;
0x0001f320 b 0x1f3b0 | goto label_16;
0x0001f324 b 0x1f350 | goto label_17;
0x0001f328 b 0x1f380 | goto label_18;
0x0001f32c b 0x1f370 | goto label_19;
0x0001f330 b 0x1f390 | goto label_20;
0x0001f334 b 0x1f3a0 | goto label_21;
0x0001f338 b 0x1f360 | goto label_22;
0x0001f33c b 0x1f3c0 | goto label_23;
| label_15:
0x0001f340 ldr r3, [pc, 0x520] | r3 = *(0x1f864);
0x0001f344 add r3, pc, r3 | r3 = pc + r3;
0x0001f348 ldr r0, [r3, 0x2c] | r0 = *(0x1f890);
0x0001f34c b 0x1f260 | goto label_0;
| label_17:
0x0001f350 ldr r3, [pc, 0x514] | r3 = *(0x1f868);
0x0001f354 add r3, pc, r3 | r3 = pc + r3;
0x0001f358 ldr r0, [r3, 0x18] | r0 = *(0x1f880);
0x0001f35c b 0x1f260 | goto label_0;
| label_22:
0x0001f360 ldr r3, [pc, 0x508] | r3 = *(0x1f86c);
0x0001f364 add r3, pc, r3 | r3 = pc + r3;
0x0001f368 ldr r0, [r3, 0x14] | r0 = *(0x1f880);
0x0001f36c b 0x1f260 | goto label_0;
| label_19:
0x0001f370 ldr r3, [pc, 0x4fc] | r3 = *(0x1f870);
0x0001f374 add r3, pc, r3 | r3 = pc + r3;
0x0001f378 ldr r0, [r3, 0x1c] | r0 = *(0x1f88c);
0x0001f37c b 0x1f260 | goto label_0;
| label_18:
0x0001f380 ldr r3, [pc, 0x4f0] | r3 = *(0x1f874);
0x0001f384 add r3, pc, r3 | r3 = pc + r3;
0x0001f388 ldr r0, [r3, 0x20] | r0 = *(0x1f894);
0x0001f38c b 0x1f260 | goto label_0;
| label_20:
0x0001f390 ldr r3, [pc, 0x4e4] | r3 = *(0x1f878);
0x0001f394 add r3, pc, r3 | r3 = pc + r3;
0x0001f398 ldr r0, [r3, 0x10] | r0 = *(0x1f888);
0x0001f39c b 0x1f260 | goto label_0;
| label_21:
0x0001f3a0 ldr r3, [pc, 0x4d8] | r3 = *(0x1f87c);
0x0001f3a4 add r3, pc, r3 | r3 = pc + r3;
0x0001f3a8 ldr r0, [r3, 0x24] | r0 = *(0x1f8a0);
0x0001f3ac b 0x1f260 | goto label_0;
| label_16:
0x0001f3b0 ldr r3, [pc, 0x4cc] | r3 = *(0x1f880);
0x0001f3b4 add r3, pc, r3 | r3 = pc + r3;
0x0001f3b8 ldr r0, [r3, 8] | r0 = *(0x1f888);
0x0001f3bc b 0x1f260 | goto label_0;
| label_23:
0x0001f3c0 ldr r3, [pc, 0x4c0] | r3 = *(0x1f884);
0x0001f3c4 add r3, pc, r3 | r3 = pc + r3;
0x0001f3c8 ldr r0, [r3, 0x40] | r0 = *(0x1f8c4);
0x0001f3cc b 0x1f260 | goto label_0;
| label_12:
0x0001f3d0 str r0, [sp] | *(sp) = r0;
0x0001f3d4 mov r2, fp | r2 = fp;
0x0001f3d8 ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x0001f3dc mov r1, 0x50 | r1 = 0x50;
0x0001f3e0 mov r0, r8 | r0 = r8;
0x0001f3e4 bl 0x2e74c | fcn_0002e74c ();
0x0001f3e8 b 0x1f290 | goto label_1;
| label_14:
0x0001f3ec ldr r3, [pc, 0x498] | r3 = *(0x1f888);
0x0001f3f0 ldr r1, [sp, 8] | r1 = var_8h;
0x0001f3f4 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x0001f3f8 ldr r2, [r5, 0x1c] | r2 = *((r5 + 0x1c));
0x0001f3fc ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x0001f400 ldr r1, [r1, 0x88] | r1 = *((r1 + 0x88));
0x0001f404 ldr r0, [r0] | r0 = *(r0);
0x0001f408 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001f40c ldr r3, [sp, 8] | r3 = var_8h;
0x0001f410 ldr r0, [r3, 0x40] | r0 = *(0x1f8c8);
0x0001f414 bl 0x1da34 | fcn_0001da34 (r0);
| label_8:
0x0001f418 ldr r3, [r6, 0x20] | r3 = *((r6 + 0x20));
0x0001f41c cmp r3, 0 |
| if (r3 == 0) {
0x0001f420 bne 0x1f430 |
0x0001f424 ldr r3, [r6, 0x24] | r3 = *((r6 + 0x24));
0x0001f428 cmp r3, 0 |
| if (r3 == 0) {
0x0001f42c beq 0x1f4fc | goto label_3;
| }
| }
0x0001f430 ldr r3, [pc, 0x40c] | r3 = "ilable_digest_types.";
0x0001f434 ldr sl, [pc, 0x454] | sl = *(0x1f88c);
0x0001f438 ldr r8, [r4, r3] | r8 = *((r4 + r3));
0x0001f43c ldr r3, [pc, 0x3f8] | r3 = *(0x1f838);
0x0001f440 add sl, pc, sl | sl = pc + sl;
0x0001f444 ldr r0, [sl, 0x108] |
0x0001f448 ldr sb, [r4, r3] | sb = *((r4 + r3));
0x0001f44c add r0, r0, 0xcb | r0 = 0x1fa5f;
0x0001f450 ldr r1, [r8] | r1 = *(r8);
0x0001f454 add r0, sb, r0 | r0 = sb + r0;
0x0001f458 bl 0x12874 | fputs (r0, r1);
0x0001f45c ldr r7, [r6, 0x20] | r7 = *((r6 + 0x20));
0x0001f460 cmp r7, 0 |
| if (r7 != 0) {
0x0001f464 beq 0x1f4c0 |
0x0001f468 ldr r3, [r7, 4] | r3 = *((r7 + 4));
0x0001f46c ldr r0, [r8] | r0 = *(r8);
0x0001f470 cmp r3, 0x8000 |
0x0001f474 ldr r3, [pc, 0x3bc] | r3 = *(0x1f834);
0x0001f478 ldr ip, [r4, r3] | ip = *((r4 + r3));
| if (r3 != 0x8000) {
0x0001f47c bne 0x1f5dc | goto label_24;
| }
0x0001f480 ldr r2, [r7] | r2 = *(r7);
0x0001f484 ldr r3, [r5, 0x44] | r3 = *((r5 + 0x44));
0x0001f488 ldr r1, [ip, 0x190] | r1 = *((ip + 0x190));
0x0001f48c add r3, r3, r2, lsl 6 | r3 += (r2 << 6);
0x0001f490 ldr r2, [r3, 0x34] | r2 = *((r3 + 0x34));
0x0001f494 bl 0x12910 | fprintf (r0, r1, r2, r3)
| label_2:
0x0001f498 ldr r3, [r6, 0x24] | r3 = *((r6 + 0x24));
0x0001f49c cmp r3, 0 |
| if (r3 == 0) {
0x0001f4a0 beq 0x1f4fc | goto label_3;
| }
0x0001f4a4 ldr r3, [pc, 0x3e8] | r3 = *(0x1f890);
0x0001f4a8 ldr r1, [r8] | r1 = *(r8);
0x0001f4ac add r3, pc, r3 | r3 = pc + r3;
0x0001f4b0 ldr r0, [r3, 0x108] |
0x0001f4b4 add r0, r0, 0xd9 | r0 = 0x1fa71;
0x0001f4b8 add r0, sb, r0 | r0 = sb + r0;
0x0001f4bc bl 0x12874 | fputs (r0, r1);
| }
0x0001f4c0 ldr r7, [r6, 0x24] | r7 = *((r6 + 0x24));
0x0001f4c4 cmp r7, 0 |
| if (r7 != 0) {
0x0001f4c8 beq 0x1f4fc |
0x0001f4cc ldr r3, [r7, 4] | r3 = *((r7 + 4));
0x0001f4d0 ldr r0, [r8] | r0 = *(r8);
0x0001f4d4 cmp r3, 0x8000 |
0x0001f4d8 ldr r3, [pc, 0x358] | r3 = *(0x1f834);
0x0001f4dc ldr ip, [r4, r3] | ip = *((r4 + r3));
| if (r3 != 0x8000) {
0x0001f4e0 bne 0x1f61c | goto label_25;
| }
0x0001f4e4 ldr r2, [r7] | r2 = *(r7);
0x0001f4e8 ldr r3, [r5, 0x44] | r3 = *((r5 + 0x44));
0x0001f4ec ldr r1, [ip, 0x168] | r1 = *((ip + 0x168));
0x0001f4f0 add r3, r3, r2, lsl 6 | r3 += (r2 << 6);
0x0001f4f4 ldr r2, [r3, 0x34] | r2 = *((r3 + 0x34));
0x0001f4f8 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
| label_3:
0x0001f4fc ldr r2, [r6, 0x38] | r2 = *((r6 + 0x38));
0x0001f500 cmp r2, 0 |
| if (r2 != 0) {
0x0001f504 beq 0x1f534 |
0x0001f508 ldr r3, [pc, 0x328] | r3 = *(0x1f834);
0x0001f50c ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001f510 ldr r0, [r3, 0x100] | r0 = *(0x1f934);
0x0001f514 ldr r3, [pc, 0x37c] | r3 = *(0x1f894);
0x0001f518 add r3, pc, r3 | r3 = pc + r3;
0x0001f51c ldr r1, [r3, 0x108] | r1 = *(0x1f99c);
0x0001f520 ldr r3, [pc, 0x31c] | r3 = "ilable_digest_types.";
0x0001f524 add r1, r0, r1 | r1 = r0 + r1;
0x0001f528 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001f52c ldr r0, [r3] | r0 = "ilable_digest_types.";
0x0001f530 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x0001f534 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001f538 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001f53c and r3, r3, 0xf | r3 &= 0xf;
0x0001f540 cmp r3, 5 |
| if (r3 == 5) {
0x0001f544 beq 0x1f664 | goto label_26;
| }
0x0001f548 cmp r3, 7 |
| if (r3 == 7) {
0x0001f54c beq 0x1f68c | goto label_27;
| }
| label_4:
0x0001f550 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001f554 tst r3, 0x800 |
| if ((r3 & 0x800) != 0) {
0x0001f558 beq 0x1f588 |
0x0001f55c ldr r3, [pc, 0x2e0] | r3 = "ilable_digest_types.";
0x0001f560 ldr r2, [r4, r3] | r2 = *((r4 + r3));
0x0001f564 ldr r3, [pc, 0x2cc] | r3 = *(0x1f834);
0x0001f568 ldr r1, [r2] | r1 = *(r2);
0x0001f56c ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001f570 ldr r0, [r3, 0x10c] |
0x0001f574 ldr r3, [pc, 0x320] |
0x0001f578 add r3, pc, r3 | r3 = pc + r3;
0x0001f57c ldr r3, [r3, 0x108] | r3 = *(0x1f9a0);
0x0001f580 add r0, r0, r3 | r0 = 0x1f940;
0x0001f584 bl 0x12874 | fputs (r0, r1);
| }
0x0001f588 ldrh r2, [r6, 8] | r2 = *((r6 + 8));
0x0001f58c cmp r2, 0x8000 |
| if (r2 == 0x8000) {
0x0001f590 beq 0x1f694 | goto label_28;
| }
0x0001f594 ldrh r3, [r6, 4] | r3 = *((r6 + 4));
0x0001f598 cmp r3, r2 |
| if (r3 == r2) {
0x0001f59c beq 0x1f694 | goto label_28;
| }
0x0001f5a0 ldr r3, [r5, 0x44] | r3 = *((r5 + 0x44));
0x0001f5a4 add r3, r3, r2, lsl 6 | r3 += (r2 << 6);
0x0001f5a8 ldr r2, [pc, 0x288] | r2 = *(0x1f834);
0x0001f5ac ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x0001f5b0 ldr ip, [r2, 0xf4] | ip = *(0x1f928);
0x0001f5b4 ldr r2, [pc, 0x2e4] | r2 = *(0x1f89c);
0x0001f5b8 add r2, pc, r2 | r2 = pc + r2;
0x0001f5bc ldr r1, [r2, 0x108] | r1 = *(0x1f9a4);
0x0001f5c0 ldr r2, [pc, 0x27c] | r2 = "ilable_digest_types.";
0x0001f5c4 add r1, ip, r1 | r1 = ip + r1;
0x0001f5c8 ldr r0, [r4, r2] | r0 = *((r4 + r2));
0x0001f5cc ldr r2, [r3, 0x34] | r2 = *((r3 + 0x34));
0x0001f5d0 ldr r0, [r0] | r0 = *(r0);
0x0001f5d4 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001f5d8 b 0x1f300 |
| } while (1);
| label_24:
0x0001f5dc mov r1, r0 | r1 = r0;
0x0001f5e0 ldr r0, [ip, 0x194] | r0 = *((ip + 0x194));
0x0001f5e4 bl 0x12874 | fputs (r0, r1);
| do {
0x0001f5e8 ldr r2, [r7] | r2 = *(r7);
0x0001f5ec ldr r3, [r5, 0x44] | r3 = *((r5 + 0x44));
0x0001f5f0 ldr r1, [sl, 0x108] | r1 = *((sl + 0x108));
0x0001f5f4 add r3, r3, r2, lsl 6 | r3 += (r2 << 6);
0x0001f5f8 add r1, r1, 0xe5 | r1 += 0xe5;
0x0001f5fc ldr r2, [r3, 0x34] | r2 = *((r3 + 0x34));
0x0001f600 add r1, sb, r1 | r1 = sb + r1;
0x0001f604 ldr r0, [r8] | r0 = *(r8);
0x0001f608 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001f60c ldr r3, [r7, 4]! | r3 = *((r7 += 4));
0x0001f610 cmp r3, 0x8000 |
0x0001f614 bne 0x1f5e8 |
| } while (r3 != 0x8000);
0x0001f618 b 0x1f498 | goto label_2;
| label_25:
0x0001f61c mov r1, r0 | r1 = r0;
0x0001f620 ldr r0, [ip, 0x164] | r0 = *((ip + 0x164));
0x0001f624 bl 0x12874 | fputs (r0, r1);
0x0001f628 ldr sl, [pc, 0x274] | sl = *(0x1f8a0);
0x0001f62c add sl, pc, sl | sl = pc + sl;
| do {
0x0001f630 ldr r2, [r7] | r2 = *(r7);
0x0001f634 ldr r3, [r5, 0x44] | r3 = *((r5 + 0x44));
0x0001f638 ldr r1, [sl, 0x108] | r1 = *((sl + 0x108));
0x0001f63c add r3, r3, r2, lsl 6 | r3 += (r2 << 6);
0x0001f640 add r1, r1, 0xe5 | r1 += 0xe5;
0x0001f644 ldr r2, [r3, 0x34] | r2 = *((r3 + 0x34));
0x0001f648 add r1, sb, r1 | r1 = sb + r1;
0x0001f64c ldr r0, [r8] | r0 = *(r8);
0x0001f650 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001f654 ldr r3, [r7, 4]! | r3 = *((r7 += 4));
0x0001f658 cmp r3, 0x8000 |
0x0001f65c bne 0x1f630 |
| } while (r3 != 0x8000);
0x0001f660 b 0x1f4fc | goto label_3;
| label_26:
0x0001f664 ldr r2, [pc, 0x23c] | r2 = *(0x1f8a4);
0x0001f668 ldr r3, [r6, 0x28] | r3 = *((r6 + 0x28));
0x0001f66c ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x0001f670 cmp r3, 0 |
0x0001f674 cmpne r3, r2 | __asm ("cmpne r3, r2");
| if (r3 == 0) {
0x0001f678 beq 0x1f550 | goto label_4;
| }
| do {
0x0001f67c mov r1, r6 | r1 = r6;
0x0001f680 mov r0, 1 | r0 = 1;
0x0001f684 blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r1);
0x0001f688 b 0x1f550 | goto label_4;
| label_27:
0x0001f68c ldr r3, [r6, 0x28] | r3 = *((r6 + 0x28));
0x0001f690 b 0x1f67c |
| } while (1);
| label_28:
0x0001f694 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001f698 tst r3, 0x100 |
| if ((r3 & 0x100) != 0) {
0x0001f69c beq 0x1f6f4 |
0x0001f6a0 ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x0001f6a4 cmp r3, 0 |
| if (r3 == 0) {
0x0001f6a8 bne 0x1f6b8 |
0x0001f6ac ldr r3, [r5, 0x20] | r3 = *((r5 + 0x20));
0x0001f6b0 cmp r3, 0 |
| if (r3 == 0) {
0x0001f6b4 beq 0x1f6f4 | goto label_29;
| }
| }
0x0001f6b8 ldrh r2, [r6] | r2 = *(r6);
0x0001f6bc ldr r3, [r5, 0x68] | r3 = *((r5 + 0x68));
0x0001f6c0 cmp r2, r3 |
| if (r2 >= r3) {
0x0001f6c4 bge 0x1f6f4 | goto label_29;
| }
0x0001f6c8 ldr r3, [pc, 0x174] | r3 = "ilable_digest_types.";
0x0001f6cc ldr r2, [r4, r3] | r2 = *((r4 + r3));
0x0001f6d0 ldr r3, [pc, 0x160] | r3 = *(0x1f834);
0x0001f6d4 ldr r1, [r2] | r1 = *(r2);
0x0001f6d8 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001f6dc ldr r0, [r3, 0x13c] |
0x0001f6e0 ldr r3, [pc, 0x1c4] |
0x0001f6e4 add r3, pc, r3 | r3 = pc + r3;
0x0001f6e8 ldr r3, [r3, 0x108] | r3 = *(0x1f9b0);
0x0001f6ec add r0, r0, r3 | r0 = 0x1f970;
0x0001f6f0 bl 0x12874 | fputs (r0, r1);
| }
| label_29:
0x0001f6f4 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x0001f6f8 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001f6fc and r3, r3, 0xf | r3 &= 0xf;
0x0001f700 cmp r3, 4 |
| if (r3 != 4) {
0x0001f704 bne 0x1f780 | goto label_30;
| }
0x0001f708 ldr r3, [pc, 0x134] | r3 = "ilable_digest_types.";
0x0001f70c ldr r2, [r4, r3] | r2 = *((r4 + r3));
0x0001f710 ldr r3, [pc, 0x120] | r3 = *(0x1f834);
0x0001f714 ldr r1, [r2] | r1 = *(r2);
0x0001f718 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001f71c ldr r0, [r3, 0x12c] | r0 = *(0x1f960);
0x0001f720 ldr r3, [pc, 0x188] |
0x0001f724 add r3, pc, r3 | r3 = pc + r3;
0x0001f728 ldr r3, [r3, 0x108] | r3 = *(0x1f9b4);
| label_7:
0x0001f72c add r0, r0, r3 | r0 += r3;
0x0001f730 bl 0x12874 | fputs (r0, r1);
| label_6:
0x0001f734 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0001f738 tst r3, 3 |
| if ((r3 & 3) != 0) {
0x0001f73c bne 0x1f300 | goto label_5;
| }
0x0001f740 ldrh r2, [r5, 0x62] | r2 = *((r5 + 0x62));
0x0001f744 ldrh r3, [r6] | r3 = *(r6);
0x0001f748 cmp r2, r3 |
| if (r2 != r3) {
0x0001f74c bne 0x1f300 | goto label_5;
| }
0x0001f750 ldr r3, [pc, 0xec] | r3 = "ilable_digest_types.";
0x0001f754 ldr r2, [r4, r3] | r2 = *((r4 + r3));
0x0001f758 ldr r3, [pc, 0xd8] | r3 = *(0x1f834);
0x0001f75c ldr r1, [r2] | r1 = *(r2);
0x0001f760 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001f764 ldr r0, [r3, 0xfc] |
0x0001f768 ldr r3, [pc, 0x144] |
0x0001f76c add r3, pc, r3 | r3 = pc + r3;
0x0001f770 ldr r3, [r3, 0x108] | r3 = *(0x1f9b8);
0x0001f774 add r0, r0, r3 | r0 = 0x1f930;
0x0001f778 bl 0x12874 | fputs (r0, r1);
0x0001f77c b 0x1f300 | goto label_5;
| label_30:
0x0001f780 ldrh r2, [r6, 0xa] | r2 = *((r6 + 0xa));
0x0001f784 ldrh r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x0001f788 cmp r2, 1 |
| if (r2 > 1) {
0x0001f78c bhi 0x1f804 | goto label_31;
| }
0x0001f790 cmp r3, 1 |
| if (r3 == 1) {
0x0001f794 beq 0x1f734 | goto label_6;
| }
0x0001f798 ldr r2, [pc, 0x98] | r2 = *(0x1f834);
0x0001f79c ldr r1, [pc, 0xa0] | r1 = "ilable_digest_types.";
0x0001f7a0 ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x0001f7a4 ldr ip, [r4, r1] | ip = *((r4 + r1));
| if (r3 > 1) {
0x0001f7a8 blo 0x1f7dc |
0x0001f7ac ldr r1, [pc, 0x104] | r1 = *(0x1f8b4);
0x0001f7b0 cmp r3, r1 |
| if (r3 == r1) {
0x0001f7b4 beq 0x1f7f4 | goto label_32;
| }
0x0001f7b8 ldr r0, [r2, 0x1a4] | r0 = *((r2 + 0x1a4));
0x0001f7bc ldr r2, [pc, 0xf8] | r2 = *(0x1f8b8);
0x0001f7c0 add r2, pc, r2 | r2 = pc + r2;
0x0001f7c4 ldr r1, [r2, 0x108] | r1 = *(0x1f9c0);
0x0001f7c8 mov r2, r3 | r2 = r3;
0x0001f7cc add r1, r0, r1 | r1 = r0 + r1;
0x0001f7d0 ldr r0, [ip] | r0 = *(ip);
0x0001f7d4 bl 0x12910 | fprintf (r0, r1, r2)
0x0001f7d8 b 0x1f734 | goto label_6;
| }
0x0001f7dc ldr r3, [pc, 0xdc] | r3 = *(0x1f8bc);
0x0001f7e0 ldr r0, [r2, 0x15c] | r0 = *((r2 + 0x15c));
0x0001f7e4 add r3, pc, r3 | r3 = pc + r3;
| do {
0x0001f7e8 ldr r3, [r3, 0x108] | r3 = *((r3 + 0x108));
0x0001f7ec ldr r1, [ip] | r1 = *(ip);
0x0001f7f0 b 0x1f72c | goto label_7;
| label_32:
0x0001f7f4 ldr r3, [pc, 0xc8] | r3 = *(0x1f8c0);
0x0001f7f8 ldr r0, [r2, 0x138] | r0 = *((r2 + 0x138));
0x0001f7fc add r3, pc, r3 | r3 = pc + r3;
0x0001f800 b 0x1f7e8 |
| } while (1);
| label_31:
0x0001f804 ldr r1, [pc, 0x2c] | r1 = *(0x1f834);
0x0001f808 ldr r0, [pc, 0x34] |
0x0001f80c ldr r1, [r4, r1] | r1 = *((r4 + r1));
0x0001f810 ldr r0, [r4, r0] | r0 = *((r4 + r0));
0x0001f814 ldr ip, [r1, 0x130] | ip = *(0x1f964);
0x0001f818 ldr r1, [pc, 0xa8] |
0x0001f81c ldr r0, [r0] | r0 = "ilable_digest_types.";
0x0001f820 add r1, pc, r1 | r1 = pc + r1;
0x0001f824 ldr r1, [r1, 0x108] | r1 = *(0x1f9cc);
0x0001f828 add r1, ip, r1 | r1 = ip + r1;
0x0001f82c bl 0x12910 | fprintf ("ilable_digest_types.", r1)
0x0001f830 b 0x1f734 | goto label_6;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1f8cc */
| #include <stdint.h>
|
; (fcn) fcn.0001f8cc () | void fcn_0001f8cc (FILE * stream, int32_t arg1, int32_t arg2) {
| int32_t var_ch;
| char * format;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_6ch;
| r0 = arg1;
| r1 = arg2;
0x0001f8cc ldr r3, [r0, 0x64] | r3 = *(streamx64);
0x0001f8d0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001f8d4 ldr r5, [pc, 0x3dc] | r5 = *(0x1fcb4);
0x0001f8d8 sub sp, sp, 0x6c |
0x0001f8dc str r3, [sp, 0x14] | var_14h = r3;
0x0001f8e0 mov r7, r3 | r7 = r3;
0x0001f8e4 mov r3, 0 | r3 = 0;
0x0001f8e8 str r3, [sp, 0xc] | var_ch = r3;
0x0001f8ec ldr r3, [pc, 0x3c8] |
0x0001f8f0 ldr r4, [r0, 0x44] | r4 = *(streamx44);
0x0001f8f4 add r3, pc, r3 | r3 = pc + r3;
0x0001f8f8 add r3, r3, 0x10c | r3 = 0x1fdc4;
0x0001f8fc add r3, r3, 1 | r3++;
0x0001f900 mov r6, r0 | r6 = r0;
0x0001f904 mov r8, r1 | r8 = r1;
0x0001f908 mov sb, r2 | sb = r2;
0x0001f90c add r5, pc, r5 | r5 = pc + r5;
0x0001f910 str r3, [sp, 0x10] | format = r3;
| do {
0x0001f914 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001f918 ldr r2, [pc, 0x3a0] | r2 = *(0x1fcbc);
0x0001f91c sub sl, r3, r7 | sl = r3 - r7;
0x0001f920 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001f924 tst r3, r2 |
| if ((r3 & r2) == 0) {
0x0001f928 beq 0x1f9e0 | goto label_5;
| }
0x0001f92c ldr r2, [pc, 0x390] | r2 = *(0x1fcc0);
0x0001f930 cmp r3, r2 |
| if (r3 == r2) {
0x0001f934 bne 0x1f990 |
0x0001f938 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x0001f93c clz r3, r8 | r3 &= r8;
0x0001f940 lsr r3, r3, 5 | r3 >>= 5;
0x0001f944 cmp r2, 0 |
| if (r2 != 0) {
0x0001f948 moveq r3, 0 | r3 = 0;
| }
0x0001f94c cmp r3, 0 |
| if (r3 == 0) {
0x0001f950 beq 0x1f990 | goto label_0;
| }
0x0001f954 ldr r3, [pc, 0x36c] | r3 = *(0x1fcc4);
0x0001f958 ldr fp, [r4, 0x2c] | fp = *((r4 + 0x2c));
0x0001f95c ldr sl, [r5, r3] | sl = *((r5 + r3));
0x0001f960 cmp fp, 0 |
0x0001f964 add r1, r4, 2 | r1 = r4 + 2;
0x0001f968 add r0, r6, 0xc | r0 = r6 + 0xc;
| if (fp != 0) {
0x0001f96c ldreq fp, [sl, 0x108] | fp = *((sl + 0x108));
| }
0x0001f970 bl 0x1efe0 | fcn_0001efe0 (r0, r1);
0x0001f974 ldr r3, [pc, 0x350] | r3 = *(0x1fcc8);
0x0001f978 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x0001f97c ldr r0, [r5, r3] | r0 = *((r5 + r3));
0x0001f980 ldr r1, [sl, 0x104] | r1 = *((sl + 0x104));
0x0001f984 mov r3, fp | r3 = fp;
0x0001f988 ldr r0, [r0] | r0 = *(r0);
0x0001f98c bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
| label_0:
0x0001f990 sub r7, r7, 1 | r7--;
0x0001f994 cmp r7, 0 |
0x0001f998 add r4, r4, 0x40 | r4 += 0x40;
0x0001f99c bgt 0x1f914 |
| } while (r7 > 0);
0x0001f9a0 ldr r3, [pc, 0x324] | r3 = *(0x1fcc8);
0x0001f9a4 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x0001f9a8 ldr r1, [r3] | r1 = *(0x1fcc8);
0x0001f9ac ldr r3, [r1, 0x34] | r3 = *(0x1fcfc);
0x0001f9b0 cmp r3, 0 |
| if (r3 == 0) {
0x0001f9b4 beq 0x1fcac | goto label_6;
| }
0x0001f9b8 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001f9bc ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001f9c0 cmp r3, r2 |
| if (r3 >= r2) {
0x0001f9c4 bhs 0x1fca0 | goto label_7;
| }
0x0001f9c8 add r2, r3, 1 | r2 = r3 + 1;
0x0001f9cc str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0001f9d0 mov r2, 0xa | r2 = 0xa;
0x0001f9d4 strb r2, [r3] | *(r3) = r2;
| label_4:
0x0001f9d8 add sp, sp, 0x6c |
0x0001f9dc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x0001f9e0 tst r3, 0x200000 |
| if ((r3 & 0x200000) == 0) {
0x0001f9e4 beq 0x1fa24 | goto label_8;
| }
0x0001f9e8 cmp r8, 0 |
| if (r8 != 0) {
0x0001f9ec bne 0x1f990 | goto label_0;
| }
0x0001f9f0 ldr r3, [pc, 0x2d4] | r3 = *(0x1fcc8);
0x0001f9f4 ldr r1, [pc, 0x2d4] |
0x0001f9f8 ldr r0, [r5, r3] | r0 = *((r5 + r3));
0x0001f9fc add r1, pc, r1 | r1 = pc + r1;
0x0001fa00 mov r3, sb | r3 = sb;
0x0001fa04 ldr r2, [r4, 0x2c] | r2 = *((r4 + 0x2c));
0x0001fa08 ldr r1, [r1, 0x30] | r1 = *(0x1fcfc);
0x0001fa0c ldr r0, [r0] | r0 = *(r0);
0x0001fa10 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001fa14 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001fa18 add r3, r3, 1 | r3++;
0x0001fa1c str r3, [sp, 0xc] | var_ch = r3;
0x0001fa20 b 0x1f990 | goto label_0;
| label_8:
0x0001fa24 ldr r2, [r6, 0xc] | r2 = *((r6 + 0xc));
0x0001fa28 ands r2, r2, 0x40000 | r2 &= 0x40000;
| if (r2 == r2) {
0x0001fa2c beq 0x1fa44 | goto label_9;
| }
0x0001fa30 mov r1, 0x4000 | r1 = 0x4000;
0x0001fa34 ldrb r0, [r4, 2] | r0 = *((r4 + 2));
0x0001fa38 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x0001fa3c cmp r0, 0 |
| if (r0 == 0) {
0x0001fa40 beq 0x1f990 | goto label_0;
| }
| label_9:
0x0001fa44 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001fa48 cmp r3, 0 |
| if (r3 > 0) {
0x0001fa4c movle r3, 0 | r3 = 0;
| }
| if (r3 <= 0) {
0x0001fa50 movgt r3, 1 | r3 = 1;
| }
0x0001fa54 cmp r8, 0 |
| if (r8 == 0) {
0x0001fa58 movne r3, 0 | r3 = 0;
| }
0x0001fa5c cmp r3, 0 |
0x0001fa60 ldr r3, [pc, 0x264] | r3 = *(0x1fcc8);
0x0001fa64 ldr fp, [r5, r3] | fp = *((r5 + r3));
| if (r3 != 0) {
0x0001fa68 beq 0x1faa8 |
0x0001fa6c ldr r3, [r6, 0x68] | r3 = *((r6 + 0x68));
0x0001fa70 cmp r3, sl |
| if (r3 != sl) {
0x0001fa74 bne 0x1fb70 | goto label_10;
| }
0x0001fa78 ldr r3, [r4, -0x30] | r3 = *((r4 - 0x30));
0x0001fa7c tst r3, 0x200000 |
| if ((r3 & 0x200000) != 0) {
0x0001fa80 bne 0x1faa8 | goto label_1;
| }
0x0001fa84 ldr r3, [pc, 0x23c] | r3 = *(0x1fcc4);
0x0001fa88 ldr r1, [pc, 0x244] | r1 = *(0x1fcd0);
0x0001fa8c ldr r2, [r5, r3] | r2 = *((r5 + r3));
0x0001fa90 add r1, pc, r1 | r1 = pc + r1;
0x0001fa94 ldr r2, [r2, 0xf8] | r2 = *((r2 + 0xf8));
0x0001fa98 mov r3, sb | r3 = sb;
| label_2:
0x0001fa9c ldr r1, [r1, 0x30] | r1 = *((r1 + 0x30));
0x0001faa0 ldr r0, [fp] | r0 = *(fp);
0x0001faa4 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
| label_1:
0x0001faa8 add r1, r4, 2 | r1 = r4 + 2;
0x0001faac add r0, r6, 0xc | r0 = r6 + 0xc;
0x0001fab0 bl 0x1efe0 | fcn_0001efe0 (r0, r1);
0x0001fab4 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001fab8 tst r3, 0x10000 |
| if ((r3 & 0x10000) == 0) {
0x0001fabc beq 0x1fbac | goto label_11;
| }
0x0001fac0 ldr r3, [pc, 0x210] |
0x0001fac4 add r3, pc, r3 | r3 = pc + r3;
0x0001fac8 ldr r3, [r3, 0x28] | r3 = *(0x1fcfc);
| label_3:
0x0001facc ldrh ip, [r4, 0xa] | ip = *((r4 + 0xa));
0x0001fad0 ldr r1, [pc, 0x204] | r1 = *(0x1fcd8);
0x0001fad4 cmp ip, 0 |
0x0001fad8 add r1, pc, r1 | r1 = pc + r1;
0x0001fadc ldr r2, [r1, 0x3c] | r2 = *(0x1fd14);
0x0001fae0 ldr r0, [r4, 0x34] | r0 = *((r4 + 0x34));
| if (ip == 0) {
0x0001fae4 ldrne r1, [r1, 0xc] | r1 = *((r1 + 0xc));
| }
| if (ip != 0) {
0x0001fae8 ldreq r1, [r1, 0x28] | r1 = *((r1 + 0x28));
| }
0x0001faec add sl, sp, 0x18 | sl += var_18h;
0x0001faf0 stm sp, {r0, r1} | *(sp) = r0;
| *((sp + 4)) = r1;
0x0001faf4 mov r1, 0x50 | r1 = 0x50;
0x0001faf8 mov r0, sl | r0 = sl;
0x0001fafc bl 0x2e74c | fcn_0002e74c ();
0x0001fb00 ldr r3, [r4, 0x2c] | r3 = *((r4 + 0x2c));
0x0001fb04 mov r2, sl | r2 = sl;
0x0001fb08 ldr r1, [sp, 0x10] | r1 = format;
0x0001fb0c ldr r0, [fp] | r0 = *(fp);
0x0001fb10 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001fb14 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0001fb18 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001fb1c and r3, r3, 0xf | r3 &= 0xf;
0x0001fb20 cmp r3, 2 |
| if (r3 != 2) {
0x0001fb24 beq 0x1fb30 |
0x0001fb28 cmp r3, 4 |
| if (r3 != 4) {
0x0001fb2c bne 0x1fb54 | goto label_12;
| }
| }
0x0001fb30 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x0001fb34 cmp r3, 0 |
| if (r3 == 0) {
0x0001fb38 movne r3, 1 | r3 = 1;
| }
| if (r3 != 0) {
0x0001fb3c ldreq r3, [pc, 0x19c] | r3 = *((pc + 0x19c));
| }
| if (r3 != 0) {
0x0001fb40 addeq r3, pc, r3 | r3 = pc + r3;
| }
| if (r3 != 0) {
0x0001fb44 ldrbeq r3, [r3, 0x10c] | r3 = *((r3 + 0x10c));
| }
0x0001fb48 ldr r2, [pc, 0x194] | r2 = *(0x1fce0);
0x0001fb4c add r2, pc, r2 | r2 = pc + r2;
0x0001fb50 strb r3, [r2, 0x10c] | *((r2 + 0x10c)) = r3;
| label_12:
0x0001fb54 cmp r8, 0 |
| if (r8 != 0) {
0x0001fb58 bne 0x1f990 | goto label_0;
| }
0x0001fb5c mov r2, sb | r2 = sb;
0x0001fb60 mov r1, r4 | r1 = r4;
0x0001fb64 mov r0, r6 | r0 = r6;
0x0001fb68 bl 0x1f0ec | fcn_0001f0ec (r0, r1, r2);
0x0001fb6c b 0x1f990 | goto label_0;
| label_10:
0x0001fb70 sub r3, r7, 1 | r3 = r7 - 1;
0x0001fb74 cmp r2, 0 |
0x0001fb78 clz r3, r3 | r3 &= r3;
0x0001fb7c lsr r3, r3, 5 | r3 >>= 5;
| if (r2 == 0) {
0x0001fb80 movne r2, r3 | r2 = r3;
| }
| if (r2 != 0) {
0x0001fb84 moveq r2, 0 | r2 = 0;
| }
0x0001fb88 cmp r2, 0 |
| if (r2 == 0) {
0x0001fb8c beq 0x1faa8 | goto label_1;
| }
0x0001fb90 ldr r3, [pc, 0x130] | r3 = *(0x1fcc4);
0x0001fb94 ldr r1, [pc, 0x14c] | r1 = *(0x1fce4);
0x0001fb98 ldr r2, [r5, r3] | r2 = *((r5 + r3));
0x0001fb9c add r1, pc, r1 | r1 = pc + r1;
0x0001fba0 mov r3, sb | r3 = sb;
0x0001fba4 ldr r2, [r2, 0x1ac] | r2 = *((r2 + 0x1ac));
0x0001fba8 b 0x1fa9c | goto label_2;
| label_11:
0x0001fbac lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001fbb0 and r3, r3, 0xf | r3 &= 0xf;
0x0001fbb4 cmp r3, 8 |
| if (r3 > 8) {
| /* switch table (9 cases) at 0x1fbc0 */
0x0001fbb8 addls pc, pc, r3, lsl 2 | pc += (r3 << 2);
| }
0x0001fbbc b 0x1fc74 | goto label_13;
0x0001fbc0 b 0x1fbe4 | goto label_14;
0x0001fbc4 b 0x1fc54 | goto label_15;
0x0001fbc8 b 0x1fbf4 | goto label_16;
0x0001fbcc b 0x1fc24 | goto label_17;
0x0001fbd0 b 0x1fc14 | goto label_18;
0x0001fbd4 b 0x1fc34 | goto label_19;
0x0001fbd8 b 0x1fc44 | goto label_20;
0x0001fbdc b 0x1fc04 | goto label_21;
0x0001fbe0 b 0x1fc64 | goto label_22;
| label_14:
0x0001fbe4 ldr r3, [pc, 0x100] |
0x0001fbe8 add r3, pc, r3 | r3 = pc + r3;
0x0001fbec ldr r3, [r3, 0x2c] | r3 = *(0x1fd14);
0x0001fbf0 b 0x1facc | goto label_3;
| label_16:
0x0001fbf4 ldr r3, [pc, 0xf4] |
0x0001fbf8 add r3, pc, r3 | r3 = pc + r3;
0x0001fbfc ldr r3, [r3, 0x18] | r3 = *(0x1fd04);
0x0001fc00 b 0x1facc | goto label_3;
| label_21:
0x0001fc04 ldr r3, [pc, 0xe8] |
0x0001fc08 add r3, pc, r3 | r3 = pc + r3;
0x0001fc0c ldr r3, [r3, 0x14] | r3 = *(0x1fd04);
0x0001fc10 b 0x1facc | goto label_3;
| label_18:
0x0001fc14 ldr r3, [pc, 0xdc] |
0x0001fc18 add r3, pc, r3 | r3 = pc + r3;
0x0001fc1c ldr r3, [r3, 0x1c] | r3 = *(0x1fd10);
0x0001fc20 b 0x1facc | goto label_3;
| label_17:
0x0001fc24 ldr r3, [pc, 0xd0] |
0x0001fc28 add r3, pc, r3 | r3 = pc + r3;
0x0001fc2c ldr r3, [r3, 0x20] | r3 = *(0x1fd18);
0x0001fc30 b 0x1facc | goto label_3;
| label_19:
0x0001fc34 ldr r3, [pc, 0xc4] |
0x0001fc38 add r3, pc, r3 | r3 = pc + r3;
0x0001fc3c ldr r3, [r3, 0x10] | r3 = *(0x1fd0c);
0x0001fc40 b 0x1facc | goto label_3;
| label_20:
0x0001fc44 ldr r3, [pc, 0xb8] |
0x0001fc48 add r3, pc, r3 | r3 = pc + r3;
0x0001fc4c ldr r3, [r3, 0x24] | r3 = *(0x1fd24);
0x0001fc50 b 0x1facc | goto label_3;
| label_15:
0x0001fc54 ldr r3, [pc, 0xac] |
0x0001fc58 add r3, pc, r3 | r3 = pc + r3;
0x0001fc5c ldr r3, [r3, 8] | r3 = *(0x1fd0c);
0x0001fc60 b 0x1facc | goto label_3;
| label_22:
0x0001fc64 ldr r3, [pc, 0xa0] |
0x0001fc68 add r3, pc, r3 | r3 = pc + r3;
0x0001fc6c ldr r3, [r3, 0x40] | r3 = *(0x1fd48);
0x0001fc70 b 0x1facc | goto label_3;
| label_13:
0x0001fc74 ldr r3, [pc, 0x4c] | r3 = *(0x1fcc4);
0x0001fc78 ldr r2, [r6, 0x1c] | r2 = *((r6 + 0x1c));
0x0001fc7c ldr r1, [r5, r3] | r1 = *((r5 + r3));
0x0001fc80 ldr r3, [pc, 0x88] | r3 = *(0x1fd0c);
0x0001fc84 ldr r1, [r1, 0x88] | r1 = *((r1 + 0x88));
0x0001fc88 ldr r0, [r5, r3] | r0 = *((r5 + r3));
0x0001fc8c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x0001fc90 ldr r0, [r0] | r0 = *(r0);
0x0001fc94 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001fc98 mov r0, 0x46 | r0 = 0x46;
0x0001fc9c bl 0x1d9f8 | fcn_0001d9f8 (r0);
| label_7:
0x0001fca0 mov r0, 0xa | r0 = 0xa;
0x0001fca4 bl 0x126d0 | fputc_unlocked ();
0x0001fca8 b 0x1f9d8 | goto label_4;
| label_6:
0x0001fcac mov r0, 0xa | r0 = 0xa;
0x0001fcb0 bl 0x127fc | fputc (r0, r1);
0x0001fcb4 b 0x1f9d8 | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1fd14 */
| #include <stdint.h>
|
; (fcn) fcn.0001fd14 () | void fcn_0001fd14 (int32_t arg1, int32_t arg2) {
| void * errnum;
| int32_t var_58h;
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_2h;
| int32_t var_1040h;
| int32_t var_3ch;
| r0 = arg1;
| r1 = arg2;
0x0001fd14 ldrh ip, [r0, 0x5e] | ip = *((r0 + 0x5e));
0x0001fd18 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001fd1c ldr r8, [pc, 0x39c] | r8 = *(0x200bc);
0x0001fd20 lsl r2, ip, 0x11 | r2 = ip << 0x11;
0x0001fd24 lsr r2, r2, 0x11 | r2 >>= 0x11;
0x0001fd28 sub sp, sp, 0x1040 |
0x0001fd2c cmp r2, 0 |
0x0001fd30 add r8, pc, r8 | r8 = pc + r8;
0x0001fd34 sub sp, sp, 0x3c |
0x0001fd38 bne 0x1fd50 |
| while (r3 == 0) {
| label_1:
0x0001fd3c mov r4, 0 | r4 = 0;
| label_0:
0x0001fd40 mov r0, r4 | r0 = r4;
0x0001fd44 add sp, sp, 0x1040 |
0x0001fd48 add sp, sp, 0x3c |
0x0001fd4c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0001fd50 ldr r3, [r0, 0x44] | r3 = *((r0 + 0x44));
0x0001fd54 str r1, [sp, 8] | var_8h = r1;
0x0001fd58 add r3, r3, ip, lsl 6 | r3 += (ip << 6);
0x0001fd5c ldr r5, [r3, 0x18] | r5 = *((r3 + 0x18));
0x0001fd60 mov r7, r0 | r7 = r0;
0x0001fd64 cmp r5, 0 |
| if (r5 != 0) {
0x0001fd68 beq 0x1fd78 |
0x0001fd6c ldrb r3, [r5] | r3 = *(r5);
0x0001fd70 cmp r3, 0 |
| if (r3 != 0) {
0x0001fd74 bne 0x200b8 | goto label_7;
| }
| }
0x0001fd78 ldr r3, [r7, 0x34] | r3 = *((r7 + 0x34));
0x0001fd7c cmp r3, 0 |
0x0001fd80 beq 0x1fd3c |
| }
| do {
0x0001fd84 mov r2, r3 | r2 = r3;
0x0001fd88 ldr r4, [r3, 4]! | r4 = *((r3 += 4));
0x0001fd8c cmp r4, 0 |
0x0001fd90 bne 0x1fd84 |
| } while (r4 != 0);
0x0001fd94 ldr r5, [r2] | r5 = *(r2);
0x0001fd98 ldrb r3, [r5] | r3 = *(r5);
0x0001fd9c cmp r3, 0x24 |
| if (r3 == 0x24) {
0x0001fda0 movne r6, r4 | r6 = r4;
| }
| if (r3 != 0x24) {
0x0001fda4 bne 0x1fe34 | goto label_2;
| }
0x0001fda8 add sb, r5, 1 | sb = r5 + 1;
0x0001fdac mov r1, 0x2f | r1 = 0x2f;
0x0001fdb0 mov r0, sb | r0 = sb;
0x0001fdb4 bl 0x12a78 | r0 = strchr (r0, r1);
0x0001fdb8 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0001fdbc beq 0x1fe24 | goto label_8;
| }
0x0001fdc0 sub r5, r6, sb | r5 = r6 - sb;
0x0001fdc4 cmp r5, 0x7f |
| if (r5 > 0x7f) {
0x0001fdc8 bgt 0x1fd40 | goto label_0;
| }
0x0001fdcc add r3, sp, 0x78 | r3 += errnum;
0x0001fdd0 mov r2, r5 | r2 = r5;
0x0001fdd4 mov r1, sb | r1 = sb;
0x0001fdd8 mov r0, r3 | r0 = r3;
0x0001fddc bl 0x124a8 | memcpy (r0, r1, r2);
0x0001fde0 strb r4, [r0, r5] | *((r0 + r5)) = r4;
0x0001fde4 bl 0x12460 | getenv (r0);
0x0001fde8 subs fp, r0, 0 |
| if (fp != errnum) {
0x0001fdec bne 0x1fec0 | goto label_9;
| }
| do {
0x0001fdf0 ldr r3, [pc, 0x2cc] | r3 = *(0x200c0);
0x0001fdf4 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001fdf8 ldr r5, [r8, r3] | r5 = *((r8 + r3));
0x0001fdfc ldr r3, [pc, 0x2c4] | r3 = *(0x200c4);
0x0001fe00 ldr r1, [r5, 0xf0] | r1 = *((r5 + 0xf0));
0x0001fe04 ldr r4, [r8, r3] | r4 = *((r8 + r3));
0x0001fe08 ldr r0, [r4] | r0 = *(r4);
0x0001fe0c bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5)
0x0001fe10 mov r2, sb | r2 = sb;
0x0001fe14 ldr r1, [r5, 0xc0] | r1 = *((r5 + 0xc0));
0x0001fe18 ldr r0, [r4] | r0 = *(r4);
0x0001fe1c bl 0x12910 | fprintf (r0, r1, r2)
0x0001fe20 b 0x1fd3c | goto label_1;
| label_8:
0x0001fe24 mov r0, sb | r0 = sb;
0x0001fe28 bl 0x12460 | r0 = getenv (r0);
0x0001fe2c subs r5, r0, 0 | r5 = r0 - 0;
0x0001fe30 beq 0x1fdf0 |
| } while (r5 == r0);
| label_2:
0x0001fe34 add sb, sp, 0x10 | sb += var_10h;
0x0001fe38 mov r1, sb | r1 = sb;
0x0001fe3c mov r0, r5 | r0 = r5;
0x0001fe40 bl 0x1270c | r0 = stat64 ();
0x0001fe44 cmp r0, 0 |
| if (r0 == 0) {
0x0001fe48 beq 0x1ff1c | goto label_10;
| }
0x0001fe4c bl 0x12430 | r0 = errno_location ();
0x0001fe50 ldr r3, [r0] | r3 = *(r0);
0x0001fe54 mov fp, r0 |
0x0001fe58 cmp r3, 2 |
| if (r3 == 2) {
0x0001fe5c beq 0x1ff00 | goto label_11;
| }
| label_4:
0x0001fe60 ldr r3, [pc, 0x25c] | r3 = *(0x200c0);
0x0001fe64 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001fe68 ldr r4, [r8, r3] | r4 = *((r8 + r3));
0x0001fe6c ldr r3, [pc, 0x254] | r3 = *(0x200c4);
0x0001fe70 ldr r1, [r4, 0xf0] | r1 = *((r4 + 0xf0));
0x0001fe74 ldr r8, [r8, r3] | r8 = *((r8 + r3));
0x0001fe78 ldr r0, [r8] | r0 = *(r8);
0x0001fe7c bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x0001fe80 ldr r7, [r8] | r7 = *(r8);
0x0001fe84 ldr r8, [r4, 0xb0] | r8 = *((r4 + 0xb0));
0x0001fe88 ldr r4, [fp] | r4 = *(fp);
0x0001fe8c mov r0, r4 | r0 = r4;
0x0001fe90 bl 0x12a9c | strerror (r0);
0x0001fe94 str r5, [sp] | *(sp) = r5;
0x0001fe98 mov r2, r4 | r2 = r4;
0x0001fe9c mov r1, r8 | r1 = r8;
0x0001fea0 mov r3, r0 | r3 = r0;
0x0001fea4 mov r0, r7 | r0 = r7;
0x0001fea8 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5)
0x0001feac cmp r6, 0 |
| if (r6 != 0) {
0x0001feb0 movne r0, r5 | r0 = r5;
| goto label_12;
| }
| if (r6 == 0) {
| label_12:
0x0001feb4 beq 0x1fd3c | goto label_1;
| }
| label_3:
0x0001feb8 bl 0x12a54 | free (r0);
0x0001febc b 0x1fd3c | goto label_1;
| label_9:
0x0001fec0 bl 0x1261c | r0 = strlen (r0);
0x0001fec4 mov r4, r0 | r4 = r0;
0x0001fec8 mov r0, r6 | r0 = r6;
0x0001fecc bl 0x1261c | r0 = strlen (r0);
0x0001fed0 add r0, r4, r0 | r0 = r4 + r0;
0x0001fed4 add r0, r0, 2 | r0 += var_2h;
0x0001fed8 bl 0x1e664 | fcn_0001e664 (r0);
0x0001fedc subs r5, r0, 0 | r5 -= var_2h;
| if (r5 == var_2h) {
0x0001fee0 beq 0x1fd3c | goto label_1;
| }
0x0001fee4 ldr r1, [pc, 0x1e0] | r1 = *(0x200c8);
0x0001fee8 mov r3, r6 | r3 = r6;
0x0001feec mov r2, fp | r2 = fp;
0x0001fef0 add r1, pc, r1 | r1 = pc + r1;
0x0001fef4 bl 0x12970 | sprintf (r0, r1, r2);
0x0001fef8 mov r6, 1 | r6 = 1;
0x0001fefc b 0x1fe34 | goto label_2;
| label_11:
0x0001ff00 mov r1, 0x2f | r1 = 0x2f;
0x0001ff04 mov r0, r5 | r0 = r5;
0x0001ff08 bl 0x125a4 | r0 = strrchr (r0, r1);
0x0001ff0c cmp r0, 0 |
| if (r0 == 0) {
0x0001ff10 bne 0x20010 |
| label_5:
0x0001ff14 mov r2, 0x8000 | r2 = 0x8000;
0x0001ff18 str r2, [sp, 0x20] | var_58h = r2;
| label_10:
0x0001ff1c add fp, sp, 0x78 |
0x0001ff20 ldr r3, [fp, -0x58] | r3 = var_58h;
0x0001ff24 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0001ff28 cmp r3, 0x4000 |
| if (r3 == 0x4000) {
0x0001ff2c movne r4, r5 | r4 = r5;
| }
| if (r3 != 0x4000) {
0x0001ff30 bne 0x20064 | goto label_13;
| }
0x0001ff34 mov r0, r5 | r0 = r5;
0x0001ff38 bl 0x1261c | r0 = strlen (r0);
0x0001ff3c mov r4, r0 | r4 = r0;
0x0001ff40 ldr r0, [r7, 0x24] | r0 = *((r7 + 0x24));
0x0001ff44 bl 0x1261c | r0 = strlen (r0);
0x0001ff48 add r1, r4, r0 | r1 = r4 + r0;
0x0001ff4c add r1, r1, 2 | r1 += 2;
0x0001ff50 mov r0, r1 | r0 = r1;
0x0001ff54 str r1, [sp, 0xc] | var_ch = r1;
0x0001ff58 bl 0x1e664 | fcn_0001e664 (r0);
0x0001ff5c ldr r3, [r7, 0x24] | r3 = *((r7 + 0x24));
0x0001ff60 ldr r2, [pc, 0x168] | r2 = *(0x200cc);
0x0001ff64 str r3, [sp] | *(sp) = r3;
0x0001ff68 add r2, pc, r2 | r2 = pc + r2;
0x0001ff6c mov r3, r5 | r3 = r5;
0x0001ff70 ldr r1, [sp, 0xc] | r1 = var_ch;
0x0001ff74 mov r4, r0 | r4 = r0;
0x0001ff78 bl 0x2e74c | fcn_0002e74c ();
0x0001ff7c cmp r6, 0 |
| if (r6 != 0) {
0x0001ff80 beq 0x1ff8c |
0x0001ff84 mov r0, r5 | r0 = r5;
0x0001ff88 bl 0x12a54 | free (r0);
| }
0x0001ff8c mov r1, sb | r1 = sb;
0x0001ff90 mov r0, r4 | r0 = r4;
0x0001ff94 bl 0x1270c | r0 = stat64 ();
0x0001ff98 cmp r0, 0 |
| if (r0 == 0) {
0x0001ff9c beq 0x20060 | goto label_14;
| }
0x0001ffa0 bl 0x12430 | r0 = errno_location ();
0x0001ffa4 ldr r3, [r0] | r3 = *(r0);
0x0001ffa8 mov r5, r0 | r5 = r0;
0x0001ffac cmp r3, 2 |
| if (r3 != 2) {
0x0001ffb0 moveq r3, 0x8000 | r3 = 0x8000;
| }
| if (r3 != 2) {
0x0001ffb4 streq r3, [fp, -0x58] | var_58h = r3;
| }
| if (r3 == 2) {
0x0001ffb8 beq 0x20060 | goto label_14;
| }
0x0001ffbc ldr r3, [pc, 0x100] | r3 = *(0x200c0);
0x0001ffc0 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001ffc4 ldr r6, [r8, r3] | r6 = *((r8 + r3));
0x0001ffc8 ldr r3, [pc, 0xf8] | r3 = *(0x200c4);
0x0001ffcc ldr r1, [r6, 0xf0] | r1 = *((r6 + 0xf0));
0x0001ffd0 ldr r8, [r8, r3] | r8 = *((r8 + r3));
0x0001ffd4 ldr r0, [r8] | r0 = *(r8);
0x0001ffd8 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5, r6)
0x0001ffdc ldr r5, [r5] | r5 = *(r5);
0x0001ffe0 ldr r7, [r8] | r7 = *(r8);
0x0001ffe4 mov r0, r5 | r0 = r5;
0x0001ffe8 ldr r6, [r6, 0xb0] | r6 = *((r6 + 0xb0));
0x0001ffec bl 0x12a9c | strerror (r0);
0x0001fff0 str r4, [sp] | *(sp) = r4;
0x0001fff4 mov r2, r5 | r2 = r5;
0x0001fff8 mov r1, r6 | r1 = r6;
0x0001fffc mov r3, r0 | r3 = r0;
0x00020000 mov r0, r7 | r0 = r7;
0x00020004 bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
| label_6:
0x00020008 mov r0, r4 | r0 = r4;
0x0002000c b 0x1feb8 | goto label_3;
| }
0x00020010 sub r4, r0, r5 | r4 = r0 - r5;
0x00020014 cmp r4, 0x1000 |
| if (r4 >= 0x1000) {
0x00020018 bhs 0x1fe60 | goto label_4;
| }
0x0002001c add sl, sp, 0x78 | sl += errnum;
0x00020020 mov r2, r4 | r2 = r4;
0x00020024 mov r1, r5 | r1 = r5;
0x00020028 mov r0, sl | r0 = sl;
0x0002002c bl 0x124a8 | memcpy (r0, r1, r2);
0x00020030 mov r2, 0 | r2 = 0;
0x00020034 mov r1, sb | r1 = sb;
0x00020038 mov r0, sl | r0 = sl;
0x0002003c strb r2, [sl, r4] | *((sl + r4)) = r2;
0x00020040 bl 0x1270c | r0 = stat64 ();
0x00020044 cmp r0, 0 |
| if (r0 != 0) {
0x00020048 bne 0x1fe60 | goto label_4;
| }
0x0002004c ldr r3, [sl, -0x58] | r3 = var_58h;
0x00020050 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00020054 cmp r3, 0x4000 |
| if (r3 == 0x4000) {
0x00020058 beq 0x1ff14 | goto label_5;
| }
0x0002005c b 0x1fe60 | goto label_4;
| label_14:
0x00020060 mov r6, 1 | r6 = 1;
| label_13:
0x00020064 ldr r3, [fp, -0x58] | r3 = var_58h;
0x00020068 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0002006c cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x00020070 beq 0x200a4 | goto label_15;
| }
0x00020074 ldr r3, [pc, 0x48] | r3 = *(0x200c0);
0x00020078 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0002007c ldr r1, [r8, r3] | r1 = *((r8 + r3));
0x00020080 ldr r3, [pc, 0x40] | r3 = *(0x200c4);
0x00020084 ldr r1, [r1, 0xf0] | r1 = *((r1 + 0xf0));
0x00020088 ldr r0, [r8, r3] | r0 = *((r8 + r3));
0x0002008c mov r3, r4 | r3 = r4;
0x00020090 ldr r0, [r0] | r0 = *(r0);
0x00020094 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00020098 cmp r6, 0 |
| if (r6 == 0) {
0x0002009c beq 0x1fd3c | goto label_1;
| }
0x000200a0 b 0x20008 | goto label_6;
| label_15:
0x000200a4 mov r0, r4 | r0 = r4;
0x000200a8 bl 0x1288c | unlink (r0);
0x000200ac ldr r3, [sp, 8] | r3 = var_8h;
0x000200b0 str r6, [r3] | *(r3) = r6;
0x000200b4 b 0x1fd40 | goto label_0;
| label_7:
0x000200b8 mov r6, 0 | r6 = 0;
0x000200bc b 0x1fe34 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x22e48 */
| #include <stdint.h>
|
; (fcn) fcn.00022e48 () | void fcn_00022e48 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_60h;
| int32_t var_4h_2;
| int32_t var_78h;
| int32_t var_1040h;
| int32_t var_3ch;
| r0 = arg1;
| r1 = arg2;
0x00022e48 ldr r3, [pc, 0x18c] |
0x00022e4c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00022e50 ldr fp, [pc, 0x188] | fp = *(0x00022fe0);
0x00022e54 mov sl, r2 | sl = r2;
0x00022e58 ldr r2, [pc, 0x184] | r2 = *(0x22fe0);
0x00022e5c add r3, pc, r3 | r3 = pc + r3;
0x00022e60 ldr r5, [r3, r2] | r5 = *(0x22fd8);
0x00022e64 ldr r2, [pc, 0x17c] | r2 = *(0x22fe4);
0x00022e68 sub sp, sp, 0x1040 |
0x00022e6c ldr r3, [r3, r2] | r3 = *(0x22fd8);
0x00022e70 sub sp, sp, 0x3c |
0x00022e74 mov r7, r0 | r7 = r0;
0x00022e78 mov r8, r1 | r8 = r1;
0x00022e7c ldr r0, [r3, 0x160] | r0 = *(0x23138);
0x00022e80 ldr r1, [r5] | r1 = *(0x22fd8);
0x00022e84 str r3, [sp] | *(sp) = r3;
0x00022e88 bl 0x12874 | fputs (r0, r1);
0x00022e8c add sb, sp, 0x78 | sb += var_78h;
0x00022e90 sub r6, sb, 4 | r6 -= var_4h_2;
| do {
| label_1:
0x00022e94 ldr r4, [r7], 4 | r4 = *(r7);
| r7 += 4;
0x00022e98 cmp r4, 0 |
| if (r4 == 0) {
0x00022e9c beq 0x22fd0 | goto label_2;
| }
0x00022ea0 mov r3, sl | r3 = sl;
0x00022ea4 mov r2, r4 | r2 = r4;
0x00022ea8 mov r1, fp | r1 = fp;
0x00022eac mov r0, r6 | r0 = r6;
0x00022eb0 bl 0x22be4 | r0 = fcn_00022be4 (r0, r1);
0x00022eb4 cmp r0, 0 |
| if (r0 != 0) {
0x00022eb8 moveq r3, r4 | r3 = r4;
| }
| if (r0 != 0) {
0x00022ebc beq 0x22ee4 |
0x00022ec0 ldrb r3, [r4] | r3 = *(r4);
0x00022ec4 cmp r3, 0x24 |
| if (r3 == 0x24) {
0x00022ec8 movne r3, r6 | r3 = r6;
| }
| if (r3 != 0x24) {
0x00022ecc bne 0x22ee4 | goto label_3;
| }
0x00022ed0 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x00022ed4 cmp r3, 0x40 |
0x00022ed8 cmpne r3, 0x24 | __asm ("cmpne r3, 0x24");
| if (r3 != 0x40) {
0x00022edc moveq r4, r6 | r4 = r6;
| }
0x00022ee0 mov r3, r6 | r3 = r6;
| }
| label_3:
0x00022ee4 str r3, [sp, 4] | var_4h = r3;
0x00022ee8 ldr r3, [sp] | r3 = *(sp);
0x00022eec mov r2, r4 | r2 = r4;
0x00022ef0 ldr r1, [r3, 0x154] | r1 = *((r3 + 0x154));
0x00022ef4 ldr r0, [r5] | r0 = *(r5);
0x00022ef8 bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x00022efc ldrb r2, [r8] | r2 = *(r8);
0x00022f00 ldr r3, [sp, 4] | r3 = var_4h;
0x00022f04 cmp r2, 0 |
| if (r2 != 0) {
0x00022f08 beq 0x22f6c |
0x00022f0c add r1, sp, 8 | r1 += var_8h;
0x00022f10 mov r0, r3 | r0 = r3;
0x00022f14 bl 0x1270c | r0 = stat64 ();
0x00022f18 cmp r0, 0 |
| if (r0 != 0) {
0x00022f1c bne 0x22f6c | goto label_4;
| }
0x00022f20 ldr r3, [sb, -0x60] | r3 = var_60h;
0x00022f24 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00022f28 cmp r3, 0x4000 |
| if (r3 != 0x4000) {
0x00022f2c bne 0x22f6c | goto label_4;
| }
0x00022f30 ldr r1, [r5] | r1 = *(r5);
0x00022f34 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00022f38 cmp r3, 0 |
| if (r3 == 0) {
0x00022f3c beq 0x22fac | goto label_5;
| }
0x00022f40 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00022f44 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00022f48 cmp r3, r2 |
| if (r3 >= r2) {
0x00022f4c bhs 0x22fa0 | goto label_6;
| }
0x00022f50 add r2, r3, 1 | r2 = r3 + 1;
0x00022f54 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x00022f58 mov r2, 0x2f | r2 = 0x2f;
0x00022f5c strb r2, [r3] | *(r3) = r2;
| label_0:
0x00022f60 ldr r1, [r5] | r1 = *(r5);
0x00022f64 mov r0, r8 | r0 = r8;
0x00022f68 bl 0x12874 | fputs (r0, r1);
| }
| label_4:
0x00022f6c ldr r1, [r5] | r1 = *(r5);
0x00022f70 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00022f74 cmp r3, 0 |
| if (r3 == 0) {
0x00022f78 beq 0x22fc4 | goto label_7;
| }
0x00022f7c ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00022f80 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00022f84 cmp r3, r2 |
| if (r3 >= r2) {
0x00022f88 bhs 0x22fb8 | goto label_8;
| }
0x00022f8c add r2, r3, 1 | r2 = r3 + 1;
0x00022f90 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x00022f94 mov r2, 0xa | r2 = 0xa;
0x00022f98 strb r2, [r3] | *(r3) = r2;
0x00022f9c b 0x22e94 |
| } while (1);
| label_6:
0x00022fa0 mov r0, 0x2f | r0 = 0x2f;
0x00022fa4 bl 0x126d0 | fputc_unlocked ();
0x00022fa8 b 0x22f60 | goto label_0;
| label_5:
0x00022fac mov r0, 0x2f | r0 = 0x2f;
0x00022fb0 bl 0x127fc | fputc (r0, r1);
0x00022fb4 b 0x22f60 | goto label_0;
| label_8:
0x00022fb8 mov r0, 0xa | r0 = 0xa;
0x00022fbc bl 0x126d0 | fputc_unlocked ();
0x00022fc0 b 0x22e94 | goto label_1;
| label_7:
0x00022fc4 mov r0, 0xa | r0 = 0xa;
0x00022fc8 bl 0x127fc | fputc (r0, r1);
0x00022fcc b 0x22e94 | goto label_1;
| label_2:
0x00022fd0 add sp, sp, 0x1040 |
0x00022fd4 add sp, sp, 0x3c |
0x00022fd8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x234b0 */
| #include <stdint.h>
|
; (fcn) fcn.000234b0 () | void fcn_000234b0 (int32_t arg1, uint32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000234b0 ldr r3, [pc, 0x50] | r3 = *(0x23504);
0x000234b4 cmp r1, 0 |
0x000234b8 add r3, pc, r3 | r3 = pc + r3;
| if (r1 != 0) {
0x000234bc beq 0x234c8 |
0x000234c0 mov r1, r2 | r1 = r2;
0x000234c4 b 0x12874 | void (*0x12874)() ();
| }
0x000234c8 push {r4, r5, r6, lr} |
0x000234cc mov r4, r2 | r4 = r2;
0x000234d0 ldr r2, [pc, 0x34] | r2 = *(0x23508);
0x000234d4 ldr r6, [r3, r2] | r6 = *((r3 + r2));
0x000234d8 add r1, r6, 0x178 | r1 = r6 + 0x178;
0x000234dc add r1, r1, 1 | r1++;
0x000234e0 bl 0x23290 | fcn_00023290 (r0, r1);
0x000234e4 add r1, r6, 0x228 | r1 = r6 + 0x228;
0x000234e8 add r1, r1, 2 | r1 += 2;
0x000234ec mov r5, r0 | r5 = r0;
0x000234f0 mov r2, r0 | r2 = r0;
0x000234f4 mov r0, r4 | r0 = r4;
0x000234f8 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5)
0x000234fc mov r0, r5 | r0 = r5;
0x00023500 pop {r4, r5, r6, lr} |
0x00023504 b 0x12a54 | return void (*0x12a54)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x23c10 */
| #include <stdint.h>
|
; (fcn) fcn.00023c10 () | void fcn_00023c10 (int32_t arg1) {
| int32_t var_0h;
| char * format;
| int32_t var_10h;
| char * var_14h;
| time_t * timer;
| int32_t var_20h;
| int32_t var_24h;
| r0 = arg1;
0x00023c10 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00023c14 ldr r4, [pc, 0x3bc] | r4 = *(0x23fd4);
0x00023c18 sub sp, sp, 0x24 |
0x00023c1c add r6, sp, 0x20 | r6 += var_20h;
0x00023c20 mov r3, 0 | r3 = 0;
0x00023c24 str r3, [r6, -4]! | *((r6 -= 4)) = r3;
0x00023c28 mov r1, r6 | r1 = r6;
0x00023c2c mov r7, r0 | r7 = r0;
0x00023c30 bl 0x1fd14 | fcn_0001fd14 (r0, r1);
0x00023c34 add r4, pc, r4 | r4 = pc + r4;
0x00023c38 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00023c3c beq 0x23cb8 |
0x00023c40 ldr r1, [pc, 0x394] | r1 = *(0x23fd8);
0x00023c44 add r1, pc, r1 | r1 = pc + r1;
0x00023c48 bl 0x125c8 | r0 = fopen64 ();
0x00023c4c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00023c50 bne 0x23cc0 | goto label_5;
| }
0x00023c54 ldr r3, [pc, 0x384] | r3 = *(0x23fdc);
0x00023c58 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x00023c5c ldr r5, [r4, r3] | r5 = *((r4 + r3));
0x00023c60 ldr r3, [pc, 0x37c] | r3 = *(0x23fe0);
0x00023c64 ldr r1, [r5, 0xf0] | r1 = *((r5 + 0xf0));
0x00023c68 ldr r4, [r4, r3] | r4 = *((r4 + r3));
0x00023c6c ldr r0, [r4] | r0 = *(r4);
0x00023c70 bl 0x12910 | r0 = fprintf (r0, r1, r2, r3, r4, r5)
0x00023c74 bl 0x12430 | errno_location ();
0x00023c78 ldr r6, [r4] | r6 = *(r4);
0x00023c7c ldr r5, [r5, 0xa4] | r5 = *((r5 + 0xa4));
0x00023c80 ldr r4, [r0] | r4 = *(r0);
0x00023c84 mov r0, r4 | r0 = r4;
0x00023c88 bl 0x12a9c | strerror (r0);
0x00023c8c str r8, [sp] | *(sp) = r8;
0x00023c90 mov r2, r4 | r2 = r4;
0x00023c94 mov r1, r5 | r1 = r5;
0x00023c98 mov r3, r0 | r3 = r0;
0x00023c9c mov r0, r6 | r0 = r6;
0x00023ca0 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00023ca4 ldr r3, [sp, 0x1c] | r3 = timer;
0x00023ca8 cmp r3, 0 |
| if (r3 == 0) {
0x00023cac beq 0x23cb8 | goto label_0;
| }
0x00023cb0 mov r0, r8 | r0 = r8;
0x00023cb4 bl 0x12a54 | free (r0);
| }
| label_0:
0x00023cb8 add sp, sp, 0x24 |
0x00023cbc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00023cc0 ldr r3, [sp, 0x1c] | r3 = timer;
0x00023cc4 cmp r3, 0 |
| if (r3 != 0) {
0x00023cc8 beq 0x23cd4 |
0x00023ccc mov r0, r8 | r0 = r8;
0x00023cd0 bl 0x12a54 | free (r0);
| }
0x00023cd4 ldr r0, [pc, 0x30c] | r0 = *(0x23fe4);
0x00023cd8 mov r1, r5 | r1 = r5;
0x00023cdc add r0, pc, r0 | r0 = pc + r0;
0x00023ce0 bl 0x12874 | fputs (r0, r1);
0x00023ce4 ldr r8, [r7, 0x38] | r8 = *((r7 + 0x38));
0x00023ce8 mov r1, 0xa | r1 = 0xa;
0x00023cec mov r0, r8 | r0 = r8;
0x00023cf0 bl 0x12a78 | r0 = strchr (r0, r1);
0x00023cf4 subs r2, r0, 0 | r2 = r0 - 0;
| if (r2 != r0) {
0x00023cf8 beq 0x23d14 |
0x00023cfc add r2, r2, 1 | r2++;
0x00023d00 mov r3, r5 | r3 = r5;
0x00023d04 sub r2, r2, r8 | r2 -= r8;
0x00023d08 mov r1, 1 | r1 = 1;
0x00023d0c mov r0, r8 | r0 = r8;
0x00023d10 bl 0x12478 | fwrite (r0, r1, r2, r3);
| }
0x00023d14 mov r0, 0 | r0 = 0;
0x00023d18 bl 0x1279c | time (r0);
0x00023d1c str r0, [sp, 0x1c] | timer = r0;
0x00023d20 mov r0, r6 | r0 = r6;
0x00023d24 bl 0x12640 | ctime (r0);
0x00023d28 ldr r3, [pc, 0x2bc] | r3 = *(0x23fe8);
0x00023d2c ldr r4, [r4, r3] | r4 = *((r4 + r3));
0x00023d30 add r1, r4, 0x60 | r1 = r4 + 0x60;
0x00023d34 mov r2, r0 | r2 = r0;
0x00023d38 mov r0, r5 | r0 = r5;
0x00023d3c bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x00023d40 ldr fp, [r7, 0x68] | fp = *((r7 + 0x68));
0x00023d44 ldr r6, [r7, 0x44] | r6 = *((r7 + 0x44));
0x00023d48 add r3, r4, 0x1b0 | r3 = r4 + 0x1b0;
0x00023d4c add r3, r3, 1 | r3++;
0x00023d50 str r3, [sp, 0xc] | format = r3;
| do {
0x00023d54 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x00023d58 tst r3, 0xf |
| if ((r3 & 0xf) != 0) {
0x00023d5c beq 0x23df8 |
0x00023d60 ldr r2, [pc, 0x288] | r2 = *(0x23fec);
0x00023d64 tst r3, r2 |
| if ((r3 & r2) != 0) {
0x00023d68 bne 0x23df8 | goto label_1;
| }
0x00023d6c ldrh r2, [r6, 8] | r2 = *((r6 + 8));
0x00023d70 cmp r2, 0x8000 |
| if (r2 != 0x8000) {
0x00023d74 beq 0x23d84 |
0x00023d78 ldrh r1, [r6] | r1 = *(r6);
0x00023d7c cmp r1, r2 |
| if (r1 != r2) {
0x00023d80 bne 0x23df8 | goto label_1;
| }
| }
0x00023d84 tst r3, 0x10 |
0x00023d88 ldrhne r2, [r6, 4] | __asm ("ldrhne r2, [r6, 4]");
| if ((r3 & 0x10) == 0) {
0x00023d8c ldrne r4, [r7, 0x44] | r4 = *((r7 + 0x44));
| }
0x00023d90 lsr r3, r3, 0xc | r3 >>= 0xc;
0x00023d94 and r3, r3, 0xf | r3 &= 0xf;
| if ((r3 & 0x10) == 0) {
0x00023d98 addne r4, r4, r2, lsl 6 | r4 += (r2 << 6);
| }
| if ((r3 & 0x10) != 0) {
0x00023d9c moveq r4, r6 | r4 = r6;
| }
0x00023da0 cmp r3, 7 |
| if (r3 > 7) {
| /* switch table (8 cases) at 0x23dac */
0x00023da4 addls pc, pc, r3, lsl 2 | pc += (r3 << 2);
| }
0x00023da8 b 0x23df8 | goto label_1;
0x00023dac b 0x23dcc | goto label_6;
0x00023db0 b 0x23e14 | goto label_7;
0x00023db4 b 0x23e68 | goto label_8;
0x00023db8 b 0x23eec | goto label_9;
0x00023dbc b 0x23e94 | goto label_10;
0x00023dc0 b 0x23e54 | goto label_11;
0x00023dc4 b 0x23f0c | goto label_12;
0x00023dc8 b 0x23fa4 | goto label_13;
| label_6:
0x00023dcc ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00023dd0 ldr r3, [r6, 0x34] | r3 = *((r6 + 0x34));
0x00023dd4 ldr r2, [r6, 0x38] | r2 = *((r6 + 0x38));
0x00023dd8 tst r1, 0x20 |
0x00023ddc ldr r1, [pc, 0x210] | r1 = *(0x23ff0);
| if ((r1 & 0x20) != 0) {
0x00023de0 moveq r2, r3 | r2 = r3;
| }
0x00023de4 cmp r2, 0 |
| if (r2 != 0) {
0x00023de8 moveq r2, r3 | r2 = r3;
| }
0x00023dec add r1, pc, r1 | r1 = pc + r1;
0x00023df0 mov r0, r5 | r0 = r5;
0x00023df4 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
| label_1:
0x00023df8 sub fp, fp, 1 |
0x00023dfc cmp fp, 0 |
0x00023e00 add r6, r6, 0x40 | r6 += 0x40;
0x00023e04 bgt 0x23d54 |
| } while (fp > 0);
0x00023e08 mov r0, r5 | r0 = r5;
0x00023e0c bl 0x1276c | fclose (r0);
0x00023e10 b 0x23cb8 | goto label_0;
| label_7:
0x00023e14 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00023e18 tst r3, 0x400 |
| if ((r3 & 0x400) == 0) {
0x00023e1c beq 0x23e54 | goto label_11;
| }
0x00023e20 ldr sb, [r4, 0x1c] | sb = *((r4 + 0x1c));
0x00023e24 ldr r8, [sb], 8 | r8 = *(sb);
| sb += 8;
0x00023e28 cmp r8, 1 |
0x00023e2c bicgt r3, r3, 0x20 | __asm ("bicgt r3, r3, 0x20");
| if (r8 <= 1) {
0x00023e30 strgt r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
| }
| label_2:
0x00023e34 cmp r8, 0 |
| if (r8 <= 0) {
0x00023e38 ble 0x23df8 | goto label_1;
| }
0x00023e3c ldr r2, [sb], 4 | r2 = *(sb);
| sb += 4;
0x00023e40 mov r1, r4 | r1 = r4;
0x00023e44 mov r0, r5 | r0 = r5;
0x00023e48 bl 0x1ccbc | fcn_0001ccbc (r0, r1);
0x00023e4c sub r8, r8, 1 | r8--;
0x00023e50 b 0x23e34 | goto label_2;
| label_11:
0x00023e54 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
| do {
| label_3:
0x00023e58 mov r1, r4 | r1 = r4;
0x00023e5c mov r0, r5 | r0 = r5;
0x00023e60 bl 0x1ccbc | fcn_0001ccbc (r0, r1);
0x00023e64 b 0x23df8 | goto label_1;
| label_8:
0x00023e68 ldr r8, [r4, 0x18] | r8 = *((r4 + 0x18));
0x00023e6c ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00023e70 mov r1, r4 | r1 = r4;
0x00023e74 mov r0, 3 | r0 = 3;
0x00023e78 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00023e7c ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00023e80 mov r1, r4 | r1 = r4;
0x00023e84 mov r0, r5 | r0 = r5;
0x00023e88 bl 0x1ccbc | fcn_0001ccbc (r0, r1);
0x00023e8c str r8, [r4, 0x18] | *((r4 + 0x18)) = r8;
0x00023e90 b 0x23df8 | goto label_1;
| label_10:
0x00023e94 mov r0, r4 | r0 = r4;
0x00023e98 bl 0x2253c | r0 = fcn_0002253c (r0);
0x00023e9c mov r8, r0 | r8 = r0;
0x00023ea0 bl 0x1261c | r0 = strlen (r0);
0x00023ea4 mov sl, r0 | sl = r0;
0x00023ea8 add r0, r0, 3 | r0 += 3;
0x00023eac bl 0x1e664 | fcn_0001e664 (r0);
0x00023eb0 mov r3, 0x3d | r3 = 0x3d;
0x00023eb4 add r2, sl, 1 | r2 = sl + 1;
0x00023eb8 mov r1, r8 | r1 = r8;
0x00023ebc mov sb, r0 | sb = r0;
0x00023ec0 strb r3, [r0], 1 | *(r0) = r3;
| r0++;
0x00023ec4 bl 0x124a8 | memcpy (r0, r1, r2);
0x00023ec8 mov r2, sb | r2 = sb;
0x00023ecc mov r1, r4 | r1 = r4;
0x00023ed0 mov r0, r5 | r0 = r5;
0x00023ed4 bl 0x1ccbc | fcn_0001ccbc (r0, r1);
0x00023ed8 mov r0, sb | r0 = sb;
0x00023edc bl 0x12a54 | free (r0);
0x00023ee0 mov r0, r8 | r0 = r8;
0x00023ee4 bl 0x12a54 | free (r0);
0x00023ee8 b 0x23df8 | goto label_1;
| label_9:
0x00023eec ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00023ef0 cmp r3, 0 |
| if (r3 != 0) {
0x00023ef4 ldreq r2, [pc, 0xfc] | r2 = *((pc + 0xfc));
| }
| if (r3 != 0) {
0x00023ef8 addeq r2, pc, r2 | r2 = pc + r2;
| }
0x00023efc beq 0x23e58 |
| } while (r3 == 0);
0x00023f00 ldr r2, [pc, 0xf4] | r2 = *(0x23ff8);
0x00023f04 add r2, pc, r2 | r2 = pc + r2;
0x00023f08 b 0x23e58 | goto label_3;
| label_12:
0x00023f0c ldr r8, [r4, 0x1c] | r8 = *((r4 + 0x1c));
0x00023f10 cmp r8, 0 |
| if (r8 == 0) {
0x00023f14 beq 0x23df8 | goto label_1;
| }
0x00023f18 ldr sb, [r8] | sb = *(r8);
0x00023f1c cmp sb, 0 |
| if (sb <= 0) {
0x00023f20 ble 0x23df8 | goto label_1;
| }
0x00023f24 ldr r3, [pc, 0xd4] | r3 = *(0x23ffc);
0x00023f28 add r8, r8, 8 | r8 += 8;
0x00023f2c add r3, pc, r3 | r3 = pc + r3;
0x00023f30 str r3, [sp, 0x14] | var_14h = r3;
| label_4:
0x00023f34 ldr r3, [r8], 4 | r3 = *(r8);
| r8 += 4;
0x00023f38 mov r1, 0 | r1 = 0;
0x00023f3c mov r0, r3 | r0 = r3;
0x00023f40 str r3, [sp, 0x10] | var_10h = r3;
0x00023f44 bl 0x2151c | r0 = fcn_0002151c (r0, r1);
0x00023f48 subs sl, r0, 0 | sl = r0 - 0;
| if (sl == r0) {
0x00023f4c beq 0x23f98 | goto label_14;
| }
0x00023f50 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00023f54 ldr r1, [sp, 0xc] | r1 = format;
0x00023f58 mov r0, r5 | r0 = r5;
0x00023f5c bl 0x12910 | fprintf (r0, r1, r2)
| do {
0x00023f60 mov r3, sl | r3 = sl;
0x00023f64 mov r2, r4 | r2 = r4;
0x00023f68 mov r1, 1 | r1 = 1;
0x00023f6c mov r0, r5 | r0 = r5;
0x00023f70 bl 0x1ce64 | fcn_0001ce64 (r0, r1);
0x00023f74 mov r1, sl | r1 = sl;
0x00023f78 ldr r0, [sp, 0x10] | r0 = var_10h;
0x00023f7c bl 0x21668 | r0 = fcn_00021668 (r0, r1);
0x00023f80 subs sl, r0, 0 | sl = r0 - 0;
0x00023f84 bne 0x23f60 |
| } while (sl != r0);
0x00023f88 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00023f8c ldr r1, [sp, 0x14] | r1 = var_14h;
0x00023f90 mov r0, r5 | r0 = r5;
0x00023f94 bl 0x12910 | fprintf (r0, r1, r2)
| label_14:
0x00023f98 subs sb, sb, 1 | sb--;
| if (sb != sb) {
0x00023f9c bne 0x23f34 | goto label_4;
| }
0x00023fa0 b 0x23df8 | goto label_1;
| label_13:
0x00023fa4 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00023fa8 cmp r2, 0 |
| if (r2 != 0) {
0x00023fac bne 0x23e58 | goto label_3;
| }
0x00023fb0 ldr r3, [r7] | r3 = *(r7);
0x00023fb4 cmp r3, 0x20000 |
| if (r3 < 0x20000) {
0x00023fb8 blt 0x23df8 | goto label_1;
| }
0x00023fbc ldrh r1, [r4] | r1 = *(r4);
0x00023fc0 ldr r3, [r7, 0x74] | r3 = *((r7 + 0x74));
0x00023fc4 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00023fc8 ldr r3, [r3, r1, lsl 2] | offset_0 = r1 << 2;
| r3 = *((r3 + offset_0));
0x00023fcc cmp r3, r2 |
| if (r3 != r2) {
0x00023fd0 bne 0x23e58 | goto label_3;
| }
0x00023fd4 b 0x23df8 | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x241bc */
| #include <stdint.h>
|
; (fcn) fcn.000241bc () | void fcn_000241bc (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| void * s1;
| int32_t var_98h;
| int32_t var_9ch;
| r0 = arg1;
| r1 = arg2;
0x000241bc push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000241c0 ldr r6, [pc, 0x3dc] | r6 = *(0x245a0);
0x000241c4 mov r8, r2 | r8 = r2;
0x000241c8 sub sp, sp, 0x9c |
0x000241cc mov r4, r0 | r4 = r0;
0x000241d0 mov r5, r1 | r5 = r1;
0x000241d4 add r2, r1, 0x80 | r2 = r1 + 0x80;
0x000241d8 mov r7, r1 | r7 = r1;
0x000241dc add r6, pc, r6 | r6 = pc + r6;
| label_0:
0x000241e0 sub sl, r7, r5 | sl = r7 - r5;
0x000241e4 ldrb r3, [r7], 1 | r3 = *(r7);
| r7++;
0x000241e8 cmp r3, 0 |
| if (r3 == 0) {
0x000241ec beq 0x243ec | goto label_8;
| }
0x000241f0 cmp r3, 0x3d |
| if (r3 != 0x3d) {
0x000241f4 bne 0x243b0 | goto label_9;
| }
0x000241f8 mov r1, r5 | r1 = r5;
0x000241fc add r5, sp, 0x18 | r5 += s1;
0x00024200 mov r2, sl | r2 = sl;
0x00024204 mov r0, r5 | r0 = r5;
0x00024208 bl 0x124a8 | memcpy (r0, r1, r2);
0x0002420c add r3, sp, 0x98 | r3 += var_98h;
0x00024210 mov r2, 0 | r2 = 0;
0x00024214 add r3, r3, sl | r3 += sl;
0x00024218 strb r2, [r3, -0x80] | s1 = r2;
| label_2:
0x0002421c cmp sl, 1 |
| if (sl <= 1) {
0x00024220 ble 0x243b8 | goto label_10;
| }
0x00024224 ldr r3, [r4, 0x64] | r3 = *((r4 + 0x64));
0x00024228 ldr sb, [r4, 0x44] | sb = *((r4 + 0x44));
0x0002422c mov fp, 0 |
0x00024230 str r3, [sp, 0x10] | var_10h = r3;
0x00024234 mov r3, fp | r3 = fp;
0x00024238 str fp, [sp, 0xc] | var_ch = fp;
0x0002423c str fp, [sp, 8] | var_8h = fp;
| do {
0x00024240 ldr r1, [sb, 0x34] | r1 = *((sb + 0x34));
0x00024244 cmp r1, 0 |
| if (r1 != 0) {
0x00024248 beq 0x242d4 |
0x0002424c ldr r2, [sb, 0x10] | r2 = *((sb + 0x10));
0x00024250 ldr ip, [pc, 0x350] | ip = *(0x000245a8);
0x00024254 and r0, r2, 0x280000 | r0 = r2 & 0x280000;
0x00024258 cmp r2, ip |
0x0002425c cmpne r0, 0 | __asm ("cmpne r0, 0");
| if (r2 != ip) {
0x00024260 bne 0x242d4 | goto label_11;
| }
0x00024264 mov r2, sl | r2 = sl;
0x00024268 mov r0, r5 | r0 = r5;
0x0002426c str r3, [sp, 0x14] | var_14h = r3;
0x00024270 bl 0x2414c | fcn_0002414c (r0, r1);
0x00024274 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00024278 cmp r0, 0 |
| if (r0 != 0) {
0x0002427c ldreq r2, [sb, 0x34] | r2 = *((sb + 0x34));
| }
| if (r0 != 0) {
0x00024280 ldrbeq r2, [r2, sl] | r2 = *((r2 + sl));
| }
| if (r0 != 0) {
0x00024284 beq 0x242bc |
0x00024288 ldr r1, [sb, 0x38] | r1 = *((sb + 0x38));
0x0002428c cmp r1, 0 |
| if (r1 == 0) {
0x00024290 beq 0x242d4 | goto label_11;
| }
0x00024294 mov r2, sl | r2 = sl;
0x00024298 mov r0, r5 | r0 = r5;
0x0002429c str r3, [sp, 0x14] | var_14h = r3;
0x000242a0 bl 0x2414c | fcn_0002414c (r0, r1);
0x000242a4 ldr r3, [sp, 0x14] | r3 = var_14h;
0x000242a8 cmp r0, 0 |
| if (r0 != 0) {
0x000242ac bne 0x242d4 | goto label_11;
| }
0x000242b0 ldr r2, [sb, 0x38] | r2 = *((sb + 0x38));
0x000242b4 mov fp, 1 |
0x000242b8 ldrb r2, [r2, sl] | r2 = *((r2 + sl));
| }
0x000242bc cmp r2, 0 |
| if (r2 == 0) {
0x000242c0 beq 0x24300 | goto label_12;
| }
0x000242c4 ldr r2, [sp, 8] | r2 = var_8h;
0x000242c8 str r3, [sp, 0xc] | var_ch = r3;
0x000242cc add r2, r2, 1 | r2++;
0x000242d0 str r2, [sp, 8] | var_8h = r2;
| }
| label_11:
0x000242d4 ldr r2, [sp, 0x10] | r2 = var_10h;
0x000242d8 add r3, r3, 1 | r3++;
0x000242dc cmp r2, r3 |
0x000242e0 add sb, sb, 0x40 | sb += 0x40;
0x000242e4 bgt 0x24240 |
| } while (r2 > r3);
0x000242e8 ldr r3, [sp, 8] | r3 = var_8h;
0x000242ec cmp r3, 0 |
| if (r3 == 0) {
0x000242f0 beq 0x24434 | goto label_13;
| }
0x000242f4 cmp r3, 1 |
| if (r3 != 1) {
0x000242f8 bne 0x2448c | goto label_14;
| }
0x000242fc ldr r3, [sp, 0xc] | r3 = var_ch;
| label_12:
0x00024300 ldr r5, [r4, 0x44] | r5 = *((r4 + 0x44));
0x00024304 add r5, r5, r3, lsl 6 | r5 += (r3 << 6);
0x00024308 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x0002430c tst r3, 0x280000 |
| if ((r3 & 0x280000) == 0) {
0x00024310 beq 0x2440c | goto label_15;
| }
0x00024314 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00024318 tst r3, 4 |
| if ((r3 & 4) == 0) {
0x0002431c beq 0x2459c | goto label_16;
| }
0x00024320 ldr r3, [pc, 0x284] | r3 = *(0x245a8);
0x00024324 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00024328 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x0002432c ldr r3, [pc, 0x27c] | r3 = *(0x245ac);
0x00024330 ldr r1, [r1, 0x70] | r1 = *((r1 + 0x70));
0x00024334 ldr r7, [r6, r3] | r7 = *((r6 + r3));
0x00024338 ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x0002433c ldr r0, [r7] | r0 = *(r7);
0x00024340 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00024344 ldr r2, [r5, 0x2c] | r2 = *((r5 + 0x2c));
0x00024348 cmp r2, 0 |
| if (r2 != 0) {
0x0002434c beq 0x24368 |
0x00024350 ldr r3, [pc, 0x25c] | r3 = *(0x245b0);
0x00024354 ldr r0, [r7] | r0 = *(r7);
0x00024358 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x0002435c add r1, r1, 0x240 | r1 += 0x240;
0x00024360 add r1, r1, 2 | r1 += 2;
0x00024364 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x00024368 ldr r1, [r7] | r1 = *(r7);
0x0002436c ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00024370 cmp r3, 0 |
| if (r3 == 0) {
0x00024374 beq 0x24400 | goto label_17;
| }
0x00024378 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0002437c ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00024380 cmp r3, r2 |
| if (r3 >= r2) {
0x00024384 bhs 0x243f4 | goto label_18;
| }
0x00024388 add r2, r3, 1 | r2 = r3 + 1;
0x0002438c str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x00024390 mov r2, 0xa | r2 = 0xa;
0x00024394 strb r2, [r3] | *(r3) = r2;
| label_1:
0x00024398 mov r0, r4 | r0 = r4;
0x0002439c ldr r3, [r4, 0x54] | r3 = *((r4 + 0x54));
0x000243a0 mov r1, 1 | r1 = 1;
0x000243a4 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000243a8 mov r0, 1 | r0 = 1;
0x000243ac bl 0x126c4 | exit (r0);
| label_9:
0x000243b0 cmp r2, r7 |
| if (r2 != r7) {
0x000243b4 bne 0x241e0 | goto label_0;
| }
| label_10:
0x000243b8 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000243bc tst r3, 4 |
| if ((r3 & 4) == 0) {
0x000243c0 beq 0x2459c | goto label_16;
| }
0x000243c4 ldr r3, [pc, 0x1e0] | r3 = *(0x245a8);
0x000243c8 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x000243cc ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x000243d0 ldr r3, [pc, 0x1d8] | r3 = *(0x245ac);
0x000243d4 ldr r1, [r1, 0x8c] | r1 = *((r1 + 0x8c));
0x000243d8 ldr r0, [r6, r3] | r0 = *((r6 + r3));
0x000243dc mov r3, r5 | r3 = r5;
| label_3:
0x000243e0 ldr r0, [r0] | r0 = *(r0);
0x000243e4 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x000243e8 b 0x24398 | goto label_1;
| label_8:
0x000243ec mov r7, r3 | r7 = r3;
0x000243f0 b 0x2421c | goto label_2;
| label_18:
0x000243f4 mov r0, 0xa | r0 = 0xa;
0x000243f8 bl 0x126d0 | fputc_unlocked ();
0x000243fc b 0x24398 | goto label_1;
| label_17:
0x00024400 mov r0, 0xa | r0 = 0xa;
0x00024404 bl 0x127fc | fputc (r0, r1);
0x00024408 b 0x24398 | goto label_1;
| label_15:
0x0002440c cmp fp, 0 |
| if (fp == 0) {
0x00024410 ldrne r3, [r8, 8] | r3 = *((r8 + 8));
| }
0x00024414 stm r8, {r5, r7} | *(r8) = r5;
| *((r8 + 4)) = r7;
| if (fp == 0) {
0x00024418 orrne r3, r3, 0x20 | r3 |= 0x20;
| }
| if (fp == 0) {
0x0002441c strne r3, [r8, 8] | *((r8 + 8)) = r3;
| }
0x00024420 mov r3, 2 | r3 = 2;
| do {
0x00024424 mov r0, 0 | r0 = 0;
0x00024428 str r3, [r8, 0xc] | *((r8 + 0xc)) = r3;
| label_7:
0x0002442c add sp, sp, 0x9c |
0x00024430 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x00024434 cmp r7, 0 |
0x00024438 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
| if (r7 != 0) {
0x0002443c bne 0x24464 | goto label_19;
| }
0x00024440 tst r2, 3 |
| if ((r2 & 3) != 0) {
0x00024444 bne 0x24464 | goto label_19;
| }
0x00024448 ldrh r1, [r4, 0x62] | r1 = *((r4 + 0x62));
0x0002444c cmp r1, 0x8000 |
| if (r1 == 0x8000) {
0x00024450 ldrne r3, [r4, 0x44] | r3 = *((r4 + 0x44));
| }
| if (r1 == 0x8000) {
0x00024454 addne r3, r3, r1, lsl 6 | r3 += (r1 << 6);
| }
| if (r1 == 0x8000) {
0x00024458 stmne r8, {r3, r5} | *(r8) = r3;
| *((r8 + 4)) = r5;
| }
| if (r1 == 0x8000) {
0x0002445c movne r3, 3 | r3 = 3;
| }
0x00024460 bne 0x24424 |
| } while (r1 != 0x8000);
| label_19:
0x00024464 tst r2, 4 |
| if ((r2 & 4) == 0) {
0x00024468 beq 0x2459c | goto label_16;
| }
0x0002446c ldr r3, [pc, 0x138] | r3 = *(0x245a8);
0x00024470 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00024474 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x00024478 ldr r3, [pc, 0x130] | r3 = *(0x245ac);
0x0002447c ldr r1, [r1, 0x7c] | r1 = *((r1 + 0x7c));
0x00024480 ldr r0, [r6, r3] | r0 = *((r6 + r3));
0x00024484 mov r3, r5 | r3 = r5;
0x00024488 b 0x243e0 | goto label_3;
| label_14:
0x0002448c ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00024490 tst r3, 4 |
| if ((r3 & 4) == 0) {
0x00024494 beq 0x2459c | goto label_16;
| }
0x00024498 ldr r3, [pc, 0x10c] | r3 = *(0x245a8);
0x0002449c ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x000244a0 ldr sl, [r6, r3] | sl = *((r6 + r3));
0x000244a4 ldr r3, [pc, 0x104] | r3 = *(0x245ac);
0x000244a8 ldr sb, [r6, r3] | sb = *((r6 + r3));
0x000244ac ldr r3, [sp, 8] | r3 = var_8h;
0x000244b0 str r3, [sp] | *(sp) = r3;
0x000244b4 mov r3, r5 | r3 = r5;
0x000244b8 ldr r1, [sl, 0x54] | r1 = *((sl + 0x54));
0x000244bc ldr r0, [sb] | r0 = *(sb);
0x000244c0 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x000244c4 ldr r3, [sp, 8] | r3 = var_8h;
0x000244c8 cmp r3, 4 |
| if (r3 > 4) {
0x000244cc bgt 0x24398 | goto label_1;
| }
0x000244d0 mov r0, r5 | r0 = r5;
0x000244d4 bl 0x1261c | strlen (r0);
0x000244d8 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000244dc tst r3, 3 |
0x000244e0 mov fp, r0 |
| if ((r3 & 3) != 0) {
0x000244e4 bne 0x24558 | goto label_20;
| }
0x000244e8 ldr r7, [pc, 0xc8] | r7 = *(0x245b4);
0x000244ec add r7, pc, r7 | r7 = pc + r7;
| label_4:
0x000244f0 ldr r0, [sl, 0x50] | r0 = *((sl + 0x50));
0x000244f4 ldr r1, [sb] | r1 = *(sb);
0x000244f8 ldr r8, [r4, 0x44] | r8 = *((r4 + 0x44));
0x000244fc bl 0x12874 | fputs (r0, r1);
0x00024500 mov sl, 0 | sl = 0;
| do {
0x00024504 ldr r1, [r8, 0x34] | r1 = *((r8 + 0x34));
0x00024508 cmp r1, 0 |
| if (r1 != 0) {
0x0002450c beq 0x24540 |
0x00024510 mov r2, fp | r2 = fp;
0x00024514 mov r0, r5 | r0 = r5;
0x00024518 bl 0x2414c | r0 = fcn_0002414c (r0, r1);
0x0002451c cmp r0, 0 |
| if (r0 != 0) {
0x00024520 bne 0x2456c | goto label_21;
| }
0x00024524 ldr r3, [pc, 0x88] | r3 = *(0x245b0);
0x00024528 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x0002452c ldr r3, [r8, 0x34] | r3 = *((r8 + 0x34));
| label_6:
0x00024530 mov r2, r7 | r2 = r7;
0x00024534 add r1, r1, 4 | r1 += 4;
0x00024538 ldr r0, [sb] | r0 = *(sb);
0x0002453c bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
| label_5:
0x00024540 ldr r3, [r4, 0x64] | r3 = *((r4 + 0x64));
0x00024544 add sl, sl, 1 | sl++;
0x00024548 cmp sl, r3 |
0x0002454c add r8, r8, 0x40 | r8 += 0x40;
0x00024550 blt 0x24504 |
| } while (sl < r3);
0x00024554 b 0x24398 | goto label_1;
| label_20:
0x00024558 ldr r3, [pc, 0x54] | r3 = *(0x245b0);
0x0002455c ldr r7, [r6, r3] | r7 = *((r6 + r3));
0x00024560 add r7, r7, 0x188 | r7 += 0x188;
0x00024564 add r7, r7, 1 | r7++;
0x00024568 b 0x244f0 | goto label_4;
| label_21:
0x0002456c ldr r1, [r8, 0x38] | r1 = *((r8 + 0x38));
0x00024570 cmp r1, 0 |
| if (r1 == 0) {
0x00024574 beq 0x24540 | goto label_5;
| }
0x00024578 mov r2, fp | r2 = fp;
0x0002457c mov r0, r5 | r0 = r5;
0x00024580 bl 0x2414c | r0 = fcn_0002414c (r0, r1);
0x00024584 cmp r0, 0 |
| if (r0 != 0) {
0x00024588 bne 0x24540 | goto label_5;
| }
0x0002458c ldr r3, [pc, 0x20] | r3 = *(0x245b0);
0x00024590 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x00024594 ldr r3, [r8, 0x38] | r3 = *((r8 + 0x38));
0x00024598 b 0x24530 | goto label_6;
| label_16:
0x0002459c mvn r0, 0 | r0 = ~0;
0x000245a0 b 0x2442c | goto label_7;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x24c34 */
| #include <stdint.h>
|
; (fcn) fcn.00024c34 () | void fcn_00024c34 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00024c34 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x00024c38 push {r4, r5, r6, lr} |
0x00024c3c ldr lr, [pc, 0x12c] | lr = *(0x24d6c);
0x00024c40 cmp r3, 0 |
0x00024c44 add lr, pc, lr | lr = pc + lr;
0x00024c48 mov r4, r0 | r4 = r0;
0x00024c4c mov r2, r1 | r2 = r1;
| if (r3 != 0) {
0x00024c50 beq 0x24c68 |
0x00024c54 ldrb r1, [r3] | r1 = *(r3);
0x00024c58 cmp r1, 0 |
| if (r1 == 0) {
0x00024c5c beq 0x24c68 | goto label_2;
| }
| label_1:
0x00024c60 pop {r4, r5, r6, lr} |
0x00024c64 b 0x1d304 | void (*0x1d304)() ();
| }
| label_2:
0x00024c68 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00024c6c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00024c70 cmp r0, r3 |
| if (r0 > r3) {
0x00024c74 blo 0x24c80 |
| label_0:
0x00024c78 mov r0, 1 | r0 = 1;
0x00024c7c pop {r4, r5, r6, pc} |
| }
0x00024c80 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00024c84 ldr ip, [r4, 0xc] | ip = *((r4 + 0xc));
0x00024c88 ldr r3, [r3, r0, lsl 2] | offset_0 = r0 << 2;
| r3 = *((r3 + offset_0));
0x00024c8c tst ip, 3 |
0x00024c90 str r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
| if ((ip & 3) != 0) {
0x00024c94 bne 0x24cdc | goto label_3;
| }
0x00024c98 add r0, r0, 1 | r0++;
0x00024c9c str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
0x00024ca0 ldrb r1, [r3] | r1 = *(r3);
0x00024ca4 cmp r1, 0x2d |
| if (r1 == 0x2d) {
0x00024ca8 movne r1, r3 | r1 = r3;
| }
| if (r1 != 0x2d) {
0x00024cac bne 0x24d64 | goto label_4;
| }
| do {
0x00024cb0 ldrb r1, [r3, 1]! | r1 = *((r3 += 1));
0x00024cb4 cmp r1, 0x2d |
0x00024cb8 beq 0x24cb0 |
| } while (r1 == 0x2d);
0x00024cbc ldrh r5, [r4, 0x62] | r5 = *((r4 + 0x62));
0x00024cc0 mov r1, 0x8000 | r1 = 0x8000;
0x00024cc4 strh r1, [r4, 0x62] | *((r4 + 0x62)) = r1;
0x00024cc8 mov r0, r4 | r0 = r4;
0x00024ccc mov r1, r3 | r1 = r3;
0x00024cd0 bl 0x241bc | fcn_000241bc (r0, r1);
0x00024cd4 strh r5, [r4, 0x62] | *((r4 + 0x62)) = r5;
0x00024cd8 pop {r4, r5, r6, pc} |
| label_3:
0x00024cdc add r1, r3, 1 | r1 = r3 + 1;
0x00024ce0 str r1, [r4, 0x14] | *((r4 + 0x14)) = r1;
0x00024ce4 ldrb r5, [r3] | r5 = *(r3);
0x00024ce8 cmp r5, 0x2d |
| if (r5 != 0x2d) {
0x00024cec bne 0x24c78 | goto label_0;
| }
0x00024cf0 ldrb r5, [r3, 1] | r5 = *((r3 + 1));
0x00024cf4 cmp r5, 0 |
| if (r5 == 0) {
0x00024cf8 beq 0x24c78 | goto label_0;
| }
0x00024cfc add r0, r0, 1 | r0++;
0x00024d00 str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
0x00024d04 ldrb r0, [r3, 1] | r0 = *((r3 + 1));
0x00024d08 cmp r0, 0x2d |
| if (r0 != 0x2d) {
0x00024d0c bne 0x24d54 | goto label_5;
| }
0x00024d10 add r1, r3, 2 | r1 = r3 + 2;
0x00024d14 str r1, [r4, 0x14] | *((r4 + 0x14)) = r1;
0x00024d18 ldrb r0, [r3, 2] | r0 = *((r3 + 2));
0x00024d1c cmp r0, 0 |
| if (r0 == 0) {
0x00024d20 beq 0x24c78 | goto label_0;
| }
0x00024d24 tst ip, 1 |
| if ((ip & 1) != 0) {
0x00024d28 bne 0x24d64 | goto label_4;
| }
0x00024d2c ldr r2, [pc, 0x40] | r2 = *(0x24d70);
0x00024d30 ldr r1, [lr, r2] | r1 = *((lr + r2));
0x00024d34 ldr r2, [pc, 0x3c] | r2 = *(0x24d74);
0x00024d38 ldr r1, [r1, 0x7c] | r1 = *((r1 + 0x7c));
0x00024d3c ldr r0, [lr, r2] | r0 = *((lr + r2));
0x00024d40 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00024d44 ldr r0, [r0] | r0 = *(r0);
0x00024d48 bl 0x12910 | fprintf (r0, r1, r2)
0x00024d4c mvn r0, 0 | r0 = ~0;
0x00024d50 pop {r4, r5, r6, pc} |
| label_5:
0x00024d54 tst ip, 2 |
| if ((ip & 2) == 0) {
0x00024d58 movne r1, r0 | r1 = r0;
| }
| if ((ip & 2) != 0) {
0x00024d5c movne r0, r4 | r0 = r4;
| goto label_6;
| }
| if ((ip & 2) != 0) {
| label_6:
0x00024d60 bne 0x24c60 | goto label_1;
| }
| label_4:
0x00024d64 mov r0, r4 | r0 = r4;
0x00024d68 pop {r4, r5, r6, lr} |
0x00024d6c b 0x241bc | return void (*0x241bc)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x25458 */
| #include <stdint.h>
|
; (fcn) fcn.00025458 () | void fcn_00025458 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x00025458 push {r4, r5, r6, r7, lr} |
0x0002545c ldr r5, [pc, 0x17c] | r5 = *(0x255dc);
0x00025460 subs r4, r0, 0 | r4 = r0 - 0;
0x00025464 add r5, pc, r5 | r5 = pc + r5;
0x00025468 sub sp, sp, 0x14 |
| if (r4 != r0) {
0x0002546c bne 0x25498 | goto label_1;
| }
0x00025470 ldr r3, [pc, 0x16c] | r3 = *(0x255e0);
0x00025474 ldr r2, [r5, r3] | r2 = *((r5 + r3));
0x00025478 ldr r3, [pc, 0x168] | r3 = *(0x255e4);
0x0002547c ldr r1, [r2] | r1 = *(r2);
0x00025480 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00025484 ldr r0, [r3, 0x18] | r0 = *(0x255fc);
0x00025488 bl 0x12874 | fputs (r0, r1);
| do {
0x0002548c mvn r0, 0 | r0 = ~0;
| label_0:
0x00025490 add sp, sp, 0x14 |
0x00025494 pop {r4, r5, r6, r7, pc} |
| label_1:
0x00025498 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0002549c mov r6, r1 | r6 = r1;
0x000254a0 ldr r1, [pc, 0x144] | r1 = *(0x255e8);
0x000254a4 lsr r2, r3, 0x15 | r2 = r3 >> 0x15;
0x000254a8 and r2, r2, 1 | r2 &= 1;
0x000254ac add r1, pc, r1 | r1 = pc + r1;
0x000254b0 tst r3, 0x2000 |
0x000254b4 strb r2, [r1, 4] | *((r1 + 4)) = r2;
| if ((r3 & 0x2000) != 0) {
0x000254b8 beq 0x254f0 |
0x000254bc ldr r2, [r4, 0x58] | r2 = *((r4 + 0x58));
0x000254c0 cmp r2, 0 |
| if (r2 == 0) {
0x000254c4 beq 0x254f0 | goto label_2;
| }
0x000254c8 ldr r1, [pc, 0x118] |
0x000254cc ldr r1, [r5, r1] | r1 = *((r5 + r1));
0x000254d0 ldr r1, [r1] | r1 = *(0x255e4);
0x000254d4 cmp r1, 0 |
| if (r1 == 0) {
0x000254d8 beq 0x254f0 | goto label_2;
| }
0x000254dc and r1, r3, 0x30000 | r1 = r3 & 0x30000;
0x000254e0 cmp r1, 0x20000 |
| if (r1 != 0x20000) {
0x000254e4 orreq r3, r3, 0x10000 | r3 |= 0x10000;
| }
| if (r1 != 0x20000) {
0x000254e8 streq r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
0x000254ec blx r2 | uint32_t (*r2)(uint32_t, uint32_t) (r1, r3);
| }
| label_2:
0x000254f0 ldr r3, [r4] | r3 = *(r4);
0x000254f4 ldr r2, [pc, 0xf4] | r2 = *(0x255ec);
0x000254f8 sub r1, r3, 0x19000 | r1 = r3 - 0x19000;
0x000254fc cmp r1, r2 |
| if (r1 < r2) {
0x00025500 bls 0x2557c | goto label_3;
| }
0x00025504 ldr r2, [pc, 0xdc] | r2 = *(0x255e4);
0x00025508 ldr r7, [r5, r2] | r7 = *((r5 + r2));
0x0002550c ldr r2, [pc, 0xd0] | r2 = *(0x255e0);
0x00025510 ldr r5, [r5, r2] | r5 = *((r5 + r2));
0x00025514 and r2, r3, 0x7f | r2 = r3 & 0x7f;
0x00025518 str r2, [sp, 4] | var_4h = r2;
0x0002551c asr r2, r3, 7 | r2 = r3 >> 7;
0x00025520 and r2, r2, 0x1f | r2 &= 0x1f;
0x00025524 str r2, [sp] | *(sp) = r2;
0x00025528 asr r3, r3, 0xc | r3 >>= 0xc;
0x0002552c mov r2, r6 | r2 = r6;
0x00025530 ldr r1, [r7, 0x20] | r1 = *((r7 + 0x20));
0x00025534 ldr r0, [r5] | r0 = *(r5);
0x00025538 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5)
0x0002553c ldr r2, [r4] | r2 = *(r4);
0x00025540 ldr r3, [pc, 0xac] | r3 = *(0x255f0);
0x00025544 ldr r1, [r5] | r1 = *(r5);
0x00025548 cmp r2, r3 |
| if (r2 <= r3) {
0x0002554c ldrgt r0, [r7, 0x1c] | r0 = *((r7 + 0x1c));
| }
| if (r2 > r3) {
0x00025550 ldrle r0, [r7, 0x28] | r0 = *((r7 + 0x28));
| }
0x00025554 bl 0x12874 | fputs (r0, r1);
0x00025558 ldr r0, [pc, 0x98] |
0x0002555c ldr r3, [r5] | r3 = *(r5);
0x00025560 add r0, pc, r0 | r0 = pc + r0;
0x00025564 add r0, r0, 0x520 |
0x00025568 mov r2, 1 | r2 = 1;
0x0002556c mov r1, 8 | r1 = 8;
0x00025570 add r0, r0, 0xa | r0 = 0x25b1e;
0x00025574 bl 0x12478 | fwrite (r0, r1, r2, r3);
0x00025578 b 0x2548c |
| } while (1);
| label_3:
0x0002557c ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00025580 cmp r3, 0 |
| if (r3 == 0) {
0x00025584 bne 0x255d8 |
0x00025588 mov r1, 0x2f | r1 = 0x2f;
0x0002558c mov r0, r6 | r0 = r6;
0x00025590 bl 0x125a4 | r0 = strrchr (r0, r1);
0x00025594 cmp r0, 0 |
| if (r0 == 0) {
0x00025598 addne r0, r0, 1 | r0++;
| }
| if (r0 == 0) {
0x0002559c strne r0, [r4, 0x1c] | *((r4 + 0x1c)) = r0;
| }
0x000255a0 ldr r0, [pc, 0x54] | r0 = *(0x255f8);
| if (r0 != 0) {
0x000255a4 streq r6, [r4, 0x1c] | *((r4 + 0x1c)) = r6;
| }
0x000255a8 add r0, pc, r0 | r0 = pc + r0;
0x000255ac bl 0x12460 | getenv (r0);
0x000255b0 mov r1, r6 | r1 = r6;
0x000255b4 bl 0x200d4 | fcn_000200d4 (r0, r1);
0x000255b8 ldr r3, [pc, 0x40] | r3 = *(0x255fc);
0x000255bc cmp r0, 0 |
| if (r0 == 0) {
0x000255c0 movne r6, r0 | r6 = r0;
| }
0x000255c4 str r6, [r4, 0x18] | *((r4 + 0x18)) = r6;
0x000255c8 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000255cc mov r0, r3 | r0 = r3;
0x000255d0 str r3, [sp, 0xc] | var_ch = r3;
0x000255d4 bl 0x2541c | fcn_0002541c (r0);
| }
0x000255d8 mov r0, 0 | r0 = 0;
0x000255dc b 0x25490 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2628c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0002628c () | void fcn_0002628c (uint32_t arg1, uint32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0002628c push {r4, r5, r6, r7, r8, lr} |
0x00026290 ldr r6, [pc, 0x9c] | r6 = *(0x26330);
0x00026294 cmp r1, 0 |
0x00026298 cmpne r0, 0xf | __asm ("cmpne r0, 0xf");
0x0002629c add r6, pc, r6 | r6 = pc + r6;
| if (r1 > 0) {
0x000262a0 popls {r4, r5, r6, r7, r8, pc} |
| }
0x000262a4 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x000262a8 tst r3, 8 |
0x000262ac popne {r4, r5, r6, r7, r8, pc} |
0x000262b0 mov r5, r0 | r5 = r0;
0x000262b4 ldr r0, [r1, 0x18] | r0 = *((r1 + 0x18));
0x000262b8 mov r4, r1 | r4 = r1;
0x000262bc bl 0x209b4 | r0 = fcn_000209b4 (r0, r1);
0x000262c0 cmn r0, 1 |
0x000262c4 mov r7, r0 | r7 = r0;
| if (r0 == 1) {
0x000262c8 bne 0x2630c |
0x000262cc ldr r3, [pc, 0x64] | r3 = *(0x26334);
0x000262d0 ldr r2, [r5, 0x1c] | r2 = *((r5 + 0x1c));
0x000262d4 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x000262d8 ldr r3, [pc, 0x5c] | r3 = *(0x26338);
0x000262dc ldr r1, [r1, 0xc4] | r1 = *((r1 + 0xc4));
0x000262e0 ldr r0, [r6, r3] | r0 = *((r6 + r3));
0x000262e4 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x000262e8 ldr r0, [r0] | r0 = *(r0);
0x000262ec bl 0x12910 | fprintf (r0, r1, r2, r3)
0x000262f0 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x000262f4 tst r3, 4 |
| if ((r3 & 4) == 0) {
0x000262f8 beq 0x2630c | goto label_0;
| }
0x000262fc ldr r3, [r5, 0x54] | r3 = *((r5 + 0x54));
0x00026300 mov r1, 1 | r1 = 1;
0x00026304 mov r0, r5 | r0 = r5;
0x00026308 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| }
| label_0:
0x0002630c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00026310 tst r3, 0x40 |
| if ((r3 & 0x40) != 0) {
0x00026314 beq 0x2632c |
0x00026318 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x0002631c bl 0x12a54 | free (r0);
0x00026320 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00026324 bic r3, r3, 0x40 | r3 = BIT_MASK (r3, 0x40);
0x00026328 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
| }
0x0002632c str r7, [r4, 0x18] | *((r4 + 0x18)) = r7;
0x00026330 pop {r4, r5, r6, r7, r8, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x270ec */
| #include <stdint.h>
|
; (fcn) fcn.000270ec () | void fcn_000270ec (int32_t arg1, uint32_t arg2) {
| char * s;
| int32_t var_1h;
| int32_t var_2h;
| int32_t var_18h;
| r0 = arg1;
| r1 = arg2;
0x000270ec push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000270f0 ldr r7, [pc, 0x5cc] | r7 = *(0x276c0);
0x000270f4 ldr r3, [pc, 0x5cc] | r3 = "P";
0x000270f8 cmp r1, r7 |
0x000270fc mov sb, 0 | sb = 0;
| if (r1 == r7) {
0x00027100 movne r7, r1 | r7 = r1;
| }
0x00027104 add r3, pc, r3 | r3 = pc + r3;
0x00027108 mov r4, r0 | r4 = r0;
0x0002710c sub sp, sp, 0x18 |
0x00027110 mov r8, r1 | r8 = r1;
0x00027114 ldr r6, [pc, 0x5b0] | r6 = *(0x276c8);
0x00027118 mov r1, sb | r1 = sb;
0x0002711c add r0, r0, 0xc | r0 += 0xc;
| if (r1 != r7) {
0x00027120 moveq r7, sb | r7 = sb;
| }
0x00027124 strb sb, [r3, 0x10c] | *((r3 + 0x10c)) = sb;
0x00027128 bl 0x25058 | fcn_00025058 (r0, r1);
0x0002712c ldr r1, [pc, 0x59c] | r1 = *(0x276cc);
0x00027130 add r6, pc, r6 | r6 = pc + r6;
0x00027134 cmp r7, sb |
0x00027138 ldr r3, [pc, 0x594] | r3 = *(0x276d0);
0x0002713c ldr r2, [r4] | r2 = *(r4);
0x00027140 ldr r5, [r6, r1] | r5 = *(0x276c8);
| if (r7 != sb) {
0x00027144 bne 0x27190 | goto label_8;
| }
0x00027148 cmp r2, r3 |
0x0002714c ldr r3, [r5] | r3 = *(r5);
| if (r2 <= r3) {
0x00027150 ldrgt r0, [r4, 0x6c] | r0 = *((r4 + 0x6c));
| }
| if (r2 > r3) {
0x00027154 movle r0, r7 | r0 = r7;
| }
0x00027158 cmp r3, 0 |
| if (r3 != 0) {
0x0002715c bne 0x271a8 | goto label_9;
| }
0x00027160 ldr r3, [pc, 0x570] | r3 = *(0x276d4);
0x00027164 add r3, pc, r3 | r3 = pc + r3;
0x00027168 ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x0002716c cmp r3, 0 |
0x00027170 beq 0x2717c |
| while (r3 == 0) {
0x00027174 ldr r3, [pc, 0x560] | r3 = *(0x276d8);
0x00027178 b 0x27180 | goto label_10;
0x0002717c ldr r3, [pc, 0x55c] | r3 = *(0x276dc);
| label_10:
0x00027180 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027184 ldr r3, [r3] | r3 = *(r3);
0x00027188 str r3, [r5] | *(r5) = r3;
0x0002718c b 0x271a8 | goto label_9;
| label_8:
0x00027190 cmp r2, r3 |
0x00027194 ldr r3, [r5] | r3 = *(r5);
| if (r2 <= r3) {
0x00027198 ldrgt r0, [r4, 0x70] | r0 = *((r4 + 0x70));
| }
| if (r2 > r3) {
0x0002719c movle r0, sb | r0 = sb;
| }
0x000271a0 cmp r3, 0 |
0x000271a4 beq 0x27174 |
| }
| label_9:
0x000271a8 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x000271ac ldr ip, [r5] | ip = *(r5);
0x000271b0 lsr r3, r2, 0x14 | r3 = r2 >> 0x14;
0x000271b4 eor r3, r3, 1 | r3 ^= 1;
0x000271b8 cmp r0, 0 |
| if (r0 != 0) {
0x000271bc moveq r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x000271c0 andne r3, r3, 1 | r3 &= 1;
| }
0x000271c4 cmp r3, 0 |
| if (r3 == 0) {
0x000271c8 beq 0x27234 | goto label_11;
| }
0x000271cc tst r2, 0x2000 |
| if ((r2 & 0x2000) == 0) {
0x000271d0 beq 0x27228 | goto label_12;
| }
0x000271d4 mov r2, ip | r2 = ip;
0x000271d8 mov r1, 1 | r1 = 1;
0x000271dc bl 0x26f9c | fcn_00026f9c (r0, r1, r2);
| do {
| label_0:
0x000271e0 ldr r0, [r5] | r0 = *(r5);
0x000271e4 bl 0x128a4 | fflush (r0);
0x000271e8 ldr r0, [r5] | r0 = *(r5);
0x000271ec bl 0x1282c | r0 = ferror (r0);
0x000271f0 cmp r0, 0 |
| if (r0 == 0) {
0x000271f4 beq 0x276bc | goto label_13;
| }
0x000271f8 ldr r2, [pc, 0x4e0] |
0x000271fc ldr r3, [pc, 0x4e0] | r3 = *(0x276e0);
0x00027200 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x00027204 ldr ip, [r5] | ip = *(r5);
0x00027208 ldr r2, [r2] | r2 = *(0x276dc);
0x0002720c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027210 cmp ip, r2 |
0x00027214 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x00027218 ldr r1, [r3, 0xe4] | r1 = *(0x277c4);
| if (ip != r2) {
0x0002721c bne 0x274e0 | goto label_14;
| }
| label_1:
0x00027220 ldr r2, [r3, 0xdc] | r2 = *((r3 + 0xdc));
| label_2:
0x00027224 bl 0x1dddc | fcn_0001dddc (r0, r1);
| label_12:
0x00027228 mov r1, ip | r1 = ip;
0x0002722c bl 0x12874 | fputs (r0, r1);
0x00027230 b 0x271e0 |
| } while (1);
| label_11:
0x00027234 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027238 ldr r1, [r4, 0x38] | r1 = *((r4 + 0x38));
0x0002723c mov r0, ip | r0 = ip;
0x00027240 bl 0x12910 | fprintf (r0, r1, r2)
0x00027244 cmp r7, 0 |
0x00027248 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
| if (r7 != 0) {
0x0002724c beq 0x27258 |
0x00027250 tst r0, 0x4000 |
| if ((r0 & 0x4000) != 0) {
0x00027254 bne 0x275b0 | goto label_15;
| }
| }
0x00027258 mov r3, 0 | r3 = 0;
0x0002725c add r1, sp, 0x18 | r1 += var_18h;
0x00027260 str r3, [r1, -0x18]! | *((r1 -= 0x18)) = r3;
0x00027264 ldr r3, [pc, 0x47c] | r3 = *(0x276e4);
0x00027268 tst r0, 0x1000 |
0x0002726c ldr sl, [r6, r3] | sl = *((r6 + r3));
| if ((r0 & 0x1000) == 0) {
0x00027270 beq 0x27500 | goto label_16;
| }
0x00027274 bl 0x1de48 | fcn_0001de48 (r0, r1);
0x00027278 add r1, sl, 0x21 | r1 = sl + 0x21;
0x0002727c mov r2, r0 | r2 = r0;
0x00027280 mov sb, r0 | sb = r0;
0x00027284 ldr r0, [pc, 0x460] |
0x00027288 add r0, pc, r0 | r0 = pc + r0;
0x0002728c add r0, r0, 0x10c | r0 = 0x277f4;
0x00027290 add r0, r0, 1 | r0++;
0x00027294 bl 0x12970 | sprintf (r0, r1, r2);
0x00027298 ldr r1, [r5] | r1 = *(r5);
0x0002729c ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x000272a0 cmp r3, 0 |
| if (r3 == 0) {
0x000272a4 beq 0x274f4 | goto label_17;
| }
0x000272a8 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x000272ac ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x000272b0 cmp r3, r2 |
| if (r3 >= r2) {
0x000272b4 bhs 0x274e8 | goto label_18;
| }
0x000272b8 add r2, r3, 1 | r2 = r3 + 1;
0x000272bc str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x000272c0 mov r2, 0xa | r2 = 0xa;
0x000272c4 strb r2, [r3] | *(r3) = r2;
| label_3:
0x000272c8 adds r0, sb, 0xf | r0 = sb + 0xf;
| if (r0 >= sb) {
0x000272cc addmi r0, sb, 0x16 | r0 = sb + 0x16;
| }
0x000272d0 asr r0, r0, 3 | r0 >>= 3;
0x000272d4 rsb r0, r0, 4 | r0 = 4 - r0;
0x000272d8 cmp r0, 0 |
| if (r0 <= 0) {
0x000272dc ldrgt r3, [pc, 0x40c] | r3 = *((pc + 0x40c));
| }
| if (r0 <= 0) {
0x000272e0 addgt r3, pc, r3 | r3 = pc + r3;
| }
| if (r0 <= 0) {
0x000272e4 strgt r0, [r3, 0x108] | *((r3 + 0x108)) = r0;
| }
0x000272e8 ldr r2, [sp] | r2 = *(sp);
0x000272ec mov r1, r8 | r1 = r8;
0x000272f0 mov r0, r4 | r0 = r4;
0x000272f4 bl 0x1f8cc | fcn_0001f8cc (r0, r1, r2);
0x000272f8 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000272fc and r3, r3, 3 | r3 &= 3;
0x00027300 cmp r3, 1 |
| if (r3 == 1) {
0x00027304 beq 0x2754c | goto label_19;
| }
| if (r3 <= 1) {
0x00027308 blo 0x27560 | goto label_20;
| }
0x0002730c cmp r3, 3 |
| if (r3 == 3) {
0x00027310 bne 0x27328 |
0x00027314 ldr r3, [pc, 0x3c8] | r3 = *(0x276e0);
0x00027318 ldr r1, [r5] | r1 = *(r5);
0x0002731c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027320 ldr r0, [r3, 0x120] | r0 = *(0x27800);
| label_4:
0x00027324 bl 0x12874 | fputs (r0, r1);
| }
0x00027328 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0002732c tst r3, 0x20 |
| if ((r3 & 0x20) != 0) {
0x00027330 beq 0x27348 |
0x00027334 ldr r3, [pc, 0x3a8] | r3 = *(0x276e0);
0x00027338 ldr r1, [r5] | r1 = *(r5);
0x0002733c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027340 ldr r0, [r3, 0x14c] | r0 = *(0x2782c);
0x00027344 bl 0x12874 | fputs (r0, r1);
| }
0x00027348 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0002734c tst r3, 0x800 |
| if ((r3 & 0x800) != 0) {
0x00027350 beq 0x27368 |
0x00027354 ldr r3, [pc, 0x388] | r3 = *(0x276e0);
0x00027358 ldr r1, [r5] | r1 = *(r5);
0x0002735c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027360 ldr r0, [r3, 0x18c] | r0 = *(0x2786c);
0x00027364 bl 0x12874 | fputs (r0, r1);
| }
0x00027368 ldr r0, [r4, 0x3c] | r0 = *((r4 + 0x3c));
0x0002736c cmp r0, 0 |
| if (r0 != 0) {
0x00027370 beq 0x2737c |
0x00027374 ldr r1, [r5] | r1 = *(r5);
0x00027378 bl 0x12874 | fputs (r0, r1);
| }
0x0002737c cmp r8, 0 |
| if (r8 != 0) {
0x00027380 bne 0x2747c | goto label_21;
| }
0x00027384 ldr r8, [r4, 0x34] | r8 = *((r4 + 0x34));
0x00027388 cmp r8, 0 |
| if (r8 != 0) {
0x0002738c beq 0x273a0 |
0x00027390 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00027394 ldr r1, [r4, 0x24] | r1 = *((r4 + 0x24));
0x00027398 mov r0, r8 | r0 = r8;
0x0002739c bl 0x22e48 | fcn_00022e48 (r0, r1);
| }
0x000273a0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000273a4 tst r3, 0x100 |
| if ((r3 & 0x100) != 0) {
0x000273a8 beq 0x273d8 |
0x000273ac ldr r3, [pc, 0x330] | r3 = *(0x276e0);
0x000273b0 cmp r8, 0 |
0x000273b4 ldr r8, [r6, r3] | r8 = *((r6 + r3));
| if (r8 == 0) {
0x000273b8 bne 0x273c8 |
0x000273bc ldr r1, [r5] | r1 = *(r5);
0x000273c0 ldr r0, [r8, 0x160] | r0 = *((r8 + 0x160));
0x000273c4 bl 0x12874 | fputs (r0, r1);
| }
0x000273c8 ldr r2, [r4, 0x20] | r2 = *((r4 + 0x20));
0x000273cc ldr r1, [r8, 0x114] | r1 = *((r8 + 0x114));
0x000273d0 ldr r0, [r5] | r0 = *(r5);
0x000273d4 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x000273d8 ldr r3, [pc, 0x314] | r3 = *(0x276f0);
0x000273dc add r3, pc, r3 | r3 = pc + r3;
0x000273e0 ldrb r3, [r3, 0x10c] | r3 = *((r3 + 0x10c));
0x000273e4 cmp r3, 0 |
| if (r3 == 0) {
0x000273e8 beq 0x27468 | goto label_22;
| }
0x000273ec ldr r1, [r5] | r1 = *(r5);
0x000273f0 ldr r8, [r4, 0x64] | r8 = *((r4 + 0x64));
0x000273f4 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x000273f8 ldr sb, [r4, 0x44] | sb = *((r4 + 0x44));
0x000273fc cmp r3, 0 |
| if (r3 == 0) {
0x00027400 beq 0x27580 | goto label_23;
| }
0x00027404 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00027408 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0002740c cmp r3, r2 |
| if (r3 >= r2) {
0x00027410 bhs 0x27574 | goto label_24;
| }
0x00027414 add r2, r3, 1 | r2 = r3 + 1;
0x00027418 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0002741c mov r2, 0xa | r2 = 0xa;
0x00027420 strb r2, [r3] | *(r3) = r2;
| label_5:
0x00027424 ldr r0, [r5] | r0 = *(r5);
0x00027428 bl 0x128a4 | fflush (r0);
| do {
0x0002742c ldr r3, [sb, 0x10] | r3 = *((sb + 0x10));
0x00027430 lsr r3, r3, 0xc | r3 >>= 0xc;
0x00027434 and r3, r3, 0xf | r3 &= 0xf;
0x00027438 cmp r3, 2 |
| if (r3 != 2) {
0x0002743c beq 0x27448 |
0x00027440 cmp r3, 4 |
| if (r3 != 4) {
0x00027444 bne 0x27458 | goto label_25;
| }
| }
0x00027448 ldr r3, [sb, 0x28] | r3 = *((sb + 0x28));
0x0002744c mov r1, sb | r1 = sb;
0x00027450 mov r0, 1 | r0 = 1;
0x00027454 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_25:
0x00027458 sub r8, r8, 1 | r8--;
0x0002745c cmp r8, 0 |
0x00027460 add sb, sb, 0x40 | sb += 0x40;
0x00027464 bgt 0x2742c |
| } while (r8 > 0);
| label_22:
0x00027468 ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x0002746c cmp r0, 0 |
| if (r0 != 0) {
0x00027470 beq 0x2747c |
0x00027474 ldr r1, [r5] | r1 = *(r5);
0x00027478 bl 0x12874 | fputs (r0, r1);
| }
| label_21:
0x0002747c ldr r2, [r4] | r2 = *(r4);
0x00027480 ldr r3, [r5] | r3 = *(r5);
0x00027484 cmp r2, 0x22000 |
| if (r2 < 0x22000) {
0x00027488 blt 0x2758c | goto label_26;
| }
0x0002748c ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00027490 cmp r0, 0 |
| if (r0 == 0) {
0x00027494 beq 0x2758c | goto label_26;
| }
0x00027498 mov r1, r3 | r1 = r3;
0x0002749c bl 0x12874 | fputs (r0, r1);
| label_6:
0x000274a0 ldr r0, [r5] | r0 = *(r5);
0x000274a4 bl 0x128a4 | fflush (r0);
0x000274a8 ldr r0, [r5] | r0 = *(r5);
0x000274ac bl 0x1282c | r0 = ferror (r0);
0x000274b0 cmp r0, 0 |
| if (r0 == 0) {
0x000274b4 beq 0x271e0 | goto label_0;
| }
0x000274b8 ldr r2, [pc, 0x21c] |
0x000274bc ldr r3, [pc, 0x220] | r3 = *(0x276e0);
0x000274c0 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x000274c4 ldr ip, [r5] | ip = *(r5);
0x000274c8 ldr r2, [r2] | r2 = *(0x276d8);
0x000274cc ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000274d0 cmp ip, r2 |
0x000274d4 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x000274d8 ldr r1, [r3, 0xe4] | r1 = *(0x277c4);
| if (ip != r2) {
0x000274dc bne 0x27220 | goto label_1;
| }
| label_14:
0x000274e0 ldr r2, [r3, 0xe0] | r2 = *((r3 + 0xe0));
0x000274e4 b 0x27224 | goto label_2;
| label_18:
0x000274e8 mov r0, 0xa | r0 = 0xa;
0x000274ec bl 0x126d0 | fputc_unlocked ();
0x000274f0 b 0x272c8 | goto label_3;
| label_17:
0x000274f4 mov r0, 0xa | r0 = 0xa;
0x000274f8 bl 0x127fc | fputc (r0, r1);
0x000274fc b 0x272c8 | goto label_3;
| label_16:
0x00027500 bl 0x1df78 | fcn_0001df78 (r0, r1);
0x00027504 add r1, sl, 0x21 | r1 = sl + 0x21;
0x00027508 mov r2, r0 | r2 = r0;
0x0002750c mov sb, r0 | sb = r0;
0x00027510 ldr r0, [pc, 0x1e0] |
0x00027514 add r0, pc, r0 | r0 = pc + r0;
0x00027518 add r0, r0, 0x10c | r0 = 0x27800;
0x0002751c add r0, r0, 1 | r0++;
0x00027520 bl 0x12970 | sprintf (r0, r1, r2);
0x00027524 cmp r8, 0 |
| if (r8 != 0) {
0x00027528 bne 0x2753c | goto label_27;
| }
0x0002752c ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x00027530 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00027534 tst r3, 0x200000 |
| if ((r3 & 0x200000) != 0) {
0x00027538 bne 0x272c8 | goto label_3;
| }
| label_27:
0x0002753c ldr r1, [r5] | r1 = *(r5);
0x00027540 ldr r0, [sp] | r0 = *(sp);
0x00027544 bl 0x12874 | fputs (r0, r1);
0x00027548 b 0x272c8 | goto label_3;
| label_19:
0x0002754c ldr r3, [pc, 0x190] | r3 = *(0x276e0);
0x00027550 ldr r1, [r5] | r1 = *(r5);
0x00027554 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027558 ldr r0, [r3, 0x134] | r0 = *(0x27814);
0x0002755c b 0x27324 | goto label_4;
| label_20:
0x00027560 ldr r3, [pc, 0x17c] | r3 = *(0x276e0);
0x00027564 ldr r1, [r5] | r1 = *(r5);
0x00027568 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0002756c ldr r0, [r3, 0x150] | r0 = *(0x27830);
0x00027570 b 0x27324 | goto label_4;
| label_24:
0x00027574 mov r0, 0xa | r0 = 0xa;
0x00027578 bl 0x126d0 | fputc_unlocked ();
0x0002757c b 0x27424 | goto label_5;
| label_23:
0x00027580 mov r0, 0xa | r0 = 0xa;
0x00027584 bl 0x127fc | fputc (r0, r1);
0x00027588 b 0x27424 | goto label_5;
| label_26:
0x0002758c ldr r2, [r4, 0x48] | r2 = *((r4 + 0x48));
0x00027590 cmp r2, 0 |
| if (r2 == 0) {
0x00027594 beq 0x274a0 | goto label_6;
| }
0x00027598 ldr r1, [pc, 0x144] |
0x0002759c mov r0, r3 | r0 = r3;
0x000275a0 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x000275a4 ldr r1, [r1, 0x158] | r1 = *(0x27838);
0x000275a8 bl 0x12910 | fprintf (r0, r1)
0x000275ac b 0x274a0 | goto label_6;
| label_15:
0x000275b0 ldr r3, [r4] | r3 = *(r4);
0x000275b4 cmp r3, 0x26000 |
| if (r3 < 0x26000) {
0x000275b8 ldrge r2, [r4, 0x68] | r2 = *((r4 + 0x68));
| }
| if (r3 < 0x26000) {
0x000275bc ldrge r3, [r4, 0x44] | r3 = *((r4 + 0x44));
| }
| if (r3 < 0x26000) {
0x000275c0 addge r3, r3, r2, lsl 6 | r3 += (r2 << 6);
| }
| if (r3 >= 0x26000) {
0x000275c4 bge 0x27618 | goto label_28;
| }
0x000275c8 and r3, r0, 3 | r3 = r0 & 3;
0x000275cc cmp r3, 2 |
0x000275d0 mov r0, sp | r0 = sp;
| if (r3 == 2) {
0x000275d4 beq 0x276a0 | goto label_29;
| }
0x000275d8 cmp r3, 3 |
| if (r3 != 3) {
0x000275dc beq 0x275e8 |
0x000275e0 cmp r3, 1 |
| if (r3 != 1) {
0x000275e4 bne 0x276b0 | goto label_30;
| }
| }
0x000275e8 ldr r1, [pc, 0x10c] | r1 = *(0x276f8);
0x000275ec add r1, pc, r1 | r1 = pc + r1;
0x000275f0 b 0x276a8 | goto label_7;
| do {
0x000275f4 ldr r1, [r4, 0x64] | r1 = *((r4 + 0x64));
0x000275f8 add r2, r2, 1 | r2++;
0x000275fc cmp r2, r1 |
| if (r2 >= r1) {
0x00027600 blt 0x27614 |
0x00027604 ldr r3, [pc, 0xd8] | r3 = *(0x276e0);
0x00027608 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0002760c ldr r0, [r3, 0x38] | r0 = *(0x27718);
0x00027610 bl 0x1da34 | fcn_0001da34 (r0);
| }
0x00027614 add r3, r3, 0x40 | r3 += 0x40;
| label_28:
0x00027618 ldr r1, [r3, 0x14] | r1 = *((r3 + 0x14));
0x0002761c cmp r1, 3 |
0x00027620 bne 0x275f4 |
| } while (r1 != 3);
0x00027624 and r0, r0, 3 | r0 &= 3;
0x00027628 cmp r0, 2 |
| if (r0 != 2) {
0x0002762c beq 0x27668 |
0x00027630 cmp r0, 3 |
| if (r0 != 3) {
0x00027634 beq 0x2764c |
0x00027638 cmp r0, 1 |
| if (r0 == 1) {
0x0002763c movne r2, 0x14 | r2 = 0x14;
| }
| if (r0 == 1) {
0x00027640 ldrne r1, [r3, 0x34] | r1 = *((r3 + 0x34));
| }
| if (r0 == 1) {
0x00027644 movne r0, sp | r0 = sp;
| }
| if (r0 != 1) {
0x00027648 bne 0x27660 | goto label_31;
| }
| }
0x0002764c ldr r2, [pc, 0xac] | r2 = *(0x276fc);
0x00027650 add r0, sp, 2 | r0 += var_2h;
0x00027654 strh r2, [sp] | *(sp) = r2;
0x00027658 ldr r1, [r3, 0x34] | r1 = *((r3 + 0x34));
0x0002765c mov r2, 0x14 | r2 = 0x14;
| label_31:
0x00027660 bl 0x12850 | strncpy (r0, r1, r2);
0x00027664 b 0x27680 |
| } else {
0x00027668 mov r2, 0x2d | r2 = 0x2d;
0x0002766c strb r2, [sp] | *(sp) = r2;
0x00027670 ldrh r3, [r3, 2] | r3 = *((r3 + 2));
0x00027674 strb r3, [sp, 1] | var_1h = r3;
0x00027678 mov r3, 0 | r3 = 0;
0x0002767c strb r3, [sp, 2] | var_2h = r3;
| }
| do {
0x00027680 ldr r3, [pc, 0x5c] | r3 = *(0x276e0);
0x00027684 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027688 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x0002768c ldr r0, [r5] | r0 = *(r5);
0x00027690 mov r3, sp | r3 = sp;
0x00027694 ldr r1, [r1, 0xd4] | r1 = *((r1 + 0xd4));
0x00027698 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0002769c b 0x271e0 | goto label_0;
| label_29:
0x000276a0 ldr r1, [pc, 0x5c] | r1 = *(0x27700);
0x000276a4 add r1, pc, r1 | r1 = pc + r1;
| label_7:
0x000276a8 bl 0x12b20 | strcpy (r0, r1);
0x000276ac b 0x27680 |
| } while (1);
| label_30:
0x000276b0 ldr r1, [pc, 0x50] | r1 = "atch:";
0x000276b4 add r1, pc, r1 | r1 = pc + r1;
0x000276b8 b 0x276a8 | goto label_7;
| label_13:
0x000276bc mov r0, r7 | r0 = r7;
0x000276c0 bl 0x1d9f8 | r0 = fcn_0001d9f8 (r0);
| if (r0 != 1) {
0x000276c4 andeq r2, r0, r0, asr r7 | r2 = r0 & (r0 >> r7);
| }
0x000276c8 strheq pc, [r2], -r4 | __asm ("strheq pc, [r2], -r4");
| if (r0 != 1) {
0x000276cc andeq fp, r2, r8, asr 29 |
| }
| if (r0 != 1) {
0x000276d0 andeq r0, r0, r4, asr 5 | r0 &= (r4 >> 5);
| }
0x000276d4 strdeq sp, lr, [r1], -pc | __asm ("strdeq sp, lr, [r1], -pc");
| if (r0 != 1) {
0x000276d8 andeq pc, r2, r4, asr r8 | pc = r2 & (r4 >> r8);
| }
| if (r0 != 1) {
0x000276dc andeq r0, r0, r4, lsr 5 | r0 &= (r4 >> 5);
| }
| if (r0 != 1) {
0x000276e0 muleq r0, ip, r2 | r0 = ip * r2;
| }
| if (r0 != 1) {
0x000276e4 andeq r0, r0, ip, asr 5 | r0 &= (ip >> 5);
| }
| if (r0 != 1) {
0x000276e8 andeq r0, r0, ip, lsr 5 | r0 &= (ip >> 5);
| }
| if (r0 != 1) {
0x000276ec andeq pc, r2, r0, lsr r7 | pc = r2 & (r0 >> r7);
| }
0x000276f0 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2770c */
| #include <stdint.h>
|
; (fcn) fcn.0002770c () | void fcn_0002770c (int32_t arg1, uint32_t arg2) {
| int32_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x0002770c push {r0, r1, r4, r5, r6, r7, r8, sb, sl, lr} |
0x00027710 ldr r4, [pc, 0x180] | r4 = *(0x27894);
0x00027714 cmp r1, 0 |
0x00027718 add r4, pc, r4 | r4 = pc + r4;
0x0002771c mov r6, r0 | r6 = r0;
| if (r1 != 0) {
0x00027720 beq 0x27728 |
0x00027724 bl 0x270ec | fcn_000270ec (r0, r1);
| }
0x00027728 ldr r3, [pc, 0x16c] | r3 = *(0x27898);
0x0002772c ldr r7, [r4, r3] | r7 = *((r4 + r3));
0x00027730 ldr r0, [r7] | r0 = *(r7);
0x00027734 bl 0x128a4 | fflush (r0);
0x00027738 ldr r3, [pc, 0x160] | r3 = *(0x2789c);
0x0002773c ldr r5, [r4, r3] | r5 = *((r4 + r3));
0x00027740 ldr r0, [r5] | r0 = *(r5);
0x00027744 bl 0x128a4 | fflush (r0);
0x00027748 ldr r0, [r5] | r0 = *(r5);
0x0002774c bl 0x1282c | r0 = ferror (r0);
0x00027750 cmp r0, 0 |
0x00027754 beq 0x27760 |
| while (r0 != 0) {
0x00027758 mov r0, 1 | r0 = 1;
| label_0:
0x0002775c bl 0x1d9f8 | fcn_0001d9f8 (r0);
0x00027760 ldr r0, [r7] | r0 = *(r7);
0x00027764 bl 0x1282c | r0 = ferror (r0);
0x00027768 cmp r0, 0 |
0x0002776c bne 0x27758 |
| }
0x00027770 ldr r3, [pc, 0x12c] | r3 = *(0x278a0);
0x00027774 ldr r8, [r4, r3] | r8 = *((r4 + r3));
0x00027778 ldr r3, [r5] | r3 = *(r5);
0x0002777c str r3, [r8] | *(r8) = r3;
0x00027780 bl 0x129e8 | r0 = fork ();
0x00027784 cmn r0, 1 |
| if (r0 == 1) {
0x00027788 beq 0x2784c | goto label_2;
| }
0x0002778c cmp r0, 0 |
| if (r0 == 0) {
0x00027790 beq 0x27858 | goto label_3;
| }
0x00027794 add sb, sp, 4 | sb += var_4h;
0x00027798 mov r0, sb | r0 = sb;
0x0002779c bl 0x12718 | wait ();
0x000277a0 ldr r3, [pc, 0x100] | r3 = *(0x278a4);
0x000277a4 ldr r7, [r4, r3] | r7 = *((r4 + r3));
0x000277a8 ldr sl, [r7] | sl = *(r7);
0x000277ac ldr r0, [sl, 0x20] | r0 = *((sl + 0x20));
0x000277b0 bl 0x1e56c | fcn_0001e56c (r0);
0x000277b4 str r0, [sl, 0x1c] | *((sl + 0x1c)) = r0;
0x000277b8 sub r0, r0, 1 | r0--;
| label_1:
0x000277bc ldrb r3, [r0, 1]! | r3 = *((r0 += 1));
0x000277c0 cmp r3, 0 |
| if (r3 != 0) {
0x000277c4 bne 0x2787c | goto label_4;
| }
0x000277c8 ldr r2, [pc, 0xdc] | r2 = *(0x278a8);
0x000277cc ldr r3, [r7] | r3 = *(r7);
0x000277d0 ldr r4, [r4, r2] | r4 = *((r4 + r2));
0x000277d4 ldr r0, [r8] | r0 = *(r8);
0x000277d8 ldr r2, [r3, 0x1c] | r2 = *((r3 + 0x1c));
0x000277dc ldr r1, [r4, 0x124] | r1 = *((r4 + 0x124));
0x000277e0 bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x000277e4 ldr r0, [r8] | r0 = *(r8);
0x000277e8 bl 0x128a4 | r0 = fflush (r0);
0x000277ec bl 0x129e8 | r0 = fork ();
0x000277f0 cmn r0, 1 |
| if (r0 != 1) {
0x000277f4 beq 0x27810 |
0x000277f8 cmp r0, 0 |
| if (r0 != 0) {
0x000277fc bne 0x2781c | goto label_5;
| }
0x00027800 ldr r3, [pc, 0xa8] | r3 = *(0x278ac);
0x00027804 mov r2, 2 | r2 = 2;
0x00027808 add r3, pc, r3 | r3 = pc + r3;
0x0002780c str r2, [r3, 0xfc] | *((r3 + 0xfc)) = r2;
| }
0x00027810 mov r1, 1 | r1 = 1;
0x00027814 ldr r0, [r7] | r0 = *(r7);
0x00027818 bl 0x270ec | fcn_000270ec (r0, r1);
| label_5:
0x0002781c mov r0, sb | r0 = sb;
0x00027820 bl 0x12718 | wait ();
0x00027824 ldr r0, [r5] | r0 = *(r5);
0x00027828 bl 0x128a4 | fflush (r0);
0x0002782c ldr r0, [r5] | r0 = *(r5);
0x00027830 bl 0x1282c | r0 = ferror (r0);
0x00027834 cmp r0, 0 |
| if (r0 == 0) {
0x00027838 beq 0x2775c | goto label_0;
| }
0x0002783c ldr r2, [r4, 0xdc] | r2 = *((r4 + 0xdc));
0x00027840 ldr r1, [r4, 0xe4] | r1 = *((r4 + 0xe4));
0x00027844 ldr r0, [r6, 0x1c] | r0 = *((r6 + 0x1c));
0x00027848 bl 0x1dddc | fcn_0001dddc (r0, r1);
| label_2:
0x0002784c mov r1, 1 | r1 = 1;
0x00027850 mov r0, r6 | r0 = r6;
0x00027854 bl 0x270ec | fcn_000270ec (r0, r1);
| label_3:
0x00027858 ldr r3, [pc, 0x54] | r3 = *(0x278b0);
0x0002785c mov r2, 2 | r2 = 2;
0x00027860 add r3, pc, r3 | r3 = pc + r3;
0x00027864 mov r0, r6 | r0 = r6;
0x00027868 mov r1, 0 | r1 = 0;
0x0002786c str r2, [r3, 0xfc] | *((r3 + 0xfc)) = r2;
0x00027870 bl 0x270ec | fcn_000270ec (r0, r1);
0x00027874 mov r0, 1 | r0 = 1;
0x00027878 bl 0x126c4 | exit (r0);
| label_4:
0x0002787c ldr r2, [pc, 0x34] |
0x00027880 lsl r3, r3, 1 | r3 <<= 1;
0x00027884 ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x00027888 ldr r2, [r2] | r2 = *(0x278b4);
0x0002788c ldrh r3, [r2, r3] | r3 = *((r2 + r3));
0x00027890 strb r3, [r0] | *(r0) = r3;
0x00027894 b 0x277bc | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x27c5c */
| #include <stdint.h>
|
; (fcn) fcn.00027c5c () | void fcn_00027c5c (uint32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
| label_10:
0x00027908 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0002790c ldr r6, [pc, 0x338] | r6 = *(0x27c48);
0x00027910 mov r7, r3 | r7 = r3;
0x00027914 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00027918 add r6, pc, r6 | r6 = pc + r6;
0x0002791c tst r3, 0x10000 |
0x00027920 mov r5, r0 | r5 = r0;
0x00027924 mov r4, r2 | r4 = r2;
| if ((r3 & 0x10000) != 0) {
0x00027928 beq 0x27944 |
0x0002792c ldr r3, [r1, 0x18] | r3 = *((r1 + 0x18));
0x00027930 cmp r3, 0 |
| if (r3 == 0) {
0x00027934 beq 0x27944 | goto label_11;
| }
0x00027938 ldrb r2, [r3] | r2 = *(r3);
0x0002793c cmp r2, 0 |
| if (r2 != 0) {
0x00027940 bne 0x279b4 | goto label_12;
| }
| }
| label_11:
0x00027944 mov r1, 0 | r1 = 0;
0x00027948 add r0, r5, 0xc | r0 = r5 + 0xc;
0x0002794c bl 0x25058 | fcn_00025058 (r0, r1);
0x00027950 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00027954 tst r3, 0x1000 |
| if ((r3 & 0x1000) != 0) {
0x00027958 bne 0x27a0c | goto label_13;
| }
| do {
| label_0:
0x0002795c ldr r3, [r5, 0x38] | r3 = *((r5 + 0x38));
0x00027960 ldr r2, [r5, 0x28] | r2 = *((r5 + 0x28));
0x00027964 ldr r1, [r5, 0x30] | r1 = *((r5 + 0x30));
0x00027968 mov r0, r4 | r0 = r4;
0x0002796c bl 0x1e350 | fcn_0001e350 (r0, r1);
| label_2:
0x00027970 mov r0, r4 | r0 = r4;
0x00027974 bl 0x128a4 | fflush (r0);
0x00027978 mov r0, r4 | r0 = r4;
0x0002797c bl 0x1282c | r0 = ferror (r0);
0x00027980 cmp r0, 0 |
| if (r0 == 0) {
0x00027984 beq 0x27c40 | goto label_14;
| }
0x00027988 ldr r2, [pc, 0x2c0] |
0x0002798c ldr r3, [pc, 0x2c0] | r3 = *(0x27c50);
0x00027990 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x00027994 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027998 ldr r2, [r2] | r2 = *(0x27c4c);
0x0002799c ldr r0, [r5, 0x1c] | r0 = *((r5 + 0x1c));
0x000279a0 cmp r4, r2 |
0x000279a4 ldr r1, [r3, 0xe4] | r1 = *(0x27d34);
| if (r4 != r2) {
0x000279a8 ldreq r2, [r3, 0xdc] | r2 = *((r3 + 0xdc));
| }
| if (r4 == r2) {
0x000279ac ldrne r2, [r3, 0xe0] | r2 = *((r3 + 0xe0));
| }
0x000279b0 bl 0x1dddc | fcn_0001dddc (r0, r1);
| label_12:
0x000279b4 cmp r2, 0x56 |
0x000279b8 beq 0x2795c |
| } while (r2 == 0x56);
| if (r2 <= 0x56) {
0x000279bc bhi 0x279f4 |
0x000279c0 cmp r2, 0x43 |
| if (r2 == 0x43) {
0x000279c4 beq 0x27a0c | goto label_13;
| }
0x000279c8 cmp r2, 0x4e |
| if (r2 == 0x4e) {
0x000279cc beq 0x27b10 | goto label_15;
| }
| label_1:
0x000279d0 ldr r3, [pc, 0x27c] | r3 = *(0x27c50);
0x000279d4 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x000279d8 ldr r3, [pc, 0x278] | r3 = *(0x27c54);
0x000279dc ldr r1, [r1, 0x68] | r1 = *((r1 + 0x68));
0x000279e0 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000279e4 ldr r0, [r3] | r0 = *(0x27c54);
0x000279e8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x000279ec mov r0, 1 | r0 = 1;
| label_9:
0x000279f0 bl 0x1d9f8 | fcn_0001d9f8 (r0);
| }
0x000279f4 cmp r2, 0x6e |
| if (r2 == 0x6e) {
0x000279f8 beq 0x27b10 | goto label_15;
| }
0x000279fc cmp r2, 0x76 |
| if (r2 == 0x76) {
0x00027a00 beq 0x2795c | goto label_0;
| }
0x00027a04 cmp r2, 0x63 |
| if (r2 != 0x63) {
0x00027a08 bne 0x279d0 | goto label_1;
| }
| label_13:
0x00027a0c ldr r0, [r5, 0x28] | r0 = *((r5 + 0x28));
0x00027a10 cmp r0, 0 |
| if (r0 == 0) {
0x00027a14 movne r1, r4 | r1 = r4;
| }
| if (r0 == 0) {
0x00027a18 bne 0x27a30 |
0x00027a1c ldr r3, [r5, 0x30] | r3 = *((r5 + 0x30));
0x00027a20 cmp r3, 0 |
| if (r3 == 0) {
0x00027a24 beq 0x27a88 | goto label_16;
| }
0x00027a28 mov r1, r4 | r1 = r4;
0x00027a2c mov r0, r3 | r0 = r3;
| }
0x00027a30 bl 0x12874 | fputs (r0, r1);
| do {
0x00027a34 ldr r3, [r5] | r3 = *(r5);
0x00027a38 cmp r3, 0x22000 |
| if (r3 < 0x22000) {
0x00027a3c blt 0x27a9c | goto label_17;
| }
0x00027a40 ldr r3, [r5, 0x80] | r3 = *((r5 + 0x80));
0x00027a44 cmp r3, 0 |
| if (r3 == 0) {
0x00027a48 beq 0x27a9c | goto label_17;
| }
| label_4:
0x00027a4c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00027a50 cmp r3, 0 |
| if (r3 == 0) {
0x00027a54 beq 0x27c10 | goto label_18;
| }
0x00027a58 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00027a5c ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027a60 cmp r3, r2 |
| if (r3 >= r2) {
0x00027a64 bhs 0x27c00 | goto label_19;
| }
0x00027a68 add r2, r3, 1 | r2 = r3 + 1;
0x00027a6c str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x00027a70 mov r2, 0xa | r2 = 0xa;
0x00027a74 strb r2, [r3] | *(r3) = r2;
| label_7:
0x00027a78 mov r1, r4 | r1 = r4;
0x00027a7c ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00027a80 bl 0x12874 | fputs (r0, r1);
0x00027a84 b 0x27970 | goto label_2;
| label_16:
0x00027a88 mov r2, r3 | r2 = r3;
0x00027a8c ldr r1, [r5, 0x38] | r1 = *((r5 + 0x38));
0x00027a90 mov r0, r4 | r0 = r4;
0x00027a94 bl 0x1e350 | fcn_0001e350 (r0, r1);
0x00027a98 b 0x27a34 |
| } while (1);
| label_17:
0x00027a9c ldr r3, [r5, 0x48] | r3 = *((r5 + 0x48));
0x00027aa0 cmp r3, 0 |
| if (r3 == 0) {
0x00027aa4 beq 0x27970 | goto label_2;
| }
0x00027aa8 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00027aac cmp r3, 0 |
| if (r3 == 0) {
0x00027ab0 beq 0x27b00 | goto label_20;
| }
0x00027ab4 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00027ab8 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027abc cmp r3, r2 |
| if (r3 >= r2) {
0x00027ac0 bhs 0x27af0 | goto label_21;
| }
0x00027ac4 add r2, r3, 1 | r2 = r3 + 1;
0x00027ac8 str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x00027acc mov r2, 0xa | r2 = 0xa;
0x00027ad0 strb r2, [r3] | *(r3) = r2;
| do {
| label_3:
0x00027ad4 ldr r3, [pc, 0x178] | r3 = *(0x27c50);
0x00027ad8 ldr r2, [r5, 0x48] | r2 = *((r5 + 0x48));
0x00027adc ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027ae0 ldr r1, [r3, 0x158] | r1 = *(0x27da8);
| label_5:
0x00027ae4 mov r0, r4 | r0 = r4;
0x00027ae8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00027aec b 0x27970 | goto label_2;
| label_21:
0x00027af0 mov r1, r4 | r1 = r4;
0x00027af4 mov r0, 0xa | r0 = 0xa;
0x00027af8 bl 0x126d0 | fputc_unlocked ();
0x00027afc b 0x27ad4 |
| } while (1);
| label_20:
0x00027b00 mov r1, r4 | r1 = r4;
0x00027b04 mov r0, 0xa | r0 = 0xa;
0x00027b08 bl 0x127fc | fputc (r0, r1);
0x00027b0c b 0x27ad4 | goto label_3;
| label_15:
0x00027b10 ldr r0, [r5, 0x28] | r0 = *((r5 + 0x28));
0x00027b14 cmp r0, 0 |
| if (r0 != 0) {
0x00027b18 beq 0x27b24 |
0x00027b1c mov r1, r4 | r1 = r4;
0x00027b20 bl 0x12874 | fputs (r0, r1);
| }
0x00027b24 ldr r0, [r5, 0x2c] | r0 = *((r5 + 0x2c));
0x00027b28 cmp r0, 0 |
| if (r0 != 0) {
0x00027b2c beq 0x27b38 |
0x00027b30 mov r1, r4 | r1 = r4;
0x00027b34 bl 0x12874 | fputs (r0, r1);
| }
0x00027b38 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00027b3c cmp r3, 0 |
| if (r3 == 0) {
0x00027b40 beq 0x27bf0 | goto label_22;
| }
0x00027b44 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00027b48 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027b4c cmp r3, r2 |
| if (r3 >= r2) {
0x00027b50 bhs 0x27be0 | goto label_23;
| }
0x00027b54 add r2, r3, 1 | r2 = r3 + 1;
0x00027b58 str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x00027b5c mov r2, 0xa | r2 = 0xa;
0x00027b60 strb r2, [r3] | *(r3) = r2;
| label_6:
0x00027b64 ldr r3, [pc, 0xe8] | r3 = *(0x27c50);
0x00027b68 ldr r8, [r6, r3] | r8 = *((r6 + r3));
0x00027b6c ldr sb, [r8, 0x2c] | sb = *((r8 + 0x2c));
0x00027b70 bl 0x278f0 | fcn_000278f0 ();
0x00027b74 mov r1, sb | r1 = sb;
0x00027b78 mov r2, r0 | r2 = r0;
0x00027b7c mov r0, r4 | r0 = r4;
0x00027b80 bl 0x12910 | fprintf (r0, r1, r2)
0x00027b84 ldr r3, [r5] | r3 = *(r5);
0x00027b88 cmp r3, 0x22000 |
| if (r3 < 0x22000) {
0x00027b8c blt 0x27b9c | goto label_24;
| }
0x00027b90 ldr r3, [r5, 0x80] | r3 = *((r5 + 0x80));
0x00027b94 cmp r3, 0 |
| if (r3 != 0) {
0x00027b98 bne 0x27a4c | goto label_4;
| }
| label_24:
0x00027b9c ldr r3, [r5, 0x48] | r3 = *((r5 + 0x48));
0x00027ba0 cmp r3, 0 |
| if (r3 == 0) {
0x00027ba4 beq 0x27970 | goto label_2;
| }
0x00027ba8 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00027bac cmp r3, 0 |
| if (r3 == 0) {
0x00027bb0 beq 0x27c30 | goto label_25;
| }
0x00027bb4 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00027bb8 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027bbc cmp r3, r2 |
| if (r3 >= r2) {
0x00027bc0 bhs 0x27c20 | goto label_26;
| }
0x00027bc4 add r2, r3, 1 | r2 = r3 + 1;
0x00027bc8 str r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
0x00027bcc mov r2, 0xa | r2 = 0xa;
0x00027bd0 strb r2, [r3] | *(r3) = r2;
| do {
| label_8:
0x00027bd4 ldr r2, [r5, 0x48] | r2 = *((r5 + 0x48));
0x00027bd8 ldr r1, [r8, 0x158] | r1 = *((r8 + 0x158));
0x00027bdc b 0x27ae4 | goto label_5;
| label_23:
0x00027be0 mov r1, r4 | r1 = r4;
0x00027be4 mov r0, 0xa | r0 = 0xa;
0x00027be8 bl 0x126d0 | fputc_unlocked ();
0x00027bec b 0x27b64 | goto label_6;
| label_22:
0x00027bf0 mov r1, r4 | r1 = r4;
0x00027bf4 mov r0, 0xa | r0 = 0xa;
0x00027bf8 bl 0x127fc | fputc (r0, r1);
0x00027bfc b 0x27b64 | goto label_6;
| label_19:
0x00027c00 mov r1, r4 | r1 = r4;
0x00027c04 mov r0, 0xa | r0 = 0xa;
0x00027c08 bl 0x126d0 | fputc_unlocked ();
0x00027c0c b 0x27a78 | goto label_7;
| label_18:
0x00027c10 mov r1, r4 | r1 = r4;
0x00027c14 mov r0, 0xa | r0 = 0xa;
0x00027c18 bl 0x127fc | fputc (r0, r1);
0x00027c1c b 0x27a78 | goto label_7;
| label_26:
0x00027c20 mov r1, r4 | r1 = r4;
0x00027c24 mov r0, 0xa | r0 = 0xa;
0x00027c28 bl 0x126d0 | fputc_unlocked ();
0x00027c2c b 0x27bd4 |
| } while (1);
| label_25:
0x00027c30 mov r1, r4 | r1 = r4;
0x00027c34 mov r0, 0xa | r0 = 0xa;
0x00027c38 bl 0x127fc | fputc (r0, r1);
0x00027c3c b 0x27bd4 | goto label_8;
| label_14:
0x00027c40 cmp r7, 0 |
0x00027c44 popeq {r4, r5, r6, r7, r8, sb, sl, pc} |
0x00027c48 b 0x279f0 | goto label_9;
0x00027c5c ldr r2, [pc, 0x38] | r2 = *(0x27c98);
0x00027c60 ldr r3, [pc, 0x38] | r3 = *(0x27c9c);
0x00027c64 add r2, pc, r2 | r2 = pc + r2;
0x00027c68 ldrb r2, [r2, 4] | r2 = *((r2 + 4));
0x00027c6c add r3, pc, r3 | r3 = pc + r3;
0x00027c70 cmp r2, 0 |
| if (r2 == 0) {
0x00027c74 beq 0x27c94 | goto label_27;
| }
0x00027c78 ldr r2, [pc, 0x24] | r2 = *(0x27ca0);
| do {
0x00027c7c ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x00027c80 cmp r0, 0xf |
0x00027c84 ldr r2, [r3] | r2 = *(r3);
| if (r0 > 0xf) {
0x00027c88 bxls lr | return;
| }
0x00027c8c mov r3, 1 | r3 = 1;
0x00027c90 b 0x27908 | goto label_10;
| label_27:
0x00027c94 ldr r2, [pc, 0xc] | r2 = *(0x27ca4);
0x00027c98 b 0x27c7c |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2b25c */
| #include <stdint.h>
|
; (fcn) fcn.0002b25c () | void fcn_0002b25c (int32_t arg1, int32_t arg2) {
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_1ch;
| r0 = arg1;
| r1 = arg2;
0x0002b25c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002b260 ldr r4, [pc, 0x1a0] | r4 = *(0x2b404);
0x0002b264 sub sp, sp, 0x1c |
0x0002b268 mov r3, 0xa | r3 = 0xa;
0x0002b26c strh r3, [sp, 0x14] | var_14h = r3;
0x0002b270 mov r3, 0 | r3 = 0;
0x0002b274 strb r3, [sp, 0x10] | var_10h = r3;
0x0002b278 ldr r3, [pc, 0x18c] | r3 = *(0x2b408);
0x0002b27c str r0, [sp, 0xc] | var_ch = r0;
0x0002b280 ldr r5, [r3] | r5 = *(0x2b408);
0x0002b284 ldr r3, [r4] | r3 = *(0x2b404);
0x0002b288 mov r8, r1 | r8 = r1;
0x0002b28c cmp r5, r3 |
| if (r5 != r3) {
0x0002b290 beq 0x2b2b4 |
0x0002b294 mov r1, 0x2f | r1 = 0x2f;
0x0002b298 mov r0, r5 | r0 = r5;
0x0002b29c str r5, [r4] | *(r4) = r5;
0x0002b2a0 bl 0x125a4 | r0 = strrchr (r0, r1);
0x0002b2a4 cmp r0, 0 |
| if (r0 == 0) {
0x0002b2a8 addne r0, r0, 1 | r0++;
| }
| if (r0 == 0) {
0x0002b2ac strne r0, [r4, 4] | *((r4 + 4)) = r0;
| }
| if (r0 == 0) {
0x0002b2b0 streq r5, [r4, 4] | *((r4 + 4)) = r5;
| goto label_0;
| }
| }
| label_0:
0x0002b2b4 ldr r5, [pc, 0x154] | r5 = *(0x2b40c);
0x0002b2b8 ldr sb, [r4, 8] | sb = *((r4 + 8));
0x0002b2bc ldr r6, [r5] | r6 = *(0x2b40c);
0x0002b2c0 cmp r6, 0 |
| if (r6 == 0) {
0x0002b2c4 beq 0x2b3f0 | goto label_1;
| }
0x0002b2c8 mov r2, r8 | r2 = r8;
0x0002b2cc ldr r1, [pc, 0x140] | r1 = *(0x2b410);
0x0002b2d0 ldr r0, [sp, 0xc] | r0 = var_ch;
0x0002b2d4 bl 0x12958 | syslog ();
0x0002b2d8 mov r6, 0 | r6 = 0;
| do {
0x0002b2dc orrs r3, sb, r6 | r3 = sb | r6;
| if (r3 != sb) {
0x0002b2e0 beq 0x2b3e8 |
0x0002b2e4 ldr r7, [r5, 4] | r7 = *((r5 + 4));
0x0002b2e8 cmp r7, 0 |
| if (r7 != 0) {
0x0002b2ec beq 0x2b2f8 |
0x0002b2f0 bl 0x30fc4 | r0 = fcn_00030fc4 ();
0x0002b2f4 mov r7, r0 | r7 = r0;
| }
0x0002b2f8 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x0002b2fc orrs r3, r6, r3 | r3 = r6 | r3;
| if (r3 != r6) {
0x0002b300 mvneq sl, 0 | sl = ~0;
| }
| if (r3 != r6) {
0x0002b304 beq 0x2b310 |
0x0002b308 bl 0x12724 | r0 = getpid ();
0x0002b30c mov sl, r0 | sl = r0;
| }
0x0002b310 mov r0, r8 | r0 = r8;
0x0002b314 bl 0x1261c | r0 = strlen (r0);
0x0002b318 add r0, r8, r0 | r0 = r8 + r0;
0x0002b31c ldrb r3, [r0, -1] | r3 = *((r0 - 1));
0x0002b320 cmp r3, 0xa |
| if (r3 == 0xa) {
0x0002b324 addne fp, sp, 0x14 |
| }
| if (r3 != 0xa) {
0x0002b328 addeq fp, sp, 0x10 |
| }
0x0002b32c cmp sb, 0 |
| if (sb != 0) {
0x0002b330 beq 0x2b3a0 |
0x0002b334 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002b338 cmp r3, 3 |
| if (r3 > 3) {
0x0002b33c ldrle r3, [pc, 0xd4] | r3 = obj.stderr;
| }
| if (r3 <= 3) {
0x0002b340 ldrgt r3, [pc, 0xd4] | r3 = obj.stdout;
| }
0x0002b344 ldr sb, [r3] | sb = *(r3);
0x0002b348 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x0002b34c cmp r3, 0 |
| if (r3 != 0) {
0x0002b350 beq 0x2b364 |
0x0002b354 mov r2, r7 | r2 = r7;
0x0002b358 ldr r1, [pc, 0xc0] | r1 = stdout;
0x0002b35c mov r0, sb | r0 = sb;
0x0002b360 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x0002b364 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x0002b368 cmp r3, 0 |
| if (r3 != 0) {
0x0002b36c beq 0x2b384 |
0x0002b370 mov r3, sl | r3 = sl;
0x0002b374 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0002b378 ldr r1, [pc, 0xa4] | r1 = *(0x2b420);
0x0002b37c mov r0, sb | r0 = sb;
0x0002b380 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x0002b384 mov r3, fp | r3 = fp;
0x0002b388 mov r2, r8 | r2 = r8;
0x0002b38c ldr r1, [pc, 0x94] | r1 = "_s__d_:_";
0x0002b390 mov r0, sb | r0 = sb;
0x0002b394 bl 0x12910 | fprintf (r0, "_s__d_:_", r2, r3)
0x0002b398 mov r0, sb | r0 = sb;
0x0002b39c bl 0x128a4 | fflush (r0);
| }
0x0002b3a0 cmp r6, 0 |
| if (r6 == 0) {
0x0002b3a4 beq 0x2b3e8 | goto label_2;
| }
0x0002b3a8 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x0002b3ac ldr r5, [pc, 0x78] | r5 = *(0x2b428);
0x0002b3b0 cmp r3, 0 |
| if (r3 != 0) {
0x0002b3b4 beq 0x2b3c8 |
0x0002b3b8 mov r2, r7 | r2 = r7;
0x0002b3bc ldr r1, [pc, 0x5c] | r1 = stdout;
0x0002b3c0 ldr r0, [r5] | r0 = *(r5);
0x0002b3c4 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x0002b3c8 stm sp, {r8, fp} | *(sp) = r8;
| *((sp + 4)) = fp;
0x0002b3cc ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0002b3d0 mov r3, sl | r3 = sl;
0x0002b3d4 ldr r1, [pc, 0x54] | r1 = *(0x2b42c);
0x0002b3d8 ldr r0, [r5] | r0 = *(r5);
0x0002b3dc bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0002b3e0 ldr r0, [r5] | r0 = *(r5);
0x0002b3e4 bl 0x128a4 | fflush (r0);
| }
| label_2:
0x0002b3e8 add sp, sp, 0x1c |
0x0002b3ec pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0002b3f0 ldr r3, [pc, 0x34] |
0x0002b3f4 ldr r3, [r3] | r3 = *(0x2b428);
0x0002b3f8 cmp r3, 0 |
| if (r3 == 0) {
0x0002b3fc movne r6, 1 | r6 = 1;
| }
| if (r3 != 0) {
0x0002b400 moveq sb, 1 | sb = 1;
| }
0x0002b404 b 0x2b2dc |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2c99c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0002c99c () | void fcn_0002c99c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_24h;
| r0 = arg1;
| r1 = arg2;
| label_20:
0x000267b0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000267b4 ldr r8, [pc, 0x704] | r8 = *(0x26ebc);
0x000267b8 sub sp, sp, 0x2c |
0x000267bc mov r6, r1 | r6 = r1;
0x000267c0 ldr r1, [r2] | r1 = *(r2);
0x000267c4 mov r4, r0 | r4 = r0;
0x000267c8 mov r5, r2 | r5 = r2;
0x000267cc bl 0x25458 | fcn_00025458 (r0, r1);
0x000267d0 add r8, pc, r8 | r8 = pc + r8;
0x000267d4 cmp r0, 0 |
| if (r0 != 0) {
0x000267d8 beq 0x267ec |
0x000267dc ldr r3, [pc, 0x6e0] | r3 = *(0x26ec0);
0x000267e0 ldr r3, [r8, r3] | r3 = *((r8 + r3));
0x000267e4 ldr r0, [r3, 0x3c] | r0 = *(0x26efc);
0x000267e8 bl 0x1da34 | fcn_0001da34 (r0);
| }
0x000267ec ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000267f0 tst r3, 0x40 |
| if ((r3 & 0x40) != 0) {
0x000267f4 bne 0x26ac0 | goto label_21;
| }
0x000267f8 orr r3, r3, 0x40 | r3 |= 0x40;
0x000267fc str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x00026800 ldr r3, [r4] | r3 = *(r4);
0x00026804 str r6, [r4, 4] | *((r4 + 4)) = r6;
0x00026808 cmp r3, 0x22000 |
0x0002680c str r5, [r4, 8] | *((r4 + 8)) = r5;
| if (r3 < 0x22000) {
0x00026810 ldrge r3, [pc, 0x6b0] | r3 = *((pc + 0x6b0));
| }
| if (r3 < 0x22000) {
0x00026814 ldrge r2, [r4, 0x7c] | r2 = *((r4 + 0x7c));
| }
| if (r3 < 0x22000) {
0x00026818 addge r3, pc, r3 | r3 = pc + r3;
| }
| if (r3 < 0x22000) {
0x0002681c strge r2, [r3] | *(r3) = r2;
| }
0x00026820 mov r0, r4 | r0 = r4;
0x00026824 bl 0x24e6c | r0 = fcn_00024e6c (r0);
0x00026828 cmp r0, 0 |
| if (r0 != 0) {
0x0002682c bne 0x26eb8 | goto label_22;
| }
0x00026830 ldrh r3, [r4, 0x5e] | r3 = *((r4 + 0x5e));
0x00026834 lsl r5, r3, 0x11 | r5 = r3 << 0x11;
0x00026838 lsr r5, r5, 0x11 | r5 >>= 0x11;
0x0002683c cmp r5, 0 |
| if (r5 != 0) {
0x00026840 beq 0x2685c |
0x00026844 ldr r5, [r4, 0x44] | r5 = *((r4 + 0x44));
0x00026848 add r3, r3, 1 | r3++;
0x0002684c add r5, r5, r3, lsl 6 | r5 += (r3 << 6);
0x00026850 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00026854 tst r3, 0x20 |
| if ((r3 & 0x20) != 0) {
0x00026858 bne 0x26888 | goto label_23;
| }
| }
0x0002685c ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00026860 ldr r1, [r4, 0x34] | r1 = *((r4 + 0x34));
0x00026864 orr r3, r3, 0x80000 | r3 |= 0x80000;
0x00026868 cmp r1, 0 |
0x0002686c str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x00026870 bne 0x26938 |
| while (1) {
0x00026874 mov r0, r4 | r0 = r4;
0x00026878 bl 0x265f0 | fcn_000265f0 (r0, r1);
0x0002687c ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00026880 bic r3, r3, 0x80000 | r3 = BIT_MASK (r3, 0x80000);
0x00026884 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| label_23:
0x00026888 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0002688c tst r3, 0x2000 |
| if ((r3 & 0x2000) != 0) {
0x00026890 beq 0x268b8 |
0x00026894 ldr r2, [r4, 0x58] | r2 = *((r4 + 0x58));
0x00026898 cmp r2, 0 |
| if (r2 == 0) {
0x0002689c beq 0x268b8 | goto label_24;
| }
0x000268a0 and r1, r3, 0x30000 | r1 = r3 & 0x30000;
0x000268a4 cmp r1, 0x10000 |
| if (r1 != 0x10000) {
0x000268a8 bne 0x268b8 | goto label_24;
| }
0x000268ac bic r3, r3, 0x10000 | r3 = BIT_MASK (r3, 0x10000);
0x000268b0 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x000268b4 blx r2 | uint32_t (*r2)(uint32_t) (r3);
| }
| label_24:
0x000268b8 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000268bc tst r3, 0x800 |
| if ((r3 & 0x800) == 0) {
0x000268c0 beq 0x26ab0 | goto label_25;
| }
0x000268c4 ldr r0, [pc, 0x600] | r0 = *(0x26ec8);
0x000268c8 mov r3, 0 | r3 = 0;
0x000268cc mov r2, 4 | r2 = 4;
0x000268d0 add r0, pc, r0 | r0 = pc + r0;
0x000268d4 str r3, [sp, 0x18] | var_18h = r3;
0x000268d8 str r3, [sp, 0x1c] | var_1ch = r3;
0x000268dc strd r2, r3, [sp, 0x20] | __asm ("strd r2, r3, [sp, 0x20]");
0x000268e0 bl 0x12460 | r0 = getenv (r0);
0x000268e4 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x000268e8 bne 0x26ab0 | goto label_25;
| }
0x000268ec ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000268f0 tst r3, 3 |
| if ((r3 & 3) == 0) {
0x000268f4 beq 0x26ab0 | goto label_25;
| }
0x000268f8 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000268fc lsl r0, r0, 2 | r0 <<= 2;
0x00026900 bl 0x1e664 | r0 = fcn_0001e664 (r0);
0x00026904 subs sl, r0, 0 | sl = r0 - 0;
| if (sl != r0) {
0x00026908 beq 0x26928 |
0x0002690c ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00026910 lsl r0, r0, 2 | r0 <<= 2;
0x00026914 bl 0x1e664 | r0 = fcn_0001e664 (r0);
0x00026918 subs fp, r0, 0 |
| if (fp != r0) {
0x0002691c bne 0x26968 | goto label_26;
| }
0x00026920 mov r0, sl | r0 = sl;
0x00026924 bl 0x12a54 | r0 = free (r0);
| }
0x00026928 bl 0x12430 | errno_location ();
0x0002692c mov r3, 0xc | r3 = 0xc;
0x00026930 str r3, [r0] | *(r0) = r3;
0x00026934 b 0x26ab0 | goto label_25;
0x00026938 mov r1, 1 | r1 = 1;
0x0002693c mov r0, r4 | r0 = r4;
0x00026940 bl 0x265f0 | fcn_000265f0 (r0, r1);
0x00026944 cmp r5, 0 |
| if (r5 != 0) {
0x00026948 beq 0x26960 |
0x0002694c ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00026950 tst r3, 0x20 |
| if ((r3 & 0x20) != 0) {
0x00026954 bne 0x26960 | goto label_27;
| }
0x00026958 mov r0, r4 | r0 = r4;
0x0002695c bl 0x25fac | fcn_00025fac (r0);
| }
| label_27:
0x00026960 mov r1, 2 | r1 = 2;
0x00026964 b 0x26874 |
| }
| label_26:
0x00026968 mov r3, 1 | r3 = 1;
0x0002696c str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x00026970 mov sb, r5 | sb = r5;
0x00026974 add r3, sp, 0x18 | r3 += var_18h;
0x00026978 str r5, [r4, 0x14] | *((r4 + 0x14)) = r5;
0x0002697c str r3, [sp, 0x10] | var_10h = r3;
| do {
0x00026980 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00026984 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00026988 cmp r3, r2 |
| if (r3 > r2) {
0x0002698c blo 0x269e0 |
0x00026990 bl 0x12430 | errno_location ();
0x00026994 mov r7, r5 | r7 = r5;
0x00026998 mov r3, 0 | r3 = 0;
0x0002699c str r3, [r0] | *(r0) = r3;
| label_1:
0x000269a0 cmp r7, 0 |
| if (r7 != 0) {
0x000269a4 beq 0x269bc |
0x000269a8 ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x000269ac lsl r2, r7, 2 | r2 = r7 << 2;
0x000269b0 mov r1, sl | r1 = sl;
0x000269b4 add r0, r0, 4 | r0 += 4;
0x000269b8 bl 0x124a8 | memcpy (r0, r1, r2);
| }
0x000269bc cmp sb, 0 |
| if (sb == 0) {
0x000269c0 beq 0x26aa0 | goto label_28;
| }
0x000269c4 ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x000269c8 add r7, r7, 1 | r7++;
0x000269cc lsl r2, sb, 2 | r2 = sb << 2;
0x000269d0 mov r1, fp | r1 = fp;
0x000269d4 add r0, r0, r7, lsl 2 | r0 += (r7 << 2);
0x000269d8 bl 0x124a8 | memcpy (r0, r1, r2);
0x000269dc b 0x26aa0 | goto label_28;
| }
0x000269e0 ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x000269e4 ldr r6, [r0, r3, lsl 2] | offset_0 = r3 << 2;
| r6 = *((r0 + offset_0));
0x000269e8 ldrb r1, [r6] | r1 = *(r6);
0x000269ec cmp r1, 0x2d |
| if (r1 == 0x2d) {
0x000269f0 beq 0x26a10 | goto label_29;
| }
| label_0:
0x000269f4 add r3, r3, 1 | r3++;
0x000269f8 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x000269fc mov r7, r5 | r7 = r5;
0x00026a00 str r6, [fp, sb, lsl 2] | offset_1 = sb << 2;
| *((fp + offset_1)) = r6;
0x00026a04 add sb, sb, 1 | sb++;
| label_3:
0x00026a08 mov r5, r7 | r5 = r7;
0x00026a0c b 0x26980 |
| } while (1);
| label_29:
0x00026a10 ldrb r1, [r6, 1] | r1 = *((r6 + 1));
0x00026a14 cmp r1, 0 |
| if (r1 == 0) {
0x00026a18 beq 0x269f4 | goto label_0;
| }
0x00026a1c cmp r1, 0x2d |
| if (r1 != 0x2d) {
0x00026a20 beq 0x26a3c |
0x00026a24 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00026a28 ldr r2, [sp, 0x10] | r2 = var_10h;
0x00026a2c tst r3, 2 |
| if ((r3 & 2) != 0) {
0x00026a30 bne 0x26b20 | goto label_30;
| }
0x00026a34 add r1, r6, 1 | r1 = r6 + 1;
0x00026a38 b 0x26a84 | goto label_31;
| }
0x00026a3c ldrb r1, [r6, 2] | r1 = *((r6 + 2));
0x00026a40 cmp r1, 0 |
| if (r1 != 0) {
0x00026a44 bne 0x26a7c | goto label_32;
| }
0x00026a48 add r3, r3, 1 | r3++;
0x00026a4c add r7, r5, 1 | r7 = r5 + 1;
0x00026a50 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x00026a54 str r6, [sl, r5, lsl 2] | offset_2 = r5 << 2;
| *((sl + offset_2)) = r6;
| label_2:
0x00026a58 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00026a5c cmp r2, r3 |
| if (r2 < r3) {
0x00026a60 bls 0x269a0 | goto label_1;
| }
0x00026a64 add r1, r3, 1 | r1 = r3 + 1;
0x00026a68 ldr r3, [r0, r3, lsl 2] | offset_3 = r3 << 2;
| r3 = *((r0 + offset_3));
0x00026a6c str r1, [r4, 0x10] | *((r4 + 0x10)) = r1;
0x00026a70 str r3, [fp, sb, lsl 2] | offset_4 = sb << 2;
| *((fp + offset_4)) = r3;
0x00026a74 add sb, sb, 1 | sb++;
0x00026a78 b 0x26a58 | goto label_2;
| label_32:
0x00026a7c ldr r2, [sp, 0x10] | r2 = var_10h;
0x00026a80 add r1, r6, 2 | r1 = r6 + 2;
| label_31:
0x00026a84 mov r0, r4 | r0 = r4;
0x00026a88 bl 0x241bc | r0 = fcn_000241bc (r0, r1);
| do {
0x00026a8c cmp r0, 0 |
| if (r0 >= 0) {
0x00026a90 bge 0x26b2c | goto label_33;
| }
| label_4:
0x00026a94 bl 0x12430 | errno_location ();
0x00026a98 mov r3, 0x16 | r3 = 0x16;
| label_6:
0x00026a9c str r3, [r0] | *(r0) = r3;
| label_28:
0x00026aa0 mov r0, sl | r0 = sl;
0x00026aa4 bl 0x12a54 | free (r0);
0x00026aa8 mov r0, fp | r0 = fp;
0x00026aac bl 0x12a54 | free (r0);
| label_25:
0x00026ab0 mov r3, 1 | r3 = 1;
0x00026ab4 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x00026ab8 mov r3, 0 | r3 = 0;
0x00026abc str r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
| label_21:
0x00026ac0 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00026ac4 mov r0, r4 | r0 = r4;
0x00026ac8 cmp r3, 0 |
| if (r3 != 0) {
0x00026acc moveq r2, 1 | r2 = 1;
| }
| if (r3 != 0) {
0x00026ad0 streq r2, [r4, 0x10] | *((r4 + 0x10)) = r2;
| }
| if (r3 != 0) {
0x00026ad4 streq r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
| }
0x00026ad8 bl 0x24d7c | r0 = fcn_00024d7c (r0);
0x00026adc subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00026ae0 ldrne r0, [r4, 4] | r0 = *((r4 + 4));
| }
| if (r5 != r0) {
0x00026ae4 bne 0x26de4 | goto label_19;
| }
0x00026ae8 ldrh r2, [r4, 0x5e] | r2 = *((r4 + 0x5e));
0x00026aec cmp r2, 0 |
| if (r2 == 0) {
0x00026af0 beq 0x26cdc | goto label_34;
| }
0x00026af4 cmp r2, 0x8000 |
| if (r2 == 0x8000) {
0x00026af8 beq 0x26cdc | goto label_34;
| }
0x00026afc ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x00026b00 add r3, r3, r2, lsl 6 | r3 += (r2 << 6);
0x00026b04 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00026b08 tst r3, 5 |
| if ((r3 & 5) == 0) {
0x00026b0c beq 0x26cdc | goto label_34;
| }
0x00026b10 mov r0, r4 | r0 = r4;
0x00026b14 bl 0x23c10 | fcn_00023c10 (r0);
0x00026b18 mov r0, r5 | r0 = r5;
0x00026b1c bl 0x1d9f8 | fcn_0001d9f8 (r0);
| label_30:
0x00026b20 mov r0, r4 | r0 = r4;
0x00026b24 bl 0x1d304 | fcn_0001d304 (r0, r1);
0x00026b28 b 0x26a8c |
| } while (1);
| label_33:
0x00026b2c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00026b30 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00026b34 lsl r1, r5, 2 | r1 = r5 << 2;
0x00026b38 str r1, [sp, 0xc] | var_ch = r1;
0x00026b3c ldr r1, [r2, r3, lsl 2] | offset_5 = r3 << 2;
| r1 = *((r2 + offset_5));
0x00026b40 add r0, r3, 1 | r0 = r3 + 1;
0x00026b44 str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
0x00026b48 str r1, [sl, r5, lsl 2] | offset_6 = r5 << 2;
| *((sl + offset_6)) = r1;
0x00026b4c ldr r1, [sp, 0x18] | r1 = var_18h;
0x00026b50 lsl lr, r3, 2 | lr = r3 << 2;
0x00026b54 ldr ip, [r1, 0x10] | ip = *((r1 + 0x10));
0x00026b58 add r7, r5, 1 | r7 = r5 + 1;
0x00026b5c tst ip, 0xf000 |
0x00026b60 ldr r1, [sp, 0x24] | r1 = var_24h;
| if ((ip & 0xf000) != 0) {
0x00026b64 bne 0x26c24 | goto label_35;
| }
0x00026b68 cmp r1, 1 |
| if (r1 == 1) {
0x00026b6c addeq r6, r6, 2 | r6 += 2;
| goto label_36;
| }
| if (r1 != 1) {
| label_36:
0x00026b70 bne 0x26a08 | goto label_3;
| }
| label_5:
0x00026b74 mov r3, r6 | r3 = r6;
0x00026b78 ldrb r1, [r6], 1 | r1 = *(r6);
| r6++;
0x00026b7c cmp r1, 0 |
| if (r1 == 0) {
0x00026b80 beq 0x26a08 | goto label_3;
| }
0x00026b84 ldr r2, [sp, 0x10] | r2 = var_10h;
0x00026b88 mov r0, r4 | r0 = r4;
0x00026b8c str r3, [sp, 0x14] | var_14h = r3;
0x00026b90 bl 0x1d304 | r0 = fcn_0001d304 (r0, r1);
0x00026b94 cmp r0, 0 |
| if (r0 < 0) {
0x00026b98 blt 0x26a94 | goto label_4;
| }
0x00026b9c ldr r2, [sp, 0x18] | r2 = var_18h;
0x00026ba0 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00026ba4 ldr r1, [r2, 0x10] | r1 = *((r2 + 0x10));
0x00026ba8 tst r1, 0xf000 |
| if ((r1 & 0xf000) == 0) {
0x00026bac beq 0x26b74 | goto label_5;
| }
0x00026bb0 tst r1, 0x10000 |
0x00026bb4 ldrb r2, [r3, 1] | r2 = *((r3 + 1));
0x00026bb8 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
| if ((r1 & 0x10000) == 0) {
0x00026bbc beq 0x26bec | goto label_37;
| }
0x00026bc0 cmp r2, 0 |
| if (r2 != 0) {
0x00026bc4 bne 0x26a08 | goto label_3;
| }
0x00026bc8 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00026bcc ldr r2, [r2, r3, lsl 2] | offset_7 = r3 << 2;
| r2 = *((r2 + offset_7));
0x00026bd0 ldrb r1, [r2] | r1 = *(r2);
0x00026bd4 cmp r1, 0x2d |
| if (r1 != 0x2d) {
0x00026bd8 addne r3, r3, 1 | r3++;
| goto label_38;
| }
| if (r1 == 0x2d) {
| label_38:
0x00026bdc beq 0x26a08 | goto label_3;
| }
| label_7:
0x00026be0 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x00026be4 add r7, r5, 2 | r7 = r5 + 2;
0x00026be8 b 0x26c14 | goto label_10;
| label_37:
0x00026bec cmp r2, 0 |
| if (r2 != 0) {
0x00026bf0 bne 0x26a08 | goto label_3;
| }
0x00026bf4 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00026bf8 cmp r3, r2 |
| if (r3 >= r2) {
0x00026bfc bhs 0x26a94 | goto label_4;
| }
0x00026c00 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00026c04 add r1, r3, 1 | r1 = r3 + 1;
0x00026c08 ldr r2, [r2, r3, lsl 2] | offset_8 = r3 << 2;
| r2 = *((r2 + offset_8));
0x00026c0c add r7, r5, 2 | r7 = r5 + 2;
0x00026c10 str r1, [r4, 0x10] | *((r4 + 0x10)) = r1;
| label_10:
0x00026c14 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00026c18 add r3, sl, r3 | r3 = sl + r3;
0x00026c1c str r2, [r3, 4] | *((r3 + 4)) = r2;
0x00026c20 b 0x26a08 | goto label_3;
| label_35:
0x00026c24 tst ip, 0x10000 |
| if ((ip & 0x10000) == 0) {
0x00026c28 beq 0x26c94 | goto label_39;
| }
0x00026c2c cmp r1, 1 |
| if (r1 != 1) {
0x00026c30 beq 0x26c48 |
0x00026c34 cmp r1, 2 |
| if (r1 == 2) {
0x00026c38 beq 0x26c7c | goto label_40;
| }
| label_9:
0x00026c3c bl 0x12430 | errno_location ();
0x00026c40 mov r3, 5 | r3 = 5;
0x00026c44 b 0x26a9c | goto label_6;
| }
0x00026c48 ldrb r1, [r6, 2] | r1 = *((r6 + 2));
| label_8:
0x00026c4c cmp r1, 0 |
| if (r1 != 0) {
0x00026c50 bne 0x26a08 | goto label_3;
| }
0x00026c54 ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x00026c58 cmp r0, r1 |
| if (r0 >= r1) {
0x00026c5c bhs 0x26c84 | goto label_41;
| }
0x00026c60 add r2, r2, lr | r2 += lr;
0x00026c64 ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x00026c68 ldrb r1, [r2] | r1 = *(r2);
0x00026c6c cmp r1, 0x2d |
| if (r1 == 0x2d) {
0x00026c70 beq 0x26a08 | goto label_3;
| }
0x00026c74 add r3, r3, 2 | r3 += 2;
0x00026c78 b 0x26be0 | goto label_7;
| label_40:
0x00026c7c ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00026c80 b 0x26c4c | goto label_8;
| label_41:
0x00026c84 bl 0x12430 | errno_location ();
0x00026c88 mov r3, 0 | r3 = 0;
0x00026c8c str r3, [r0] | *(r0) = r3;
0x00026c90 b 0x269a0 | goto label_1;
| label_39:
0x00026c94 cmp r1, 1 |
| if (r1 == 1) {
0x00026c98 beq 0x26cac | goto label_42;
| }
0x00026c9c cmp r1, 2 |
| if (r1 != 2) {
0x00026ca0 bne 0x26c3c | goto label_9;
| }
0x00026ca4 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00026ca8 b 0x26cb0 | goto label_43;
| label_42:
0x00026cac ldrb r1, [r6, 2] | r1 = *((r6 + 2));
| label_43:
0x00026cb0 cmp r1, 0 |
| if (r1 != 0) {
0x00026cb4 bne 0x26a08 | goto label_3;
| }
0x00026cb8 ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x00026cbc cmp r0, r1 |
| if (r0 >= r1) {
0x00026cc0 bhs 0x26c3c | goto label_9;
| }
0x00026cc4 add r3, r3, 2 | r3 += 2;
0x00026cc8 add r2, r2, lr | r2 += lr;
0x00026ccc str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x00026cd0 add r7, r5, 2 | r7 = r5 + 2;
0x00026cd4 ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x00026cd8 b 0x26c14 | goto label_10;
| label_34:
0x00026cdc ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00026ce0 tst r0, 4 |
| if ((r0 & 4) == 0) {
0x00026ce4 beq 0x26de0 | goto label_17;
| }
0x00026ce8 ldr ip, [r4, 0x44] | ip = *((r4 + 0x44));
0x00026cec ldr lr, [r4, 0x68] |
0x00026cf0 mov r3, ip | r3 = ip;
| label_16:
0x00026cf4 ldr r5, [r3, 0x10] | r5 = *((r3 + 0x10));
0x00026cf8 tst r5, 5 |
| if ((r5 & 5) == 0) {
0x00026cfc beq 0x26d20 | goto label_12;
| }
0x00026d00 ldr r1, [r3, 0x20] | r1 = *((r3 + 0x20));
0x00026d04 cmp r1, 0 |
| if (r1 == 0) {
0x00026d08 subne r1, r1, 4 | r1 -= 4;
| }
0x00026d0c bne 0x26d88 |
| while (r2 == 0x8000) {
0x00026d10 ldr r1, [r3, 0x24] | r1 = *((r3 + 0x24));
0x00026d14 cmp r1, 0 |
| if (r1 == 0) {
0x00026d18 subne r1, r1, 4 | r1 -= 4;
| }
| if (r1 != 0) {
0x00026d1c bne 0x26dec | goto label_13;
| }
| label_12:
0x00026d20 ldrh r2, [r3, 8] | r2 = *((r3 + 8));
0x00026d24 cmp r2, 0x8000 |
| if (r2 != 0x8000) {
0x00026d28 beq 0x26d38 |
0x00026d2c ldrh r1, [r3] | r1 = *(r3);
0x00026d30 cmp r1, r2 |
| if (r1 != r2) {
0x00026d34 bne 0x26e3c | goto label_44;
| }
| }
0x00026d38 ldrh r1, [r3, 0xa] | r1 = *((r3 + 0xa));
0x00026d3c ldrh r2, [r3, 0xe] | r2 = *((r3 + 0xe));
0x00026d40 cmp r2, r1 |
| if (r2 >= r1) {
0x00026d44 bhs 0x26e3c | goto label_44;
| }
0x00026d48 tst r5, 0x100000 |
| if ((r5 & 0x100000) != 0) {
0x00026d4c beq 0x26d58 |
0x00026d50 tst r5, 3 |
| if ((r5 & 3) != 0) {
0x00026d54 bne 0x26e3c | goto label_44;
| }
| }
0x00026d58 ldr r2, [pc, 0x170] | r2 = *(0x26ecc);
0x00026d5c ldr ip, [pc, 0x160] | ip = *(0x00026ec4);
0x00026d60 ldr r2, [r8, r2] | r2 = *((r8 + r2));
0x00026d64 cmp r1, 1 |
0x00026d68 ldr r0, [r2] | r0 = *(0x26ecc);
0x00026d6c ldr r3, [r3, 0x34] | r3 = *((r3 + 0x34));
0x00026d70 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00026d74 ldr ip, [r8, ip] | ip = *((r8 + ip));
| if (r1 < 1) {
0x00026d78 bls 0x26e30 | goto label_45;
| }
0x00026d7c str r1, [sp] | *(sp) = r1;
0x00026d80 ldr r1, [ip, 0xc8] | r1 = *((ip + 0xc8));
0x00026d84 b 0x26dcc | goto label_46;
| label_11:
0x00026d88 ldr r2, [r1, 4]! | r2 = *((r1 += 4));
0x00026d8c cmp r2, 0x8000 |
0x00026d90 beq 0x26d10 |
| }
0x00026d94 add r2, ip, r2, lsl 6 | r2 = ip + (r2 << 6);
0x00026d98 ldr r6, [r2, 0x10] | r6 = *((r2 + 0x10));
0x00026d9c tst r6, 0xf |
| if ((r6 & 0xf) != 0) {
0x00026da0 bne 0x26d88 | goto label_11;
| }
0x00026da4 ldr r1, [pc, 0x118] |
0x00026da8 ldr r2, [r2, 0x34] | r2 = *((r2 + 0x34));
0x00026dac ldr r1, [r8, r1] | r1 = *((r8 + r1));
0x00026db0 ldr r0, [pc, 0x118] | r0 = *(0x26ecc);
0x00026db4 ldr r0, [r8, r0] | r0 = *((r8 + r0));
0x00026db8 str r2, [sp] | *(sp) = r2;
0x00026dbc ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00026dc0 ldr r3, [r3, 0x34] | r3 = *((r3 + 0x34));
0x00026dc4 ldr r1, [r1, 0xec] | r1 = *(0x26fac);
| label_14:
0x00026dc8 ldr r0, [r0] | r0 = *(r0);
| label_46:
0x00026dcc bl 0x12910 | fprintf (r0, r1, r2, r3)
| label_15:
0x00026dd0 ldr r3, [r4, 0x54] | r3 = *((r4 + 0x54));
0x00026dd4 mov r1, 1 | r1 = 1;
0x00026dd8 mov r0, r4 | r0 = r4;
0x00026ddc blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_17:
0x00026de0 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
| label_19:
0x00026de4 add sp, sp, 0x2c |
0x00026de8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x00026dec ldr r2, [r1, 4]! | r2 = *((r1 += 4));
0x00026df0 cmp r2, 0x8000 |
| if (r2 == 0x8000) {
0x00026df4 beq 0x26d20 | goto label_12;
| }
0x00026df8 add r2, ip, r2, lsl 6 | r2 = ip + (r2 << 6);
0x00026dfc ldr r6, [r2, 0x10] | r6 = *((r2 + 0x10));
0x00026e00 tst r6, 5 |
| if ((r6 & 5) == 0) {
0x00026e04 beq 0x26dec | goto label_13;
| }
0x00026e08 ldr r1, [pc, 0xb4] |
0x00026e0c ldr r2, [r2, 0x34] | r2 = *((r2 + 0x34));
0x00026e10 ldr r1, [r8, r1] | r1 = *((r8 + r1));
0x00026e14 ldr r0, [pc, 0xb4] | r0 = *(0x26ecc);
0x00026e18 ldr r0, [r8, r0] | r0 = *((r8 + r0));
0x00026e1c str r2, [sp] | *(sp) = r2;
0x00026e20 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00026e24 ldr r3, [r3, 0x34] | r3 = *((r3 + 0x34));
0x00026e28 ldr r1, [r1, 0x6c] | r1 = *(0x26f2c);
0x00026e2c b 0x26dc8 | goto label_14;
| label_45:
0x00026e30 ldr r1, [ip, 0x98] | r1 = *((ip + 0x98));
0x00026e34 bl 0x12910 | fprintf (r0, r1)
0x00026e38 b 0x26dd0 | goto label_15;
| label_44:
0x00026e3c sub lr, lr, 1 | lr--;
0x00026e40 cmp lr, 0 |
| if (lr > 0) {
0x00026e44 addgt r3, r3, 0x40 | r3 += 0x40;
| goto label_47;
| }
| if (lr > 0) {
| label_47:
0x00026e48 bgt 0x26cf4 | goto label_16;
| }
0x00026e4c tst r0, 0x200 |
0x00026e50 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
| if ((r0 & 0x200) == 0) {
0x00026e54 beq 0x26e88 | goto label_48;
| }
0x00026e58 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00026e5c cmp r2, r3 |
| if (r2 < r3) {
0x00026e60 bls 0x26de0 | goto label_17;
| }
0x00026e64 ldr r3, [pc, 0x58] | r3 = *(0x26ec0);
0x00026e68 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00026e6c ldr r1, [r8, r3] | r1 = *((r8 + r3));
0x00026e70 ldr r3, [pc, 0x58] | r3 = *(0x26ecc);
0x00026e74 ldr r1, [r1, 0xa0] | r1 = *((r1 + 0xa0));
0x00026e78 ldr r3, [r8, r3] | r3 = *((r8 + r3));
| label_18:
0x00026e7c ldr r0, [r3] | r0 = *(r3);
0x00026e80 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00026e84 b 0x26dd0 | goto label_15;
| label_48:
0x00026e88 tst r0, 0x400 |
| if ((r0 & 0x400) == 0) {
0x00026e8c beq 0x26de0 | goto label_17;
| }
0x00026e90 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00026e94 cmp r2, r3 |
| if (r2 > r3) {
0x00026e98 bhi 0x26de0 | goto label_17;
| }
0x00026e9c ldr r3, [pc, 0x20] | r3 = *(0x26ec0);
0x00026ea0 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00026ea4 ldr r1, [r8, r3] | r1 = *((r8 + r3));
0x00026ea8 ldr r3, [pc, 0x20] | r3 = *(0x26ecc);
0x00026eac ldr r1, [r1, 0x58] | r1 = *((r1 + 0x58));
0x00026eb0 ldr r3, [r8, r3] | r3 = *((r8 + r3));
0x00026eb4 b 0x26e7c | goto label_18;
| label_22:
0x00026eb8 mov r0, 0 | r0 = 0;
0x00026ebc b 0x26de4 | goto label_19;
0x0002c99c b 0x267b0 | goto label_20;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2ed9c */
| #include <stdint.h>
|
; (fcn) fcn.0002ed9c () | void fcn_0002ed9c (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
0x0002ed9c ldr r3, [pc, 0x7c] |
0x0002eda0 push {r0, r1, r4, lr} |
0x0002eda4 ldr r3, [r3] | r3 = *(0x2ee1c);
0x0002eda8 mov r4, r0 | r4 = r0;
0x0002edac cmp r3, 0 |
| if (r3 == 0) {
0x0002edb0 bne 0x2edb8 |
0x0002edb4 bl 0x2ed0c | fcn_0002ed0c ();
| }
0x0002edb8 mov r0, r4 | r0 = r4;
0x0002edbc bl 0x12a48 | OBJ_nid2sn ();
0x0002edc0 ldr r3, [pc, 0x5c] | r3 = *(0x2ee20);
0x0002edc4 cmp r4, r3 |
| if (r4 == r3) {
0x0002edc8 bne 0x2ee0c |
0x0002edcc ldr r3, [pc, 0x54] |
0x0002edd0 ldr r4, [pc, 0x54] | r4 = *(0x2ee28);
0x0002edd4 ldr r3, [r3] | r3 = *(0x2ee24);
0x0002edd8 cmp r3, 0 |
| if (r3 != 0) {
0x0002eddc beq 0x2ee04 |
0x0002ede0 ldr r3, [pc, 0x48] | r3 = "AES128CMAC";
0x0002ede4 ldr r0, [pc, 0x48] |
0x0002ede8 str r3, [sp] | *(sp) = r3;
0x0002edec str r4, [sp, 4] | var_4h = r4;
0x0002edf0 mov r3, 0xdf | r3 = 0xdf;
0x0002edf4 ldr r2, [pc, 0x3c] | r2 = stderr;
0x0002edf8 ldr r1, [pc, 0x3c] | r1 = "ssl_init.c";
0x0002edfc ldr r0, [r0] | r0 = "keytype_name";
0x0002ee00 bl 0x12910 | fprintf ("keytype_name", "ssl_init.c", r2, "AES128CMAC", r4)
| }
0x0002ee04 mov r0, r4 | r0 = r4;
0x0002ee08 b 0x2ee18 |
| } else {
0x0002ee0c ldr r3, [pc, 0x2c] | r3 = "_s:_d:_s__:_s:nid";
0x0002ee10 cmp r0, 0 |
| if (r0 == 0) {
0x0002ee14 moveq r0, r3 | r0 = r3;
| goto label_0;
| }
| }
| label_0:
0x0002ee18 add sp, sp, 8 |
0x0002ee1c pop {r4, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2ee44 */
| #include <stdint.h>
|
; (fcn) fcn.0002ee44 () | void fcn_0002ee44 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x0002ee44 ldr r3, [pc, 0x23c] |
0x0002ee48 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x0002ee4c ldr r3, [r3] | r3 = *(0x2f084);
0x0002ee50 mov r6, r0 | r6 = r0;
0x0002ee54 cmp r3, 0 |
0x0002ee58 mov r7, r1 | r7 = r1;
| if (r3 == 0) {
0x0002ee5c bne 0x2ee64 |
0x0002ee60 bl 0x2ed0c | fcn_0002ed0c ();
| }
0x0002ee64 ldr r4, [pc, 0x220] | r4 = *(0x2f088);
0x0002ee68 ldr r5, [pc, 0x220] |
0x0002ee6c ldr r0, [r4] | r0 = *(0x2f088);
0x0002ee70 mov r2, 0x80 | r2 = 0x80;
0x0002ee74 mov r1, 0 | r1 = 0;
0x0002ee78 add r0, r5, r0, lsl 7 | r0 = r5 + (r0 << 7);
0x0002ee7c bl 0x128b0 | memset (r0, r1, r2);
0x0002ee80 ldr r3, [r4] | r3 = *(0x2f088);
0x0002ee84 mov r2, 0x80 | r2 = 0x80;
0x0002ee88 add r5, r5, r3, lsl 7 | r5 = 0x2f08c;
0x0002ee8c add r3, r3, 1 | r3++;
0x0002ee90 and r3, r3, 0xf | r3 &= 0xf;
0x0002ee94 mov r1, r6 | r1 = r6;
0x0002ee98 mov r0, r5 | r0 = r5;
0x0002ee9c str r3, [r4] | *(r4) = r3;
0x0002eea0 bl 0x1246c | strlcpy (r0, r1, r2);
0x0002eea4 ldr r3, [pc, 0x1e8] | r3 = *(0x2f090);
0x0002eea8 sub r2, r5, 1 | r2 = r5 - 1;
0x0002eeac ldr r1, [r3] | r1 = *(0x2f090);
| do {
0x0002eeb0 ldrb r3, [r2, 1]! | r3 = *((r2 += 1));
0x0002eeb4 cmp r3, 0 |
| if (r3 == 0) {
0x0002eeb8 bne 0x2efb4 |
0x0002eebc mov r0, r5 | r0 = r5;
0x0002eec0 bl 0x12904 | r0 = OBJ_sn2nid ();
0x0002eec4 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x0002eec8 bne 0x2ef20 |
0x0002eecc ldr r8, [pc, 0x1c4] | r8 = __ctype_toupper;
0x0002eed0 mov r2, 0xb | r2 = 0xb;
0x0002eed4 mov r1, r5 | r1 = r5;
0x0002eed8 mov r0, r8 | r0 = r8;
0x0002eedc bl 0x125b0 | r0 = strncmp (r0, r1, r2);
0x0002eee0 cmp r0, 0 |
| if (r0 != 0) {
0x0002eee4 bne 0x2efc4 | goto label_3;
| }
0x0002eee8 ldr r3, [pc, 0x1ac] |
0x0002eeec ldr r3, [r3] | r3 = "AES128CMAC";
0x0002eef0 cmp r3, 0 |
| if (r3 != 0) {
0x0002eef4 beq 0x2ef1c |
0x0002eef8 ldr r3, [pc, 0x1a0] | r3 = *(0x2f09c);
0x0002eefc ldr r0, [pc, 0x1a0] |
0x0002ef00 str r3, [sp] | *(sp) = r3;
0x0002ef04 str r8, [sp, 4] | var_4h = r8;
0x0002ef08 mov r3, 0x87 | r3 = 0x87;
0x0002ef0c ldr r2, [pc, 0x194] | r2 = stderr;
0x0002ef10 ldr r1, [pc, 0x194] | r1 = "ssl_init.c";
0x0002ef14 ldr r0, [r0] | r0 = "keytype_from_text";
0x0002ef18 bl 0x12910 | fprintf ("keytype_from_text", "ssl_init.c", r2, r3)
| }
0x0002ef1c ldr r4, [pc, 0x18c] | r4 = "%s:%d:%s():%s:key\n";
| }
| label_0:
0x0002ef20 cmp r7, 0 |
| if (r7 == 0) {
0x0002ef24 beq 0x2efe4 | goto label_4;
| }
0x0002ef28 mov r0, r4 | r0 = r4;
0x0002ef2c bl 0x12a48 | OBJ_nid2sn ();
0x0002ef30 bl 0x12598 | r0 = EVP_get_digestbyname ();
0x0002ef34 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 != r0) {
0x0002ef38 moveq r5, r6 | r5 = r6;
| }
| if (r6 != r0) {
0x0002ef3c beq 0x2ef48 |
0x0002ef40 bl 0x125ec | r0 = EVP_MD_size ();
0x0002ef44 mov r5, r0 | r5 = r0;
| }
0x0002ef48 cmp r6, 0 |
0x0002ef4c clz r3, r5 | r3 &= r5;
0x0002ef50 lsr r3, r3, 5 | r3 >>= 5;
| if (r6 == 0) {
0x0002ef54 movne r6, r3 | r6 = r3;
| }
| if (r6 != 0) {
0x0002ef58 moveq r6, 1 | r6 = 1;
| }
0x0002ef5c cmp r6, 0 |
| if (r6 == 0) {
0x0002ef60 beq 0x2f030 | goto label_5;
| }
0x0002ef64 ldr r3, [pc, 0x144] | r3 = "%s:%d:%s():%s:key\n";
0x0002ef68 cmp r4, r3 |
| if (r4 != r3) {
0x0002ef6c bne 0x2eff0 | goto label_6;
| }
0x0002ef70 ldr r3, [pc, 0x124] |
0x0002ef74 ldr r3, [r3] | r3 = "AES128CMAC";
0x0002ef78 cmp r3, 0 |
| if (r3 != 0) {
0x0002ef7c beq 0x2efa8 |
0x0002ef80 ldr r3, [pc, 0x110] | r3 = __ctype_toupper;
0x0002ef84 ldr r0, [pc, 0x118] |
0x0002ef88 str r3, [sp, 4] | var_4h = r3;
0x0002ef8c ldr r3, [pc, 0x10c] | r3 = *(0x2f09c);
0x0002ef90 ldr r2, [pc, 0x110] | r2 = stderr;
0x0002ef94 str r3, [sp] | *(sp) = r3;
0x0002ef98 ldr r1, [pc, 0x114] | r1 = *(0x2f0b0);
0x0002ef9c mov r3, 0xa4 | r3 = 0xa4;
0x0002efa0 ldr r0, [r0] | r0 = "keytype_from_text";
0x0002efa4 bl 0x12910 | fprintf ("keytype_from_text", r1, r2, r3)
| }
0x0002efa8 mov r5, 0x10 | r5 = 0x10;
| label_1:
0x0002efac str r5, [r7] | *(r7) = r5;
0x0002efb0 b 0x2efe4 | goto label_4;
| }
0x0002efb4 lsl r3, r3, 1 | r3 <<= 1;
0x0002efb8 ldrh r3, [r1, r3] | r3 = *((r1 + r3));
0x0002efbc strb r3, [r2] | *(r2) = r3;
0x0002efc0 b 0x2eeb0 |
| } while (1);
| label_3:
0x0002efc4 ldr r2, [pc, 0xec] |
0x0002efc8 ldrb r3, [r6] | r3 = *(r6);
0x0002efcc ldr r2, [r2] | r2 = "_s:_d:_s__:_s:len";
0x0002efd0 lsl r3, r3, 1 | r3 <<= 1;
0x0002efd4 ldrsh r3, [r2, r3] | r3 = *((r2 + r3));
0x0002efd8 cmp r3, 0x6d |
| if (r3 == 0x6d) {
0x0002efdc moveq r4, 4 | r4 = 4;
| goto label_7;
| }
| if (r3 == 0x6d) {
| label_7:
0x0002efe0 beq 0x2ef20 | goto label_0;
| }
| do {
| label_4:
0x0002efe4 mov r0, r4 | r0 = r4;
0x0002efe8 add sp, sp, 8 |
0x0002efec pop {r4, r5, r6, r7, r8, pc} |
| label_6:
0x0002eff0 ldr r3, [pc, 0xac] | r3 = "keytype_from_text";
0x0002eff4 mov r0, r4 | r0 = r4;
0x0002eff8 ldr r5, [r3] | r5 = "keytype_from_text";
0x0002effc bl 0x2ed9c | fcn_0002ed9c (r0);
0x0002f000 ldr r1, [pc, 0xb4] | r1 = __ctype_tolower;
0x0002f004 mov r2, r0 | r2 = r0;
0x0002f008 mov r0, r5 | r0 = r5;
0x0002f00c bl 0x12910 | fprintf (r0, r1, r2)
0x0002f010 mov r0, r4 | r0 = r4;
0x0002f014 bl 0x2ed9c | fcn_0002ed9c (r0);
0x0002f018 ldr r1, [pc, 0x9c] | r1 = __ctype_tolower;
0x0002f01c mov r2, r0 | r2 = r0;
0x0002f020 mov r0, 3 | r0 = 3;
0x0002f024 bl 0x2b548 | fcn_0002b548 (r0);
| label_2:
0x0002f028 mov r4, 0 | r4 = 0;
0x0002f02c b 0x2efe4 |
| } while (1);
| label_5:
0x0002f030 cmp r5, 0x14 |
| if (r5 < 0x14) {
0x0002f034 bls 0x2efac | goto label_1;
| }
0x0002f038 ldr r3, [pc, 0x64] | r3 = "keytype_from_text";
0x0002f03c mov r0, r4 | r0 = r4;
0x0002f040 ldr r8, [r3] | r8 = "keytype_from_text";
0x0002f044 bl 0x2ed9c | fcn_0002ed9c (r0);
0x0002f048 mov r7, 0x14 | r7 = 0x14;
0x0002f04c mov r3, r5 | r3 = r5;
0x0002f050 ldr r1, [pc, 0x68] | r1 = "key type %s is not supported by OpenSSL\n";
0x0002f054 str r7, [sp] | *(sp) = r7;
0x0002f058 mov r2, r0 | r2 = r0;
0x0002f05c mov r0, r8 | r0 = r8;
0x0002f060 bl 0x12910 | fprintf (r0, "key type %s is not supported by OpenSSL\n", r2, r3)
0x0002f064 mov r0, r4 | r0 = r4;
0x0002f068 bl 0x2ed9c | fcn_0002ed9c (r0);
0x0002f06c str r7, [sp] | *(sp) = r7;
0x0002f070 mov r3, r5 | r3 = r5;
0x0002f074 ldr r1, [pc, 0x48] | r1 = "key_type__s__u_octet_digests_are_too_big__max__lu";
0x0002f078 mov r2, r0 | r2 = r0;
0x0002f07c mov r0, 3 | r0 = 3;
0x0002f080 bl 0x2b548 | fcn_0002b548 (r0);
0x0002f084 b 0x2f028 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x2f9f0 */
| #include <stdint.h>
|
; (fcn) fcn.0002f9f0 () | void fcn_0002f9f0 () {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
0x0002f9f0 push {r0, r1, r4, r5, r6, lr} |
0x0002f9f4 ldr r4, [pc, 0x6c] | r4 = *(0x2fa64);
0x0002f9f8 ldr r1, [pc, 0x6c] | r1 = *(0x2fa68);
0x0002f9fc add r0, r4, 4 | r0 = r4 + 4;
0x0002fa00 bl 0x12664 | r0 = pthread_once ();
0x0002fa04 cmp r0, 0 |
| if (r0 != 0) {
0x0002fa08 beq 0x2fa60 |
0x0002fa0c ldr r3, [pc, 0x5c] | r3 = *(0x2fa6c);
0x0002fa10 mov r2, 0x6e | r2 = 0x6e;
0x0002fa14 ldr r5, [r3] | r5 = *(0x2fa6c);
0x0002fa18 mov r1, 1 | r1 = 1;
0x0002fa1c ldr r3, [pc, 0x50] | r3 = stderr;
0x0002fa20 ldr r0, [r4] | r0 = *(r4);
0x0002fa24 bl 0x2fb58 | fcn_0002fb58 (r0, r1);
0x0002fa28 ldr r3, [pc, 0x48] | r3 = "fatal error";
0x0002fa2c mov r2, 0x65 | r2 = 0x65;
0x0002fa30 mov r1, 1 | r1 = 1;
0x0002fa34 mov r6, r0 | r6 = r0;
0x0002fa38 ldr r0, [r4] | r0 = *(r4);
0x0002fa3c bl 0x2fb58 | fcn_0002fb58 (r0, r1);
0x0002fa40 mov r3, 0x4d | r3 = 0x4d;
0x0002fa44 ldr r2, [pc, 0x30] | r2 = "failed";
0x0002fa48 ldr r1, [pc, 0x30] | r1 = "./../lib/isc/lib.c";
0x0002fa4c str r6, [sp] | *(sp) = r6;
0x0002fa50 str r0, [sp, 4] | var_4h = r0;
0x0002fa54 mov r0, r5 | r0 = r5;
0x0002fa58 bl 0x12910 | r0 = fprintf (r0, "./../lib/isc/lib.c", "failed", r3, r4, r5, r6)
0x0002fa5c bl 0x12934 | abort ();
| }
0x0002fa60 add sp, sp, 8 |
0x0002fa64 pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x339d0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000339d0 () | void fcn_000339d0 (int32_t arg_ch, int32_t arg_198h, int32_t arg_19ch, int32_t arg_1a0h, int32_t arg_1a8h, int32_t arg_1ach, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_30h;
| int32_t var_34h;
| int32_t var_38h;
| int32_t var_3ch;
| int32_t var_40h;
| int32_t var_48h;
| int32_t var_60h;
| int32_t var_a0h;
| int32_t var_d0h;
| int32_t var_d0h_2;
| int32_t var_108h;
| int32_t var_118h;
| int32_t var_138h;
| int32_t var_0h_2;
| int32_t var_174h;
| r0 = arg1;
| r1 = arg2;
0x000339d0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000339d4 subs r5, r0, 0 | r5 -= arg_198h;
0x000339d8 sub sp, sp, 0x174 |
0x000339dc str r1, [sp, 0x28] | var_28h = r1;
0x000339e0 str r2, [sp, 0x2c] | var_2ch = r2;
0x000339e4 str r3, [sp, 0x20] | var_20h = r3;
0x000339e8 ldr r4, [sp, 0x19c] | r4 = *(arg_19ch);
| if (r5 == arg_198h) {
0x000339ec beq 0x33a14 | goto label_14;
| }
0x000339f0 ldr r2, [r5] | r2 = *(r5);
0x000339f4 ldr r3, [pc, 0x8f0] | r3 = *(0x342e8);
0x000339f8 cmp r2, r3 |
| if (r2 == r3) {
0x000339fc beq 0x33a14 | goto label_14;
| }
0x00033a00 ldr r3, [pc, 0x8e8] | r3 = *(0x342ec);
0x00033a04 mov r2, 0 | r2 = 0;
0x00033a08 mov r1, 0x590 | r1 = 0x590;
| do {
| label_0:
0x00033a0c ldr r0, [pc, 0x8e0] | r0 = "lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____";
0x00033a10 bl 0x2f7d0 | fcn_0002f7d0 ();
| label_14:
0x00033a14 ldr r3, [sp, 0x28] | r3 = var_28h;
0x00033a18 cmp r3, 0 |
| if (r3 != 0) {
0x00033a1c ldreq r3, [pc, 0x8d4] | r3 = "category_____void__0_";
| }
| if (r3 != 0) {
0x00033a20 ldreq r2, [sp, 0x28] | r2 = var_28h;
| }
| if (r3 != 0) {
0x00033a24 ldreq r1, [pc, 0x8d0] | r1 = *(0x000342fc);
| }
0x00033a28 beq 0x33a0c |
| } while (r3 == 0);
0x00033a2c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00033a30 cmp r3, 0 |
| if (r3 != 0) {
0x00033a34 ldreq r3, [pc, 0x8c4] | r3 = "module_____void__0_";
| }
| if (r3 != 0) {
0x00033a38 ldreq r2, [sp, 0x2c] | r2 = var_2ch;
| }
| if (r3 == 0) {
0x00033a3c ldreq r1, [pc, 0x8c0] | r1 = *(0x00034304);
| goto label_15;
| }
| if (r3 == 0) {
| label_15:
0x00033a40 beq 0x33a0c | goto label_0;
| }
0x00033a44 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00033a48 cmp r3, 0 |
| if (r3 != 0) {
0x00033a4c ldreq r3, [pc, 0x8b4] | r3 = "level___0";
| }
| if (r3 != 0) {
0x00033a50 ldreq r2, [sp, 0x20] | r2 = var_20h;
| }
| if (r3 == 0) {
0x00033a54 ldreq r1, [pc, 0x8b0] | r1 = *(0x0003430c);
| goto label_16;
| }
| if (r3 == 0) {
| label_16:
0x00033a58 beq 0x33a0c | goto label_0;
| }
0x00033a5c ldr r3, [sp, 0x1a8] | r3 = *(arg_1a8h);
0x00033a60 cmp r3, 0 |
| if (r3 != 0) {
0x00033a64 ldreq r3, [pc, 0x8a4] | r3 = "format != ((void *)0)";
| }
| if (r3 != 0) {
0x00033a68 ldreq r2, [sp, 0x1a8] | r2 = *(arg_1a8h);
| }
| if (r3 == 0) {
0x00033a6c ldreq r1, [pc, 0x8a0] | r1 = *(0x00034314);
| goto label_17;
| }
| if (r3 == 0) {
| label_17:
0x00033a70 beq 0x33a0c | goto label_0;
| }
0x00033a74 cmp r5, 0 |
| if (r5 == 0) {
0x00033a78 beq 0x33f30 | goto label_12;
| }
0x00033a7c ldr r3, [sp, 0x28] | r3 = var_28h;
0x00033a80 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00033a84 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00033a88 cmp r2, r3 |
| if (r2 < r3) {
0x00033a8c ldrhs r3, [pc, 0x884] | r3 = *((pc + 0x884));
| }
| if (r2 < r3) {
0x00033a90 movhs r2, 0 | r2 = 0;
| }
| if (r2 >= r3) {
0x00033a94 ldrhs r1, [pc, 0x880] | r1 = *(0x0003431c);
| goto label_18;
| }
| if (r2 >= r3) {
| label_18:
0x00033a98 bhs 0x33a0c | goto label_0;
| }
0x00033a9c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00033aa0 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00033aa4 ldr r3, [r5, 0x14] | r3 = *((r5 + 0x14));
0x00033aa8 cmp r2, r3 |
| if (r2 < r3) {
0x00033aac ldrhs r3, [pc, 0x86c] | r3 = "module__id___lctx__module_count";
| }
| if (r2 < r3) {
0x00033ab0 movhs r2, 0 | r2 = 0;
| }
| if (r2 >= r3) {
0x00033ab4 ldrhs r1, [pc, 0x868] | r1 = *(0x00034324);
| goto label_19;
| }
| if (r2 >= r3) {
| label_19:
0x00033ab8 bhs 0x33a0c | goto label_0;
| }
0x00033abc ldr r1, [sp, 0x20] | r1 = var_20h;
0x00033ac0 mov r0, r5 | r0 = r5;
0x00033ac4 bl 0x33980 | r0 = fcn_00033980 (r0, r1);
0x00033ac8 cmp r0, 0 |
| if (r0 == 0) {
0x00033acc beq 0x33f30 | goto label_12;
| }
0x00033ad0 cmp r4, 0 |
| if (r4 != 0) {
0x00033ad4 beq 0x33aec |
0x00033ad8 add r1, sp, 0x1a0 | r1 += arg_1a0h;
0x00033adc ldm r1, {r1, r2, r3} | r1 = *(r1);
| r2 = *((r1 + 4));
| r3 = *((r1 + 8));
0x00033ae0 mov r0, r4 | r0 = r4;
0x00033ae4 bl 0x2fb58 | fcn_0002fb58 (r0, r1);
0x00033ae8 str r0, [sp, 0x1a8] | *(arg_1a8h) = r0;
| }
0x00033aec mov r3, 0 | r3 = 0;
0x00033af0 strb r3, [sp, 0x60] | var_60h = r3;
0x00033af4 strb r3, [sp, 0x48] | var_48h = r3;
0x00033af8 add r3, r5, 0x1c | r3 = r5 + 0x1c;
0x00033afc mov r0, r3 | r0 = r3;
0x00033b00 str r3, [sp, 0x30] | var_30h = r3;
0x00033b04 bl 0x12634 | r0 = pthread_mutex_lock ();
0x00033b08 cmp r0, 0 |
| if (r0 != 0) {
0x00033b0c beq 0x33b20 |
0x00033b10 ldr r2, [pc, 0x810] | r2 = *(0x34324);
0x00033b14 ldr r1, [pc, 0x810] | r1 = "__pthread_mutex_lock___lctx__lock_____0____0_:_34___0";
0x00033b18 ldr r0, [pc, 0x7d4] | r0 = "lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____";
0x00033b1c bl 0x32238 | fcn_00032238 ("lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____", "__pthread_mutex_lock___lctx__lock_____0____0_:_34___0");
| }
0x00033b20 ldr r2, [r5, 0x34] | r2 = *((r5 + 0x34));
0x00033b24 mov r3, 0 | r3 = 0;
0x00033b28 str r2, [sp, 0x24] | var_24h = r2;
0x00033b2c ldr r2, [sp, 0x28] | r2 = var_28h;
0x00033b30 strb r3, [r5, 0x38] | *((r5 + 0x38)) = r3;
0x00033b34 ldr r1, [r2, 4] | r1 = *((r2 + 4));
0x00033b38 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00033b3c ldr r6, [pc, 0x7ec] | r6 = *(0x3432c);
0x00033b40 ldr r2, [r2, 0x10] | r2 = *((r2 + 0x10));
0x00033b44 ldr r0, [r2, r1, lsl 3] | offset_0 = r1 << 3;
| r0 = *((r2 + offset_0));
| label_6:
0x00033b48 clz r1, r0 | r1 &= r0;
0x00033b4c lsr r1, r1, 5 | r1 >>= 5;
0x00033b50 tst r1, r3 |
| if ((r1 & r3) != 0) {
0x00033b54 bne 0x342d0 | goto label_20;
| }
0x00033b58 eor r2, r3, 1 | r2 = r3 ^ 1;
0x00033b5c tst r1, r2 |
| if ((r1 & r2) == 0) {
0x00033b60 ldrne r1, [sp, 0x24] | r1 = var_24h;
| }
| if ((r1 & r2) == 0) {
0x00033b64 ldrne r1, [r1, 0x10] | r1 = *((r1 + 0x10));
| }
| if ((r1 & r2) == 0) {
0x00033b68 ldrne r0, [r1] | r0 = *(r1);
| }
0x00033b6c ldr r1, [pc, 0x7c0] | r1 = *(0x34330);
0x00033b70 cmp r0, 0 |
| if (r0 == 0) {
0x00033b74 movne r2, 0 | r2 = 0;
| }
0x00033b78 cmp r2, 0 |
| if (r2 == 0) {
0x00033b7c movne r0, r1 | r0 = r1;
| }
0x00033b80 ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x00033b84 ldr r2, [r0] | r2 = *(r0);
0x00033b88 str r1, [sp, 0x3c] | var_3ch = r1;
0x00033b8c ldr r1, [sp, 0x2c] | r1 = var_2ch;
0x00033b90 cmp r2, r1 |
0x00033b94 cmpne r2, 0 | __asm ("cmpne r2, 0");
| if (r2 != r1) {
0x00033b98 bne 0x34030 | goto label_11;
| }
0x00033b9c ldr r4, [r0, 4] | r4 = *((r0 + 4));
0x00033ba0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00033ba4 tst r3, 0x1000 |
| if ((r3 & 0x1000) != 0) {
0x00033ba8 beq 0x33bb8 |
0x00033bac ldr r2, [r5, 0x18] | r2 = *((r5 + 0x18));
0x00033bb0 cmp r2, 0 |
| if (r2 == 0) {
0x00033bb4 beq 0x3402c | goto label_7;
| }
| }
0x00033bb8 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x00033bbc ldr r1, [sp, 0x20] | r1 = var_20h;
0x00033bc0 cmp r2, 0 |
| if (r2 != 0) {
0x00033bc4 ldreq r2, [r5, 0x18] | r2 = *((r5 + 0x18));
| }
0x00033bc8 cmp r2, r1 |
| if (r2 < r1) {
0x00033bcc blt 0x3402c | goto label_7;
| }
0x00033bd0 tst r3, 1 |
| if ((r3 & 1) != 0) {
0x00033bd4 beq 0x33c14 |
0x00033bd8 ldrb r3, [sp, 0x60] | r3 = var_60h;
0x00033bdc cmp r3, 0 |
| if (r3 != 0) {
0x00033be0 bne 0x33c14 | goto label_21;
| }
0x00033be4 add r0, sp, 0x108 | r0 += var_108h;
0x00033be8 bl 0x34cc4 | r0 = fcn_00034cc4 (r0);
0x00033bec cmp r0, 0 |
| if (r0 != 0) {
0x00033bf0 beq 0x33c04 |
0x00033bf4 ldr r2, [pc, 0x73c] | r2 = *(0x34334);
0x00033bf8 ldr r1, [pc, 0x73c] | r1 = "isc_time_now((&isctime)) == 0";
0x00033bfc ldr r0, [pc, 0x6f0] | r0 = "lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____";
0x00033c00 bl 0x32238 | fcn_00032238 ("lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____", "isc_time_now((&isctime)) == 0");
| }
0x00033c04 mov r2, 0x40 | r2 = 0x40;
0x00033c08 add r1, sp, 0x60 | r1 += var_60h;
0x00033c0c add r0, sp, 0x108 | r0 += var_108h;
0x00033c10 bl 0x352e4 | fcn_000352e4 (r0, r1);
| }
| label_21:
0x00033c14 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00033c18 tst r3, 2 |
| if ((r3 & 2) == 0) {
0x00033c1c beq 0x33c6c | goto label_1;
| }
0x00033c20 ldrb r3, [sp, 0x48] | r3 = var_48h;
0x00033c24 cmp r3, 0 |
| if (r3 != 0) {
0x00033c28 bne 0x33c6c | goto label_1;
| }
0x00033c2c ldr r3, [sp, 0x20] | r3 = var_20h;
0x00033c30 cmn r3, 5 |
| if (r3 >= 5) {
0x00033c34 bge 0x33e34 | goto label_22;
| }
0x00033c38 ldr r0, [pc, 0x700] |
0x00033c3c ldr r3, [pc, 0x700] | r3 = *(0x34340);
0x00033c40 ldr r2, [pc, 0x700] | r2 = "level";
0x00033c44 mov r1, 0xa | r1 = 0xa;
0x00033c48 ldr r0, [r0] | r0 = *(0x3433c);
0x00033c4c bl 0x2fb58 | fcn_0002fb58 (r0, r1);
0x00033c50 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00033c54 str r3, [sp] | *(sp) = r3;
0x00033c58 mov r3, r0 | r3 = r0;
| do {
0x00033c5c ldr r2, [pc, 0x6e8] | r2 = *(0x34348);
0x00033c60 mov r1, 0x18 | r1 = 0x18;
0x00033c64 add r0, sp, 0x48 | r0 += var_48h;
0x00033c68 bl 0x2e74c | fcn_0002e74c ();
| label_1:
0x00033c6c ldrb r7, [r5, 0x38] | r7 = *((r5 + 0x38));
0x00033c70 cmp r7, 0 |
| if (r7 == 0) {
0x00033c74 bne 0x33d14 |
0x00033c78 add r8, r5, 0x38 | r8 = r5 + 0x38;
0x00033c7c ldr r3, [sp, 0x1ac] | r3 = *(arg_1ach);
0x00033c80 ldr r2, [sp, 0x1a8] | r2 = *(arg_1a8h);
0x00033c84 mov r1, 0x2000 | r1 = 0x2000;
0x00033c88 mov r0, r8 | r0 = r8;
0x00033c8c bl 0x2e048 | fcn_0002e048 (r0, r1);
0x00033c90 ldr r3, [sp, 0x198] | r3 = *(arg_198h);
0x00033c94 cmp r3, 0 |
| if (r3 == 0) {
0x00033c98 beq 0x33d14 | goto label_4;
| }
0x00033c9c ldr r3, [sp, 0x24] | r3 = var_24h;
0x00033ca0 mov r2, r7 | r2 = r7;
0x00033ca4 ldr r1, [r3, 0x18] | r1 = *((r3 + 0x18));
0x00033ca8 add r0, sp, 0x108 | r0 += var_108h;
0x00033cac bl 0x34b38 | fcn_00034b38 (r0);
0x00033cb0 add r0, sp, 0x40 | r0 += var_40h;
0x00033cb4 bl 0x34cc4 | r0 = fcn_00034cc4 (r0);
0x00033cb8 cmp r0, 0 |
| if (r0 != 0) {
0x00033cbc beq 0x33cd0 |
0x00033cc0 ldr r2, [pc, 0x688] | r2 = "%s %d: ";
0x00033cc4 ldr r1, [pc, 0x688] | r1 = "isc_time_now((&oldest)) == 0";
0x00033cc8 ldr r0, [pc, 0x624] | r0 = "lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____";
0x00033ccc bl 0x32238 | fcn_00032238 ("lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____", "isc_time_now((&oldest)) == 0");
| }
0x00033cd0 add r7, sp, 0x40 | r7 += var_40h;
0x00033cd4 mov r2, r7 | r2 = r7;
0x00033cd8 add r1, sp, 0x108 | r1 += var_108h;
0x00033cdc mov r0, r7 | r0 = r7;
0x00033ce0 bl 0x3502c | r0 = fcn_0003502c (r0, r1);
0x00033ce4 cmp r0, 0 |
| if (r0 == 0) {
0x00033ce8 beq 0x33e6c | goto label_23;
| }
| label_2:
0x00033cec mov r0, r8 | r0 = r8;
0x00033cf0 bl 0x1261c | strlen (r0);
0x00033cf4 mov r3, 0 | r3 = 0;
0x00033cf8 mov r2, r3 | r2 = r3;
0x00033cfc add r1, r0, 0x15 | r1 = r0 + 0x15;
0x00033d00 mov sb, r0 | sb = r0;
0x00033d04 mov r0, r3 | r0 = r3;
0x00033d08 bl 0x2aa08 | r0 = fcn_0002aa08 (r0, r1);
0x00033d0c subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00033d10 bne 0x33f40 | goto label_24;
| }
| }
| label_4:
0x00033d14 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00033d18 ands sb, r3, 0x10 | sb = r3 & 0x10;
0x00033d1c and sl, r3, 1 | sl = r3 & 1;
| if (sb != r3) {
0x00033d20 beq 0x33d34 |
0x00033d24 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00033d28 ldr sb, [r2, 0x20] | sb = *((r2 + 0x20));
0x00033d2c adds sb, sb, 0 | sb += 0;
| if (sb != sb) {
0x00033d30 movne sb, 1 | sb = 1;
| goto label_25;
| }
| }
| label_25:
0x00033d34 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00033d38 lsr fp, r3, 2 |
0x00033d3c lsr r2, r3, 3 | r2 = r3 >> 3;
0x00033d40 lsr r3, r3, 1 | r3 >>= 1;
0x00033d44 and r2, r2, 1 | r2 &= 1;
0x00033d48 and r3, r3, 1 | r3 &= 1;
0x00033d4c cmp r0, 3 |
0x00033d50 and fp, fp, 1 |
0x00033d54 str r2, [sp, 0x34] | var_34h = r2;
0x00033d58 str r3, [sp, 0x38] | var_38h = r3;
| if (r0 == 3) {
0x00033d5c beq 0x33fa0 | goto label_26;
| }
0x00033d60 cmp r0, 4 |
| if (r0 == 4) {
0x00033d64 beq 0x341d0 | goto label_27;
| }
0x00033d68 cmp r0, 2 |
| if (r0 != 2) {
0x00033d6c bne 0x3402c | goto label_7;
| }
0x00033d70 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00033d74 cmp r3, 0 |
| if (r3 <= 0) {
0x00033d78 movgt r0, 7 | r0 = 7;
| }
| if (r3 <= 0) {
0x00033d7c bgt 0x33d94 |
0x00033d80 cmn r3, 5 |
| if (r3 < 5) {
0x00033d84 ldrge r3, [pc, 0x5cc] | r3 = "debug";
| }
| if (r3 < 5) {
0x00033d88 ldrge r2, [sp, 0x20] | r2 = var_20h;
| }
| if (r3 < 5) {
0x00033d8c subge r3, r3, r2, lsl 2 | r3 -= (r2 << 2);
| }
| if (r3 >= 5) {
0x00033d90 ldrge r0, [r3, 0x18] | r0 = *((r3 + 0x18));
| goto label_28;
| }
| }
| label_28:
0x00033d94 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00033d98 cmp sl, 0 |
0x00033d9c orr r0, r0, r3 | r0 |= r3;
| if (sl != 0) {
0x00033da0 moveq r2, r6 | r2 = r6;
| }
| if (sl != 0) {
0x00033da4 moveq r3, r6 | r3 = r6;
| }
| if (sl == 0) {
0x00033da8 addne r2, sp, 0x60 | r2 += var_60h;
| }
| if (sl == 0) {
0x00033dac ldrne r3, [pc, 0x5a8] | r3 = *((pc + 0x5a8));
| }
0x00033db0 cmp sb, 0 |
| if (sb == 0) {
0x00033db4 ldrne r1, [sp, 0x24] | r1 = var_24h;
| }
| if (sb != 0) {
0x00033db8 moveq r1, r6 | r1 = r6;
| }
| if (sb == 0) {
0x00033dbc ldrne r1, [r1, 0x20] | r1 = *((r1 + 0x20));
| }
| if (sb == 0) {
0x00033dc0 ldrne ip, [pc, 0x598] | ip = ":_";
| }
| if (sb != 0) {
0x00033dc4 moveq ip, r6 |
| }
0x00033dc8 cmp fp, 0 |
0x00033dcc ldr r7, [sp, 0x34] | r7 = var_34h;
| if (fp == 0) {
0x00033dd0 ldrne lr, [sp, 0x28] | lr = var_28h;
| }
| if (fp == 0) {
0x00033dd4 ldrne r4, [pc, 0x584] | r4 = ":_";
| }
| if (fp == 0) {
0x00033dd8 ldrne lr, [lr] |
| }
| if (fp != 0) {
0x00033ddc moveq lr, r6 | lr = r6;
| }
| if (fp != 0) {
0x00033de0 moveq r4, r6 | r4 = r6;
| }
0x00033de4 cmp r7, 0 |
| if (r7 == 0) {
0x00033de8 ldrne r7, [sp, 0x2c] | r7 = var_2ch;
| }
0x00033dec ldr sb, [sp, 0x38] | sb = var_38h;
| if (r7 == 0) {
0x00033df0 ldrne r7, [r7] | r7 = *(r7);
| }
| if (r7 == 0) {
0x00033df4 ldrne r8, [pc, 0x564] | r8 = ":_";
| }
| if (r7 != 0) {
0x00033df8 moveq r7, r6 | r7 = r6;
| }
| if (r7 != 0) {
0x00033dfc moveq r8, r6 | r8 = r6;
| }
0x00033e00 cmp sb, 0 |
| if (sb == 0) {
0x00033e04 addne sb, sp, 0x48 | sb += var_48h;
| }
| if (sb != 0) {
0x00033e08 moveq sb, r6 | sb = r6;
| }
0x00033e0c add sl, r5, 0x38 | sl = r5 + 0x38;
0x00033e10 stm sp, {r1, ip, lr} | *(sp) = r1;
| *((sp + 4)) = ip;
| *((sp + 8)) = lr;
0x00033e14 ldr r1, [pc, 0x548] | r1 = ":_";
0x00033e18 str sl, [sp, 0x1c] | var_1ch = sl;
0x00033e1c str sb, [sp, 0x18] | var_18h = sb;
0x00033e20 str r8, [sp, 0x14] | var_14h = r8;
0x00033e24 str r7, [sp, 0x10] | var_10h = r7;
0x00033e28 str r4, [sp, 0xc] | var_ch = r4;
0x00033e2c bl 0x12958 | syslog ();
0x00033e30 b 0x3402c | goto label_7;
| label_22:
0x00033e34 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00033e38 cmp r3, 0 |
| if (r3 <= 0) {
0x00033e3c strgt r3, [sp] | *(sp) = r3;
| }
| if (r3 <= 0) {
0x00033e40 ldrgt r3, [pc, 0x520] | r3 = *((pc + 0x520));
| }
0x00033e44 bgt 0x33c5c |
| } while (r3 > 0);
0x00033e48 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00033e4c mov r1, 0x18 | r1 = 0x18;
0x00033e50 rsb r2, r3, 0 | r2 = r3 - ;
0x00033e54 ldr r3, [pc, 0x4fc] |
0x00033e58 add r0, sp, 0x48 | r0 += var_48h;
0x00033e5c ldr r3, [r3, r2, lsl 2] | r3 = *(0x34354);
0x00033e60 ldr r2, [pc, 0x504] | r2 = *(0x34368);
0x00033e64 bl 0x2e74c | fcn_0002e74c ();
0x00033e68 b 0x33c6c | goto label_1;
| label_23:
0x00033e6c add sl, r5, 0x2000 | sl = r5 + 0x2000;
0x00033e70 ldr sb, [sl, 0x38] | sb = *((sl + 0x38));
| label_3:
0x00033e74 cmp sb, 0 |
| if (sb == 0) {
0x00033e78 beq 0x33cec | goto label_2;
| }
0x00033e7c mov r1, r7 | r1 = r7;
0x00033e80 add r0, sb, 4 | r0 = sb + 4;
0x00033e84 bl 0x34ea0 | r0 = fcn_00034ea0 (r0, r1);
0x00033e88 cmp r0, 0 |
| if (r0 >= 0) {
0x00033e8c bge 0x33efc | goto label_29;
| }
0x00033e90 ldr fp, [sb, 0x10] | fp = *((sb + 0x10));
0x00033e94 cmp fp, 0 |
| if (fp == 0) {
0x00033e98 ldrne r3, [sb, 0xc] | r3 = *((sb + 0xc));
| }
| if (fp == 0) {
0x00033e9c strne r3, [fp, 0xc] | *(arg_ch) = r3;
| }
| if (fp != 0) {
0x00033ea0 bne 0x33ec8 | goto label_30;
| }
0x00033ea4 ldr r3, [sl, 0x3c] | r3 = *((sl + 0x3c));
0x00033ea8 cmp r3, sb |
| if (r3 == sb) {
0x00033eac beq 0x33ec0 | goto label_31;
| }
0x00033eb0 ldr r3, [pc, 0x4b8] | r3 = *(0x3436c);
| do {
0x00033eb4 mov r2, 2 | r2 = 2;
0x00033eb8 ldr r1, [pc, 0x4b4] | r1 = "(lctx->essages).tail == (message)";
0x00033ebc b 0x33a0c | goto label_0;
| label_31:
0x00033ec0 ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x00033ec4 str r3, [sl, 0x3c] | *((sl + 0x3c)) = r3;
| label_30:
0x00033ec8 ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x00033ecc cmp r3, 0 |
| if (r3 == 0) {
0x00033ed0 strne fp, [r3, 0x10] | *((r3 + 0x10)) = fp;
| }
| if (r3 != 0) {
0x00033ed4 bne 0x33eec | goto label_32;
| }
0x00033ed8 ldr r3, [sl, 0x38] | r3 = *((sl + 0x38));
0x00033edc cmp r3, sb |
| if (r3 == sb) {
0x00033ee0 ldrne r3, [pc, 0x490] | r3 = "(lctx->essages).head == (message)";
| }
0x00033ee4 bne 0x33eb4 |
| } while (r3 != sb);
0x00033ee8 str fp, [sl, 0x38] | *((sl + 0x38)) = fp;
| label_32:
0x00033eec mov r0, sb | r0 = sb;
0x00033ef0 bl 0x12a54 | free (r0);
| do {
0x00033ef4 mov sb, fp | sb = fp;
0x00033ef8 b 0x33e74 | goto label_3;
| label_29:
0x00033efc ldr r1, [sb] | r1 = *(sb);
0x00033f00 mov r0, r8 | r0 = r8;
0x00033f04 bl 0x12a24 | r0 = strcmp (r0, r1);
0x00033f08 cmp r0, 0 |
| if (r0 == 0) {
0x00033f0c bne 0x33f38 |
0x00033f10 ldr r0, [sp, 0x30] | r0 = var_30h;
0x00033f14 bl 0x129f4 | r0 = pthread_mutex_unlock ();
0x00033f18 cmp r0, 0 |
| if (r0 != 0) {
0x00033f1c beq 0x33f30 |
0x00033f20 ldr r2, [pc, 0x454] | r2 = "(lctx->essages).head == (message)";
0x00033f24 ldr r1, [pc, 0x454] | r1 = "((pthread_mutex_unlock(((&lctx->lock))) == 0) ? 0 : 34) == 0";
| label_13:
0x00033f28 ldr r0, [pc, 0x3c4] | r0 = "lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____";
0x00033f2c bl 0x32238 | fcn_00032238 ("lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____", "((pthread_mutex_unlock(((&lctx->lock))) == 0) ? 0 : 34) == 0");
| }
| label_12:
0x00033f30 add sp, sp, 0x174 |
0x00033f34 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00033f38 ldr fp, [sb, 0x10] | fp = *((sb + 0x10));
0x00033f3c b 0x33ef4 |
| } while (1);
| label_24:
0x00033f40 add r0, r7, 0x14 | r0 = r7 + 0x14;
0x00033f44 mov sl, r7 | sl = r7;
0x00033f48 str r0, [sl], 4 | *(sl) = r0;
| sl += 4;
0x00033f4c add r2, sb, 1 | r2 = sb + 1;
0x00033f50 mov r1, r8 | r1 = r8;
0x00033f54 bl 0x1246c | strlcpy (r0, r1, r2);
0x00033f58 mov r0, sl | r0 = sl;
0x00033f5c bl 0x34cc4 | r0 = fcn_00034cc4 (r0);
0x00033f60 cmp r0, 0 |
| if (r0 != 0) {
0x00033f64 beq 0x33f78 |
0x00033f68 ldr r2, [pc, 0x414] | r2 = *(0x34380);
0x00033f6c ldr r1, [pc, 0x414] | r1 = "isc_time_now((&new->time)) == 0";
0x00033f70 ldr r0, [pc, 0x37c] | r0 = "lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____";
0x00033f74 bl 0x32238 | fcn_00032238 ("lctx____void__0______lctx______void__0_______const_isc__magic_t___lctx____magic_____L_____24___c_____16___t_____8___x_____", "isc_time_now((&new->time)) == 0");
| }
0x00033f78 add r3, r5, 0x2000 | r3 = r5 + 0x2000;
0x00033f7c ldr r2, [r3, 0x3c] | r2 = *((r3 + 0x3c));
0x00033f80 cmp r2, 0 |
| if (r2 == 0) {
0x00033f84 strne r7, [r2, 0x10] | *((r2 + 0x10)) = r7;
| }
| if (r2 != 0) {
0x00033f88 streq r7, [r3, 0x38] | *((r3 + 0x38)) = r7;
| }
0x00033f8c str r2, [r7, 0xc] | *((r7 + 0xc)) = r2;
0x00033f90 mov r2, 0 | r2 = 0;
0x00033f94 str r2, [r7, 0x10] | *((r7 + 0x10)) = r2;
0x00033f98 str r7, [r3, 0x3c] | *((r3 + 0x3c)) = r7;
0x00033f9c b 0x33d14 | goto label_4;
| label_26:
0x00033fa0 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00033fa4 cmp r3, 0 |
| if (r3 == 0) {
0x00033fa8 beq 0x33fcc | goto label_33;
| }
0x00033fac ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00033fb0 cmn r3, 2 |
0x00033fb4 beq 0x33ff4 |
| while (r3 == 2) {
| label_5:
0x00033fb8 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00033fbc bl 0x1276c | fclose (r0);
0x00033fc0 mov r3, 0 | r3 = 0;
0x00033fc4 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x00033fc8 str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
| label_33:
0x00033fcc ldr r7, [r4, 0x10] | r7 = *((r4 + 0x10));
0x00033fd0 cmp r7, 0 |
| if (r7 != 0) {
0x00033fd4 bne 0x341d0 | goto label_27;
| }
0x00033fd8 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00033fdc cmp r3, 3 |
| if (r3 == 3) {
0x00033fe0 beq 0x34038 | goto label_34;
| }
0x00033fe4 ldr r3, [pc, 0x3a0] | r3 = *(0x34388);
0x00033fe8 mov r2, r7 | r2 = r7;
0x00033fec ldr r1, [pc, 0x39c] | r1 = "channel->type == 3";
0x00033ff0 b 0x33a0c | goto label_0;
0x00033ff4 add r1, sp, 0xa0 | r1 += var_a0h;
0x00033ff8 ldr r0, [r4, 0x14] | r0 = *((r4 + 0x14));
0x00033ffc bl 0x1270c | r0 = stat64 ();
0x00034000 cmp r0, 0 |
| if (r0 == 0) {
0x00034004 beq 0x34018 | goto label_35;
| }
0x00034008 bl 0x12430 | r0 = errno_location ();
0x0003400c ldr r3, [r0] | r3 = *(r0);
0x00034010 cmp r3, 2 |
0x00034014 beq 0x33fb8 |
| }
| label_35:
0x00034018 ldrd r2, r3, [r4, 0x20] | __asm ("ldrd r2, r3, [r4, 0x20]");
0x0003401c ldrd r0, r1, [sp, 0xd0] | __asm ("ldrd r0, r1, [var_d0h]");
0x00034020 cmp r0, r2 |
0x00034024 sbcs r3, r1, r3 | __asm ("sbcs r3, r1, r3");
| if (r0 < r2) {
0x00034028 blt 0x33fb8 | goto label_5;
| }
| do {
| label_7:
0x0003402c mov r3, 1 | r3 = 1;
| label_11:
0x00034030 ldr r0, [sp, 0x3c] | r0 = var_3ch;
0x00034034 b 0x33b48 | goto label_6;
| label_34:
0x00034038 ldr r8, [r4, 0x14] | r8 = *((r4 + 0x14));
0x0003403c cmp r8, 0 |
| if (r8 != 0) {
0x00034040 beq 0x34050 |
0x00034044 ldrb r3, [r8] | r3 = *(r8);
0x00034048 cmp r3, 0 |
| if (r3 != 0) {
0x0003404c bne 0x34060 | goto label_36;
| }
| }
0x00034050 ldr r3, [pc, 0x33c] | r3 = *(0x34390);
0x00034054 mov r2, 0 | r2 = 0;
0x00034058 ldr r1, [pc, 0x338] | r1 = "path != ((void *)0) && *path != '\\0';
0x0003405c b 0x33a0c | goto label_0;
| label_36:
0x00034060 add r1, sp, 0x108 | r1 += var_108h;
0x00034064 mov r0, r8 | r0 = r8;
0x00034068 bl 0x1270c | r0 = stat64 ();
0x0003406c subs ip, r0, 0 |
| if (ip != r0) {
0x00034070 bne 0x34180 | goto label_37;
| }
0x00034074 ldr r7, [sp, 0x118] | r7 = var_118h;
0x00034078 ldrd r2, r3, [r4, 0x20] | __asm ("ldrd r2, r3, [r4, 0x20]");
0x0003407c and r7, r7, 0xf000 | r7 &= 0xf000;
0x00034080 sub r7, r7, 0x8000 | r7 -= 0x8000;
0x00034084 orrs r1, r2, r3 | r1 = r2 | r3;
0x00034088 clz r7, r7 | r7 &= r7;
0x0003408c lsr r7, r7, 5 | r7 >>= 5;
| if (r1 != r2) {
0x00034090 bne 0x34154 | goto label_38;
| }
0x00034094 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00034098 mov r0, ip | r0 = ip;
0x0003409c cmn r3, 2 |
| if (r3 == 2) {
0x000340a0 beq 0x34178 | goto label_9;
| }
| label_8:
0x000340a4 cmp r0, 0 |
| if (r0 != 0) {
0x000340a8 moveq r0, r7 | r0 = r7;
| }
| if (r0 == 0) {
0x000340ac movne r0, 0 | r0 = 0;
| }
0x000340b0 cmp r0, 0 |
| if (r0 == 0) {
0x000340b4 beq 0x341a4 | goto label_39;
| }
0x000340b8 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x000340bc cmn r3, 2 |
| if (r3 != 2) {
0x000340c0 moveq r7, 0x3a | r7 = 0x3a;
| }
| if (r3 != 2) {
0x000340c4 beq 0x3410c |
0x000340c8 mov r0, r4 | r0 = r4;
0x000340cc bl 0x324a0 | r0 = fcn_000324a0 (r0, r1, r2, r3);
0x000340d0 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x000340d4 beq 0x341a4 | goto label_39;
| }
0x000340d8 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000340dc tst r3, 0x8000 |
| if ((r3 & 0x8000) != 0) {
0x000340e0 bne 0x3410c | goto label_10;
| }
0x000340e4 ldr r8, [r4, 0x14] | r8 = *((r4 + 0x14));
0x000340e8 bl 0x347bc | fcn_000347bc (r0);
0x000340ec ldr r1, [pc, 0x2a8] | r1 = *(0x34398);
0x000340f0 mov r2, r8 | r2 = r8;
0x000340f4 mov r3, r0 | r3 = r0;
0x000340f8 mov r0, 3 | r0 = 3;
0x000340fc bl 0x12958 | syslog ();
0x00034100 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00034104 orr r3, r3, 0x8000 | r3 |= 0x8000;
0x00034108 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
| label_10:
0x0003410c cmp r7, 0 |
0x00034110 cmpne r7, 0x3a | __asm ("cmpne r7, 0x3a");
| if (r7 == 0) {
0x00034114 beq 0x341bc | goto label_40;
| }
0x00034118 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0003411c tst r3, 0x8000 |
0x00034120 bne 0x3402c |
| } while ((r3 & 0x8000) != 0);
0x00034124 mov r0, r7 | r0 = r7;
0x00034128 ldr r8, [r4, 0x14] | r8 = *((r4 + 0x14));
0x0003412c bl 0x347bc | fcn_000347bc (r0);
0x00034130 ldr r1, [pc, 0x268] | r1 = "isc_log_open:_roll_log__s_failed:__s";
0x00034134 mov r2, r8 | r2 = r8;
0x00034138 mov r3, r0 | r3 = r0;
0x0003413c mov r0, 3 | r0 = 3;
0x00034140 bl 0x12958 | syslog ();
0x00034144 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00034148 orr r3, r3, 0x8000 | r3 |= 0x8000;
0x0003414c str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x00034150 b 0x3402c | goto label_7;
| label_38:
0x00034154 cmp r2, 1 |
0x00034158 sbcs r1, r3, 0 | __asm ("sbcs r1, r3, 0");
| if (r2 < 1) {
0x0003415c blt 0x3419c | goto label_41;
| }
0x00034160 add r1, sp, 0x138 | r1 += var_138h;
0x00034164 ldrd r0, r1, [r1] | __asm ("ldrd r0, r1, [r1]");
0x00034168 cmp r0, r2 |
0x0003416c sbcs r3, r1, r3 | __asm ("sbcs r3, r1, r3");
0x00034170 mov r0, ip | r0 = ip;
| if (r0 >= r2) {
0x00034174 bge 0x340a4 | goto label_8;
| }
| do {
| label_9:
0x00034178 mov r7, r0 | r7 = r0;
0x0003417c b 0x340a4 | goto label_8;
| label_37:
0x00034180 bl 0x12430 | r0 = errno_location ();
0x00034184 ldr r3, [r0] | r3 = *(r0);
0x00034188 cmp r3, 2 |
| if (r3 != 2) {
0x0003418c moveq r0, r7 | r0 = r7;
| }
0x00034190 beq 0x34178 |
| } while (r3 == 2);
0x00034194 mov r0, 0x1e | r0 = 0x1e;
0x00034198 b 0x340a4 | goto label_8;
| label_41:
0x0003419c mov r0, ip | r0 = ip;
0x000341a0 b 0x34178 | goto label_9;
| label_39:
0x000341a4 add r2, r4, 0x10 | r2 = r4 + 0x10;
0x000341a8 ldr r1, [pc, 0x1f4] | r1 = "isc_log_open '%s' failed: %s";
0x000341ac mov r0, r8 | r0 = r8;
0x000341b0 bl 0x348d0 | r0 = fcn_000348d0 ();
0x000341b4 mov r7, r0 | r7 = r0;
0x000341b8 b 0x3410c | goto label_10;
| label_40:
0x000341bc cmp r7, 0 |
| if (r7 != 0) {
0x000341c0 bne 0x3402c | goto label_7;
| }
0x000341c4 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000341c8 bic r3, r3, 0x8000 | r3 = BIT_MASK (r3, 0x8000);
0x000341cc str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| label_27:
0x000341d0 cmp sl, 0 |
| if (sl == 0) {
0x000341d4 addne r2, sp, 0x60 | r2 += var_60h;
| }
| if (sl == 0) {
0x000341d8 ldrne r3, [pc, 0x17c] | r3 = *((pc + 0x17c));
| }
| if (sl != 0) {
0x000341dc moveq r2, r6 | r2 = r6;
| }
| if (sl != 0) {
0x000341e0 moveq r3, r6 | r3 = r6;
| }
0x000341e4 cmp sb, 0 |
| if (sb == 0) {
0x000341e8 ldrne r1, [sp, 0x24] | r1 = var_24h;
| }
| if (sb == 0) {
0x000341ec ldrne ip, [pc, 0x16c] | ip = ":_";
| }
| if (sb == 0) {
0x000341f0 ldrne r1, [r1, 0x20] | r1 = *((r1 + 0x20));
| }
| if (sb != 0) {
0x000341f4 moveq ip, r6 |
| }
| if (sb != 0) {
0x000341f8 moveq r1, r6 | r1 = r6;
| }
0x000341fc cmp fp, 0 |
0x00034200 ldr r8, [sp, 0x34] | r8 = var_34h;
| if (fp == 0) {
0x00034204 ldrne lr, [sp, 0x28] | lr = var_28h;
| }
| if (fp != 0) {
0x00034208 moveq lr, r6 | lr = r6;
| }
| if (fp == 0) {
0x0003420c ldrne lr, [lr] |
| }
| if (fp == 0) {
0x00034210 ldrne r7, [pc, 0x148] | r7 = ":_";
| }
| if (fp != 0) {
0x00034214 moveq r7, r6 | r7 = r6;
| }
0x00034218 cmp r8, 0 |
| if (r8 == 0) {
0x0003421c ldrne r8, [sp, 0x2c] | r8 = var_2ch;
| }
0x00034220 ldr sl, [sp, 0x38] | sl = var_38h;
| if (r8 == 0) {
0x00034224 ldrne r8, [r8] | r8 = *(r8);
| }
| if (r8 == 0) {
0x00034228 ldrne sb, [pc, 0x130] | sb = ":_";
| }
| if (r8 != 0) {
0x0003422c moveq r8, r6 | r8 = r6;
| }
| if (r8 != 0) {
0x00034230 moveq sb, r6 | sb = r6;
| }
0x00034234 cmp sl, 0 |
| if (sl == 0) {
0x00034238 addne sl, sp, 0x48 | sl += var_48h;
| }
| if (sl != 0) {
0x0003423c moveq sl, r6 | sl = r6;
| }
0x00034240 add fp, r5, 0x38 |
0x00034244 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00034248 stm sp, {r1, ip, lr} | *(sp) = r1;
| *((sp + 4)) = ip;
| *((sp + 8)) = lr;
0x0003424c ldr r1, [pc, 0x154] | r1 = *(0x343a4);
0x00034250 str fp, [sp, 0x1c] | var_1ch = fp;
0x00034254 str sl, [sp, 0x18] | var_18h = sl;
0x00034258 str sb, [sp, 0x14] | var_14h = sb;
0x0003425c str r8, [sp, 0x10] | var_10h = r8;
0x00034260 str r7, [sp, 0xc] | var_ch = r7;
0x00034264 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00034268 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0003426c bl 0x128a4 | fflush (r0);
0x00034270 ldrd r2, r3, [r4, 0x20] | __asm ("ldrd r2, r3, [r4, 0x20]");
0x00034274 cmp r2, 1 |
0x00034278 sbcs r3, r3, 0 | __asm ("sbcs r3, r3, 0");
| if (r2 < 1) {
0x0003427c blt 0x3402c | goto label_7;
| }
0x00034280 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00034284 cmp r3, 3 |
| if (r3 == 3) {
0x00034288 ldrne r3, [pc, 0xfc] | r3 = "channel->type == 3";
| }
| if (r3 == 3) {
0x0003428c movne r2, 2 | r2 = 2;
| }
| if (r3 != 3) {
0x00034290 ldrne r1, [pc, 0x114] | r1 = *(0x000343ac);
| goto label_42;
| }
| if (r3 != 3) {
| label_42:
0x00034294 bne 0x33a0c | goto label_0;
| }
0x00034298 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0003429c bl 0x127b4 | fileno (r0);
0x000342a0 add r1, sp, 0xa0 | r1 += var_a0h;
0x000342a4 bl 0x12520 | r0 = fstat64 ();
0x000342a8 cmp r0, 0 |
| if (r0 < 0) {
0x000342ac blt 0x3402c | goto label_7;
| }
0x000342b0 ldrd r2, r3, [sp, 0xd0] | __asm ("ldrd r2, r3, [var_d0h]");
0x000342b4 ldrd r0, r1, [r4, 0x20] | __asm ("ldrd r0, r1, [r4, 0x20]");
0x000342b8 cmp r0, r2 |
0x000342bc sbcs r3, r1, r3 | __asm ("sbcs r3, r1, r3");
| if (r0 >= r2) {
0x000342c0 movlt r3, 1 | r3 = 1;
| }
| if (r0 < r2) {
0x000342c4 strlt r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
| goto label_43;
| }
| if (r0 < r2) {
| label_43:
0x000342c8 blt 0x34030 | goto label_11;
| }
0x000342cc b 0x3402c | goto label_7;
| label_20:
0x000342d0 ldr r0, [sp, 0x30] | r0 = var_30h;
0x000342d4 bl 0x129f4 | r0 = pthread_mutex_unlock ();
0x000342d8 cmp r0, 0 |
| if (r0 == 0) {
0x000342dc beq 0x33f30 | goto label_12;
| }
0x000342e0 ldr r2, [pc, 0x94] | r2 = "(lctx->essages).head == (message)";
0x000342e4 ldr r1, [pc, 0xc4] | r1 = *(0x343ac);
0x000342e8 b 0x33f28 | goto label_13;
| }
[*] Function fprintf used 142 times ntpq