[*] Binary protection state of dbus-send
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of dbus-send
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/dbus-send @ 0x12180 */
| #include <stdint.h>
|
; (fcn) fcn.00012180 () | void fcn_00012180 (int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| int32_t fildes;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| void * s2;
| int32_t var_58h;
| int32_t var_a8h;
| void * s;
| int32_t var_b2h;
| int32_t var_b3h;
| int32_t var_b4h;
| int32_t var_b8h;
| void * var_130h;
| int32_t var_134h;
| int32_t var_138h;
| int32_t var_1b4h;
| r0 = arg1;
| r1 = arg2;
0x00012180 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00012184 add r6, r2, 1 | r6 = r2 + 1;
0x00012188 mov r7, r2 | r7 = r2;
0x0001218c ldr r2, [pc, 0x81c] | r2 = *(0x129ac);
0x00012190 sub r3, r6, r6, lsl 2 | r3 = r6 - (r6 << 2);
0x00012194 add r3, r3, 0x50 | r3 += 0x50;
0x00012198 mov r4, r0 | r4 = r0;
0x0001219c mov r5, r1 | r5 = r1;
0x000121a0 smull r0, r1, r3, r2 | r0:r1 = r3 * r2;
0x000121a4 sub sp, sp, 0x1b4 |
0x000121a8 sub r3, r1, r3, asr 31 | r3 = r1 - (r3 >> 31);
0x000121ac cmp r3, 8 |
| if (r3 >= 8) {
0x000121b0 movlo r3, 8 | r3 = 8;
| }
0x000121b4 str r3, [sp, 4] | var_4h = r3;
| do {
0x000121b8 mov r0, r4 | r0 = r4;
0x000121bc bl 0x11674 | r0 = dbus_message_iter_get_arg_type ();
0x000121c0 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x000121c4 beq 0x12284 | goto label_13;
| }
0x000121c8 mov r0, r7 | r0 = r7;
0x000121cc bl 0x12158 | fcn_00012158 (r0);
0x000121d0 sub r3, r8, 0x61 | r3 = r8 - 0x61;
0x000121d4 cmp r3, 0x18 |
| if (r3 > 0x18) {
| /* switch table (25 cases) at 0x121e0 */
0x000121d8 ldrls pc, [pc, r3, lsl 2] | offset_0 = r3 << 2;
| pc = *((pc + offset_0));
| }
0x000121dc b 0x12988 | goto label_14;
0x00012244 mov r0, r4 | r0 = r4;
0x00012248 add r1, sp, 0x130 | r1 += var_130h;
0x0001224c bl 0x114ac | dbus_message_iter_get_basic ();
0x00012250 cmp r5, 0 |
| if (r5 != 0) {
0x00012254 ldreq r0, [pc, 0x758] | r0 = "string \";
| }
| if (r5 == 0) {
0x00012258 beq 0x122a4 | goto label_1;
| }
| label_0:
0x0001225c ldr r1, [sp, 0x130] | r1 = var_130h;
0x00012260 ldr r0, [pc, 0x750] | r0 = "string \";
0x00012264 bl 0x1153c | printf ("string \", r1)
0x00012268 cmp r5, 0 |
| if (r5 != 0) {
0x0001226c ldreq r0, [pc, 0x748] | r0 = *(0x000129bc);
| }
| if (r5 == 0) {
0x00012270 beq 0x12524 | goto label_8;
| }
| label_2:
0x00012274 mov r0, r4 | r0 = r4;
0x00012278 bl 0x11494 | r0 = dbus_message_iter_next ();
0x0001227c cmp r0, 0 |
0x00012280 bne 0x121b8 |
| } while (r0 != 0);
| label_13:
0x00012284 add sp, sp, 0x1b4 |
0x00012288 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0001228c mov r0, r4 | r0 = r4;
0x00012290 add r1, sp, 0x130 | r1 += var_130h;
0x00012294 bl 0x114ac | dbus_message_iter_get_basic ();
0x00012298 cmp r5, 0 |
| if (r5 == 0) {
0x0001229c ldreq r0, [pc, 0x71c] | r0 = "signature \";
| goto label_15;
| }
| if (r5 != 0) {
| label_15:
0x000122a0 bne 0x1225c | goto label_0;
| }
| label_1:
0x000122a4 bl 0x1153c | printf (r0)
0x000122a8 b 0x1225c | goto label_0;
0x000122ac add r1, sp, 0x130 | r1 += var_130h;
0x000122b0 mov r0, r4 | r0 = r4;
0x000122b4 bl 0x114ac | dbus_message_iter_get_basic ();
0x000122b8 cmp r5, 0 |
| if (r5 != 0) {
0x000122bc bne 0x1225c | goto label_0;
| }
0x000122c0 ldr r0, [pc, 0x6fc] | r0 = "signature \";
0x000122c4 b 0x122a4 | goto label_1;
0x000122c8 add r1, sp, 0x130 | r1 += var_130h;
0x000122cc mov r0, r4 | r0 = r4;
0x000122d0 bl 0x114ac | dbus_message_iter_get_basic ();
0x000122d4 add r3, sp, 0x130 | r3 += var_130h;
0x000122d8 ldrsh r1, [r3] | r1 = *(r3);
0x000122dc ldr r0, [pc, 0x6e4] | r0 = "object path \";
| do {
| label_3:
0x000122e0 bl 0x1153c | printf ("object path \", r1, r2, r3)
0x000122e4 b 0x12274 | goto label_2;
0x000122e8 add r1, sp, 0x130 | r1 += var_130h;
0x000122ec mov r0, r4 | r0 = r4;
0x000122f0 bl 0x114ac | dbus_message_iter_get_basic ();
0x000122f4 add r3, sp, 0x130 | r3 += var_130h;
0x000122f8 ldrh r1, [r3] | r1 = *(r3);
0x000122fc ldr r0, [pc, 0x6c8] | r0 = "int16 %d\n";
0x00012300 b 0x122e0 |
| } while (1);
0x00012304 add r1, sp, 0x130 | r1 += var_130h;
0x00012308 mov r0, r4 | r0 = r4;
0x0001230c bl 0x114ac | dbus_message_iter_get_basic ();
0x00012310 ldr r1, [sp, 0x130] | r1 = var_130h;
0x00012314 ldr r0, [pc, 0x6b4] | r0 = "uint16 %u\n";
0x00012318 b 0x122e0 | goto label_3;
0x0001231c add r1, sp, 0x130 | r1 += var_130h;
0x00012320 mov r0, r4 | r0 = r4;
0x00012324 bl 0x114ac | dbus_message_iter_get_basic ();
0x00012328 ldr r1, [sp, 0x130] | r1 = var_130h;
0x0001232c ldr r0, [pc, 0x6a0] | r0 = "int32 %d\n";
0x00012330 b 0x122e0 | goto label_3;
0x00012334 mov r0, r4 | r0 = r4;
0x00012338 add r1, sp, 0x130 | r1 += var_130h;
0x0001233c bl 0x114ac | dbus_message_iter_get_basic ();
0x00012340 add r3, sp, 0x130 | r3 += var_130h;
0x00012344 ldrd r2, r3, [r3] | __asm ("ldrd r2, r3, [r3]");
0x00012348 ldr r0, [pc, 0x688] | r0 = "uint32 %u\n";
| do {
0x0001234c bl 0x1153c | printf ("uint32 %u\n", r1, r2, r3)
0x00012350 b 0x12274 | goto label_2;
0x00012354 mov r0, r4 | r0 = r4;
0x00012358 add r1, sp, 0x130 | r1 += var_130h;
0x0001235c bl 0x114ac | dbus_message_iter_get_basic ();
0x00012360 add r3, sp, 0x130 | r3 += var_130h;
0x00012364 ldrd r2, r3, [r3] | __asm ("ldrd r2, r3, [r3]");
0x00012368 ldr r0, [pc, 0x66c] | r0 = "int64 %lld\n";
0x0001236c b 0x1234c |
| } while (1);
0x00012370 mov r0, r4 | r0 = r4;
0x00012374 add r1, sp, 0x130 | r1 += var_130h;
0x00012378 bl 0x114ac | dbus_message_iter_get_basic ();
0x0001237c add r3, sp, 0x130 | r3 += var_130h;
0x00012380 ldrd r2, r3, [r3] | __asm ("ldrd r2, r3, [r3]");
0x00012384 ldr r0, [pc, 0x654] | r0 = "uint64 %llu\n";
0x00012388 bl 0x1153c | printf ("uint64 %llu\n", r1, r2, r3)
0x0001238c b 0x12274 | goto label_2;
0x00012390 add r1, sp, 0x130 | r1 += var_130h;
0x00012394 mov r0, r4 | r0 = r4;
0x00012398 bl 0x114ac | dbus_message_iter_get_basic ();
0x0001239c ldrb r1, [sp, 0x130] | r1 = var_130h;
0x000123a0 ldr r0, [pc, 0x63c] | r0 = "double %g\n";
0x000123a4 b 0x122e0 | goto label_3;
0x000123a8 add r1, sp, 0x130 | r1 += var_130h;
0x000123ac mov r0, r4 | r0 = r4;
0x000123b0 bl 0x114ac | dbus_message_iter_get_basic ();
0x000123b4 ldr r1, [sp, 0x130] | r1 = var_130h;
0x000123b8 ldr r2, [pc, 0x628] | r2 = "byte %d\n";
0x000123bc ldr r3, [pc, 0x628] | r3 = "false";
0x000123c0 cmp r1, 0 |
| if (r1 != 0) {
0x000123c4 moveq r1, r2 | r1 = r2;
| }
| if (r1 == 0) {
0x000123c8 movne r1, r3 | r1 = r3;
| }
0x000123cc ldr r0, [pc, 0x61c] | r0 = "true";
0x000123d0 b 0x122e0 | goto label_3;
0x000123d4 add r1, sp, 0x130 | r1 += var_130h;
0x000123d8 mov r0, r4 | r0 = r4;
0x000123dc bl 0x1168c | dbus_message_iter_recurse ();
0x000123e0 ldr r0, [pc, 0x60c] | r0 = "boolean %s\n";
0x000123e4 bl 0x1153c | printf ("boolean %s\n")
0x000123e8 mov r2, r6 | r2 = r6;
0x000123ec mov r1, r5 | r1 = r5;
0x000123f0 add r0, sp, 0x130 | r0 += var_130h;
0x000123f4 bl 0x12180 | fcn_00012180 (r0, r1);
0x000123f8 b 0x12274 | goto label_2;
0x000123fc add r1, sp, 0x130 | r1 += var_130h;
0x00012400 mov r0, r4 | r0 = r4;
0x00012404 bl 0x1168c | dbus_message_iter_recurse ();
0x00012408 add r0, sp, 0x130 | r0 += var_130h;
0x0001240c bl 0x11674 | r0 = dbus_message_iter_get_arg_type ();
0x00012410 cmp r0, 0x79 |
0x00012414 mov r8, r0 | r8 = r0;
| if (r0 != 0x79) {
0x00012418 bne 0x12538 | goto label_16;
| }
0x0001241c add r2, sp, 0xb0 | r2 += s;
0x00012420 add r1, sp, 0x48 | r1 += s2;
0x00012424 add r0, sp, 0x130 | r0 += var_130h;
0x00012428 bl 0x11548 | dbus_message_iter_get_fixed_array ();
0x0001242c ldr r8, [sp, 0xb0] | r8 = s;
0x00012430 ldr sl, [sp, 0x48] | sl = s2;
0x00012434 sub r2, r8, 1 | r2 = r8 - 1;
0x00012438 mov r3, 0 | r3 = 0;
| label_4:
0x0001243c cmp r3, r8 |
| if (r3 < r8) {
0x00012440 blt 0x12478 | goto label_17;
| }
0x00012444 cmp r8, 0 |
| if (r8 <= 0) {
0x00012448 ble 0x12460 | goto label_18;
| }
0x0001244c ldrb r3, [sl, r2] | r3 = *((sl + r2));
0x00012450 cmp r3, 0 |
| if (r3 != 0) {
0x00012454 moveq r1, sl | r1 = sl;
| }
| if (r3 == 0) {
0x00012458 ldreq r0, [pc, 0x598] | r0 = "array of bytes \"%s\" + \\0\n";
| goto label_19;
| }
| if (r3 == 0) {
| label_19:
0x0001245c beq 0x122e0 | goto label_3;
| }
| label_18:
0x00012460 add r0, r8, 1 | r0 = r8 + 1;
0x00012464 bl 0x11530 | r0 = dbus_malloc ();
0x00012468 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x0001246c bne 0x1249c |
0x00012470 ldr r0, [pc, 0x584] | r0 = "array of bytes \"%s\" + \\0\n";
0x00012474 bl 0x13084 | fcn_00013084 ("array of bytes \"%s\" + \\0\n");
| label_17:
0x00012478 ldrb r1, [sl, r3] | r1 = *((sl + r3));
0x0001247c sub r0, r1, 0x20 | r0 = r1 - 0x20;
0x00012480 cmp r0, 0x5e |
| if (r0 >= 0x5e) {
0x00012484 bls 0x12494 |
0x00012488 cmp r3, r2 |
0x0001248c cmpge r1, 0 | __asm ("cmpge r1, 0");
| if (r3 != r2) {
0x00012490 bne 0x12994 | goto label_20;
| }
| }
0x00012494 add r3, r3, 1 | r3++;
0x00012498 b 0x1243c | goto label_4;
| }
0x0001249c ldr sb, [sp, 0xb0] | sb = s;
0x000124a0 ldr r1, [sp, 0x48] | r1 = s2;
0x000124a4 mov r2, sb | r2 = sb;
0x000124a8 bl 0x116ec | memcpy (r0, r1, r2);
0x000124ac mov r3, 0 | r3 = 0;
0x000124b0 strb r3, [r8, sb] | *((r8 + sb)) = r3;
0x000124b4 mov r1, r8 | r1 = r8;
0x000124b8 ldr r0, [pc, 0x540] | r0 = "copying_bytestring";
0x000124bc bl 0x1153c | printf ("copying_bytestring", r1, r2, r3)
0x000124c0 mov r0, r8 | r0 = r8;
0x000124c4 bl 0x11680 | dbus_free ();
0x000124c8 b 0x12274 | goto label_2;
| do {
0x000124cc ldrb r1, [sl, sb] | r1 = *((sl + sb));
0x000124d0 mov r0, fp | r0 = fp;
0x000124d4 add sb, sb, 1 | sb++;
0x000124d8 bl 0x1153c | printf (r0, r1)
0x000124dc cmp sb, r8 |
| if (sb != r8) {
0x000124e0 beq 0x12508 |
0x000124e4 ldr r1, [sp, 4] | r1 = var_4h;
0x000124e8 mov r0, sb | r0 = sb;
0x000124ec bl 0x131b0 | fcn_000131b0 (r0, r1);
0x000124f0 cmp r1, 0 |
| if (r1 != 0) {
0x000124f4 bne 0x1252c | goto label_21;
| }
0x000124f8 mov r0, 0xa | r0 = 0xa;
0x000124fc bl 0x11554 | putchar (r0);
0x00012500 mov r0, r6 | r0 = r6;
0x00012504 bl 0x12158 | fcn_00012158 (r0);
| }
| label_5:
0x00012508 cmp sb, r8 |
0x0001250c bne 0x124cc |
| } while (sb != r8);
0x00012510 mov r0, 0xa | r0 = 0xa;
0x00012514 bl 0x11554 | putchar (r0);
| do {
| label_6:
0x00012518 mov r0, r7 | r0 = r7;
0x0001251c bl 0x12158 | fcn_00012158 (r0);
0x00012520 ldr r0, [pc, 0x4dc] | r0 = "array of bytes \"%s\"\n";
| label_8:
0x00012524 bl 0x116a4 | puts ("array of bytes \"%s\"\n");
0x00012528 b 0x12274 | goto label_2;
| label_21:
0x0001252c mov r0, 0x20 | r0 = 0x20;
0x00012530 bl 0x11554 | putchar (r0);
0x00012534 b 0x12508 | goto label_5;
| label_16:
0x00012538 ldr r0, [pc, 0x4c8] | r0 = *(0x12a04);
0x0001253c bl 0x116a4 | puts (r0);
| label_7:
0x00012540 cmp r8, 0 |
0x00012544 beq 0x12518 |
| } while (r8 == 0);
0x00012548 mov r2, r6 | r2 = r6;
0x0001254c mov r1, r5 | r1 = r5;
0x00012550 add r0, sp, 0x130 | r0 += var_130h;
0x00012554 bl 0x12180 | fcn_00012180 (r0, r1);
0x00012558 add r0, sp, 0x130 | r0 += var_130h;
0x0001255c bl 0x11494 | dbus_message_iter_next ();
0x00012560 add r0, sp, 0x130 | r0 += var_130h;
0x00012564 bl 0x11674 | dbus_message_iter_get_arg_type ();
0x00012568 subs r8, r0, 0 | r8 -= var_130h;
| if (r8 == var_130h) {
0x0001256c beq 0x12518 | goto label_6;
| }
0x00012570 mov r0, 0x2c | r0 = 0x2c;
0x00012574 bl 0x11554 | putchar (r0);
0x00012578 b 0x12540 | goto label_7;
0x0001257c add r1, sp, 0x130 | r1 += var_130h;
0x00012580 mov r0, r4 | r0 = r4;
0x00012584 bl 0x1168c | dbus_message_iter_recurse ();
0x00012588 ldr r0, [pc, 0x47c] | r0 = "array [";
0x0001258c bl 0x116a4 | puts ("array [");
0x00012590 mov r2, r6 | r2 = r6;
0x00012594 mov r1, r5 | r1 = r5;
0x00012598 add r0, sp, 0x130 | r0 += var_130h;
0x0001259c bl 0x12180 | fcn_00012180 (r0, r1);
0x000125a0 add r0, sp, 0x130 | r0 += var_130h;
0x000125a4 bl 0x11494 | dbus_message_iter_next ();
0x000125a8 mov r2, r6 | r2 = r6;
0x000125ac mov r1, r5 | r1 = r5;
0x000125b0 add r0, sp, 0x130 | r0 += var_130h;
0x000125b4 bl 0x12180 | fcn_00012180 (r0, r1);
0x000125b8 mov r0, r7 | r0 = r7;
0x000125bc bl 0x12158 | fcn_00012158 (r0);
0x000125c0 ldr r0, [pc, 0x448] | r0 = "dict entry(";
0x000125c4 b 0x12524 | goto label_8;
0x000125c8 mov r0, r4 | r0 = r4;
0x000125cc add r1, sp, 0x130 | r1 += var_130h;
0x000125d0 bl 0x1168c | dbus_message_iter_recurse ();
0x000125d4 ldr r0, [pc, 0x438] | r0 = *(0x12a10);
0x000125d8 bl 0x116a4 | puts (r0);
| do {
| label_9:
0x000125dc add r0, sp, 0x130 | r0 += var_130h;
0x000125e0 bl 0x11674 | r0 = dbus_message_iter_get_arg_type ();
0x000125e4 cmp r0, 0 |
| if (r0 == 0) {
0x000125e8 bne 0x125fc |
0x000125ec mov r0, r7 | r0 = r7;
0x000125f0 bl 0x12158 | fcn_00012158 (r0);
0x000125f4 ldr r0, [pc, 0x41c] | r0 = "struct {";
0x000125f8 b 0x12524 | goto label_8;
| }
0x000125fc mov r2, r6 | r2 = r6;
0x00012600 mov r1, r5 | r1 = r5;
0x00012604 add r0, sp, 0x130 | r0 += var_130h;
0x00012608 bl 0x12180 | fcn_00012180 (r0, r1);
0x0001260c add r0, sp, 0x130 | r0 += var_130h;
0x00012610 bl 0x11494 | dbus_message_iter_next ();
0x00012614 add r0, sp, 0x130 | r0 += var_130h;
0x00012618 bl 0x11674 | r0 = dbus_message_iter_get_arg_type ();
0x0001261c cmp r0, 0 |
0x00012620 beq 0x125dc |
| } while (r0 == 0);
0x00012624 mov r0, 0x2c | r0 = 0x2c;
0x00012628 bl 0x11554 | putchar (r0);
0x0001262c b 0x125dc | goto label_9;
0x00012630 add r1, sp, 0xc | r1 += fildes;
0x00012634 mov r0, r4 | r0 = r4;
0x00012638 bl 0x114ac | dbus_message_iter_get_basic ();
0x0001263c ldr sb, [sp, 0xc] | sb = fildes;
0x00012640 mov r2, 0x68 | r2 = 0x68;
0x00012644 mov r1, 0 | r1 = 0;
0x00012648 add r0, sp, 0x48 | r0 += s2;
0x0001264c bl 0x1144c | memset (r0, r1, r2);
0x00012650 mov r3, 0x80 | r3 = 0x80;
0x00012654 ldr r0, [pc, 0x3c0] | r0 = *(0x12a18);
0x00012658 str r3, [sp, 0x10] | var_10h = r3;
0x0001265c str r3, [sp, 0x14] | var_14h = r3;
0x00012660 bl 0x116a4 | puts (r0);
0x00012664 cmn sb, 1 |
| if (sb == 1) {
0x00012668 beq 0x12840 | goto label_10;
| }
0x0001266c add r1, sp, 0x48 | r1 += s2;
0x00012670 mov r0, sb | r0 = sb;
0x00012674 bl 0x116b0 | r0 = fstat64 ();
0x00012678 cmn r0, 1 |
| if (r0 == 1) {
0x0001267c beq 0x12840 | goto label_10;
| }
0x00012680 add r8, r7, 2 | r8 = r7 + 2;
0x00012684 mov r0, r8 | r0 = r8;
0x00012688 bl 0x12158 | fcn_00012158 (r0);
0x0001268c ldr r1, [sp, 0xa8] | r1 = var_a8h;
0x00012690 ldr r0, [pc, 0x388] | r0 = "file descriptor";
0x00012694 bl 0x1153c | printf ("file descriptor", r1)
0x00012698 mov r0, r8 | r0 = r8;
0x0001269c bl 0x12158 | fcn_00012158 (r0);
0x000126a0 ldr r0, [pc, 0x37c] | r0 = "inode: %d\n";
0x000126a4 bl 0x1153c | printf ("inode: %d\n")
0x000126a8 ldr r3, [sp, 0x58] | r3 = var_58h;
0x000126ac and r3, r3, 0xf000 | r3 &= 0xf000;
0x000126b0 cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x000126b4 bne 0x126c0 |
0x000126b8 ldr r0, [pc, 0x368] | r0 = "type: ";
0x000126bc bl 0x116a4 | puts ("type: ");
| }
0x000126c0 ldr r3, [sp, 0x58] | r3 = var_58h;
0x000126c4 and r3, r3, 0xf000 | r3 &= 0xf000;
0x000126c8 cmp r3, 0x4000 |
| if (r3 == 0x4000) {
0x000126cc bne 0x126d8 |
0x000126d0 ldr r0, [pc, 0x354] | r0 = "file";
0x000126d4 bl 0x116a4 | puts ("file");
| }
0x000126d8 ldr r3, [sp, 0x58] | r3 = var_58h;
0x000126dc and r3, r3, 0xf000 | r3 &= 0xf000;
0x000126e0 cmp r3, 0x2000 |
| if (r3 == 0x2000) {
0x000126e4 bne 0x126f0 |
0x000126e8 ldr r0, [pc, 0x340] | r0 = "directory";
0x000126ec bl 0x116a4 | puts ("directory");
| }
0x000126f0 ldr r3, [sp, 0x58] | r3 = var_58h;
0x000126f4 and r3, r3, 0xf000 | r3 &= 0xf000;
0x000126f8 cmp r3, 0x6000 |
| if (r3 == 0x6000) {
0x000126fc bne 0x12708 |
0x00012700 ldr r0, [pc, 0x32c] | r0 = "char";
0x00012704 bl 0x116a4 | puts ("char");
| }
0x00012708 ldr r3, [sp, 0x58] | r3 = var_58h;
0x0001270c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00012710 cmp r3, 0x1000 |
| if (r3 == 0x1000) {
0x00012714 bne 0x12720 |
0x00012718 ldr r0, [pc, 0x318] | r0 = "block";
0x0001271c bl 0x116a4 | puts ("block");
| }
0x00012720 ldr r3, [sp, 0x58] | r3 = var_58h;
0x00012724 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00012728 cmp r3, 0xa000 |
| if (r3 == 0xa000) {
0x0001272c bne 0x12738 |
0x00012730 ldr r0, [pc, 0x304] | r0 = "fifo";
0x00012734 bl 0x116a4 | puts ("fifo");
| }
0x00012738 ldr r3, [sp, 0x58] | r3 = var_58h;
0x0001273c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00012740 cmp r3, 0xc000 |
| if (r3 == 0xc000) {
0x00012744 bne 0x12750 |
0x00012748 ldr r0, [pc, 0x2f0] | r0 = "link";
0x0001274c bl 0x116a4 | puts ("link");
| }
0x00012750 mov r2, 0x80 | r2 = 0x80;
0x00012754 mov r1, 0 | r1 = 0;
0x00012758 add r0, sp, 0xb0 | r0 += s;
0x0001275c bl 0x1144c | memset (r0, r1, r2);
0x00012760 mov r2, 0x80 | r2 = 0x80;
0x00012764 mov r1, 0 | r1 = 0;
0x00012768 add r0, sp, 0x130 | r0 += var_130h;
0x0001276c bl 0x1144c | memset (r0, r1, r2);
0x00012770 add r2, sp, 0x10 | r2 += var_10h;
0x00012774 add r1, sp, 0xb0 | r1 += s;
0x00012778 mov r0, sb | r0 = sb;
0x0001277c bl 0x11500 | r0 = getsockname (r0, r1, r2);
0x00012780 cmp r0, 0 |
| if (r0 != 0) {
0x00012784 bne 0x12840 | goto label_10;
| }
0x00012788 add r2, sp, 0x14 | r2 += var_14h;
0x0001278c add r1, sp, 0x130 | r1 += var_130h;
0x00012790 mov r0, sb | r0 = sb;
0x00012794 bl 0x11614 | r0 = getpeername ();
0x00012798 mov sl, r0 | sl = r0;
0x0001279c mov r0, r8 | r0 = r8;
0x000127a0 bl 0x12158 | fcn_00012158 (r0);
0x000127a4 ldr r0, [pc, 0x298] | r0 = "socket";
0x000127a8 bl 0x1153c | printf ("socket")
0x000127ac ldrh sb, [sp, 0xb0] | sb = s;
0x000127b0 cmp sb, 2 |
| if (sb == 2) {
0x000127b4 beq 0x12880 | goto label_22;
| }
| if (sb > 2) {
0x000127b8 bhi 0x127d0 | goto label_23;
| }
0x000127bc cmp sb, 1 |
| if (sb == 1) {
0x000127c0 beq 0x127ec | goto label_24;
| }
| do {
0x000127c4 mov r1, sb | r1 = sb;
0x000127c8 ldr r0, [pc, 0x278] | r0 = "address family: ";
0x000127cc b 0x12878 | goto label_25;
| label_23:
0x000127d0 cmp sb, 0xa |
| if (sb == 0xa) {
0x000127d4 beq 0x12920 | goto label_26;
| }
0x000127d8 cmp sb, 0x1f |
0x000127dc bne 0x127c4 |
| } while (sb != 0x1f);
0x000127e0 ldr r0, [pc, 0x264] | r0 = "unknown (%d)\n";
0x000127e4 bl 0x116a4 | puts ("unknown (%d)\n");
0x000127e8 b 0x12840 | goto label_10;
| label_24:
0x000127ec ldr r0, [pc, 0x25c] | r0 = "bluetooth";
0x000127f0 bl 0x116a4 | puts ("bluetooth");
0x000127f4 ldrb r3, [sp, 0xb2] | r3 = var_b2h;
0x000127f8 mov r0, r8 | r0 = r8;
0x000127fc cmp r3, 0 |
| if (r3 != 0) {
0x00012800 bne 0x1284c | goto label_27;
| }
0x00012804 bl 0x12158 | fcn_00012158 (r0);
0x00012808 ldr r1, [sp, 0x10] | r1 = var_10h;
0x0001280c add r2, sp, 0xb3 | r2 += var_b3h;
0x00012810 sub r1, r1, 3 | r1 -= 3;
0x00012814 ldr r0, [pc, 0x238] | r0 = "unix";
0x00012818 bl 0x1153c | printf ("unix", r1, r2)
0x0001281c cmp sl, 0 |
| if (sl != 0) {
0x00012820 bne 0x12840 | goto label_10;
| }
0x00012824 mov r0, r8 | r0 = r8;
0x00012828 bl 0x12158 | fcn_00012158 (r0);
0x0001282c ldr r1, [sp, 0x10] | r1 = var_10h;
0x00012830 ldr r0, [pc, 0x220] | r0 = "name @%.*s\n";
0x00012834 add r2, sp, 0xb3 | r2 += var_b3h;
0x00012838 sub r1, r1, 3 | r1 -= 3;
| label_11:
0x0001283c bl 0x1153c | printf ("name @%.*s\n", r1, r2)
| do {
| label_10:
0x00012840 ldr r0, [sp, 0xc] | r0 = fildes;
0x00012844 bl 0x115a8 | close (r0);
0x00012848 b 0x12274 | goto label_2;
| label_27:
0x0001284c bl 0x12158 | fcn_00012158 (r0);
0x00012850 add r1, sp, 0xb2 | r1 += var_b2h;
0x00012854 ldr r0, [pc, 0x200] | r0 = "peer @%.*s\n";
0x00012858 bl 0x1153c | printf ("peer @%.*s\n", r1)
0x0001285c cmp sl, 0 |
0x00012860 bne 0x12840 |
| } while (sl != 0);
0x00012864 mov r0, r8 | r0 = r8;
0x00012868 bl 0x12158 | fcn_00012158 (r0);
0x0001286c ldr r0, [pc, 0x1ec] | r0 = "name %s\n";
0x00012870 add r1, sp, 0x130 | r1 += var_130h;
0x00012874 add r1, r1, 2 | r1 += 2;
| label_25:
0x00012878 bl 0x1153c | printf ("name %s\n", r1)
0x0001287c b 0x12840 | goto label_10;
| label_22:
0x00012880 ldr r0, [pc, 0x1dc] | r0 = "peer %s\n";
0x00012884 bl 0x116a4 | puts ("peer %s\n");
0x00012888 mov r3, 0x2e | r3 = 0x2e;
0x0001288c add r2, sp, 0x18 | r2 += var_18h;
0x00012890 add r1, sp, 0xb4 | r1 += var_b4h;
0x00012894 mov r0, sb | r0 = sb;
0x00012898 bl 0x116e0 | r0 = inet_ntop ();
0x0001289c cmp r0, 0 |
| if (r0 != 0) {
0x000128a0 beq 0x128cc |
0x000128a4 mov r0, r8 | r0 = r8;
0x000128a8 bl 0x12158 | fcn_00012158 (r0);
0x000128ac ldrh r3, [sp, 0xb2] | r3 = var_b2h;
0x000128b0 add r1, sp, 0x18 | r1 += var_18h;
0x000128b4 lsr r2, r3, 8 | r2 = r3 >> 8;
0x000128b8 orr r2, r2, r3, lsl 8 | r2 |= (r3 << 8);
0x000128bc lsl r2, r2, 0x10 | r2 <<= 0x10;
0x000128c0 lsr r2, r2, 0x10 | r2 >>= 0x10;
0x000128c4 ldr r0, [pc, 0x19c] | r0 = "inet";
0x000128c8 bl 0x1153c | printf ("inet", r1, r2, r3)
| }
0x000128cc cmp sl, 0 |
| if (sl != 0) {
0x000128d0 bne 0x12840 | goto label_10;
| }
0x000128d4 mov r3, 0x2e | r3 = 0x2e;
0x000128d8 add r2, sp, 0x18 | r2 += var_18h;
0x000128dc add r1, sp, 0x134 | r1 += var_134h;
0x000128e0 mov r0, 2 | r0 = 2;
| label_12:
0x000128e4 bl 0x116e0 | r0 = inet_ntop ();
0x000128e8 cmp r0, 0 |
| if (r0 == 0) {
0x000128ec beq 0x12840 | goto label_10;
| }
0x000128f0 mov r0, r8 | r0 = r8;
0x000128f4 bl 0x12158 | fcn_00012158 (r0);
0x000128f8 add r3, sp, 0x130 | r3 += var_130h;
0x000128fc add r3, r3, 2 | r3 += 2;
0x00012900 ldrh r3, [r3] | r3 = *(r3);
0x00012904 add r1, sp, 0x18 | r1 += var_18h;
0x00012908 lsr r2, r3, 8 | r2 = r3 >> 8;
0x0001290c orr r2, r2, r3, lsl 8 | r2 |= (r3 << 8);
0x00012910 lsl r2, r2, 0x10 | r2 <<= 0x10;
0x00012914 lsr r2, r2, 0x10 | r2 >>= 0x10;
0x00012918 ldr r0, [pc, 0x14c] | r0 = "name %s port %u\n";
0x0001291c b 0x1283c | goto label_11;
| label_26:
0x00012920 ldr r0, [pc, 0x148] | r0 = "peer %s port %u\n";
0x00012924 bl 0x116a4 | puts ("peer %s port %u\n");
0x00012928 mov r3, 0x2e | r3 = 0x2e;
0x0001292c add r2, sp, 0x18 | r2 += var_18h;
0x00012930 add r1, sp, 0xb8 | r1 += var_b8h;
0x00012934 mov r0, sb | r0 = sb;
0x00012938 bl 0x116e0 | r0 = inet_ntop ();
0x0001293c cmp r0, 0 |
| if (r0 != 0) {
0x00012940 beq 0x1296c |
0x00012944 mov r0, r8 | r0 = r8;
0x00012948 bl 0x12158 | fcn_00012158 (r0);
0x0001294c ldrh r3, [sp, 0xb2] | r3 = var_b2h;
0x00012950 add r1, sp, 0x18 | r1 += var_18h;
0x00012954 lsr r2, r3, 8 | r2 = r3 >> 8;
0x00012958 orr r2, r2, r3, lsl 8 | r2 |= (r3 << 8);
0x0001295c lsl r2, r2, 0x10 | r2 <<= 0x10;
0x00012960 lsr r2, r2, 0x10 | r2 >>= 0x10;
0x00012964 ldr r0, [pc, 0xfc] | r0 = "inet";
0x00012968 bl 0x1153c | printf ("inet", r1, r2, r3)
| }
0x0001296c cmp sl, 0 |
| if (sl != 0) {
0x00012970 bne 0x12840 | goto label_10;
| }
0x00012974 mov r3, 0x2e | r3 = 0x2e;
0x00012978 add r2, sp, 0x18 | r2 += var_18h;
0x0001297c add r1, sp, 0x138 | r1 += var_138h;
0x00012980 mov r0, 0xa | r0 = 0xa;
0x00012984 b 0x128e4 | goto label_12;
| label_14:
0x00012988 mov r1, r8 | r1 = r8;
0x0001298c ldr r0, [pc, 0xe0] | r0 = "inet6";
0x00012990 b 0x122e0 | goto label_3;
| label_20:
0x00012994 ldr r0, [pc, 0xdc] | r0 = "_dbus_monitor_too_dumb_to_decipher_arg_type__c_";
0x00012998 bl 0x116a4 | puts ("_dbus_monitor_too_dumb_to_decipher_arg_type__c_");
0x0001299c mov r0, r6 | r0 = r6;
0x000129a0 bl 0x12158 | fcn_00012158 (r0);
0x000129a4 mov sb, 0 | sb = 0;
0x000129a8 ldr fp, [pc, 0xcc] | fp = "_02x";
0x000129ac b 0x12508 | goto label_5;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/dbus-send @ 0x12a80 */
| #include <stdint.h>
|
; (fcn) fcn.00012a80 () | void fcn_00012a80 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_44h;
| r0 = arg1;
| r1 = arg2;
0x00012a80 push {r4, r5, r6, r7, r8, sb, lr} |
0x00012a84 sub sp, sp, 0x44 |
0x00012a88 mov r7, r1 | r7 = r1;
0x00012a8c mov r4, r0 | r4 = r0;
0x00012a90 mov r8, r2 | r8 = r2;
0x00012a94 mov sb, r3 | sb = r3;
0x00012a98 bl 0x115cc | r0 = dbus_message_get_type ();
0x00012a9c mov r5, r0 | r5 = r0;
0x00012aa0 mov r0, r4 | r0 = r4;
0x00012aa4 bl 0x116bc | r0 = dbus_message_get_sender ();
0x00012aa8 mov r6, r0 | r6 = r0;
0x00012aac mov r0, r4 | r0 = r4;
0x00012ab0 bl 0x11410 | dbus_message_get_destination ();
0x00012ab4 cmp r7, 0 |
| if (r7 != 0) {
0x00012ab8 bne 0x12b9c | goto label_1;
| }
0x00012abc orrs r3, r8, sb | r3 = r8 | sb;
0x00012ac0 sub r5, r5, 1 | r5--;
| if (r3 == r8) {
0x00012ac4 beq 0x12b24 | goto label_2;
| }
0x00012ac8 cmp r5, 3 |
| if (r5 > 3) {
0x00012acc ldrls r3, [pc, 0x150] | r3 = *(0x00012c24);
| }
| if (r5 <= 3) {
0x00012ad0 ldrhi r1, [pc, 0x150] | r1 = "(unknown message type)";
| }
| if (r5 > 3) {
0x00012ad4 ldrls r1, [r3, r5, lsl 2] | offset_0 = r5 << 2;
| r1 = *((r3 + offset_0));
| }
0x00012ad8 ldr r3, [pc, 0x14c] | r3 = "(unknown message type)";
0x00012adc cmp r6, 0 |
| if (r6 != 0) {
0x00012ae0 moveq r6, r3 | r6 = r3;
| }
0x00012ae4 ldr r3, [pc, 0x144] | r3 = "_null_sender_";
0x00012ae8 cmp r0, 0 |
| if (r0 != 0) {
0x00012aec moveq r0, r3 | r0 = r3;
| }
0x00012af0 str r0, [sp, 4] | var_4h = r0;
0x00012af4 str r6, [sp] | *(sp) = r6;
0x00012af8 mov r3, sb | r3 = sb;
0x00012afc mov r2, r8 | r2 = r8;
0x00012b00 ldr r0, [pc, 0x12c] | r0 = "_null_destination_";
0x00012b04 bl 0x1153c | printf (r0, "(unknown message type)", r2, r3, r4, r5, r6)
| do {
0x00012b08 cmp r5, 3 |
| if (r5 > 3) {
| /* switch table (4 cases) at 0x12b14 */
0x00012b0c ldrls pc, [pc, r5, lsl 2] | offset_1 = r5 << 2;
| pc = *((pc + offset_1));
| }
0x00012b10 b 0x12c18 | goto label_3;
| label_2:
0x00012b24 cmp r5, 3 |
| if (r5 > 3) {
0x00012b28 ldrls r3, [pc, 0xf4] | r3 = *(0x00012c24);
| }
| if (r5 <= 3) {
0x00012b2c ldrhi r1, [pc, 0xf4] | r1 = "(unknown message type)";
| }
| if (r5 > 3) {
0x00012b30 ldrls r1, [r3, r5, lsl 2] | offset_2 = r5 << 2;
| r1 = *((r3 + offset_2));
| }
0x00012b34 cmp r0, 0 |
0x00012b38 ldr r3, [pc, 0xf0] | r3 = "_null_sender_";
| if (r0 == 0) {
0x00012b3c movne r3, r0 | r3 = r0;
| }
0x00012b40 cmp r6, 0 |
0x00012b44 ldr r2, [pc, 0xe0] | r2 = "(unknown message type)";
0x00012b48 ldr r0, [pc, 0xe8] | r0 = "%s time=%ld.%06ld sender=%s -> destination=%s";
| if (r6 == 0) {
0x00012b4c movne r2, r6 | r2 = r6;
| }
0x00012b50 bl 0x1153c | printf (r0, "(unknown message type)", "(unknown message type)", r3, r4, r5, r6)
0x00012b54 b 0x12b08 |
| } while (1);
0x00012b58 mov r0, r4 | r0 = r4;
0x00012b5c bl 0x11434 | r0 = dbus_message_get_serial ();
0x00012b60 mov r5, r0 | r5 = r0;
0x00012b64 mov r0, r4 | r0 = r4;
0x00012b68 bl 0x115d8 | r0 = dbus_message_get_path ();
0x00012b6c mov r6, r0 | r6 = r0;
0x00012b70 mov r0, r4 | r0 = r4;
0x00012b74 bl 0x11650 | r0 = dbus_message_get_interface ();
0x00012b78 mov r8, r0 | r8 = r0;
0x00012b7c mov r0, r4 | r0 = r4;
0x00012b80 bl 0x1165c | dbus_message_get_member ();
0x00012b84 mov r3, r8 | r3 = r8;
0x00012b88 mov r2, r6 | r2 = r6;
0x00012b8c mov r1, r5 | r1 = r5;
0x00012b90 str r0, [sp] | *(sp) = r0;
0x00012b94 ldr r0, [pc, 0xa0] | r0 = "%s sender=%s -> destination=%s";
0x00012b98 bl 0x1153c | printf (r0, r1, r2, r3)
| do {
| label_1:
0x00012b9c add r1, sp, 8 | r1 += var_8h;
0x00012ba0 mov r0, r4 | r0 = r4;
0x00012ba4 bl 0x11524 | dbus_message_iter_init ();
0x00012ba8 mov r2, 1 | r2 = 1;
0x00012bac mov r1, r7 | r1 = r7;
0x00012bb0 add r0, sp, 8 | r0 += var_8h;
0x00012bb4 bl 0x12180 | fcn_00012180 (r0, r1);
0x00012bb8 ldr r3, [pc, 0x80] | r3 = "serial_u_path_s__interface_s__member_s";
0x00012bbc ldr r0, [r3] | r0 = "serial_u_path_s__interface_s__member_s";
0x00012bc0 bl 0x11458 | fflush ("serial_u_path_s__interface_s__member_s");
0x00012bc4 add sp, sp, 0x44 |
0x00012bc8 pop {r4, r5, r6, r7, r8, sb, pc} |
0x00012bcc mov r0, r4 | r0 = r4;
0x00012bd0 bl 0x11434 | r0 = dbus_message_get_serial ();
0x00012bd4 mov r5, r0 | r5 = r0;
0x00012bd8 mov r0, r4 | r0 = r4;
0x00012bdc bl 0x1162c | dbus_message_get_reply_serial ();
0x00012be0 mov r1, r5 | r1 = r5;
0x00012be4 mov r2, r0 | r2 = r0;
0x00012be8 ldr r0, [pc, 0x54] | r0 = stdout;
| label_0:
0x00012bec bl 0x1153c | printf (r0, r1, r2)
0x00012bf0 b 0x12b9c |
| } while (1);
0x00012bf4 mov r0, r4 | r0 = r4;
0x00012bf8 bl 0x11698 | r0 = dbus_message_get_error_name ();
0x00012bfc mov r5, r0 | r5 = r0;
0x00012c00 mov r0, r4 | r0 = r4;
0x00012c04 bl 0x1162c | dbus_message_get_reply_serial ();
0x00012c08 mov r1, r5 | r1 = r5;
0x00012c0c mov r2, r0 | r2 = r0;
0x00012c10 ldr r0, [pc, 0x30] | r0 = " serial=%u reply_serial=%u\n";
0x00012c14 b 0x12bec | goto label_0;
| label_3:
0x00012c18 mov r0, 0xa | r0 = 0xa;
0x00012c1c bl 0x11554 | putchar (r0);
0x00012c20 b 0x12b9c | goto label_1;
| }
[*] Function printf used 22 times dbus-send