[*] Binary protection state of libpaho-mqtt3cs.so.1.3.9
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of libpaho-mqtt3cs.so.1.3.9
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x12168 */
| #include <stdint.h>
|
; (fcn) fcn.00012168 () | void fcn_00012168 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_70h;
| r0 = arg1;
0x00012168 ldr r3, [pc, 0x3f8] | r3 = *(0x12564);
0x0001216c push {r4, r5, r6, r7, r8, lr} |
0x00012170 ldr r4, [pc, 0x3f4] | r4 = "_";
0x00012174 add r3, pc, r3 | r3 = pc + r3;
0x00012178 ldr r6, [r3, 8] | r6 = *(0x1256c);
0x0001217c mov r3, 0x12c | r3 = 0x12c;
0x00012180 sub sp, sp, 0x70 |
0x00012184 mov r5, r0 | r5 = r0;
0x00012188 mul r0, r6, r3 | r0 = r6 * r3;
0x0001218c bl 0x3558 | malloc (r0);
0x00012190 ldr r7, [pc, 0x3d8] | r7 = *(0x1256c);
0x00012194 add r4, pc, r4 | r4 = pc + r4;
0x00012198 add r7, pc, r7 | r7 = pc + r7;
0x0001219c cmp r0, 0 |
0x000121a0 str r0, [r4, 0x1c] | *((r4 + 0x1c)) = r0;
| if (r0 == 0) {
0x000121a4 beq 0x123f0 | goto label_6;
| }
0x000121a8 ldr r0, [pc, 0x3c4] | r0 = "ket:_exceeded_FD_SETSIZE__d";
0x000121ac str r6, [r4, 0x18] | *((r4 + 0x18)) = r6;
0x000121b0 add r0, pc, r0 | r0 = pc + r0;
0x000121b4 bl 0x3444 | r0 = getenv (r0);
0x000121b8 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x000121bc beq 0x121f8 | goto label_0;
| }
0x000121c0 ldrb r3, [r6] | r3 = *(r6);
0x000121c4 cmp r3, 0 |
| if (r3 == 0) {
0x000121c8 beq 0x121f8 | goto label_0;
| }
0x000121cc ldr r1, [pc, 0x3a4] | r1 = *(0x12574);
0x000121d0 add r1, pc, r1 | r1 = pc + r1;
0x000121d4 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000121d8 cmp r0, 0 |
0x000121dc bne 0x12374 |
| while (r0 == 0) {
0x000121e0 ldr r3, [pc, 0x394] | r3 = *(0x12578);
0x000121e4 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x000121e8 ldr r2, [r3] | r2 = *(0x12578);
0x000121ec ldr r3, [pc, 0x38c] | r3 = *(0x1257c);
0x000121f0 add r3, pc, r3 | r3 = pc + r3;
0x000121f4 str r2, [r3] | *(r3) = r2;
| label_0:
0x000121f8 ldr r0, [pc, 0x384] | r0 = "estored_for_client__s";
0x000121fc add r0, pc, r0 | r0 = pc + r0;
0x00012200 bl 0x3444 | r0 = getenv (r0);
0x00012204 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x00012208 beq 0x12230 |
0x0001220c ldrb r3, [r3] | r3 = *(r3);
0x00012210 cmp r3, 0 |
| if (r3 == 0) {
0x00012214 beq 0x12230 | goto label_1;
| }
0x00012218 bl 0x3ac8 | r0 = atoi (r0);
0x0001221c cmp r0, 0 |
| if (r0 <= 0) {
0x00012220 ble 0x12428 | goto label_7;
| }
0x00012224 ldr r3, [pc, 0x35c] | r3 = *(0x12584);
0x00012228 add r3, pc, r3 | r3 = pc + r3;
0x0001222c str r0, [r3] | *(r3) = r0;
| }
| label_1:
0x00012230 ldr r0, [pc, 0x354] | r0 = "NT_TRACE";
0x00012234 add r0, pc, r0 | r0 = pc + r0;
0x00012238 bl 0x3444 | r0 = getenv (r0);
0x0001223c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00012240 beq 0x1228c |
0x00012244 ldrb r3, [r4] | r3 = *(r4);
0x00012248 cmp r3, 0 |
| if (r3 == 0) {
0x0001224c beq 0x1228c | goto label_3;
| }
0x00012250 ldr r1, [pc, 0x338] | r1 = *(0x1258c);
0x00012254 add r1, pc, r1 | r1 = pc + r1;
0x00012258 bl 0x3a5c | r0 = strcmp (r0, r1);
0x0001225c cmp r0, 0 |
| if (r0 != 0) {
0x00012260 beq 0x1227c |
0x00012264 ldr r1, [pc, 0x328] | r1 = *(0x12590);
0x00012268 mov r0, r4 | r0 = r4;
0x0001226c add r1, pc, r1 | r1 = pc + r1;
0x00012270 bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012274 cmp r0, 0 |
| if (r0 != 0) {
0x00012278 bne 0x1243c | goto label_8;
| }
| }
0x0001227c ldr r3, [pc, 0x314] | r3 = *(0x12594);
0x00012280 mov r2, 1 | r2 = 1;
0x00012284 add r3, pc, r3 | r3 = pc + r3;
| label_2:
0x00012288 str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
| label_3:
0x0001228c ldr r1, [pc, 0x308] | r1 = "turn_code__d_from_write_select";
0x00012290 mov r0, 3 | r0 = 3;
0x00012294 add r1, pc, r1 | r1 = pc + r1;
0x00012298 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x0001229c ldr r1, [pc, 0x2fc] | r1 = *(0x1259c);
0x000122a0 mov r0, 3 | r0 = 3;
0x000122a4 add r1, pc, r1 | r1 = pc + r1;
0x000122a8 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x000122ac cmp r5, 0 |
| if (r5 != 0) {
0x000122b0 beq 0x122dc |
0x000122b4 add r4, r5, 8 | r4 = r5 + 8;
0x000122b8 ldr r5, [pc, 0x2e4] |
0x000122bc ldr r6, [pc, 0x2e4] | r6 = "nt_messages_and__d_received_messages_restored_for_client__s";
0x000122c0 add r5, pc, r5 | r5 = pc + r5;
0x000122c4 add r6, pc, r6 | r6 = pc + r6;
0x000122c8 add r5, r5, 0x24 | r5 = 0x125c4;
| label_5:
0x000122cc add r4, r4, 8 | r4 += 8;
0x000122d0 ldr r3, [r4, -0x10] | r3 = *((r4 - 0x10));
0x000122d4 cmp r3, 0 |
| if (r3 != 0) {
0x000122d8 bne 0x12540 | goto label_9;
| }
| }
0x000122dc ldr r4, [pc, 0x2c8] | r4 = *(0x125a8);
0x000122e0 add r1, sp, 8 | r1 += var_8h;
0x000122e4 add r4, pc, r4 | r4 = pc + r4;
0x000122e8 mov r0, r4 | r0 = r4;
0x000122ec bl 0x3660 | r0 = stat64 ();
0x000122f0 cmn r0, 1 |
| if (r0 != 1) {
0x000122f4 beq 0x12360 |
0x000122f8 ldr r1, [pc, 0x2b0] | r1 = *(0x125ac);
0x000122fc mov r0, r4 | r0 = r4;
0x00012300 add r1, pc, r1 | r1 = pc + r1;
0x00012304 bl 0x3594 | r0 = fopen64 ();
0x00012308 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0001230c beq 0x12360 | goto label_10;
| }
0x00012310 ldr r4, [pc, 0x29c] |
0x00012314 ldr r1, [pc, 0x29c] | r1 = "t_kt400_output_build_paho_mqtt_c_v1.3.9_src_MQTTPersistence.c";
0x00012318 add r4, pc, r4 | r4 = pc + r4;
0x0001231c add r4, r4, 0x24 | r4 = 0x125d4;
0x00012320 add r1, pc, r1 | r1 = pc + r1;
0x00012324 mov r0, r4 | r0 = r4;
0x00012328 bl 0x3b94 | strcpy (r0, r1)
0x0001232c mov r0, r4 | r0 = r4;
0x00012330 bl 0x35dc | strlen (r0);
0x00012334 mov r2, r5 | r2 = r5;
0x00012338 rsb r1, r0, 0x200 | r1 = 0x200 - r0;
0x0001233c add r0, r4, r0 | r0 = r4 + r0;
0x00012340 bl 0x37c8 | r0 = fgets (r0, r1, r2);
0x00012344 cmp r0, 0 |
| if (r0 != 0) {
0x00012348 beq 0x12358 |
0x0001234c mov r1, r4 | r1 = r4;
0x00012350 mov r0, 3 | r0 = 3;
0x00012354 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
| }
0x00012358 mov r0, r5 | r0 = r5;
0x0001235c bl 0x36a8 | fclose (r0);
| }
| label_10:
0x00012360 ldr r1, [pc, 0x254] | r1 = *(0x125b8);
0x00012364 mov r0, 3 | r0 = 3;
0x00012368 add r1, pc, r1 | r1 = pc + r1;
0x0001236c bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x00012370 b 0x123f0 | goto label_6;
0x00012374 ldr r1, [pc, 0x244] | r1 = *(0x125bc);
0x00012378 mov r0, r6 | r0 = r6;
0x0001237c add r1, pc, r1 | r1 = pc + r1;
0x00012380 bl 0x3594 | r0 = fopen64 ();
0x00012384 cmp r0, 0 |
0x00012388 str r0, [r4] | *(r4) = r0;
0x0001238c beq 0x121e0 |
| }
0x00012390 mov r0, r6 | r0 = r6;
0x00012394 bl 0x35dc | r0 = strlen (r0);
0x00012398 add r0, r0, 1 | r0++;
0x0001239c bl 0x3558 | r0 = malloc (r0);
0x000123a0 cmp r0, 0 |
0x000123a4 mov r7, r0 | r7 = r0;
0x000123a8 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
| if (r0 != 0) {
0x000123ac ldreq r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| }
| if (r0 != 0) {
0x000123b0 beq 0x123ec |
0x000123b4 mov r1, r6 | r1 = r6;
0x000123b8 bl 0x3b94 | strcpy (r0, r1)
0x000123bc mov r0, r6 | r0 = r6;
0x000123c0 bl 0x35dc | r0 = strlen (r0);
0x000123c4 add r6, r0, 3 | r6 = r0 + 3;
0x000123c8 mov r8, r0 | r8 = r0;
0x000123cc mov r0, r6 | r0 = r6;
0x000123d0 bl 0x3558 | r0 = malloc (r0);
0x000123d4 cmp r0, 0 |
0x000123d8 str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r0 != 0) {
0x000123dc bne 0x123fc | goto label_11;
| }
0x000123e0 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x000123e4 bl 0x3abc | free (r0);
0x000123e8 mov r0, r7 | r0 = r7;
| }
0x000123ec bl 0x3abc | free (r0);
| label_6:
0x000123f0 mvn r0, 0 | r0 = ~0;
0x000123f4 add sp, sp, 0x70 |
0x000123f8 pop {r4, r5, r6, r7, r8, pc} |
| label_11:
0x000123fc ldr r2, [pc, 0x1c0] | r2 = *(0x125c0);
0x00012400 mov r3, r7 | r3 = r7;
0x00012404 add r2, pc, r2 | r2 = pc + r2;
0x00012408 mov r1, r6 | r1 = r6;
0x0001240c bl 0x360c | r0 = snprintf (r0, r1, r2, r3);
0x00012410 cmp r0, r6 |
| if (r0 < r6) {
0x00012414 ldrhs r0, [r4, 8] | r0 = *((r4 + 8));
| }
| if (r0 < r6) {
0x00012418 movhs r3, 0 | r3 = 0;
| }
| if (r0 < r6) {
0x0001241c addhs r0, r0, r8 | r0 += r8;
| }
| if (r0 < r6) {
0x00012420 strbhs r3, [r0, 2] | *((r0 + 2)) = r3;
| }
0x00012424 b 0x121f8 | goto label_0;
| label_7:
0x00012428 ldr r3, [pc, 0x198] | r3 = *(0x125c4);
0x0001242c mov r2, 0x3e8 | r2 = 0x3e8;
0x00012430 add r3, pc, r3 | r3 = pc + r3;
0x00012434 str r2, [r3] | *(r3) = r2;
0x00012438 b 0x12230 | goto label_1;
| label_8:
0x0001243c ldr r1, [pc, 0x188] | r1 = "te_for_socket__d";
0x00012440 mov r0, r4 | r0 = r4;
0x00012444 add r1, pc, r1 | r1 = pc + r1;
0x00012448 bl 0x3a5c | r0 = strcmp (r0, r1);
0x0001244c cmp r0, 0 |
| if (r0 != 0) {
0x00012450 beq 0x1246c |
0x00012454 ldr r1, [pc, 0x174] | r1 = *(0x125cc);
0x00012458 mov r0, r4 | r0 = r4;
0x0001245c add r1, pc, r1 | r1 = pc + r1;
0x00012460 bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012464 cmp r0, 0 |
| if (r0 != 0) {
0x00012468 bne 0x1247c | goto label_12;
| }
| }
0x0001246c ldr r3, [pc, 0x160] | r3 = *(0x125d0);
0x00012470 mov r2, 2 | r2 = 2;
0x00012474 add r3, pc, r3 | r3 = pc + r3;
0x00012478 b 0x12288 | goto label_2;
| label_12:
0x0001247c ldr r1, [pc, 0x154] | r1 = "y_written_on_socket__d";
0x00012480 mov r0, r4 | r0 = r4;
0x00012484 add r1, pc, r1 | r1 = pc + r1;
0x00012488 bl 0x3a5c | r0 = strcmp (r0, r1);
0x0001248c cmp r0, 0 |
| if (r0 != 0) {
0x00012490 beq 0x124ac |
0x00012494 ldr r1, [pc, 0x140] | r1 = *(0x125d8);
0x00012498 mov r0, r4 | r0 = r4;
0x0001249c add r1, pc, r1 | r1 = pc + r1;
0x000124a0 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000124a4 cmp r0, 0 |
| if (r0 != 0) {
0x000124a8 bne 0x124bc | goto label_13;
| }
| }
0x000124ac ldr r3, [pc, 0x12c] | r3 = *(0x125dc);
0x000124b0 mov r2, 3 | r2 = 3;
0x000124b4 add r3, pc, r3 | r3 = pc + r3;
0x000124b8 b 0x12288 | goto label_2;
| label_13:
0x000124bc ldr r1, [pc, 0x120] | r1 = "s_already_pending_output";
0x000124c0 mov r0, r4 | r0 = r4;
0x000124c4 add r1, pc, r1 | r1 = pc + r1;
0x000124c8 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000124cc cmp r0, 0 |
| if (r0 != 0) {
0x000124d0 beq 0x124ec |
0x000124d4 ldr r1, [pc, 0x10c] | r1 = *(0x125e4);
0x000124d8 mov r0, r4 | r0 = r4;
0x000124dc add r1, pc, r1 | r1 = pc + r1;
0x000124e0 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000124e4 cmp r0, 0 |
| if (r0 != 0) {
0x000124e8 bne 0x12500 | goto label_14;
| }
| }
0x000124ec ldr r3, [pc, 0xf8] | r3 = *(0x125e8);
0x000124f0 mov r2, 4 | r2 = 4;
0x000124f4 add r3, pc, r3 | r3 = pc + r3;
| label_4:
0x000124f8 str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x000124fc b 0x1228c | goto label_3;
| label_14:
0x00012500 ldr r1, [pc, 0xe8] | r1 = "writev___putdatas";
0x00012504 mov r0, r4 | r0 = r4;
0x00012508 add r1, pc, r1 | r1 = pc + r1;
0x0001250c bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012510 cmp r0, 0 |
| if (r0 == 0) {
0x00012514 beq 0x12530 | goto label_15;
| }
0x00012518 ldr r1, [pc, 0xd4] | r1 = *(0x125f0);
0x0001251c mov r0, r4 | r0 = r4;
0x00012520 add r1, pc, r1 | r1 = pc + r1;
0x00012524 bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012528 cmp r0, 0 |
| if (r0 != 0) {
0x0001252c bne 0x1228c | goto label_3;
| }
| label_15:
0x00012530 ldr r3, [pc, 0xc0] | r3 = *(0x125f4);
0x00012534 mov r2, 5 | r2 = 5;
0x00012538 add r3, pc, r3 | r3 = pc + r3;
0x0001253c b 0x124f8 | goto label_4;
| label_9:
0x00012540 ldr r2, [r4, -0xc] | r2 = *((r4 - 0xc));
0x00012544 mov r1, 0x200 | r1 = 0x200;
0x00012548 str r2, [sp] | *(sp) = r2;
0x0001254c mov r0, r5 | r0 = r5;
0x00012550 mov r2, r6 | r2 = r6;
0x00012554 bl 0x360c | snprintf (r0, r1, r2, r3);
0x00012558 mov r1, r5 | r1 = r5;
0x0001255c mov r0, 3 | r0 = 3;
0x00012560 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x00012564 b 0x122cc | 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x12838 */
| #include <stdint.h>
|
; (fcn) fcn.00012838 () | void fcn_00012838 (int32_t arg_30h, int32_t arg_34h, int32_t arg_38h, uint32_t arg1, int32_t arg2) {
| char * src;
| int32_t var_4h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x00012838 push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001283c ldr sl, [pc, 0xe4] | sl = "_lu_bytes_of__lu_actually_written_on_socket__d";
0x00012840 mov r7, r3 | r7 = r3;
0x00012844 ldr r3, [sp, 0x30] | r3 = *(arg_30h);
0x00012848 add sl, pc, sl | sl = pc + sl;
0x0001284c ldr ip, [sl, 0x1c] | ip = *((sl + 0x1c));
0x00012850 str r3, [sp] | *(sp) = r3;
0x00012854 ldr r3, [pc, 0xd0] | r3 = "_lu_bytes_of__lu_actually_written_on_socket__d";
0x00012858 cmp ip, 0 |
0x0001285c add r3, pc, r3 | r3 = pc + r3;
0x00012860 ldr fp, [sp, 0x34] | fp = *(arg_34h);
0x00012864 ldr r6, [sp, 0x38] | r6 = *(arg_38h);
| if (ip != 0) {
0x00012868 beq 0x12920 |
0x0001286c ldr ip, [pc, 0xbc] | ip = "_d__s____UNSUBSCRIBE_msgid:__d___d_";
0x00012870 add ip, pc, ip |
0x00012874 ldr ip, [ip, 4] | ip = *((ip + 4));
0x00012878 cmp ip, r0 |
| if (ip > r0) {
0x0001287c bgt 0x12920 | goto label_0;
| }
0x00012880 mov r5, r0 | r5 = r0;
0x00012884 add r0, sl, 0x224 | r0 = sl + 0x224;
0x00012888 mov r8, r2 | r8 = r2;
0x0001288c mov sb, r1 | sb = r1;
0x00012890 str r3, [sp, 4] | var_4h = r3;
0x00012894 bl 0x3aa4 | fcn_00003aa4 ();
0x00012898 bl 0x11dcc | fcn_00011dcc ();
0x0001289c ldr r3, [sp, 4] | r3 = var_4h;
0x000128a0 ldr r2, [pc, 0x8c] | r2 = "_d__s____UNSUBSCRIBE_msgid:__d___d_";
0x000128a4 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x000128a8 mov r2, 8 | r2 = 8;
0x000128ac mov r1, r3 | r1 = r3;
0x000128b0 str r3, [sp, 4] | var_4h = r3;
0x000128b4 mov r4, r0 | r4 = r0;
0x000128b8 bl 0x3468 | memcpy (r0, r1, r2);
0x000128bc ldr r3, [sl, 0x14] | r3 = *((sl + 0x14));
0x000128c0 ldr r1, [sp] | r1 = *(sp);
0x000128c4 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x000128c8 str sb, [r4, 0xc] | *((r4 + 0xc)) = sb;
0x000128cc str r8, [r4, 0x10] | *((r4 + 0x10)) = r8;
0x000128d0 str r7, [r4, 0x14] | *((r4 + 0x14)) = r7;
0x000128d4 add r0, r4, 0x18 | r0 = r4 + 0x18;
0x000128d8 bl 0x3b94 | strcpy (r0, r1)
0x000128dc cmp r6, 0 |
| if (r6 == 0) {
0x000128e0 movne r3, 1 | r3 = 1;
| }
0x000128e4 str fp, [r4, 0x11c] | *((r4 + 0x11c)) = fp;
0x000128e8 mov r0, r5 | r0 = r5;
0x000128ec str r5, [r4, 0x128] | *((r4 + 0x128)) = r5;
| if (r6 != 0) {
0x000128f0 streq r6, [r4, 0x120] | *((r4 + 0x120)) = r6;
| }
0x000128f4 mov r1, r4 | r1 = r4;
| if (r6 == 0) {
0x000128f8 strne r3, [r4, 0x120] | *((r4 + 0x120)) = r3;
| }
| if (r6 == 0) {
0x000128fc ldrne r3, [r6] | r3 = *(r6);
| }
| if (r6 == 0) {
0x00012900 strne r3, [r4, 0x124] | *((r4 + 0x124)) = r3;
| }
0x00012904 bl 0x11fb0 | fcn_00011fb0 (r0, r1);
0x00012908 ldr r0, [pc, 0x28] |
0x0001290c add r0, pc, r0 | r0 = pc + r0;
0x00012910 add r0, r0, 0x224 | r0 = 0x12b58;
0x00012914 add sp, sp, 0xc |
0x00012918 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001291c b 0x39e4 | void (*0x39e4)() ();
| }
| label_0:
0x00012920 add sp, sp, 0xc |
0x00012924 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x1293c */
| #include <stdint.h>
|
; (fcn) fcn.0001293c () | void fcn_0001293c (int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x0001293c push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x00012940 ldr r6, [pc, 0x1d4] | r6 = *(0x12b18);
0x00012944 mov r8, r0 | r8 = r0;
0x00012948 ldr r0, [pc, 0x1d0] | r0 = "__socket__d";
0x0001294c mov r7, r1 | r7 = r1;
0x00012950 mov r4, r2 | r4 = r2;
0x00012954 mov r5, 0 | r5 = 0;
0x00012958 mov r2, 3 | r2 = 3;
0x0001295c mov r1, 0x38 | r1 = 0x38;
0x00012960 add r0, pc, r0 | r0 = pc + r0;
0x00012964 str r5, [sp, 4] | var_4h = r5;
0x00012968 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x0001296c cmp r7, 1 |
0x00012970 add r6, pc, r6 | r6 = pc + r6;
| if (r7 == 1) {
0x00012974 beq 0x12a84 | goto label_1;
| }
0x00012978 cmp r7, 2 |
| if (r7 == 2) {
0x0001297c beq 0x12a98 | goto label_2;
| }
0x00012980 cmp r7, r5 |
| if (r7 == r5) {
0x00012984 mvnne r3, 1 | r3 = ~1;
| }
| if (r7 != r5) {
0x00012988 bne 0x12a90 | goto label_3;
| }
0x0001298c ldr r0, [pc, 0x190] | r0 = *(0x12b20);
0x00012990 mov r2, 0x24 | r2 = 0x24;
0x00012994 mov r1, 0x40 | r1 = 0x40;
0x00012998 add r0, pc, r0 | r0 = pc + r0;
0x0001299c bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x000129a0 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x000129a4 beq 0x12a8c | goto label_4;
| }
0x000129a8 cmp r4, 0 |
| if (r4 != 0) {
0x000129ac ldreq r4, [pc, 0x174] | r4 = *(0x00012b28);
| }
| if (r4 != 0) {
0x000129b0 addeq r4, pc, r4 | r4 = pc + r4;
| }
0x000129b4 mov r0, r4 | r0 = r4;
0x000129b8 bl 0x35dc | strlen (r0);
0x000129bc ldr r7, [pc, 0x168] | r7 = *(0x12b28);
0x000129c0 mov r1, 0x45 | r1 = 0x45;
0x000129c4 add r7, pc, r7 | r7 = pc + r7;
0x000129c8 add r2, r0, 1 | r2 = r0 + 1;
0x000129cc mov r0, r7 | r0 = r7;
0x000129d0 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x000129d4 cmp r0, 0 |
0x000129d8 str r0, [r5] | *(r5) = r0;
| if (r0 == 0) {
0x000129dc bne 0x12a1c |
0x000129e0 mov r2, r5 | r2 = r5;
0x000129e4 mov r1, 0x47 | r1 = 0x47;
0x000129e8 mov r0, r7 | r0 = r7;
0x000129ec bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000129f0 mvn r3, 0x62 | r3 = ~0x62;
0x000129f4 str r3, [sp, 4] | var_4h = r3;
| label_0:
0x000129f8 ldr r0, [pc, 0x130] | r0 = *(0x12b2c);
0x000129fc mov r3, 3 | r3 = 3;
0x00012a00 add r2, sp, 4 | r2 += var_4h;
0x00012a04 mov r1, 0x68 | r1 = 0x68;
0x00012a08 add r0, pc, r0 | r0 = pc + r0;
0x00012a0c bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00012a10 ldr r0, [sp, 4] | r0 = var_4h;
0x00012a14 add sp, sp, 8 |
0x00012a18 pop {r4, r5, r6, r7, r8, pc} |
| }
0x00012a1c mov r1, r4 | r1 = r4;
0x00012a20 bl 0x3b94 | strcpy (r0, r1)
0x00012a24 ldr r3, [pc, 0x108] | r3 = *(0x12b30);
0x00012a28 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a2c str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00012a30 ldr r3, [pc, 0x100] | r3 = *(0x12b34);
0x00012a34 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a38 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x00012a3c ldr r3, [pc, 0xf8] | r3 = *(0x12b38);
0x00012a40 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a44 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x00012a48 ldr r3, [pc, 0xf0] | r3 = *(0x12b3c);
0x00012a4c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a50 str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x00012a54 ldr r3, [pc, 0xe8] | r3 = *(0x12b40);
0x00012a58 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a5c str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x00012a60 ldr r3, [pc, 0xe0] | r3 = *(0x12b44);
0x00012a64 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a68 str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x00012a6c ldr r3, [pc, 0xd8] | r3 = *(0x12b48);
0x00012a70 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a74 str r3, [r5, 0x1c] | *((r5 + 0x1c)) = r3;
0x00012a78 ldr r3, [pc, 0xd0] | r3 = *(0x12b4c);
0x00012a7c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012a80 str r3, [r5, 0x20] | *((r5 + 0x20)) = r3;
| do {
| label_1:
0x00012a84 mov r4, r5 | r4 = r5;
0x00012a88 b 0x12b14 | goto label_5;
| label_4:
0x00012a8c mvn r3, 0x62 | r3 = ~0x62;
| label_3:
0x00012a90 str r3, [sp, 4] | var_4h = r3;
0x00012a94 b 0x12a84 |
| } while (1);
| label_2:
0x00012a98 cmp r4, 0 |
| if (r4 != 0) {
0x00012a9c beq 0x12b0c |
0x00012aa0 ldr r3, [r4] | r3 = *(r4);
0x00012aa4 cmp r3, 0 |
| if (r3 == 0) {
0x00012aa8 beq 0x12b0c | goto label_6;
| }
0x00012aac ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00012ab0 cmp r3, 0 |
| if (r3 == 0) {
0x00012ab4 beq 0x12b0c | goto label_6;
| }
0x00012ab8 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00012abc cmp r3, 0 |
| if (r3 == 0) {
0x00012ac0 beq 0x12b0c | goto label_6;
| }
0x00012ac4 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00012ac8 cmp r3, 0 |
| if (r3 == 0) {
0x00012acc beq 0x12b0c | goto label_6;
| }
0x00012ad0 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00012ad4 cmp r3, 0 |
| if (r3 == 0) {
0x00012ad8 beq 0x12b0c | goto label_6;
| }
0x00012adc ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00012ae0 cmp r3, 0 |
| if (r3 == 0) {
0x00012ae4 beq 0x12b0c | goto label_6;
| }
0x00012ae8 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00012aec cmp r3, 0 |
| if (r3 == 0) {
0x00012af0 beq 0x12b0c | goto label_6;
| }
0x00012af4 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00012af8 cmp r3, 0 |
| if (r3 == 0) {
0x00012afc beq 0x12b0c | goto label_6;
| }
0x00012b00 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00012b04 cmp r3, 0 |
| if (r3 != 0) {
0x00012b08 bne 0x12b14 | goto label_5;
| }
| }
| label_6:
0x00012b0c mvn r3, 1 | r3 = ~1;
0x00012b10 str r3, [sp, 4] | var_4h = r3;
| label_5:
0x00012b14 str r4, [r8] | *(r8) = r4;
0x00012b18 b 0x129f8 | goto label_0;
| }
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x140bc */
| #include <stdint.h>
|
; (fcn) fcn.000140bc () | void fcn_000140bc (int32_t arg_16ch, int32_t arg_190h, int32_t arg1) {
| int32_t var_bp_0h;
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_30h;
| char * src;
| int32_t var_38h;
| int32_t var_3ch;
| r0 = arg1;
0x000140bc push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000140c0 mov r5, r0 | r5 = r0;
0x000140c4 ldr r0, [pc, 0x4f0] |
0x000140c8 mov r3, 0 | r3 = 0;
0x000140cc add r0, pc, r0 | r0 = pc + r0;
0x000140d0 add r0, r0, 0x148 | r0 = 0x14700;
0x000140d4 sub sp, sp, 0x3c |
0x000140d8 mov r2, 3 | r2 = 3;
0x000140dc mov r1, 0x360 | r1 = 0x360;
0x000140e0 add r0, r0, 2 | r0 += 2;
0x000140e4 str r3, [sp, 0x20] | var_20h = r3;
0x000140e8 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x000140ec ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x000140f0 cmp r3, 0 |
0x000140f4 bne 0x14148 |
| while (r0 != 0) {
0x000140f8 mov r7, 0 | r7 = 0;
| label_1:
0x000140fc ldr r3, [r5] | r3 = *(r5);
0x00014100 ldr r2, [pc, 0x4b8] | r2 = *(0x145bc);
0x00014104 str r3, [sp] | *(sp) = r3;
0x00014108 add r2, pc, r2 | r2 = pc + r2;
0x0001410c mov r3, r7 | r3 = r7;
0x00014110 mvn r1, 0 | r1 = ~0;
0x00014114 mov r0, 3 | r0 = 3;
0x00014118 bl 0x12720 | fcn_00012720 (r0, r1);
0x0001411c ldr r0, [pc, 0x4a0] |
0x00014120 mov r3, 3 | r3 = 3;
0x00014124 add r0, pc, r0 | r0 = pc + r0;
0x00014128 add r0, r0, 0x148 | r0 = 0x14708;
0x0001412c add r2, sp, 0x20 | r2 += var_20h;
0x00014130 mov r1, 0x388 | r1 = 0x388;
0x00014134 add r0, r0, 2 | r0 += 2;
0x00014138 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x0001413c ldr r0, [sp, 0x20] | r0 = var_20h;
0x00014140 add sp, sp, 0x3c |
0x00014144 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00014148 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x0001414c add r2, sp, 0x28 | r2 += var_28h;
0x00014150 add r1, sp, 0x24 | r1 += var_24h;
0x00014154 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00014158 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0001415c cmp r0, 0 |
0x00014160 mov r7, r0 | r7 = r0;
0x00014164 str r0, [sp, 0x20] | var_20h = r0;
0x00014168 bne 0x140f8 |
| }
0x0001416c ldr r3, [pc, 0x454] |
0x00014170 mov r8, r0 | r8 = r0;
0x00014174 add r3, pc, r3 | r3 = pc + r3;
0x00014178 add r3, r3, 0x16c | r3 = 0x14730;
0x0001417c add r3, r3, 2 | r3 += 2;
0x00014180 str r3, [sp, 0xc] | var_ch = r3;
0x00014184 b 0x143a4 | goto label_4;
| label_0:
0x00014188 str r3, [sp, 0x2c] | var_2ch = r3;
0x0001418c ldr r1, [pc, 0x438] | r1 = *(0x145c8);
0x00014190 ldr r4, [r2, r8, lsl 2] | offset_0 = r8 << 2;
| r4 = *((r2 + offset_0));
0x00014194 add r1, pc, r1 | r1 = pc + r1;
0x00014198 mov r2, 2 | r2 = 2;
0x0001419c mov r0, r4 | r0 = r4;
0x000141a0 bl 0x357c | strncmp (r0, r1, r2);
0x000141a4 lsl sb, r8, 2 | sb = r8 << 2;
0x000141a8 cmp r0, 0 |
| if (r0 != 0) {
0x000141ac beq 0x141cc |
0x000141b0 ldr r1, [pc, 0x418] | r1 = *(0x145cc);
0x000141b4 mov r2, 3 | r2 = 3;
0x000141b8 add r1, pc, r1 | r1 = pc + r1;
0x000141bc mov r0, r4 | r0 = r4;
0x000141c0 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x000141c4 cmp r0, 0 |
| if (r0 != 0) {
0x000141c8 bne 0x14380 | goto label_5;
| }
| }
0x000141cc ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x000141d0 add sl, sp, 0x30 | sl += var_30h;
0x000141d4 add r6, sp, 0x2c | r6 += var_2ch;
0x000141d8 ldr fp, [r3, 0x10] | fp = *((r3 + 0x10));
0x000141dc mov r2, r6 | r2 = r6;
0x000141e0 mov r3, sl | r3 = sl;
0x000141e4 mov r1, r4 | r1 = r4;
0x000141e8 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x000141ec blx fp | r0 = fp (r0, r1, r2, r3);
0x000141f0 cmp r0, 0 |
0x000141f4 str r0, [sp, 0x20] | var_20h = r0;
| if (r0 != 0) {
0x000141f8 bne 0x14380 | goto label_5;
| }
0x000141fc ldr r3, [r5, 0x8c] | r3 = *((r5 + 0x8c));
0x00014200 cmp r3, 0 |
0x00014204 bne 0x14364 |
| while (r0 == 0) {
0x00014208 ldr r3, [sp, 0x24] | r3 = var_24h;
0x0001420c ldr r1, [pc, 0x3c0] | r1 = *(0x145d0);
0x00014210 ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x00014214 mov r2, 3 | r2 = 3;
0x00014218 add r1, pc, r1 | r1 = pc + r1;
0x0001421c bl 0x357c | strncmp (r0, r1, r2);
0x00014220 ldr r6, [pc, 0x3b0] | r6 = *(0x145d4);
0x00014224 mov r2, 3 | r2 = 3;
0x00014228 ldr r1, [pc, 0x3ac] | r1 = *(0x145d8);
0x0001422c add r6, pc, r6 | r6 = pc + r6;
0x00014230 cmp r0, 0 |
| if (r0 != 0) {
0x00014234 moveq r3, 5 | r3 = 5;
| }
| if (r0 == 0) {
0x00014238 movne r3, 4 | r3 = 4;
| }
0x0001423c str r3, [sp, 0x14] | var_14h = r3;
0x00014240 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00014244 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00014248 str r3, [sp, 0x10] | var_10h = r3;
0x0001424c ldr r3, [sp, 0x30] | r3 = var_30h;
0x00014250 str r3, [sp, 0x18] | var_18h = r3;
0x00014254 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00014258 str r3, [sp, 0x34] | src = r3;
0x0001425c bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00014260 mov r2, 0x10 | r2 = 0x10;
0x00014264 ldr r1, [pc, 0x374] | r1 = *(0x145dc);
0x00014268 mov r0, r6 | r0 = r6;
0x0001426c bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00014270 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00014274 bne 0x143dc | goto label_6;
| }
| label_2:
0x00014278 ldr fp, [pc, 0x364] | fp = *(0x145e0);
0x0001427c mov r3, 3 | r3 = 3;
0x00014280 add fp, pc, fp |
0x00014284 add r0, fp, 0x16c | r0 += arg_16ch;
0x00014288 mov r2, 0 | r2 = 0;
0x0001428c ldr r1, [pc, 0x354] | r1 = *(0x145e4);
0x00014290 add r0, r0, 2 | r0 += 2;
0x00014294 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00014298 cmp r4, 0 |
| if (r4 == 0) {
0x0001429c beq 0x14380 | goto label_5;
| }
0x000142a0 ldr r3, [sp, 0x24] | r3 = var_24h;
0x000142a4 mov r1, 0x2d | r1 = 0x2d;
0x000142a8 ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x000142ac bl 0x3ae0 | strchr (r0, r1);
0x000142b0 mov r6, 0 | r6 = 0;
0x000142b4 add sl, sp, 0x38 | sl += var_38h;
0x000142b8 add r0, r0, 1 | r0++;
0x000142bc bl 0x3ac8 | atoi (r0);
0x000142c0 ldr r3, [r5, 0x78] | r3 = *((r5 + 0x78));
0x000142c4 mov r2, 3 | r2 = 3;
0x000142c8 mov r1, 0x348 | r1 = 0x348;
0x000142cc str r3, [sp, 0x10] | var_10h = r3;
0x000142d0 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
0x000142d4 add r0, fp, 0x190 | r0 += arg_190h;
0x000142d8 str r6, [sl, -4]! | *((sl -= 4)) = r6;
0x000142dc bl 0x1a490 | fcn_0001a490 (r0, r1);
| label_3:
0x000142e0 mov r1, sl | r1 = sl;
0x000142e4 ldr r0, [sp, 0x10] | r0 = var_10h;
0x000142e8 bl 0x174c8 | fcn_000174c8 (r0, r1);
0x000142ec clz fp, r6 |
0x000142f0 lsr fp, fp, 5 |
0x000142f4 cmp r0, 0 |
| if (r0 != 0) {
0x000142f8 moveq fp, 0 |
| }
0x000142fc cmp fp, 0 |
| if (fp != 0) {
0x00014300 bne 0x145a0 | goto label_7;
| }
0x00014304 mov r3, r6 | r3 = r6;
0x00014308 mov r2, 0x10 | r2 = 0x10;
0x0001430c mov r1, r4 | r1 = r4;
0x00014310 ldr r0, [sp, 0x10] | r0 = var_10h;
0x00014314 bl 0x17210 | fcn_00017210 (r0, r1);
0x00014318 ldr r0, [pc, 0x2cc] |
0x0001431c mov r3, 3 | r3 = 3;
0x00014320 add r0, pc, r0 | r0 = pc + r0;
0x00014324 mov r2, fp | r2 = fp;
0x00014328 ldr r1, [pc, 0x2c0] | r1 = *(0x145ec);
0x0001432c add r0, r0, 0x190 | r0 = 0x14778;
0x00014330 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00014334 ldr r0, [pc, 0x2b8] | r0 = *(0x145f0);
0x00014338 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x0001433c ldr r1, [pc, 0x2b4] | r1 = *(0x145f4);
0x00014340 add r0, pc, r0 | r0 = pc + r0;
0x00014344 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00014348 ldr r2, [r5, 0x7c] | r2 = *((r5 + 0x7c));
0x0001434c ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00014350 add r7, r7, 1 | r7++;
0x00014354 cmp r2, r3 |
| if (r2 < r3) {
0x00014358 strhs r2, [r5, 0x7c] | *((r5 + 0x7c)) = r2;
| }
| if (r2 >= r3) {
0x0001435c strlo r3, [r5, 0x7c] | *((r5 + 0x7c)) = r3;
| }
0x00014360 b 0x14380 | goto label_5;
0x00014364 mov r2, sl | r2 = sl;
0x00014368 mov r1, r6 | r1 = r6;
0x0001436c ldr r0, [r5, 0x94] | r0 = *((r5 + 0x94));
0x00014370 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00014374 cmp r0, 0 |
0x00014378 str r0, [sp, 0x20] | var_20h = r0;
0x0001437c beq 0x14208 |
| }
| label_5:
0x00014380 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00014384 ldr r2, [r3, sb] | r2 = *((r3 + sb));
0x00014388 cmp r2, 0 |
| if (r2 != 0) {
0x0001438c beq 0x143a0 |
0x00014390 ldr r0, [pc, 0x264] | r0 = *(0x145f8);
0x00014394 mov r1, 0x380 | r1 = 0x380;
0x00014398 add r0, pc, r0 | r0 = pc + r0;
0x0001439c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| }
0x000143a0 add r8, r8, 1 | r8++;
| label_4:
0x000143a4 ldr r3, [sp, 0x20] | r3 = var_20h;
0x000143a8 ldr r2, [sp, 0x24] | r2 = var_24h;
0x000143ac cmp r3, 0 |
| if (r3 != 0) {
0x000143b0 bne 0x143c0 | goto label_8;
| }
0x000143b4 ldr r1, [sp, 0x28] | r1 = var_28h;
0x000143b8 cmp r1, r8 |
| if (r1 > r8) {
0x000143bc bgt 0x14188 | goto label_0;
| }
| label_8:
0x000143c0 cmp r2, 0 |
| if (r2 == 0) {
0x000143c4 beq 0x140fc | goto label_1;
| }
0x000143c8 ldr r0, [pc, 0x230] | r0 = *(0x145fc);
0x000143cc ldr r1, [pc, 0x230] | r1 = *(0x14600);
0x000143d0 add r0, pc, r0 | r0 = pc + r0;
0x000143d4 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000143d8 b 0x140fc | goto label_1;
| label_6:
0x000143dc mov r2, 0x10 | r2 = 0x10;
0x000143e0 mov r1, 0 | r1 = 0;
0x000143e4 bl 0x384c | memset (r0, r1, r2);
0x000143e8 mov r2, 0x30 | r2 = 0x30;
0x000143ec ldr r1, [pc, 0x214] | r1 = *(0x14604);
0x000143f0 mov r0, r6 | r0 = r6;
0x000143f4 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x000143f8 cmp r0, 0 |
0x000143fc mov sl, r0 | sl = r0;
0x00014400 str r0, [r4] | *(r4) = r0;
| if (r0 == 0) {
0x00014404 bne 0x14420 |
0x00014408 mov r2, r4 | r2 = r4;
0x0001440c mov r1, 0x308 | r1 = 0x308;
0x00014410 mov r0, r6 | r0 = r6;
0x00014414 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00014418 mov r4, sl | r4 = sl;
0x0001441c b 0x14278 | goto label_2;
| }
0x00014420 mov r2, 0x30 | r2 = 0x30;
0x00014424 mov r1, 0 | r1 = 0;
0x00014428 bl 0x384c | memset (r0, r1, r2);
0x0001442c ldr r3, [r4] | r3 = *(r4);
0x00014430 mov r2, 1 | r2 = 1;
0x00014434 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x00014438 ldr r2, [sp, 0x34] | r2 = src;
0x0001443c mov r1, 0x314 | r1 = 0x314;
0x00014440 ldr sl, [r2], 4 | sl = *(r2);
| r2 += 4;
0x00014444 mov r0, r6 | r0 = r6;
0x00014448 str sl, [r3, 8] | *((r3 + 8)) = sl;
0x0001444c str r2, [sp, 0x34] | src = r2;
0x00014450 mov r2, sl | r2 = sl;
0x00014454 str r3, [sp, 0x1c] | var_1ch = r3;
0x00014458 bl 0x1ab60 | fcn_0001ab60 (r0, r1);
0x0001445c ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00014460 cmp r0, 0 |
0x00014464 mov fp, r0 |
0x00014468 str r0, [r3, 0xc] | *((r3 + 0xc)) = r0;
| if (r0 != 0) {
0x0001446c bne 0x14498 | goto label_9;
| }
0x00014470 ldr r2, [r4] | r2 = *(r4);
0x00014474 ldr r1, [pc, 0x190] | r1 = *(0x14608);
0x00014478 mov r0, r6 | r0 = r6;
0x0001447c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00014480 ldr r1, [pc, 0x188] | r1 = *(0x1460c);
0x00014484 mov r2, r4 | r2 = r4;
| do {
0x00014488 mov r0, r6 | r0 = r6;
0x0001448c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00014490 mov r4, fp | r4 = fp;
0x00014494 b 0x14278 | goto label_2;
| label_9:
0x00014498 ldr r3, [r4] | r3 = *(r4);
0x0001449c mov r2, sl | r2 = sl;
0x000144a0 ldr r1, [sp, 0x34] | r1 = src;
0x000144a4 ldr r0, [r3, 0xc] | r0 = *((r3 + 0xc));
0x000144a8 bl 0x3468 | memcpy (r0, r1, r2);
0x000144ac ldr r2, [sp, 0x34] | r2 = src;
0x000144b0 ldr r3, [r4] | r3 = *(r4);
0x000144b4 add r0, r2, sl | r0 = r2 + sl;
0x000144b8 ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x000144bc add r0, r0, 0x10 | r0 += 0x10;
0x000144c0 str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x000144c4 ldr r2, [r0, -0xc] | r2 = *((r0 - 0xc));
0x000144c8 str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x000144cc ldr r2, [r0, -8] | r2 = *((r0 - 8));
0x000144d0 str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x000144d4 ldr r2, [r0, -4] | r2 = *((r0 - 4));
0x000144d8 str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x000144dc str r0, [sp, 0x34] | src = r0;
0x000144e0 bl 0x35dc | strlen (r0);
0x000144e4 ldr r1, [pc, 0x128] | r1 = *(0x14610);
0x000144e8 add sl, r0, 1 | sl = r0 + 1;
0x000144ec mov r2, sl | r2 = sl;
0x000144f0 mov r0, r6 | r0 = r6;
0x000144f4 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x000144f8 cmp r0, 0 |
0x000144fc mov fp, r0 |
0x00014500 str r0, [r4, 4] | *((r4 + 4)) = r0;
| if (r0 != 0) {
0x00014504 bne 0x14538 | goto label_10;
| }
0x00014508 ldr r3, [r4] | r3 = *(r4);
0x0001450c ldr r1, [pc, 0x104] | r1 = *(0x14614);
0x00014510 ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x00014514 mov r0, r6 | r0 = r6;
0x00014518 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x0001451c ldr r2, [r4] | r2 = *(r4);
0x00014520 ldr r1, [pc, 0xf4] | r1 = *(0x14618);
0x00014524 mov r0, r6 | r0 = r6;
0x00014528 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x0001452c mov r2, r4 | r2 = r4;
0x00014530 ldr r1, [pc, 0xe8] | r1 = *(0x1461c);
0x00014534 b 0x14488 |
| } while (1);
| label_10:
0x00014538 ldr r1, [sp, 0x34] | r1 = src;
0x0001453c bl 0x3b94 | strcpy (r0, r1)
0x00014540 ldr r2, [sp, 0x34] | r2 = src;
0x00014544 add r3, r2, sl | r3 = r2 + sl;
0x00014548 ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x0001454c add r3, r3, 4 | r3 += 4;
0x00014550 str r2, [r4, 8] | *((r4 + 8)) = r2;
0x00014554 str r3, [sp, 0x34] | src = r3;
0x00014558 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001455c cmp r3, 5 |
| if (r3 != 5) {
0x00014560 bne 0x14278 | goto label_2;
| }
0x00014564 ldr r0, [r4] | r0 = *(r4);
0x00014568 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001456c ldr r2, [sp, 0x18] | r2 = var_18h;
0x00014570 add r1, sp, 0x34 | r1 += src;
0x00014574 add r2, r3, r2 | r2 = r3 + r2;
0x00014578 add r0, r0, 0x20 | r0 += 0x20;
0x0001457c bl 0x17d28 | r0 = fcn_00017d28 (r0, r1);
0x00014580 cmp r0, 1 |
| if (r0 == 1) {
0x00014584 beq 0x14278 | goto label_2;
| }
0x00014588 ldr r2, [pc, 0x94] | r2 = *(0x14620);
0x0001458c mvn r1, 0 | r1 = ~0;
0x00014590 add r2, pc, r2 | r2 = pc + r2;
0x00014594 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00014598 bl 0x12720 | fcn_00012720 (r0, r1);
0x0001459c b 0x14278 | goto label_2;
| label_7:
0x000145a0 ldr r6, [sp, 0x34] | r6 = src;
0x000145a4 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x000145a8 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x000145ac ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x000145b0 cmp r2, r3 |
| if (r2 < r3) {
0x000145b4 movhs r6, 0 | r6 = 0;
| }
0x000145b8 b 0x142e0 | goto label_3;
| }
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x15f44 */
| #include <stdint.h>
|
; (fcn) fcn.00015f44 () | void fcn_00015f44 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_20h;
| int32_t var_7ch;
| r0 = arg1;
| r1 = arg2;
0x00015f44 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00015f48 mov r7, r0 | r7 = r0;
0x00015f4c ldr r0, [pc, 0x19c] |
0x00015f50 sub sp, sp, 0x7c |
0x00015f54 add r0, pc, r0 | r0 = pc + r0;
0x00015f58 mvn r3, 1 | r3 = ~1;
0x00015f5c mov r2, 3 | r2 = 3;
0x00015f60 add r0, r0, 0x32 | r0 = 0x1611e;
0x00015f64 mov sl, r1 | sl = r1;
0x00015f68 mov r1, 0x1ec | r1 = 0x1ec;
0x00015f6c str r3, [sp, 0xc] | var_ch = r3;
0x00015f70 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00015f74 mov r0, r7 | r0 = r7;
0x00015f78 bl 0x35f4 | r0 = opendir ();
0x00015f7c subs sb, r0, 0 | sb = r0 - 0;
| if (sb == r0) {
0x00015f80 beq 0x15ff8 | goto label_3;
| }
0x00015f84 ldr r6, [pc, 0x168] | r6 = *(0x160f0);
0x00015f88 add r6, pc, r6 | r6 = pc + r6;
| label_2:
0x00015f8c ldr fp, [pc, 0x164] | fp = *(0x000160f8);
0x00015f90 add fp, pc, fp |
| label_0:
0x00015f94 mov r0, sb | r0 = sb;
0x00015f98 bl 0x3b70 | r0 = readdir64 ();
0x00015f9c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00015fa0 beq 0x15ff0 | goto label_4;
| }
0x00015fa4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00015fa8 cmp r3, 0 |
| if (r3 == 0) {
0x00015fac beq 0x15ff0 | goto label_4;
| }
0x00015fb0 mov r0, r7 | r0 = r7;
0x00015fb4 bl 0x35dc | strlen (r0);
0x00015fb8 add r5, r5, 0x13 | r5 += 0x13;
0x00015fbc mov r4, r0 | r4 = r0;
0x00015fc0 mov r0, r5 | r0 = r5;
0x00015fc4 bl 0x35dc | strlen (r0);
0x00015fc8 ldr r1, [pc, 0x12c] | r1 = *(0x160f8);
0x00015fcc add r4, r4, r0 | r4 += r0;
0x00015fd0 add r4, r4, 2 | r4 += 2;
0x00015fd4 mov r2, r4 | r2 = r4;
0x00015fd8 mov r0, r6 | r0 = r6;
0x00015fdc bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00015fe0 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00015fe4 bne 0x16020 | goto label_5;
| }
| label_1:
0x00015fe8 mvn r3, 0x62 | r3 = ~0x62;
| do {
0x00015fec str r3, [sp, 0xc] | var_ch = r3;
| label_4:
0x00015ff0 mov r0, sb | r0 = sb;
0x00015ff4 bl 0x3750 | closedir ();
| label_3:
0x00015ff8 ldr r0, [pc, 0x100] |
0x00015ffc mov r3, 3 | r3 = 3;
0x00016000 add r0, pc, r0 | r0 = pc + r0;
0x00016004 add r2, sp, 0xc | r2 += var_ch;
0x00016008 ldr r1, [pc, 0xf4] | r1 = *(0x16100);
0x0001600c add r0, r0, 0x32 | r0 = 0x1612e;
0x00016010 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00016014 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00016018 add sp, sp, 0x7c |
0x0001601c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00016020 str r5, [sp] | *(sp) = r5;
0x00016024 mov r3, r7 | r3 = r7;
0x00016028 mov r2, fp | r2 = fp;
0x0001602c mov r1, r4 | r1 = r4;
0x00016030 bl 0x360c | r0 = snprintf (r0, r1, r2, r3);
0x00016034 cmp r0, r4 |
| if (r0 <= r4) {
0x00016038 blo 0x16054 | goto label_6;
| }
0x0001603c mov r2, r8 | r2 = r8;
0x00016040 ldr r1, [pc, 0xc0] | r1 = *(0x16104);
0x00016044 mov r0, r6 | r0 = r6;
0x00016048 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x0001604c mvn r3, 1 | r3 = ~1;
0x00016050 b 0x15fec |
| } while (1);
| label_6:
0x00016054 add r1, sp, 0x10 | r1 += var_10h;
0x00016058 mov r0, r8 | r0 = r8;
0x0001605c bl 0x36cc | lstat64 ();
0x00016060 mov r2, r8 | r2 = r8;
0x00016064 mov r1, 0x200 | r1 = 0x200;
0x00016068 mov r0, r6 | r0 = r6;
0x0001606c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00016070 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00016074 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00016078 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x0001607c bne 0x15f94 | goto label_0;
| }
0x00016080 mov r0, r5 | r0 = r5;
0x00016084 bl 0x35dc | strlen (r0);
0x00016088 ldr r1, [pc, 0x7c] | r1 = *(0x16108);
0x0001608c add r2, r0, 1 | r2 = r0 + 1;
0x00016090 mov r0, r6 | r0 = r6;
0x00016094 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00016098 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x0001609c beq 0x15fe8 | goto label_1;
| }
0x000160a0 mov r1, r5 | r1 = r5;
0x000160a4 bl 0x3b94 | strcpy (r0, r1)
0x000160a8 ldr r1, [pc, 0x60] | r1 = *(0x1610c);
0x000160ac mov r0, r4 | r0 = r4;
0x000160b0 add r1, pc, r1 | r1 = pc + r1;
0x000160b4 bl 0x3a50 | strstr (r0, r1);
0x000160b8 mov r1, sl | r1 = sl;
0x000160bc cmp r0, 0 |
| if (r0 == 0) {
0x000160c0 movne r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x000160c4 strbne r3, [r0] | *(r0) = r3;
| }
0x000160c8 mov r0, r4 | r0 = r4;
0x000160cc bl 0x3a5c | strcmp (r0, r1);
0x000160d0 mov r2, r4 | r2 = r4;
0x000160d4 ldr r1, [pc, 0x38] | r1 = *(0x16110);
0x000160d8 cmp r0, 0 |
| if (r0 != 0) {
0x000160dc streq r0, [sp, 0xc] | var_ch = r0;
| }
0x000160e0 ldr r0, [pc, 0x30] | r0 = *(0x16114);
0x000160e4 add r0, pc, r0 | r0 = pc + r0;
0x000160e8 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000160ec b 0x15f8c | goto label_2;
| }
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x16308 */
| #include <stdint.h>
|
; (fcn) fcn.00016308 () | void fcn_00016308 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_30h;
| int32_t var_8ch;
| r0 = arg1;
| r1 = arg2;
0x00016308 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001630c mov sl, r0 | sl = r0;
0x00016310 ldr r0, [pc, 0x314] |
0x00016314 sub sp, sp, 0x8c |
0x00016318 add r0, pc, r0 | r0 = pc + r0;
0x0001631c str r1, [sp, 0xc] | var_ch = r1;
0x00016320 str r2, [sp, 0x10] | var_10h = r2;
0x00016324 ldr r1, [pc, 0x304] | r1 = *(0x1662c);
0x00016328 mov r2, 3 | r2 = 3;
0x0001632c add r0, r0, 0x64 | r0 = 0x1668c;
0x00016330 mov r4, 0 | r4 = 0;
0x00016334 str r4, [sp, 0x1c] | var_1ch = r4;
0x00016338 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x0001633c mov r0, sl | r0 = sl;
0x00016340 bl 0x35f4 | r0 = opendir ();
0x00016344 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00016348 bne 0x16488 | goto label_10;
| }
| label_4:
0x0001634c mvn r3, 1 | r3 = ~1;
| label_2:
0x00016350 str r3, [sp, 0x1c] | var_1ch = r3;
| do {
| label_8:
0x00016354 ldr r0, [pc, 0x2d8] |
0x00016358 mov r3, 3 | r3 = 3;
0x0001635c add r0, pc, r0 | r0 = pc + r0;
0x00016360 add r2, sp, 0x1c | r2 += var_1ch;
0x00016364 mov r1, 0x370 | r1 = 0x370;
0x00016368 add r0, r0, 0x64 | r0 = 0x16694;
0x0001636c bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00016370 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00016374 add sp, sp, 0x8c |
0x00016378 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0001637c mov r0, sl | r0 = sl;
0x00016380 bl 0x35dc | strlen (r0);
0x00016384 add r3, r7, 0x13 | r3 = r7 + 0x13;
0x00016388 str r3, [sp, 8] | var_8h = r3;
0x0001638c mov r6, r0 | r6 = r0;
0x00016390 mov r0, r3 | r0 = r3;
0x00016394 bl 0x35dc | strlen (r0);
0x00016398 mov r1, sb | r1 = sb;
0x0001639c add r6, r6, r0 | r6 += r0;
0x000163a0 add r6, r6, 2 | r6 += 2;
0x000163a4 mov r2, r6 | r2 = r6;
0x000163a8 mov r0, r8 | r0 = r8;
0x000163ac bl 0x1ab60 | fcn_0001ab60 (r0, r1);
0x000163b0 ldr r3, [sp, 8] | r3 = var_8h;
0x000163b4 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x000163b8 bne 0x163d0 | goto label_11;
| }
| label_5:
0x000163bc mvn r3, 0x62 | r3 = ~0x62;
| label_0:
0x000163c0 str r3, [sp, 0x1c] | var_1ch = r3;
| label_9:
0x000163c4 mov r0, r5 | r0 = r5;
0x000163c8 bl 0x3750 | closedir ();
0x000163cc b 0x16354 |
| } while (1);
| label_11:
0x000163d0 str r3, [sp] | *(sp) = r3;
0x000163d4 mov r2, fp | r2 = fp;
0x000163d8 mov r3, sl | r3 = sl;
0x000163dc mov r1, r6 | r1 = r6;
0x000163e0 bl 0x360c | r0 = snprintf (r0, r1, r2, r3);
0x000163e4 cmp r0, r6 |
| if (r0 > r6) {
0x000163e8 blo 0x16404 |
0x000163ec ldr r1, [pc, 0x244] | r1 = "G";
0x000163f0 mov r2, r7 | r2 = r7;
0x000163f4 mov r0, r8 | r0 = r8;
| label_6:
0x000163f8 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000163fc mvn r3, 1 | r3 = ~1;
0x00016400 b 0x163c0 | goto label_0;
| }
0x00016404 add r1, sp, 0x20 | r1 += var_20h;
0x00016408 mov r0, r7 | r0 = r7;
0x0001640c bl 0x36cc | r0 = lstat64 ();
0x00016410 cmp r0, 0 |
| if (r0 == 0) {
0x00016414 bne 0x16428 |
0x00016418 ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001641c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00016420 cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x00016424 addeq r4, r4, 1 | r4++;
| goto label_12;
| }
| }
| label_12:
0x00016428 ldr r0, [pc, 0x20c] | r0 = *(0x16638);
0x0001642c mov r2, r7 | r2 = r7;
0x00016430 ldr r1, [pc, 0x208] | r1 = *(0x1663c);
0x00016434 add r0, pc, r0 | r0 = pc + r0;
0x00016438 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| label_3:
0x0001643c mov r0, r5 | r0 = r5;
0x00016440 bl 0x3b70 | r0 = readdir64 ();
0x00016444 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00016448 bne 0x1637c | goto label_1;
| }
0x0001644c mov r0, r5 | r0 = r5;
0x00016450 bl 0x3750 | closedir ();
0x00016454 cmp r4, 0 |
| if (r4 != 0) {
0x00016458 moveq r5, r4 | r5 = r4;
| }
| if (r4 != 0) {
0x0001645c moveq r6, r4 | r6 = r4;
| }
| if (r4 == 0) {
0x00016460 beq 0x16610 | goto label_13;
| }
0x00016464 ldr r0, [pc, 0x1d8] | r0 = *(0x16640);
0x00016468 lsl r2, r4, 2 | r2 = r4 << 2;
0x0001646c ldr r1, [pc, 0x1d4] | r1 = *(0x16644);
0x00016470 add r0, pc, r0 | r0 = pc + r0;
0x00016474 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00016478 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0001647c bne 0x164a0 |
0x00016480 mvn r3, 0x62 | r3 = ~0x62;
0x00016484 b 0x16350 | goto label_2;
| label_10:
0x00016488 ldr r8, [pc, 0x1bc] | r8 = *(0x16648);
0x0001648c ldr fp, [pc, 0x1bc] | fp = *(0x00016650);
0x00016490 add r8, pc, r8 | r8 = pc + r8;
0x00016494 ldr sb, [pc, 0x1b8] | sb = *(0x00016654);
0x00016498 add fp, pc, fp |
0x0001649c b 0x1643c | goto label_3;
| }
0x000164a0 mov r0, sl | r0 = sl;
0x000164a4 bl 0x35f4 | r0 = opendir ();
0x000164a8 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x000164ac beq 0x1634c | goto label_4;
| }
0x000164b0 ldr r3, [pc, 0x1a0] | r3 = *(0x16654);
0x000164b4 str r7, [sp, 8] | var_8h = r7;
0x000164b8 ldr r7, [pc, 0x19c] | r7 = *(0x16658);
0x000164bc add r3, pc, r3 | r3 = pc + r3;
0x000164c0 add r7, pc, r7 | r7 = pc + r7;
0x000164c4 str r3, [sp, 0x14] | var_14h = r3;
0x000164c8 b 0x16600 | goto label_14;
| label_7:
0x000164cc mov r0, sl | r0 = sl;
0x000164d0 bl 0x35dc | strlen (r0);
0x000164d4 add sb, sb, 0x13 | sb += 0x13;
0x000164d8 mov r8, r0 | r8 = r0;
0x000164dc mov r0, sb | r0 = sb;
0x000164e0 bl 0x35dc | strlen (r0);
0x000164e4 ldr r1, [pc, 0x174] | r1 = *(0x1665c);
0x000164e8 add r8, r8, r0 | r8 += r0;
0x000164ec add r8, r8, 2 | r8 += 2;
0x000164f0 mov r2, r8 | r2 = r8;
0x000164f4 mov r0, r7 | r0 = r7;
0x000164f8 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x000164fc subs fp, r0, 0 |
| if (fp != r0) {
0x00016500 bne 0x16518 | goto label_15;
| }
0x00016504 ldr r1, [pc, 0x158] | r1 = *(0x16660);
0x00016508 mov r2, r6 | r2 = r6;
| do {
0x0001650c mov r0, r7 | r0 = r7;
0x00016510 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00016514 b 0x163bc | goto label_5;
| label_15:
0x00016518 str sb, [sp] | *(sp) = sb;
0x0001651c mov r3, sl | r3 = sl;
0x00016520 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00016524 mov r1, r8 | r1 = r8;
0x00016528 bl 0x360c | r0 = snprintf (r0, r1, r2, r3);
0x0001652c cmp r0, r8 |
| if (r0 > r8) {
0x00016530 blo 0x16554 |
0x00016534 mov r2, fp | r2 = fp;
0x00016538 mov r1, 0x34c | r1 = 0x34c;
0x0001653c mov r0, r7 | r0 = r7;
0x00016540 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00016544 mov r2, r6 | r2 = r6;
0x00016548 ldr r1, [pc, 0x118] | r1 = *(0x16664);
0x0001654c mov r0, r7 | r0 = r7;
0x00016550 b 0x163f8 | goto label_6;
| }
0x00016554 add r1, sp, 0x20 | r1 += var_20h;
0x00016558 mov r0, fp | r0 = fp;
0x0001655c bl 0x36cc | r0 = lstat64 ();
0x00016560 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00016564 bne 0x165ec | goto label_16;
| }
0x00016568 ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001656c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00016570 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00016574 bne 0x165ec | goto label_16;
| }
0x00016578 mov r0, sb | r0 = sb;
0x0001657c bl 0x35dc | strlen (r0);
0x00016580 ldr r1, [pc, 0xe4] | r1 = *(0x16668);
0x00016584 add r2, r0, 1 | r2 = r0 + 1;
0x00016588 mov r0, r7 | r0 = r7;
0x0001658c bl 0x1ab60 | fcn_0001ab60 (r0, r1);
0x00016590 ldr r2, [sp, 8] | r2 = var_8h;
0x00016594 cmp r0, 0 |
0x00016598 str r0, [r6, r2, lsl 2] | offset_0 = r2 << 2;
| *((r6 + offset_0)) = r0;
| if (r0 != 0) {
0x0001659c bne 0x165bc | goto label_17;
| }
0x000165a0 mov r2, fp | r2 = fp;
0x000165a4 ldr r1, [pc, 0xc4] | r1 = *(0x1666c);
0x000165a8 mov r0, r7 | r0 = r7;
0x000165ac bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000165b0 mov r2, r6 | r2 = r6;
0x000165b4 ldr r1, [pc, 0xb8] | r1 = *(0x16670);
0x000165b8 b 0x1650c |
| } while (1);
| label_17:
0x000165bc mov r1, sb | r1 = sb;
0x000165c0 bl 0x3b94 | strcpy (r0, r1)
0x000165c4 ldr r3, [sp, 8] | r3 = var_8h;
0x000165c8 ldr r1, [pc, 0xa8] | r1 = *(0x16674);
0x000165cc ldr r0, [r6, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r6 + offset_1));
0x000165d0 add r1, pc, r1 | r1 = pc + r1;
0x000165d4 bl 0x3a50 | strstr (r0, r1);
0x000165d8 ldr r3, [sp, 8] | r3 = var_8h;
0x000165dc add r3, r3, 1 | r3++;
0x000165e0 str r3, [sp, 8] | var_8h = r3;
0x000165e4 cmp r0, 0 |
| if (r0 == 0) {
0x000165e8 strbne r8, [r0] | *(r0) = r8;
| }
| label_16:
0x000165ec ldr r0, [pc, 0x88] | r0 = *(0x16678);
0x000165f0 mov r2, fp | r2 = fp;
0x000165f4 mov r1, 0x360 | r1 = 0x360;
0x000165f8 add r0, pc, r0 | r0 = pc + r0;
0x000165fc bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| label_14:
0x00016600 mov r0, r5 | r0 = r5;
0x00016604 bl 0x3b70 | r0 = readdir64 ();
0x00016608 subs sb, r0, 0 | sb = r0 - 0;
| if (sb != r0) {
0x0001660c bne 0x164cc | goto label_7;
| }
| label_13:
0x00016610 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00016614 cmp r5, 0 |
0x00016618 str r4, [r3] | *(r3) = r4;
0x0001661c ldr r3, [sp, 0xc] | r3 = var_ch;
0x00016620 str r6, [r3] | *(r3) = r6;
| if (r5 == 0) {
0x00016624 beq 0x16354 | goto label_8;
| }
0x00016628 b 0x163c4 | goto label_9;
| }
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x18de0 */
| #include <stdint.h>
|
; (fcn) fcn.00018de0 () | void fcn_00018de0 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_0h_3;
| void * s2;
| char * dest;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| void * s;
| int32_t var_0h_2;
| void * var_40h;
| r0 = arg1;
| r1 = arg2;
0x00018de0 push {r4, r5, r6, r7, r8, lr} |
0x00018de4 sub sp, sp, 0x40 |
0x00018de8 add r4, sp, 0x2c | r4 += s;
0x00018dec mov r5, r0 | r5 = r0;
0x00018df0 mov r6, r1 | r6 = r1;
0x00018df4 mov r7, r2 | r7 = r2;
0x00018df8 mov r1, 0 | r1 = 0;
0x00018dfc mov r2, 0x14 | r2 = 0x14;
0x00018e00 mov r0, r4 | r0 = r4;
0x00018e04 bl 0x384c | memset (r0, r1, r2);
0x00018e08 ldr r0, [pc, 0x19c] |
0x00018e0c mov r2, 3 | r2 = 3;
0x00018e10 add r0, pc, r0 | r0 = pc + r0;
0x00018e14 ldr r1, [pc, 0x194] | r1 = *(0x18fac);
0x00018e18 add r0, r0, 0x42 | r0 = 0x18fea;
0x00018e1c bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00018e20 ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x00018e24 cmp r3, 0 |
| if (r3 == 0) {
0x00018e28 beq 0x18f40 | goto label_0;
| }
0x00018e2c mov r3, 2 | r3 = 2;
0x00018e30 str r3, [sp, 0x20] | var_20h = r3;
0x00018e34 ldr r3, [pc, 0x178] | r3 = *(0x18fb0);
0x00018e38 sub r2, r6, 0x3e8 | r2 = r6 - 0x3e8;
0x00018e3c cmp r2, 0xf |
| if (r2 <= 0xf) {
0x00018e40 movhi r6, r3 | r6 = r3;
| }
0x00018e44 cmp r7, 0 |
| if (r7 != 0) {
0x00018e48 beq 0x18e5c |
0x00018e4c mov r0, r7 | r0 = r7;
0x00018e50 bl 0x35dc | r0 = strlen (r0);
0x00018e54 add r0, r0, 2 | r0 += 2;
0x00018e58 str r0, [sp, 0x20] | var_20h = r0;
| }
0x00018e5c ldr r0, [pc, 0x154] | r0 = *(0x18fb4);
0x00018e60 ldr r2, [sp, 0x20] | r2 = var_20h;
0x00018e64 mov r1, 0x220 | r1 = 0x220;
0x00018e68 add r0, pc, r0 | r0 = pc + r0;
0x00018e6c bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00018e70 cmp r0, 0 |
0x00018e74 str r0, [sp, 0x1c] | dest = r0;
| if (r0 == 0) {
0x00018e78 beq 0x18f64 | goto label_1;
| }
0x00018e7c lsl r3, r6, 0x10 | r3 = r6 << 0x10;
0x00018e80 lsr r3, r3, 0x18 | r3 >>= 0x18;
0x00018e84 orr r3, r3, r6, lsl 8 | r3 |= (r6 << 8);
0x00018e88 add r1, sp, 0x40 | r1 += var_40h;
0x00018e8c strh r3, [r1, -0x26]! | *((r1 -= 0x26)) = r3;
0x00018e90 mov r2, 2 | r2 = 2;
0x00018e94 bl 0x3468 | memcpy (r0, r1, r2);
0x00018e98 cmp r7, 0 |
| if (r7 != 0) {
0x00018e9c beq 0x18eb0 |
0x00018ea0 ldr r0, [sp, 0x1c] | r0 = dest;
0x00018ea4 mov r1, r7 | r1 = r7;
0x00018ea8 add r0, r0, 2 | r0 += 2;
0x00018eac bl 0x3b94 | strcpy (r0, r1)
| }
0x00018eb0 add r3, sp, 0x20 | r3 += var_20h;
0x00018eb4 str r3, [sp] | *(sp) = r3;
0x00018eb8 str r4, [sp, 4] | var_4h = r4;
0x00018ebc add r3, sp, 0x1c | r3 += dest;
0x00018ec0 mov r2, 8 | r2 = 8;
0x00018ec4 mov r1, r5 | r1 = r5;
0x00018ec8 add r0, sp, 0x24 | r0 += var_24h;
0x00018ecc bl 0x186d8 | fcn_000186d8 (r0, r1, r2, r3);
0x00018ed0 ldr r8, [r5, 0x1c] | r8 = *((r5 + 0x1c));
0x00018ed4 ldr r6, [sp, 0x24] | r6 = var_24h;
0x00018ed8 cmp r8, 0 |
0x00018edc ldr r7, [sp, 0x28] | r7 = var_28h;
| if (r8 == 0) {
0x00018ee0 beq 0x18f88 | goto label_2;
| }
0x00018ee4 mov ip, r4 |
0x00018ee8 ldm ip!, {r0, r1, r2, r3} | r0 = *(ip!);
| r1 = *((ip! + 4));
| r2 = *((ip! + 8));
| r3 = *((ip! + 12));
0x00018eec mov lr, sp | lr = sp;
0x00018ef0 stm lr!, {r0, r1, r2, r3} | *(lr!) = r0;
| *((lr! + 4)) = r1;
| *((lr! + 8)) = r2;
| *((lr! + 12)) = r3;
0x00018ef4 ldr r3, [ip] | r3 = *(ip);
0x00018ef8 mov r2, r6 | r2 = r6;
0x00018efc str r3, [lr] | *(lr) = r3;
0x00018f00 mov r0, r8 | r0 = r8;
0x00018f04 mov r3, r7 | r3 = r7;
0x00018f08 ldr r1, [r5] | r1 = *(r5);
0x00018f0c bl 0xa594 | fcn_0000a594 (r0, r1, r2, r3, r4, r5);
| do {
0x00018f10 ldr r4, [pc, 0xa4] | r4 = *(0x18fb8);
0x00018f14 mov r2, r6 | r2 = r6;
0x00018f18 add r4, pc, r4 | r4 = pc + r4;
0x00018f1c ldr r1, [pc, 0x9c] | r1 = *(0x18fbc);
0x00018f20 mov r0, r4 | r0 = r4;
0x00018f24 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00018f28 mov r3, 0 | r3 = 0;
0x00018f2c str r3, [r5, 0x34] | *((r5 + 0x34)) = r3;
0x00018f30 ldr r2, [sp, 0x1c] | r2 = dest;
0x00018f34 ldr r1, [pc, 0x88] | r1 = *(0x18fc0);
0x00018f38 mov r0, r4 | r0 = r4;
0x00018f3c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| label_0:
0x00018f40 ldr r2, [r5, 0x38] | r2 = *((r5 + 0x38));
0x00018f44 cmp r2, 0 |
| if (r2 != 0) {
0x00018f48 beq 0x18f64 |
0x00018f4c ldr r0, [pc, 0x74] | r0 = *(0x18fc4);
0x00018f50 ldr r1, [pc, 0x74] | r1 = *(0x18fc8);
0x00018f54 add r0, pc, r0 | r0 = pc + r0;
0x00018f58 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00018f5c mov r3, 0 | r3 = 0;
0x00018f60 str r3, [r5, 0x38] | *((r5 + 0x38)) = r3;
| }
| label_1:
0x00018f64 ldr r0, [pc, 0x64] |
0x00018f68 mov r3, 3 | r3 = 3;
0x00018f6c add r0, pc, r0 | r0 = pc + r0;
0x00018f70 mov r2, 0 | r2 = 0;
0x00018f74 ldr r1, [pc, 0x58] | r1 = *(0x18fd0);
0x00018f78 add r0, r0, 0x42 | r0 = 0x1900e;
0x00018f7c bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00018f80 add sp, sp, 0x40 |
0x00018f84 pop {r4, r5, r6, r7, r8, pc} |
| label_2:
0x00018f88 add r3, sp, 0x40 | r3 += var_40h;
0x00018f8c ldmdb r3, {r0, r1, r2, r3} | __asm ("ldmdb r3, {r0, r1, r2, r3}");
0x00018f90 stm sp, {r0, r1, r2, r3} | *(sp) = r0;
| *((sp + 4)) = r1;
| *((sp + 8)) = r2;
| *((sp + 12)) = r3;
0x00018f94 ldr r3, [sp, 0x2c] | r3 = s;
0x00018f98 mov r2, r7 | r2 = r7;
0x00018f9c mov r1, r6 | r1 = r6;
0x00018fa0 ldr r0, [r5] | r0 = *(r5);
0x00018fa4 bl 0x10a94 | fcn_00010a94 (r0, r1, r2, r3, r4);
0x00018fa8 b 0x18f10 |
| } while (1);
| }
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x1ab60 */
| #include <stdint.h>
|
; (fcn) fcn.0001ab60 () | void fcn_0001ab60 (int32_t arg1, int32_t arg2) {
| int32_t var_8h;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x0001ab60 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001ab64 sub sp, sp, 0x14 |
0x0001ab68 mov r6, r2 | r6 = r2;
0x0001ab6c mov sb, r1 | sb = r1;
0x0001ab70 mov r8, r0 | r8 = r0;
0x0001ab74 bl 0x35dc | r0 = strlen (r0);
0x0001ab78 mov r5, r0 | r5 = r0;
0x0001ab7c add r4, r0, 1 | r4 = r0 + 1;
0x0001ab80 ldr r0, [pc, 0x170] |
0x0001ab84 add r0, pc, r0 | r0 = pc + r0;
0x0001ab88 add r0, r0, 0x28 | r0 = 0x1ad1c;
0x0001ab8c bl 0x3aa4 | fcn_00003aa4 ();
0x0001ab90 ands r3, r6, 0xf | r3 = r6 & 0xf;
| if (r3 == r6) {
0x0001ab94 addne r2, r6, 0x10 | r2 = r6 + 0x10;
| }
0x0001ab98 mov r0, 0x10 | r0 = 0x10;
| if (r3 == r6) {
0x0001ab9c subne r6, r2, r3 | r6 = r2 - r3;
| }
0x0001aba0 bl 0x3558 | r0 = malloc (r0);
0x0001aba4 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x0001aba8 bne 0x1abe0 | goto label_2;
| }
0x0001abac ldr r2, [pc, 0x148] | r2 = *(0x1acf8);
0x0001abb0 mov r1, 0xd | r1 = 0xd;
0x0001abb4 add r2, pc, r2 | r2 = pc + r2;
0x0001abb8 mov r0, 5 | r0 = 5;
0x0001abbc bl 0x12720 | fcn_00012720 (r0, r1);
0x0001abc0 mov r4, r7 | r4 = r7;
| do {
| label_1:
0x0001abc4 ldr r0, [pc, 0x134] |
0x0001abc8 add r0, pc, r0 | r0 = pc + r0;
0x0001abcc add r0, r0, 0x28 | r0 = 0x1ad24;
0x0001abd0 bl 0x39e4 | fcn_000039e4 ();
0x0001abd4 mov r0, r4 | r0 = r4;
0x0001abd8 add sp, sp, 0x14 |
0x0001abdc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x0001abe0 mov sl, 0 | sl = 0;
0x0001abe4 mov r0, r4 | r0 = r4;
0x0001abe8 str sl, [r7, 4] | *((r7 + 4)) = sl;
0x0001abec str sl, [r7, 8] | *((r7 + 8)) = sl;
0x0001abf0 str r6, [r7, 0xc] | *((r7 + 0xc)) = r6;
0x0001abf4 bl 0x3558 | r0 = malloc (r0);
0x0001abf8 cmp r0, sl |
0x0001abfc mov r4, r0 | r4 = r0;
0x0001ac00 str r0, [r7] | *(r7) = r0;
| if (r0 != sl) {
0x0001ac04 bne 0x1ac28 | goto label_3;
| }
0x0001ac08 ldr r2, [pc, 0xf4] | r2 = *(0x1ad00);
0x0001ac0c mov r1, 0xd | r1 = 0xd;
0x0001ac10 add r2, pc, r2 | r2 = pc + r2;
0x0001ac14 mov r0, 5 | r0 = 5;
0x0001ac18 bl 0x12720 | fcn_00012720 (r0, r1);
| label_0:
0x0001ac1c mov r0, r7 | r0 = r7;
0x0001ac20 bl 0x3abc | free (r0);
0x0001ac24 b 0x1abc4 |
| } while (1);
| label_3:
0x0001ac28 mov r1, r8 | r1 = r8;
0x0001ac2c str sl, [r0] | *(r0) = sl;
0x0001ac30 add fp, r6, 0x10 |
0x0001ac34 bl 0x3b94 | strcpy (r0, r1)
0x0001ac38 str sb, [r7, 4] | *((r7 + 4)) = sb;
0x0001ac3c mov r0, fp | r0 = fp;
0x0001ac40 bl 0x3558 | r0 = malloc (r0);
0x0001ac44 cmp r0, 0 |
0x0001ac48 mov r4, r0 | r4 = r0;
0x0001ac4c str r0, [r7, 8] | *((r7 + 8)) = r0;
| if (r0 == 0) {
0x0001ac50 bne 0x1ac74 |
0x0001ac54 ldr r2, [pc, 0xac] | r2 = *(0x1ad04);
0x0001ac58 mov r1, 0xd | r1 = 0xd;
0x0001ac5c add r2, pc, r2 | r2 = pc + r2;
0x0001ac60 mov r0, 5 | r0 = 5;
0x0001ac64 bl 0x12720 | fcn_00012720 (r0, r1);
0x0001ac68 ldr r0, [r7] | r0 = *(r7);
0x0001ac6c bl 0x3abc | free (r0);
0x0001ac70 b 0x1ac1c | goto label_0;
| }
0x0001ac74 mov r2, fp | r2 = fp;
0x0001ac78 mov r1, sl | r1 = sl;
0x0001ac7c bl 0x384c | memset (r0, r1, r2);
0x0001ac80 ldr r2, [pc, 0x84] | r2 = *(0x1ad08);
0x0001ac84 ldr r3, [pc, 0x84] | r3 = *(0x1ad0c);
0x0001ac88 add r1, r4, r6 | r1 = r4 + r6;
0x0001ac8c strd r2, r3, [r4] | __asm ("strd r2, r3, [r4]");
0x0001ac90 strd r2, r3, [r1, 8] | __asm ("strd r2, r3, [r1, 8]");
0x0001ac94 ldr r2, [pc, 0x78] | r2 = *(0x1ad10);
0x0001ac98 str r4, [sp, 8] | var_8h = r4;
0x0001ac9c ldr r4, [pc, 0x74] | r4 = *(0x1ad14);
0x0001aca0 add r5, r5, 0x21 | r5 += 0x21;
0x0001aca4 add r4, pc, r4 | r4 = pc + r4;
0x0001aca8 mov r3, r6 | r3 = r6;
0x0001acac add r2, pc, r2 | r2 = pc + r2;
0x0001acb0 mvn r1, 0 | r1 = ~0;
0x0001acb4 mov r0, 1 | r0 = 1;
0x0001acb8 add r5, r5, r6 | r5 += r6;
0x0001acbc stm sp, {r8, sb} | *(sp) = r8;
| *((sp + 4)) = sb;
0x0001acc0 bl 0x12720 | fcn_00012720 (r0, r1);
0x0001acc4 mov r2, r5 | r2 = r5;
0x0001acc8 mov r0, r4 | r0 = r4;
0x0001accc mov r1, r7 | r1 = r7;
0x0001acd0 bl 0xfd48 | fcn_0000fd48 (r0, r1);
0x0001acd4 ldr r2, [r4, 0x20] | r2 = *(0x1ad34);
0x0001acd8 ldr r3, [r4, 0x24] | r3 = *(0x1ad38);
0x0001acdc add r2, r6, r2 | r2 = r6 + r2;
0x0001ace0 cmp r2, r3 |
0x0001ace4 str r2, [r4, 0x20] | *((r4 + 0x20)) = r2;
| if (r2 <= r3) {
0x0001ace8 strhi r2, [r4, 0x24] | *((r4 + 0x24)) = r2;
| }
0x0001acec ldr r4, [r7, 8] | r4 = *((r7 + 8));
0x0001acf0 add r4, r4, 8 | r4 += 8;
0x0001acf4 b 0x1abc4 | goto label_1;
| }
; 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/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x1adec */
| #include <stdint.h>
|
; (fcn) fcn.0001adec () | void fcn_0001adec (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x0001adec push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001adf0 ldr r5, [pc, 0x16c] | r5 = *(0x1af60);
0x0001adf4 mov r4, r2 | r4 = r2;
0x0001adf8 add r5, pc, r5 | r5 = pc + r5;
0x0001adfc mov r8, r0 | r8 = r0;
0x0001ae00 add r0, r5, 0x28 | r0 = r5 + 0x28;
0x0001ae04 mov sb, r1 | sb = r1;
0x0001ae08 mov r6, r3 | r6 = r3;
0x0001ae0c bl 0x3aa4 | fcn_00003aa4 ();
0x0001ae10 mov r0, r5 | r0 = r5;
0x0001ae14 sub r1, r4, 8 | r1 = r4 - 8;
0x0001ae18 bl 0x10238 | r0 = fcn_00010238 (r0, r1);
0x0001ae1c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x0001ae20 bne 0x1ae68 | goto label_1;
| }
0x0001ae24 ldr r2, [pc, 0x13c] | r2 = *(0x1af64);
0x0001ae28 str sb, [sp] | *(sp) = sb;
0x0001ae2c mov r3, r8 | r3 = r8;
0x0001ae30 add r2, pc, r2 | r2 = pc + r2;
0x0001ae34 mov r1, 0xd | r1 = 0xd;
0x0001ae38 mov r0, 5 | r0 = 5;
0x0001ae3c bl 0x12720 | fcn_00012720 (r0, r1);
0x0001ae40 mov r4, r5 | r4 = r5;
| do {
| label_0:
0x0001ae44 ldr r0, [pc, 0x120] |
0x0001ae48 add r0, pc, r0 | r0 = pc + r0;
0x0001ae4c add r0, r0, 0x28 | r0 = 0x1af90;
0x0001ae50 bl 0x39e4 | fcn_000039e4 ();
0x0001ae54 cmp r4, 0 |
| if (r4 == 0) {
0x0001ae58 addne r4, r4, 8 | r4 += 8;
| }
0x0001ae5c mov r0, r4 | r0 = r4;
0x0001ae60 add sp, sp, 0xc |
0x0001ae64 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0001ae68 mov r0, r8 | r0 = r8;
0x0001ae6c bl 0x35dc | strlen (r0);
0x0001ae70 mov r2, r4 | r2 = r4;
0x0001ae74 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0001ae78 mov r1, sb | r1 = sb;
0x0001ae7c mov sl, r0 | sl = r0;
0x0001ae80 mov r0, r8 | r0 = r8;
0x0001ae84 bl 0x1a9bc | fcn_0001a9bc (r0, r1);
0x0001ae88 ldr r2, [pc, 0xe0] | r2 = *(0x1af6c);
0x0001ae8c ands r3, r6, 0xf | r3 = r6 & 0xf;
0x0001ae90 add r2, pc, r2 | r2 = pc + r2;
| if (r3 == r6) {
0x0001ae94 addne r6, r6, 0x10 | r6 += 0x10;
| }
| if (r3 == r6) {
0x0001ae98 subne r6, r6, r3 | r6 -= r3;
| }
0x0001ae9c ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x0001aea0 ldr r3, [r2, 0x20] | r3 = *(0x1af8c);
0x0001aea4 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x0001aea8 sub r3, r3, r1 | r3 -= r1;
0x0001aeac ldr r1, [r2, 0x24] | r1 = *(0x1af90);
0x0001aeb0 add r3, r3, r6 | r3 += r6;
0x0001aeb4 cmp r3, r1 |
0x0001aeb8 add r1, r6, 0x10 | r1 = r6 + 0x10;
| if (r3 <= r1) {
0x0001aebc strhi r3, [r2, 0x24] | *((r2 + 0x24)) = r3;
| }
0x0001aec0 str r3, [r2, 0x20] | *((r2 + 0x20)) = r3;
0x0001aec4 bl 0x3498 | r0 = realloc (r0, r1);
0x0001aec8 cmp r0, 0 |
0x0001aecc mov r4, r0 | r4 = r0;
0x0001aed0 str r0, [r5, 8] | *((r5 + 8)) = r0;
| if (r0 != 0) {
0x0001aed4 bne 0x1aef0 | goto label_2;
| }
0x0001aed8 ldr r2, [pc, 0x94] | r2 = *(0x1af70);
0x0001aedc mov r1, 0xd | r1 = 0xd;
0x0001aee0 add r2, pc, r2 | r2 = pc + r2;
0x0001aee4 mov r0, 5 | r0 = 5;
0x0001aee8 bl 0x12720 | fcn_00012720 (r0, r1);
0x0001aeec b 0x1ae44 |
| } while (1);
| label_2:
0x0001aef0 ldr r2, [r5, 0xc] | r2 = *((r5 + 0xc));
0x0001aef4 add sl, sl, 1 | sl++;
0x0001aef8 rsb r2, r2, 0x20 | r2 = 0x20 - r2;
0x0001aefc ldr r3, [pc, 0x74] | r3 = *(0x1af74);
0x0001af00 add r7, r2, sl | r7 = r2 + sl;
0x0001af04 ldr r2, [pc, 0x70] | r2 = *(0x1af78);
0x0001af08 add r4, r0, r6 | r4 = r0 + r6;
0x0001af0c strd r2, r3, [r0] | __asm ("strd r2, r3, [r0]");
0x0001af10 strd r2, r3, [r4, 8] | __asm ("strd r2, r3, [r4, 8]");
0x0001af14 ldr r4, [r5] | r4 = *(r5);
0x0001af18 str r6, [r5, 0xc] | *((r5 + 0xc)) = r6;
0x0001af1c mov r0, r4 | r0 = r4;
0x0001af20 bl 0x35dc | strlen (r0);
0x0001af24 mov r1, sl | r1 = sl;
0x0001af28 add r6, r7, r6 | r6 = r7 + r6;
0x0001af2c mov fp, r0 |
0x0001af30 mov r0, r4 | r0 = r4;
0x0001af34 bl 0x3498 | realloc (r0, r1);
0x0001af38 mov r1, r8 | r1 = r8;
0x0001af3c str r0, [r5] | *(r5) = r0;
0x0001af40 bl 0x3b94 | strcpy (r0, r1)
0x0001af44 ldr r0, [pc, 0x34] | r0 = *(0x1af7c);
0x0001af48 str sb, [r5, 4] | *((r5 + 4)) = sb;
0x0001af4c sub r2, r6, fp | r2 = r6 - fp;
0x0001af50 mov r1, r5 | r1 = r5;
0x0001af54 add r0, pc, r0 | r0 = pc + r0;
0x0001af58 ldr r4, [r5, 8] | r4 = *((r5 + 8));
0x0001af5c bl 0xfd48 | fcn_0000fd48 (r0, r1);
0x0001af60 b 0x1ae44 | goto label_0;
| }
[*] Function strcpy used 11 times libpaho-mqtt3cs.so.1.3.9