[*] Binary protection state of zabbix_agentd
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of zabbix_agentd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/zabbix_agentd @ 0x2c2a8 */
| #include <stdint.h>
|
; (fcn) fcn.0002c2a8 () | uint32_t fcn_0002c2a8 () {
| int16_t var_0h_3;
| int16_t var_4h_3;
| int16_t var_10h;
0x0002c2a8 push {r0, r1, r2, r3} |
0x0002c2aa mov.w r1, 0x200 | r1 = case.0x3207a.11;
0x0002c2ae push {lr} |
0x0002c2b0 sub sp, 0xc |
0x0002c2b2 add r3, sp, 0x10 | r3 += var_10h;
0x0002c2b4 ldr.w lr, [pc, 0x48] |
0x0002c2b8 ldr.w ip, [pc, 0x48] |
0x0002c2bc ldr r0, [pc, 0x48] |
0x0002c2be add lr, pc | lr += pc;
0x0002c2c0 ldr r2, [r3], 4 | r2 = *(r3);
| r3 += 4;
0x0002c2c4 ldr.w ip, [lr, ip] | ip = *((lr + ip));
0x0002c2c8 add r0, pc | r0 = 0x585d4;
0x0002c2ca ldr.w ip, [ip] | ip = *(0x2c304);
0x0002c2ce str.w ip, [sp, 4] | __asm ("str.w ip, [var_4h_3]");
0x0002c2d2 mov.w ip, 0 |
0x0002c2d6 str r3, [sp] | *(sp) = r3;
0x0002c2d8 bl 0x39020 | zbx_vsnprintf ()
0x0002c2dc ldr r2, [pc, 0x2c] |
0x0002c2de ldr r3, [pc, 0x24] | r3 = *(0x2c306);
0x0002c2e0 add r2, pc | r2 = 0x585f0;
0x0002c2e2 ldr r3, [r2, r3] | r3 = *(0x585f0);
0x0002c2e4 ldr r2, [r3] | r2 = *(0x585f0);
0x0002c2e6 ldr r3, [sp, 4] | r3 = var_4h_3;
0x0002c2e8 eors r2, r3 | r2 ^= r3;
0x0002c2ea mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x0002c2ee bne 0x2c2fa |
0x0002c2f0 add sp, 0xc |
0x0002c2f2 ldr lr, [sp], 4 |
0x0002c2f4 add.w r0, r4, r4, lsl 12 | r0 = r4 + (r4 << 12);
0x0002c2f8 bx lr | return r0;
| }
0x0002c2fa blx 0xbe48 | fcn_0000be48 ();
0x0002c2fe nop |
0x0002c300 lsrs r6, r5, 4 | r6 = r5 >> 4;
0x0002c302 movs r3, r0 | r3 = r0;
0x0002c304 lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x0002c306 movs r0, r0 |
0x0002c308 cmp r4, 0xec |
0x0002c30a movs r3, r0 | r3 = r0;
0x0002c30c lsrs r4, r1, 4 | r4 = r1 >> 4;
0x0002c30e movs r3, r0 | r3 = 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 @ 0x2fb54 */
| #include <stdint.h>
|
; (fcn) fcn.0002fb54 () | void fcn_0002fb54 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_1h;
| int16_t var_2h;
| int16_t var_3h;
| int16_t var_4h;
| int16_t var_84h;
| int16_t var_4h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0002fb54 mvnsmi lr, 0xb4000 | __asm ("mvnsmi lr, case.0x3207a.11");
0x0002fb58 mov r6, r2 | r6 = r2;
0x0002fb5a ldr r2, [pc, 0x298] |
0x0002fb5c sub sp, 0xc |
0x0002fb5e ldr r3, [pc, 0x298] | r3 = *(0x2fdfa);
0x0002fb60 add r2, pc | r2 = 0x5f95a;
0x0002fb62 ldr r3, [r2, r3] |
0x0002fb64 ldr r3, [r3] | r3 = imp.__environ;
0x0002fb66 str r3, [sp, 4] | var_4h = r3;
0x0002fb68 mov.w r3, 0 | r3 = 0;
| if (r6 == 0) {
0x0002fb6c cbz r6, 0x2fbde | goto label_0;
| }
0x0002fb6e mov.w r8, 0xfc00 | r8 = case.0x3207a.11;
0x0002fb72 mov r7, r1 | r7 = r1;
0x0002fb74 adds r4, r0, 1 | r4 = r0 + 1;
0x0002fb76 mov r5, r1 | r5 = r1;
0x0002fb78 mov sb, sp | sb = sp;
0x0002fb7a movt r8, 0xf | r8 = (r8 & 0xFFFF) | 0xf0000;
| do {
0x0002fb7e ldrb r3, [r4] | r3 = *(r4);
| if (r3 == 0) {
0x0002fb80 cbz r3, 0x2fbde | goto label_0;
| }
0x0002fb82 cmp r3, 0x22 |
| if (r3 == 0x22) {
0x0002fb84 beq 0x2fc1c | goto label_9;
| }
0x0002fb86 cmp r3, 0x5c |
| if (r3 == 0x5c) {
0x0002fb88 bne 0x2fbd2 |
0x0002fb8a ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x0002fb8c cmp r3, 0x74 |
| if (r3 > 0x74) {
0x0002fb8e bhi 0x2fc34 | goto label_10;
| }
0x0002fb90 cmp r3, 0x5b |
| if (r3 < 0x5b) {
0x0002fb92 bls 0x2fbfc | goto label_11;
| }
0x0002fb94 sub.w r2, r3, 0x5c | r2 = r3 - 0x5c;
0x0002fb98 cmp r2, 0x18 |
| if (r2 > 0x18) {
0x0002fb9a bhi 0x2fbde | goto label_0;
| }
| /* switch table (26 cases) at 0x2fba0 */
0x0002fb9c tbh [pc, r2, lsl 1] | __asm ("tbh [pc, r2, lsl 1]");
| }
0x0002fbd2 adds r4, 1 | r4++;
0x0002fbd4 strb r3, [r5], 1 | *(r5) = r3;
| r5++;
| label_1:
0x0002fbd8 subs r3, r5, r7 | r3 = r5 - r7;
0x0002fbda cmp r3, r6 |
0x0002fbdc bne 0x2fb7e |
| } while (r3 != r6);
| do {
| label_0:
0x0002fbde movs r0, 0 | r0 = 0;
| label_2:
0x0002fbe0 ldr r2, [pc, 0x218] |
0x0002fbe2 ldr r3, [pc, 0x214] | r3 = *(0x2fdfa);
0x0002fbe4 add r2, pc | r2 = 0x5f9e4;
0x0002fbe6 ldr r3, [r2, r3] | r3 = imp.__environ;
0x0002fbe8 ldr r2, [r3] | r2 = imp.__environ;
0x0002fbea ldr r3, [sp, 4] | r3 = var_4h;
0x0002fbec eors r2, r3 | r2 ^= r3;
0x0002fbee mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002fbf2 bne.w 0x2fdee | goto label_12;
| }
0x0002fbf6 add sp, 0xc |
0x0002fbf8 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_11:
0x0002fbfc cmp r3, 0x22 |
| if (r3 == 0x22) {
0x0002fbfe beq 0x2fc04 | goto label_3;
| }
0x0002fc00 cmp r3, 0x2f |
0x0002fc02 bne 0x2fbde |
| } while (r3 != 0x2f);
| label_3:
0x0002fc04 adds r4, 2 | r4 += 2;
0x0002fc06 strb.w r3, [sp] | *(sp) = r3;
| label_5:
0x0002fc0a subs r3, r5, r7 | r3 = r5 - r7;
0x0002fc0c adds r3, 1 | r3++;
0x0002fc0e cmp r6, r3 |
| if (r6 < r3) {
0x0002fc10 bls 0x2fbde | goto label_0;
| }
0x0002fc12 ldrb.w r3, [sp] | r3 = *(sp);
0x0002fc16 strb r3, [r5], 1 | *(r5) = r3;
| r5++;
0x0002fc1a b 0x2fbd8 | goto label_1;
| label_9:
0x0002fc1c movs r3, 0 | r3 = 0;
0x0002fc1e adds r0, r4, 1 | r0 = r4 + 1;
0x0002fc20 strb r3, [r5] | *(r5) = r3;
0x0002fc22 b 0x2fbe0 | goto label_2;
0x0002fc24 movs r3, 9 | r3 = 9;
0x0002fc26 b 0x2fc04 | goto label_3;
0x0002fc28 movs r3, 0xc | r3 = 0xc;
0x0002fc2a b 0x2fc04 | goto label_3;
0x0002fc2c movs r3, 0xa | r3 = 0xa;
0x0002fc2e b 0x2fc04 | goto label_3;
0x0002fc30 movs r3, 0xd | r3 = 0xd;
0x0002fc32 b 0x2fc04 | goto label_3;
| label_10:
0x0002fc34 cmp r3, 0x75 |
| if (r3 != 0x75) {
0x0002fc36 bne 0x2fbde | goto label_0;
| }
0x0002fc38 blx 0xc0d4 | feof (r0);
0x0002fc3c adds r3, r4, 1 | r3 = r4 + 1;
0x0002fc3e ldr r2, [r0] | r2 = *(r0);
0x0002fc40 adds r0, r4, 5 | r0 = r4 + 5;
| label_4:
0x0002fc42 ldrb r1, [r3, 1]! | r1 = *((r3 += 1));
0x0002fc46 ldrh.w r1, [r2, r1, lsl 1] | offset_0 = r1 << 1;
| r1 = *((r2 + offset_0));
0x0002fc4a lsls r1, r1, 0x13 | r1 <<= 0x13;
| if (r1 >= r1) {
0x0002fc4c bpl 0x2fbde | goto label_0;
| }
0x0002fc4e cmp r3, r0 |
| if (r3 != r0) {
0x0002fc50 bne 0x2fc42 | goto label_4;
| }
0x0002fc52 ldrb r3, [r4, 2] | r3 = *((r4 + 2));
0x0002fc54 cmp r3, 0x60 |
0x0002fc56 it hi |
| if (r3 <= 0x60) {
0x0002fc58 subhi r3, 0x57 | r3 -= 0x57;
| }
| if (r3 <= 0x60) {
0x0002fc5a bhi 0x2fc64 |
0x0002fc5c cmp r3, 0x40 |
0x0002fc5e ite hi |
| if (r3 <= 0x40) {
0x0002fc60 subhi r3, 0x37 | r3 -= 0x37;
| }
| if (r3 <= 0x40) {
0x0002fc62 subls r3, 0x30 | r3 -= 0x30;
| goto label_13;
| }
| }
| label_13:
0x0002fc64 ldrb r1, [r4, 3] | r1 = *((r4 + 3));
0x0002fc66 lsls r3, r3, 0xc | r3 <<= 0xc;
0x0002fc68 cmp r1, 0x60 |
0x0002fc6a it hi |
| if (r1 <= 0x60) {
0x0002fc6c subhi r1, 0x57 | r1 -= 0x57;
| }
| if (r1 <= 0x60) {
0x0002fc6e bhi 0x2fc78 |
0x0002fc70 cmp r1, 0x40 |
0x0002fc72 ite hi |
| if (r1 <= 0x40) {
0x0002fc74 subhi r1, 0x37 | r1 -= 0x37;
| }
| if (r1 <= 0x40) {
0x0002fc76 subls r1, 0x30 | r1 -= 0x30;
| goto label_14;
| }
| }
| label_14:
0x0002fc78 add.w r3, r3, r1, lsl 8 | r3 += (r1 << 8);
0x0002fc7c ldrb r1, [r4, 4] | r1 = *((r4 + 4));
0x0002fc7e cmp r1, 0x60 |
0x0002fc80 it hi |
| if (r1 <= 0x60) {
0x0002fc82 subhi r1, 0x57 | r1 -= 0x57;
| }
| if (r1 <= 0x60) {
0x0002fc84 bhi 0x2fc8e |
0x0002fc86 cmp r1, 0x40 |
0x0002fc88 ite hi |
| if (r1 <= 0x40) {
0x0002fc8a subhi r1, 0x37 | r1 -= 0x37;
| }
| if (r1 <= 0x40) {
0x0002fc8c subls r1, 0x30 | r1 -= 0x30;
| goto label_15;
| }
| }
| label_15:
0x0002fc8e add.w r3, r3, r1, lsl 4 | r3 += (r1 << 4);
0x0002fc92 ldrb r1, [r4, 5] | r1 = *((r4 + 5));
0x0002fc94 cmp r1, 0x60 |
0x0002fc96 it hi |
| if (r1 <= 0x60) {
0x0002fc98 subhi r1, 0x57 | r1 -= 0x57;
| }
| if (r1 <= 0x60) {
0x0002fc9a bhi 0x2fca4 |
0x0002fc9c cmp r1, 0x40 |
0x0002fc9e ite hi |
| if (r1 <= 0x40) {
0x0002fca0 subhi r1, 0x37 | r1 -= 0x37;
| }
| if (r1 <= 0x40) {
0x0002fca2 subls r1, 0x30 | r1 -= 0x30;
| goto label_16;
| }
| }
| label_16:
0x0002fca4 add r3, r1 | r3 += r1;
0x0002fca6 adds r1, r4, 6 | r1 = r4 + 6;
0x0002fca8 cmp r3, 0x7f |
0x0002fcaa itt ls |
| if (r3 > 0x7f) {
0x0002fcac movls r4, r1 | r4 = r1;
| }
| if (r3 <= 0x7f) {
0x0002fcae strbls r3, [sp] | *(sp) = r3;
| goto label_17;
| }
| if (r3 < 0x7f) {
| label_17:
0x0002fcb2 bls 0x2fc0a | goto label_5;
| }
0x0002fcb4 cmp.w r3, 0x800 |
| if (r3 <= 0x800) {
0x0002fcb8 blo 0x2fda8 | goto label_18;
| }
0x0002fcba sub.w r0, r3, 0xd800 | r0 = r3 - case.0x3207a.11;
0x0002fcbe cmp.w r0, 0x800 |
| if (r0 >= 0x800) {
0x0002fcc2 bhs 0x2fdc4 | goto label_19;
| }
0x0002fcc4 cmp.w r0, 0x400 |
| if (r0 >= 0x400) {
0x0002fcc8 bhs 0x2fbde | goto label_0;
| }
0x0002fcca ldrb r1, [r4, 6] | r1 = *((r4 + 6));
0x0002fccc cmp r1, 0x5c |
| if (r1 != 0x5c) {
0x0002fcce bne 0x2fbde | goto label_0;
| }
0x0002fcd0 ldrb r1, [r4, 7] | r1 = *((r4 + 7));
0x0002fcd2 cmp r1, 0x75 |
| if (r1 != 0x75) {
0x0002fcd4 bne 0x2fbde | goto label_0;
| }
0x0002fcd6 adds r1, r4, 7 | r1 = r4 + 7;
0x0002fcd8 add.w ip, r4, 0xb |
| label_6:
0x0002fcdc ldrb r0, [r1, 1]! | r0 = *((r1 += 1));
0x0002fce0 ldrh.w r0, [r2, r0, lsl 1] | offset_1 = r0 << 1;
| r0 = *((r2 + offset_1));
0x0002fce4 lsls r0, r0, 0x13 | r0 <<= 0x13;
| if (r0 >= r0) {
0x0002fce6 bpl.w 0x2fbde | goto label_0;
| }
0x0002fcea cmp ip, r1 |
| if (ip != r1) {
0x0002fcec bne 0x2fcdc | goto label_6;
| }
0x0002fcee ldrb r2, [r4, 8] | r2 = *((r4 + 8));
0x0002fcf0 cmp r2, 0x60 |
0x0002fcf2 it hi |
| if (r2 <= 0x60) {
0x0002fcf4 subhi r2, 0x57 | r2 -= 0x57;
| }
| if (r2 <= 0x60) {
0x0002fcf6 bhi 0x2fd00 |
0x0002fcf8 cmp r2, 0x40 |
0x0002fcfa ite hi |
| if (r2 <= 0x40) {
0x0002fcfc subhi r2, 0x37 | r2 -= 0x37;
| }
| if (r2 <= 0x40) {
0x0002fcfe subls r2, 0x30 | r2 -= 0x30;
| goto label_20;
| }
| }
| label_20:
0x0002fd00 ldrb r1, [r4, 9] | r1 = *((r4 + 9));
0x0002fd02 lsls r2, r2, 0xc | r2 <<= 0xc;
0x0002fd04 cmp r1, 0x60 |
0x0002fd06 it hi |
| if (r1 <= 0x60) {
0x0002fd08 subhi r1, 0x57 | r1 -= 0x57;
| }
| if (r1 <= 0x60) {
0x0002fd0a bhi 0x2fd14 |
0x0002fd0c cmp r1, 0x40 |
0x0002fd0e ite hi |
| if (r1 <= 0x40) {
| label_8:
0x0002fd10 subhi r1, 0x37 | r1 -= 0x37;
| }
| if (r1 <= 0x40) {
0x0002fd12 subls r1, 0x30 | r1 -= 0x30;
| goto label_21;
| }
| }
| label_21:
0x0002fd14 add.w r2, r2, r1, lsl 8 | r2 += (r1 << 8);
0x0002fd18 ldrb r1, [r4, 0xa] | r1 = *((r4 + 0xa));
0x0002fd1a cmp r1, 0x60 |
0x0002fd1c it hi |
| if (r1 <= 0x60) {
0x0002fd1e subhi r1, 0x57 | r1 -= 0x57;
| }
| if (r1 <= 0x60) {
0x0002fd20 bhi 0x2fd2a |
0x0002fd22 cmp r1, 0x40 |
0x0002fd24 ite hi |
| if (r1 <= 0x40) {
0x0002fd26 subhi r1, 0x37 | r1 -= 0x37;
| }
| if (r1 <= 0x40) {
0x0002fd28 subls r1, 0x30 | r1 -= 0x30;
| goto label_22;
| }
| }
| label_22:
0x0002fd2a add.w r2, r2, r1, lsl 4 | r2 += (r1 << 4);
0x0002fd2e ldrb r1, [r4, 0xb] | r1 = *((r4 + 0xb));
0x0002fd30 cmp r1, 0x60 |
0x0002fd32 it hi |
| if (r1 <= 0x60) {
0x0002fd34 subhi r1, 0x57 | r1 -= 0x57;
| }
| if (r1 <= 0x60) {
0x0002fd36 bhi 0x2fd40 |
0x0002fd38 cmp r1, 0x40 |
0x0002fd3a ite hi |
| if (r1 <= 0x40) {
0x0002fd3c subhi r1, 0x37 | r1 -= 0x37;
| }
| if (r1 <= 0x40) {
0x0002fd3e subls r1, 0x30 | r1 -= 0x30;
| goto label_23;
| }
| }
| label_23:
0x0002fd40 add r1, r2 | r1 += r2;
0x0002fd42 sub.w r2, r1, 0xdc00 | r2 = r1 - case.0x3207a.11;
0x0002fd46 cmp.w r2, 0x400 |
| if (r2 >= 0x400) {
0x0002fd4a bhs.w 0x2fbde | goto label_0;
| }
0x0002fd4e and.w r3, r8, r3, lsl 10 | r3 = r8 & (r3 << 10);
0x0002fd52 ubfx r1, r1, 0, 0xa | r1 = (r1 >> 0) & ((1 << 0xa) - 1);
0x0002fd56 adds r4, 0xc | r4 += 0xc;
0x0002fd58 orrs r3, r1 | r3 |= r1;
0x0002fd5a movs r2, 4 | r2 = 4;
0x0002fd5c add.w r3, r3, 0x10000 | r3 += case.0x3207a.11;
0x0002fd60 lsrs r1, r3, 0x12 | r1 = r3 >> 0x12;
0x0002fd62 orn r1, r1, 0xf | r1 |= 0xf;
| r1 = ~r1;
0x0002fd66 strb.w r1, [sp] | *(sp) = r1;
0x0002fd6a ubfx r1, r3, 0xc, 6 | r1 = (r3 >> 0xc) & ((1 << 6) - 1);
0x0002fd6e orn r1, r1, 0x7f | r1 |= 0x7f;
| r1 = ~r1;
0x0002fd72 strb.w r1, [sp, 1] | var_1h = r1;
0x0002fd76 ubfx r1, r3, 6, 6 | r1 = (r3 >> 6) & ((1 << 6) - 1);
0x0002fd7a and r3, r3, 0x3f | r3 &= 0x3f;
0x0002fd7e orn r1, r1, 0x7f | r1 |= 0x7f;
| r1 = ~r1;
0x0002fd82 orn r3, r3, 0x7f | r3 |= 0x7f;
| r3 = ~r3;
0x0002fd86 strb.w r1, [sp, 2] | var_2h = r1;
0x0002fd8a strb.w r3, [sp, 3] | var_3h = r3;
0x0002fd8c adds r0, 3 | r0 += 3;
| label_7:
0x0002fd8e subs r3, r5, r7 | r3 = r5 - r7;
0x0002fd90 add r3, r2 | r3 += r2;
0x0002fd92 cmp r3, r6 |
| if (r3 >= r6) {
0x0002fd94 bhs.w 0x2fbde | goto label_0;
| }
0x0002fd98 mov r0, r5 | r0 = r5;
0x0002fd9a mov r1, sb | r1 = sb;
0x0002fd9c add r5, r2 | r5 += r2;
0x0002fd9e blx 0xbd78 | fcn_0000bd78 ();
0x0002fda2 b 0x2fbd8 | goto label_1;
0x0002fda4 movs r3, 8 | r3 = 8;
0x0002fda6 b 0x2fc04 | goto label_3;
| label_18:
0x0002fda8 lsrs r2, r3, 6 | r2 = r3 >> 6;
0x0002fdaa and r3, r3, 0x3f | r3 &= 0x3f;
0x0002fdae orn r3, r3, 0x7f | r3 |= 0x7f;
| r3 = ~r3;
0x0002fdb2 orn r2, r2, 0x3f | r2 |= 0x3f;
| r2 = ~r2;
0x0002fdb6 mov r4, r1 | r4 = r1;
0x0002fdb8 strb.w r2, [sp] | *(sp) = r2;
0x0002fdbc movs r2, 2 | r2 = 2;
0x0002fdbe strb.w r3, [sp, 1] | var_1h = r3;
0x0002fdc2 b 0x2fd8e | goto label_7;
| label_19:
0x0002fdc4 ubfx r2, r3, 0xc, 4 | r2 = (r3 >> 0xc) & ((1 << 4) - 1);
0x0002fdc8 mov r4, r1 | r4 = r1;
0x0002fdca orn r2, r2, 0x1f | r2 |= 0x1f;
| r2 = ~r2;
0x0002fdce strb.w r2, [sp] | *(sp) = r2;
0x0002fdd2 ubfx r2, r3, 6, 6 | r2 = (r3 >> 6) & ((1 << 6) - 1);
0x0002fdd6 and r3, r3, 0x3f | r3 &= 0x3f;
0x0002fdda orn r2, r2, 0x7f | r2 |= 0x7f;
| r2 = ~r2;
0x0002fdde orn r3, r3, 0x7f | r3 |= 0x7f;
| r3 = ~r3;
0x0002fde2 strb.w r2, [sp, 1] | var_1h = r2;
0x0002fde6 strb.w r3, [sp, 2] | var_2h = r3;
0x0002fdea movs r2, 3 | r2 = 3;
0x0002fdec b 0x2fd8e | goto label_7;
| label_12:
0x0002fdee blx 0xbe48 | fcn_0000be48 ();
0x0002fdf2 nop |
| if (r2 == 3) {
0x0002fdf4 beq 0x2fd10 | goto label_8;
| }
0x0002fdf6 movs r2, r0 | r2 = r0;
0x0002fdf8 lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x0002fdfa movs r0, r0 |
| if (r0 != r0) {
0x0002fdfc beq 0x2fe10 |
0x0002fdfe movs r2, r0 | r2 = r0;
| }
0x0002fe10 push {lr} |
0x0002fe12 sub sp, 0xc |
0x0002fe14 add r3, sp, 0x10 | r3 += var_0h;
0x0002fe16 ldr.w lr, [pc, 0x48] |
0x0002fe1a ldr.w ip, [pc, 0x48] | ip = *(0x2fe66);
0x0002fe1e ldr r0, [pc, 0x48] |
0x0002fe20 add lr, pc | lr = 0x5fc86;
0x0002fe22 ldr r2, [r3], 4 | r2 = *(r3);
| r3 += 4;
0x0002fe26 ldr.w ip, [lr, ip] |
0x0002fe2a add r0, pc | r0 = 0x5fc98;
0x0002fe2c ldr.w ip, [ip] | ip = imp.__environ;
0x0002fe30 str.w ip, [sp, 4] | __asm ("str.w ip, [var_4h_2]");
0x0002fe34 mov.w ip, 0 |
0x0002fe38 str r3, [sp] | *(sp) = r3;
0x0002fe3a bl 0x39020 | zbx_vsnprintf ()
0x0002fe3e ldr r2, [pc, 0x2c] |
0x0002fe40 ldr r3, [pc, 0x20] | r3 = *(0x2fe64);
0x0002fe42 add r2, pc | r2 = 0x5fcb4;
0x0002fe44 ldr r3, [r2, r3] | r3 = imp.__environ;
0x0002fe46 ldr r2, [r3] | r2 = imp.__environ;
0x0002fe48 ldr r3, [sp, 4] | r3 = var_4h_2;
0x0002fe4a eors r2, r3 | r2 ^= r3;
0x0002fe4c mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x0002fe50 bne 0x2fe5c |
0x0002fe52 add sp, 0xc |
0x0002fe54 ldr lr, [sp], 4 |
0x0002fe58 add sp, 0x10 |
0x0002fe5a bx lr | return;
| }
0x0002fe5c blx 0xbe48 | fcn_0000be48 ();
0x0002fe60 ldm r5!, {r2, r3, r6, r7} | r2 = *(r5!);
| r3 = *((r5! + 4));
| r6 = *((r5! + 8));
| r7 = *((r5! + 12));
0x0002fe62 movs r2, r0 | r2 = r0;
0x0002fe64 lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x0002fe66 movs r0, r0 |
0x0002fe68 usat16 r0, 2, r2 | __asm ("usat16 r0, 2, r2");
0x0002fe6c ldm r5, {r1, r3, r5, r7} | r1 = *(r5);
| r3 = *((r5 + 4));
| r5 = *((r5 + 8));
| r7 = *((r5 + 12));
0x0002fe6e movs r2, r0 | r2 = r0;
| do {
0x0003635e ldr r2, [pc, 0x64] |
0x00036360 ldr r3, [pc, 0x54] | r3 = *(0x363b8);
0x00036362 add r2, pc | r2 = 0x6c72c;
0x00036364 ldr r3, [r2, r3] | r3 = *(0x6c72c);
0x00036366 ldr r2, [r3] | r2 = *(0x6c72c);
0x00036368 ldr r3, [sp, 0x84] | r3 = var_84h;
0x0003636a eors r2, r3 | r2 ^= r3;
0x0003636c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00036370 bne 0x363b0 | goto label_24;
| }
0x00036372 mov r0, r5 | r0 = r5;
0x00036374 add sp, 0x8c |
0x00036376 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000363a2 adds r2, 0xb0 | r2 += 0xb0;
0x000363a4 bl 0x271b0 | zbx_zabbix_log ();
0x000363a8 b 0x3635e |
| } while (1);
| label_24:
0x000363b0 blx 0xbe48 | fcn_0000be48 ();
0x000363b4 ldr r4, [r0, 0x14] | r4 = *((r0 + 0x14));
0x000363b6 movs r2, r0 | r2 = r0;
0x000363b8 lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x000363ba movs r0, r0 |
0x000363bc ldr r4, [r7, 0x10] | r4 = *((r7 + 0x10));
0x000363be movs r2, r0 | r2 = r0;
0x000363c0 lsls r0, r6, 0xe | r0 = r6 << 0xe;
0x000363c2 movs r0, r0 |
0x000363c4 ldr r2, [r1, 8] | r2 = *((r1 + 8));
0x000363c6 movs r2, r0 | r2 = r0;
0x000363c8 ldr r3, [pc, 0x260] | r3 = *(0x3662c);
0x000363ca movs r1, r0 | r1 = r0;
0x000363cc ldr r1, [pc, 0x140] | r1 = *(0x36510);
0x000363ce movs r1, r0 | r1 = r0;
0x000363d0 ldr r3, [pc, 0x1f8] | r3 = *(0x365cc);
0x000363d2 movs r1, r0 | r1 = r0;
0x000363d4 ldm r0!, {r3, r7} | r3 = *(r0!);
| r7 = *((r0! + 4));
0x000363d6 movs r0, 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 @ 0x271b0 */
| #include <stdint.h>
|
; (fcn) sym.__zbx_zabbix_log () | void zbx_zabbix_log (int16_t arg_10000h, int16_t arg1) {
| int16_t var_0h;
| int16_t var_4h_2;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_54h;
| r0 = arg1;
0x000271b0 bmi 0xfefd41f0 |
0x000271b4 ldr r3, [pc, 0x2f8] |
0x000271b6 push.w {r4, r5, r6, r7, r8, lr} |
0x000271ba add r2, pc | r2 += pc;
0x000271bc sub.w sp, sp, 0x10000 |
0x000271c0 ldr r6, [pc, 0x2f0] |
0x000271c2 sub sp, 0x5c |
0x000271c4 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x000271c6 add.w r1, sp, 0x10000 | r1 += arg_10000h;
0x000271ca add r6, pc | r6 = 0x4e682;
0x000271cc ldr r5, [pc, 0x2e8] |
0x000271ce adds r1, 0x54 | r1 += 0x54;
0x000271d0 ldr r3, [r3] | r3 = *(0x274b0);
0x000271d2 str r3, [r1] | *(r1) = r3;
0x000271d4 mov.w r3, 0 | r3 = 0;
0x000271d8 add.w r3, sp, 0x10000 | r3 += arg_10000h;
0x000271dc adds r3, 0x74 | r3 += 0x74;
0x000271de ldr r7, [r3] | r7 = *(r3);
0x000271e0 ldr.w r3, [r6, 0xc80] | r3 = case.0x3207a.11;
0x000271e4 add r5, pc | r5 = 0x4e6a0;
0x000271e6 cmp r3, 2 |
| if (r3 == 2) {
0x000271e8 beq.w 0x27398 | goto label_4;
| }
0x000271ec cmp r3, 3 |
| if (r3 != 3) {
0x000271ee beq 0x2723e |
0x000271f0 add.w r3, sp, 0x10000 | r3 += arg_10000h;
0x000271f4 add r5, sp, 0x54 | r5 += var_54h;
0x000271f6 adds r3, 0x78 | r3 += 0x78;
0x000271f8 mov.w r1, 0x10000 | r1 = case.0x3207a.11;
0x000271fc mov r4, r0 | r4 = r0;
0x000271fe mov r2, r7 | r2 = r7;
0x00027200 mov r0, r5 | r0 = r5;
0x00027202 str r3, [sp, 0x20] | var_20h = r3;
0x00027204 bl 0x39020 | zbx_vsnprintf ()
0x00027208 ldr.w r1, [r6, 0xc80] | r1 = case.0x3207a.11;
0x0002720c cmp r1, 1 |
| if (r1 == 1) {
0x0002720e bne 0x27228 |
0x00027210 cmp r4, 5 |
| if (r4 > 5) {
0x00027212 bgt 0x272f2 | goto label_5;
| }
0x00027214 cmp r4, 0 |
| if (r4 <= 0) {
0x00027216 ble 0x272c8 | goto label_0;
| }
0x00027218 subs r4, 2 | r4 -= 2;
0x0002721a cmp r4, 3 |
| if (r4 > 3) {
0x0002721c bhi.w 0x27490 | goto label_6;
| }
| /* switch table (4 cases) at 0x27224 */
0x00027220 tbb [pc, r4] | __asm ("tbb case.0x3207a.11");
| }
0x00027228 subs r4, 1 | r4--;
0x0002722a bl 0x26974 | fcn_00026974 ();
0x0002722e cmp r4, 4 |
| if (r4 > 4) {
0x00027230 bhi.w 0x274a0 | goto label_7;
| }
| /* switch table (5 cases) at 0x27238 */
0x00027234 tbb [pc, r4] | __asm ("tbb case.0x3207a.11");
| }
0x0002723e bl 0x26974 | fcn_00026974 ();
0x00027242 movs r2, 0 | r2 = 0;
0x00027244 add r1, sp, 0x24 | r1 += var_24h;
0x00027246 add r0, sp, 0x28 | r0 += var_28h;
0x00027248 bl 0x34ffc | zbx_get_time ();
0x0002724c ldr r3, [pc, 0x26c] | r3 = *(0x274bc);
0x0002724e ldr r5, [r5, r3] | r5 = *((r5 + r3));
0x00027250 ldr.w r8, [r5] | r8 = *(r5);
0x00027254 bl 0x2a69c | zbx_get_thread_id ();
0x00027258 ldr r2, [sp, 0x38] | r2 = var_38h;
0x0002725a mov r3, r0 | r3 = r0;
0x0002725c movs r1, 1 | r1 = 1;
0x0002725e mov r0, r8 | r0 = r8;
0x00027260 adds r2, 1 | r2++;
0x00027262 str r2, [sp, 4] | var_4h_2 = r2;
0x00027264 ldr r2, [sp, 0x3c] | r2 = var_3ch;
0x00027266 addw r2, r2, 0x76c | __asm ("addw r2, r2, case.0x3207a.11");
0x0002726a str r2, [sp] | *(sp) = r2;
0x0002726c ldr r2, [sp, 0x24] | r2 = var_24h;
0x0002726e str r2, [sp, 0x18] | var_18h = r2;
0x00027270 ldr r2, [sp, 0x28] | r2 = var_28h;
0x00027272 str r2, [sp, 0x14] | var_14h = r2;
0x00027274 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x00027276 str r2, [sp, 0x10] | var_10h = r2;
0x00027278 ldr r2, [sp, 0x30] | r2 = var_30h;
0x0002727a str r2, [sp, 0xc] | var_ch = r2;
0x0002727c ldr r2, [sp, 0x34] | r2 = var_34h;
0x0002727e str r2, [sp, 8] | var_8h = r2;
0x00027280 ldr r2, [pc, 0x23c] |
0x00027282 add r2, pc | r2 = 0x4e746;
0x00027284 blx 0xc20c | setegid ();
0x00027288 add.w r3, sp, 0x10000 | r3 += arg_10000h;
0x0002728c mov r2, r7 | r2 = r7;
0x0002728e adds r3, 0x78 | r3 += 0x78;
0x00027290 movs r1, 1 | r1 = 1;
0x00027292 ldr r0, [r5] | r0 = *(r5);
0x00027294 str r3, [sp, 0x20] | var_20h = r3;
0x00027296 blx 0xc060 | fcn_0000c060 ();
0x0002729a ldr r1, [r5] | r1 = *(r5);
0x0002729c movs r0, 0xa | r0 = 0xa;
0x0002729e blx 0xc33c | fcn_0000c33c ();
0x000272a2 ldr r0, [r5] | r0 = *(r5);
0x000272a4 blx 0xbcd0 | fcn_0000bcd0 ();
0x000272a8 ldr r3, [pc, 0x218] |
0x000272aa movs r1, 0xf6 | r1 = 0xf6;
0x000272ac ldr r0, [pc, 0x218] |
0x000272ae add r3, pc | r3 = 0x4e776;
0x000272b0 ldr r2, [r3] | r2 = *(0x4e776);
0x000272b2 add r0, pc | r0 = 0x4e77e;
0x000272b4 bl 0x2a2f0 | zbx_mutex_unlock ();
0x000272b8 movs r2, 0 | r2 = 0;
0x000272ba mov r1, r6 | r1 = r6;
0x000272bc movs r0, 2 | r0 = 2;
0x000272be blx 0xbce8 | r0 = fcn_0000bce8 ();
0x000272c2 cmp r0, 0 |
| if (r0 < 0) {
0x000272c4 blt.w 0x27446 | goto label_8;
| }
| do {
| label_0:
0x000272c8 ldr r2, [pc, 0x200] |
0x000272ca add.w r1, sp, 0x10000 | r1 += arg_10000h;
0x000272ce ldr r3, [pc, 0x1e0] | r3 = *(0x274b2);
0x000272d0 adds r1, 0x54 | r1 += 0x54;
0x000272d2 add r2, pc | r2 = 0x4e7a2;
0x000272d4 ldr r3, [r2, r3] | r3 = *(0x4e7a2);
0x000272d6 ldr r2, [r3] | r2 = *(0x4e7a2);
0x000272d8 ldr r3, [r1] | r3 = *(r1);
0x000272da eors r2, r3 | r2 ^= r3;
0x000272dc mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000272e0 bne.w 0x27456 | goto label_9;
| }
0x000272e4 add.w sp, sp, 0x10000 |
0x000272e8 add sp, 0x5c |
0x000272ea pop.w {r4, r5, r6, r7, r8, lr} |
0x000272ee add sp, 0xc |
0x000272f0 bx lr | return;
| label_5:
0x000272f2 cmp r4, 0x7f |
0x000272f4 bne 0x272c8 |
| } while (r4 != 0x7f);
0x000272f6 ldr r2, [pc, 0x1d8] |
0x000272f8 mov r3, r5 | r3 = r5;
0x000272fa movs r0, 6 | r0 = 6;
0x000272fc add r2, pc | r2 = 0x4e7d2;
0x000272fe blx 0xc2b4 | fork ();
0x00027302 b 0x272c8 | goto label_0;
0x00027304 ldr r2, [pc, 0x1cc] |
0x00027306 mov r3, r5 | r3 = r5;
0x00027308 movs r1, 1 | r1 = 1;
0x0002730a movs r0, 7 | r0 = 7;
0x0002730c add r2, pc | r2 = 0x4e7e4;
0x0002730e blx 0xc2b4 | fork ();
0x00027312 b 0x272c8 | goto label_0;
0x00027314 ldr r2, [pc, 0x1c0] |
0x00027316 mov r3, r5 | r3 = r5;
0x00027318 movs r1, 1 | r1 = 1;
0x0002731a movs r0, 4 | r0 = 4;
0x0002731c add r2, pc | r2 = 0x4e7f8;
0x0002731e blx 0xc2b4 | fork ();
0x00027322 b 0x272c8 | goto label_0;
0x00027324 ldr r2, [pc, 0x1b4] |
0x00027326 mov r3, r5 | r3 = r5;
0x00027328 movs r1, 1 | r1 = 1;
0x0002732a movs r0, 3 | r0 = 3;
0x0002732c add r2, pc | r2 = 0x4e80c;
0x0002732e blx 0xc2b4 | fork ();
0x00027332 b 0x272c8 | goto label_0;
0x00027334 ldr r0, [pc, 0x1a8] |
0x00027336 mov r1, r5 | r1 = r5;
0x00027338 add r0, pc | r0 = 0x4e81c;
0x0002733a bl 0x38c64 | zbx_error ();
| label_1:
0x0002733e ldr r3, [pc, 0x1a4] |
0x00027340 movs r1, 0xf6 | r1 = 0xf6;
0x00027342 ldr r0, [pc, 0x1a4] |
0x00027344 add r3, pc | r3 = 0x4e82e;
0x00027346 ldr r2, [r3] | r2 = *(0x4e82e);
0x00027348 add r0, pc | r0 = 0x4e836;
0x0002734a bl 0x2a2f0 | zbx_mutex_unlock ();
0x0002734e ldr r1, [pc, 0x19c] |
0x00027350 movs r2, 0 | r2 = 0;
0x00027352 movs r0, 2 | r0 = 2;
0x00027354 add r1, pc | r1 = 0x4e846;
0x00027356 blx 0xbce8 | r0 = fcn_0000bce8 ();
0x0002735a cmp r0, 0 |
| if (r0 >= 0) {
0x0002735c bge 0x272c8 | goto label_0;
| }
0x0002735e ldr r0, [pc, 0x190] |
0x00027360 add r0, pc | r0 = 0x4e856;
0x00027362 bl 0x38c64 | zbx_error ();
0x00027366 b 0x272c8 | goto label_0;
0x00027368 ldr r0, [pc, 0x188] |
0x0002736a mov r1, r5 | r1 = r5;
0x0002736c add r0, pc | r0 = 0x4e864;
0x0002736e bl 0x38c64 | zbx_error ();
0x00027372 b 0x2733e | goto label_1;
0x00027374 ldr r0, [pc, 0x180] |
0x00027376 mov r1, r5 | r1 = r5;
0x00027378 add r0, pc | r0 = 0x4e874;
0x0002737a bl 0x38c64 | zbx_error ();
0x0002737e b 0x2733e | goto label_1;
0x00027380 ldr r0, [pc, 0x178] |
0x00027382 mov r1, r5 | r1 = r5;
0x00027384 add r0, pc | r0 = 0x4e884;
0x00027386 bl 0x38c64 | zbx_error ();
0x0002738a b 0x2733e | goto label_1;
0x0002738c ldr r0, [pc, 0x170] |
0x0002738e mov r1, r5 | r1 = r5;
0x00027390 add r0, pc | r0 = 0x4e894;
0x00027392 bl 0x38c64 | zbx_error ();
0x00027396 b 0x2733e | goto label_1;
| label_4:
0x00027398 bl 0x26974 | fcn_00026974 ();
0x0002739c ldr r3, [pc, 0x164] |
0x0002739e ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000273a0 ldr r3, [r3] | r3 = *(0x27504);
0x000273a2 cmp r3, 0 |
| if (r3 != 0) {
0x000273a4 bne 0x27450 | goto label_10;
| }
| label_2:
0x000273a6 ldr r0, [pc, 0x160] |
0x000273a8 ldr r1, [pc, 0x160] |
0x000273aa add r0, pc | r0 = 0x4e8b8;
0x000273ac add r1, pc | r1 = 0x4e8bc;
0x000273ae add.w r0, r0, 0x480 | r0 += case.0x3207a.11;
0x000273b2 blx 0xc39c | r0 = fcn_0000c39c ();
0x000273b6 mov r5, r0 | r5 = r0;
0x000273b8 cmp r0, 0 |
| if (r0 == 0) {
0x000273ba beq 0x2745a | goto label_11;
| }
0x000273bc movs r2, 0 | r2 = 0;
0x000273be add r1, sp, 0x24 | r1 += var_24h;
0x000273c0 add r0, sp, 0x28 | r0 += var_28h;
0x000273c2 bl 0x34ffc | zbx_get_time ();
0x000273c4 cdp2 p0, 1, c15, c11, c3, 0 | __asm ("cdp2 p0, 1, c15, c11, c3, 0");
0x000273c8 vld1.8 {d25, d26}, [sb], sb | __asm ("vld1.8 {d25, d26}, [sb], sb");
0x000273cc mov r3, r0 | r3 = r0;
0x000273ce movs r1, 1 | r1 = 1;
0x000273d0 mov r0, r5 | r0 = r5;
0x000273d2 str r2, [sp, 0x18] | var_18h = r2;
0x000273d4 ldr r2, [sp, 0x28] | r2 = var_28h;
0x000273d6 str r2, [sp, 0x14] | var_14h = r2;
0x000273d8 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x000273da str r2, [sp, 0x10] | var_10h = r2;
0x000273dc ldr r2, [sp, 0x30] | r2 = var_30h;
0x000273de str r2, [sp, 0xc] | var_ch = r2;
0x000273e0 ldr r2, [sp, 0x34] | r2 = var_34h;
0x000273e2 str r2, [sp, 8] | var_8h = r2;
0x000273e4 ldr r2, [sp, 0x38] | r2 = var_38h;
0x000273e6 adds r2, 1 | r2++;
0x000273e8 str r2, [sp, 4] | var_4h_2 = r2;
0x000273ea ldr r2, [sp, 0x3c] | r2 = var_3ch;
0x000273ec addw r2, r2, 0x76c | __asm ("addw r2, r2, case.0x3207a.11");
0x000273f0 str r2, [sp] | *(sp) = r2;
0x000273f2 ldr r2, [pc, 0x11c] |
0x000273f4 add r2, pc | r2 = 0x4e90a;
0x000273f6 blx 0xc20c | setegid ();
0x000273fa add.w r3, sp, 0x10000 | r3 += arg_10000h;
0x000273fe mov r2, r7 | r2 = r7;
0x00027400 adds r3, 0x78 | r3 += 0x78;
0x00027402 movs r1, 1 | r1 = 1;
0x00027404 mov r0, r5 | r0 = r5;
0x00027406 str r3, [sp, 0x20] | var_20h = r3;
0x00027408 blx 0xc060 | fcn_0000c060 ();
0x0002740c mov r1, r5 | r1 = r5;
0x0002740e movs r0, 0xa | r0 = 0xa;
0x00027410 blx 0xc33c | fcn_0000c33c ();
0x00027414 mov r0, r5 | r0 = r5;
0x00027416 blx 0xc248 | munmap (r0, r1);
| label_3:
0x0002741a ldr r3, [pc, 0xf8] |
0x0002741c movs r1, 0xf6 | r1 = 0xf6;
0x0002741e ldr r0, [pc, 0xf8] |
0x00027420 add r3, pc | r3 = 0x4e93a;
0x00027422 ldr r2, [r3] | r2 = *(0x4e93a);
0x00027424 add r0, pc | r0 = 0x4e942;
0x00027426 bl 0x2a2f0 | zbx_mutex_unlock ();
0x0002742a ldr r1, [pc, 0xf0] |
0x0002742c movs r2, 0 | r2 = 0;
0x0002742e movs r0, 2 | r0 = 2;
0x00027430 add r1, pc | r1 = 0x4e952;
0x00027432 blx 0xbce8 | r0 = fcn_0000bce8 ();
0x00027436 cmp r0, 0 |
| if (r0 >= 0) {
0x00027438 bge.w 0x272c8 | goto label_0;
| }
0x0002743c ldr r0, [pc, 0xe0] |
0x0002743e add r0, pc | r0 = 0x4e962;
0x00027440 bl 0x38c64 | zbx_error ();
0x00027444 b 0x272c8 | goto label_0;
| label_8:
0x00027446 ldr r0, [pc, 0xdc] |
0x00027448 add r0, pc | r0 = 0x4e972;
0x0002744a bl 0x38c64 | zbx_error ();
0x0002744e b 0x272c8 | goto label_0;
| label_10:
0x00027450 bl 0x26d00 | fcn_00026d00 (r0, r1, r2, r3, r4, r5, r6);
0x00027454 b 0x273a6 | goto label_2;
| label_9:
0x00027456 blx 0xbe48 | fcn_0000be48 ();
| label_11:
0x0002745a blx 0xc15c | r0 = fcn_0000c15c ();
0x0002745e ldr r0, [r0] | r0 = *(r0);
0x00027460 add r4, sp, 0x54 | r4 += var_54h;
0x00027462 bl 0x26fdc | r0 = zbx_strerror ();
0x00027466 mov r1, r0 | r1 = r0;
0x00027468 ldr r0, [pc, 0xbc] |
0x0002746a add r0, pc | r0 = 0x4e996;
0x0002746c bl 0x38c64 | zbx_error ();
0x00027470 add.w r3, sp, 0x10000 | r3 += arg_10000h;
0x00027474 mov r2, r7 | r2 = r7;
0x00027476 adds r3, 0x78 | r3 += 0x78;
0x00027478 mov.w r1, 0x10000 | r1 = case.0x3207a.11;
0x0002747c mov r0, r4 | r0 = r4;
0x0002747e str r3, [sp, 0x20] | var_20h = r3;
0x00027480 bl 0x39020 | zbx_vsnprintf ()
0x00027484 ldr r0, [pc, 0xa4] |
0x00027486 mov r1, r4 | r1 = r4;
0x00027488 add r0, pc | r0 = 0x4e9b8;
0x0002748a bl 0x38c64 | zbx_error ();
0x0002748e b 0x2741a | goto label_3;
| label_6:
0x00027490 ldr r2, [pc, 0x9c] |
0x00027492 mov r3, r5 | r3 = r5;
0x00027494 movs r1, 1 | r1 = 1;
0x00027496 movs r0, 2 | r0 = 2;
0x00027498 add r2, pc | r2 = 0x4e9cc;
0x0002749a blx 0xc2b4 | fork ();
0x0002749e b 0x272c8 | goto label_0;
| label_7:
0x000274a0 ldr r0, [pc, 0x90] |
0x000274a2 mov r1, r5 | r1 = r5;
0x000274a4 add r0, pc | r0 = 0x4e9dc;
0x000274a6 bl 0x38c64 | zbx_error ();
0x000274aa b 0x2733e | goto label_1;
| }
; 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 @ 0x35e5c */
| #include <stdint.h>
|
; (fcn) sym.zbx_setproctitle () | void zbx_setproctitle (int16_t arg_804h, int16_t arg_818h) {
| int32_t var_804h;
| int16_t var_80ch;
| int16_t var_4h;
| int16_t var_818h;
| int16_t var_4h_2;
0x00035e5c push {r0, r1, r2, r3} |
0x00035e5e mov.w r1, 0x800 | r1 = case.0x3207a.11;
0x00035e62 push {r4, r5, lr} |
0x00035e64 subw sp, sp, 0x80c | __asm ("subw sp, sp, case.0x3207a.11");
0x00035e68 addw r3, sp, 0x818 | __asm ("addw r3, arg_818h");
0x00035e6c mov r0, sp | r0 = sp;
0x00035e6e add r5, sp, 4 | r5 += var_4h;
0x00035e70 ldr r2, [r3], 4 | r2 = *(r3);
| r3 += 4;
0x00035e74 ldr.w ip, [pc, 0x68] | ip = *(0x00035ee0);
0x00035e78 ldr r4, [pc, 0x68] |
0x00035e7a str r3, [r0] | *(r0) = r3;
0x00035e7c ldr r0, [pc, 0x68] |
0x00035e7e add ip, pc |
0x00035e80 add r4, pc | r4 = 0x6bd68;
0x00035e82 ldr.w r0, [ip, r0] | r0 = *((ip + r0));
0x00035e86 ldr r0, [r0] | r0 = *(0x35ee8);
0x00035e88 str.w r0, [sp, 0x804] | __asm ("str.w r0, [arg_804h]");
0x00035e8c mov.w r0, 0 | r0 = 0;
0x00035e90 mov r0, r5 | r0 = r5;
0x00035e92 bl 0x39020 | zbx_vsnprintf ()
0x00035e96 ldr r3, [pc, 0x54] | r3 = *(0x35eee);
0x00035e98 ldr r3, [r4, r3] |
0x00035e9a ldr r3, [r3] | r3 = *(0x6bd68);
0x00035e9c cmp r3, 3 |
0x00035e9e bgt 0x35ec8 |
| while (1) {
0x00035ea0 mov r0, r5 | r0 = r5;
0x00035ea2 bl 0x3825c | setproctitle_set_status ();
0x00035ea6 ldr r2, [pc, 0x48] |
0x00035ea8 ldr r3, [pc, 0x3c] | r3 = *(0x35ee8);
0x00035eaa add r2, pc | r2 = 0x6bda0;
0x00035eac ldr r3, [r2, r3] | r3 = *(0x6bda0);
0x00035eae ldr r2, [r3] | r2 = *(0x6bda0);
0x00035eb0 ldr.w r3, [sp, 0x804] | r3 = *(arg_804h);
0x00035eb4 eors r2, r3 | r2 ^= r3;
0x00035eb6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00035eba bne 0x35edc | goto label_0;
| }
0x00035ebc addw sp, sp, 0x80c | __asm ("addw sp, var_80ch");
0x00035ec0 pop.w {r4, r5, lr} |
0x00035ec4 add sp, 0x10 |
0x00035ec6 bx lr | return;
0x00035ec8 ldr r2, [pc, 0x28] |
0x00035eca mov r3, r5 | r3 = r5;
0x00035ecc ldr r1, [pc, 0x28] |
0x00035ece movs r0, 4 | r0 = 4;
0x00035ed0 add r2, pc | r2 = 0x6bdc8;
0x00035ed2 add r1, pc | r1 = 0x6bdce;
0x00035ed4 adds r2, 0x8c | r2 += 0x8c;
0x00035ed6 bl 0x271b0 | zbx_zabbix_log ();
0x00035eda b 0x35ea0 |
| }
| label_0:
0x00035edc blx 0xbe48 | fcn_0000be48 ();
0x00035ee0 ldr r6, [r5, 0x54] | r6 = *((r5 + 0x54));
0x00035ee2 movs r2, r0 | r2 = r0;
0x00035ee4 ldr r4, [r5, 0x54] | r4 = *((r5 + 0x54));
0x00035ee6 movs r2, r0 | r2 = r0;
0x00035ee8 lsls r4, r2, 0xc | r4 = r2 << 0xc;
0x00035eea movs r0, r0 |
0x00035eec lsls r0, r6, 0xe | r0 = r6 << 0xe;
0x00035eee movs r0, r0 |
0x00035ef0 ldr r2, [r0, 0x54] | r2 = *((r0 + 0x54));
0x00035ef2 movs r2, r0 | r2 = r0;
0x00035ef4 str r4, [r1, r1] | *((r1 + r1)) = r4;
0x00035ef6 movs r1, r0 | r1 = r0;
0x00035ef8 ldr r5, [pc, 0x398] | r5 = *(0x36294);
0x00035efa movs r1, r0 | r1 = r0;
| }
[*] Function printf used 6 times zabbix_agentd