[*] Binary protection state of avahi-publish
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of avahi-publish
; 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-publish @ 0x116d4 */
| #include <stdint.h>
|
; (fcn) fcn.000116d4 () | void fcn_000116d4 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_1ch;
| r0 = arg1;
0x000116d4 push {r4, r5, r6, r7, lr} |
0x000116d8 subs r4, r0, 0 | r4 = r0 - 0;
0x000116dc sub sp, sp, 0x1c |
| if (r4 != r0) {
0x000116e0 bne 0x116f8 | goto label_5;
| }
0x000116e4 ldr r3, [pc, 0x1fc] | r3 = *(0x118e4);
0x000116e8 ldr r1, [pc, 0x1fc] | r1 = "register_stuff";
0x000116ec ldr r0, [pc, 0x1fc] | r0 = "avahi_publish.c";
0x000116f0 mov r2, 0x6e | r2 = 0x6e;
| do {
| label_1:
0x000116f4 bl 0x10fa4 | assert ();
| label_5:
0x000116f8 ldr r6, [pc, 0x1f4] | r6 = "config";
0x000116fc ldr r3, [r6] | r3 = "config";
0x00011700 mov r5, r6 | r5 = r6;
0x00011704 cmp r3, 0 |
| if (r3 == 0) {
0x00011708 bne 0x11754 |
0x0001170c mov r2, r4 | r2 = r4;
0x00011710 ldr r1, [pc, 0x1e0] | r1 = *(0x118f4);
0x00011714 ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x00011718 bl 0x10fd4 | r0 = avahi_entry_group_new ();
0x0001171c cmp r0, 0 |
0x00011720 str r0, [r6] | *(r6) = r0;
| if (r0 != 0) {
0x00011724 bne 0x11754 | goto label_6;
| }
0x00011728 ldr r3, [pc, 0x1cc] | r3 = *(0x118f8);
0x0001172c ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x00011730 ldr r4, [r3] | r4 = *(0x118f8);
0x00011734 bl 0x10ff8 | avahi_client_errno ();
0x00011738 bl 0x10e78 | avahi_strerror ();
0x0001173c ldr r1, [pc, 0x1bc] | r1 = stderr;
0x00011740 mov r2, r0 | r2 = r0;
| label_0:
0x00011744 mov r0, r4 | r0 = r4;
0x00011748 bl 0x10f08 | fprintf (r0, r1, r2)
| label_4:
0x0001174c mvn r0, 0 | r0 = ~0;
0x00011750 b 0x117c4 | goto label_7;
| }
| label_6:
0x00011754 ldr r0, [r5] | r0 = *(r5);
0x00011758 bl 0x10f8c | r0 = avahi_entry_group_is_empty ();
0x0001175c cmp r0, 0 |
| if (r0 != 0) {
0x00011760 ldreq r3, [pc, 0x180] | r3 = "register_stuff";
| }
| if (r0 != 0) {
0x00011764 moveq r2, 0x77 | r2 = 0x77;
| }
| if (r0 != 0) {
0x00011768 ldreq r1, [pc, 0x17c] | r1 = "avahi_publish.c";
| }
| if (r0 != 0) {
0x0001176c ldreq r0, [pc, 0x190] | r0 = "avahi_entry_group_is_empty(entry_group)";
| }
0x00011770 beq 0x116f4 |
| } while (r0 == 0);
0x00011774 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00011778 cmp r3, 4 |
| if (r3 == 4) {
0x0001177c bne 0x117ec |
0x00011780 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00011784 mvn r2, 0 | r2 = ~0;
0x00011788 cmp r3, 0 |
0x0001178c add r3, r4, 0x2c | r3 = r4 + 0x2c;
0x00011790 str r3, [sp, 4] | var_4h = r3;
0x00011794 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00011798 mov r1, r2 | r1 = r2;
0x0001179c str r3, [sp] | *(sp) = r3;
| if (r3 == 0) {
0x000117a0 movne r3, 0x10 | r3 = 0x10;
| }
| if (r3 != 0) {
0x000117a4 moveq r3, 0 | r3 = 0;
| }
0x000117a8 ldr r0, [r5] | r0 = *(r5);
0x000117ac bl 0x10ef0 | r0 = avahi_entry_group_add_address ();
0x000117b0 cmp r0, 0 |
| if (r0 >= 0) {
0x000117b4 blt 0x117cc |
| label_2:
0x000117b8 ldr r0, [r5] | r0 = *(r5);
0x000117bc bl 0x10e90 | avahi_entry_group_commit ();
0x000117c0 mov r0, 0 | r0 = 0;
| label_7:
0x000117c4 add sp, sp, 0x1c |
0x000117c8 pop {r4, r5, r6, r7, pc} |
| }
0x000117cc ldr r3, [pc, 0x128] | r3 = *(0x118f8);
0x000117d0 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x000117d4 ldr r4, [r3] | r4 = *(0x118f8);
0x000117d8 bl 0x10ff8 | avahi_client_errno ();
0x000117dc bl 0x10e78 | avahi_strerror ();
0x000117e0 ldr r1, [pc, 0x120] | r1 = "avahi_entry_group_is_empty(entry_group)";
0x000117e4 mov r2, r0 | r2 = r0;
0x000117e8 b 0x11744 | goto label_0;
| }
0x000117ec cmp r3, 3 |
| if (r3 == 3) {
0x000117f0 ldrne r3, [pc, 0xf0] | r3 = "register_stuff";
| }
| if (r3 == 3) {
0x000117f4 movne r2, 0x83 | r2 = 0x83;
| }
| if (r3 == 3) {
0x000117f8 ldrne r1, [pc, 0xec] | r1 = "avahi_publish.c";
| }
| if (r3 != 3) {
0x000117fc ldrne r0, [pc, 0x108] | r0 = "config__command__COMMAND_PUBLISH_SERVICE";
| goto label_8;
| }
| if (r3 != 3) {
| label_8:
0x00011800 bne 0x116f4 | goto label_1;
| }
0x00011804 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x00011808 mvn r2, 0 | r2 = ~0;
0x0001180c str r3, [sp, 0x14] | var_14h = r3;
0x00011810 ldrh r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00011814 mov r1, r2 | r1 = r2;
0x00011818 str r3, [sp, 0x10] | var_10h = r3;
0x0001181c ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00011820 str r3, [sp, 0xc] | var_ch = r3;
0x00011824 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00011828 str r3, [sp, 8] | var_8h = r3;
0x0001182c ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00011830 str r3, [sp, 4] | var_4h = r3;
0x00011834 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00011838 str r3, [sp] | *(sp) = r3;
0x0001183c mov r3, 0 | r3 = 0;
0x00011840 ldr r0, [r5] | r0 = *(r5);
0x00011844 bl 0x10ee4 | r0 = avahi_entry_group_add_service_strlst ();
0x00011848 cmp r0, 0 |
| if (r0 < 0) {
0x0001184c ldrge r6, [r4, 0x28] | r6 = *((r4 + 0x28));
| }
| if (r0 < 0) {
0x00011850 bge 0x11878 |
0x00011854 ldr r3, [pc, 0xa0] | r3 = *(0x118f8);
0x00011858 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0001185c ldr r4, [r3] | r4 = *(0x118f8);
0x00011860 bl 0x10ff8 | avahi_client_errno ();
0x00011864 bl 0x10e78 | avahi_strerror ();
0x00011868 ldr r1, [pc, 0xa0] | r1 = "config__command__COMMAND_PUBLISH_SERVICE";
0x0001186c mov r2, r0 | r2 = r0;
0x00011870 b 0x11744 | goto label_0;
| label_3:
0x00011874 ldr r6, [r6] | r6 = *(r6);
| }
0x00011878 cmp r6, 0 |
0x0001187c ldr r0, [r5] | r0 = *(r5);
| if (r6 == 0) {
0x00011880 beq 0x117b8 | goto label_2;
| }
0x00011884 add r7, r6, 8 | r7 = r6 + 8;
0x00011888 str r7, [sp, 0xc] | var_ch = r7;
0x0001188c ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00011890 mvn r2, 0 | r2 = ~0;
0x00011894 str r3, [sp, 8] | var_8h = r3;
0x00011898 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x0001189c mov r1, r2 | r1 = r2;
0x000118a0 str r3, [sp, 4] | var_4h = r3;
0x000118a4 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x000118a8 str r3, [sp] | *(sp) = r3;
0x000118ac mov r3, 0 | r3 = 0;
0x000118b0 bl 0x10f20 | r0 = avahi_entry_group_add_service_subtype ();
0x000118b4 cmp r0, 0 |
| if (r0 >= 0) {
0x000118b8 bge 0x11874 | goto label_3;
| }
0x000118bc ldr r3, [pc, 0x38] | r3 = *(0x118f8);
0x000118c0 ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x000118c4 ldr r4, [r3] | r4 = *(0x118f8);
0x000118c8 bl 0x10ff8 | avahi_client_errno ();
0x000118cc bl 0x10e78 | avahi_strerror ();
0x000118d0 mov r2, r7 | r2 = r7;
0x000118d4 ldr r1, [pc, 0x38] | r1 = "Failed to add service: %s\n";
0x000118d8 mov r3, r0 | r3 = r0;
0x000118dc mov r0, r4 | r0 = r4;
0x000118e0 bl 0x10f08 | fprintf (r0, "Failed to add service: %s\n", r2, r3)
0x000118e4 b 0x1174c | 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/avahi-publish @ 0x11d7c */
| #include <stdint.h>
|
; (fcn) fcn.00011d7c () | void fcn_00011d7c (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;
0x00011d7c push {r4, r5, r6, r7, r8, lr} |
0x00011d80 subs r8, r0, 0 | r8 = r0 - 0;
0x00011d84 sub sp, sp, 0x20 |
| if (r8 != r0) {
0x00011d88 bne 0x11da0 | goto label_3;
| }
0x00011d8c ldr r3, [pc, 0x180] | r3 = *(0x11f10);
0x00011d90 ldr r1, [pc, 0x180] | r1 = "sigint_install";
0x00011d94 ldr r0, [pc, 0x180] | r0 = "sigint.c";
0x00011d98 mov r2, 0x56 | r2 = 0x56;
| do {
| label_0:
0x00011d9c bl 0x10fa4 | assert ();
| label_3:
0x00011da0 ldr r5, [pc, 0x178] | r5 = "spoll";
0x00011da4 ldr r4, [r5] | r4 = "spoll";
0x00011da8 cmp r4, 0 |
| if (r4 == 0) {
0x00011dac ldrne r3, [pc, 0x160] | r3 = "sigint_install";
| }
| if (r4 == 0) {
0x00011db0 movne r2, 0x57 | r2 = 0x57;
| }
| if (r4 == 0) {
0x00011db4 ldrne r1, [pc, 0x15c] | r1 = "sigint.c";
| }
| if (r4 == 0) {
0x00011db8 ldrne r0, [pc, 0x164] | r0 = "!simple_poll";
| }
0x00011dbc bne 0x11d9c |
| } while (r4 != 0);
0x00011dc0 ldr r6, [pc, 0x160] | r6 = "!simple_poll";
0x00011dc4 ldr r3, [r6] | r3 = "!simple_poll";
0x00011dc8 cmn r3, 1 |
| if (r3 == 1) {
0x00011dcc bne 0x11ddc |
0x00011dd0 ldr r7, [r6, 4] | r7 = *((r6 + 4));
0x00011dd4 cmn r7, 1 |
| if (r7 == 1) {
0x00011dd8 beq 0x11df0 | goto label_4;
| }
| }
0x00011ddc ldr r3, [pc, 0x130] | r3 = *(0x11f10);
0x00011de0 mov r2, 0x58 | r2 = 0x58;
0x00011de4 ldr r1, [pc, 0x12c] | r1 = "sigint_install";
0x00011de8 ldr r0, [pc, 0x13c] | r0 = *(0x11f28);
0x00011dec b 0x11d9c | goto label_0;
| label_4:
0x00011df0 mov r0, r6 | r0 = r6;
0x00011df4 bl 0x10e3c | r0 = pipe ();
0x00011df8 cmp r0, 0 |
| if (r0 >= 0) {
0x00011dfc bge 0x11e30 | goto label_5;
| }
0x00011e00 ldr r3, [pc, 0x128] | r3 = "pipe_fds_0____1__pipe_fds_1____1";
0x00011e04 ldr r4, [r3] | r4 = "pipe_fds_0____1__pipe_fds_1____1";
0x00011e08 bl 0x10f80 | r0 = errno_location ();
0x00011e0c ldr r0, [r0] | r0 = *(r0);
0x00011e10 bl 0x10fe0 | strerror (r0);
0x00011e14 ldr r1, [pc, 0x118] | r1 = stderr;
0x00011e18 mov r2, r0 | r2 = r0;
0x00011e1c mov r0, r4 | r0 = r4;
0x00011e20 bl 0x10f08 | fprintf (r0, r1, r2)
| do {
| label_2:
0x00011e24 mov r0, r7 | r0 = r7;
0x00011e28 add sp, sp, 0x20 |
0x00011e2c pop {r4, r5, r6, r7, r8, pc} |
| label_5:
0x00011e30 ldr r0, [r6] | r0 = *(r6);
0x00011e34 bl 0x11d14 | fcn_00011d14 (r0);
0x00011e38 ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x00011e3c bl 0x11d14 | fcn_00011d14 (r0);
0x00011e40 ldr r3, [pc, 0xf0] | r3 = "pipe() failed: %s\n";
0x00011e44 add r2, r5, 4 | r2 = r5 + 4;
0x00011e48 str r3, [sp, 0xc] | var_ch = r3;
0x00011e4c add r1, sp, 0xc | r1 += var_ch;
0x00011e50 mov r3, 0x10000000 | r3 = 0x10000000;
0x00011e54 mov r0, 2 | r0 = 2;
0x00011e58 str r4, [sp, 0x14] | var_14h = r4;
0x00011e5c str r4, [sp, 0x18] | var_18h = r4;
0x00011e60 str r4, [sp, 0x1c] | var_1ch = r4;
0x00011e64 str r3, [sp, 0x10] | var_10h = r3;
0x00011e68 bl 0x11010 | r0 = sigaction ();
0x00011e6c cmp r0, 0 |
| if (r0 >= 0) {
0x00011e70 bge 0x11ea0 | goto label_6;
| }
| label_1:
0x00011e74 ldr r3, [pc, 0xb4] | r3 = "pipe_fds_0____1__pipe_fds_1____1";
0x00011e78 ldr r4, [r3] | r4 = "pipe_fds_0____1__pipe_fds_1____1";
0x00011e7c bl 0x10f80 | r0 = errno_location ();
0x00011e80 ldr r0, [r0] | r0 = *(r0);
0x00011e84 bl 0x10fe0 | strerror (r0);
0x00011e88 ldr r1, [pc, 0xac] | r1 = *(0x11f38);
0x00011e8c mov r2, r0 | r2 = r0;
0x00011e90 mov r0, r4 | r0 = r4;
0x00011e94 bl 0x10f08 | r0 = fprintf (r0, r1, r2)
0x00011e98 bl 0x11cd8 | fcn_00011cd8 ();
0x00011e9c b 0x11e24 |
| } while (1);
| label_6:
0x00011ea0 add r2, r5, 0x18 | r2 = r5 + 0x18;
0x00011ea4 add r1, sp, 0xc | r1 += var_ch;
0x00011ea8 mov r0, 0xf | r0 = 0xf;
0x00011eac bl 0x11010 | r0 = sigaction ();
0x00011eb0 cmp r0, 0 |
| if (r0 < 0) {
0x00011eb4 bge 0x11ecc |
0x00011eb8 mov r2, r4 | r2 = r4;
0x00011ebc add r1, r5, 4 | r1 = r5 + 4;
0x00011ec0 mov r0, 2 | r0 = 2;
0x00011ec4 bl 0x11010 | sigaction ();
0x00011ec8 b 0x11e74 | goto label_1;
| }
0x00011ecc mov r0, r8 | r0 = r8;
0x00011ed0 bl 0x10f44 | avahi_simple_poll_get ();
0x00011ed4 str r4, [sp] | *(sp) = r4;
0x00011ed8 ldr r3, [pc, 0x60] | r3 = "sigaction___failed:__s";
0x00011edc mov r2, 1 | r2 = 1;
0x00011ee0 ldr r1, [r6] | r1 = *(r6);
0x00011ee4 ldr r7, [r0, 4] | r7 = *((r0 + 4));
0x00011ee8 blx r7 | r0 = uint32_t (*r7)(uint32_t, uint32_t, char*) (r1, r2, "sigaction___failed:__s");
0x00011eec cmp r0, 0 |
0x00011ef0 str r0, [r5, 0x2c] | *((r5 + 0x2c)) = r0;
| if (r0 == 0) {
0x00011ef4 strne r8, [r5] | *(r5) = r8;
| }
| if (r0 != 0) {
0x00011ef8 movne r7, r4 | r7 = r4;
| goto label_7;
| }
| if (r0 != 0) {
| label_7:
0x00011efc bne 0x11e24 | goto label_2;
| }
0x00011f00 ldr r3, [pc, 0xc] | r3 = *(0x11f10);
0x00011f04 mov r2, 0x75 | r2 = 0x75;
0x00011f08 ldr r1, [pc, 8] | r1 = "sigint.c";
0x00011f0c ldr r0, [pc, 0x30] | r0 = *(0x11f40);
0x00011f10 b 0x11d9c | 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-publish @ 0x11040 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main (int32_t argc, char ** argv) {
| int32_t var_0h;
| int32_t var_4h;
| char * * endptr;
| 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_50h;
| r0 = argc;
| r1 = argv;
| /* [10] -r-x section size 4004 named .text */
0x00011040 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00011044 sub sp, sp, 0x50 |
0x00011048 mov r5, r1 | r5 = r1;
0x0001104c mov r7, r0 | r7 = r0;
0x00011050 bl 0x10ed8 | avahi_init_i18n ();
0x00011054 ldr r1, [pc, 0x4fc] | r1 = *(0x11554);
0x00011058 mov r0, 6 | r0 = 6;
0x0001105c bl 0x10f50 | setlocale (r0, r1);
0x00011060 ldr r4, [r5] | r4 = *(r5);
0x00011064 mov r1, 0x2f | r1 = 0x2f;
0x00011068 mov r0, r4 | r0 = r4;
0x0001106c bl 0x10e6c | strrchr (r0, r1);
0x00011070 ldr r1, [pc, 0x4e4] | r1 = *(0x11558);
0x00011074 cmp r0, 0 |
| if (r0 == 0) {
0x00011078 addne r4, r0, 1 | r4 = r0 + 1;
| }
0x0001107c mov r0, r4 | r0 = r4;
0x00011080 bl 0x10e9c | r0 = strstr (r0, r1);
0x00011084 cmp r0, 0 |
| if (r0 == 0) {
0x00011088 movne r3, 4 | r3 = 4;
| }
| if (r0 == 0) {
0x0001108c bne 0x110a8 |
0x00011090 ldr r1, [pc, 0x4c8] | r1 = "address";
0x00011094 mov r0, r4 | r0 = r4;
0x00011098 bl 0x10e9c | r0 = strstr (r0, "address");
0x0001109c cmp r0, 0 |
| if (r0 != 0) {
0x000110a0 moveq r3, 0 | r3 = 0;
| }
| if (r0 != 0) {
0x000110a4 movne r3, 3 | r3 = 3;
| goto label_8;
| }
| }
| label_8:
0x000110a8 ldr sl, [pc, 0x4b4] | sl = "help";
0x000110ac ldr sb, [pc, 0x4b4] | sb = "hVsavRd:H:f";
0x000110b0 ldr r6, [pc, 0x4b4] | r6 = "hVsavRd:H:f";
0x000110b4 str r3, [sp, 0x1c] | var_1ch = r3;
0x000110b8 mov r3, 0 | r3 = 0;
0x000110bc str r3, [sp, 0x18] | var_18h = r3;
0x000110c0 str r3, [sp, 0x14] | var_14h = r3;
0x000110c4 str r3, [sp, 0x10] | var_10h = r3;
0x000110c8 str r3, [sp, 0x24] | var_24h = r3;
0x000110cc str r3, [sp, 0x28] | var_28h = r3;
0x000110d0 str r3, [sp, 0x20] | var_20h = r3;
0x000110d4 str r3, [sp, 0x2c] | var_2ch = r3;
0x000110d8 strh r3, [sp, 0x30] | var_30h = r3;
0x000110dc str r3, [sp, 0x38] | var_38h = r3;
0x000110e0 str r3, [sp, 0x34] | var_34h = r3;
| label_1:
0x000110e4 mov r8, 0 | r8 = 0;
0x000110e8 str r8, [sp] | *(sp) = r8;
0x000110ec mov r3, sl | r3 = sl;
0x000110f0 mov r2, sb | r2 = sb;
0x000110f4 mov r1, r5 | r1 = r5;
0x000110f8 mov r0, r7 | r0 = r7;
0x000110fc bl 0x11034 | r0 = getopt_long ();
0x00011100 cmp r0, 0 |
| if (r0 < 0) {
0x00011104 bge 0x1113c |
0x00011108 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001110c cmp r3, 4 |
| if (r3 != 4) {
0x00011110 bne 0x1127c | goto label_9;
| }
0x00011114 ldr r6, [pc, 0x454] | r6 = optarg;
0x00011118 ldr r3, [r6] | r3 = optarg;
0x0001111c add r3, r3, 2 | r3 += 2;
0x00011120 cmp r7, r3 |
| if (r7 == r3) {
0x00011124 beq 0x11228 | goto label_10;
| }
| label_3:
0x00011128 ldr r3, [pc, 0x444] | r3 = optind;
0x0001112c ldr r0, [pc, 0x444] | r0 = stderr;
0x00011130 ldr r1, [r3] | r1 = optind;
| label_5:
0x00011134 bl 0x10f98 | fputs (r0, r1);
0x00011138 b 0x1115c |
| } else {
0x0001113c cmp r0, 0x64 |
| if (r0 == 0x64) {
0x00011140 beq 0x111f0 | goto label_11;
| }
| if (r0 > 0x64) {
0x00011144 bgt 0x1117c | goto label_12;
| }
0x00011148 cmp r0, 0x52 |
| if (r0 == 0x52) {
0x0001114c beq 0x111e4 | goto label_13;
| }
| if (r0 > 0x52) {
0x00011150 bgt 0x11164 | goto label_14;
| }
0x00011154 cmp r0, 0x48 |
| if (r0 == 0x48) {
0x00011158 beq 0x11208 | goto label_15;
| }
| }
| do {
| label_0:
0x0001115c mov r4, 1 | r4 = 1;
0x00011160 b 0x113c4 | goto label_16;
| label_14:
0x00011164 cmp r0, 0x56 |
| if (r0 == 0x56) {
0x00011168 beq 0x111c8 | goto label_17;
| }
0x0001116c cmp r0, 0x61 |
0x00011170 bne 0x1115c |
| } while (r0 != 0x61);
0x00011174 mov r3, 4 | r3 = 4;
0x00011178 b 0x1119c | goto label_2;
| label_12:
0x0001117c cmp r0, 0x73 |
| if (r0 == 0x73) {
0x00011180 beq 0x111d0 | goto label_18;
| }
| if (r0 > 0x73) {
0x00011184 bgt 0x111a4 | goto label_19;
| }
0x00011188 cmp r0, 0x66 |
0x0001118c mov r3, 1 | r3 = 1;
| if (r0 == 0x66) {
0x00011190 beq 0x11220 | goto label_20;
| }
0x00011194 cmp r0, 0x68 |
| if (r0 != 0x68) {
0x00011198 bne 0x1115c | goto label_0;
| }
| label_2:
0x0001119c str r3, [sp, 0x1c] | var_1ch = r3;
0x000111a0 b 0x110e4 | goto label_1;
| label_19:
0x000111a4 cmp r0, 0x76 |
| if (r0 == 0x76) {
0x000111a8 beq 0x111d8 | goto label_21;
| }
0x000111ac cmp r0, 0x100 |
| if (r0 != 0x100) {
0x000111b0 bne 0x1115c | goto label_0;
| }
0x000111b4 ldr r1, [r6] | r1 = *(r6);
0x000111b8 ldr r0, [sp, 0x38] | r0 = var_38h;
0x000111bc bl 0x10fec | avahi_string_list_add ();
0x000111c0 str r0, [sp, 0x38] | var_38h = r0;
0x000111c4 b 0x110e4 | goto label_1;
| label_17:
0x000111c8 mov r3, 2 | r3 = 2;
0x000111cc b 0x1119c | goto label_2;
| label_18:
0x000111d0 mov r3, 3 | r3 = 3;
0x000111d4 b 0x1119c | goto label_2;
| label_21:
0x000111d8 mov r3, 1 | r3 = 1;
0x000111dc str r3, [sp, 0x10] | var_10h = r3;
0x000111e0 b 0x110e4 | goto label_1;
| label_13:
0x000111e4 mov r3, 1 | r3 = 1;
0x000111e8 str r3, [sp, 0x18] | var_18h = r3;
0x000111ec b 0x110e4 | goto label_1;
| label_11:
0x000111f0 ldr r0, [sp, 0x28] | r0 = var_28h;
0x000111f4 bl 0x10e54 | avahi_free ();
0x000111f8 ldr r0, [r6] | r0 = *(r6);
0x000111fc bl 0x10fc8 | avahi_strdup ();
0x00011200 str r0, [sp, 0x28] | var_28h = r0;
0x00011204 b 0x110e4 | goto label_1;
| label_15:
0x00011208 ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x0001120c bl 0x10e54 | avahi_free ();
0x00011210 ldr r0, [r6] | r0 = *(r6);
0x00011214 bl 0x10fc8 | avahi_strdup ();
0x00011218 str r0, [sp, 0x2c] | var_2ch = r0;
0x0001121c b 0x110e4 | goto label_1;
| label_20:
0x00011220 str r3, [sp, 0x14] | var_14h = r3;
0x00011224 b 0x110e4 | goto label_1;
| label_10:
0x00011228 ldr r0, [sp, 0x20] | r0 = var_20h;
0x0001122c bl 0x10e54 | avahi_free ();
0x00011230 ldr r3, [r6] | r3 = *(r6);
0x00011234 ldr r0, [r5, r3, lsl 2] | offset_0 = r3 << 2;
| r0 = *((r5 + offset_0));
0x00011238 bl 0x10fc8 | avahi_strdup ();
0x0001123c ldr r3, [r6] | r3 = *(r6);
0x00011240 add r2, sp, 0x3c | r2 += var_3ch;
0x00011244 add r3, r3, 1 | r3++;
0x00011248 mvn r1, 0 | r1 = ~0;
0x0001124c str r0, [sp, 0x20] | var_20h = r0;
0x00011250 ldr r0, [r5, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r5 + offset_1));
0x00011254 bl 0x10fbc | avahi_address_parse ();
| do {
| label_4:
0x00011258 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0001125c cmp r3, 4 |
| if (r3 > 4) {
| /* switch table (5 cases) at 0x11268 */
0x00011260 ldrls pc, [pc, r3, lsl 2] | offset_2 = r3 << 2;
| pc = *((pc + offset_2));
| }
0x00011264 b 0x1115c | goto label_0;
| label_9:
0x0001127c cmp r3, 3 |
0x00011280 bne 0x11258 |
| } while (r3 != 3);
0x00011284 ldr r6, [pc, 0x2e4] | r6 = optarg;
0x00011288 ldr r3, [r6] | r3 = optarg;
0x0001128c mov sb, r6 | sb = r6;
0x00011290 add r2, r3, 2 | r2 = r3 + 2;
0x00011294 cmp r7, r2 |
| if (r7 <= r2) {
0x00011298 ble 0x11128 | goto label_3;
| }
0x0001129c ldr r0, [r5, r3, lsl 2] | offset_3 = r3 << 2;
| r0 = *((r5 + offset_3));
0x000112a0 bl 0x10fc8 | avahi_strdup ();
0x000112a4 ldr r3, [r6] | r3 = *(r6);
0x000112a8 add r3, r3, 1 | r3++;
0x000112ac str r0, [sp, 0x20] | var_20h = r0;
0x000112b0 ldr r0, [r5, r3, lsl 2] | offset_4 = r3 << 2;
| r0 = *((r5 + offset_4));
0x000112b4 bl 0x10fc8 | avahi_strdup ();
0x000112b8 str r0, [sp, 0x24] | var_24h = r0;
0x000112bc bl 0x10f80 | errno_location ();
0x000112c0 mov r2, r8 | r2 = r8;
0x000112c4 add r1, sp, 0xc | r1 += endptr;
0x000112c8 str r8, [r0] | *(r0) = r8;
0x000112cc ldr r3, [r6] | r3 = *(r6);
0x000112d0 mov sl, r0 | sl = r0;
0x000112d4 add r3, r3, 2 | r3 += 2;
0x000112d8 ldr r0, [r5, r3, lsl 2] | offset_5 = r3 << 2;
| r0 = *((r5 + offset_5));
0x000112dc bl 0x1101c | strtol (r0, r1, r2);
0x000112e0 ldr r3, [sl] | r3 = *(sl);
0x000112e4 cmp r3, 0 |
| if (r3 == 0) {
0x000112e8 bne 0x11310 |
0x000112ec ldr r3, [sp, 0xc] | r3 = endptr;
0x000112f0 ldr r6, [r6] | r6 = *(r6);
0x000112f4 ldrb r3, [r3] | r3 = *(r3);
0x000112f8 cmp r3, 0 |
| if (r3 != 0) {
0x000112fc bne 0x11310 | goto label_22;
| }
0x00011300 cmp r0, 0x10000 |
0x00011304 strhlo r0, [sp, 0x30] | __asm ("strhlo r0, [var_30h]");
| if (r0 >= 0x10000) {
0x00011308 addlo r6, r6, 3 | r6 += 3;
| }
| if (r0 <= 0x10000) {
0x0001130c blo 0x11344 | goto label_23;
| }
| }
| label_22:
0x00011310 ldr r3, [sb] | r3 = *(sb);
0x00011314 ldr r1, [pc, 0x260] | r1 = "Bad number of arguments\n";
0x00011318 add r3, r3, 2 | r3 += 2;
0x0001131c ldr r2, [r5, r3, lsl 2] | offset_6 = r3 << 2;
| r2 = *((r5 + offset_6));
0x00011320 ldr r3, [pc, 0x24c] | r3 = optind;
0x00011324 ldr r0, [r3] | r0 = optind;
| label_6:
0x00011328 bl 0x10f08 | fprintf (r0, "Bad number of arguments\n", r2, r3)
0x0001132c b 0x1115c | goto label_0;
| do {
0x00011330 ldr r1, [r5, r6, lsl 2] | offset_7 = r6 << 2;
| r1 = *((r5 + offset_7));
0x00011334 ldr r0, [sp, 0x34] | r0 = var_34h;
0x00011338 bl 0x10fec | avahi_string_list_add ();
0x0001133c add r6, r6, 1 | r6++;
0x00011340 str r0, [sp, 0x34] | var_34h = r0;
| label_23:
0x00011344 cmp r7, r6 |
0x00011348 bgt 0x11330 |
| } while (r7 > r6);
0x0001134c b 0x11258 | goto label_4;
0x00011350 ldr r3, [pc, 0x21c] | r3 = optind;
0x00011354 ldr r0, [pc, 0x224] | r0 = "Failed_to_parse_port_number:__s";
0x00011358 ldr r1, [r3] | r1 = optind;
0x0001135c b 0x11134 | goto label_5;
0x00011360 ldr r3, [pc, 0x21c] | r3 = "No command specified.\n";
0x00011364 ldr r1, [pc, 0x1f4] | r1 = "address";
0x00011368 mov r0, r4 | r0 = r4;
0x0001136c ldr r6, [r3] | r6 = "No command specified.\n";
0x00011370 bl 0x10e9c | strstr (r0, r1);
0x00011374 ldr r3, [pc, 0x20c] | r3 = stdout;
0x00011378 ldr r1, [pc, 0x1dc] | r1 = *(0x11558);
0x0001137c ldr r5, [pc, 0x208] | r5 = "[-s]";
0x00011380 cmp r0, 0 |
0x00011384 mov r0, r4 | r0 = r4;
| if (r0 == 0) {
0x00011388 movne r5, r3 | r5 = r3;
| }
0x0001138c bl 0x10e9c | strstr (r0, r1);
0x00011390 ldr r3, [pc, 0x1f8] | r3 = "_s";
0x00011394 ldr r2, [pc, 0x1f8] | r2 = "_a";
0x00011398 str r4, [sp] | *(sp) = r4;
0x0001139c ldr r1, [pc, 0x1f4] | r1 = "[-a]";
0x000113a0 cmp r0, 0 |
| if (r0 != 0) {
0x000113a4 moveq r0, r3 | r0 = r3;
| }
| if (r0 == 0) {
0x000113a8 movne r0, r2 | r0 = r2;
| }
0x000113ac str r0, [sp, 4] | var_4h = r0;
0x000113b0 mov r3, r5 | r3 = r5;
0x000113b4 mov r2, r4 | r2 = r4;
0x000113b8 mov r0, r6 | r0 = r6;
0x000113bc bl 0x10f08 | fprintf (r0, "[-a]", "_a", "_s", r4)
| do {
| label_7:
0x000113c0 mov r4, 0 | r4 = 0;
| label_16:
0x000113c4 ldr r3, [pc, 0x1d0] | r3 = "_s__options___s__name___type___port____txt_...___s__options___s__host_name___address______h___help____________Show_this_help_____V___version_________Show_version_____s___service_________Publish_service_____a___address_________Publish_address_____v_";
0x000113c8 ldr r0, [r3, 4] | r0 = *(0x1159c);
0x000113cc mov r5, r3 | r5 = r3;
0x000113d0 cmp r0, 0 |
| if (r0 != 0) {
0x000113d4 beq 0x113dc |
0x000113d8 bl 0x10e30 | avahi_client_free ();
| }
0x000113dc bl 0x11f48 | fcn_00011f48 ();
0x000113e0 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x000113e4 cmp r0, 0 |
| if (r0 != 0) {
0x000113e8 beq 0x113f0 |
0x000113ec bl 0x10f68 | avahi_simple_poll_free ();
| }
0x000113f0 ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x000113f4 bl 0x10e54 | avahi_free ();
0x000113f8 ldr r0, [sp, 0x20] | r0 = var_20h;
0x000113fc bl 0x10e54 | avahi_free ();
0x00011400 ldr r0, [sp, 0x24] | r0 = var_24h;
0x00011404 bl 0x10e54 | avahi_free ();
0x00011408 ldr r0, [sp, 0x28] | r0 = var_28h;
0x0001140c bl 0x10e54 | avahi_free ();
0x00011410 ldr r0, [sp, 0x38] | r0 = var_38h;
0x00011414 bl 0x10f74 | avahi_string_list_free ();
0x00011418 ldr r0, [sp, 0x34] | r0 = var_34h;
0x0001141c bl 0x10f74 | avahi_string_list_free ();
0x00011420 mov r0, r4 | r0 = r4;
0x00011424 add sp, sp, 0x50 |
0x00011428 pop {r4, r5, r6, r7, r8, sb, sl, pc} |
0x0001142c mov r1, r4 | r1 = r4;
0x00011430 ldr r0, [pc, 0x168] | r0 = *(0x1159c);
0x00011434 bl 0x10ecc | printf (r0, r1);
0x00011438 b 0x113c0 |
| } while (1);
0x0001143c bl 0x10eb4 | avahi_simple_poll_new ();
0x00011440 ldr r4, [pc, 0x154] | r4 = "_s__options___s__name___type___port____txt_...___s__options___s__host_name___address______h___help____________Show_this_help_____V___version_________Show_version_____s___service_________Publish_service_____a___address_________Publish_address_____v_";
0x00011444 mov r6, r4 | r6 = r4;
0x00011448 cmp r0, 0 |
0x0001144c str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r0 != 0) {
0x00011450 ldreq r3, [pc, 0x11c] | r3 = obj.stderr;
| }
| if (r0 != 0) {
0x00011454 ldreq r0, [pc, 0x148] | r0 = "Failed to create simple poll object.\n";
| }
| if (r0 == 0) {
0x00011458 ldreq r1, [r3] | r1 = *(r3);
| goto label_24;
| }
| if (r0 == 0) {
| label_24:
0x0001145c beq 0x11134 | goto label_5;
| }
0x00011460 bl 0x11d7c | r0 = fcn_00011d7c (r0);
0x00011464 cmp r0, 0 |
| if (r0 < 0) {
0x00011468 blt 0x1115c | goto label_0;
| }
0x0001146c ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x00011470 bl 0x10f44 | avahi_simple_poll_get ();
0x00011474 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00011478 ldr r2, [pc, 0x128] | r2 = "Failed to create simple poll object.\n";
0x0001147c cmp r3, 0 |
0x00011480 add r3, sp, 0xc | r3 += endptr;
0x00011484 str r3, [sp] | *(sp) = r3;
| if (r3 == 0) {
0x00011488 movne r1, 2 | r1 = 2;
| }
| if (r3 != 0) {
0x0001148c moveq r1, 0 | r1 = 0;
| }
0x00011490 add r3, sp, 0x10 | r3 += var_10h;
0x00011494 bl 0x10ec0 | r0 = avahi_client_new ();
0x00011498 cmp r0, 0 |
0x0001149c str r0, [r4, 4] | *((r4 + 4)) = r0;
| if (r0 == 0) {
0x000114a0 bne 0x114c4 |
0x000114a4 ldr r3, [pc, 0xc8] | r3 = optind;
0x000114a8 ldr r0, [sp, 0xc] | r0 = endptr;
0x000114ac ldr r4, [r3] | r4 = optind;
0x000114b0 bl 0x10e78 | avahi_strerror ();
0x000114b4 ldr r1, [pc, 0xf0] | r1 = *(0x115a8);
0x000114b8 mov r2, r0 | r2 = r0;
0x000114bc mov r0, r4 | r0 = r4;
0x000114c0 b 0x11328 | goto label_6;
| }
0x000114c4 bl 0x10f2c | r0 = avahi_client_get_state ();
0x000114c8 cmp r0, 0x65 |
| if (r0 == 0x65) {
0x000114cc beq 0x1154c | goto label_25;
| }
0x000114d0 ldr r3, [sp, 0x10] | r3 = var_10h;
0x000114d4 cmp r3, 0 |
| if (r3 == 0) {
0x000114d8 beq 0x1154c | goto label_25;
| }
0x000114dc ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000114e0 bl 0x10f14 | avahi_client_get_version_string ();
0x000114e4 ldr r5, [pc, 0x88] | r5 = optind;
0x000114e8 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x000114ec bne 0x11510 | goto label_26;
| }
0x000114f0 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000114f4 ldr r5, [r5] | r5 = *(r5);
0x000114f8 bl 0x10ff8 | avahi_client_errno ();
0x000114fc bl 0x10e78 | avahi_strerror ();
0x00011500 ldr r1, [pc, 0xa8] | r1 = "Failed_to_create_client_object:__s";
0x00011504 mov r2, r0 | r2 = r0;
| do {
0x00011508 mov r0, r5 | r0 = r5;
0x0001150c b 0x11328 | goto label_6;
| label_26:
0x00011510 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00011514 bl 0x10fb0 | r0 = avahi_client_get_host_name_fqdn ();
0x00011518 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x0001151c bne 0x1153c | goto label_27;
| }
0x00011520 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00011524 ldr r5, [r5] | r5 = *(r5);
0x00011528 bl 0x10ff8 | avahi_client_errno ();
0x0001152c bl 0x10e78 | avahi_strerror ();
0x00011530 ldr r1, [pc, 0x7c] | r1 = "Failed to query version string: %s\n";
0x00011534 mov r2, r0 | r2 = r0;
0x00011538 b 0x11508 |
| } while (1);
| label_27:
0x0001153c mov r2, r7 | r2 = r7;
0x00011540 ldr r1, [pc, 0x70] | r1 = "Failed to query host name: %s\n";
0x00011544 ldr r0, [r5] | r0 = *(r5);
0x00011548 bl 0x10f08 | fprintf (r0, "Failed to query host name: %s\n", r2)
| label_25:
0x0001154c ldr r0, [r6, 8] | r0 = *((r6 + 8));
0x00011550 bl 0x11028 | avahi_simple_poll_loop ();
0x00011554 b 0x113c0 | goto label_7;
| }
[*] Function fprintf used 8 times avahi-publish