[*] Binary protection state of zabbix_agentd

  
  	Full RELRO     Canary found      NX enabled   PIE enabled  No RPATH     No RUNPATH   No Symbols


[*] Function printf tear down of zabbix_agentd

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x363d0 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.000363d0 ()              | void fcn_000363d0 () {
                                         |     int16_t var_0h;
                                         |     int16_t var_4h;
                                         |     int32_t var_4h_3;
                                         |     int16_t var_10h;
                                         |     int16_t var_4h_2;
    0x000363d0 push {r0, r1, r2, r3}     |     
    0x000363d2 mov.w r1, 0x200           |     r1 = 0x200;
    0x000363d4 strb r0, [r0, 4]          |     *((r0 + 4)) = r0;
    0x000363d6 push {lr}                 |     
    0x000363d8 sub sp, 0xc               |     
    0x000363da add r3, sp, 0x10          |     r3 += var_10h;
    0x000363dc ldr.w lr, [pc, 0x48]      |     
    0x000363e0 ldr.w ip, [pc, 0x48]      |     
    0x000363e4 ldr r0, [pc, 0x48]        |     
    0x000363e6 add lr, pc                |     lr += pc;
    0x000363e8 ldr r2, [r3], 4           |     r2 = *(r3);
                                         |     r3 += 4;
    0x000363ec ldr.w ip, [lr, ip]        |     ip = *((lr + ip));
    0x000363f0 add r0, pc                |     r0 = 0x6c824;
    0x000363f2 ldr.w ip, [ip]            |     ip = *(0x3642c);
    0x000363f6 str.w ip, [sp, 4]         |     __asm ("str.w ip, [var_4h]");
    0x000363fa mov.w ip, 0               |     
    0x000363fe str r3, [sp]              |     *(sp) = r3;
    0x00036400 bl 0x440bc                |     zbx_vsnprintf ()
    0x00036404 ldr r2, [pc, 0x2c]        |     
    0x00036406 ldr r3, [pc, 0x24]        |     r3 = *(0x3642e);
    0x00036408 add r2, pc                |     r2 = 0x6c840;
    0x0003640a ldr r3, [r2, r3]          |     r3 = *(0x6c840);
    0x0003640c ldr r2, [r3]              |     r2 = *(0x6c840);
    0x0003640e ldr r3, [sp, 4]           |     r3 = var_4h;
    0x00036410 eors r2, r3               |     r2 ^= r3;
    0x00036412 mov.w r3, 0               |     r3 = 0;
                                         |     if (r2 == r3) {
    0x00036416 bne 0x36422               |         
    0x00036418 add sp, 0xc               |         
    0x0003641a ldr lr, [sp], 4           |         
    0x0003641e add sp, 0x10              |         
    0x00036420 bx lr                     |         return;
                                         |     }
    0x00036422 blx 0xe158                |     fcn_0000e158 ();
    0x00036426 nop                       |     
    0x00036428 ldrsb r2, [r6, r7]        |     r2 = *((r6 + r7));
    0x0003642a movs r2, r0               |     r2 = r0;
    0x0003642c lsls r4, r2, 0xe          |     r4 = r2 << 0xe;
    0x0003642e movs r0, r0               |     
    0x00036430 ldrb r4, [r0, 0x14]       |     r4 = *((r0 + 0x14));
    0x00036432 movs r2, r0               |     r2 = r0;
    0x00036434 ldrsb r0, [r2, r7]        |     r0 = *((r2 + r7));
    0x00036436 movs r2, r0               |     r2 = r0;
                                         | }
    ; assembly                                       | /* r2dec pseudo code output */
                                                     | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x30d1c */
                                                     | #include <stdint.h>
                                                     |  
    ; (fcn) sym.__zbx_zabbix_log ()                  | void zbx_zabbix_log (int16_t arg_10000h, int16_t arg1) {
                                                     |     int16_t var_0h;
                                                     |     int16_t var_4h;
                                                     |     int16_t var_8h;
                                                     |     int16_t var_ch;
                                                     |     int16_t var_10h;
                                                     |     int16_t var_14h;
                                                     |     int16_t var_18h;
                                                     |     int16_t var_20h;
                                                     |     int16_t var_24h;
                                                     |     int16_t var_28h;
                                                     |     int16_t var_2ch;
                                                     |     int16_t var_30h;
                                                     |     int16_t var_34h;
                                                     |     int16_t var_38h;
                                                     |     int16_t var_3ch;
                                                     |     int16_t var_54h;
                                                     |     int32_t var_0h_2;
                                                     |     r0 = arg1;
    0x00030d1c bmi 0xff05dd5c                        |     
    0x00030d20 ldr r3, [pc, 0x300]                   |     
    0x00030d22 push.w {r4, r5, r6, r7, r8, lr}       |     
    0x00030d26 add r2, pc                            |     r2 += pc;
    0x00030d28 sub.w sp, sp, 0x10000                 |     
    0x00030d2c ldr r6, [pc, 0x2f8]                   |     
    0x00030d2e sub sp, 0x5c                          |     
    0x00030d30 ldr r3, [r2, r3]                      |     r3 = *((r2 + r3));
    0x00030d32 add.w r1, sp, 0x10000                 |     r1 += arg_10000h;
    0x00030d36 add r6, pc                            |     r6 = 0x61d62;
    0x00030d38 ldr r5, [pc, 0x2f0]                   |     
    0x00030d3a adds r1, 0x54                         |     r1 += 0x54;
    0x00030d3c ldr r3, [r3]                          |     r3 = *(0x31024);
    0x00030d3e str r3, [r1]                          |     *(r1) = r3;
    0x00030d40 mov.w r3, 0                           |     r3 = 0;
    0x00030d44 add.w r3, sp, 0x10000                 |     r3 += arg_10000h;
    0x00030d48 adds r3, 0x74                         |     r3 += 0x74;
    0x00030d4a ldr r7, [r3]                          |     r7 = *(r3);
    0x00030d4c ldr.w r3, [r6, 0xc90]                 |     r3 = *(0x629f2);
    0x00030d50 add r5, pc                            |     r5 = 0x61d80;
    0x00030d52 cmp r3, 2                             |     
                                                     |     if (r3 == 2) {
    0x00030d54 beq.w 0x30f08                         |         goto label_4;
                                                     |     }
    0x00030d58 cmp r3, 3                             |     
                                                     |     if (r3 != 3) {
    0x00030d5a beq 0x30daa                           |         
    0x00030d5c add.w r3, sp, 0x10000                 |         r3 += arg_10000h;
    0x00030d60 add r5, sp, 0x54                      |         r5 += var_54h;
    0x00030d62 adds r3, 0x78                         |         r3 += 0x78;
    0x00030d64 mov.w r1, 0x10000                     |         r1 = 0x10000;
    0x00030d68 mov r4, r0                            |         r4 = r0;
    0x00030d6a mov r2, r7                            |         r2 = r7;
    0x00030d6c mov r0, r5                            |         r0 = r5;
    0x00030d6e str r3, [sp, 0x20]                    |         var_20h = r3;
    0x00030d70 bl 0x440bc                            |         zbx_vsnprintf ()
    0x00030d74 ldr.w r1, [r6, 0xc90]                 |         r1 = *((r6 + 0xc90));
    0x00030d78 cmp r1, 1                             |         
                                                     |         if (r1 == 1) {
    0x00030d7a bne 0x30d94                           |             
    0x00030d7c cmp r4, 5                             |             
                                                     |             if (r4 > 5) {
    0x00030d7e bgt 0x30e60                           |                 goto label_5;
                                                     |             }
    0x00030d80 cmp r4, 0                             |             
                                                     |             if (r4 <= 0) {
    0x00030d82 ble 0x30e36                           |                 goto label_0;
                                                     |             }
    0x00030d84 subs r4, 2                            |             r4 -= 2;
    0x00030d86 cmp r4, 3                             |             
                                                     |             if (r4 > 3) {
    0x00030d88 bhi.w 0x31002                         |                 goto label_6;
                                                     |             }
                                                     |             /* switch table (4 cases) at 0x30d90 */
    0x00030d8c tbb [pc, r4]                          |             __asm ("tbb [0x00030d94]");
                                                     |         }
    0x00030d94 subs r4, 1                            |         r4--;
    0x00030d96 bl 0x304a8                            |         fcn_000304a8 ();
    0x00030d9a cmp r4, 4                             |         
                                                     |         if (r4 > 4) {
    0x00030d9c bhi.w 0x31012                         |             goto label_7;
                                                     |         }
                                                     |         /* switch table (5 cases) at 0x30da4 */
    0x00030da0 tbb [pc, r4]                          |         __asm ("tbb [0x00030da8]");
                                                     |     }
    0x00030daa bl 0x304a8                            |     fcn_000304a8 ();
    0x00030dae movs r2, 0                            |     r2 = 0;
    0x00030db0 add r1, sp, 0x24                      |     r1 += var_24h;
    0x00030db2 add r0, sp, 0x28                      |     r0 += var_28h;
    0x00030db4 bl 0x400e4                            |     zbx_get_time ();
    0x00030db8 ldr r3, [pc, 0x274]                   |     r3 = *(0x31030);
    0x00030dba ldr r5, [r5, r3]                      |     r5 = *((r5 + r3));
    0x00030dbc ldr.w r8, [r5]                        |     r8 = *(r5);
    0x00030dc0 bl 0x343e4                            |     zbx_get_thread_id ();
    0x00030dc4 ldr r2, [sp, 0x38]                    |     r2 = var_38h;
    0x00030dc6 mov r3, r0                            |     r3 = r0;
    0x00030dc8 movs r1, 1                            |     r1 = 1;
    0x00030dca mov r0, r8                            |     r0 = r8;
    0x00030dcc adds r2, 1                            |     r2++;
    0x00030dce str r2, [sp, 4]                       |     var_4h = r2;
    0x00030dd0 ldr r2, [sp, 0x3c]                    |     r2 = var_3ch;
    0x00030dd2 addw r2, r2, 0x76c                    |     __asm ("addw r2, r2, 0x76c");
    0x00030dd6 str r2, [sp]                          |     *(sp) = r2;
    0x00030dd8 ldr r2, [sp, 0x24]                    |     r2 = var_24h;
    0x00030dda str r2, [sp, 0x18]                    |     var_18h = r2;
    0x00030ddc ldr r2, [sp, 0x28]                    |     r2 = var_28h;
    0x00030dde str r2, [sp, 0x14]                    |     var_14h = r2;
    0x00030de0 ldr r2, [sp, 0x2c]                    |     r2 = var_2ch;
    0x00030de2 str r2, [sp, 0x10]                    |     var_10h = r2;
    0x00030de4 ldr r2, [sp, 0x30]                    |     r2 = var_30h;
    0x00030de6 str r2, [sp, 0xc]                     |     var_ch = r2;
    0x00030de8 ldr r2, [sp, 0x34]                    |     r2 = var_34h;
    0x00030dea str r2, [sp, 8]                       |     var_8h = r2;
    0x00030dec ldr r2, [pc, 0x244]                   |     
    0x00030dee add r2, pc                            |     r2 = 0x61e26;
    0x00030df0 blx 0xe188                            |     fcn_0000e188 ();
    0x00030df4 add.w r3, sp, 0x10000                 |     r3 += arg_10000h;
    0x00030df8 mov r2, r7                            |     r2 = r7;
    0x00030dfa adds r3, 0x78                         |     r3 += 0x78;
    0x00030dfc movs r1, 1                            |     r1 = 1;
    0x00030dfe ldr r0, [r5]                          |     r0 = *(r5);
    0x00030e00 str r3, [sp, 0x20]                    |     var_20h = r3;
    0x00030e02 blx 0xe03c                            |     shutdown ();
    0x00030e06 ldr r1, [r5]                          |     r1 = *(r5);
    0x00030e08 movs r0, 0xa                          |     r0 = 0xa;
    0x00030e0a blx 0xe194                            |     fcn_0000e194 ();
    0x00030e0c strd r6, r8, [r4, 0xa0]               |     __asm ("strd r6, r8, [r4, 0xa0]");
    0x00030e10 blx 0xdf20                            |     fcn_0000df20 ();
    0x00030e14 ldr r3, [pc, 0x220]                   |     
    0x00030e16 movw r1, 0x101                        |     r1 = 0x101;
    0x00030e1a ldr r0, [pc, 0x220]                   |     
    0x00030e1c add r3, pc                            |     r3 = 0x61e58;
    0x00030e1e ldr r2, [r3]                          |     r2 = *(0x61e58);
    0x00030e20 add r0, pc                            |     r0 = 0x61e62;
    0x00030e22 bl 0x34594                            |     zbx_mutex_unlock ();
    0x00030e26 movs r2, 0                            |     r2 = 0;
    0x00030e28 mov r1, r6                            |     r1 = r6;
    0x00030e2a movs r0, 2                            |     r0 = 2;
    0x00030e2c blx 0xe14c                            |     r0 = fcn_0000e14c ();
    0x00030e30 cmp r0, 0                             |     
                                                     |     if (r0 < 0) {
    0x00030e32 blt.w 0x30fb8                         |         goto label_8;
                                                     |     }
                                                     |     do {
                                                     | label_0:
    0x00030e36 ldr r2, [pc, 0x208]                   |         
    0x00030e38 add.w r1, sp, 0x10000                 |         r1 += arg_10000h;
    0x00030e3c ldr r3, [pc, 0x1e4]                   |         r3 = *(0x31024);
    0x00030e3e adds r1, 0x54                         |         r1 += 0x54;
    0x00030e40 add r2, pc                            |         r2 = 0x61e86;
    0x00030e42 ldr r3, [r2, r3]                      |         r3 = *(0x61e86);
    0x00030e44 ldr r2, [r3]                          |         r2 = *(0x61e86);
    0x00030e46 ldr r3, [r1]                          |         r3 = *(r1);
    0x00030e48 eors r2, r3                           |         r2 ^= r3;
    0x00030e4a mov.w r3, 0                           |         r3 = 0;
                                                     |         if (r2 != r3) {
    0x00030e4e bne.w 0x30fc8                         |             goto label_9;
                                                     |         }
    0x00030e50 strh r3, [r7, 4]                      |         *((r7 + 4)) = r3;
    0x00030e52 add.w sp, sp, 0x10000                 |         
    0x00030e56 add sp, 0x5c                          |         
    0x00030e58 pop.w {r4, r5, r6, r7, r8, lr}        |         
    0x00030e5c add sp, 0xc                           |         
    0x00030e5e bx lr                                 |         return;
                                                     | label_5:
    0x00030e60 cmp r4, 0x7f                          |         
    0x00030e62 bne 0x30e36                           |         
                                                     |     } while (r4 != 0x7f);
    0x00030e64 ldr r2, [pc, 0x1dc]                   |     
    0x00030e66 mov r3, r5                            |     r3 = r5;
    0x00030e68 movs r0, 6                            |     r0 = 6;
    0x00030e6a add r2, pc                            |     r2 = 0x61eb2;
    0x00030e6c blx 0xe084                            |     close (r0);
    0x00030e70 b 0x30e36                             |     goto label_0;
    0x00030e72 ldr r2, [pc, 0x1d4]                   |     
    0x00030e74 mov r3, r5                            |     r3 = r5;
    0x00030e76 movs r1, 1                            |     r1 = 1;
    0x00030e78 movs r0, 7                            |     r0 = 7;
    0x00030e7a add r2, pc                            |     r2 = 0x61ec8;
    0x00030e7c blx 0xe084                            |     close (r0);
    0x00030e80 b 0x30e36                             |     goto label_0;
    0x00030e82 ldr r2, [pc, 0x1c8]                   |     
    0x00030e84 mov r3, r5                            |     r3 = r5;
    0x00030e86 movs r1, 1                            |     r1 = 1;
    0x00030e88 movs r0, 4                            |     r0 = 4;
    0x00030e8a add r2, pc                            |     r2 = 0x61edc;
    0x00030e8c blx 0xe084                            |     close (r0);
    0x00030e90 b 0x30e36                             |     goto label_0;
    0x00030e92 ldr r2, [pc, 0x1bc]                   |     
    0x00030e94 mov r3, r5                            |     r3 = r5;
    0x00030e96 movs r1, 1                            |     r1 = 1;
    0x00030e98 movs r0, 3                            |     r0 = 3;
    0x00030e9a add r2, pc                            |     r2 = 0x61ef0;
    0x00030e9c blx 0xe084                            |     close (r0);
    0x00030ea0 b 0x30e36                             |     goto label_0;
    0x00030ea2 ldr r0, [pc, 0x1b0]                   |     
    0x00030ea4 mov r1, r5                            |     r1 = r5;
    0x00030ea6 add r0, pc                            |     r0 = 0x61f00;
    0x00030ea8 bl 0x43cd4                            |     zbx_error ();
                                                     | label_1:
    0x00030eac ldr r3, [pc, 0x1a8]                   |     
    0x00030eae movw r1, 0x101                        |     
    0x00030eb2 ldr r0, [pc, 0x1a8]                   |     
    0x00030eb4 add r3, pc                            |     r3 = 0x61f10;
    0x00030eb6 ldr r2, [r3]                          |     r2 = *(0x61f10);
    0x00030eb8 add r0, pc                            |     r0 = 0x61f1a;
    0x00030eba bl 0x34594                            |     zbx_mutex_unlock ();
    0x00030ebc invalid                               |     
    0x00030ec0 movs r2, 0                            |     r2 = 0;
    0x00030ec2 movs r0, 2                            |     r0 = 2;
    0x00030ec4 add r1, pc                            |     r1 = 0x30fc9;
    0x00030ec6 blx 0xe14c                            |     r0 = fcn_0000e14c ();
    0x00030eca cmp r0, 0                             |     
                                                     |     if (r0 >= 0) {
    0x00030ecc bge 0x30e36                           |         goto label_0;
                                                     |     }
    0x00030ece ldr r0, [pc, 0x194]                   |     
    0x00030ed0 add r0, pc                            |     r0 = 0x61f3a;
    0x00030ed2 bl 0x43cd4                            |     zbx_error ();
    0x00030ed6 b 0x30e36                             |     goto label_0;
    0x00030ed8 ldr r0, [pc, 0x18c]                   |     
    0x00030eda mov r1, r5                            |     r1 = r5;
    0x00030edc add r0, pc                            |     r0 = 0x61f48;
    0x00030ede bl 0x43cd4                            |     zbx_error ();
    0x00030ee2 b 0x30eac                             |     goto label_1;
    0x00030ee4 ldr r0, [pc, 0x184]                   |     
    0x00030ee6 mov r1, r5                            |     r1 = r5;
    0x00030ee8 add r0, pc                            |     r0 = 0x61f58;
    0x00030eea bl 0x43cd4                            |     zbx_error ();
    0x00030eee b 0x30eac                             |     goto label_1;
    0x00030ef0 ldr r0, [pc, 0x17c]                   |     
    0x00030ef2 mov r1, r5                            |     r1 = r5;
    0x00030ef4 add r0, pc                            |     r0 = 0x61f68;
    0x00030ef6 bl 0x43cd4                            |     zbx_error ();
    0x00030efa b 0x30eac                             |     goto label_1;
    0x00030efc ldr r0, [pc, 0x174]                   |     
    0x00030efe mov r1, r5                            |     r1 = r5;
    0x00030f00 add r0, pc                            |     r0 = 0x61f78;
    0x00030f02 bl 0x43cd4                            |     zbx_error ();
    0x00030f06 b 0x30eac                             |     goto label_1;
                                                     | label_4:
    0x00030f08 bl 0x304a8                            |     fcn_000304a8 ();
    0x00030f0c ldr r3, [pc, 0x168]                   |     
    0x00030f0e ldr r3, [r5, r3]                      |     r3 = *((r5 + r3));
    0x00030f10 ldr r3, [r3]                          |     r3 = *(0x31078);
    0x00030f12 cmp r3, 0                             |     
                                                     |     if (r3 != 0) {
    0x00030f14 bne 0x30fc2                           |         goto label_10;
                                                     |     }
                                                     | label_2:
    0x00030f16 ldr r0, [pc, 0x164]                   |     
    0x00030f18 ldr r1, [pc, 0x164]                   |     
    0x00030f1a add r0, pc                            |     
    0x00030f1c add r1, pc                            |     r1 = 0x61fa0;
    0x00030f1e add.w r0, r0, 0x480                   |     r0 = 0x6241c;
    0x00030f22 blx 0xdf90                            |     r0 = fcn_0000df90 ();
    0x00030f26 mov r5, r0                            |     r5 = r0;
    0x00030f28 cmp r0, 0                             |     
                                                     |     if (r0 == 0) {
    0x00030f2a beq 0x30fcc                           |         goto label_11;
                                                     |     }
    0x00030f2c movs r2, 0                            |     r2 = 0;
    0x00030f2e add r1, sp, 0x24                      |     r1 += var_24h;
    0x00030f30 add r0, sp, 0x28                      |     r0 += var_28h;
    0x00030f32 bl 0x400e4                            |     zbx_get_time ();
    0x00030f34 ldr.w pc, [r7, 3]                     |     pc = *((r7 + 3));
    0x00030f38 invalid                               |     
    0x00030f3c mov r3, r0                            |     r3 = r0;
    0x00030f3e movs r1, 1                            |     r1 = 1;
    0x00030f40 mov r0, r5                            |     r0 = r5;
    0x00030f42 str r2, [sp, 0x18]                    |     var_18h = r2;
    0x00030f44 ldr r2, [sp, 0x28]                    |     r2 = var_28h;
    0x00030f46 str r2, [sp, 0x14]                    |     var_14h = r2;
    0x00030f48 ldr r2, [sp, 0x2c]                    |     r2 = var_2ch;
    0x00030f4a str r2, [sp, 0x10]                    |     var_10h = r2;
    0x00030f4c ldr r2, [sp, 0x30]                    |     r2 = var_30h;
    0x00030f4e str r2, [sp, 0xc]                     |     var_ch = r2;
    0x00030f50 ldr r2, [sp, 0x34]                    |     r2 = var_34h;
    0x00030f52 str r2, [sp, 8]                       |     var_8h = r2;
    0x00030f54 ldr r2, [sp, 0x38]                    |     r2 = var_38h;
    0x00030f56 adds r2, 1                            |     r2++;
    0x00030f58 str r2, [sp, 4]                       |     var_4h = r2;
    0x00030f5a ldr r2, [sp, 0x3c]                    |     r2 = var_3ch;
    0x00030f5c addw r2, r2, 0x76c                    |     __asm ("addw r2, r2, 0x76c");
    0x00030f60 str r2, [sp]                          |     *(sp) = r2;
    0x00030f62 ldr r2, [pc, 0x120]                   |     
    0x00030f64 add r2, pc                            |     r2 = 0x61fee;
    0x00030f66 blx 0xe188                            |     fcn_0000e188 ();
    0x00030f6a add.w r3, sp, 0x10000                 |     r3 += arg_10000h;
    0x00030f6e mov r2, r7                            |     r2 = r7;
    0x00030f70 adds r3, 0x78                         |     r3 += 0x78;
    0x00030f72 movs r1, 1                            |     r1 = 1;
    0x00030f74 mov r0, r5                            |     r0 = r5;
    0x00030f76 str r3, [sp, 0x20]                    |     var_20h = r3;
    0x00030f78 blx 0xe03c                            |     shutdown ();
    0x00030f7c mov r1, r5                            |     r1 = r5;
    0x00030f7e movs r0, 0xa                          |     r0 = 0xa;
    0x00030f80 blx 0xe194                            |     fcn_0000e194 ();
    0x00030f84 mov r0, r5                            |     r0 = r5;
    0x00030f86 blx 0xdc8c                            |     fcn_0000dc8c ();
                                                     | label_3:
    0x00030f8a ldr r3, [pc, 0xfc]                    |     
    0x00030f8c movw r1, 0x101                        |     r1 = 0x101;
    0x00030f90 ldr r0, [pc, 0xf8]                    |     
    0x00030f92 add r3, pc                            |     r3 = 0x62020;
    0x00030f94 ldr r2, [r3]                          |     r2 = *(0x62020);
    0x00030f96 add r0, pc                            |     r0 = 0x62026;
    0x00030f98 bl 0x34594                            |     zbx_mutex_unlock ();
    0x00030f9c ldr r1, [pc, 0xf0]                    |     
    0x00030f9e movs r2, 0                            |     r2 = 0;
    0x00030fa0 movs r0, 2                            |     r0 = 2;
    0x00030fa2 add r1, pc                            |     r1 = 0x62036;
    0x00030fa4 blx 0xe14c                            |     r0 = fcn_0000e14c ();
    0x00030fa8 cmp r0, 0                             |     
                                                     |     if (r0 >= 0) {
    0x00030faa bge.w 0x30e36                         |         goto label_0;
                                                     |     }
    0x00030fae ldr r0, [pc, 0xe4]                    |     
    0x00030fb0 add r0, pc                            |     r0 = 0x6204a;
    0x00030fb2 bl 0x43cd4                            |     zbx_error ();
    0x00030fb6 b 0x30e36                             |     goto label_0;
                                                     | label_8:
    0x00030fb8 ldr r0, [pc, 0xdc]                    |     
    0x00030fba add r0, pc                            |     r0 = 0x62056;
    0x00030fbc bl 0x43cd4                            |     zbx_error ();
    0x00030fc0 b 0x30e36                             |     goto label_0;
                                                     | label_10:
    0x00030fc2 bl 0x30840                            |     fcn_00030840 (r0, r1, r2, r3, r4, r5, r6);
    0x00030fc6 b 0x30f16                             |     goto label_2;
                                                     | label_9:
    0x00030fc8 blx 0xe158                            |     fcn_0000e158 ();
                                                     | label_11:
    0x00030fcc blx 0xe3d4                            |     r0 = fcn_0000e3d4 ();
    0x00030fd0 ldr r0, [r0]                          |     r0 = *(r0);
    0x00030fd2 add r4, sp, 0x54                      |     r4 += var_54h;
    0x00030fd4 bl 0x30b74                            |     r0 = zbx_strerror ();
    0x00030fd8 mov r1, r0                            |     r1 = r0;
    0x00030fda ldr r0, [pc, 0xc0]                    |     
    0x00030fdc add r0, pc                            |     r0 = 0x6207e;
    0x00030fde bl 0x43cd4                            |     zbx_error ();
    0x00030fe2 add.w r3, sp, 0x10000                 |     r3 += arg_10000h;
    0x00030fe6 mov r2, r7                            |     r2 = r7;
    0x00030fe8 adds r3, 0x78                         |     r3 += 0x78;
    0x00030fea mov.w r1, 0x10000                     |     r1 = 0x10000;
    0x00030fec adds r1, 0x80                         |     r1 += 0x80;
    0x00030fee mov r0, r4                            |     r0 = r4;
    0x00030ff0 str r3, [sp, 0x20]                    |     var_20h = r3;
    0x00030ff2 bl 0x440bc                            |     zbx_vsnprintf ()
    0x00030ff6 ldr r0, [pc, 0xa8]                    |     
    0x00030ff8 mov r1, r4                            |     r1 = r4;
    0x00030ffa add r0, pc                            |     r0 = 0x620a0;
    0x00030ffc bl 0x43cd4                            |     zbx_error ();
    0x00031000 b 0x30f8a                             |     goto label_3;
                                                     | label_6:
    0x00031002 ldr r2, [pc, 0xa0]                    |     
    0x00031004 mov r3, r5                            |     r3 = r5;
    0x00031006 movs r1, 1                            |     r1 = 1;
    0x00031008 movs r0, 2                            |     r0 = 2;
    0x0003100a add r2, pc                            |     r2 = 0x620b4;
    0x0003100c blx 0xe084                            |     close (r0);
    0x00031010 b 0x30e36                             |     goto label_0;
                                                     | label_7:
    0x00031012 ldr r0, [pc, 0x94]                    |     
    0x00031014 mov r1, r5                            |     r1 = r5;
    0x00031016 add r0, pc                            |     r0 = 0x620c4;
    0x00031018 bl 0x43cd4                            |     zbx_error ();
    0x0003101c b 0x30eac                             |     goto label_1;
                                                     | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x3a990 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.zbx_set_json_strerror ()         | void zbx_set_json_strerror () {
                                                 |     int16_t var_0h;
                                                 |     int16_t var_4h;
                                                 |     int16_t var_18h;
                                                 |     int16_t var_4h_2;
    0x0003a990 push {r0, r1, r2, r3}             |     
    0x0003a992 movs r1, 0xff                     |     r1 = 0xff;
    0x0003a994 push {r4, r5, lr}                 |     
    0x0003a996 sub sp, 0xc                       |     
    0x0003a998 add r3, sp, 0x18                  |     r3 += var_18h;
    0x0003a99a ldr r5, [pc, 0x98]                |     
    0x0003a99c ldr r0, [pc, 0x98]                |     r0 = *(0x3aa38);
    0x0003a99e ldr r4, [pc, 0x9c]                |     
    0x0003a9a0 add r5, pc                        |     r5 = 0x753da;
    0x0003a9a2 ldr r2, [r3], 4                   |     r2 = *(r3);
                                                 |     r3 += 4;
    0x0003a9a6 ldr r0, [r5, r0]                  |     
    0x0003a9a8 add r4, pc                        |     r4 = 0x753ea;
    0x0003a9aa ldr r0, [r0]                      |     r0 = *(0x753da);
    0x0003a9ac str r0, [sp, 4]                   |     var_4h = r0;
    0x0003a9ae mov.w r0, 0                       |     r0 = 0;
    0x0003a9b2 mov r0, r4                        |     r0 = r4;
    0x0003a9b4 str r3, [sp]                      |     *(sp) = r3;
    0x0003a9b6 bl 0x440bc                        |     r0 = zbx_vsnprintf ()
    0x0003a9ba cmp r0, 0xfe                      |     
                                                 |     if (r0 != 0xfe) {
    0x0003a9bc beq 0x3a9dc                       |         
                                                 | label_0:
    0x0003a9be ldr r2, [pc, 0x80]                |         
    0x0003a9c0 ldr r3, [pc, 0x74]                |         r3 = *(0x3aa38);
    0x0003a9c2 add r2, pc                        |         r2 = 0x75408;
    0x0003a9c4 ldr r3, [r2, r3]                  |         r3 = *(0x75408);
    0x0003a9c6 ldr r2, [r3]                      |         r2 = *(0x75408);
    0x0003a9c8 ldr r3, [sp, 4]                   |         r3 = var_4h;
    0x0003a9ca eors r2, r3                       |         r2 ^= r3;
    0x0003a9cc mov.w r3, 0                       |         r3 = 0;
                                                 |         if (r2 != r3) {
    0x0003a9d0 bne 0x3aa2e                       |             goto label_2;
                                                 |         }
    0x0003a9d2 add sp, 0xc                       |         
    0x0003a9d4 pop.w {r4, r5, lr}                |         
    0x0003a9d8 add sp, 0x10                      |         
    0x0003a9da bx lr                             |         return;
                                                 |     }
    0x0003a9dc ldrb.w r3, [r4, 0xfd]             |     r3 = *((r4 + 0xfd));
    0x0003a9e0 and r3, r3, 0xc0                  |     r3 &= 0xc0;
    0x0003a9e4 cmp r3, 0x80                      |     
                                                 |     if (r3 != 0x80) {
    0x0003a9e6 bne 0x3aa24                       |         goto label_3;
                                                 |     }
    0x0003a9e8 add.w r2, r4, 0xfd                |     r2 = r4 + 0xfd;
    0x0003a9ec mov r5, r0                        |     r5 = r0;
    0x0003a9ee movs r4, 0xfd                     |     r4 = 0xfd;
    0x0003a9f0 b 0x3a9f4                         |     
                                                 |     if (r4 == 0) {
                                                 |         while (r3 == 0x80) {
    0x0003a9f2 cbz r4, 0x3aa1e                   |             goto label_4;
                                                 |         }
    0x0003a9f4 ldrb r3, [r2, -0x1]!              |         r3 = *((r2 -= 0x1));
    0x0003a9f8 subs r4, 1                        |         r4--;
    0x0003a9fa and r3, r3, 0xc0                  |         r3 &= 0xc0;
    0x0003a9fe cmp r3, 0x80                      |         
    0x0003aa00 beq 0x3a9f2                       |         
                                                 |     }
    0x0003aa02 ldr r0, [pc, 0x40]                |     
    0x0003aa04 rsb.w r5, r4, 0xfe                |     r5 = 0xfe - r4;
    0x0003aa08 add r0, pc                        |     r0 = 0x75452;
    0x0003aa0a add r0, r4                        |     r0 += r4;
                                                 | label_1:
    0x0003aa0c bl 0x45a40                        |     r0 = zbx_utf8_char_len ();
    0x0003aa10 cmp r0, r5                        |     
                                                 |     if (r0 == r5) {
    0x0003aa12 beq 0x3a9be                       |         goto label_0;
                                                 |     }
    0x0003aa14 ldr r3, [pc, 0x30]                |     
    0x0003aa16 movs r2, 0                        |     r2 = 0;
    0x0003aa18 add r3, pc                        |     r3 = 0x75464;
    0x0003aa1a strb r2, [r3, r4]                 |     *((r3 + r4)) = r2;
    0x0003aa1c b 0x3a9be                         |     goto label_0;
                                                 | label_4:
    0x0003aa1e ldr r0, [pc, 0x2c]                |     
    0x0003aa20 add r0, pc                        |     r0 = 0x75472;
    0x0003aa22 b 0x3aa0c                         |     goto label_1;
                                                 | label_3:
    0x0003aa24 add.w r0, r4, 0xfd                |     r0 = r4 + 0xfd;
    0x0003aa28 movs r5, 1                        |     r5 = 1;
    0x0003aa2a movs r4, 0xfd                     |     r4 = 0xfd;
    0x0003aa2c b 0x3aa0c                         |     goto label_1;
                                                 | label_2:
    0x0003aa2e blx 0xe158                        |     fcn_0000e158 ();
    0x0003aa32 nop                               |     
    0x0003aa34 asrs r0, r7, 8                    |     r0 = r7 >> 8;
    0x0003aa36 movs r2, r0                       |     r2 = r0;
    0x0003aa38 lsls r4, r2, 0xe                  |     r4 = r2 << 0xe;
    0x0003aa3a movs r0, r0                       |     
    0x0003aa3c subs r1, 0x64                     |     r1 -= 0x64;
    0x0003aa3e movs r2, r0                       |     r2 = r0;
    0x0003aa40 asrs r6, r2, 8                    |     r6 = r2 >> 8;
    0x0003aa42 movs r2, r0                       |     r2 = r0;
    0x0003aa44 subs r1, 4                        |     r1 -= 4;
    0x0003aa46 movs r2, r0                       |     r2 = r0;
    0x0003aa48 subs r0, 0xf4                     |     r0 -= 0xf4;
    0x0003aa4a movs r2, r0                       |     r2 = r0;
    0x0003aa4c subs r0, 0xec                     |     r0 -= 0xec;
    0x0003aa4e movs r2, r0                       |     r2 = r0;
                                                 | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x4100c */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.zbx_setproctitle ()              | void zbx_setproctitle (int16_t arg_1f8h, int16_t arg_2a0h, int16_t arg_2a8h, int16_t arg_804h, int16_t arg_818h) {
                                                 |     int16_t var_80ch;
                                                 |     int16_t var_4h;
                                                 |     int16_t var_818h;
                                                 |     int16_t var_4h_2;
    0x0004100c vst3.8 {d27, d28, d29}, [pc]      |     __asm ("vst3.8 {d27, d28, d29}, [pc]");
    0x00041010 str r0, [r0, 0x10]                |     *((r0 + 0x10)) = r0;
    0x00041012 push {r4, r5, lr}                 |     
    0x00041014 subw sp, sp, 0x80c                |     __asm ("subw sp, sp, 0x80c");
    0x00041018 addw r3, sp, 0x818                |     __asm ("addw r3, arg_818h");
    0x0004101c mov r0, sp                        |     r0 = sp;
    0x0004101e add r5, sp, 4                     |     r5 += var_4h;
    0x00041020 ldr r2, [r3], 4                   |     r2 = *(r3);
                                                 |     r3 += 4;
    0x00041024 ldr.w ip, [pc, 0x68]              |     ip = *(0x00041090);
    0x00041028 ldr r4, [pc, 0x68]                |     
    0x0004102a str r3, [r0]                      |     *(r0) = r3;
    0x0004102c ldr r0, [pc, 0x68]                |     
    0x0004102e add ip, pc                        |     
    0x00041030 add r4, pc                        |     r4 = 0x820c8;
    0x00041032 ldr.w r0, [ip, r0]                |     r0 = *((ip + r0));
    0x00041036 ldr r0, [r0]                      |     r0 = *(0x41098);
    0x00041038 str.w r0, [sp, 0x804]             |     __asm ("str.w r0, [arg_804h]");
    0x0004103c mov.w r0, 0                       |     r0 = 0;
    0x00041040 mov r0, r5                        |     r0 = r5;
    0x00041042 bl 0x440bc                        |     zbx_vsnprintf ()
    0x00041046 ldr r3, [pc, 0x54]                |     r3 = *(0x4109e);
    0x00041048 ldr r3, [r4, r3]                  |     
    0x0004104a ldr r3, [r3]                      |     r3 = *(0x820c8);
    0x0004104c cmp r3, 3                         |     
    0x0004104e bgt 0x41078                       |     
                                                 |     while (1) {
    0x00041050 mov r0, r5                        |         r0 = r5;
    0x00041052 bl 0x434a8                        |         setproctitle_set_status ();
    0x00041056 ldr r2, [pc, 0x48]                |         
    0x00041058 ldr r3, [pc, 0x3c]                |         r3 = *(0x41098);
    0x0004105a add r2, pc                        |         r2 = 0x82100;
    0x0004105c ldr r3, [r2, r3]                  |         r3 = *(0x82100);
    0x0004105e ldr r2, [r3]                      |         r2 = *(0x82100);
    0x00041060 ldr.w r3, [sp, 0x804]             |         r3 = *(arg_804h);
    0x00041064 eors r2, r3                       |         r2 ^= r3;
    0x00041066 mov.w r3, 0                       |         r3 = 0;
    0x00041068 lsls r0, r0, 0xc                  |         r0 <<= 0xc;
                                                 |         if (r0 != r0) {
    0x0004106a bne 0x4108c                       |             goto label_0;
                                                 |         }
    0x0004106c addw sp, sp, 0x80c                |         __asm ("addw sp, var_80ch");
    0x00041070 pop.w {r4, r5, lr}                |         
    0x00041074 add sp, 0x10                      |         
    0x00041076 bx lr                             |         return;
    0x00041078 ldr r2, [pc, 0x28]                |         
    0x0004107a mov r3, r5                        |         r3 = r5;
    0x0004107c ldr r1, [pc, 0x28]                |         
    0x0004107e movs r0, 4                        |         r0 = 4;
    0x00041080 add r2, pc                        |         r2 = 0x82128;
    0x00041082 add r1, pc                        |         r1 = 0x8212e;
    0x00041084 adds r2, 0x90                     |         r2 += 0x90;
    0x00041086 bl 0x30d1c                        |         zbx_zabbix_log ();
    0x0004108a b 0x41050                         |         
                                                 |     }
                                                 | label_0:
    0x0004108c blx 0xe158                        |     fcn_0000e158 ();
    0x00041090 add r3, sp, 0x2a8                 |     r3 += arg_2a8h;
    0x00041092 movs r1, r0                       |     r1 = r0;
    0x00041094 add r3, sp, 0x2a0                 |     r3 += arg_2a0h;
    0x00041096 movs r1, r0                       |     r1 = r0;
    0x00041098 lsls r4, r2, 0xe                  |     r4 = r2 << 0xe;
    0x0004109a movs r0, r0                       |     
    0x0004109c lsls r4, r7, 0xe                  |     r4 = r7 << 0xe;
    0x0004109e movs r0, r0                       |     
    0x000410a0 add r3, sp, 0x1f8                 |     r3 += arg_1f8h;
    0x000410a2 movs r1, r0                       |     r1 = r0;
    0x000410a4 str r4, [r1, 0x1c]                |     *((r1 + 0x1c)) = r4;
    0x000410a6 movs r1, r0                       |     r1 = r0;
    0x000410a8 ldrsh r2, [r2, r7]                |     r2 = *((r2 + r7));
    0x000410aa movs r1, r0                       |     r1 = r0;
                                                 | }

[*] Function printf used 6 times zabbix_agentd