[*] Binary protection state of avahi-browse
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of avahi-browse
; 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/avahi-browse @ 0x11af8 */
| #include <stdint.h>
|
; (fcn) fcn.00011af8 () | void fcn_00011af8 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| r0 = arg1;
0x00011af8 push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} |
0x00011afc subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00011b00 bne 0x11b18 | goto label_1;
| }
0x00011b04 ldr r3, [pc, 0x100] | r3 = *(0x11c08);
0x00011b08 ldr r1, [pc, 0x100] | r1 = "browse_service_type";
0x00011b0c ldr r0, [pc, 0x100] | r0 = "avahi_browse.c";
0x00011b10 mov r2, 0x168 | r2 = 0x168;
| do {
| label_0:
0x00011b14 bl 0x110cc | assert ();
| label_1:
0x00011b18 ldr r4, [pc, 0xf8] | r4 = *(0x11c14);
0x00011b1c ldr r3, [r4, 0x14] | r3 = "stype";
0x00011b20 cmp r3, 0 |
| if (r3 != 0) {
0x00011b24 ldreq r3, [pc, 0xe0] | r3 = "browse_service_type";
| }
| if (r3 != 0) {
0x00011b28 ldreq r2, [pc, 0xec] | r2 = *(0x00011c1c);
| }
| if (r3 != 0) {
0x00011b2c ldreq r1, [pc, 0xdc] | r1 = "avahi_browse.c";
| }
| if (r3 != 0) {
0x00011b30 ldreq r0, [pc, 0xe8] | r0 = "client";
| }
0x00011b34 beq 0x11b14 |
| } while (r3 == 0);
0x00011b38 cmp r1, 0 |
0x00011b3c mov r6, r1 | r6 = r1;
| if (r1 == 0) {
0x00011b40 movne r7, r2 | r7 = r2;
| }
| if (r1 == 0) {
0x00011b44 ldrne r5, [r4, 0x18] | r5 = *((r4 + 0x18));
| }
| if (r1 != 0) {
0x00011b48 bne 0x11b78 | goto label_2;
| }
0x00011b4c ldr r3, [pc, 0xb8] | r3 = *(0x11c08);
0x00011b50 ldr r2, [pc, 0xcc] | r2 = "client";
0x00011b54 ldr r1, [pc, 0xb4] | r1 = "browse_service_type";
0x00011b58 ldr r0, [pc, 0xc8] | r0 = *(0x11c24);
0x00011b5c b 0x11b14 | goto label_0;
| do {
0x00011b60 add r1, r5, 8 | r1 = r5 + 8;
0x00011b64 mov r0, r6 | r0 = r6;
0x00011b68 bl 0x11060 | r0 = avahi_domain_equal ();
0x00011b6c cmp r0, 0 |
| if (r0 != 0) {
0x00011b70 bne 0x11c04 | goto label_3;
| }
0x00011b74 ldr r5, [r5] | r5 = *(r5);
| label_2:
0x00011b78 cmp r5, 0 |
0x00011b7c bne 0x11b60 |
| } while (r5 != 0);
0x00011b80 ldr r3, [pc, 0xa4] | r3 = "stype";
0x00011b84 mvn r2, 0 | r2 = ~0;
0x00011b88 str r3, [sp, 8] | var_8h = r3;
0x00011b8c str r8, [sp, 0xc] | var_ch = r8;
0x00011b90 str r5, [sp, 4] | var_4h = r5;
0x00011b94 str r7, [sp] | *(sp) = r7;
0x00011b98 mov r3, r6 | r3 = r6;
0x00011b9c mov r1, r2 | r1 = r2;
0x00011ba0 ldr r0, [r4, 0x14] | r0 = *((r4 + 0x14));
0x00011ba4 bl 0x10f28 | r0 = avahi_service_browser_new ();
0x00011ba8 cmp r0, 0 |
| if (r0 == 0) {
0x00011bac bne 0x11bdc |
0x00011bb0 ldr r3, [pc, 0x78] | r3 = *(0x11c2c);
0x00011bb4 ldr r0, [r4, 0x14] | r0 = *((r4 + 0x14));
0x00011bb8 ldr r5, [r3] | r5 = *(0x11c2c);
0x00011bbc bl 0x11120 | avahi_client_errno ();
0x00011bc0 bl 0x10f7c | avahi_strerror ();
0x00011bc4 ldr r1, [pc, 0x68] | r1 = stderr;
0x00011bc8 mov r2, r0 | r2 = r0;
0x00011bcc mov r0, r5 | r0 = r5;
0x00011bd0 bl 0x11018 | fprintf (r0, r1, r2)
0x00011bd4 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00011bd8 bl 0x10fa0 | avahi_simple_poll_quit ();
| }
0x00011bdc mov r1, r6 | r1 = r6;
0x00011be0 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x00011be4 bl 0x11114 | avahi_string_list_add ();
0x00011be8 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00011bec add r3, r3, 1 | r3++;
0x00011bf0 str r3, [r4, 4] | *((r4 + 4)) = r3;
0x00011bf4 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00011bf8 add r3, r3, 1 | r3++;
0x00011bfc str r3, [r4, 8] | *((r4 + 8)) = r3;
0x00011c00 str r0, [r4, 0x18] | *((r4 + 0x18)) = r0;
| label_3:
0x00011c04 add sp, sp, 0x10 |
0x00011c08 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/avahi-browse @ 0x12840 */
| #include <stdint.h>
|
; (fcn) fcn.00012840 () | void fcn_00012840 (int32_t arg1) {
| 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;
| r0 = arg1;
0x00012840 push {r4, r5, r6, r7, r8, lr} |
0x00012844 subs r8, r0, 0 | r8 = r0 - 0;
0x00012848 sub sp, sp, 0x20 |
| if (r8 != r0) {
0x0001284c bne 0x12864 | goto label_3;
| }
0x00012850 ldr r3, [pc, 0x180] | r3 = *(0x129d4);
0x00012854 ldr r1, [pc, 0x180] | r1 = "sigint_install";
0x00012858 ldr r0, [pc, 0x180] | r0 = "sigint.c";
0x0001285c mov r2, 0x56 | r2 = 0x56;
| do {
| label_0:
0x00012860 bl 0x110cc | assert ();
| label_3:
0x00012864 ldr r5, [pc, 0x178] | r5 = "spoll";
0x00012868 ldr r4, [r5] | r4 = "spoll";
0x0001286c cmp r4, 0 |
| if (r4 == 0) {
0x00012870 ldrne r3, [pc, 0x160] | r3 = "sigint_install";
| }
| if (r4 == 0) {
0x00012874 movne r2, 0x57 | r2 = 0x57;
| }
| if (r4 == 0) {
0x00012878 ldrne r1, [pc, 0x15c] | r1 = "sigint.c";
| }
| if (r4 == 0) {
0x0001287c ldrne r0, [pc, 0x164] | r0 = "!simple_poll";
| }
0x00012880 bne 0x12860 |
| } while (r4 != 0);
0x00012884 ldr r6, [pc, 0x160] | r6 = "!simple_poll";
0x00012888 ldr r3, [r6] | r3 = "!simple_poll";
0x0001288c cmn r3, 1 |
| if (r3 == 1) {
0x00012890 bne 0x128a0 |
0x00012894 ldr r7, [r6, 4] | r7 = *((r6 + 4));
0x00012898 cmn r7, 1 |
| if (r7 == 1) {
0x0001289c beq 0x128b4 | goto label_4;
| }
| }
0x000128a0 ldr r3, [pc, 0x130] | r3 = *(0x129d4);
0x000128a4 mov r2, 0x58 | r2 = 0x58;
0x000128a8 ldr r1, [pc, 0x12c] | r1 = "sigint_install";
0x000128ac ldr r0, [pc, 0x13c] | r0 = *(0x129ec);
0x000128b0 b 0x12860 | goto label_0;
| label_4:
0x000128b4 mov r0, r6 | r0 = r6;
0x000128b8 bl 0x10f34 | r0 = pipe ();
0x000128bc cmp r0, 0 |
| if (r0 >= 0) {
0x000128c0 bge 0x128f4 | goto label_5;
| }
0x000128c4 ldr r3, [pc, 0x128] | r3 = "pipe_fds[0] == -1 && pipe_fds[1] == -1";
0x000128c8 ldr r4, [r3] | r4 = "pipe_fds[0] == -1 && pipe_fds[1] == -1";
0x000128cc bl 0x110b4 | r0 = errno_location ();
0x000128d0 ldr r0, [r0] | r0 = *(r0);
0x000128d4 bl 0x11108 | strerror (r0);
0x000128d8 ldr r1, [pc, 0x118] | r1 = stderr;
0x000128dc mov r2, r0 | r2 = r0;
0x000128e0 mov r0, r4 | r0 = r4;
0x000128e4 bl 0x11018 | fprintf (r0, r1, r2)
| do {
| label_2:
0x000128e8 mov r0, r7 | r0 = r7;
0x000128ec add sp, sp, 0x20 |
0x000128f0 pop {r4, r5, r6, r7, r8, pc} |
| label_5:
0x000128f4 ldr r0, [r6] | r0 = *(r6);
0x000128f8 bl 0x127d8 | fcn_000127d8 (r0);
0x000128fc ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x00012900 bl 0x127d8 | fcn_000127d8 (r0);
0x00012904 ldr r3, [pc, 0xf0] | r3 = "pipe___failed:__s";
0x00012908 add r2, r5, 4 | r2 = r5 + 4;
0x0001290c str r3, [sp, 0xc] | var_ch = r3;
0x00012910 add r1, sp, 0xc | r1 += var_ch;
0x00012914 mov r3, 0x10000000 | r3 = 0x10000000;
0x00012918 mov r0, 2 | r0 = 2;
0x0001291c str r4, [sp, 0x14] | var_14h = r4;
0x00012920 str r4, [sp, 0x18] | var_18h = r4;
0x00012924 str r4, [sp, 0x1c] | var_1ch = r4;
0x00012928 str r3, [sp, 0x10] | var_10h = r3;
0x0001292c bl 0x11138 | r0 = sigaction ();
0x00012930 cmp r0, 0 |
| if (r0 >= 0) {
0x00012934 bge 0x12964 | goto label_6;
| }
| label_1:
0x00012938 ldr r3, [pc, 0xb4] | r3 = "pipe_fds[0] == -1 && pipe_fds[1] == -1";
0x0001293c ldr r4, [r3] | r4 = "pipe_fds[0] == -1 && pipe_fds[1] == -1";
0x00012940 bl 0x110b4 | r0 = errno_location ();
0x00012944 ldr r0, [r0] | r0 = *(r0);
0x00012948 bl 0x11108 | strerror (r0);
0x0001294c ldr r1, [pc, 0xac] | r1 = *(0x129fc);
0x00012950 mov r2, r0 | r2 = r0;
0x00012954 mov r0, r4 | r0 = r4;
0x00012958 bl 0x11018 | r0 = fprintf (r0, r1, r2)
0x0001295c bl 0x1279c | fcn_0001279c ();
0x00012960 b 0x128e8 |
| } while (1);
| label_6:
0x00012964 add r2, r5, 0x18 | r2 = r5 + 0x18;
0x00012968 add r1, sp, 0xc | r1 += var_ch;
0x0001296c mov r0, 0xf | r0 = 0xf;
0x00012970 bl 0x11138 | r0 = sigaction ();
0x00012974 cmp r0, 0 |
| if (r0 < 0) {
0x00012978 bge 0x12990 |
0x0001297c mov r2, r4 | r2 = r4;
0x00012980 add r1, r5, 4 | r1 = r5 + 4;
0x00012984 mov r0, 2 | r0 = 2;
0x00012988 bl 0x11138 | sigaction ();
0x0001298c b 0x12938 | goto label_1;
| }
0x00012990 mov r0, r8 | r0 = r8;
0x00012994 bl 0x11048 | avahi_simple_poll_get ();
0x00012998 str r4, [sp] | *(sp) = r4;
0x0001299c ldr r3, [pc, 0x60] | r3 = "sigaction() failed: %s\n";
0x000129a0 mov r2, 1 | r2 = 1;
0x000129a4 ldr r1, [r6] | r1 = *(r6);
0x000129a8 ldr r7, [r0, 4] | r7 = *((r0 + 4));
0x000129ac blx r7 | r0 = uint32_t (*r7)(uint32_t, uint32_t, char*) (r1, r2, "sigaction() failed: %s\n");
0x000129b0 cmp r0, 0 |
0x000129b4 str r0, [r5, 0x2c] | *((r5 + 0x2c)) = r0;
| if (r0 == 0) {
0x000129b8 strne r8, [r5] | *(r5) = r8;
| }
| if (r0 != 0) {
0x000129bc movne r7, r4 | r7 = r4;
| goto label_7;
| }
| if (r0 != 0) {
| label_7:
0x000129c0 bne 0x128e8 | goto label_2;
| }
0x000129c4 ldr r3, [pc, 0xc] | r3 = *(0x129d4);
0x000129c8 mov r2, 0x75 | r2 = 0x75;
0x000129cc ldr r1, [pc, 8] | r1 = "sigint.c";
0x000129d0 ldr r0, [pc, 0x30] | r0 = *(0x12a04);
0x000129d4 b 0x12860 | 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/avahi-browse @ 0x11174 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main (int32_t argc, char ** argv) {
| 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;
| r0 = argc;
| r1 = argv;
| /* [10] -r-x section size 6452 named .text */
0x00011174 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00011178 ldr r5, [pc, 0x3b8] | r5 = *(0x11534);
0x0001117c sub sp, sp, 0x38 |
0x00011180 mov r7, r1 | r7 = r1;
0x00011184 mov r6, r0 | r6 = r0;
0x00011188 bl 0x10ff4 | avahi_init_i18n ();
0x0001118c ldr r1, [pc, 0x3a8] | r1 = *(0x11538);
0x00011190 mov r0, 6 | r0 = 6;
0x00011194 bl 0x11054 | setlocale (r0, r1);
0x00011198 ldr r4, [r7] | r4 = *(r7);
0x0001119c mov r1, 0x2f | r1 = 0x2f;
0x000111a0 mov r0, r4 | r0 = r4;
0x000111a4 bl 0x10f70 | r0 = strrchr (r0, r1);
0x000111a8 cmp r0, 0 |
| if (r0 == 0) {
0x000111ac addne r4, r0, 1 | r4 = r0 + 1;
| }
0x000111b0 ldr r0, [pc, 0x388] | r0 = *(0x1153c);
0x000111b4 bl 0x1112c | r0 = getenv (r0);
0x000111b8 cmp r0, 0 |
| if (r0 != 0) {
0x000111bc beq 0x111c8 |
0x000111c0 bl 0x110e4 | atoi (r0);
0x000111c4 str r0, [r5] | *(r5) = r0;
| }
0x000111c8 ldr r3, [r5] | r3 = *(r5);
0x000111cc ldr r1, [pc, 0x370] | r1 = "COLUMNS";
0x000111d0 cmp r3, 0x27 |
| if (r3 > 0x27) {
0x000111d4 movle r3, 0x28 | r3 = 0x28;
| }
0x000111d8 mov r0, r4 | r0 = r4;
| if (r3 > 0x27) {
0x000111dc strle r3, [r5] | *(r5) = r3;
| }
0x000111e0 bl 0x10f94 | strstr (r0, r1);
0x000111e4 ldr r8, [pc, 0x35c] | r8 = "domain";
0x000111e8 ldr r5, [pc, 0x35c] | r5 = "help";
0x000111ec ldr sb, [pc, 0x35c] | sb = obj.optarg;
0x000111f0 cmp r0, 0 |
| if (r0 != 0) {
0x000111f4 moveq r3, 2 | r3 = 2;
| }
| if (r0 == 0) {
0x000111f8 movne r3, 4 | r3 = 4;
| }
0x000111fc str r3, [sp, 0x28] | var_28h = r3;
0x00011200 mov r3, 0 | r3 = 0;
0x00011204 str r3, [sp, 0x34] | var_34h = r3;
0x00011208 str r3, [sp, 0x30] | var_30h = r3;
0x0001120c str r3, [sp, 0x2c] | var_2ch = r3;
0x00011210 str r3, [sp, 0x24] | var_24h = r3;
0x00011214 str r3, [sp, 0x14] | var_14h = r3;
0x00011218 str r3, [sp, 0x18] | var_18h = r3;
0x0001121c str r3, [sp, 0x10] | var_10h = r3;
0x00011220 str r3, [sp, 0x20] | var_20h = r3;
0x00011224 str r3, [sp, 0x1c] | var_1ch = r3;
| label_0:
0x00011228 mov sl, 0 | sl = 0;
0x0001122c str sl, [sp] | *(sp) = sl;
0x00011230 mov r3, r8 | r3 = r8;
0x00011234 mov r2, r5 | r2 = r5;
0x00011238 mov r1, r7 | r1 = r7;
0x0001123c mov r0, r6 | r0 = r6;
0x00011240 bl 0x1115c | r0 = getopt_long ();
0x00011244 cmp r0, 0 |
| if (r0 < 0) {
0x00011248 bge 0x1127c |
0x0001124c ldr r3, [sp, 0x28] | r3 = var_28h;
0x00011250 ldr r5, [pc, 0x2fc] | r5 = optarg;
0x00011254 cmp r3, 2 |
| if (r3 != 2) {
0x00011258 bne 0x11390 | goto label_5;
| }
0x0001125c ldr r3, [r5] | r3 = *(r5);
0x00011260 cmp r6, r3 |
| if (r6 > r3) {
0x00011264 bgt 0x11378 | goto label_6;
| }
0x00011268 ldr r3, [pc, 0x2e8] | r3 = optind;
0x0001126c ldr r0, [pc, 0x2e8] | r0 = stderr;
0x00011270 ldr r1, [r3] | r1 = optind;
| label_3:
0x00011274 bl 0x110c0 | fputs (r0, r1);
0x00011278 b 0x112a4 |
| } else {
0x0001127c cmp r0, 0x66 |
| if (r0 == 0x66) {
0x00011280 beq 0x11360 | goto label_7;
| }
| if (r0 > 0x66) {
0x00011284 bgt 0x112d4 | goto label_8;
| }
0x00011288 cmp r0, 0x61 |
| if (r0 == 0x61) {
0x0001128c beq 0x11334 | goto label_9;
| }
| if (r0 > 0x61) {
0x00011290 bgt 0x112ac | goto label_10;
| }
0x00011294 cmp r0, 0x44 |
| if (r0 == 0x44) {
0x00011298 beq 0x1133c | goto label_11;
| }
0x0001129c cmp r0, 0x56 |
| if (r0 == 0x56) {
0x000112a0 beq 0x11328 | goto label_12;
| }
| }
| do {
| label_1:
0x000112a4 mov r4, 1 | r4 = 1;
0x000112a8 b 0x11410 | goto label_13;
| label_10:
0x000112ac cmp r0, 0x63 |
| if (r0 == 0x63) {
0x000112b0 beq 0x11354 | goto label_14;
| }
0x000112b4 cmp r0, 0x64 |
0x000112b8 bne 0x112a4 |
| } while (r0 != 0x64);
0x000112bc ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x000112c0 bl 0x10f4c | avahi_free ();
0x000112c4 ldr r0, [sb] | r0 = *(sb);
0x000112c8 bl 0x110f0 | avahi_strdup ();
0x000112cc str r0, [sp, 0x1c] | var_1ch = r0;
0x000112d0 b 0x11228 | goto label_0;
| label_8:
0x000112d4 cmp r0, 0x70 |
| if (r0 == 0x70) {
0x000112d8 beq 0x1136c | goto label_15;
| }
| if (r0 > 0x70) {
0x000112dc bgt 0x112fc | goto label_16;
| }
0x000112e0 cmp r0, 0x68 |
| if (r0 == 0x68) {
0x000112e4 beq 0x11320 | goto label_17;
| }
0x000112e8 cmp r0, 0x6c |
| if (r0 != 0x6c) {
0x000112ec bne 0x112a4 | goto label_1;
| }
0x000112f0 mov r3, 1 | r3 = 1;
0x000112f4 str r3, [sp, 0x24] | var_24h = r3;
0x000112f8 b 0x11228 | goto label_0;
| label_16:
0x000112fc cmp r0, 0x74 |
0x00011300 mov r3, 1 | r3 = 1;
| if (r0 == 0x74) {
0x00011304 beq 0x1134c | goto label_18;
| }
0x00011308 cmp r0, 0x76 |
| if (r0 == 0x76) {
0x0001130c beq 0x11344 | goto label_19;
| }
0x00011310 cmp r0, 0x72 |
| if (r0 != 0x72) {
0x00011314 bne 0x112a4 | goto label_1;
| }
0x00011318 str r3, [sp, 0x2c] | var_2ch = r3;
0x0001131c b 0x11228 | goto label_0;
| label_17:
0x00011320 str sl, [sp, 0x28] | var_28h = sl;
0x00011324 b 0x11228 | goto label_0;
| label_12:
0x00011328 mov r3, 1 | r3 = 1;
| do {
| label_2:
0x0001132c str r3, [sp, 0x28] | var_28h = r3;
0x00011330 b 0x11228 | goto label_0;
| label_9:
0x00011334 mov r3, 3 | r3 = 3;
0x00011338 b 0x1132c |
| } while (1);
| label_11:
0x0001133c mov r3, 4 | r3 = 4;
0x00011340 b 0x1132c | goto label_2;
| label_19:
0x00011344 str r3, [sp, 0x10] | var_10h = r3;
0x00011348 b 0x11228 | goto label_0;
| label_18:
0x0001134c str r3, [sp, 0x14] | var_14h = r3;
0x00011350 b 0x11228 | goto label_0;
| label_14:
0x00011354 mov r3, 1 | r3 = 1;
0x00011358 str r3, [sp, 0x18] | var_18h = r3;
0x0001135c b 0x11228 | goto label_0;
| label_7:
0x00011360 mov r3, 1 | r3 = 1;
0x00011364 str r3, [sp, 0x30] | var_30h = r3;
0x00011368 b 0x11228 | goto label_0;
| label_15:
0x0001136c mov r3, 1 | r3 = 1;
0x00011370 str r3, [sp, 0x34] | var_34h = r3;
0x00011374 b 0x11228 | goto label_0;
| label_6:
0x00011378 ldr r0, [r7, r3, lsl 2] | offset_0 = r3 << 2;
| r0 = *((r7 + offset_0));
0x0001137c bl 0x110f0 | avahi_strdup ();
0x00011380 ldr r3, [r5] | r3 = *(r5);
0x00011384 add r3, r3, 1 | r3++;
0x00011388 str r3, [r5] | *(r5) = r3;
0x0001138c str r0, [sp, 0x20] | var_20h = r0;
| label_5:
0x00011390 ldr r3, [r5] | r3 = *(r5);
0x00011394 cmp r6, r3 |
| if (r6 <= r3) {
0x00011398 ldrgt r3, [pc, 0x1b8] | r3 = obj.stderr;
| }
| if (r6 <= r3) {
0x0001139c ldrgt r0, [pc, 0x1bc] | r0 = "Too many arguments\n";
| }
| if (r6 > r3) {
0x000113a0 ldrgt r1, [r3] | r1 = *(r3);
| goto label_20;
| }
| if (r6 > r3) {
| label_20:
0x000113a4 bgt 0x11274 | goto label_3;
| }
0x000113a8 ldr r3, [sp, 0x28] | r3 = var_28h;
0x000113ac cmp r3, 4 |
| if (r3 > 4) {
| /* switch table (5 cases) at 0x113b8 */
0x000113b0 ldrls pc, [pc, r3, lsl 2] | offset_1 = r3 << 2;
| pc = *((pc + offset_1));
| }
0x000113b4 b 0x112a4 | goto label_1;
0x000113cc ldr r3, [pc, 0x190] | r3 = "Too many arguments\n";
0x000113d0 ldr r1, [pc, 0x16c] | r1 = "COLUMNS";
0x000113d4 mov r0, r4 | r0 = r4;
0x000113d8 ldr r5, [r3] | r5 = "Too many arguments\n";
0x000113dc bl 0x10f94 | r0 = strstr (r0, r1);
0x000113e0 cmp r0, 0 |
| if (r0 == 0) {
0x000113e4 beq 0x1141c | goto label_21;
| }
0x000113e8 mov r2, r4 | r2 = r4;
0x000113ec ldr r1, [pc, 0x174] | r1 = stdout;
0x000113f0 mov r0, r5 | r0 = r5;
0x000113f4 bl 0x11018 | fprintf (r0, r1, r2)
| do {
0x000113f8 ldr r3, [pc, 0x13c] | r3 = *(0x11538);
0x000113fc ldr r2, [pc, 0x168] | r2 = "_s__options__";
0x00011400 ldr r1, [pc, 0x168] | r1 = "_h___help____________Show_this_help_____V___version_________Show_version_____D___browse_domains__Browse_for_browsing_domains_instead_of_services_____a___all_____________Show_all_services__regardless_of_the_type_____d___domainDOMAIN___The_domain_t";
0x00011404 mov r0, r5 | r0 = r5;
0x00011408 bl 0x11018 | fprintf (r0, "_h___help____________Show_this_help_____V___version_________Show_version_____D___browse_domains__Browse_for_browsing_domains_instead_of_services_____a___all_____________Show_all_services__regardless_of_the_type_____d___domainDOMAIN___The_domain_t", "_s__options__", r3)
| label_4:
0x0001140c mov r4, 0 | r4 = 0;
| label_13:
0x00011410 ldr r5, [pc, 0x15c] | r5 = "_s_s";
0x00011414 mov r6, r5 | r6 = r5;
0x00011418 b 0x114e4 | goto label_22;
| label_21:
0x0001141c str r4, [sp] | *(sp) = r4;
0x00011420 mov r3, r4 | r3 = r4;
0x00011424 mov r2, r4 | r2 = r4;
0x00011428 ldr r1, [pc, 0x148] | r1 = *(0x11574);
0x0001142c mov r0, r5 | r0 = r5;
0x00011430 bl 0x11018 | fprintf (r0, r1, r2, r3, r4)
0x00011434 b 0x113f8 |
| } while (1);
0x00011438 mov r1, r4 | r1 = r4;
0x0001143c ldr r0, [pc, 0x138] | r0 = "_s__options___service_type__s__options___a_s__options___D";
0x00011440 bl 0x10fe8 | printf ("_s__options___service_type__s__options___a_s__options___D", r1);
0x00011444 b 0x1140c | goto label_4;
0x00011448 bl 0x10fb8 | avahi_simple_poll_new ();
0x0001144c ldr r4, [pc, 0x120] | r4 = "_s_s";
0x00011450 cmp r0, 0 |
0x00011454 str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
| if (r0 != 0) {
0x00011458 ldreq r3, [pc, 0xf8] | r3 = obj.stderr;
| }
| if (r0 != 0) {
0x0001145c ldreq r0, [pc, 0x11c] | r0 = "Failed to create simple poll object.\n";
| }
| if (r0 == 0) {
0x00011460 ldreq r1, [r3] | r1 = *(r3);
| goto label_23;
| }
| if (r0 == 0) {
| label_23:
0x00011464 beq 0x11274 | goto label_3;
| }
0x00011468 bl 0x12840 | r0 = fcn_00012840 (r0);
0x0001146c cmp r0, 0 |
| if (r0 < 0) {
0x00011470 blt 0x112a4 | goto label_1;
| }
0x00011474 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00011478 bl 0x11048 | avahi_simple_poll_get ();
0x0001147c ldr r3, [sp, 0x30] | r3 = var_30h;
0x00011480 ldr r2, [pc, 0xfc] | r2 = "Failed to create simple poll object.\n";
0x00011484 cmp r3, 0 |
0x00011488 add r3, sp, 0xc | r3 += var_ch;
0x0001148c str r3, [sp] | *(sp) = r3;
| if (r3 == 0) {
0x00011490 movne r1, 2 | r1 = 2;
| }
| if (r3 != 0) {
0x00011494 moveq r1, 0 | r1 = 0;
| }
0x00011498 add r3, sp, 0x10 | r3 += var_10h;
0x0001149c bl 0x10fd0 | r0 = avahi_client_new ();
0x000114a0 cmp r0, 0 |
0x000114a4 str r0, [r4, 0x14] | *((r4 + 0x14)) = r0;
| if (r0 == 0) {
0x000114a8 bne 0x114d0 |
0x000114ac ldr r3, [pc, 0xa4] | r3 = optind;
0x000114b0 ldr r0, [sp, 0xc] | r0 = var_ch;
0x000114b4 ldr r4, [r3] | r4 = optind;
0x000114b8 bl 0x10f7c | avahi_strerror ();
0x000114bc ldr r1, [pc, 0xc4] | r1 = *(0x11584);
0x000114c0 mov r2, r0 | r2 = r0;
0x000114c4 mov r0, r4 | r0 = r4;
0x000114c8 bl 0x11018 | fprintf (r0, r1, r2)
0x000114cc b 0x112a4 | goto label_1;
| }
0x000114d0 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x000114d4 bl 0x11150 | avahi_simple_poll_loop ();
0x000114d8 b 0x1140c | goto label_4;
| do {
0x000114dc add r0, sp, 0x10 | r0 += var_10h;
0x000114e0 bl 0x116a4 | fcn_000116a4 (r0, r1);
| label_22:
0x000114e4 ldr r1, [r5] | r1 = *(r5);
0x000114e8 cmp r1, 0 |
0x000114ec bne 0x114dc |
| } while (r1 != 0);
0x000114f0 ldr r0, [r5, 0x14] | r0 = *((r5 + 0x14));
0x000114f4 cmp r0, 0 |
| if (r0 != 0) {
0x000114f8 beq 0x11500 |
0x000114fc bl 0x10f1c | avahi_client_free ();
| }
0x00011500 bl 0x12a0c | fcn_00012a0c ();
0x00011504 ldr r0, [r6, 0x10] | r0 = *((r6 + 0x10));
0x00011508 cmp r0, 0 |
| if (r0 != 0) {
0x0001150c beq 0x11514 |
0x00011510 bl 0x11078 | avahi_simple_poll_free ();
| }
0x00011514 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00011518 bl 0x10f4c | avahi_free ();
0x0001151c ldr r0, [sp, 0x20] | r0 = var_20h;
0x00011520 bl 0x10f4c | avahi_free ();
0x00011524 ldr r0, [r6, 0x18] | r0 = *((r6 + 0x18));
0x00011528 bl 0x110a8 | avahi_string_list_free ();
0x0001152c mov r0, r4 | r0 = r4;
0x00011530 add sp, sp, 0x38 |
0x00011534 pop {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
[*] Function fprintf used 8 times avahi-browse