[*] Binary protection state of handle_xml_conf_duplication
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of handle_xml_conf_duplication
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/bin/handle_xml_conf_duplication @ 0x1420 */
| #include <stdint.h>
|
; (fcn) fcn.00001420 () | void fcn_00001420 (int16_t arg_10h, int16_t arg_14h, int16_t arg_18h, int16_t arg_1ch, int16_t arg_20h, int16_t arg_24h, int16_t arg_2ch, int16_t arg_3ch, int16_t arg_e4h, int16_t arg3) {
| r2 = arg3;
| label_4:
0x00000f64 str r2, [sp, 0x1c] | *(arg_1ch) = r2;
0x00000f66 add r3, pc | r3 += pc;
0x00000f68 ldr r2, [pc, 0x3e4] |
0x00000f6a mov fp, r3 |
0x00000f6c strd r5, r4, [sp, 0x24] | __asm ("strd r5, r4, [sp, 0x24]");
0x00000f70 add r2, pc | r2 = 0x22c4;
0x00000f72 str r2, [sp, 0x20] | *(arg_20h) = r2;
0x00000f74 b 0x1070 |
| while (r6 != 0) {
0x00000f76 ldrd r2, r1, [sp, 0x1c] | __asm ("ldrd r2, r1, [arg_1ch]");
0x00000f7a mov r0, r5 | r0 = r5;
0x00000f7c blx 0xb58 | xmlnode_add_attribute ();
| label_0:
0x00000f80 mov r1, r5 | r1 = r5;
0x00000f82 mov r0, sl | r0 = sl;
0x00000f84 blx 0xc3c | xmlnode_add_child ();
0x00000f88 mov r1, r5 | r1 = r5;
0x00000f8a mov r0, sb | r0 = sb;
0x00000f8c bl 0x14e8 | fcn_000014e8 (r0, r1);
0x00000f90 ldr r0, [pc, 0x3c0] |
0x00000f92 adds r6, 1 | r6++;
0x00000f94 mov r1, r6 | r1 = r6;
0x00000f96 add r0, pc | r0 = 0x22ee;
0x00000f98 blx 0xbdc | g_strdup_printf ()
0x00000f9c ldr r1, [pc, 0x3b8] |
0x00000f9e mov r4, r0 | r4 = r0;
0x00000fa0 mov r0, r5 | r0 = r5;
0x00000fa2 add r1, pc | r1 = 0x22fe;
0x00000fa4 blx 0xb64 | r0 = xmlnode_find_tag ();
| if (r0 != 0) {
0x00000fa8 cbz r0, 0xfb4 |
0x00000faa ldr r1, [pc, 0x3b0] |
0x00000fac mov r2, r4 | r2 = r4;
0x00000fae add r1, pc | r1 = 0x2310;
0x00000fb0 blx 0xb58 | xmlnode_add_attribute ();
| }
0x00000fb4 ldr r3, [pc, 0x3a8] |
0x00000fb6 mov r0, r5 | r0 = r5;
0x00000fb8 ldr r2, [pc, 0x3a8] |
0x00000fba ldr r1, [pc, 0x3ac] |
0x00000fbc add r3, pc | r3 = 0x2320;
0x00000fbe add r2, pc | r2 = 0x2326;
0x00000fc0 add r1, pc | r1 = 0x232e;
0x00000fc2 blx 0xce4 | r0 = xmlnode_find_tag_with_attribute ();
| if (r0 != 0) {
0x00000fc6 cbz r0, 0xfd2 |
0x00000fc8 ldr r1, [pc, 0x3a0] |
0x00000fca mov r2, r4 | r2 = r4;
0x00000fcc add r1, pc | r1 = 0x233c;
0x00000fce blx 0xb58 | xmlnode_add_attribute ();
| }
0x00000fd2 ldr r1, [pc, 0x39c] |
0x00000fd4 mov r0, r5 | r0 = r5;
0x00000fd6 add r1, pc | r1 = 0x234c;
0x00000fd8 blx 0xb64 | r0 = xmlnode_find_tag ();
0x00000fdc mov r5, r0 | r5 = r0;
0x00000fde cmp r0, 0 |
| if (r0 != 0) {
0x00000fe0 beq 0x106a |
0x00000fe2 ldr r7, [pc, 0x390] |
0x00000fe4 ldr.w r8, [pc, 0x390] |
0x00000fe8 add r7, pc | r7 = 0x2362;
0x00000fea mov r1, r7 | r1 = r7;
0x00000fec add r8, pc | r8 = 0x2368;
0x00000fee blx 0xca8 | xmlnode_get_attribute_value ();
0x00000ff2 str r0, [sp, 0x14] | *(arg_14h) = r0;
0x00000ff4 blx 0xc00 | strlen (r0);
0x00000ff8 ldr r3, [sp, 0x14] | r3 = *(arg_14h);
0x00000ffa mov r1, r0 | r1 = r0;
0x00000ffc subs r1, 1 | r1--;
0x00000ffe mov r0, r3 | r0 = r3;
0x00001000 blx 0xbac | g_strndup ();
0x00001004 movs r2, 0 | r2 = 0;
0x00001006 mov r1, r4 | r1 = r4;
0x00001008 str r0, [sp, 0x18] | *(arg_18h) = r0;
0x0000100a blx 0xb4c | g_strconcat ();
0x0000100e mov r1, r7 | r1 = r7;
0x00001010 mov r2, r0 | r2 = r0;
0x00001012 str r0, [sp, 0x14] | *(arg_14h) = r0;
0x00001014 mov r0, r5 | r0 = r5;
0x00001016 blx 0xb58 | xmlnode_add_attribute ();
0x0000101a ldr r2, [sp, 0x14] | r2 = *(arg_14h);
0x0000101c mov r0, r2 | r0 = r2;
0x0000101e blx 0xaec | g_free ();
0x00001022 ldr r3, [sp, 0x18] | r3 = *(arg_18h);
0x00001024 mov r0, r3 | r0 = r3;
0x00001026 blx 0xaec | g_free ();
0x0000102a mov r1, r8 | r1 = r8;
0x0000102c mov r0, r5 | r0 = r5;
0x0000102e blx 0xca8 | xmlnode_get_attribute_value ();
0x00001032 ldr r1, [pc, 0x348] |
0x00001034 mov r7, r0 | r7 = r0;
0x00001036 add r1, pc | r1 = 0x23b8;
0x00001038 blx 0xb28 | r0 = g_strrstr ();
0x0000103c cmp r0, 0 |
| if (r0 == 0) {
0x0000103e beq.w 0x1248 | goto label_5;
| }
0x00001042 mov r0, r7 | r0 = r7;
0x00001044 blx 0xc00 | r0 = strlen (r0);
0x00001048 subs r1, r0, 1 | r1 = r0 - 1;
0x0000104a mov r0, r7 | r0 = r7;
0x0000104c blx 0xbac | g_strndup ();
0x00001050 movs r2, 0 | r2 = 0;
0x00001052 mov r1, r4 | r1 = r4;
0x00001054 blx 0xb4c | r0 = g_strconcat ();
| label_1:
0x00001058 mov r7, r0 | r7 = r0;
0x0000105a mov r1, r8 | r1 = r8;
0x0000105c mov r0, r5 | r0 = r5;
0x0000105e mov r2, r7 | r2 = r7;
0x00001060 blx 0xb58 | xmlnode_add_attribute ();
0x00001064 mov r0, r7 | r0 = r7;
0x00001066 blx 0xaec | g_free ();
| }
0x0000106a mov r0, r4 | r0 = r4;
0x0000106c blx 0xaec | g_free ();
0x00001070 ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x00001072 cmp r3, r6 |
| if (r3 <= r6) {
0x00001074 ble.w 0x12a2 | goto label_6;
| }
0x00001078 blx 0xbb8 | r0 = xmlnode_create_node ();
0x0000107c mov r5, r0 | r5 = r0;
0x0000107e cmp r0, 0 |
| if (r0 == 0) {
0x00001080 beq.w 0x12b2 | goto label_7;
| }
0x00001084 mov r1, fp | r1 = fp;
0x00001086 blx 0xccc | xmlnode_set_name ();
0x0000108a cmp r6, 0 |
0x0000108c bne.w 0xf76 |
| }
0x00001090 ldr r2, [pc, 0x2ec] |
0x00001092 mov r0, r5 | r0 = r5;
0x00001094 ldr r1, [pc, 0x2ec] |
0x00001096 add r2, pc | r2 = 0x241a;
0x00001098 add r1, pc | r1 = 0x2420;
0x0000109a blx 0xb58 | xmlnode_add_attribute ();
0x0000109e b 0xf80 | goto label_0;
| do {
| label_2:
0x000010bc mov r0, r5 | r0 = r5;
0x000010be blx 0xb40 | xmlnode_free_tree ();
0x000010c2 mov r0, r4 | r0 = r4;
0x000010c4 blx 0xb40 | xmlnode_free_tree ();
0x000010c8 ldr r2, [pc, 0x2c0] |
0x000010ca ldr r3, [pc, 0x238] | r3 = *(0x1306);
0x000010cc add r2, pc | r2 = 0x245c;
0x000010ce ldr r3, [r2, r3] | r3 = *(0x245c);
0x000010d0 ldr r2, [r3] | r2 = *(0x245c);
0x000010d2 ldr r3, [sp, 0xe4] | r3 = *(arg_e4h);
0x000010d4 eors r2, r3 | r2 ^= r3;
0x000010d6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000010da bne.w 0x12ee | goto label_8;
| }
0x000010de mov r0, r6 | r0 = r6;
0x000010e0 add sp, 0xec |
0x000010e2 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_3:
0x00001218 cmp r7, 0 |
| if (r7 == 0) {
0x0000121a beq 0x12a8 | goto label_9;
| }
0x0000121c ldr r2, [pc, 0x1a0] |
0x0000121e mov r3, r7 | r3 = r7;
0x00001220 movs r1, 1 | r1 = 1;
0x00001222 movs r0, 4 | r0 = 4;
0x00001224 movs r6, 1 | r6 = 1;
0x00001226 add r2, pc | r2 = 0x25ea;
0x00001228 blx 0xc54 | syslog_chk ();
0x0000122c mov r0, r7 | r0 = r7;
0x0000122e blx 0xaec | g_free ();
0x00001232 b 0x10bc |
| } while (1);
| label_5:
0x00001248 ldr r1, [pc, 0x17c] |
0x0000124a mov r3, r0 | r3 = r0;
0x0000124c mov r2, r4 | r2 = r4;
0x0000124e mov r0, r7 | r0 = r7;
0x00001250 add r1, pc | r1 = 0x261c;
0x00001252 blx 0xb4c | g_strconcat ();
0x00001256 b 0x1058 | goto label_1;
| label_6:
0x000012a2 ldrd r5, r4, [sp, 0x24] | __asm ("ldrd r5, r4, [arg_24h]");
0x000012a6 ldr r6, [sp, 0x2c] | r6 = *(arg_2ch);
| label_9:
0x000012a8 ldr r1, [sp, 0x3c] | r1 = *(arg_3ch);
0x000012aa mov r0, r5 | r0 = r5;
0x000012ac blx 0xbf4 | xmlnode_save_file ();
0x000012b0 b 0x10bc | goto label_2;
| label_7:
0x000012b2 ldr r0, [pc, 0x128] |
0x000012b4 mov sb, r6 | sb = r6;
0x000012b6 add.w r1, sb, 1 | r1 = sb + 1;
0x000012ba ldrd r5, r4, [sp, 0x24] | __asm ("ldrd r5, r4, [arg_24h]");
0x000012be ldr r6, [sp, 0x2c] | r6 = *(arg_2ch);
0x000012c0 add r0, pc | r0 = 0x26a2;
0x000012c2 blx 0xbdc | r0 = g_strdup_printf ()
0x000012c6 mov r7, r0 | r7 = r0;
0x000012c8 b 0x1218 | goto label_3;
| label_8:
0x000012ee blx 0xc60 | stack_chk_fail ();
0x000012f2 nop |
0x000012f4 lsrs r6, r4, 3 | r6 = r4 >> 3;
0x000012f6 movs r0, r0 |
0x000012f8 lsrs r2, r1, 3 | r2 = r1 >> 3;
0x000012fa movs r0, r0 |
0x000012fc lsrs r6, r3, 5 | r6 = r3 >> 5;
0x000012fe movs r0, r0 |
0x00001300 asrs r0, r7, 7 | r0 = r7 >> 7;
0x00001302 movs r1, r0 | r1 = r0;
0x00001304 lsls r4, r0, 3 | r4 = r0 << 3;
0x00001306 movs r0, r0 |
0x00001308 lsrs r6, r5, 3 | r6 = r5 >> 3;
0x0000130a movs r0, r0 |
0x0000130c lsrs r0, r4, 4 | r0 = r4 >> 4;
0x0000130e movs r0, r0 |
0x00001310 lsrs r6, r6, 4 | r6 >>= 4;
0x00001312 movs r0, r0 |
0x00001314 lsrs r2, r6, 5 | r2 = r6 >> 5;
0x00001316 movs r0, r0 |
0x00001318 lsrs r6, r6, 5 | r6 >>= 5;
0x0000131a movs r0, r0 |
0x0000131c lsrs r4, r4, 6 | r4 >>= 6;
0x0000131e movs r0, r0 |
0x00001320 lsrs r4, r5, 8 | r4 = r5 >> 8;
0x00001322 movs r0, r0 |
0x00001324 lsrs r0, r7, 8 | r0 = r7 >> 8;
0x00001326 movs r0, r0 |
0x00001328 lsrs r4, r7, 8 | r4 = r7 >> 8;
0x0000132a movs r0, r0 |
0x0000132c lsrs r2, r3, 7 | r2 = r3 >> 7;
0x0000132e movs r0, r0 |
0x00001330 lsrs r4, r1, 8 | r4 = r1 >> 8;
0x00001332 movs r0, r0 |
0x00001334 lsrs r0, r4, 8 | r0 = r4 >> 8;
0x00001336 movs r0, r0 |
0x00001338 lsrs r2, r6, 8 | r2 = r6 >> 8;
0x0000133a movs r0, r0 |
0x0000133c lsrs r2, r0, 9 | r2 = r0 >> 9;
0x0000133e movs r0, r0 |
0x00001340 lsrs r2, r3, 0xa | r2 = r3 >> 0xa;
0x00001342 movs r0, r0 |
0x00001344 lsrs r0, r1, 0xa | r0 = r1 >> 0xa;
0x00001346 movs r0, r0 |
0x00001348 lsrs r6, r3, 0xa | r6 = r3 >> 0xa;
0x0000134a movs r0, r0 |
0x0000134c lsrs r6, r1, 5 | r6 = r1 >> 5;
0x0000134e movs r0, r0 |
0x00001350 lsrs r4, r0, 0xa | r4 = r0 >> 0xa;
0x00001352 movs r0, r0 |
0x00001354 lsrs r2, r6, 9 | r2 = r6 >> 9;
0x00001356 movs r0, r0 |
0x00001358 lsrs r2, r4, 5 | r2 = r4 >> 5;
0x0000135a movs r0, r0 |
0x0000135c lsrs r2, r2, 0xa | r2 >>= 0xa;
0x0000135e movs r0, r0 |
0x00001360 lsrs r4, r1, 0xa | r4 = r1 >> 0xa;
0x00001362 movs r0, r0 |
0x00001364 lsrs r6, r3, 7 | r6 = r3 >> 7;
0x00001366 movs r0, r0 |
0x00001368 lsrs r0, r2, 0xa | r0 = r2 >> 0xa;
0x0000136a movs r0, r0 |
0x0000136c lsrs r4, r6, 9 | r4 = r6 >> 9;
0x0000136e movs r0, r0 |
0x00001370 lsrs r6, r0, 0xa | r6 = r0 >> 0xa;
0x00001372 movs r0, r0 |
0x00001374 lsrs r4, r6, 6 | r4 = r6 >> 6;
0x00001376 movs r0, r0 |
0x00001378 lsrs r4, r5, 6 | r4 = r5 >> 6;
0x0000137a movs r0, r0 |
0x0000137c lsrs r6, r5, 8 | r6 = r5 >> 8;
0x0000137e movs r0, r0 |
0x00001380 lsrs r6, r2, 5 | r6 = r2 >> 5;
0x00001382 movs r0, r0 |
0x00001384 lsrs r4, r3, 5 | r4 = r3 >> 5;
0x00001386 movs r0, r0 |
0x00001388 lsls r4, r1, 0x1a | r4 = r1 << 0x1a;
0x0000138a movs r0, r0 |
0x0000138c lsrs r0, r4, 0x19 | r0 = r4 >> 0x19;
0x0000138e movs r1, r0 | r1 = r0;
0x00001390 lsls r0, r1, 0x1a | r0 = r1 << 0x1a;
0x00001392 movs r0, r0 |
0x00001394 lsls r6, r3, 0x1a | r6 = r3 << 0x1a;
0x00001396 movs r0, r0 |
0x00001398 lsls r2, r3, 0x1a | r2 = r3 << 0x1a;
0x0000139a movs r0, r0 |
0x0000139c lsls r2, r7, 0x1a | r2 = r7 << 0x1a;
0x0000139e movs r0, r0 |
0x000013a0 lsls r0, r1, 0x17 | r0 = r1 << 0x17;
0x000013a2 movs r0, r0 |
0x000013a4 lsls r4, r7, 0x1a | r4 = r7 << 0x1a;
0x000013a6 movs r0, r0 |
0x000013a8 lsls r6, r1, 0x17 | r6 = r1 << 0x17;
0x000013aa movs r0, r0 |
0x000013ac lsls r2, r1, 0x1b | r2 = r1 << 0x1b;
0x000013ae movs r0, r0 |
0x000013b0 lsls r0, r1, 0x18 | r0 = r1 << 0x18;
0x000013b2 movs r0, r0 |
0x000013b4 lsls r4, r2, 0x18 | r4 = r2 << 0x18;
0x000013b6 movs r0, r0 |
0x000013b8 lsrs r6, r1, 2 | r6 = r1 >> 2;
0x000013ba movs r0, r0 |
0x000013bc lsls r4, r4, 0x1c | r4 <<= 0x1c;
0x000013be movs r0, r0 |
0x000013c0 lsrs r2, r2, 1 | r2 >>= 1;
0x000013c2 movs r0, r0 |
0x000013c4 lsls r6, r1, 0x18 | r6 = r1 << 0x18;
0x000013c6 movs r0, r0 |
0x000013c8 lsrs r4, r3, 0x20 | r4 = r3 >> 0x20;
0x000013ca movs r0, r0 |
0x000013cc lsls r6, r7, 0x18 | r6 = r7 << 0x18;
0x000013ce movs r0, r0 |
0x000013d0 lsls r2, r3, 0x19 | r2 = r3 << 0x19;
0x000013d2 movs r0, r0 |
0x000013d4 lsls r6, r5, 0x19 | r6 = r5 << 0x19;
0x000013d6 movs r0, r0 |
0x000013d8 lsls r4, r7, 0x19 | r4 = r7 << 0x19;
0x000013da movs r0, r0 |
0x000013dc lsls r4, r1, 0x1d | r4 = r1 << 0x1d;
0x000013de movs r0, r0 |
0x000013e0 lsls r4, r6, 0x17 | r4 = r6 << 0x17;
0x000013e2 movs r0, r0 |
0x000013e4 lsls r4, r1, 0x1b | r4 = r1 << 0x1b;
0x000013e6 movs r0, r0 |
0x000013e8 lsls r4, r4, 0x1b | r4 <<= 0x1b;
0x000013ea movs r0, r0 |
0x00001420 adds r0, 0x14 | r0 += 0x14;
0x00001422 b 0xf64 | goto label_4;
| }
[*] Function printf used 3 times handle_xml_conf_duplication