[*] Binary protection state of zabbix_agentd
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function system tear down of zabbix_agentd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2c310 */
| #include <stdint.h>
|
; (fcn) fcn.0002c310 () | void fcn_0002c310 (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0002c310 push {r3, r4, r5, r6, r7, lr} |
0x0002c312 mov r7, r0 | r7 = r0;
0x0002c314 mov r6, r1 | r6 = r1;
0x0002c316 mov r5, r2 | r5 = r2;
0x0002c318 b 0x2c328 |
| while (r0 != 0) {
0x0002c31a adds r3, r4, 1 | r3 = r4 + 1;
| if (r3 != r4) {
0x0002c31c bne 0x2c348 | goto label_0;
| }
0x0002c31e blx 0xc15c | r0 = fcn_0000c15c ();
0x0002c322 ldr r0, [r0] | r0 = *(r0);
0x0002c324 cmp r0, 4 |
| if (r0 != 4) {
0x0002c326 bne 0x2c34c | goto label_1;
| }
0x0002c328 ldr r0, [r7] | r0 = *(r7);
0x0002c32a mov r2, r5 | r2 = r5;
0x0002c32c mov r1, r6 | r1 = r6;
0x0002c32e blx 0xc1f4 | r0 = memchr (r0, r1, r2);
0x0002c332 mov r4, r0 | r4 = r0;
0x0002c334 bl 0x37e28 | r0 = zbx_alarm_timed_out ();
0x0002c338 cmp r0, 0 |
0x0002c33a bne 0x2c31a |
| }
0x0002c33c ldr r0, [pc, 0x20] |
0x0002c33e mov.w r4, -1 | r4 = -1;
0x0002c342 add r0, pc | r0 = 0x586a6;
0x0002c344 bl 0x2c2a8 | fcn_0002c2a8 ();
| label_0:
0x0002c348 mov r0, r4 | r0 = r4;
0x0002c34a pop {r3, r4, r5, r6, r7, pc} |
| label_1:
0x0002c34c bl 0x275f8 | r0 = strerror_from_system ()
0x0002c350 mov r1, r0 | r1 = r0;
0x0002c352 ldr r0, [pc, 0x10] |
0x0002c354 add r0, pc | r0 = 0x586be;
0x0002c356 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c35a mov r0, r4 | r0 = r4;
0x0002c35c pop {r3, r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2c3ac */
| #include <stdint.h>
|
; (fcn) fcn.0002c3ac () | void fcn_0002c3ac (int16_t arg1, int16_t arg2, int16_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0002c3ac push {r3, r4, r5, r6, r7, lr} |
0x0002c3ae mov r7, r0 | r7 = r0;
0x0002c3b0 mov r6, r1 | r6 = r1;
0x0002c3b2 mov r5, r2 | r5 = r2;
0x0002c3b4 b 0x2c3c4 |
| while (r0 != 0) {
0x0002c3b6 adds r3, r4, 1 | r3 = r4 + 1;
| if (r3 != r4) {
0x0002c3b8 bne 0x2c3e4 | goto label_0;
| }
0x0002c3ba blx 0xc15c | r0 = fcn_0000c15c ();
0x0002c3be ldr r0, [r0] | r0 = *(r0);
0x0002c3c0 cmp r0, 4 |
| if (r0 != 4) {
0x0002c3c2 bne 0x2c3e8 | goto label_1;
| }
0x0002c3c4 ldr r0, [r7] | r0 = *(r7);
0x0002c3c6 mov r2, r5 | r2 = r5;
0x0002c3c8 mov r1, r6 | r1 = r6;
0x0002c3ca blx 0xbcac | r0 = fcn_0000bcac ();
0x0002c3ce mov r4, r0 | r4 = r0;
0x0002c3d0 bl 0x37e28 | r0 = zbx_alarm_timed_out ();
0x0002c3d4 cmp r0, 0 |
0x0002c3d6 bne 0x2c3b6 |
| }
0x0002c3d8 ldr r0, [pc, 0x20] |
0x0002c3da mov.w r4, -1 | r4 = -1;
0x0002c3de add r0, pc | r0 = 0x587de;
0x0002c3e0 bl 0x2c2a8 | fcn_0002c2a8 ();
| label_0:
0x0002c3e4 mov r0, r4 | r0 = r4;
0x0002c3e6 pop {r3, r4, r5, r6, r7, pc} |
| label_1:
0x0002c3e8 bl 0x275f8 | r0 = strerror_from_system ()
0x0002c3ec mov r1, r0 | r1 = r0;
0x0002c3ee ldr r0, [pc, 0x10] |
0x0002c3f0 add r0, pc | r0 = 0x587f6;
0x0002c3f2 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c3f6 mov r0, r4 | r0 = r4;
0x0002c3f8 pop {r3, r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2c460 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0002c460 () | void fcn_0002c460 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_1h;
| int16_t var_0h;
| int16_t var_ch_3;
| int16_t var_10h_2;
| int16_t var_4h_2;
| int16_t var_ch_4;
| int16_t var_10h_3;
| int16_t var_2ch;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_30h;
| int16_t var_34h_2;
| int16_t var_3ch_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002c460 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002c464 mov r8, r2 | r8 = r2;
0x0002c466 ldr r2, [pc, 0x240] |
0x0002c468 mov r7, r3 | r7 = r3;
0x0002c46a sub sp, 0x44 |
0x0002c46c mov r5, r1 | r5 = r1;
0x0002c46e ldr r3, [pc, 0x23c] | r3 = *(0x2c6ae);
0x0002c470 movs r1, 0 | r1 = 0;
0x0002c472 add r2, pc | r2 = 0x58b20;
0x0002c474 ldr r4, [sp, 0x70] | r4 = var_10h_2;
0x0002c476 ldrh.w sb, [sp, 0x68] | sb = var_0h;
0x0002c47a mov r6, r0 | r6 = r0;
0x0002c47c ldr r3, [r2, r3] |
0x0002c47e movw r2, 0xdac | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002c482 subs r4, 2 | r4 -= 2;
0x0002c484 bic r4, r4, 2 | r4 = BIT_MASK (r4, 2);
0x0002c488 ldr r3, [r3] | r3 = *(0x58b20);
0x0002c48a str r3, [sp, 0x3c] | var_3ch_2 = r3;
0x0002c48c mov.w r3, 0 | r3 = 0;
0x0002c490 strd r1, r1, [sp, 0xc] | __asm ("strd r1, r1, [var_ch_4]");
0x0002c494 blx 0xc1ac | statvfs64 ();
0x0002c498 cmp r5, 2 |
| if (r5 == 2) {
0x0002c49a beq.w 0x2c5a2 | goto label_6;
| }
0x0002c49e cmp r4, 0 |
| if (r4 == 0) {
0x0002c4a0 beq.w 0x2c694 | goto label_7;
| }
| do {
0x0002c4a4 ldr r2, [pc, 0x208] |
0x0002c4a6 add r4, sp, 0x34 | r4 += var_34h_2;
0x0002c4a8 mov r3, sb | r3 = sb;
0x0002c4aa movs r1, 8 | r1 = 8;
0x0002c4ac add.w sl, sp, 0x14 | sl += var_2ch;
0x0002c4b0 mov r0, r4 | r0 = r4;
0x0002c4b2 add r2, pc | r2 = 0x58b66;
0x0002c4b4 bl 0x38ea0 | zbx_snprintf ();
0x0002c4b8 movs r2, 0x20 | r2 = 0x20;
0x0002c4ba movs r1, 0 | r1 = 0;
0x0002c4bc mov r0, sl | r0 = sl;
0x0002c4be blx 0xc1ac | statvfs64 ();
0x0002c4c0 cdp p6, 7, c4, c6, c1, 1 | __asm ("cdp p6, 7, c4, c6, c1, 1");
0x0002c4c4 add r3, sp, 0xc | r3 += var_ch_4;
0x0002c4c6 mov r2, sl | r2 = sl;
0x0002c4c8 mov r0, r7 | r0 = r7;
0x0002c4ca str r5, [sp, 0x1c] | var_1ch = r5;
0x0002c4cc blx 0xc3e8 | r0 = fcn_0000c3e8 ();
0x0002c4d0 mov r4, r0 | r4 = r0;
0x0002c4d2 cmp r0, 0 |
| if (r0 != 0) {
0x0002c4d4 bne 0x2c5c6 | goto label_8;
| }
0x0002c4d6 ldr r3, [sp, 0xc] | r3 = var_ch_4;
0x0002c4d8 ldr r1, [r3, 8] | r1 = *((r3 + 8));
0x0002c4da ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x0002c4dc ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x0002c4de orr r1, r1, 0x80000 | r1 |= case.0x3207a.11;
0x0002c4e2 blx 0xc400 | r0 = fcn_0000c400 ();
0x0002c4e6 cmp.w r0, -1 |
0x0002c4ea mov fp, r0 |
0x0002c4ec str r0, [r6] | *(r6) = r0;
| if (r0 == -1) {
0x0002c4ee beq.w 0x2c63a | goto label_9;
| }
0x0002c4f2 movs r2, 1 | r2 = 1;
0x0002c4f4 movs r1, 2 | r1 = 2;
0x0002c4f6 blx 0xc29c | shutdown ();
0x0002c4f8 cdp p0, 0xd, c3, c2, c1, 0 | __asm ("cdp p0, 0xd, c3, c2, c1, 0");
| if (r1 == 2) {
0x0002c4fc beq 0x2c5de | goto label_10;
| }
0x0002c4fe cmp r5, 1 |
| if (r5 == 1) {
0x0002c500 beq 0x2c5d6 | goto label_4;
| }
| label_3:
0x0002c502 ldr.w fp, [pc, 0x1b0] |
0x0002c506 add fp, pc | fp = 0x58bc0;
| label_2:
0x0002c508 cmp.w r8, 0 |
| if (r8 != 0) {
0x0002c50c beq 0x2c546 |
0x0002c50e movs r3, 4 | r3 = 4;
0x0002c510 movs r1, 0 | r1 = 0;
0x0002c512 str r3, [sp, 0x14] | var_2ch = r3;
0x0002c514 mov r2, sl | r2 = sl;
0x0002c516 add r3, sp, 0x10 | r3 += var_10h_3;
0x0002c518 mov r0, r8 | r0 = r8;
0x0002c51a str r5, [sp, 0x1c] | var_1ch = r5;
0x0002c51c str r1, [sp, 0x18] | var_18h = r1;
0x0002c51e strd r1, r1, [sp, 0x20] | __asm ("strd r1, r1, [sp, 0x20]");
0x0002c522 strd r1, r1, [sp, 0x28] | __asm ("strd r1, r1, [sp, 0x28]");
0x0002c526 str r1, [sp, 0x30] | var_30h = r1;
0x0002c528 blx 0xc3e8 | r0 = fcn_0000c3e8 ();
0x0002c52c cmp r0, 0 |
| if (r0 != 0) {
0x0002c52e bne.w 0x2c656 | goto label_11;
| }
0x0002c532 ldr r3, [sp, 0x10] | r3 = var_10h_3;
0x0002c534 ldr r0, [r6] | r0 = *(r6);
0x0002c536 ldrd r2, r1, [r3, 0x10] | __asm ("ldrd r2, r1, [r3, 0x10]");
0x0002c538 movs r1, 4 | r1 = 4;
0x0002c53a blx 0xc190 | r0 = fcn_0000c190 ();
0x0002c53e adds r2, r0, 1 | r2 = r0 + 1;
0x0002c540 mov r5, r0 | r5 = r0;
| if (r2 == r0) {
0x0002c542 beq.w 0x2c678 | goto label_12;
| }
| }
0x0002c546 ldr r3, [sp, 0xc] | r3 = var_ch_4;
0x0002c548 ldrd r2, r5, [r3, 0x10] | __asm ("ldrd r2, r5, [r3, 0x10]");
0x0002c54c ldr r3, [sp, 0x6c] | r3 = var_ch_3;
0x0002c54e cmp r3, 0 |
| if (r3 != 0) {
0x0002c550 bne.w 0x2c66a | goto label_13;
| }
| label_5:
0x0002c554 mov r1, r5 | r1 = r5;
0x0002c556 ldr r0, [r6] | r0 = *(r6);
0x0002c558 blx 0xc488 | r0 = fcn_0000c488 ();
0x0002c55c adds r3, r0, 1 | r3 = r0 + 1;
0x0002c55e mov r5, r0 | r5 = r0;
| if (r3 == r0) {
0x0002c560 beq 0x2c5fc | goto label_14;
| }
0x0002c562 movs r3, 1 | r3 = 1;
0x0002c564 mov.w r2, 0x100 | r2 = case.0x3207a.11;
0x0002c568 mov r1, r7 | r1 = r7;
0x0002c56a addw r0, r6, 0xca8 | __asm ("addw r0, r6, case.0x3207a.11");
0x0002c56e str r3, [r6, 0x14] | *((r6 + 0x14)) = r3;
0x0002c570 bl 0x394f0 | zbx_strlcpy ();
| label_1:
0x0002c574 ldr r0, [sp, 0xc] | r0 = var_ch_4;
| if (r0 != 0) {
0x0002c576 cbz r0, 0x2c57c |
0x0002c578 blx 0xc3dc | fcn_0000c3dc ();
| }
0x0002c57c ldr r0, [sp, 0x10] | r0 = var_10h_3;
| if (r0 != 0) {
0x0002c57e cbz r0, 0x2c584 |
0x0002c580 blx 0xc3dc | fcn_0000c3dc ();
| }
| label_0:
0x0002c584 ldr r2, [pc, 0x130] |
0x0002c586 ldr r3, [pc, 0x124] | r3 = *(0x2c6ae);
0x0002c588 add r2, pc | r2 = 0x58c44;
0x0002c58a ldr r3, [r2, r3] | r3 = *(0x58c44);
0x0002c58c ldr r2, [r3] | r2 = *(0x58c44);
0x0002c58e ldr r3, [sp, 0x3c] | r3 = var_3ch_2;
0x0002c590 eors r2, r3 | r2 ^= r3;
0x0002c592 mov.w r3, 0 | r3 = 0;
0x0002c594 lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x0002c596 bne.w 0x2c6a2 | goto label_15;
| }
0x0002c59a mov r0, r4 | r0 = r4;
0x0002c59c add sp, 0x44 |
0x0002c59e pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x0002c5a2 cmp r4, 0 |
0x0002c5a4 bne.w 0x2c4a4 |
| } while (r4 != 0);
0x0002c5a8 ldr r3, [pc, 0x110] |
0x0002c5aa mov.w r4, -1 | r4 = -1;
0x0002c5ae ldr r2, [pc, 0x110] |
0x0002c5b0 ldr r1, [pc, 0x110] |
0x0002c5b2 ldr r0, [pc, 0x114] |
0x0002c5b4 add r3, pc | r3 = 0x58c74;
0x0002c5b6 add r2, pc | r2 = 0x58c7c;
0x0002c5b8 add r1, pc | r1 = 0x58c80;
0x0002c5ba add r0, pc | r0 = 0x58c88;
0x0002c5bc bl 0x38c64 | zbx_error ();
0x0002c5c0 bl 0x2b778 | zbx_backtrace ();
0x0002c5c4 b 0x2c584 | goto label_0;
| label_8:
0x0002c5c6 ldr r0, [pc, 0x104] |
0x0002c5c8 mov r1, r7 | r1 = r7;
0x0002c5ca mov.w r4, -1 | r4 = -1;
0x0002c5ce add r0, pc | r0 = 0x58ca0;
0x0002c5d0 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c5d4 b 0x2c574 | goto label_1;
| label_4:
0x0002c5d6 ldr.w fp, [pc, 0xf8] |
0x0002c5da add fp, pc | fp = 0x58cb0;
0x0002c5dc b 0x2c508 | goto label_2;
| label_10:
0x0002c5de blx 0xc15c | r0 = fcn_0000c15c ();
0x0002c5e2 ldr r0, [r0] | r0 = *(r0);
0x0002c5e4 bl 0x275f8 | r0 = strerror_from_system ()
0x0002c5e8 mov r3, r0 | r3 = r0;
0x0002c5ea ldr r0, [pc, 0xe8] |
0x0002c5ec mov r2, sb | r2 = sb;
0x0002c5ee mov r1, r7 | r1 = r7;
0x0002c5f0 add r0, pc | r0 = 0x58cca;
0x0002c5f2 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c5f6 cmp r5, 1 |
| if (r5 != 1) {
0x0002c5f8 bne 0x2c502 | goto label_3;
| }
0x0002c5fa b 0x2c5d6 | goto label_4;
| label_14:
0x0002c5fc blx 0xc15c | r0 = fcn_0000c15c ();
0x0002c600 ldr r0, [r0] | r0 = *(r0);
0x0002c602 mov r4, r5 | r4 = r5;
0x0002c604 bl 0x275f8 | r0 = strerror_from_system ()
0x0002c608 mov r3, r0 | r3 = r0;
0x0002c60a ldr r0, [pc, 0xcc] |
0x0002c60c movs r2, 0 | r2 = 0;
0x0002c60e mov.w r1, 0x1e0 | r1 = case.0x3207a.11;
0x0002c612 add r0, pc | r0 = 0x58cf0;
0x0002c614 bl 0x35d28 | r0 = zbx_strdup2 ();
0x0002c618 mov r8, r0 | r8 = r0;
0x0002c61a mov r0, r6 | r0 = r6;
0x0002c61c blx fp | fp (r0);
0x0002c61e ldr r0, [pc, 0xbc] |
0x0002c620 mov r3, r8 | r3 = r8;
0x0002c622 mov r2, sb | r2 = sb;
0x0002c624 mov r1, r7 | r1 = r7;
0x0002c626 add r0, pc | r0 = 0x58d08;
0x0002c628 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c62c cmp.w r8, 0 |
| if (r8 == 0) {
0x0002c630 beq 0x2c574 | goto label_1;
| }
0x0002c632 mov r0, r8 | r0 = r8;
0x0002c634 blx 0xbd14 | gai_strerror ();
0x0002c638 b 0x2c574 | goto label_1;
| label_9:
0x0002c63a blx 0xc15c | r0 = fcn_0000c15c ();
0x0002c63e ldr r0, [r0] | r0 = *(r0);
0x0002c640 mov r4, fp | r4 = fp;
0x0002c642 bl 0x275f8 | r0 = strerror_from_system ()
0x0002c646 mov r3, r0 | r3 = r0;
0x0002c648 ldr r0, [pc, 0x94] |
0x0002c64a mov r2, sb | r2 = sb;
0x0002c64c mov r1, r7 | r1 = r7;
0x0002c64e add r0, pc | r0 = 0x58d32;
0x0002c650 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c654 b 0x2c574 | goto label_1;
| label_11:
0x0002c656 ldr r0, [pc, 0x8c] |
0x0002c658 mov r1, r8 | r1 = r8;
0x0002c65a mov.w r4, -1 | r4 = -1;
0x0002c65e add r0, pc | r0 = 0x58d48;
0x0002c660 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c664 mov r0, r6 | r0 = r6;
0x0002c666 blx fp | fp (r0);
0x0002c668 b 0x2c574 | goto label_1;
| label_13:
0x0002c66a mov r0, r3 | r0 = r3;
0x0002c66c str r3, [r6, 0x18] | *((r6 + 0x18)) = r3;
0x0002c66e str r2, [sp, 4] | var_4h_2 = r2;
0x0002c670 bl 0x37e00 | zbx_alarm_on ();
0x0002c674 ldr r2, [sp, 4] | r2 = var_4h_2;
0x0002c676 b 0x2c554 | goto label_5;
| label_12:
0x0002c678 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002c67c ldr r0, [r0] | r0 = *(r0);
0x0002c67e mov r4, r5 | r4 = r5;
0x0002c680 bl 0x275f8 | r0 = strerror_from_system ()
0x0002c684 mov r1, r0 | r1 = r0;
0x0002c686 ldr r0, [pc, 0x60] |
0x0002c688 add r0, pc | r0 = 0x58d76;
0x0002c68a bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c68e mov r0, r6 | r0 = r6;
0x0002c690 blx fp | fp (r0);
0x0002c692 b 0x2c574 | goto label_1;
| label_7:
0x0002c694 ldr r0, [pc, 0x54] |
0x0002c696 mov.w r4, -1 | r4 = -1;
0x0002c698 adds r4, 0xff | r4 += 0xff;
0x0002c69a add r0, pc | r0 = 0x58d8a;
0x0002c69c bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002c6a0 b 0x2c584 | goto label_0;
| label_15:
0x0002c6a2 blx 0xbe48 | fcn_0000be48 ();
0x0002c6a6 nop |
0x0002c6a8 lsls r2, r7, 0x1d | r2 = r7 << 0x1d;
0x0002c6aa movs r3, r0 | r3 = r0;
0x0002c6ac lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x0002c6ae movs r0, r0 |
0x0002c6b0 ldm r5!, {r1, r2, r6, r7} | r1 = *(r5!);
| r2 = *((r5! + 4));
| r6 = *((r5! + 8));
| r7 = *((r5! + 12));
0x0002c6b2 movs r1, r0 | r1 = r0;
0x0002c6b4 lsls r7, r4, 7 | r7 = r4 << 7;
0x0002c6b6 movs r0, r0 |
0x0002c6b8 lsls r4, r4, 0x19 | r4 <<= 0x19;
0x0002c6ba movs r3, r0 | r3 = r0;
0x0002c6bc ldrh r4, [r2, r0] | r4 = *((r2 + r0));
0x0002c6be movs r1, r0 | r1 = r0;
| if (r1 < r0) {
0x0002c6c0 bmi 0x2c788 | goto label_16;
| }
0x0002c6c2 movs r1, r0 | r1 = r0;
0x0002c6c4 ldm r4, {r2, r4, r7} | r2 = *(r4);
| r4 = *((r4 + 4));
| r7 = *((r4 + 8));
0x0002c6c6 movs r1, r0 | r1 = r0;
0x0002c6c8 ldrb r6, [r0, r1] | r6 = *((r0 + r1));
0x0002c6ca movs r1, r0 | r1 = r0;
0x0002c6cc ldm r4!, {r1, r2, r3, r5, r7} | r1 = *(r4!);
| r2 = *((r4! + 4));
| r3 = *((r4! + 8));
| r5 = *((r4! + 12));
| r7 = *((r4! + 16));
0x0002c6ce movs r1, r0 | r1 = r0;
0x0002c6d0 lsls r3, r1, 5 | r3 = r1 << 5;
0x0002c6d2 movs r0, r0 |
0x0002c6d4 ldm r4!, {r2, r6, r7} | r2 = *(r4!);
| r6 = *((r4! + 4));
| r7 = *((r4! + 8));
0x0002c6d6 movs r1, r0 | r1 = r0;
0x0002c6d8 ldm r4, {r1, r3, r4, r5} | r1 = *(r4);
| r3 = *((r4 + 4));
| r4 = *((r4 + 8));
| r5 = *((r4 + 12));
0x0002c6da movs r1, r0 | r1 = r0;
0x0002c6dc ldm r5!, {r1, r2, r3} | r1 = *(r5!);
| r2 = *((r5! + 4));
| r3 = *((r5! + 8));
0x0002c6de movs r1, r0 | r1 = r0;
0x0002c6e0 ldm r4!, {r1, r6} | r1 = *(r4!);
| r6 = *((r4! + 4));
0x0002c6e2 movs r1, r0 | r1 = r0;
0x0002c6e4 ldm r4!, {r1, r5, r7} | r1 = *(r4!);
| r5 = *((r4! + 4));
| r7 = *((r4! + 8));
0x0002c6e6 movs r1, r0 | r1 = r0;
0x0002c6e8 ldm r4, {r3, r4, r7} | r3 = *(r4);
| r4 = *((r4 + 4));
| r7 = *((r4 + 8));
0x0002c6ea movs r1, r0 | r1 = r0;
0x0002c6ec ldm r3, {r1, r3, r4, r5, r7} | r1 = *(r3);
| r3 = *((r3 + 4));
| r4 = *((r3 + 8));
| r5 = *((r3 + 12));
| r7 = *((r3 + 16));
0x0002c6ee movs r1, r0 | r1 = r0;
| do {
0x0002c742 pop {r4, pc} |
| label_16:
0x0002c788 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x0002c78a adds r3, r0, 1 | r3 = r0 + 1;
0x0002c78c beq 0x2c742 |
| } while (r3 == r0);
0x0002c78e pop.w {r4, lr} |
0x0002c792 b.w 0xc478 | return void (*0xc478)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2e0cc */
| #include <stdint.h>
|
; (fcn) fcn.0002e0cc () | void fcn_0002e0cc (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int32_t var_0h_2;
| int16_t var_ch;
| int32_t var_ch_2;
| int16_t var_14h;
| int16_t var_94h;
| int16_t var_98h;
| r0 = arg1;
| r1 = arg2;
0x0002e0cc push.w {r4, r5, r6, r7, r8, lr} |
0x0002e0d0 sub sp, 0x98 |
0x0002e0d2 ldr r5, [pc, 0xf0] |
0x0002e0d4 mov r8, r1 | r8 = r1;
0x0002e0d6 ldr r4, [pc, 0xf0] | r4 = *(0x2e1ca);
0x0002e0d8 add r5, pc | r5 = 0x5c2a2;
0x0002e0da ldr r3, [pc, 0xf0] |
0x0002e0dc ldr r2, [pc, 0xf0] | r2 = *(0x2e1d0);
0x0002e0de ldr r4, [r5, r4] |
0x0002e0e0 mov r5, r0 | r5 = r0;
0x0002e0e2 add r3, pc | r3 = 0x5c2b4;
0x0002e0e4 ldr r4, [r4] | r4 = *(0x5c2a2);
0x0002e0e6 str r4, [sp, 0x94] | var_94h = r4;
0x0002e0e8 mov.w r4, 0 | r4 = 0;
0x0002e0ec ldr r6, [r3, r2] | r6 = *(0x5c2b4);
0x0002e0ee ldr r3, [r6] | r3 = *(0x5c2b4);
0x0002e0f0 cmp r3, 3 |
| if (r3 > 3) {
0x0002e0f2 bgt 0x2e1b0 | goto label_2;
| }
0x0002e0f4 movs r7, 0 | r7 = 0;
0x0002e0f6 add r4, sp, 0x14 | r4 += var_14h;
0x0002e0f8 movw r3, 0x86a0 | r3 = (r3 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002e0fc mov r1, r7 | r1 = r7;
0x0002e0fe movt r3, 1 | r3 = (r3 & 0xFFFF) | 0x10000;
0x0002e102 movs r2, 0x80 | r2 = 0x80;
0x0002e104 mov r0, r4 | r0 = r4;
0x0002e106 strd r7, r3, [sp, 0xc] | __asm ("strd r7, r3, [var_ch]");
0x0002e10a blx 0xc1ac | statvfs64 ();
0x0002e10e mov r0, r5 | r0 = r5;
0x0002e110 blx 0xbed0 | wait ();
0x0002e114 add r3, sp, 0x98 | r3 += var_98h;
0x0002e116 cmp r8, r7 |
0x0002e118 add.w ip, r3, r0, lsl 2 |
0x0002e11c mov.w r2, 1 | r2 = 1;
0x0002e120 mov r3, r7 | r3 = r7;
0x0002e122 ldr r1, [ip, -0x84] | r1 = var_14h;
0x0002e126 and r7, r5, 0x1f | r7 = r5 & 0x1f;
0x0002e12a lsl.w r2, r2, r7 | r2 <<= r7;
0x0002e12e add.w r0, r5, 1 | r0 = r5 + 1;
0x0002e132 orr.w r2, r2, r1 | r2 |= r1;
0x0002e136 it eq |
| if (r8 != r7) {
0x0002e138 moveq r1, r4 | r1 = r4;
| }
0x0002e13a str r2, [ip, -0x84] | var_14h = r2;
0x0002e13e add r2, sp, 0xc | r2 += var_ch;
0x0002e140 str r2, [sp] | *(sp) = r2;
0x0002e142 itte ne |
| if (r8 == r7) {
0x0002e144 movne r1, r3 | r1 = r3;
| }
| if (r8 == r7) {
0x0002e146 movne r2, r4 | r2 = r4;
| }
| if (r8 != r7) {
0x0002e148 moveq r2, r3 | r2 = r3;
| }
0x0002e14a blx 0xbdf4 | r0 = fcn_0000bdf4 ();
0x0002e14e adds r3, r0, 1 | r3 = r0 + 1;
0x0002e150 mov r4, r0 | r4 = r0;
| if (r3 == r0) {
0x0002e152 beq 0x2e188 | goto label_3;
| }
| label_1:
0x0002e154 ldr r3, [r6] | r3 = *(r6);
0x0002e156 cmp r3, 3 |
0x0002e158 bgt 0x2e176 |
| while (1) {
| label_0:
0x0002e15a ldr r2, [pc, 0x78] |
0x0002e15c ldr r3, [pc, 0x68] | r3 = *(0x2e1c8);
0x0002e15e add r2, pc | r2 = 0x5c338;
0x0002e160 ldr r3, [r2, r3] | r3 = *(0x5c338);
0x0002e162 ldr r2, [r3] | r2 = *(0x5c338);
0x0002e164 ldr r3, [sp, 0x94] | r3 = var_94h;
0x0002e166 eors r2, r3 | r2 ^= r3;
0x0002e168 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002e16c bne 0x2e1c0 | goto label_4;
| }
0x0002e16e mov r0, r4 | r0 = r4;
0x0002e170 add sp, 0x98 |
0x0002e172 pop.w {r4, r5, r6, r7, r8, pc} |
0x0002e176 ldr r2, [pc, 0x60] |
0x0002e178 mov r3, r4 | r3 = r4;
0x0002e17a ldr r1, [pc, 0x60] |
0x0002e17c movs r0, 4 | r0 = 4;
0x0002e17e add r2, pc | r2 = 0x5c35c;
0x0002e180 add r1, pc | r1 = 0x5c362;
0x0002e182 bl 0x271b0 | zbx_zabbix_log ();
0x0002e186 b 0x2e15a |
| }
| label_3:
0x0002e188 ldr r3, [r6] | r3 = *(r6);
0x0002e18a cmp r3, 3 |
| if (r3 <= 3) {
0x0002e18c ble 0x2e15a | goto label_0;
| }
0x0002e18e blx 0xc15c | r0 = fcn_0000c15c ();
0x0002e192 ldr r5, [r0] | r5 = *(r0);
0x0002e194 mov r0, r5 | r0 = r5;
0x0002e196 bl 0x275f8 | strerror_from_system ()
0x0002e19a ldr r2, [pc, 0x44] |
0x0002e19c mov r3, r4 | r3 = r4;
0x0002e19e ldr r1, [pc, 0x44] |
0x0002e1a0 strd r5, r0, [sp] | __asm ("strd r5, r0, [sp]");
0x0002e1a4 movs r0, 4 | r0 = 4;
0x0002e1a6 add r2, pc | r2 = 0x5c38c;
0x0002e1a8 add r1, pc | r1 = 0x5c392;
0x0002e1aa bl 0x271b0 | zbx_zabbix_log ();
0x0002e1ae b 0x2e154 | goto label_1;
| label_2:
0x0002e1b0 ldr r2, [pc, 0x34] |
0x0002e1b2 movs r0, 4 | r0 = 4;
0x0002e1b4 ldr r1, [pc, 0x34] |
0x0002e1b6 add r2, pc | r2 = 0x5c3a2;
0x0002e1b8 add r1, pc | r1 = 0x5c3a8;
0x0002e1ba bl 0x271b0 | zbx_zabbix_log ();
0x0002e1bc vqshl.u64 d30, d9, 0x39 | __asm ("vqshl.u64 d30, d9, 0x39");
| label_4:
0x0002e1c0 blx 0xbe48 | fcn_0000be48 ();
0x0002e1c4 adds.w r0, r4, r2 | r0 = r4 + r2;
0x0002e1c8 lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x0002e1ca movs r0, r0 |
0x0002e1cc add.w r0, sl, r2 | r0 = sl + r2;
0x0002e1d0 lsls r0, r6, 0xe | r0 = r6 << 0xe;
0x0002e1d2 movs r0, r0 |
0x0002e1d4 eor.w r0, lr, r2 | r0 = lr ^ r2;
0x0002e1d8 rev16 r6, r7 | __asm ("rev16 r6, r7");
0x0002e1da movs r1, r0 | r1 = r0;
0x0002e1dc ldr r7, [pc, 0x360] | r7 = *(0x2e540);
0x0002e1de movs r1, r0 | r1 = r0;
0x0002e1e0 rev16 r6, r2 | __asm ("rev16 r6, r2");
0x0002e1e2 movs r1, r0 | r1 = r0;
0x0002e1e4 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2e1f0 */
| #include <stdint.h>
|
; (fcn) fcn.0002e1f0 () | void fcn_0002e1f0 (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x0002e1f0 bmi 0xbc0eac |
0x0002e1f4 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0002e1f8 mov r5, r0 | r5 = r0;
0x0002e1fa add r3, pc | r3 += pc;
0x0002e1fc sub sp, 8 |
0x0002e1fe mov r8, r1 | r8 = r1;
0x0002e200 ldr.w sb, [r3, r2] | sb = *((r3 + r2));
0x0002e204 ldr.w r3, [sb] | r3 = *(sb);
0x0002e208 cmp r3, 3 |
| if (r3 > 3) {
0x0002e20a bgt 0x2e270 | goto label_3;
| }
| label_1:
0x0002e20c ldr r6, [pc, 0xa0] |
0x0002e20e ldr.w sl, [pc, 0xa4] |
0x0002e212 add r6, pc | r6 = 0x5c4c6;
0x0002e214 add sl, pc | sl = 0x5c4ce;
0x0002e216 adds r6, 0x14 | r6 += 0x14;
| do {
0x0002e218 movs r2, 1 | r2 = 1;
0x0002e21a mov r1, r8 | r1 = r8;
0x0002e21c mov r0, r5 | r0 = r5;
0x0002e21e blx 0xbcac | r0 = fcn_0000bcac ();
0x0002e222 adds r3, r0, 1 | r3 = r0 + 1;
0x0002e224 mov r4, r0 | r4 = r0;
| if (r3 != r0) {
0x0002e226 bne 0x2e29c | goto label_4;
| }
0x0002e228 blx 0xc15c | fcn_0000c15c ();
0x0002e22c ldr.w r3, [sb] | r3 = *(sb);
0x0002e230 ldr r7, [r0] | r7 = *(r0);
0x0002e232 cmp r3, 3 |
| if (r3 > 3) {
0x0002e234 bgt 0x2e258 | goto label_5;
| }
| label_0:
0x0002e236 cmp r7, 0xb |
0x0002e238 mov.w r1, 0 | r1 = 0;
0x0002e23c mov r0, r5 | r0 = r5;
| if (r7 != 0xb) {
0x0002e23e bne 0x2e2a0 | goto label_6;
| }
0x0002e240 bl 0x2e0cc | r0 = fcn_0002e0cc (r0, r1);
0x0002e244 subs r4, r0, 0 | r4 = r0 - 0;
0x0002e246 bgt 0x2e218 |
| } while (r4 > r0);
| do {
| label_2:
0x0002e248 ldr.w r3, [sb] | r3 = *(sb);
0x0002e24c cmp r3, 3 |
| if (r3 <= 3) {
0x0002e24e bgt 0x2e282 |
0x0002e250 mov r0, r4 | r0 = r4;
0x0002e252 add sp, 8 |
0x0002e254 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_5:
0x0002e258 mov r0, r7 | r0 = r7;
0x0002e25a bl 0x275f8 | strerror_from_system ()
0x0002e25e mov r3, r4 | r3 = r4;
0x0002e260 str r0, [sp, 4] | var_4h = r0;
0x0002e262 mov r2, r6 | r2 = r6;
0x0002e264 mov r1, sl | r1 = sl;
0x0002e266 movs r0, 4 | r0 = 4;
0x0002e268 str r7, [sp] | *(sp) = r7;
0x0002e26a bl 0x271b0 | zbx_zabbix_log ();
0x0002e26e b 0x2e236 | goto label_0;
| label_3:
0x0002e270 ldr r2, [pc, 0x44] |
0x0002e272 movs r0, 4 | r0 = 4;
0x0002e274 ldr r1, [pc, 0x44] |
0x0002e276 add r2, pc | r2 = 0x5c532;
0x0002e278 add r1, pc | r1 = 0x5c538;
0x0002e27a adds r2, 0x14 | r2 += 0x14;
0x0002e27c bl 0x271b0 | zbx_zabbix_log ();
0x0002e280 b 0x2e20c | goto label_1;
| }
0x0002e282 ldr r2, [pc, 0x3c] |
0x0002e284 mov r3, r4 | r3 = r4;
0x0002e286 ldr r1, [pc, 0x3c] |
0x0002e288 movs r0, 4 | r0 = 4;
0x0002e28a add r2, pc | r2 = 0x5c550;
0x0002e28c add r1, pc | r1 = 0x5c556;
0x0002e28e adds r2, 0x14 | r2 += 0x14;
0x0002e290 bl 0x271b0 | zbx_zabbix_log ();
0x0002e294 mov r0, r4 | r0 = r4;
0x0002e296 add sp, 8 |
0x0002e298 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_4:
0x0002e29c cmp r0, 0 |
0x0002e29e bne 0x2e248 |
| } while (r0 != 0);
| label_6:
0x0002e2a0 mov.w r4, -1 | r4 = -1;
0x0002e2a4 b 0x2e248 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2ea40 */
| #include <stdint.h>
|
; (fcn) sym.telnet_execute () | void telnet_execute (int16_t arg_10000h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_2ch;
| int16_t var_30h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002ea40 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002ea44 sub.w sp, sp, 0x10000 |
0x0002ea48 ldr r6, [pc, 0x370] |
0x0002ea4a sub sp, 0x34 |
0x0002ea4c add.w r7, sp, 0x10000 | r7 += arg_10000h;
0x0002ea50 mov sb, r0 | sb = r0;
0x0002ea52 ldr r5, [pc, 0x36c] | r5 = *(0x2edc2);
0x0002ea54 adds r7, 0x2c | r7 += 0x2c;
0x0002ea56 add r6, pc | r6 = 0x5d816;
0x0002ea58 ldr r4, [pc, 0x368] |
0x0002ea5a ldr r5, [r6, r5] |
0x0002ea5c add r4, pc | r4 = server_num;
0x0002ea5e ldr r5, [r5] | r5 = imp.__environ;
0x0002ea60 str r5, [r7] | *(r7) = r5;
0x0002ea62 mov.w r5, 0 | r5 = 0;
0x0002ea66 strd r2, r3, [sp, 0x14] | __asm ("strd r2, r3, [sp, 0x14]");
0x0002ea6a ldr r2, [pc, 0x35c] | r2 = *(0x2edca);
0x0002ea6c mov r3, r4 | r3 = r4;
0x0002ea6e mov r5, r1 | r5 = r1;
0x0002ea70 ldr r3, [r4, r2] |
0x0002ea72 str r3, [sp, 0x10] | var_10h = r3;
0x0002ea74 ldr r3, [r3] | r3 = imp.__environ;
0x0002ea76 cmp r3, 3 |
| if (r3 > 3) {
0x0002ea78 bgt.w 0x2ed6a | goto label_13;
| }
| label_8:
0x0002ea7c ldr r4, [pc, 0x34c] |
0x0002ea7e mov r0, r5 | r0 = r5;
0x0002ea80 add r6, sp, 0x30 | r6 += var_30h;
0x0002ea82 blx 0xc114 | fcn_0000c114 ();
0x0002ea86 add r4, pc | r4 = 0x5d856;
0x0002ea88 add.w r8, r0, 1 | r8 = r0 + 1;
0x0002ea8c mov r7, r6 | r7 = r6;
0x0002ea8e mov r3, r8 | r3 = r8;
0x0002ea90 str r0, [r7, -0x8]! | *((r7 -= 0x8)) = r0;
0x0002ea94 movs r2, 0 | r2 = 0;
0x0002ea96 movw r1, 0x1a7 | r1 = (r1 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002ea9a mov r0, r4 | r0 = r4;
0x0002ea9c bl 0x35c28 | zbx_malloc2 ();
0x0002eaa0 mov r2, r8 | r2 = r8;
0x0002eaa2 mov r1, r5 | r1 = r5;
0x0002eaa4 mov r8, r0 | r8 = r0;
0x0002eaa6 str r0, [sp, 0xc] | var_ch = r0;
0x0002eaa8 bl 0x394f0 | zbx_strlcpy ();
0x0002eaac mov r0, r8 | r0 = r8;
0x0002eaae mov r1, r7 | r1 = r7;
0x0002eab0 bl 0x2e050 | fcn_0002e050 (r0, r1);
0x0002eab4 mov r0, r4 | r0 = r4;
0x0002eab6 ldr r4, [r6, -0x8] | r4 = *((r6 - 0x8));
0x0002eaba movs r2, 0 | r2 = 0;
0x0002eabc mov.w r1, 0x1ac | r1 = case.0x3207a.11;
0x0002eac0 mov r5, r8 | r5 = r8;
0x0002eac2 str r4, [sp, 8] | var_8h = r4;
0x0002eac4 lsls r3, r4, 1 | r3 = r4 << 1;
0x0002eac6 adds r3, 1 | r3++;
0x0002eac8 bl 0x35c28 | r0 = zbx_malloc2 ();
0x0002eacc mov r8, r0 | r8 = r0;
0x0002eace cmp r4, 0 |
| if (r4 == 0) {
0x0002ead0 beq.w 0x2ed8c | goto label_14;
| }
0x0002ead4 subs r4, 1 | r4--;
0x0002ead6 subs r3, r5, 1 | r3 = r5 - 1;
0x0002ead8 add r4, r5 | r4 += r5;
0x0002eada movs r2, 0 | r2 = 0;
0x0002eadc movs r7, 0xd | r7 = 0xd;
| do {
0x0002eade ldrb r1, [r3, 1]! | r1 = *((r3 += 1));
0x0002eae2 adds r0, r2, 1 | r0 = r2 + 1;
0x0002eae4 cmp r1, 0xa |
0x0002eae6 ittee eq |
| if (r1 != 0xa) {
0x0002eae8 strbeq r7, [r8, r2] | *((r8 + r2)) = r7;
| }
| if (r1 == 0xa) {
0x0002eaec addne r2, 2 | r2 += 2;
| }
| if (r1 == 0xa) {
0x0002eaee strbne r1, [r8, r2] | *((r8 + r2)) = r1;
| }
| if (r1 != 0xa) {
0x0002eaf2 mov r2, r0 | r2 = r0;
| }
0x0002eaf4 it eq |
| if (r1 != 0xa) {
0x0002eaf6 strbeq r1, [r8, r0] | *((r8 + r0)) = r1;
| }
0x0002eafa cmp r4, r3 |
0x0002eafc bne 0x2eade |
| } while (r4 != r3);
| label_10:
0x0002eafe mov r1, r8 | r1 = r8;
0x0002eb00 mov r0, sb | r0 = sb;
0x0002eb02 bl 0x2e2c8 | fcn_0002e2c8 (r0, r1, r2);
0x0002eb06 ldr.w fp, [pc, 0x2c8] | fp = *(0x0002edd0);
0x0002eb0a movs r2, 2 | r2 = 2;
0x0002eb0c ldr r1, [pc, 0x2c4] |
0x0002eb0e mov r0, sb | r0 = sb;
0x0002eb10 add.w sl, sp, 0x24 | sl += var_24h;
0x0002eb14 add r5, sp, 0x20 | r5 += var_20h;
0x0002eb16 add fp, pc |
0x0002eb18 add r4, sp, 0x2c | r4 += var_2ch;
0x0002eb1a add r1, pc | r1 = 0x5d8f2;
0x0002eb1c bl 0x2e2c8 | fcn_0002e2c8 (r0, r1, r2);
0x0002eb20 mov.w r2, 0x10000 | r2 = case.0x3207a.11;
0x0002eb24 movs r3, 0 | r3 = 0;
0x0002eb26 strd r2, r3, [r6, -0x10] | __asm ("strd r2, r3, [r6, -0x10]");
0x0002eb28 movs r3, 4 | r3 = 4;
| label_0:
0x0002eb2a mov r3, sl | r3 = sl;
0x0002eb2c mov r2, r5 | r2 = r5;
0x0002eb2e mov r1, r4 | r1 = r4;
0x0002eb30 mov r0, sb | r0 = sb;
0x0002eb32 bl 0x2e3a4 | r0 = fcn_0002e3a4 (r0, r1, r2, r3);
0x0002eb36 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x0002eb38 beq.w 0x2ecbc | goto label_15;
| }
0x0002eb3c ldr r0, [r6, -0xc] | r0 = *((r6 - 0xc));
0x0002eb40 add r0, r4 | r0 += r4;
0x0002eb42 b 0x2eb4c |
| while (r4 != r0) {
0x0002eb44 ldrb r3, [r0, -0x1]! | r3 = *((r0 -= 0x1));
0x0002eb48 cmp r3, 0x20 |
| if (r3 != 0x20) {
0x0002eb4a bne 0x2eb52 | goto label_16;
| }
0x0002eb4c cmp r4, r0 |
0x0002eb4e bne 0x2eb44 |
| }
0x0002eb50 movs r3, 0 | r3 = 0;
| label_16:
0x0002eb52 ldrb.w r7, [fp] | r7 = *(fp);
0x0002eb56 cmp r7, r3 |
| if (r7 != r3) {
0x0002eb58 bne 0x2eb2a | goto label_0;
| }
0x0002eb5a mov r1, sl | r1 = sl;
0x0002eb5c mov r0, r4 | r0 = r4;
0x0002eb5e bl 0x2e050 | fcn_0002e050 (r0, r1);
0x0002eb62 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002eb64 ldr r3, [r3] | r3 = *(r3);
0x0002eb66 cmp r3, 3 |
0x0002eb68 str r3, [sp, 0x1c] | var_1ch = r3;
| if (r3 > 3) {
0x0002eb6a bgt.w 0x2ed9a | goto label_17;
| }
| label_12:
0x0002eb6e ldrd r2, r1, [sp, 8] | __asm ("ldrd r2, r1, [var_8h]");
0x0002eb72 mov r0, r4 | r0 = r4;
0x0002eb74 blx 0xbddc | r0 = fcn_0000bddc ();
0x0002eb78 cmp r0, 0 |
| if (r0 != 0) {
0x0002eb7a bne.w 0x2ed90 | goto label_18;
| }
0x0002eb7e ldr r3, [r6, -0xc] | r3 = *((r6 - 0xc));
0x0002eb82 mov r0, r4 | r0 = r4;
0x0002eb84 ldr r1, [sp, 8] | r1 = var_8h;
0x0002eb86 sub.w sb, r3, r1 | sb = r3 - r1;
0x0002eb8a mov.w r3, 0x10000 | r3 = case.0x3207a.11;
0x0002eb8e mov r2, sb | r2 = sb;
0x0002eb90 adds r1, r4, r1 | r1 = r4 + r1;
0x0002eb92 str sb, [r6, -0xc] | *((r6 - 0xc)) = sb;
0x0002eb96 blx 0xbd04 | fcn_0000bd04 ();
| label_11:
0x0002eb9a ldr r3, [sp, 8] | r3 = var_8h;
| if (r3 == 0) {
0x0002eb9c cbz r3, 0x2ebec | goto label_19;
| }
0x0002eb9e subs r5, r3, 1 | r5 = r3 - 1;
0x0002eba0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002eba2 sub.w sl, r6, 2 | sl = r6 - 2;
0x0002eba6 add.w fp, r3, r5 |
0x0002ebaa subs r5, r3, 1 | r5 = r3 - 1;
0x0002ebac mov r3, r4 | r3 = r4;
0x0002ebae mov r4, sb | r4 = sb;
0x0002ebb0 mov sb, r3 | sb = r3;
0x0002ebb2 b 0x2ebb8 |
| while (r3 != 0xa) {
0x0002ebb4 cmp r5, fp |
| if (r5 == fp) {
0x0002ebb6 beq 0x2ebe6 | goto label_4;
| }
| label_1:
0x0002ebb8 ldrb r3, [r5, 1]! | r3 = *((r5 += 1));
0x0002ebbc cmp r3, 0xa |
0x0002ebbe bne 0x2ebb4 |
| }
0x0002ebc0 ldrh r3, [r6, -0x4] | r3 = *((r6 - 0x4));
0x0002ebc4 movw r2, 0x2024 | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002ebc8 cmp r3, r2 |
| if (r3 != r2) {
0x0002ebca bne.w 0x2ed0e | goto label_20;
| }
| label_3:
0x0002ebce subs r4, 2 | r4 -= 2;
0x0002ebd0 mov.w r3, 0x10000 | r3 = case.0x3207a.11;
0x0002ebd4 mov r2, r4 | r2 = r4;
0x0002ebd6 mov r1, sl | r1 = sl;
0x0002ebd8 mov r0, sb | r0 = sb;
0x0002ebda str r4, [r6, -0xc] | *((r6 - 0xc)) = r4;
0x0002ebde blx 0xbd04 | fcn_0000bd04 ();
0x0002ebe2 cmp r5, fp |
| if (r5 != fp) {
0x0002ebe4 bne 0x2ebb8 | goto label_1;
| }
| label_4:
0x0002ebe6 mov r3, sb | r3 = sb;
0x0002ebe8 mov sb, r4 | sb = r4;
0x0002ebea mov r4, r3 | r4 = r3;
| label_19:
0x0002ebec ldrb r3, [r6, -0x4] | r3 = *((r6 - 0x4));
0x0002ebf0 cmp r3, 0xa |
| if (r3 == 0xa) {
0x0002ebf2 bne 0x2ec0a |
0x0002ebf4 add.w sb, sb, -1 | sb += -1;
0x0002ebf8 mov.w r3, 0x10000 | r3 = case.0x3207a.11;
0x0002ebfc mov r2, sb | r2 = sb;
0x0002ebfe subs r1, r6, 3 | r1 = r6 - 3;
0x0002ec00 mov r0, r4 | r0 = r4;
0x0002ec02 str sb, [r6, -0xc] | *((r6 - 0xc)) = sb;
0x0002ec06 blx 0xbd04 | fcn_0000bd04 ();
| }
0x0002ec0a add.w r3, r4, sb | r3 = r4 + sb;
0x0002ec0e mov r5, sb | r5 = sb;
0x0002ec10 movs r1, 0 | r1 = 0;
| do {
0x0002ec12 cmp r5, 0 |
| if (r5 == 0) {
0x0002ec14 beq.w 0x2ed2e | goto label_21;
| }
0x0002ec18 ldrb r2, [r3, -0x1]! | r2 = *((r3 -= 0x1));
0x0002ec1c subs r5, 1 | r5--;
0x0002ec1e movs r1, 1 | r1 = 1;
0x0002ec20 cmp r2, r7 |
0x0002ec22 bne 0x2ec12 |
| } while (r2 != r7);
0x0002ec24 cmp r7, 0xa |
0x0002ec26 str r5, [r6, -0xc] | *((r6 - 0xc)) = r5;
| if (r7 == 0xa) {
0x0002ec2a beq 0x2ec4a | goto label_22;
| }
0x0002ec2c adds r2, r4, r5 | r2 = r4 + r5;
0x0002ec2e mov r3, r5 | r3 = r5;
0x0002ec30 movs r0, 0 | r0 = 0;
| do {
0x0002ec32 cmp r3, 0 |
| if (r3 == 0) {
0x0002ec34 beq.w 0x2ed7c | goto label_23;
| }
0x0002ec38 ldrb r1, [r2, -0x1]! | r1 = *((r2 -= 0x1));
0x0002ec3c subs r3, 1 | r3--;
0x0002ec3e movs r0, 1 | r0 = 1;
0x0002ec40 cmp r1, 0xa |
0x0002ec42 bne 0x2ec32 |
| } while (r1 != 0xa);
0x0002ec44 mov r5, r3 | r5 = r3;
0x0002ec46 str r3, [r6, -0xc] | *((r6 - 0xc)) = r3;
| label_22:
0x0002ec4a ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0002ec4c cmp r3, 3 |
| if (r3 > 3) {
0x0002ec4e bgt 0x2ed3a | goto label_24;
| }
| label_6:
0x0002ec50 cmp.w r5, 0x10000 |
0x0002ec54 itt eq |
| if (r5 == 0x10000) {
0x0002ec56 movweq r5, 0xffff | __asm ("movweq r5, case.0x3207a.11");
| }
| if (r5 == 0x10000) {
0x0002ec5a str r5, [r6, -0xc] | *((r6 - 0xc)) = r5;
| }
| label_5:
0x0002ec5e mov r0, r4 | r0 = r4;
0x0002ec60 ldr r4, [sp, 0x14] | r4 = var_14h;
0x0002ec62 add r6, r5 | r6 += r5;
0x0002ec64 movs r7, 0 | r7 = 0;
0x0002ec66 ldr r2, [sp, 0x18] | r2 = var_18h;
0x0002ec68 mov r1, r5 | r1 = r5;
0x0002ec6a ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x0002ec6c strb r7, [r6, -0x4] | *((r6 - 0x4)) = r7;
0x0002ec70 orr r3, r3, 4 | r3 |= 4;
0x0002ec74 str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
0x0002ec76 bl 0x3a550 | convert_to_utf8 ();
0x0002ec7a str r0, [r4, 0x18] | *((r4 + 0x18)) = r0;
| label_2:
0x0002ec7c ldr r0, [sp, 0xc] | r0 = var_ch;
0x0002ec7e blx 0xbd14 | gai_strerror ();
| do {
0x0002ec82 cmp.w r8, 0 |
| if (r8 != 0) {
0x0002ec86 beq 0x2ec8e |
0x0002ec88 mov r0, r8 | r0 = r8;
0x0002ec8a blx 0xbd14 | gai_strerror ();
| }
0x0002ec8e ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002ec90 ldr r3, [r3] | r3 = *(r3);
0x0002ec92 cmp r3, 3 |
| if (r3 > 3) {
0x0002ec94 bgt 0x2ed50 | goto label_25;
| }
| label_7:
0x0002ec96 ldr r2, [pc, 0x140] |
0x0002ec98 add.w r1, sp, 0x10000 | r1 += arg_10000h;
0x0002ec9c ldr r3, [pc, 0x120] | r3 = *(0x2edc0);
0x0002ec9e adds r1, 0x2c | r1 += 0x2c;
0x0002eca0 add r2, pc | r2 = 0x5da7e;
0x0002eca2 ldr r3, [r2, r3] | r3 = imp.__environ;
0x0002eca4 ldr r2, [r3] | r2 = imp.__environ;
0x0002eca6 ldr r3, [r1] | r3 = *(r1);
0x0002eca8 eors r2, r3 | r2 ^= r3;
0x0002ecaa mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002ecae bne 0x2ed96 | goto label_26;
| }
0x0002ecb0 mov r0, r7 | r0 = r7;
0x0002ecb2 add.w sp, sp, 0x10000 |
0x0002ecb6 add sp, 0x34 |
0x0002ecb8 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_15:
0x0002ecbc mov r7, r0 | r7 = r0;
0x0002ecbe mov r1, sl | r1 = sl;
0x0002ecc0 mov r0, r4 | r0 = r4;
0x0002ecc2 bl 0x2e050 | fcn_0002e050 (r0, r1);
0x0002ecc6 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002ecc8 ldr r3, [r3] | r3 = *(r3);
0x0002ecca cmp r3, 3 |
| if (r3 > 3) {
0x0002eccc ble 0x2ece4 |
0x0002ecce ldr r2, [pc, 0x10c] |
0x0002ecd0 movs r0, 4 | r0 = 4;
0x0002ecd2 ldr r1, [pc, 0x10c] |
0x0002ecd4 str r4, [sp] | *(sp) = r4;
0x0002ecd6 add r2, pc | r2 = 0x5dab8;
0x0002ecd8 ldr r3, [r6, -0xc] | r3 = *((r6 - 0xc));
0x0002ecdc adds r2, 0x6c | r2 += 0x6c;
0x0002ecde add r1, pc | r1 = 0x5dac4;
0x0002ece0 bl 0x271b0 | zbx_zabbix_log ();
| }
0x0002ece4 ldr r4, [sp, 0x14] | r4 = var_14h;
0x0002ece6 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x0002ece8 orr r3, r3, 0x20 | r3 |= 0x20;
0x0002ecec str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
0x0002ecee blx 0xc15c | r0 = fcn_0000c15c ();
0x0002ecf2 ldr r0, [r0] | r0 = *(r0);
0x0002ecf4 bl 0x275f8 | strerror_from_system ()
0x0002ecf8 ldr r1, [pc, 0xe8] |
0x0002ecfa mov r2, r0 | r2 = r0;
0x0002ecfc movs r0, 0 | r0 = 0;
0x0002ecfe add r1, pc | r1 = 0x5dae6;
0x0002ed00 bl 0x396b0 | zbx_dsprintf ();
0x0002ed04 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002ed06 str r0, [r4, 0x20] | *((r4 + 0x20)) = r0;
0x0002ed08 cmp r3, 0 |
0x0002ed0a beq 0x2ec82 |
| } while (r3 == 0);
0x0002ed0c b 0x2ec7c | goto label_2;
| label_20:
0x0002ed0e movw r2, 0x2023 | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002ed12 cmp r3, r2 |
| if (r3 == r2) {
0x0002ed14 beq.w 0x2ebce | goto label_3;
| }
0x0002ed18 movw r2, 0x203e | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002ed1c cmp r3, r2 |
| if (r3 == r2) {
0x0002ed1e beq.w 0x2ebce | goto label_3;
| }
0x0002ed22 movw r2, 0x2025 | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002ed26 cmp r3, r2 |
| if (r3 == r2) {
0x0002ed28 beq.w 0x2ebce | goto label_3;
| }
0x0002ed2c b 0x2ebe6 | goto label_4;
| if (r1 == 0) {
| label_21:
0x0002ed2e cbz r1, 0x2ed88 | goto label_27;
| }
0x0002ed30 str r5, [r6, -0xc] | *((r6 - 0xc)) = r5;
| label_9:
0x0002ed34 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0002ed36 cmp r3, 3 |
| if (r3 <= 3) {
0x0002ed38 ble 0x2ec5e | goto label_5;
| }
| label_24:
0x0002ed3a ldr r2, [pc, 0xac] |
0x0002ed3c mov r3, r5 | r3 = r5;
0x0002ed3e ldr r1, [pc, 0xac] |
0x0002ed40 movs r0, 4 | r0 = 4;
0x0002ed42 str r4, [sp] | *(sp) = r4;
0x0002ed44 add r2, pc | r2 = 0x5db32;
0x0002ed46 adds r2, 0x6c | r2 += 0x6c;
0x0002ed48 add r1, pc | r1 = 0x5db3a;
0x0002ed4a bl 0x271b0 | zbx_zabbix_log ();
0x0002ed4e b 0x2ec50 | goto label_6;
| label_25:
0x0002ed50 mov r0, r7 | r0 = r7;
0x0002ed52 bl 0x3a204 | zbx_result_string ();
0x0002ed56 ldr r2, [pc, 0x98] |
0x0002ed58 mov r3, r0 | r3 = r0;
0x0002ed5a ldr r1, [pc, 0x98] |
0x0002ed5c movs r0, 4 | r0 = 4;
0x0002ed5e add r2, pc | r2 = 0x5db54;
0x0002ed60 add r1, pc | r1 = 0x5db5a;
0x0002ed62 adds r2, 0x6c | r2 += 0x6c;
0x0002ed64 bl 0x271b0 | zbx_zabbix_log ();
0x0002ed68 b 0x2ec96 | goto label_7;
| label_13:
0x0002ed6a ldr r2, [pc, 0x8c] |
0x0002ed6c movs r0, 4 | r0 = 4;
0x0002ed6e ldr r1, [pc, 0x8c] |
0x0002ed70 add r2, pc | r2 = 0x5db6e;
0x0002ed72 adds r2, 0x6c | r2 += 0x6c;
0x0002ed74 add r1, pc | r1 = 0x5db76;
0x0002ed76 bl 0x271b0 | zbx_zabbix_log ();
0x0002ed7a b 0x2ea7c | goto label_8;
| label_23:
0x0002ed7c cmp r0, 0 |
| if (r0 == 0) {
0x0002ed7e beq 0x2ed34 | goto label_9;
| }
0x0002ed80 mov r5, r3 | r5 = r3;
0x0002ed82 str r3, [r6, -0xc] | *((r6 - 0xc)) = r3;
0x0002ed86 b 0x2ed34 | goto label_9;
| label_27:
0x0002ed88 mov r5, sb | r5 = sb;
0x0002ed8a b 0x2ed34 | goto label_9;
| label_14:
0x0002ed8c ldr r2, [sp, 8] | r2 = var_8h;
0x0002ed8e b 0x2eafe | goto label_10;
| label_18:
0x0002ed90 ldr sb, [r6, -0xc] | sb = *((r6 - 0xc));
0x0002ed94 b 0x2eb9a | goto label_11;
| label_26:
0x0002ed96 blx 0xbe48 | fcn_0000be48 ();
| label_17:
0x0002ed9a ldr r2, [pc, 0x64] |
0x0002ed9c movs r0, 4 | r0 = 4;
0x0002ed9e ldr r1, [pc, 0x64] |
0x0002eda0 str r4, [sp] | *(sp) = r4;
0x0002eda2 add r2, pc | r2 = 0x5dba8;
0x0002eda4 ldr r3, [r6, -0xc] | r3 = *((r6 - 0xc));
0x0002eda8 adds r2, 0x6c | r2 += 0x6c;
0x0002edaa add r1, pc | r1 = 0x5dbb4;
0x0002edac bl 0x271b0 | zbx_zabbix_log ();
0x0002edb0 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002edb2 ldrb.w r7, [fp] | r7 = *(fp);
0x0002edb6 ldr r3, [r3] | r3 = *(r3);
0x0002edb8 str r3, [sp, 0x1c] | var_1ch = r3;
0x0002edba b 0x2eb6e | goto label_12;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2e5ac */
| #include <stdint.h>
|
; (fcn) sym.telnet_test_login () | void telnet_test_login (int16_t arg_10000h, int16_t arg1) {
| int16_t var_0h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| r0 = arg1;
| do {
0x0002e2f8 cmp.w fp, 0xb |
0x0002e2fc mov.w r1, 1 | r1 = 1;
0x0002e300 mov r0, r5 | r0 = r5;
| if (fp != 0xb) {
0x0002e302 bne 0x2e34a | goto label_6;
| }
| label_0:
0x0002e304 bl 0x2e0cc | fcn_0002e0cc (r0, r1);
0x0002e308 mov r2, r7 | r2 = r7;
0x0002e30a mov r1, r6 | r1 = r6;
0x0002e30c mov r0, r5 | r0 = r5;
0x0002e30e blx 0xc1f4 | r0 = memchr (r0, r1, r2);
0x0002e312 adds r3, r0, 1 | r3 = r0 + 1;
| label_5:
0x0002e314 mov r4, r0 | r4 = r0;
| if (r3 != r0) {
0x0002e316 bne 0x2e34a | goto label_6;
| }
0x0002e318 blx 0xc15c | fcn_0000c15c ();
0x0002e31c ldr.w r3, [r8] | r3 = *(r8);
0x0002e320 ldr.w fp, [r0] | fp = *(r0);
0x0002e324 cmp r3, 3 |
0x0002e326 ble 0x2e2f8 |
| } while (r3 <= 3);
0x0002e328 mov r0, fp | r0 = fp;
0x0002e32a bl 0x275f8 | strerror_from_system ()
0x0002e32e mov r1, sl | r1 = sl;
0x0002e330 strd fp, r0, [sp] | __asm ("strd fp, r0, [sp]");
0x0002e334 mov r3, r4 | r3 = r4;
0x0002e336 movs r0, 4 | r0 = 4;
0x0002e338 mov r2, sb | r2 = sb;
0x0002e33a bl 0x271b0 | zbx_zabbix_log ();
0x0002e33e cmp.w fp, 0xb |
0x0002e342 mov.w r1, 1 | r1 = 1;
0x0002e346 mov r0, r5 | r0 = r5;
| if (fp == 0xb) {
0x0002e348 beq 0x2e304 | goto label_0;
| }
| label_6:
0x0002e34a ldr.w r3, [r8] | r3 = *(r8);
0x0002e34e cmp r3, 3 |
| if (r3 <= 3) {
0x0002e350 bgt 0x2e36a |
0x0002e352 add sp, 0xc |
0x0002e354 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x0002e36a ldr r2, [pc, 0x30] |
0x0002e36c mov r3, r4 | r3 = r4;
0x0002e36e ldr r1, [pc, 0x30] |
0x0002e370 movs r0, 4 | r0 = 4;
0x0002e372 add r2, pc | r2 = 0x5c714;
0x0002e374 add r1, pc | r1 = 0x5c71a;
0x0002e376 adds r2, 0x28 | r2 += 0x28;
0x0002e378 add sp, 0xc |
0x0002e37a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002e37e b.w 0x271b0 | void (*0x271b0)() ();
0x0002e5ac push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0002e5b0 sub.w sp, sp, 0x10000 |
0x0002e5b4 ldr r4, [pc, 0x104] |
0x0002e5b6 sub sp, 0x18 |
0x0002e5b8 add.w r5, sp, 0x10000 | r5 += arg_10000h;
0x0002e5bc mov r6, r0 | r6 = r0;
0x0002e5be ldr r1, [pc, 0x100] | r1 = *(0x2e6c2);
0x0002e5c0 adds r5, 0x14 | r5 += 0x14;
0x0002e5c2 add r4, pc | r4 = 0x5cc82;
0x0002e5c4 ldr r3, [pc, 0xfc] |
0x0002e5c6 ldr r2, [pc, 0x100] | r2 = *(0x2e6ca);
0x0002e5c8 ldr r1, [r4, r1] |
0x0002e5ca add r3, pc | r3 = 0x5cc92;
0x0002e5cc ldr r1, [r1] | r1 = *(0x5cc82);
0x0002e5ce str r1, [r5] | *(r5) = r1;
0x0002e5d0 mov.w r1, 0 | r1 = 0;
0x0002e5d4 ldr.w r8, [r3, r2] | r8 = *(0x5cc92);
0x0002e5d8 ldr.w r3, [r8] | r3 = *(0x5cc92);
0x0002e5dc cmp r3, 3 |
| if (r3 > 3) {
0x0002e5de bgt 0x2e6a4 | goto label_7;
| }
| label_4:
0x0002e5e0 add r7, sp, 0x10 | r7 += var_10h;
0x0002e5e2 add.w sb, sp, 0xc | sb += var_ch;
0x0002e5e6 add r4, sp, 0x14 | r4 += var_14h;
0x0002e5e8 add r5, sp, 0x18 | r5 += var_18h;
0x0002e5ea mov.w r2, 0x10000 | r2 = case.0x3207a.11;
0x0002e5ee movs r3, 0 | r3 = 0;
0x0002e5f0 strd r2, r3, [r5, -0xc] | __asm ("strd r2, r3, [r5, -0xc]");
| do {
| label_2:
0x0002e5f4 mov r3, r7 | r3 = r7;
0x0002e5f6 mov r2, sb | r2 = sb;
0x0002e5f8 mov r1, r4 | r1 = r4;
0x0002e5fa mov r0, r6 | r0 = r6;
0x0002e5fc bl 0x2e3a4 | r0 = fcn_0002e3a4 (r0, r1, r2, r3);
0x0002e600 cmp.w r0, -1 |
0x0002e604 mov sl, r0 | sl = r0;
| if (r0 == -1) {
0x0002e606 beq 0x2e65c | goto label_8;
| }
0x0002e608 ldr r1, [r5, -0x8] | r1 = *((r5 - 0x8));
0x0002e60c add r1, r4 | r1 += r4;
| label_1:
0x0002e60e cmp r4, r1 |
0x0002e610 beq 0x2e5f4 |
| } while (r4 == r1);
0x0002e612 ldrb ip, [r1, -0x1]! | ip = *((r1 -= 0x1));
0x0002e616 cmp.w ip, 0x20 |
| if (ip == 0x20) {
0x0002e61a beq 0x2e60e | goto label_1;
| }
0x0002e61c cmp.w ip, 0x3a |
| if (ip != 0x3a) {
0x0002e620 bne 0x2e5f4 | goto label_2;
| }
0x0002e622 mov r1, r7 | r1 = r7;
0x0002e624 mov r0, r4 | r0 = r4;
0x0002e626 bl 0x2e050 | fcn_0002e050 (r0, r1);
0x0002e62a ldr.w r3, [r8] | r3 = *(r8);
0x0002e62e mov.w sl, 0 | sl = 0;
0x0002e632 cmp r3, 3 |
| if (r3 > 3) {
0x0002e634 bgt 0x2e66c | goto label_9;
| }
| do {
| label_3:
0x0002e636 ldr r2, [pc, 0x94] |
0x0002e638 add.w r1, sp, 0x10000 | r1 += arg_10000h;
0x0002e63c ldr r3, [pc, 0x80] | r3 = *(0x2e6c0);
0x0002e63e adds r1, 0x14 | r1 += 0x14;
0x0002e640 add r2, pc | r2 = 0x5cd12;
0x0002e642 ldr r3, [r2, r3] | r3 = *(0x5cd12);
0x0002e644 ldr r2, [r3] | r2 = *(0x5cd12);
0x0002e646 ldr r3, [r1] | r3 = *(r1);
0x0002e648 eors r2, r3 | r2 ^= r3;
0x0002e64a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002e64e bne 0x2e6b6 | goto label_10;
| }
0x0002e650 mov r0, sl | r0 = sl;
0x0002e652 add.w sp, sp, 0x10000 |
0x0002e656 add sp, 0x18 |
0x0002e658 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_8:
0x0002e65c mov r1, r7 | r1 = r7;
0x0002e65e mov r0, r4 | r0 = r4;
0x0002e660 bl 0x2e050 | fcn_0002e050 (r0, r1);
0x0002e664 ldr.w r3, [r8] | r3 = *(r8);
0x0002e668 cmp r3, 3 |
0x0002e66a ble 0x2e636 |
| } while (r3 <= 3);
| label_9:
0x0002e66c ldr r2, [pc, 0x60] |
0x0002e66e movs r0, 4 | r0 = 4;
0x0002e670 ldr r1, [pc, 0x60] |
0x0002e672 ldr r3, [r5, -0x8] | r3 = *((r5 - 0x8));
0x0002e676 add r2, pc | r2 = 0x5cd4a;
0x0002e678 str r4, [sp] | *(sp) = r4;
0x0002e67a mov r4, r2 | r4 = r2;
0x0002e67c add r1, pc | r1 = 0x5cd54;
0x0002e67e adds r4, 0x48 | r4 += 0x48;
0x0002e680 mov r2, r4 | r2 = r4;
0x0002e682 bl 0x271b0 | zbx_zabbix_log ();
0x0002e686 ldr.w r3, [r8] | r3 = *(r8);
0x0002e68a cmp r3, 3 |
| if (r3 <= 3) {
0x0002e68c ble 0x2e636 | goto label_3;
| }
0x0002e68e mov r0, sl | r0 = sl;
0x0002e690 bl 0x3a204 | zbx_result_string ();
0x0002e694 ldr r1, [pc, 0x40] |
0x0002e696 mov r3, r0 | r3 = r0;
0x0002e698 mov r2, r4 | r2 = r4;
0x0002e69a movs r0, 4 | r0 = 4;
0x0002e69c add r1, pc | r1 = 0x5cd78;
0x0002e69e bl 0x271b0 | zbx_zabbix_log ();
0x0002e6a2 b 0x2e636 | goto label_3;
| label_7:
0x0002e6a4 ldr r2, [pc, 0x34] |
0x0002e6a6 movs r0, 4 | r0 = 4;
0x0002e6a8 ldr r1, [pc, 0x34] |
0x0002e6aa add r2, pc | r2 = 0x5cd8a;
0x0002e6ac add r1, pc | r1 = 0x5cd90;
0x0002e6ae adds r2, 0x48 | r2 += 0x48;
0x0002e6b0 bl 0x271b0 | zbx_zabbix_log ();
0x0002e6b4 b 0x2e5e0 | goto label_4;
| label_10:
0x0002e6b6 blx 0xbe48 | fcn_0000be48 ();
0x0002e6ba nop |
0x0002e6bc b 0x2e314 | goto label_5;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x17fa4 */
| #include <stdint.h>
|
; (fcn) sym.zbx_execute_threaded_metric () | void zbx_execute_threaded_metric (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_81ch;
| int16_t var_0h;
| int16_t var_ch;
| int16_t var_10h_2;
| char * s1;
| int16_t var_1ch_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00017fa4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00017fa8 mov r7, r0 | r7 = r0;
0x00017faa ldr r6, [pc, 0x38c] |
0x00017fac mov sl, r2 | sl = r2;
0x00017fae ldr r5, [pc, 0x38c] | r5 = *(0x1833e);
0x00017fb0 add r6, pc | r6 = 0x302ee;
0x00017fb2 vpush {d8, d9} | __asm ("vpush {d8, d9}");
0x00017fb6 ldr r4, [pc, 0x388] |
0x00017fb8 subw sp, sp, 0x824 | __asm ("subw sp, sp, case.0x3207a.11");
0x00017fbc ldr r5, [r6, r5] |
0x00017fbe ldr r3, [pc, 0x384] | r3 = *(0x18346);
0x00017fc0 add r4, pc | r4 = 0x30306;
0x00017fc2 ldr r5, [r5] | r5 = *(0x302ee);
0x00017fc4 str.w r5, [sp, 0x81c] | __asm ("str.w r5, [var_81ch]");
0x00017fc8 mov.w r5, 0 | r5 = 0;
0x00017fcc mov r5, r1 | r5 = r1;
0x00017fce ldr r3, [r4, r3] |
0x00017fd0 str r3, [sp, 0xc] | var_ch = r3;
0x00017fd2 ldr r3, [r3] | r3 = *(0x30306);
0x00017fd4 cmp r3, 3 |
| if (r3 > 3) {
0x00017fd6 bgt.w 0x1812c | goto label_13;
| }
0x00017fda add.w sb, sp, 0x14 | sb += s1;
0x00017fde mov r0, sb | r0 = sb;
0x00017fe0 blx 0xc260 | strtok (r0, r1);
0x00017fe4 adds r0, 1 | r0++;
| if (r0 == 1) {
0x00017fe6 beq.w 0x1814e | goto label_14;
| }
| label_1:
0x00017fea bl 0x2a3d4 | r0 = zbx_fork ();
0x00017fee cmp.w r0, -1 |
0x00017ff2 mov r8, r0 | r8 = r0;
| if (r0 == -1) {
0x00017ff4 beq.w 0x18228 | goto label_15;
| }
0x00017ff8 ldr r0, [pc, 0x34c] |
0x00017ffa mov.w r3, 0x800 | r3 = case.0x3207a.11;
0x00017ffe movs r2, 0 | r2 = 0;
0x00018000 movw r1, 0x70b | r1 = (r1 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x00018004 add r0, pc | r0 = 0x30350;
0x00018006 bl 0x35c28 | r0 = zbx_malloc2 ();
0x0001800a mov r6, r0 | r6 = r0;
0x0001800c cmp.w r8, 0 |
| if (r8 == 0) {
0x00018010 beq.w 0x18414 | goto label_16;
| }
0x00018014 ldr.w r0, [sb, 4] | r0 = *((sb + 4));
0x00018018 movs r5, 0 | r5 = 0;
0x0001801a blx 0xc47c | fcn_0000c47c ();
0x0001801e ldr r3, [pc, 0x32c] | r3 = *(0x1834e);
0x00018020 add r7, sp, 0x1c | r7 += var_1ch_2;
0x00018022 ldr.w fp, [pc, 0x32c] |
0x00018026 vldr s16, [pc, 0x30c] | __asm ("vldr s16, case.0x3207a.11");
0x0001802a ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0001802c vmov.f64 d9, 1.500000e+00 | __asm ("vmov.f64 d9, 1");
0x00018030 add fp, pc | fp = 0x30386;
0x00018032 ldr r0, [r3] | r0 = *(0x1834e);
0x00018034 bl 0x37e00 | zbx_alarm_on ();
0x00018038 b 0x1804a |
| while (r3 > r4) {
| label_0:
0x0001803a adds r0, r6, r5 | r0 = r6 + r5;
0x0001803c mov r2, r4 | r2 = r4;
0x0001803e mov r1, r7 | r1 = r7;
0x00018040 add r5, r4 | r5 += r4;
0x00018042 blx 0xbd78 | fcn_0000bd78 ();
0x00018046 movs r3, 0 | r3 = 0;
0x00018048 strb r3, [r6, r5] | *((r6 + r5)) = r3;
0x0001804a ldr.w r0, [sb] | r0 = *(sb);
0x0001804e mov.w r2, 0x800 | r2 = case.0x3207a.11;
0x00018052 mov r1, r7 | r1 = r7;
0x00018054 blx 0xbcac | r0 = fcn_0000bcac ();
0x00018058 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x0001805a cbz r0, 0x180c8 | goto label_4;
| }
0x0001805c bl 0x37e28 | r0 = zbx_alarm_timed_out ();
| if (r0 == 0) {
0x00018060 cbz r0, 0x1809c | goto label_17;
| }
0x00018062 adds r0, r4, 1 | r0 = r4 + 1;
| if (r0 == r4) {
0x00018064 beq.w 0x181c6 | goto label_18;
| }
0x00018068 vmov r3, s16 | __asm ("vmov r3, s16");
0x0001806c subs r3, r3, r5 | r3 -= r5;
0x0001806e cmp r3, r4 |
0x00018070 bgt 0x1803a |
| }
| do {
0x00018072 vcvt.f64.u32 d7, s16 | __asm ("vcvt.f64.u32 d7, s16");
0x00018076 vmul.f64 d7, d7, d9 | __asm ("vmul.f64 d7, d7, d9");
0x0001807a vcvt.u32.f64 s16, d7 | __asm ("vcvt.u32.f64 s16, d7");
0x0001807e vmov r3, s16 | __asm ("vmov r3, s16");
0x00018082 subs r3, r3, r5 | r3 -= r5;
0x00018084 cmp r3, r4 |
0x00018086 ble 0x18072 |
| } while (r3 <= r4);
0x00018088 mov r2, r6 | r2 = r6;
0x0001808a vmov r3, s16 | __asm ("vmov r3, s16");
0x0001808e movw r1, 0x73d | r1 = (r1 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x00018092 mov r0, fp | r0 = fp;
0x00018094 bl 0x35cb8 | r0 = zbx_realloc2 ();
0x00018098 mov r6, r0 | r6 = r0;
0x0001809a b 0x1803a | goto label_0;
| label_17:
0x0001809c ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
0x000180a0 mov r2, r0 | r2 = r0;
0x000180a2 ldr r0, [pc, 0x2b0] |
0x000180a4 movw r1, 0x72a | r1 = (r1 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x000180a8 movs r4, 1 | r4 = 1;
0x000180aa orr r3, r3, 0x20 | r3 |= 0x20;
0x000180ae str.w r3, [sl, 0x28] | __asm ("str.w r3, [sl, 0x28]");
0x000180b2 add r0, pc | r0 = 0x3040c;
0x000180b4 ldr r3, [pc, 0x2a0] |
0x000180b6 add r3, pc | r3 = 0x30412;
0x000180b8 bl 0x35d28 | zbx_strdup2 ();
0x000180bc movs r1, 9 | r1 = 9;
0x000180be str.w r0, [sl, 0x20] | __asm ("str.w r0, [sl, 0x20]");
0x000180c2 mov r0, r8 | r0 = r8;
0x000180c4 blx 0xc0c8 | r0 = exit (r0);
| label_4:
0x000180c8 bl 0x37e10 | zbx_alarm_off ();
0x000180cc ldr.w r0, [sb] | r0 = *(sb);
0x000180d0 add r5, sp, 0x10 | r5 += var_10h_2;
0x000180d2 blx 0xc47c | fcn_0000c47c ();
0x000180d6 b 0x180e2 |
| while (r0 == 1) {
0x000180d8 blx 0xc15c | r0 = fcn_0000c15c ();
0x000180dc ldr r0, [r0] | r0 = *(r0);
0x000180de cmp r0, 4 |
| if (r0 != 4) {
0x000180e0 bne 0x181a6 | goto label_19;
| }
0x000180e2 movs r2, 0 | r2 = 0;
0x000180e4 mov r1, r5 | r1 = r5;
0x000180e6 mov r0, r8 | r0 = r8;
0x000180e8 blx 0xbfa8 | fread (r0, r1, r2, r3);
0x000180ec adds r0, 1 | r0++;
0x000180ee beq 0x180d8 |
| }
0x000180f0 cmp r4, 0 |
| if (r4 == 0) {
0x000180f2 beq.w 0x181fe | goto label_20;
| }
| if (r6 != 0) {
| label_3:
0x000180f6 cbz r6, 0x180fe |
| label_7:
0x000180f8 mov r0, r6 | r0 = r6;
0x000180fa blx 0xbd14 | gai_strerror ();
| }
| label_6:
0x000180fe ldr r3, [sp, 0xc] | r3 = var_ch;
0x00018100 ldr r3, [r3] | r3 = *(r3);
0x00018102 cmp r3, 3 |
| if (r3 > 3) {
0x00018104 bgt 0x1817e | goto label_21;
| }
| label_2:
0x00018106 ldr r2, [pc, 0x254] |
0x00018108 ldr r3, [pc, 0x230] | r3 = *(0x1833c);
0x0001810a add r2, pc | r2 = 0x3046c;
0x0001810c ldr r3, [r2, r3] | r3 = *(0x3046c);
0x0001810e ldr r2, [r3] | r2 = *(0x3046c);
0x00018110 ldr.w r3, [sp, 0x81c] | r3 = var_81ch;
0x00018114 eors r2, r3 | r2 ^= r3;
0x00018116 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0001811a bne.w 0x184c8 | goto label_22;
| }
0x0001811e mov r0, r4 | r0 = r4;
0x00018120 addw sp, sp, 0x824 | __asm ("addw sp, var_0h");
0x00018124 vpop {d8, d9} | __asm ("vpop {d8, d9}");
0x00018128 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x0001812c ldr r2, [pc, 0x230] |
0x0001812e movs r0, 4 | r0 = 4;
0x00018130 ldr r3, [r1] | r3 = *(r1);
0x00018132 add.w sb, sp, 0x14 | sb += s1;
0x00018136 ldr r1, [pc, 0x22c] |
0x00018138 add r2, pc | r2 = 0x3049c;
0x0001813a adds r2, 0x54 | r2 += 0x54;
0x0001813c add r1, pc | r1 = 0x304a6;
0x0001813e bl 0x271b0 | zbx_zabbix_log ();
0x00018142 mov r0, sb | r0 = sb;
0x00018144 blx 0xc260 | strtok (r0, r1);
0x00018148 adds r0, 1 | r0++;
| if (r0 != 1) {
0x0001814a bne.w 0x17fea | goto label_1;
| }
| label_14:
0x0001814e ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
0x00018152 movs r4, 1 | r4 = 1;
0x00018154 orr r3, r3, 0x20 | r3 |= 0x20;
0x00018158 str.w r3, [sl, 0x28] | __asm ("str.w r3, [sl, 0x28]");
0x0001815c blx 0xc15c | r0 = fcn_0000c15c ();
0x00018160 ldr r0, [r0] | r0 = *(r0);
0x00018162 bl 0x275f8 | strerror_from_system ()
0x00018166 ldr r1, [pc, 0x200] |
0x00018168 mov r2, r0 | r2 = r0;
0x0001816a movs r0, 0 | r0 = 0;
0x0001816c add r1, pc | r1 = 0x304da;
0x0001816e bl 0x396b0 | zbx_dsprintf ();
0x00018172 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00018174 str.w r0, [sl, 0x20] | __asm ("str.w r0, [sl, 0x20]");
0x00018178 ldr r3, [r3] | r3 = *(r3);
0x0001817a cmp r3, 3 |
| if (r3 <= 3) {
0x0001817c ble 0x18106 | goto label_2;
| }
| label_21:
0x0001817e mov r0, r4 | r0 = r4;
0x00018180 bl 0x3a1e0 | zbx_sysinfo_ret_string ();
0x00018184 ldr.w r2, [sl, 0x28] | r2 = *((sl + 0x28));
0x00018188 mov r3, r0 | r3 = r0;
0x0001818a lsls r2, r2, 0x1a | r2 <<= 0x1a;
| if (r2 < r2) {
0x0001818c bmi 0x181f8 | goto label_23;
| }
0x0001818e ldr r0, [pc, 0x1dc] |
0x00018190 add r0, pc | r0 = 0x30502;
| label_5:
0x00018192 ldr r2, [pc, 0x1dc] |
0x00018194 ldr r1, [pc, 0x1dc] |
0x00018196 str r0, [sp] | *(sp) = r0;
0x00018198 movs r0, 4 | r0 = 4;
0x0001819a add r2, pc | r2 = 0x30510;
0x0001819c add r1, pc | r1 = 0x30514;
0x0001819e adds r2, 0x54 | r2 += 0x54;
0x000181a0 bl 0x271b0 | zbx_zabbix_log ();
0x000181a4 b 0x18106 | goto label_2;
| label_19:
0x000181a6 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000181a8 ldr r3, [r3] | r3 = *(r3);
0x000181aa cmp r3, 1 |
0x000181ac it le |
| if (r3 <= 1) {
0x000181ae movle r4, 1 | r4 = 1;
| goto label_24;
| }
| if (r3 <= 1) {
| label_24:
0x000181b0 ble 0x180f6 | goto label_3;
| }
0x000181b2 bl 0x26fdc | zbx_strerror ();
0x000181b6 ldr r1, [pc, 0x1c0] |
0x000181b8 mov r2, r0 | r2 = r0;
0x000181ba movs r0, 2 | r0 = 2;
0x000181bc movs r4, 1 | r4 = 1;
0x000181be add r1, pc | r1 = 0x3053c;
0x000181c0 bl 0x271b0 | zbx_zabbix_log ();
0x000181c4 b 0x180f6 | goto label_3;
| label_18:
0x000181c6 ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
0x000181ca movs r4, 1 | r4 = 1;
0x000181cc orr r3, r3, 0x20 | r3 |= 0x20;
0x000181d0 str.w r3, [sl, 0x28] | __asm ("str.w r3, [sl, 0x28]");
0x000181d4 blx 0xc15c | r0 = fcn_0000c15c ();
0x000181d8 ldr r0, [r0] | r0 = *(r0);
0x000181da bl 0x26fdc | zbx_strerror ();
0x000181de ldr r1, [pc, 0x19c] |
0x000181e0 mov r2, r0 | r2 = r0;
0x000181e2 movs r0, 0 | r0 = 0;
0x000181e4 add r1, pc | r1 = 0x30566;
0x000181e6 bl 0x396b0 | zbx_dsprintf ();
0x000181ea movs r1, 9 | r1 = 9;
0x000181ec str.w r0, [sl, 0x20] | __asm ("str.w r0, [sl, 0x20]");
0x000181f0 mov r0, r8 | r0 = r8;
0x000181f2 blx 0xc0c8 | exit (r0);
0x000181f6 b 0x180c8 | goto label_4;
| label_23:
0x000181f8 ldr.w r0, [sl, 0x20] | r0 = *((sl + 0x20));
0x000181fc b 0x18192 | goto label_5;
| label_20:
0x000181fe ldr r2, [r5] | r2 = *(r5);
0x00018200 lsls r1, r2, 0x19 | r1 = r2 << 0x19;
| if (r1 != r2) {
0x00018202 bne 0x182d8 | goto label_25;
| }
0x00018204 tst.w r2, 0xff00 |
| if ((r2 & 0xff00) != 0) {
0x00018208 beq 0x18262 |
0x0001820a ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
0x0001820e mov r0, r4 | r0 = r4;
0x00018210 ldr r1, [pc, 0x16c] |
0x00018212 movs r4, 1 | r4 = 1;
0x00018214 orr r3, r3, 0x20 | r3 |= 0x20;
0x00018218 add r1, pc | r1 = 0x3059c;
0x0001821a str.w r3, [sl, 0x28] | __asm ("str.w r3, [sl, 0x28]");
0x0001821e bl 0x396b0 | zbx_dsprintf ();
0x00018222 str.w r0, [sl, 0x20] | __asm ("str.w r0, [sl, 0x20]");
0x00018226 b 0x180f6 | goto label_3;
| label_15:
0x00018228 ldr.w r0, [sb] | r0 = *(sb);
0x0001822c movs r4, 1 | r4 = 1;
0x0001822e blx 0xc47c | fcn_0000c47c ();
0x00018232 ldr.w r0, [sb, 4] | r0 = *((sb + 4));
0x00018236 blx 0xc47c | fcn_0000c47c ();
0x0001823a ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
0x0001823e orr r3, r3, 0x20 | r3 |= 0x20;
0x00018242 str.w r3, [sl, 0x28] | __asm ("str.w r3, [sl, 0x28]");
0x00018246 blx 0xc15c | r0 = fcn_0000c15c ();
0x0001824a ldr r0, [r0] | r0 = *(r0);
0x0001824c bl 0x275f8 | strerror_from_system ()
0x00018250 ldr r1, [pc, 0x130] |
0x00018252 mov r2, r0 | r2 = r0;
0x00018254 movs r0, 0 | r0 = 0;
0x00018256 add r1, pc | r1 = 0x305de;
0x00018258 bl 0x396b0 | zbx_dsprintf ();
0x0001825c str.w r0, [sl, 0x20] | __asm ("str.w r0, [sl, 0x20]");
0x00018260 b 0x180fe | goto label_6;
| }
0x00018262 ldrb r7, [r6, 4] | r7 = *((r6 + 4));
0x00018264 mov r5, r6 | r5 = r6;
0x00018266 ldr r4, [r5], 5 | r4 = *(r5);
| r5 += 5;
0x0001826a cmp r7, 0x6d |
| if (r7 == 0x6d) {
0x0001826c beq 0x182fe | goto label_26;
| }
0x0001826e ldr r1, [pc, 0x118] |
0x00018270 mov r0, r5 | r0 = r5;
0x00018272 add r1, pc | r1 = 0x30600;
0x00018274 blx 0xbc58 | r0 = fcn_0000bc58 ();
0x00018278 cmp r0, 0 |
| if (r0 == 0) {
0x0001827a beq 0x182fe | goto label_26;
| }
0x0001827c subs r7, 0x64 | r7 -= 0x64;
0x0001827e cmp r7, 0x11 |
| if (r7 > 0x11) {
0x00018280 bhi.w 0x180f6 | goto label_3;
| }
0x00018284 adr r3, 8 | r3 = 8;
0x00018286 ldr.w r7, [r3, r7, lsl 2] | offset_0 = r7 << 2;
| r7 = *((r3 + offset_0));
0x0001828a add r3, r7 | r3 += r7;
0x0001828c bx r3 | return uint32_t (*r3)() ();
| label_25:
0x000182d8 ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
0x000182dc mov r0, r4 | r0 = r4;
0x000182de ldr r1, [pc, 0xac] |
0x000182e0 movs r4, 1 | r4 = 1;
0x000182e2 orr r3, r3, 0x20 | r3 |= 0x20;
0x000182e4 lsls r0, r4, 0xc | r0 = r4 << 0xc;
0x000182e6 add r1, pc | r1 = 0x30678;
0x000182e8 str.w r3, [sl, 0x28] | __asm ("str.w r3, [sl, 0x28]");
0x000182ec bl 0x396b0 | zbx_dsprintf ();
0x000182f0 movs r1, 9 | r1 = 9;
0x000182f2 str.w r0, [sl, 0x20] | __asm ("str.w r0, [sl, 0x20]");
0x000182f4 movs r0, r4 | r0 = r4;
0x000182f6 mov r0, r8 | r0 = r8;
0x000182f8 blx 0xc0c8 | exit (r0);
0x000182fc b 0x180f6 | goto label_3;
| label_26:
0x000182fe ldr.w r2, [sl, 0x28] | r2 = *((sl + 0x28));
0x00018302 mov r3, r5 | r3 = r5;
0x00018304 ldr r0, [pc, 0x88] |
0x00018306 mov.w r1, 0x6a8 | r1 = case.0x3207a.11;
0x0001830a orr r2, r2, 0x20 | r2 |= 0x20;
0x0001830e str.w r2, [sl, 0x28] | __asm ("str.w r2, [sl, 0x28]");
0x00018312 add r0, pc | r0 = 0x306a6;
0x00018314 movs r2, 0 | r2 = 0;
0x00018316 bl 0x35d28 | zbx_strdup2 ();
0x00018318 stc2 p8, c15, [r7, -0x328] | __asm ("stc2 p8, c15, case.0x3207a.11");
0x0001831c movs r0, r4 | r0 = r4;
0x0001831e b 0x180f8 | goto label_7;
| label_16:
0x00018414 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00018416 ldr r3, [r3] | r3 = *(r3);
0x00018418 cmp r3, 3 |
| if (r3 > 3) {
0x0001841a bgt 0x18516 | goto label_27;
| }
| label_11:
0x0001841c bl 0x2c150 | zbx_set_metric_thread_signal_handler ();
0x00018420 ldr.w r0, [sb] | r0 = *(sb);
0x00018424 blx 0xc47c | fcn_0000c47c ();
0x00018428 mov r1, sl | r1 = sl;
0x0001842a mov r0, r5 | r0 = r5;
0x0001842c blx r7 | r0 = uint32_t (*r7)(uint32_t, uint32_t) (r0, r1);
0x0001842e mov fp, r0 |
0x00018430 cmp r0, 0 |
| if (r0 != 0) {
0x00018432 bne 0x18500 | goto label_28;
| }
0x00018434 ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
0x00018438 lsls r5, r3, 0x1c | r5 = r3 << 0x1c;
| if (r5 < r3) {
0x0001843a bmi 0x184fc | goto label_29;
| }
0x0001843c lsls r4, r3, 0x1d | r4 = r3 << 0x1d;
| if (r4 < r3) {
0x0001843e bmi 0x184f8 | goto label_30;
| }
0x00018440 lsls r0, r3, 0x1f | r0 = r3 << 0x1f;
| if (r0 < r3) {
0x00018442 bmi 0x18530 | goto label_31;
| }
0x00018444 lsls r1, r3, 0x1e | r1 = r3 << 0x1e;
| if (r1 >= r3) {
0x00018446 bpl 0x1850a | goto label_32;
| }
0x00018448 movs r7, 0x64 | r7 = 0x64;
| label_9:
0x0001844a movs r1, 8 | r1 = 8;
0x0001844c mov r0, sl | r0 = sl;
0x0001844e bl 0x17b2c | r0 = get_result_value_by_type ();
0x00018452 mov r5, r0 | r5 = r0;
0x00018454 cmp r0, 0 |
| if (r0 == 0) {
0x00018456 beq 0x18524 | goto label_33;
| }
| label_10:
0x00018458 ldr r0, [r5] | r0 = *(r5);
0x0001845a blx 0xc114 | r0 = fcn_0000c114 ();
0x0001845e adds r4, r0, 6 | r4 = r0 + 6;
0x00018460 str r0, [sp, 0xc] | var_ch = r0;
0x00018462 cmp.w r4, 0x800 |
| if (r4 < 0x800) {
0x00018466 bls 0x18498 | goto label_34;
| }
0x00018468 vmov.f64 d16, 1.500000e+00 | __asm ("vmov.f64 d16, 1");
0x0001846c mov.w r3, 0x800 | r3 = case.0x3207a.11;
| do {
0x00018470 vmov s15, r3 | __asm ("vmov s15, r3");
0x00018474 vcvt.f64.u32 d7, s15 | __asm ("vcvt.f64.u32 d7, s15");
0x00018478 vmul.f64 d7, d7, d16 | __asm ("vmul.f64 d7, d7, d16");
0x0001847c vcvt.u32.f64 s15, d7 | __asm ("vcvt.u32.f64 s15, d7");
0x00018480 vmov r3, s15 | __asm ("vmov r3, s15");
0x00018484 cmp r4, r3 |
0x00018486 bhi 0x18470 |
| } while (r4 > r3);
0x00018488 ldr r0, [pc, 0xd4] |
0x0001848a mov r2, r6 | r2 = r6;
0x0001848c movw r1, 0x681 | r1 = (r1 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x00018490 add r0, pc | r0 = 0x309f4;
0x00018492 bl 0x35cb8 | r0 = zbx_realloc2 ();
0x00018496 mov r6, r0 | r6 = r0;
| label_34:
0x00018498 ldr r2, [sp, 0xc] | r2 = var_ch;
0x0001849a adds r0, r6, 5 | r0 = r6 + 5;
0x0001849c str.w fp, [r6] | __asm ("str.w fp, [r6]");
0x000184a0 strb r7, [r6, 4] | *((r6 + 4)) = r7;
0x000184a2 adds r2, 1 | r2++;
0x000184a4 ldr r1, [r5] | r1 = *(r5);
0x000184a6 blx 0xbd78 | fcn_0000bd78 ();
| label_12:
0x000184aa ldr.w r7, [sb, 4] | r7 = *((sb + 4));
0x000184ae mov fp, r6 |
| do {
| label_8:
0x000184b0 mov r2, r4 | r2 = r4;
0x000184b2 mov r1, fp | r1 = fp;
0x000184b4 mov r0, r7 | r0 = r7;
0x000184b6 blx 0xc1f4 | r0 = memchr (r0, r1, r2);
0x000184ba adds r3, r0, 1 | r3 = r0 + 1;
0x000184bc mov r5, r0 | r5 = r0;
| if (r3 == r0) {
0x000184be beq 0x184cc | goto label_35;
| }
0x000184c0 subs r4, r4, r0 | r4 -= r0;
0x000184c2 add fp, r0 |
0x000184c4 bne 0x184b0 |
| } while (r4 != r4);
0x000184c6 b 0x184d8 | goto label_36;
| label_22:
0x000184c8 blx 0xbe48 | fcn_0000be48 ();
| label_35:
0x000184cc blx 0xc15c | r0 = fcn_0000c15c ();
0x000184d0 ldr r3, [r0] | r3 = *(r0);
0x000184d2 cmp r3, 4 |
| if (r3 == 4) {
0x000184d4 beq 0x184b0 | goto label_8;
| }
0x000184d6 mov r8, r5 | r8 = r5;
| label_36:
0x000184d8 mov r0, r6 | r0 = r6;
0x000184da blx 0xbd14 | gai_strerror ();
0x000184de mov r0, sl | r0 = sl;
0x000184e0 bl 0x16ee0 | free_result ();
0x000184e4 ldr.w r0, [sb, 4] | r0 = *((sb + 4));
0x000184e8 blx 0xc47c | fcn_0000c47c ();
0x000184ec subs.w r0, r8, 0 | r0 = r8 - 0;
0x000184f0 it ne |
| if (r0 == r8) {
0x000184f2 movne r0, 1 | r0 = 1;
| }
0x000184f4 blx 0xc0f0 | fcn_0000c0f0 ();
| label_30:
0x000184f8 movs r7, 0x73 | r7 = 0x73;
0x000184fa b 0x1844a | goto label_9;
| label_29:
0x000184fc movs r7, 0x74 | r7 = 0x74;
0x000184fe b 0x1844a | goto label_9;
| label_28:
0x00018500 cmp.w sl, 0 |
| if (sl != 0) {
0x00018504 beq 0x18534 |
0x00018506 ldr.w r3, [sl, 0x28] | r3 = *((sl + 0x28));
| label_32:
0x0001850a lsls r2, r3, 0x1a | r2 = r3 << 0x1a;
| if (r2 < r3) {
0x0001850c bpl 0x18524 |
0x0001850e add.w r5, sl, 0x20 | r5 = sl + 0x20;
0x00018512 movs r7, 0x6d | r7 = 0x6d;
0x00018514 b 0x18458 | goto label_10;
| label_27:
0x00018516 ldr r1, [pc, 0x4c] |
0x00018518 movs r0, 4 | r0 = 4;
0x0001851a ldr r2, [r5] | r2 = *(r5);
0x0001851c add r1, pc | r1 = 0x30a86;
0x0001851e bl 0x271b0 | zbx_zabbix_log ();
0x00018522 b 0x1841c | goto label_11;
| }
| label_33:
0x00018524 movs r3, 0x2d | r3 = 0x2d;
0x00018526 movs r4, 5 | r4 = 5;
0x00018528 str.w fp, [r6] | __asm ("str.w fp, [r6]");
0x0001852c strb r3, [r6, 4] | *((r6 + 4)) = r3;
0x0001852e b 0x184aa | goto label_12;
| label_31:
0x00018530 movs r7, 0x75 | r7 = 0x75;
0x00018532 b 0x1844a | goto label_9;
| }
0x00018534 ldr r3, [pc, 0x30] |
0x00018536 movw r2, 0x5b2 | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0001853a ldr r1, [pc, 0x30] |
0x0001853c ldr r0, [pc, 0x30] |
0x0001853e add r3, pc | r3 = 0x30aaa;
0x00018540 add r1, pc | r1 = 0x30ab2;
0x00018542 adds r3, 0x38 | r3 += 0x38;
0x00018544 add r0, pc | r0 = 0x30ab8;
0x00018546 blx 0xc4a0 | fcn_0000c4a0 ();
0x0001854a nop |
0x0001854c ldm r0!, {r2, r5} | r2 = *(r0!);
| r5 = *((r0! + 4));
0x0001854e movs r2, r0 | r2 = r0;
0x00018550 stm r7!, {r1, r2, r4, r5, r6, r7} | *(r7!) = r1;
| *((r7! + 4)) = r2;
| *((r7! + 8)) = r4;
| *((r7! + 12)) = r5;
| *((r7! + 16)) = r6;
| *((r7! + 20)) = r7;
0x00018552 movs r2, r0 | r2 = r0;
0x00018554 ldm r4!, {r3, r5} | r3 = *(r4!);
| r5 = *((r4! + 4));
0x00018556 movs r2, r0 | r2 = r0;
0x00018558 stm r7!, {r1, r2, r3, r6, r7} | *(r7!) = r1;
| *((r7! + 4)) = r2;
| *((r7! + 8)) = r3;
| *((r7! + 12)) = r6;
| *((r7! + 16)) = r7;
0x0001855a movs r2, r0 | r2 = r0;
0x0001855c ldm r2!, {r1, r3, r4, r6, r7} | r1 = *(r2!);
| r3 = *((r2! + 4));
| r4 = *((r2! + 8));
| r6 = *((r2! + 12));
| r7 = *((r2! + 16));
0x0001855e movs r2, r0 | r2 = r0;
0x00018560 stm r7!, {r3, r6} | *(r7!) = r3;
| *((r7! + 4)) = r6;
0x00018562 movs r2, r0 | r2 = r0;
0x00018564 ldm r2, {r2, r5} | r2 = *(r2);
| r5 = *((r2 + 4));
0x00018566 movs r2, r0 | r2 = r0;
0x00018568 ldm r2!, {r1, r4, r5, r6, r7} | r1 = *(r2!);
| r4 = *((r2! + 4));
| r5 = *((r2! + 8));
| r6 = *((r2! + 12));
| r7 = *((r2! + 16));
0x0001856a movs r2, r0 | r2 = r0;
0x0001856c stm r6!, {r3, r4, r7} | *(r6!) = r3;
| *((r6! + 4)) = r4;
| *((r6! + 8)) = r7;
0x0001856e movs r2, r0 | r2 = r0;
0x00018570 ldm r1!, {r2, r5, r7} | r2 = *(r1!);
| r5 = *((r1! + 4));
| r7 = *((r1! + 8));
0x00018572 movs r2, r0 | r2 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2cf64 */
| #include <stdint.h>
|
; (fcn) sym.zbx_tcp_accept () | void zbx_tcp_accept (int16_t arg_1h, int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int32_t var_0h_2;
| int16_t var_8h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_9ch;
| int16_t var_11ch;
| int16_t var_19ch;
| r0 = arg1;
| r1 = arg2;
0x0002cf64 svcmi 0xf0e92d | __asm ("svcmi case.0x3207a.11");
0x0002cf68 mov sb, r1 | sb = r1;
0x0002cf6a ldr r1, [pc, 0x290] |
0x0002cf6c sub sp, 0x1a4 |
0x0002cf6e mov r4, r0 | r4 = r0;
0x0002cf70 ldr r2, [pc, 0x28c] | r2 = *(0x2d200);
0x0002cf72 add r1, pc | r1 = 0x5a174;
0x0002cf74 ldrb.w r3, [r0, 0x20] | r3 = *((r0 + 0x20));
0x0002cf78 ldr.w sl, [pc, 0x288] | sl = *(0x0002d204);
0x0002cf7c ldr r2, [r1, r2] |
0x0002cf7e add sl, pc | sl += pc;
0x0002cf80 ldr r2, [r2] | r2 = *(0x5a174);
0x0002cf82 str r2, [sp, 0x19c] | var_19ch = r2;
0x0002cf84 mov.w r2, 0 | r2 = 0;
0x0002cf88 cmp r3, 0 |
| if (r3 != 0) {
0x0002cf8a bne.w 0x2d0f0 | goto label_8;
| }
| label_0:
0x0002cf8e add r5, sp, 0x9c | r5 += var_9ch;
0x0002cf90 movs r2, 0x80 | r2 = 0x80;
0x0002cf92 movs r1, 0 | r1 = 0;
0x0002cf94 mov r0, r5 | r0 = r5;
0x0002cf96 blx 0xc1ac | statvfs64 ();
0x0002cf9a ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x0002cf9c cmp r3, 0 |
| if (r3 <= 0) {
0x0002cf9e ble.w 0x2d142 | goto label_9;
| }
0x0002cfa2 mov.w fp, 0 |
0x0002cfa6 add.w r7, r4, 0x24 | r7 = r4 + 0x24;
0x0002cfaa mov r6, fp | r6 = fp;
0x0002cfac mov.w r8, 1 | r8 = 1;
| do {
0x0002cfb0 ldr r0, [r7, 4]! | r0 = *((r7 += 4));
0x0002cfb4 adds r6, 1 | r6++;
0x0002cfb6 blx 0xbed0 | wait ();
0x0002cfba ldr.w r1, [r5, r0, lsl 2] | offset_0 = r0 << 2;
| r1 = *((r5 + offset_0));
0x0002cfbe ldr r2, [r7] | r2 = *(r7);
0x0002cfc0 and r3, r2, 0x1f | r3 = r2 & 0x1f;
0x0002cfc4 cmp fp, r2 |
0x0002cfc6 lsl.w r3, r8, r3 | r3 = r8 << r3;
0x0002cfca it lt |
| if (fp >= r2) {
0x0002cfcc movlt fp, r2 |
| }
0x0002cfce orrs r3, r1 | r3 |= r1;
0x0002cfd0 str.w r3, [r5, r0, lsl 2] | __asm ("str.w r3, [r5, r0, lsl 2]");
0x0002cfd4 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x0002cfd6 cmp r3, r6 |
0x0002cfd8 bgt 0x2cfb0 |
| } while (r3 > r6);
0x0002cfda add.w r0, fp, 1 | r0 += arg_1h;
| label_4:
0x0002cfde movs r6, 0 | r6 = 0;
0x0002cfe0 mov r1, r5 | r1 = r5;
0x0002cfe2 mov r3, r6 | r3 = r6;
0x0002cfe4 mov r2, r6 | r2 = r6;
0x0002cfe6 str r6, [sp] | *(sp) = r6;
0x0002cfe8 blx 0xbdf4 | r0 = fcn_0000bdf4 ();
0x0002cfec mov r7, r0 | r7 = r0;
0x0002cfee adds r0, r7, 1 | r0 = r7 + 1;
| if (r0 == r7) {
0x0002cff0 beq.w 0x2d1e0 | goto label_10;
| }
0x0002cff4 ldrd r3, r0, [r4, 0x24] | __asm ("ldrd r3, r0, [r4, 0x24]");
0x0002cff8 cmp r3, r6 |
0x0002cffa itt gt |
| if (r3 <= r6) {
0x0002cffc addgt r8, r4, 0x24 | r8 = r4 + 0x24;
| }
| if (r3 > r6) {
0x0002d000 movs r7, 1 | r7 = 1;
| }
| if (r7 > 1) {
0x0002d002 bgt 0x2d010 | goto label_11;
| }
0x0002d004 b 0x2d02c | goto label_12;
| do {
0x0002d006 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x0002d008 adds r6, 1 | r6++;
0x0002d00a cmp r3, r6 |
| if (r3 <= r6) {
0x0002d00c ble.w 0x2d114 | goto label_13;
| }
| label_11:
0x0002d010 ldr r0, [r8, 4]! | r0 = *((r8 += 4));
0x0002d014 blx 0xbed0 | wait ();
0x0002d018 ldr.w r3, [r5, r0, lsl 2] | offset_1 = r0 << 2;
| r3 = *((r5 + offset_1));
0x0002d01c ldr.w r0, [r8] | r0 = *(r8);
0x0002d020 and r1, r0, 0x1f | r1 = r0 & 0x1f;
0x0002d024 lsl.w r1, r7, r1 | r1 = r7 << r1;
0x0002d028 tst r1, r3 |
0x0002d02a beq 0x2d006 |
| } while ((r1 & r3) == 0);
| do {
| label_12:
0x0002d02c add r2, sp, 0x14 | r2 += var_14h;
0x0002d02e add r1, sp, 0x1c | r1 += var_1ch;
0x0002d030 movs r6, 0x80 | r6 = 0x80;
0x0002d032 str r6, [r2] | *(r2) = r6;
0x0002d034 blx 0xbf48 | r0 = seteuid ();
0x0002d038 adds r1, r0, 1 | r1 = r0 + 1;
0x0002d03a mov r7, r0 | r7 = r0;
| if (r1 == r0) {
0x0002d03c beq.w 0x2d19e | goto label_14;
| }
0x0002d040 ldr r3, [r4] | r3 = *(r4);
0x0002d042 add r5, sp, 0x18 | r5 += var_18h;
0x0002d044 str r6, [r5] | *(r5) = r6;
0x0002d046 mov.w r8, 1 | r8 = 1;
0x0002d04a add r6, sp, 0x11c | r6 += var_11ch;
0x0002d04c mov r2, r5 | r2 = r5;
0x0002d04e mov r1, r6 | r1 = r6;
0x0002d050 strd r0, r3, [r4] | __asm ("strd r0, r3, [r4]");
0x0002d054 strb.w r8, [r4, 0x20] | *((r4 + 0x20)) = r8;
0x0002d058 blx 0xc3b8 | fcn_0000c3b8 ();
0x0002d05c adds r0, 1 | r0++;
| if (r0 == 1) {
0x0002d05e beq.w 0x2d1ca | goto label_15;
| }
0x0002d062 mov r1, r6 | r1 = r6;
0x0002d064 ldr r2, [r5] | r2 = *(r5);
0x0002d066 addw r0, r4, 0xc28 | __asm ("addw r0, r4, case.0x3207a.11");
0x0002d06a blx 0xbd78 | fcn_0000bd78 ();
0x0002d06e ldrh.w r3, [sp, 0x11c] | r3 = var_11ch;
0x0002d072 mov r0, r6 | r0 = r6;
0x0002d074 addw r6, r4, 0xca8 | __asm ("addw r6, r4, case.0x3207a.11");
0x0002d078 str.w r8, [sp, 8] | __asm ("str.w r8, [var_8h]");
0x0002d07c mov r2, r6 | r2 = r6;
0x0002d07e cmp r3, 2 |
0x0002d080 mov.w r3, 0 | r3 = 0;
0x0002d084 strd r3, r3, [sp] | __asm ("strd r3, r3, [sp]");
0x0002d088 it eq |
| if (r3 != 2) {
0x0002d08a moveq r1, 0x10 | r1 = 0x10;
| }
0x0002d08c mov.w r3, 0x100 | r3 = case.0x3207a.11;
0x0002d090 it ne |
| if (r3 == 2) {
0x0002d092 movne r1, 0x1c | r1 = 0x1c;
| }
0x0002d094 blx 0xc2f4 | r0 = fcn_0000c2f4 ();
0x0002d098 mov r7, r0 | r7 = r0;
0x0002d09a cmp r0, 0 |
| if (r0 != 0) {
0x0002d09c bne.w 0x2d1b4 | goto label_16;
| }
0x0002d0a0 ldr r3, [pc, 0x164] | r3 = *(0x2d208);
0x0002d0a2 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x0002d0a6 ldr r0, [r3] | r0 = *(0x2d208);
0x0002d0a8 str r0, [r4, 0x18] | *((r4 + 0x18)) = r0;
0x0002d0aa bl 0x37e00 | zbx_alarm_on ();
0x0002d0ae mov r2, r8 | r2 = r8;
0x0002d0b0 ldr r0, [r4] | r0 = *(r4);
0x0002d0b2 movs r3, 2 | r3 = 2;
0x0002d0b4 mov r1, r5 | r1 = r5;
0x0002d0b6 blx 0xc46c | r0 = fcn_0000c46c ();
0x0002d0ba adds r2, r0, 1 | r2 = r0 + 1;
| if (r2 == r0) {
0x0002d0bc beq 0x2d17e | goto label_17;
| }
0x0002d0be cmp r0, 1 |
| if (r0 == 1) {
0x0002d0c0 beq 0x2d126 | goto label_18;
| }
| label_2:
0x0002d0c2 tst.w sb, 1 |
0x0002d0c6 itt ne |
| if ((sb & 1) == 0) {
0x0002d0c8 movne r3, 1 | r3 = 1;
| }
| if ((sb & 1) == 0) {
0x0002d0ca strne r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
| }
| if ((sb & 1) == 0) {
0x0002d0cc beq 0x2d146 | goto label_19;
| }
| label_3:
0x0002d0ce ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
| if (r3 != 0) {
0x0002d0d0 cbnz r3, 0x2d11c | goto label_20;
| }
| label_1:
0x0002d0d2 ldr r2, [pc, 0x138] |
0x0002d0d4 ldr r3, [pc, 0x128] | r3 = *(0x2d200);
0x0002d0d6 add r2, pc | r2 = 0x5a2e8;
0x0002d0d8 ldr r3, [r2, r3] | r3 = *(0x5a2e8);
0x0002d0da ldr r2, [r3] | r2 = *(0x5a2e8);
0x0002d0dc ldr r3, [sp, 0x19c] | r3 = var_19ch;
0x0002d0de eors r2, r3 | r2 ^= r3;
0x0002d0e0 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002d0e4 bne.w 0x2d1f6 | goto label_21;
| }
0x0002d0e8 mov r0, r7 | r0 = r7;
0x0002d0ea add sp, 0x1a4 |
0x0002d0ec pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_8:
0x0002d0f0 ldr r0, [r0] | r0 = *(r0);
0x0002d0f2 movs r1, 2 | r1 = 2;
0x0002d0f4 blx 0xc2cc | execl ();
0x0002d0f8 ldr r0, [r4] | r0 = *(r4);
0x0002d0fa adds r5, r0, 1 | r5 = r0 + 1;
| if (r5 != r0) {
0x0002d0fc beq 0x2d102 |
0x0002d0fe blx 0xc47c | fcn_0000c47c ();
| }
0x0002d102 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x0002d104 mov.w r2, -1 | r2 = -1;
0x0002d108 str r2, [r4, 4] | *((r4 + 4)) = r2;
0x0002d10a movs r2, 0 | r2 = 0;
0x0002d10c strb.w r2, [r4, 0x20] | *((r4 + 0x20)) = r2;
0x0002d110 str r3, [r4] | *(r4) = r3;
0x0002d112 b 0x2cf8e | goto label_0;
| label_13:
0x0002d114 adds r6, 0xa | r6 += 0xa;
0x0002d116 ldr.w r0, [r4, r6, lsl 2] | offset_2 = r6 << 2;
| r0 = *((r4 + offset_2));
0x0002d11a b 0x2d02c |
| } while (1);
| label_20:
0x0002d11c bl 0x37e10 | zbx_alarm_off ();
0x0002d120 movs r3, 0 | r3 = 0;
0x0002d122 str r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
0x0002d124 b 0x2d0d2 | goto label_1;
| label_18:
0x0002d126 ldrb r3, [r5] | r3 = *(r5);
0x0002d128 cmp r3, 0x16 |
| if (r3 != 0x16) {
0x0002d12a bne 0x2d0c2 | goto label_2;
| }
0x0002d12c ldr r0, [pc, 0xe0] |
0x0002d12e mov r1, r6 | r1 = r6;
0x0002d130 add r0, pc | r0 = 0x5a344;
0x0002d132 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002d136 ldrb.w r3, [r4, 0x20] | r3 = *((r4 + 0x20));
| if (r3 != 0) {
0x0002d13a cbnz r3, 0x2d158 | goto label_6;
| }
| do {
| label_5:
0x0002d13c mov.w r7, -1 | r7 = -1;
0x0002d140 b 0x2d0ce | goto label_3;
| label_9:
0x0002d142 movs r0, 1 | r0 = 1;
0x0002d144 b 0x2cfde | goto label_4;
| label_19:
0x0002d146 ldr r0, [pc, 0xcc] |
0x0002d148 mov r1, r6 | r1 = r6;
0x0002d14a add r0, pc | r0 = 0x5a364;
0x0002d14c bl 0x2c2a8 | fcn_0002c2a8 ();
| label_7:
0x0002d150 ldrb.w r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0002d154 cmp r3, 0 |
0x0002d156 beq 0x2d13c |
| } while (r3 == 0);
| label_6:
0x0002d158 ldr r0, [r4] | r0 = *(r4);
0x0002d15a movs r1, 2 | r1 = 2;
0x0002d15c blx 0xc2cc | execl ();
0x0002d160 ldr r0, [r4] | r0 = *(r4);
0x0002d162 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 != r0) {
0x0002d164 beq 0x2d16a |
0x0002d166 blx 0xc47c | fcn_0000c47c ();
| }
0x0002d16a ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0002d16c mov.w r3, -1 | r3 = -1;
0x0002d170 movs r1, 0 | r1 = 0;
0x0002d172 mov r7, r3 | r7 = r3;
0x0002d174 str r3, [r4, 4] | *((r4 + 4)) = r3;
0x0002d176 strb.w r1, [r4, 0x20] | *((r4 + 0x20)) = r1;
0x0002d17a str r2, [r4] | *(r4) = r2;
0x0002d17c b 0x2d0ce | goto label_3;
| label_17:
0x0002d17e blx 0xc15c | r0 = fcn_0000c15c ();
0x0002d182 ldr r0, [r0] | r0 = *(r0);
0x0002d184 bl 0x275f8 | r0 = strerror_from_system ()
0x0002d188 mov r2, r0 | r2 = r0;
0x0002d18a ldr r0, [pc, 0x8c] |
0x0002d18c mov r1, r6 | r1 = r6;
0x0002d18e add r0, pc | r0 = 0x5a3ac;
0x0002d190 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002d194 ldrb.w r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0002d198 cmp r3, 0 |
| if (r3 == 0) {
0x0002d19a beq 0x2d13c | goto label_5;
| }
0x0002d19c b 0x2d158 | goto label_6;
| label_14:
0x0002d19e blx 0xc15c | r0 = fcn_0000c15c ();
0x0002d1a2 ldr r0, [r0] | r0 = *(r0);
0x0002d1a4 bl 0x275f8 | r0 = strerror_from_system ()
0x0002d1a8 mov r1, r0 | r1 = r0;
0x0002d1aa ldr r0, [pc, 0x70] |
0x0002d1ac add r0, pc | r0 = 0x5a3ce;
0x0002d1ae bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002d1b2 b 0x2d0d2 | goto label_1;
| label_16:
0x0002d1b4 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002d1b8 ldr r0, [r0] | r0 = *(r0);
0x0002d1ba bl 0x275f8 | r0 = strerror_from_system ()
0x0002d1be mov r1, r0 | r1 = r0;
0x0002d1c0 ldr r0, [pc, 0x5c] |
0x0002d1c2 add r0, pc | r0 = 0x5a3e6;
0x0002d1c4 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002d1c8 b 0x2d150 | goto label_7;
| label_15:
0x0002d1ca blx 0xc15c | r0 = fcn_0000c15c ();
0x0002d1ce ldr r0, [r0] | r0 = *(r0);
0x0002d1d0 bl 0x275f8 | r0 = strerror_from_system ()
0x0002d1d4 mov r1, r0 | r1 = r0;
0x0002d1d6 ldr r0, [pc, 0x4c] |
0x0002d1d8 add r0, pc | r0 = 0x5a402;
0x0002d1da bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002d1de b 0x2d150 | goto label_7;
| label_10:
0x0002d1e0 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002d1e4 ldr r0, [r0] | r0 = *(r0);
0x0002d1e6 bl 0x275f8 | r0 = strerror_from_system ()
0x0002d1ea mov r1, r0 | r1 = r0;
0x0002d1ec ldr r0, [pc, 0x38] |
0x0002d1ee add r0, pc | r0 = 0x5a41a;
0x0002d1f0 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002d1f4 b 0x2d0d2 | goto label_1;
| label_21:
0x0002d1f6 blx 0xbe48 | fcn_0000be48 ();
0x0002d1fa nop |
0x0002d1fc ldc2l p0, c0, [sl], -8 | __asm ("ldc2l p0, c0, [sl], -8");
0x0002d200 lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x0002d202 movs r0, r0 |
0x0002d204 stc2l p0, c0, [lr], -8 | __asm ("stc2l p0, c0, [lr], -8");
0x0002d208 lsls r0, r4, 0xf | r0 = r4 << 0xf;
0x0002d20a movs r0, r0 |
0x0002d20c smlabb r0, r6, r2, r0 | __asm ("smlabb r0, r6, r2, r0");
0x0002d210 stm r4!, {r4, r6, r7} | *(r4!) = r4;
| *((r4! + 4)) = r6;
| *((r4! + 8)) = r7;
0x0002d212 movs r1, r0 | r1 = r0;
0x0002d214 stm r4!, {r1, r2, r5, r6, r7} | *(r4!) = r1;
| *((r4! + 4)) = r2;
| *((r4! + 8)) = r5;
| *((r4! + 12)) = r6;
| *((r4! + 16)) = r7;
0x0002d216 movs r1, r0 | r1 = r0;
0x0002d218 stm r4!, {r1, r3, r4, r5} | *(r4!) = r1;
| *((r4! + 4)) = r3;
| *((r4! + 8)) = r4;
| *((r4! + 12)) = r5;
0x0002d21a movs r1, r0 | r1 = r0;
0x0002d21c stm r3!, {r3, r5, r7} | *(r3!) = r3;
| *((r3! + 4)) = r5;
| *((r3! + 8)) = r7;
0x0002d21e movs r1, r0 | r1 = r0;
0x0002d220 stm r3!, {r1, r2, r4, r6, r7} | *(r3!) = r1;
| *((r3! + 4)) = r2;
| *((r3! + 8)) = r4;
| *((r3! + 12)) = r6;
| *((r3! + 16)) = r7;
0x0002d222 movs r1, r0 | r1 = r0;
0x0002d224 stm r3!, {r4, r7} | *(r3!) = r4;
| *((r3! + 4)) = r7;
0x0002d226 movs r1, r0 | r1 = r0;
0x0002d228 stm r3!, {r1, r4, r6} | *(r3!) = r1;
| *((r3! + 4)) = r4;
| *((r3! + 8)) = r6;
0x0002d22a movs r1, r0 | r1 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2cbc0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.zbx_tcp_listen () | void zbx_tcp_listen (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_40h;
| int16_t var_44h;
| int32_t var_48h;
| int32_t var_48h_2;
| int32_t var_50h;
| int32_t var_50h_2;
| int16_t var_58h;
| int16_t var_5ch;
| int16_t var_64h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0002cbc0 svcmi 0xf0e92d | __asm ("svcmi case.0x3207a.11");
0x0002cbc4 sub sp, 0x6c |
0x0002cbc6 str r2, [sp, 0x2c] | var_2ch = r2;
0x0002cbc8 mov r6, r2 | r6 = r2;
0x0002cbca movs r4, 0 | r4 = 0;
0x0002cbcc mov r8, r1 | r8 = r1;
0x0002cbce ldr r2, [pc, 0x344] |
0x0002cbd0 mov r5, r0 | r5 = r0;
0x0002cbd2 ldr r3, [pc, 0x344] | r3 = *(0x2cf1a);
0x0002cbd4 add r7, sp, 0x5c | r7 += var_5ch;
0x0002cbd6 str r1, [sp, 0x20] | var_20h = r1;
0x0002cbd8 mov r1, r4 | r1 = r4;
0x0002cbda add r2, pc | r2 = 0x59af4;
0x0002cbdc ldr r3, [r2, r3] |
0x0002cbde movw r2, 0xdac | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002cbe2 ldr r3, [r3] | r3 = *(0x59af4);
0x0002cbe4 str r3, [sp, 0x64] | var_64h = r3;
0x0002cbe6 mov.w r3, 0 | r3 = 0;
0x0002cbea str r4, [sp, 0x34] | var_34h = r4;
0x0002cbec blx 0xc1ac | statvfs64 ();
0x0002cbf0 ldr r2, [pc, 0x328] |
0x0002cbf2 movs r3, 5 | r3 = 5;
0x0002cbf4 str r3, [sp, 0x3c] | var_3ch = r3;
0x0002cbf6 movs r3, 1 | r3 = 1;
0x0002cbf8 str r3, [sp, 0x44] | var_44h = r3;
0x0002cbfa movs r1, 8 | r1 = 8;
0x0002cbfc mov r3, r6 | r3 = r6;
0x0002cbfe add r2, pc | r2 = 0x59b1e;
0x0002cc00 mov r0, r7 | r0 = r7;
0x0002cc02 str r4, [sp, 0x40] | var_40h = r4;
0x0002cc04 strd r4, r4, [sp, 0x48] | __asm ("strd r4, r4, [var_48h]");
0x0002cc08 strd r4, r4, [sp, 0x50] | __asm ("strd r4, r4, [var_50h]");
0x0002cc0c str r4, [sp, 0x58] | var_58h = r4;
0x0002cc0e bl 0x38ea0 | zbx_snprintf ();
0x0002cc12 mov r0, r8 | r0 = r8;
0x0002cc14 cmp r0, 0 |
| if (r0 == 0) {
0x0002cc16 beq.w 0x2ce78 | goto label_12;
| }
0x0002cc1a blx 0xbe3c | fcn_0000be3c ();
0x0002cc1e str r0, [sp, 0xc] | var_ch = r0;
| label_6:
0x0002cc20 ldr r3, [pc, 0x2fc] |
0x0002cc22 ldr.w fp, [pc, 0x300] | fp = *(0x0002cf24);
0x0002cc26 ldr.w sb, [sp, 0xc] | sb = var_ch;
0x0002cc28 str r0, [sp, 0x30] | *((sp + 0x30)) = r0;
0x0002cc2a add r3, pc | r3 = 0x59b4e;
0x0002cc2c str r3, [sp, 0x18] | var_18h = r3;
0x0002cc2e add fp, pc |
0x0002cc30 ldr r3, [pc, 0x2f4] |
0x0002cc32 add r3, pc | r3 = 0x59b5e;
0x0002cc34 str r3, [sp, 0x24] | var_24h = r3;
0x0002cc36 ldr r3, [pc, 0x2f4] |
0x0002cc38 add r3, pc | r3 = 0x59b6a;
0x0002cc3a str r3, [sp, 0x28] | var_28h = r3;
0x0002cc3c add r3, sp, 0x34 | r3 += var_34h;
0x0002cc3e str r3, [sp, 0x10] | var_10h = r3;
0x0002cc40 add r3, sp, 0x3c | r3 += var_3ch;
0x0002cc42 str r3, [sp, 0x14] | var_14h = r3;
0x0002cc44 cmp.w sb, 0 |
| if (sb == 0) {
0x0002cc48 beq.w 0x2cdde | goto label_13;
| }
| label_3:
0x0002cc4c movs r1, 0x2c | r1 = 0x2c;
0x0002cc4e mov r0, sb | r0 = sb;
0x0002cc50 blx 0xc138 | fcn_0000c138 ();
0x0002cc54 str r0, [sp, 0x1c] | var_1ch = r0;
| if (r0 != 0) {
0x0002cc56 cbz r0, 0x2cc5c |
0x0002cc58 movs r3, 0 | r3 = 0;
0x0002cc5a strb r3, [r0] | *(r0) = r3;
| }
| label_4:
0x0002cc5c ldrd r3, r2, [sp, 0x10] | __asm ("ldrd r3, r2, [var_10h]");
0x0002cc60 mov r1, r7 | r1 = r7;
0x0002cc62 mov r0, sb | r0 = sb;
0x0002cc64 blx 0xc3e8 | r0 = fcn_0000c3e8 ();
0x0002cc68 cmp r0, 0 |
| if (r0 != 0) {
0x0002cc6a bne.w 0x2cec2 | goto label_14;
| }
0x0002cc6e ldr r4, [sp, 0x34] | r4 = var_34h;
0x0002cc70 cmp r4, 0 |
| if (r4 == 0) {
0x0002cc72 beq.w 0x2cdc0 | goto label_15;
| }
0x0002cc76 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0002cc78 cmp.w sb, 0 |
0x0002cc7c it ne |
| if (sb == 0) {
0x0002cc7e movne r3, sb | r3 = sb;
| }
0x0002cc80 mov r8, r3 | r8 = r3;
0x0002cc82 b 0x2ccac | goto label_2;
| label_0:
0x0002cc84 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002cc88 mov r6, r0 | r6 = r0;
0x0002cc8a ldr r0, [r0] | r0 = *(r0);
0x0002cc8c bl 0x275f8 | r0 = strerror_from_system ()
0x0002cc90 mov r3, r0 | r3 = r0;
0x0002cc92 ldr r0, [pc, 0x29c] |
0x0002cc94 mov r2, r7 | r2 = r7;
0x0002cc96 mov r1, r8 | r1 = r8;
0x0002cc98 add r0, pc | r0 = 0x59bce;
0x0002cc9a bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002cc9e ldr r3, [r6] | r3 = *(r6);
0x0002cca0 cmp r3, 0x61 |
| if (r3 != 0x61) {
0x0002cca2 bne 0x2cd8e | goto label_8;
| }
| do {
| label_1:
0x0002cca4 ldr r4, [r4, 0x1c] | r4 = *((r4 + 0x1c));
0x0002cca6 cmp r4, 0 |
| if (r4 == 0) {
0x0002cca8 beq.w 0x2cdb6 | goto label_16;
| }
| label_2:
0x0002ccac ldr r6, [r5, 0x24] | r6 = *((r5 + 0x24));
0x0002ccae cmp.w r6, 0x100 |
| if (r6 == 0x100) {
0x0002ccb2 beq.w 0x2ce12 | goto label_17;
| }
0x0002ccb6 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0002ccb8 bic sl, r0, 8 | sl = BIT_MASK (r0, 8);
0x0002ccbc cmp.w sl, 2 |
0x0002ccc0 bne 0x2cca4 |
| } while (sl != 2);
0x0002ccc2 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x0002ccc4 adds r6, 0xa | r6 += 0xa;
0x0002ccc6 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x0002ccc8 orr r1, r1, 0x80000 | r1 |= case.0x3207a.11;
0x0002cccc blx 0xc400 | fcn_0000c400 ();
0x0002ccd0 str.w r0, [r5, r6, lsl 2] | __asm ("str.w r0, [r5, r6, lsl 2]");
0x0002ccd4 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0002ccd6 beq 0x2cc84 | goto label_0;
| }
0x0002ccd8 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002ccda mov r1, sl | r1 = sl;
0x0002ccdc movs r2, 1 | r2 = 1;
0x0002ccde adds r3, 0xa | r3 += 0xa;
0x0002cce0 ldr.w r0, [r5, r3, lsl 2] | offset_0 = r3 << 2;
| r0 = *((r5 + offset_0));
0x0002cce4 blx 0xc29c | shutdown ();
0x0002cce8 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0002ccea bne 0x2cd04 |
0x0002ccec blx 0xc15c | r0 = fcn_0000c15c ();
0x0002ccf0 ldr r0, [r0] | r0 = *(r0);
0x0002ccf2 bl 0x275f8 | r0 = strerror_from_system ()
0x0002ccf6 mov r3, r0 | r3 = r0;
0x0002ccf8 ldr r0, [pc, 0x238] |
0x0002ccfa mov r2, r7 | r2 = r7;
0x0002ccfc mov r1, r8 | r1 = r8;
0x0002ccfe add r0, pc | r0 = 0x59c36;
0x0002cd00 bl 0x2c2a8 | fcn_0002c2a8 ();
| }
0x0002cd04 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002cd06 add r6, sp, 0x38 | r6 += var_38h;
0x0002cd08 movs r1, 1 | r1 = 1;
0x0002cd0a movs r2, 2 | r2 = 2;
0x0002cd0c str r1, [sp, 0x38] | var_38h = r1;
0x0002cd0e adds r3, 0xa | r3 += 0xa;
0x0002cd10 ldr.w r0, [r5, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r5 + offset_1));
0x0002cd14 movs r3, 4 | r3 = 4;
0x0002cd16 str r3, [sp] | *(sp) = r3;
0x0002cd18 mov r3, r6 | r3 = r6;
0x0002cd1a blx 0xbc7c | fcn_0000bc7c ();
0x0002cd1e adds r0, 1 | r0++;
| if (r0 == 1) {
0x0002cd20 bne 0x2cd3e |
0x0002cd22 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002cd26 ldr r0, [r0] | r0 = *(r0);
0x0002cd28 bl 0x275f8 | strerror_from_system ()
0x0002cd2c ldr r1, [pc, 0x208] |
0x0002cd2e mov r3, r7 | r3 = r7;
0x0002cd30 str r0, [sp] | *(sp) = r0;
0x0002cd32 mov r2, r8 | r2 = r8;
0x0002cd34 ldr r0, [pc, 0x204] |
0x0002cd36 add r1, pc | r1 = 0x59c72;
0x0002cd38 add r0, pc | r0 = 0x59c78;
0x0002cd3a bl 0x2c2a8 | fcn_0002c2a8 ();
| }
0x0002cd3e ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0002cd40 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002cd42 cmp r2, 0xa |
0x0002cd44 add.w r1, r3, 0xa | r1 = r3 + 0xa;
0x0002cd48 ldr.w r0, [r5, r1, lsl 2] | offset_2 = r1 << 2;
| r0 = *((r5 + offset_2));
| if (r2 == 0xa) {
0x0002cd4c beq 0x2cde4 | goto label_18;
| }
| label_5:
0x0002cd4e adds r3, 0xa | r3 += 0xa;
0x0002cd50 ldrd r2, r1, [r4, 0x10] | __asm ("ldrd r2, r1, [r4, 0x10]");
0x0002cd54 ldr.w r0, [r5, r3, lsl 2] | offset_3 = r3 << 2;
| r0 = *((r5 + offset_3));
0x0002cd58 blx 0xc190 | fcn_0000c190 ();
0x0002cd5c adds r0, 1 | r0++;
| if (r0 != 1) {
0x0002cd5e bne 0x2cd94 | goto label_19;
| }
0x0002cd60 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002cd64 mov r6, r0 | r6 = r0;
0x0002cd66 ldr r0, [r0] | r0 = *(r0);
0x0002cd68 bl 0x275f8 | strerror_from_system ()
0x0002cd6c mov r2, r7 | r2 = r7;
0x0002cd6e mov r3, r0 | r3 = r0;
0x0002cd70 mov r1, r8 | r1 = r8;
0x0002cd72 mov r0, fp | r0 = fp;
0x0002cd74 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002cd78 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002cd7a adds r3, 0xa | r3 += 0xa;
0x0002cd7c ldr.w r0, [r5, r3, lsl 2] | offset_4 = r3 << 2;
| r0 = *((r5 + offset_4));
0x0002cd80 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 != r0) {
0x0002cd82 beq 0x2cd88 |
0x0002cd84 blx 0xc47c | fcn_0000c47c ();
| }
0x0002cd88 ldr r3, [r6] | r3 = *(r6);
0x0002cd8a cmp r3, 0x62 |
| if (r3 == 0x62) {
0x0002cd8c beq 0x2cca4 | goto label_1;
| }
| label_8:
0x0002cd8e mov.w r6, -1 | r6 = -1;
0x0002cd92 b 0x2ce28 | goto label_9;
| label_19:
0x0002cd94 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002cd96 mov.w r1, 0x1000 | r1 = case.0x3207a.11;
0x0002cd98 str r0, [r0, r6] | *((r0 + r6)) = r0;
0x0002cd9a adds r3, 0xa | r3 += 0xa;
0x0002cd9c ldr.w r0, [r5, r3, lsl 2] | offset_5 = r3 << 2;
| r0 = *((r5 + offset_5));
0x0002cda0 blx 0xc318 | r0 = fcn_0000c318 ();
0x0002cda4 adds r6, r0, 1 | r6 = r0 + 1;
| if (r6 == r0) {
0x0002cda6 beq 0x2ce86 | goto label_20;
| }
0x0002cda8 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002cdaa ldr r4, [r4, 0x1c] | r4 = *((r4 + 0x1c));
0x0002cdac adds r3, 1 | r3++;
0x0002cdae str r3, [r5, 0x24] | *((r5 + 0x24)) = r3;
0x0002cdb0 cmp r4, 0 |
| if (r4 != 0) {
0x0002cdb2 bne.w 0x2ccac | goto label_2;
| }
0x0002cdb4 add r7, sp, 0x1ec | r7 = sp + case.0x3207a.11;
| label_16:
0x0002cdb6 ldr r0, [sp, 0x34] | r0 = var_34h;
| if (r0 != 0) {
0x0002cdb8 cbz r0, 0x2cdc0 |
0x0002cdba blx 0xc3dc | fcn_0000c3dc ();
0x0002cdbe str r4, [sp, 0x34] | var_34h = r4;
| }
| label_15:
0x0002cdc0 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0002cdc2 cmp r3, 0 |
0x0002cdc4 it ne |
| if (r3 != 0) {
0x0002cdc6 cmpne sb, 0 | __asm ("cmpne sb, 0");
| }
| if (r3 == 0) {
0x0002cdca beq.w 0x2cee6 | goto label_21;
| }
0x0002cdcc strh r4, [r1, 4] | *((r1 + 4)) = r4;
0x0002cdce mov sb, r3 | sb = r3;
0x0002cdd0 movs r3, 0x2c | r3 = 0x2c;
0x0002cdd2 strb r3, [sb], 1 | *(sb) = r3;
| sb++;
0x0002cdd6 cmp.w sb, 0 |
| if (sb != 0) {
0x0002cdda bne.w 0x2cc4c | goto label_3;
| }
| label_13:
0x0002cdde str.w sb, [sp, 0x1c] | __asm ("str.w sb, [var_1ch]");
0x0002cde2 b 0x2cc5c | goto label_4;
| label_18:
0x0002cde4 movs r2, 4 | r2 = 4;
0x0002cde6 mov r3, r6 | r3 = r6;
0x0002cde8 str r2, [sp] | *(sp) = r2;
0x0002cdea movs r1, 0x29 | r1 = 0x29;
0x0002cdec movs r2, 0x1a | r2 = 0x1a;
0x0002cdee blx 0xbc7c | fcn_0000bc7c ();
0x0002cdf2 adds r0, 1 | r0++;
| if (r0 == 1) {
0x0002cdf4 bne 0x2ce0e |
0x0002cdf6 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002cdfa ldr r0, [r0] | r0 = *(r0);
0x0002cdfc bl 0x275f8 | strerror_from_system ()
0x0002ce00 mov r3, r7 | r3 = r7;
0x0002ce02 str r0, [sp] | *(sp) = r0;
0x0002ce04 mov r2, r8 | r2 = r8;
0x0002ce06 ldrd r1, r0, [sp, 0x24] | __asm ("ldrd r1, r0, [var_24h]");
0x0002ce0a bl 0x2c2a8 | fcn_0002c2a8 ();
| }
0x0002ce0e ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002ce10 b 0x2cd4e | goto label_5;
| label_17:
0x0002ce12 cmp.w sb, 0 |
| if (sb == 0) {
0x0002ce16 beq 0x2ce7e | goto label_22;
| }
| label_7:
0x0002ce18 ldr r0, [pc, 0x124] |
0x0002ce1a mov.w r6, -1 | r6 = -1;
0x0002ce1e mov r2, r7 | r2 = r7;
0x0002ce20 mov r1, sb | r1 = sb;
0x0002ce22 add r0, pc | r0 = 0x59d66;
0x0002ce24 bl 0x2c2a8 | fcn_0002c2a8 ();
| label_9:
0x0002ce28 ldr r3, [sp, 0xc] | r3 = var_ch;
| if (r3 != 0) {
0x0002ce2a cbz r3, 0x2ce32 |
0x0002ce2c mov r0, r3 | r0 = r3;
0x0002ce2e blx 0xbd14 | gai_strerror ();
| }
0x0002ce32 ldr r0, [sp, 0x34] | r0 = var_34h;
| if (r0 != 0) {
0x0002ce34 cbz r0, 0x2ce3a |
0x0002ce36 blx 0xc3dc | fcn_0000c3dc ();
| }
| if (r6 == 0) {
0x0002ce3a cbz r6, 0x2ce5c | goto label_23;
| }
0x0002ce3c ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002ce3e cmp r3, 0 |
| if (r3 <= 0) {
0x0002ce40 ble 0x2ce5c | goto label_23;
| }
0x0002ce42 add.w r7, r5, 0x24 | r7 = r5 + 0x24;
0x0002ce46 movs r4, 0 | r4 = 0;
| do {
0x0002ce48 ldr r0, [r7, 4]! | r0 = *((r7 += 4));
0x0002ce4c adds r2, r0, 1 | r2 = r0 + 1;
| if (r2 != r0) {
0x0002ce4e beq 0x2ce56 |
0x0002ce50 blx 0xc47c | fcn_0000c47c ();
0x0002ce54 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
| }
0x0002ce56 adds r4, 1 | r4++;
0x0002ce58 cmp r3, r4 |
0x0002ce5a bgt 0x2ce48 |
| } while (r3 > r4);
| label_23:
0x0002ce5c ldr r2, [pc, 0xe4] |
0x0002ce5e ldr r3, [pc, 0xb8] | r3 = *(0x2cf1a);
0x0002ce60 add r2, pc | r2 = 0x59da8;
0x0002ce62 ldr r3, [r2, r3] | r3 = *(0x59da8);
0x0002ce64 ldr r2, [r3] | r2 = *(0x59da8);
0x0002ce66 ldr r3, [sp, 0x64] | r3 = var_64h;
0x0002ce68 eors r2, r3 | r2 ^= r3;
0x0002ce6a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002ce6e bne 0x2cf08 | goto label_24;
| }
0x0002ce70 mov r0, r6 | r0 = r6;
0x0002ce72 add sp, 0x6c |
0x0002ce74 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_12:
0x0002ce78 ldr r3, [sp, 0x20] | r3 = var_20h;
0x0002ce7a str r3, [sp, 0xc] | var_ch = r3;
0x0002ce7c b 0x2cc20 | goto label_6;
| label_22:
0x0002ce7e ldr.w sb, [pc, 0xc8] | sb = *(0x0002cf48);
0x0002ce82 add sb, pc | sb += pc;
0x0002ce84 b 0x2ce18 | goto label_7;
| label_20:
0x0002ce86 mov r6, r0 | r6 = r0;
0x0002ce88 cmp.w sb, 0 |
| if (sb == 0) {
0x0002ce8c beq 0x2ceba | goto label_25;
| }
| label_10:
0x0002ce8e blx 0xc15c | r0 = fcn_0000c15c ();
0x0002ce92 ldr r0, [r0] | r0 = *(r0);
0x0002ce94 bl 0x275f8 | r0 = strerror_from_system ()
0x0002ce98 mov r3, r0 | r3 = r0;
0x0002ce9a ldr r0, [pc, 0xb0] |
0x0002ce9c mov r1, sb | r1 = sb;
0x0002ce9e mov r2, r7 | r2 = r7;
0x0002cea0 add r0, pc | r0 = 0x59df2;
0x0002cea2 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002cea6 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002cea8 adds r3, 0xa | r3 += 0xa;
0x0002ceaa ldr.w r0, [r5, r3, lsl 2] | offset_6 = r3 << 2;
| r0 = *((r5 + offset_6));
0x0002ceae adds r1, r0, 1 | r1 = r0 + 1;
| if (r1 == r0) {
0x0002ceb0 beq.w 0x2cd8e | goto label_8;
| }
0x0002ceb4 blx 0xc47c | fcn_0000c47c ();
0x0002ceb8 b 0x2ce28 | goto label_9;
| label_25:
0x0002ceba ldr.w sb, [pc, 0x94] | sb = *(0x0002cf50);
0x0002cebe add sb, pc | sb += pc;
0x0002cec0 b 0x2ce8e | goto label_10;
| label_14:
0x0002cec2 mov r4, r0 | r4 = r0;
0x0002cec4 cmp.w sb, 0 |
| if (sb == 0) {
0x0002cec8 beq 0x2cf00 | goto label_26;
| }
| label_11:
0x0002ceca mov r0, r4 | r0 = r4;
0x0002cecc mov.w r6, -1 | r6 = -1;
0x0002ced0 blx 0xbd20 | fgets (r0, r1, r2);
0x0002ced4 str r0, [sp] | *(sp) = r0;
0x0002ced6 mov r3, r4 | r3 = r4;
0x0002ced8 ldr r0, [pc, 0x78] |
0x0002ceda mov r2, r7 | r2 = r7;
0x0002cedc mov r1, sb | r1 = sb;
0x0002cede add r0, pc | r0 = 0x59e36;
0x0002cee0 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002cee4 b 0x2ce28 | goto label_9;
| label_21:
0x0002cee6 ldr r3, [r5, 0x24] | r3 = *((r5 + 0x24));
0x0002cee8 movs r6, 0 | r6 = 0;
0x0002ceea cmp r3, 0 |
| if (r3 != 0) {
0x0002ceec bne 0x2ce28 | goto label_9;
| }
0x0002ceee ldr r3, [sp, 0x20] | r3 = var_20h;
0x0002cef0 cbz r3, 0x2cf0c |
| while (1) {
0x0002cef2 ldr r0, [pc, 0x64] |
0x0002cef4 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x0002cef6 ldr r1, [sp, 0x20] | r1 = var_20h;
0x0002cef8 add r0, pc | r0 = 0x59e56;
0x0002cefa bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002cefe b 0x2cd8e | goto label_8;
| label_26:
0x0002cf00 ldr.w sb, [pc, 0x58] |
0x0002cf04 add sb, pc | sb = 0x59e64;
0x0002cf06 b 0x2ceca | goto label_11;
| label_24:
0x0002cf08 blx 0xbe48 | fcn_0000be48 ();
0x0002cf0c ldr r3, [pc, 0x50] |
0x0002cf0e add r3, pc | r3 = 0x59e72;
0x0002cf10 str r3, [sp, 0x20] | var_20h = r3;
0x0002cf12 b 0x2cef2 |
| }
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2df10 */
| #include <stdint.h>
|
; (fcn) sym.zbx_udp_recv () | void zbx_udp_recv (int16_t arg_ff00h, int16_t arg1, int16_t arg2) {
| int16_t var_ff00h;
| int16_t var_8h;
| int32_t var_0h;
| r0 = arg1;
| r1 = arg2;
0x0002df10 ldr r2, [pc, 0x124] |
0x0002df12 ldr r3, [pc, 0x128] | r3 = *(0x2e03e);
0x0002df14 push {r4, r5, r6, r7, lr} |
0x0002df16 sub.w sp, sp, 0xff00 |
0x0002df1a add r2, pc | r2 = 0x5bf56;
0x0002df1c sub sp, 0xf4 |
0x0002df1e mov r4, r0 | r4 = r0;
0x0002df20 add.w r0, sp, 0xff00 | r0 += arg_ff00h;
0x0002df24 ldr r3, [r2, r3] |
0x0002df26 adds r0, 0xec | r0 += 0xec;
0x0002df28 mov r5, r1 | r5 = r1;
0x0002df2a ldr r3, [r3] | r3 = *(0x5bf56);
0x0002df2c str r3, [r0] | *(r0) = r3;
0x0002df2e mov.w r3, 0 | r3 = 0;
0x0002df32 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x0002df34 cmp r3, 1 |
0x0002df36 beq 0x2df9e |
| while (r0 == 0) {
0x0002df38 cmp r5, 0 |
| if (r5 != 0) {
0x0002df3a bne 0x2dfb0 | goto label_4;
| }
| label_0:
0x0002df3c add r6, sp, 8 | r6 += var_8h;
0x0002df3e mov r3, r5 | r3 = r5;
0x0002df40 strd r5, r5, [sp] | __asm ("strd r5, r5, [sp]");
0x0002df44 movw r2, 0xffe3 | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002df48 ldr r0, [r4] | r0 = *(r4);
0x0002df4a mov r1, r6 | r1 = r6;
0x0002df4c blx 0xbe30 | r0 = fcn_0000be30 ();
0x0002df50 adds r3, r0, 1 | r3 = r0 + 1;
0x0002df52 mov r5, r0 | r5 = r0;
| if (r3 == r0) {
0x0002df54 beq 0x2e018 | goto label_5;
| }
| label_1:
0x0002df56 cmp.w r5, 0x800 |
0x0002df5a add.w r7, r5, 1 | r7 = r5 + 1;
| if (r5 >= 0x800) {
0x0002df5e bhs 0x2dfe2 | goto label_6;
| }
0x0002df60 add.w r0, r4, 0x428 | r0 = r4 + case.0x3207a.11;
0x0002df64 movs r3, 0 | r3 = 0;
0x0002df66 str r3, [r4, 0x1c] | *((r4 + 0x1c)) = r3;
| label_2:
0x0002df68 mov r1, r6 | r1 = r6;
0x0002df6a add r3, sp, 8 | r3 += var_8h;
0x0002df6c movs r6, 0 | r6 = 0;
0x0002df6e mov r2, r7 | r2 = r7;
0x0002df70 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
0x0002df72 strb r6, [r3, r5] | *((r3 + r5)) = r6;
0x0002df74 blx 0xbd78 | fcn_0000bd78 ();
0x0002df78 mov r0, r6 | r0 = r6;
0x0002df7a str r5, [r4, 8] | *((r4 + 8)) = r5;
| label_3:
0x0002df7c ldr r2, [pc, 0xc0] |
0x0002df7e add.w r1, sp, 0xff00 | r1 += arg_ff00h;
0x0002df82 ldr r3, [pc, 0xb8] | r3 = *(0x2e03e);
0x0002df84 adds r1, 0xec | r1 += 0xec;
0x0002df86 add r2, pc | r2 = 0x5bfca;
0x0002df88 ldr r3, [r2, r3] | r3 = *(0x5bfca);
0x0002df8a ldr r2, [r3] | r2 = *(0x5bfca);
0x0002df8c ldr r3, [r1] | r3 = *(r1);
0x0002df8e eors r2, r3 | r2 ^= r3;
0x0002df90 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002df94 bne 0x2e032 | goto label_7;
| }
0x0002df96 add.w sp, sp, 0xff00 |
0x0002df9a add sp, 0xf4 |
0x0002df9c pop {r4, r5, r6, r7, pc} |
0x0002df9e ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x0002dfa0 cmp r0, 0 |
0x0002dfa2 beq 0x2df38 |
| }
0x0002dfa4 blx 0xbd14 | gai_strerror ();
0x0002dfa8 movs r3, 0 | r3 = 0;
0x0002dfaa str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x0002dfac cmp r5, 0 |
| if (r5 == 0) {
0x0002dfae beq 0x2df3c | goto label_0;
| }
| label_4:
0x0002dfb0 movs r7, 0 | r7 = 0;
0x0002dfb2 mov r0, r5 | r0 = r5;
0x0002dfb4 str r5, [r4, 0x18] | *((r4 + 0x18)) = r5;
0x0002dfb6 add r6, sp, 8 | r6 += var_8h;
0x0002dfb8 bl 0x37e00 | zbx_alarm_on ();
0x0002dfbc movw r2, 0xffe3 | r2 = (r2 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002dfc0 strd r7, r7, [sp] | __asm ("strd r7, r7, [sp]");
0x0002dfc4 mov r3, r7 | r3 = r7;
0x0002dfc6 ldr r0, [r4] | r0 = *(r4);
0x0002dfc8 mov r1, r6 | r1 = r6;
0x0002dfca blx 0xbe30 | r0 = fcn_0000be30 ();
0x0002dfce adds r2, r0, 1 | r2 = r0 + 1;
0x0002dfd0 mov r5, r0 | r5 = r0;
| if (r2 == r0) {
0x0002dfd2 beq 0x2dff8 | goto label_8;
| }
0x0002dfd4 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x0002dfd6 cmp r3, 0 |
| if (r3 == 0) {
0x0002dfd8 beq 0x2df56 | goto label_1;
| }
0x0002dfda bl 0x37e10 | zbx_alarm_off ();
0x0002dfde str r7, [r4, 0x18] | *((r4 + 0x18)) = r7;
0x0002dfe0 b 0x2df56 | goto label_1;
| label_6:
0x0002dfe2 ldr r0, [pc, 0x60] |
0x0002dfe4 movs r3, 1 | r3 = 1;
0x0002dfe6 str r3, [r4, 0x1c] | *((r4 + 0x1c)) = r3;
0x0002dfe8 movw r1, 0x93a | r1 = (r1 & 0xFFFF0000) | (case.0x3207a.11 & 0xFFFF);
0x0002dfec ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x0002dfee mov r3, r7 | r3 = r7;
0x0002dff0 add r0, pc | r0 = 0x5c03a;
0x0002dff2 bl 0x35c28 | zbx_malloc2 ();
0x0002dff6 b 0x2df68 | goto label_2;
| label_8:
0x0002dff8 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002dffc ldr r0, [r0] | r0 = *(r0);
0x0002dffe bl 0x275f8 | r0 = strerror_from_system ()
0x0002e002 mov r1, r0 | r1 = r0;
0x0002e004 ldr r0, [pc, 0x40] |
0x0002e006 add r0, pc | r0 = 0x5c052;
0x0002e008 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002e00c ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
| if (r3 != 0) {
0x0002e00e cbz r3, 0x2e02c |
0x0002e010 bl 0x37e10 | zbx_alarm_off ();
0x0002e014 str r7, [r4, 0x18] | *((r4 + 0x18)) = r7;
0x0002e016 b 0x2e02c | goto label_9;
| label_5:
0x0002e018 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002e01c ldr r0, [r0] | r0 = *(r0);
0x0002e01e bl 0x275f8 | r0 = strerror_from_system ()
0x0002e022 mov r1, r0 | r1 = r0;
0x0002e024 ldr r0, [pc, 0x24] |
0x0002e026 add r0, pc | r0 = 0x5c076;
0x0002e028 bl 0x2c2a8 | fcn_0002c2a8 ();
| }
| label_9:
0x0002e02c mov.w r0, -1 | r0 = -1;
0x0002e030 b 0x2df7c | goto label_3;
| label_7:
0x0002e032 blx 0xbe48 | fcn_0000be48 ();
0x0002e036 nop |
0x0002e038 ldcl p0, c0, [r2], {2} | __asm ("ldcl p0, c0, [r2], {2}");
0x0002e03c lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x0002e03e movs r0, r0 |
0x0002e040 stcl p0, c0, [r6], -8 | __asm ("stcl p0, c0, [r6], -8");
0x0002e044 sxtb r4, r3 | r4 = (int32_t) r3;
0x0002e046 movs r1, r0 | r1 = r0;
| if (r2 != 0) {
0x0002e048 cbnz r2, 0x2e08a | void (*0x2e08a)() ();
| }
0x0002e04a movs r1, r0 | r1 = r0;
| if (r2 != 0) {
0x0002e04c cbnz r2, 0x2e086 | void (*0x2e086)() ();
| }
0x0002e04e movs r1, r0 | r1 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2de7c */
| #include <stdint.h>
|
; (fcn) sym.zbx_udp_send () | void zbx_udp_send (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int32_t var_0h;
| int32_t var_0h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002de7c push {r4, r5, r6, r7, lr} |
0x0002de7e mov r6, r0 | r6 = r0;
0x0002de80 sub sp, 0xc |
0x0002de82 mov r4, r3 | r4 = r3;
| if (r3 != 0) {
0x0002de84 cbnz r3, 0x2dea0 | goto label_2;
| }
0x0002de86 ldr r0, [r0] | r0 = *(r0);
0x0002de88 strd r3, r3, [sp] | __asm ("strd r3, r3, [sp]");
0x0002de8c blx 0xc2c0 | r0 = getnameinfo ();
0x0002de90 adds r3, r0, 1 | r3 = r0 + 1;
0x0002de92 mov r5, r0 | r5 = r0;
0x0002de94 it ne |
| if (r3 == r0) {
0x0002de96 movne r5, r4 | r5 = r4;
| }
| if (r3 == r0) {
0x0002de98 beq 0x2deda | goto label_3;
| }
| do {
| label_0:
0x0002de9a mov r0, r5 | r0 = r5;
0x0002de9c add sp, 0xc |
0x0002de9e pop {r4, r5, r6, r7, pc} |
| label_2:
0x0002dea0 mov r5, r1 | r5 = r1;
0x0002dea2 mov r7, r2 | r7 = r2;
0x0002dea4 mov r0, r3 | r0 = r3;
0x0002dea6 movs r4, 0 | r4 = 0;
0x0002dea8 str r3, [r6, 0x18] | *((r6 + 0x18)) = r3;
0x0002deaa bl 0x37e00 | zbx_alarm_on ();
0x0002deae mov r2, r7 | r2 = r7;
0x0002deb0 mov r1, r5 | r1 = r5;
0x0002deb2 strd r4, r4, [sp] | __asm ("strd r4, r4, [sp]");
0x0002deb6 mov r3, r4 | r3 = r4;
0x0002deb8 ldr r0, [r6] | r0 = *(r6);
0x0002deba blx 0xc2c0 | r0 = getnameinfo ();
0x0002debe adds r2, r0, 1 | r2 = r0 + 1;
0x0002dec0 mov r5, r0 | r5 = r0;
| if (r2 == r0) {
0x0002dec2 beq 0x2def0 | goto label_4;
| }
0x0002dec4 mov r5, r4 | r5 = r4;
| label_1:
0x0002dec6 ldr r3, [r6, 0x18] | r3 = *((r6 + 0x18));
0x0002dec8 cmp r3, 0 |
0x0002deca beq 0x2de9a |
| } while (r3 == 0);
0x0002decc bl 0x37e10 | zbx_alarm_off ();
0x0002ded0 movs r3, 0 | r3 = 0;
0x0002ded2 mov r0, r5 | r0 = r5;
0x0002ded4 str r3, [r6, 0x18] | *((r6 + 0x18)) = r3;
0x0002ded6 add sp, 0xc |
0x0002ded8 pop {r4, r5, r6, r7, pc} |
| label_3:
0x0002deda blx 0xc15c | r0 = fcn_0000c15c ();
0x0002dede ldr r0, [r0] | r0 = *(r0);
0x0002dee0 bl 0x275f8 | r0 = strerror_from_system ()
0x0002dee4 mov r1, r0 | r1 = r0;
0x0002dee6 ldr r0, [pc, 0x20] |
0x0002dee8 add r0, pc | r0 = 0x5bdf6;
0x0002deea bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002deee b 0x2de9a | goto label_0;
| label_4:
0x0002def0 blx 0xc15c | r0 = fcn_0000c15c ();
0x0002def4 ldr r0, [r0] | r0 = *(r0);
0x0002def6 bl 0x275f8 | r0 = strerror_from_system ()
0x0002defa mov r1, r0 | r1 = r0;
0x0002defc ldr r0, [pc, 0xc] |
0x0002defe add r0, pc | r0 = 0x5be0e;
0x0002df00 bl 0x2c2a8 | fcn_0002c2a8 ();
0x0002df04 b 0x2dec6 | goto label_1;
| }
[*] Function system used 28 times zabbix_agentd