[*] Binary protection state of libcrypto.so.1.1
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function strcat tear down of libcrypto.so.1.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/libcrypto.so.1.1 @ 0x6c030 */
| #include <stdint.h>
|
; (fcn) sym.BIO_accept () | void BIO_accept (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| char * src;
| int32_t var_78h;
| r0 = arg1;
| r1 = arg2;
0x0006c030 push {r4, r5, r6, r7, r8, lr} |
0x0006c034 sub sp, sp, 0x78 |
0x0006c038 add r6, sp, 8 | r6 += src;
0x0006c03c mov r4, r1 | r4 = r1;
0x0006c040 mov r2, 0 | r2 = 0;
0x0006c044 mov r1, r6 | r1 = r6;
0x0006c048 bl 0x6c958 | r0 = BIO_accept_ex ();
0x0006c04c cmn r0, 1 |
0x0006c050 mov r5, r0 | r5 = r0;
| if (r0 != 1) {
0x0006c054 bne 0x6c0b8 | goto label_1;
| }
0x0006c058 bl 0x73258 | r0 = BIO_sock_should_retry ();
0x0006c05c cmp r0, 0 |
| if (r0 == 0) {
0x0006c060 mvnne r5, 1 | r5 = ~1;
| }
| if (r0 != 0) {
0x0006c064 bne 0x6c0ac | goto label_0;
| }
0x0006c068 bl 0x4f848 | errno_location ();
0x0006c06c ldr r4, [pc, 0x144] | r4 = *(0x6c1b4);
0x0006c070 mov r3, 0xf6 | r3 = 0xf6;
0x0006c074 add r4, pc, r4 | r4 = pc + r4;
0x0006c078 str r3, [sp] | *(sp) = r3;
0x0006c07c mov r1, 8 | r1 = 8;
0x0006c080 mov r3, r4 | r3 = r4;
0x0006c084 ldr r2, [r0] | r2 = *(r0);
0x0006c088 mov r0, 2 | r0 = 2;
0x0006c08c bl 0xfc7b8 | ERR_put_error ();
0x0006c090 mov r3, 0xf7 | r3 = 0xf7;
0x0006c094 str r3, [sp] | *(sp) = r3;
0x0006c098 mov r2, 0x64 | r2 = 0x64;
0x0006c09c mov r3, r4 | r3 = r4;
0x0006c0a0 mov r1, 0x65 | r1 = 0x65;
0x0006c0a4 mov r0, 0x20 | r0 = 0x20;
0x0006c0a8 bl 0xfc7b8 | ERR_put_error ();
| do {
| label_0:
0x0006c0ac mov r0, r5 | r0 = r5;
0x0006c0b0 add sp, sp, 0x78 |
0x0006c0b4 pop {r4, r5, r6, r7, r8, pc} |
| label_1:
0x0006c0b8 cmp r4, 0 |
0x0006c0bc beq 0x6c0ac |
| } while (r4 == 0);
0x0006c0c0 mov r1, 1 | r1 = 1;
0x0006c0c4 mov r0, r6 | r0 = r6;
0x0006c0c8 bl 0x69c48 | BIO_ADDR_hostname_string ();
0x0006c0cc mov r1, 1 | r1 = 1;
0x0006c0d0 mov r7, r0 | r7 = r0;
0x0006c0d4 mov r0, r6 | r0 = r6;
0x0006c0d8 bl 0x69bf8 | BIO_ADDR_service_string ();
0x0006c0dc adds r3, r0, 0 | r3 += src;
| if (r3 == src) {
0x0006c0e0 movne r3, 1 | r3 = 1;
| }
0x0006c0e4 cmp r7, 0 |
| if (r7 != 0) {
0x0006c0e8 moveq r3, 0 | r3 = 0;
| }
0x0006c0ec cmp r3, 0 |
0x0006c0f0 mov r6, r0 | r6 = r0;
| if (r3 != 0) {
0x0006c0f4 streq r3, [r4] | *(r4) = r3;
| }
| if (r3 != 0) {
0x0006c0f8 beq 0x6c12c |
0x0006c0fc mov r0, r7 | r0 = r7;
0x0006c100 bl 0x4f7b8 | r0 = strlen (r0);
0x0006c104 mov r8, r0 | r8 = r0;
0x0006c108 mov r0, r6 | r0 = r6;
0x0006c10c bl 0x4f7b8 | strlen (r0);
0x0006c110 ldr r1, [pc, 0xa4] | r1 = *(0x6c1b8);
0x0006c114 mov r2, 0xff | r2 = 0xff;
0x0006c118 add r1, pc, r1 | r1 = pc + r1;
0x0006c11c add r0, r8, r0 | r0 = r8 + r0;
0x0006c120 add r0, r0, 2 | r0 += 2;
0x0006c124 bl 0x118644 | CRYPTO_zalloc ();
0x0006c128 str r0, [r4] | *(r4) = r0;
| }
0x0006c12c ldr r0, [r4] | r0 = *(r4);
0x0006c130 cmp r0, 0 |
| if (r0 != 0) {
0x0006c134 bne 0x6c190 | goto label_2;
| }
0x0006c138 mov r3, 0x104 | r3 = 0x104;
0x0006c13c str r3, [sp] | *(sp) = r3;
0x0006c140 ldr r3, [pc, 0x78] | r3 = *(0x6c1bc);
0x0006c144 mov r2, 0x41 | r2 = 0x41;
0x0006c148 add r3, pc, r3 | r3 = pc + r3;
0x0006c14c mov r1, 0x65 | r1 = 0x65;
0x0006c150 mov r0, 0x20 | r0 = 0x20;
0x0006c154 bl 0xfc7b8 | ERR_put_error ();
0x0006c158 mov r0, r5 | r0 = r5;
0x0006c15c bl 0x6ca28 | BIO_closesocket ();
0x0006c160 mvn r5, 0 | r5 = ~0;
| do {
0x0006c164 ldr r4, [pc, 0x58] | r4 = *(0x6c1c0);
0x0006c168 mov r0, r7 | r0 = r7;
0x0006c16c add r4, pc, r4 | r4 = pc + r4;
0x0006c170 mov r1, r4 | r1 = r4;
0x0006c174 mov r2, 0x10c | r2 = 0x10c;
0x0006c178 bl 0x11842c | CRYPTO_free ();
0x0006c17c ldr r2, [pc, 0x44] | r2 = *(0x6c1c4);
0x0006c180 mov r1, r4 | r1 = r4;
0x0006c184 mov r0, r6 | r0 = r6;
0x0006c188 bl 0x11842c | CRYPTO_free ();
0x0006c18c b 0x6c0ac | goto label_0;
| label_2:
0x0006c190 mov r1, r7 | r1 = r7;
0x0006c194 bl 0x4f518 | strcpy (r0, r1);
0x0006c198 ldr r1, [pc, 0x2c] | r1 = *(0x6c1c8);
0x0006c19c ldr r0, [r4] | r0 = *(r4);
0x0006c1a0 add r1, pc, r1 | r1 = pc + r1;
0x0006c1a4 bl 0x4f560 | strcat (r0, r1)
0x0006c1a8 mov r1, r6 | r1 = r6;
0x0006c1ac ldr r0, [r4] | r0 = *(r4);
0x0006c1b0 bl 0x4f560 | strcat (r0, r1)
0x0006c1b4 b 0x6c164 |
| } 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/libcrypto.so.1.1 @ 0x6c958 */
| #include <stdint.h>
|
; (fcn) sym.BIO_accept_ex () | void BIO_accept_ex (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_74h;
| int32_t var_10h;
| int32_t var_80h;
| r0 = arg1;
| r1 = arg2;
0x0006c958 push {r4, r5, r6, lr} |
0x0006c95c mov r6, r0 | r6 = r0;
0x0006c960 sub sp, sp, 0x80 |
0x0006c964 subs r0, r1, 0 | r0 = r1 - 0;
| if (r0 != r1) {
0x0006c968 addeq r0, sp, 0x10 | r0 += var_10h;
| }
0x0006c96c add r4, sp, 0x80 | r4 += var_80h;
0x0006c970 mov r3, 0x70 | r3 = 0x70;
0x0006c974 str r3, [r4, -0x74]! | *((r4 -= 0x74)) = r3;
0x0006c978 mov r5, r2 | r5 = r2;
0x0006c97c bl 0x69938 | fcn_00069938 ();
0x0006c980 mov r2, r4 | r2 = r4;
0x0006c984 mov r1, r0 | r1 = r0;
0x0006c988 mov r0, r6 | r0 = r6;
0x0006c98c bl 0x4f458 | r0 = accept (r0, r1, r2);
0x0006c990 cmn r0, 1 |
0x0006c994 mov r4, r0 | r4 = r0;
| if (r0 != 1) {
0x0006c998 bne 0x6c9f8 | goto label_1;
| }
0x0006c99c bl 0x73258 | r0 = BIO_sock_should_retry ();
0x0006c9a0 cmp r0, 0 |
| if (r0 != 0) {
0x0006c9a4 bne 0x6c9ec | goto label_0;
| }
0x0006c9a8 bl 0x4f848 | errno_location ();
0x0006c9ac ldr r5, [pc, 0x68] | r5 = *(0x6ca18);
0x0006c9b0 ldr r3, [pc, 0x68] | r3 = *(0x6ca1c);
0x0006c9b4 add r5, pc, r5 | r5 = pc + r5;
0x0006c9b8 str r3, [sp] | *(sp) = r3;
0x0006c9bc mov r1, 8 | r1 = 8;
0x0006c9c0 mov r3, r5 | r3 = r5;
0x0006c9c4 ldr r2, [r0] | r2 = *(r0);
0x0006c9c8 mov r0, 2 | r0 = 2;
0x0006c9cc bl 0xfc7b8 | ERR_put_error ();
0x0006c9d0 ldr r3, [pc, 0x4c] | r3 = *(0x6ca20);
0x0006c9d4 mov r2, 0x64 | r2 = 0x64;
0x0006c9d8 str r3, [sp] | *(sp) = r3;
0x0006c9dc mov r1, 0x89 | r1 = 0x89;
0x0006c9e0 mov r3, r5 | r3 = r5;
0x0006c9e4 mov r0, 0x20 | r0 = 0x20;
0x0006c9e8 bl 0xfc7b8 | ERR_put_error ();
| do {
| label_0:
0x0006c9ec mov r0, r4 | r0 = r4;
0x0006c9f0 add sp, sp, 0x80 |
0x0006c9f4 pop {r4, r5, r6, pc} |
| label_1:
0x0006c9f8 lsr r1, r5, 3 | r1 = r5 >> 3;
0x0006c9fc and r1, r1, 1 | r1 &= 1;
0x0006ca00 bl 0x6c200 | r0 = BIO_socket_nbio ();
0x0006ca04 cmp r0, 0 |
0x0006ca08 bne 0x6c9ec |
| } while (r0 != 0);
0x0006ca0c mov r0, r4 | r0 = r4;
0x0006ca10 bl 0x4f320 | close (r0);
0x0006ca14 mvn r4, 0 | r4 = ~0;
0x0006ca18 b 0x6c9ec | 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/libcrypto.so.1.1 @ 0x138344 */
| #include <stdint.h>
|
; (fcn) sym.RAND_file_name () | void RAND_file_name (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00138344 push {r4, r5, r6, r7, r8, lr} |
0x00138348 mov r4, r0 | r4 = r0;
0x0013834c ldr r0, [pc, 0xb8] | r0 = *(0x138408);
0x00138350 mov r6, r1 | r6 = r1;
0x00138354 add r0, pc, r0 | r0 = pc + r0;
0x00138358 bl 0x111efc | r0 = fcn_00111efc (r0);
0x0013835c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00138360 beq 0x138370 |
0x00138364 ldrb r3, [r5] | r3 = *(r5);
0x00138368 cmp r3, 0 |
| if (r3 != 0) {
0x0013836c bne 0x138394 | goto label_2;
| }
| }
0x00138370 ldr r0, [pc, 0x98] | r0 = *(0x13840c);
0x00138374 add r0, pc, r0 | r0 = pc + r0;
0x00138378 bl 0x111efc | r0 = fcn_00111efc (r0);
0x0013837c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00138380 movne r7, 0 | r7 = 0;
| }
0x00138384 bne 0x138398 |
| while (r3 == 0) {
| label_0:
0x00138388 mov r4, 0 | r4 = 0;
| label_1:
0x0013838c mov r0, r4 | r0 = r4;
0x00138390 pop {r4, r5, r6, r7, r8, pc} |
| label_2:
0x00138394 mov r7, 1 | r7 = 1;
0x00138398 ldrb r3, [r5] | r3 = *(r5);
0x0013839c cmp r3, 0 |
0x001383a0 beq 0x138388 |
| }
0x001383a4 mov r0, r5 | r0 = r5;
0x001383a8 bl 0x4f7b8 | strlen (r0);
0x001383ac cmp r7, 0 |
| if (r7 == 0) {
0x001383b0 beq 0x1383d0 | goto label_3;
| }
0x001383b4 add r0, r0, 1 | r0++;
0x001383b8 cmp r0, r6 |
| if (r0 >= r6) {
0x001383bc bhs 0x138388 | goto label_0;
| }
0x001383c0 mov r1, r5 | r1 = r5;
0x001383c4 mov r0, r4 | r0 = r4;
0x001383c8 bl 0x4f518 | strcpy (r0, r1);
0x001383cc b 0x13838c | goto label_1;
| label_3:
0x001383d0 add r0, r0, 6 | r0 += 6;
0x001383d4 cmp r0, r6 |
| if (r0 >= r6) {
0x001383d8 bhs 0x138388 | goto label_0;
| }
0x001383dc mov r1, r5 | r1 = r5;
0x001383e0 mov r0, r4 | r0 = r4;
0x001383e4 bl 0x4f518 | strcpy (r0, r1);
0x001383e8 ldr r1, [pc, 0x24] | r1 = *(0x138410);
0x001383ec mov r0, r4 | r0 = r4;
0x001383f0 add r1, pc, r1 | r1 = pc + r1;
0x001383f4 bl 0x4f560 | strcat (r0, r1)
0x001383f8 ldr r1, [pc, 0x18] | r1 = *(0x138414);
0x001383fc mov r0, r4 | r0 = r4;
0x00138400 add r1, pc, r1 | r1 = pc + r1;
0x00138404 bl 0x4f560 | strcat (r0, r1)
0x00138408 b 0x13838c | 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/libcrypto.so.1.1 @ 0x15c83c */
| #include <stdint.h>
|
; (fcn) sym.TS_RESP_verify_response () | void TS_RESP_verify_response (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_14h;
| char * dest;
| void * s;
| int32_t var_118h;
| int32_t var_11ch;
| r0 = arg1;
0x0015c83c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0015c840 ldm r1, {r6, r7, r8} | r6 = *(r1);
| r7 = *((r1 + 4));
| r8 = *((r1 + 8));
0x0015c844 sub sp, sp, 0x11c |
0x0015c848 mov r5, r0 | r5 = r0;
0x0015c84c ldr r0, [r6] | r0 = *(r6);
0x0015c850 bl 0x550bc | ASN1_INTEGER_get ();
0x0015c854 mov r1, 0 | r1 = 0;
0x0015c858 mov r2, 0xfc | r2 = 0xfc;
0x0015c85c str r1, [sp, 0x18] | dest = r1;
0x0015c860 mov r4, r0 | r4 = r0;
0x0015c864 add r0, sp, 0x1c | r0 += s;
0x0015c868 bl 0x4f4ac | memset (r0, r1, r2);
0x0015c86c cmp r4, 1 |
| if (r4 < 1) {
0x0015c870 bls 0x15cac8 | goto label_2;
| }
0x0015c874 cmp r4, 5 |
| if (r4 > 5) {
0x0015c878 bhi 0x15c90c | goto label_3;
| }
0x0015c87c ldr r3, [pc, 0x264] | r3 = *(0x15cae4);
0x0015c880 add r3, pc, r3 | r3 = pc + r3;
0x0015c884 ldr r8, [r3, r4, lsl 2] | r8 = *(0x15cae4);
| do {
0x0015c888 ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x0015c88c bl 0x154518 | r0 = OPENSSL_sk_num ();
0x0015c890 cmp r0, 0 |
| if (r0 > 0) {
0x0015c894 movle r4, 0 | r4 = 0;
| }
| if (r0 <= 0) {
0x0015c898 ble 0x15c9b0 | goto label_4;
| }
0x0015c89c ldr sb, [r6, 4] | sb = *((r6 + 4));
0x0015c8a0 ldr r7, [pc, 0x244] | r7 = *(0x15cae8);
0x0015c8a4 mov r4, 0 | r4 = 0;
0x0015c8a8 mov r5, r4 | r5 = r4;
| label_1:
0x0015c8ac mov r0, sb | r0 = sb;
0x0015c8b0 bl 0x154518 | r0 = OPENSSL_sk_num ();
0x0015c8b4 cmp r5, r0 |
| if (r5 < r0) {
0x0015c8b8 blt 0x15c918 | goto label_5;
| }
0x0015c8bc ldr r5, [pc, 0x22c] | r5 = *(0x15caec);
0x0015c8c0 mov r0, r4 | r0 = r4;
0x0015c8c4 add r5, pc, r5 | r5 = pc + r5;
0x0015c8c8 mov r1, r5 | r1 = r5;
0x0015c8cc ldr r2, [pc, 0x220] | r2 = *(0x15caf0);
0x0015c8d0 bl 0x118474 | r0 = CRYPTO_malloc ();
0x0015c8d4 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x0015c8d8 movne r5, r4 | r5 = r4;
| }
| if (r4 == r0) {
0x0015c8dc movne r7, 0 | r7 = 0;
| }
| if (r4 == r0) {
0x0015c8e0 movne fp, 0x2f |
| }
| if (r4 != r0) {
0x0015c8e4 bne 0x15c998 | goto label_6;
| }
0x0015c8e8 ldr r3, [pc, 0x208] | r3 = *(0x15caf4);
0x0015c8ec mov r2, 0x41 | r2 = 0x41;
0x0015c8f0 str r3, [sp] | *(sp) = r3;
0x0015c8f4 mov r1, 0x69 | r1 = 0x69;
0x0015c8f8 mov r3, r5 | r3 = r5;
0x0015c8fc mov r0, 0x2f | r0 = 0x2f;
0x0015c900 bl 0xfc7b8 | ERR_put_error ();
| label_0:
0x0015c904 mov r0, 0 | r0 = 0;
0x0015c908 b 0x15cae0 | goto label_7;
| label_3:
0x0015c90c ldr r8, [pc, 0x1e8] | r8 = *(0x15caf8);
0x0015c910 add r8, pc, r8 | r8 = pc + r8;
0x0015c914 b 0x15c888 |
| } while (1);
| label_5:
0x0015c918 mov r1, r5 | r1 = r5;
0x0015c91c mov r0, sb | r0 = sb;
0x0015c920 bl 0x154528 | r0 = OPENSSL_sk_value ();
0x0015c924 mov sl, r0 | sl = r0;
0x0015c928 bl 0x5b9e0 | ASN1_STRING_length ();
0x0015c92c sub r3, r7, r4 | r3 = r7 - r4;
0x0015c930 cmp r0, r3 |
| if (r0 > r3) {
0x0015c934 bgt 0x15c904 | goto label_0;
| }
0x0015c938 mov r0, sl | r0 = sl;
0x0015c93c bl 0x5b9e0 | ASN1_STRING_length ();
0x0015c940 add r5, r5, 1 | r5++;
0x0015c944 add r4, r4, r0 | r4 += r0;
0x0015c948 add r4, r4, 1 | r4++;
0x0015c94c b 0x15c8ac | goto label_1;
| do {
0x0015c950 mov r1, r7 | r1 = r7;
0x0015c954 mov r0, sb | r0 = sb;
0x0015c958 bl 0x154528 | OPENSSL_sk_value ();
0x0015c95c str r0, [sp, 0x14] | var_14h = r0;
0x0015c960 bl 0x5b9e0 | ASN1_STRING_length ();
0x0015c964 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0015c968 cmp r7, 0 |
| if (r7 <= 0) {
0x0015c96c strbgt fp, [r5] | *(r5) = fp;
| }
| if (r7 <= 0) {
0x0015c970 addgt r5, r5, 1 | r5++;
| }
0x0015c974 add r7, r7, 1 | r7++;
0x0015c978 mov sl, r0 | sl = r0;
0x0015c97c mov r0, r3 | r0 = r3;
0x0015c980 bl 0x5b9f8 | ASN1_STRING_get0_data ();
0x0015c984 mov r2, sl | r2 = sl;
0x0015c988 mov r1, r0 | r1 = r0;
0x0015c98c mov r0, r5 | r0 = r5;
0x0015c990 bl 0x4f6bc | strncpy (r0, r1, r2);
0x0015c994 add r5, r5, sl | r5 += sl;
| label_6:
0x0015c998 mov r0, sb | r0 = sb;
0x0015c99c bl 0x154518 | r0 = OPENSSL_sk_num ();
0x0015c9a0 cmp r7, r0 |
0x0015c9a4 blt 0x15c950 |
| } while (r7 < r0);
0x0015c9a8 mov r3, 0 | r3 = 0;
0x0015c9ac strb r3, [r5] | *(r5) = r3;
| label_4:
0x0015c9b0 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x0015c9b4 cmp r3, 0 |
| if (r3 == 0) {
0x0015c9b8 beq 0x15ca30 | goto label_8;
| }
0x0015c9bc ldr r7, [pc, 0x13c] |
0x0015c9c0 ldr sb, [pc, 0x13c] |
0x0015c9c4 add r7, pc, r7 | r7 = pc + r7;
0x0015c9c8 add sb, pc, sb | sb = pc + sb;
0x0015c9cc mov r5, 0 | r5 = 0;
0x0015c9d0 mov sl, 1 | sl = 1;
0x0015c9d4 add r7, r7, 0x18 | r7 = 0x15cb14;
0x0015c9d8 add sb, sb, 0x18 | sb = 0x15cb18;
| do {
0x0015c9dc ldr r1, [r5, r7] | r1 = *((r5 + r7));
0x0015c9e0 ldr r0, [r6, 8] | r0 = *((r6 + 8));
0x0015c9e4 bl 0x53a14 | r0 = ASN1_BIT_STRING_get_bit ();
0x0015c9e8 cmp r0, 0 |
| if (r0 != 0) {
0x0015c9ec beq 0x15ca24 |
0x0015c9f0 cmp sl, 0 |
0x0015c9f4 add r3, sp, 0x18 | r3 += dest;
| if (sl == 0) {
0x0015c9f8 bne 0x15ca10 |
0x0015c9fc ldr r1, [pc, 0x104] | r1 = *(0x15cb04);
0x0015ca00 mov r0, r3 | r0 = r3;
0x0015ca04 add r1, pc, r1 | r1 = pc + r1;
0x0015ca08 bl 0x4f560 | r0 = strcat (r0, r1)
0x0015ca0c mov r3, r0 | r3 = r0;
| }
0x0015ca10 add r2, sb, r5 | r2 = sb + r5;
0x0015ca14 ldr r1, [r2, 4] | r1 = *((r2 + 4));
0x0015ca18 mov r0, r3 | r0 = r3;
0x0015ca1c bl 0x4f560 | strcat (r0, r1)
0x0015ca20 mov sl, 0 | sl = 0;
| }
0x0015ca24 add r5, r5, 8 | r5 += 8;
0x0015ca28 cmp r5, 0x40 |
0x0015ca2c bne 0x15c9dc |
| } while (r5 != 0x40);
| label_8:
0x0015ca30 add r5, sp, 0x118 | r5 += var_118h;
0x0015ca34 ldrb r3, [r5, -0x100]! | r3 = dest;
0x0015ca38 cmp r3, 0 |
| if (r3 == 0) {
0x0015ca3c bne 0x15ca50 |
0x0015ca40 ldr r1, [pc, 0xc4] | r1 = *(0x15cb08);
0x0015ca44 mov r0, r5 | r0 = r5;
0x0015ca48 add r1, pc, r1 | r1 = pc + r1;
0x0015ca4c bl 0x4f518 | strcpy (r0, r1);
| }
0x0015ca50 ldr r3, [pc, 0xb8] | r3 = *(0x15cb0c);
0x0015ca54 mov r2, 0x6b | r2 = 0x6b;
0x0015ca58 str r3, [sp] | *(sp) = r3;
0x0015ca5c ldr r3, [pc, 0xb0] | r3 = *(0x15cb10);
0x0015ca60 mov r1, 0x68 | r1 = 0x68;
0x0015ca64 add r3, pc, r3 | r3 = pc + r3;
0x0015ca68 mov r0, 0x2f | r0 = 0x2f;
0x0015ca6c bl 0xfc7b8 | ERR_put_error ();
0x0015ca70 cmp r4, 0 |
| if (r4 == 0) {
0x0015ca74 movne r3, r4 | r3 = r4;
| }
| if (r4 != 0) {
0x0015ca78 ldreq r3, [pc, 0x98] | r3 = *((pc + 0x98));
| }
| if (r4 != 0) {
0x0015ca7c addeq r3, pc, r3 | r3 = pc + r3;
| }
0x0015ca80 ldr r2, [pc, 0x94] | r2 = *(0x15cb18);
0x0015ca84 str r3, [sp] | *(sp) = r3;
0x0015ca88 ldr r1, [pc, 0x90] | r1 = *(0x15cb1c);
0x0015ca8c ldr r3, [pc, 0x90] | r3 = *(0x15cb20);
0x0015ca90 add r2, pc, r2 | r2 = pc + r2;
0x0015ca94 str r2, [sp, 4] | var_4h = r2;
0x0015ca98 str r5, [sp, 8] | var_8h = r5;
0x0015ca9c mov r2, r8 | r2 = r8;
0x0015caa0 add r3, pc, r3 | r3 = pc + r3;
0x0015caa4 add r1, pc, r1 | r1 = pc + r1;
0x0015caa8 mov r0, 6 | r0 = 6;
0x0015caac bl 0xfcf84 | ERR_add_error_data ();
0x0015cab0 ldr r1, [pc, 0x70] | r1 = *(0x15cb24);
0x0015cab4 ldr r2, [pc, 0x70] | r2 = *(0x15cb28);
0x0015cab8 add r1, pc, r1 | r1 = pc + r1;
0x0015cabc mov r0, r4 | r0 = r4;
0x0015cac0 bl 0x11842c | CRYPTO_free ();
0x0015cac4 b 0x15c904 | goto label_0;
| label_2:
0x0015cac8 mov r2, r8 | r2 = r8;
0x0015cacc mov r1, r7 | r1 = r7;
0x0015cad0 mov r0, r5 | r0 = r5;
0x0015cad4 bl 0x15c5b0 | r0 = fcn_0015c5b0 (r0, r1);
0x0015cad8 adds r0, r0, 0 | r0 += 0;
| if (r0 == r0) {
0x0015cadc movne r0, 1 | r0 = 1;
| }
| label_7:
0x0015cae0 add sp, sp, 0x11c |
0x0015cae4 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/libcrypto.so.1.1 @ 0x175e1c */
| #include <stdint.h>
|
; (fcn) sym.i2v_GENERAL_NAME () | void i2v_GENERAL_NAME (int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_14h;
| char * s2;
| char * s1;
| int32_t var_120h;
| r1 = arg2;
0x00175e1c push {r4, r5, r6, r7, r8, lr} |
0x00175e20 sub sp, sp, 0x120 |
0x00175e24 str r2, [sp, 0x14] | var_14h = r2;
0x00175e28 ldr r2, [r1] | r2 = *(r1);
0x00175e2c mov r3, r1 | r3 = r1;
0x00175e30 cmp r2, 8 |
| if (r2 > 8) {
| /* switch table (9 cases) at 0x175e3c */
0x00175e34 addls pc, pc, r2, lsl 2 | pc += (r2 << 2);
| }
0x00175e38 b 0x176054 | goto label_6;
0x00175e3c b 0x175e60 | goto label_7;
0x00175e40 b 0x175ebc | goto label_8;
0x00175e44 b 0x175ed8 | goto label_9;
0x00175e48 b 0x175e8c | goto label_10;
0x00175e4c b 0x175f08 | goto label_11;
0x00175e50 b 0x175ea4 | goto label_12;
0x00175e54 b 0x175ef0 | goto label_13;
0x00175e58 b 0x175f38 | goto label_14;
0x00175e5c b 0x17602c | goto label_15;
| label_7:
0x00175e60 ldr r1, [pc, 0x1f4] | r1 = *(0x176058);
0x00175e64 ldr r0, [pc, 0x1f4] | r0 = *(0x17605c);
0x00175e68 add r2, sp, 0x14 | r2 += var_14h;
0x00175e6c add r1, pc, r1 | r1 = pc + r1;
0x00175e70 add r0, pc, r0 | r0 = pc + r0;
| do {
| label_0:
0x00175e74 bl 0x181e74 | r0 = X509V3_add_value ();
| label_1:
0x00175e78 cmp r0, 0 |
| if (r0 != 0) {
0x00175e7c bne 0x176054 | goto label_6;
| }
| label_3:
0x00175e80 mov r0, 0 | r0 = 0;
| label_5:
0x00175e84 add sp, sp, 0x120 |
0x00175e88 pop {r4, r5, r6, r7, r8, pc} |
| label_10:
0x00175e8c ldr r1, [pc, 0x1d0] | r1 = *(0x176060);
0x00175e90 ldr r0, [pc, 0x1d0] | r0 = *(0x176064);
0x00175e94 add r2, sp, 0x14 | r2 += var_14h;
0x00175e98 add r1, pc, r1 | r1 = pc + r1;
0x00175e9c add r0, pc, r0 | r0 = pc + r0;
0x00175ea0 b 0x175e74 |
| } while (1);
| label_12:
0x00175ea4 ldr r1, [pc, 0x1c0] | r1 = *(0x176068);
0x00175ea8 ldr r0, [pc, 0x1c0] | r0 = *(0x17606c);
0x00175eac add r2, sp, 0x14 | r2 += var_14h;
0x00175eb0 add r1, pc, r1 | r1 = pc + r1;
0x00175eb4 add r0, pc, r0 | r0 = pc + r0;
0x00175eb8 b 0x175e74 | goto label_0;
| label_8:
0x00175ebc ldr r3, [r1, 4] | r3 = *((r1 + 4));
0x00175ec0 ldr r0, [pc, 0x1ac] | r0 = *(0x176070);
0x00175ec4 ldr r1, [r3, 8] | r1 = *((r3 + 8));
0x00175ec8 add r2, sp, 0x14 | r2 += var_14h;
0x00175ecc add r0, pc, r0 | r0 = pc + r0;
| do {
| label_2:
0x00175ed0 bl 0x181fc4 | X509V3_add_value_uchar ();
0x00175ed4 b 0x175e78 | goto label_1;
| label_9:
0x00175ed8 ldr r3, [r1, 4] | r3 = *((r1 + 4));
0x00175edc ldr r0, [pc, 0x194] | r0 = *(0x176074);
0x00175ee0 add r2, sp, 0x14 | r2 += var_14h;
0x00175ee4 ldr r1, [r3, 8] | r1 = *((r3 + 8));
0x00175ee8 add r0, pc, r0 | r0 = pc + r0;
0x00175eec b 0x175ed0 |
| } while (1);
| label_13:
0x00175ef0 ldr r3, [r1, 4] | r3 = *((r1 + 4));
0x00175ef4 ldr r0, [pc, 0x180] | r0 = *(0x176078);
0x00175ef8 add r2, sp, 0x14 | r2 += var_14h;
0x00175efc ldr r1, [r3, 8] | r1 = *((r3 + 8));
0x00175f00 add r0, pc, r0 | r0 = pc + r0;
0x00175f04 b 0x175ed0 | goto label_2;
| label_11:
0x00175f08 add r4, sp, 0x20 | r4 += s1;
0x00175f0c mov r2, 0x100 | r2 = 0x100;
0x00175f10 mov r1, r4 | r1 = r4;
0x00175f14 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00175f18 bl 0x165a2c | r0 = X509_NAME_oneline ();
0x00175f1c cmp r0, 0 |
| if (r0 == 0) {
0x00175f20 beq 0x175e80 | goto label_3;
| }
0x00175f24 ldr r0, [pc, 0x154] | r0 = *(0x17607c);
0x00175f28 add r2, sp, 0x14 | r2 += var_14h;
0x00175f2c mov r1, r4 | r1 = r4;
0x00175f30 add r0, pc, r0 | r0 = pc + r0;
0x00175f34 b 0x175e74 | goto label_0;
| label_14:
0x00175f38 ldr r3, [r1, 4] | r3 = *((r1 + 4));
0x00175f3c ldr r4, [r3, 8] | r4 = *((r3 + 8));
0x00175f40 ldr r3, [r3] | r3 = *(r3);
0x00175f44 cmp r3, 4 |
| if (r3 == 4) {
0x00175f48 bne 0x175f90 |
0x00175f4c ldrb r2, [r4, 3] | r2 = *((r4 + 3));
0x00175f50 ldrb r3, [r4] | r3 = *(r4);
0x00175f54 str r2, [sp, 8] | var_8h = r2;
0x00175f58 ldrb r2, [r4, 2] | r2 = *((r4 + 2));
0x00175f5c mov r1, 0x100 | r1 = 0x100;
0x00175f60 str r2, [sp, 4] | var_4h = r2;
0x00175f64 ldrb r2, [r4, 1] | r2 = *((r4 + 1));
0x00175f68 add r0, sp, 0x20 | r0 += s1;
0x00175f6c str r2, [sp] | *(sp) = r2;
0x00175f70 ldr r2, [pc, 0x10c] | r2 = *(0x176080);
0x00175f74 add r2, pc, r2 | r2 = pc + r2;
0x00175f78 bl 0x6bc48 | BIO_snprintf ();
| label_4:
0x00175f7c ldr r0, [pc, 0x104] | r0 = *(0x176084);
0x00175f80 add r2, sp, 0x14 | r2 += var_14h;
0x00175f84 add r1, sp, 0x20 | r1 += s1;
0x00175f88 add r0, pc, r0 | r0 = pc + r0;
0x00175f8c b 0x175e74 | goto label_0;
| }
0x00175f90 cmp r3, 0x10 |
| if (r3 != 0x10) {
0x00175f94 bne 0x176014 | goto label_16;
| }
0x00175f98 ldr r7, [pc, 0xec] | r7 = *(0x176088);
0x00175f9c ldr r8, [pc, 0xec] | r8 = *(0x17608c);
0x00175fa0 mov r5, 0 | r5 = 0;
0x00175fa4 add r7, pc, r7 | r7 = pc + r7;
0x00175fa8 add r6, sp, 0x18 | r6 += s2;
0x00175fac add r8, pc, r8 | r8 = pc + r8;
0x00175fb0 strb r5, [sp, 0x20] | s1 = r5;
| do {
0x00175fb4 ldrb r2, [r4, 1] | r2 = *((r4 + 1));
0x00175fb8 ldrb r3, [r4] | r3 = *(r4);
0x00175fbc mov r1, 5 | r1 = 5;
0x00175fc0 orr r3, r3, r2, lsl 8 | r3 |= (r2 << 8);
0x00175fc4 lsr r2, r3, 8 | r2 = r3 >> 8;
0x00175fc8 orr r3, r2, r3, lsl 8 | r3 = r2 | (r3 << 8);
0x00175fcc lsl r3, r3, 0x10 | r3 <<= 0x10;
0x00175fd0 lsr r3, r3, 0x10 | r3 >>= 0x10;
0x00175fd4 mov r2, r7 | r2 = r7;
0x00175fd8 mov r0, r6 | r0 = r6;
0x00175fdc bl 0x6bc48 | BIO_snprintf ();
0x00175fe0 add r3, sp, 0x20 | r3 += s1;
0x00175fe4 mov r1, r6 | r1 = r6;
0x00175fe8 mov r0, r3 | r0 = r3;
0x00175fec bl 0x4f560 | strcat (r0, r1)
0x00175ff0 cmp r5, 7 |
0x00175ff4 add r4, r4, 2 | r4 += 2;
| if (r5 != 7) {
0x00175ff8 beq 0x176004 |
0x00175ffc mov r1, r8 | r1 = r8;
0x00176000 bl 0x4f560 | strcat (r0, r1)
| }
0x00176004 add r5, r5, 1 | r5++;
0x00176008 cmp r5, 8 |
0x0017600c bne 0x175fb4 |
| } while (r5 != 8);
0x00176010 b 0x175f7c | goto label_4;
| label_16:
0x00176014 ldr r1, [pc, 0x78] | r1 = *(0x176090);
0x00176018 ldr r0, [pc, 0x78] | r0 = *(0x176094);
0x0017601c add r2, sp, 0x14 | r2 += var_14h;
0x00176020 add r1, pc, r1 | r1 = pc + r1;
0x00176024 add r0, pc, r0 | r0 = pc + r0;
0x00176028 b 0x175e74 | goto label_0;
| label_15:
0x0017602c add r4, sp, 0x20 | r4 += s1;
0x00176030 ldr r2, [r1, 4] | r2 = *((r1 + 4));
0x00176034 mov r0, r4 | r0 = r4;
0x00176038 mov r1, 0x100 | r1 = 0x100;
0x0017603c bl 0x55f50 | i2t_ASN1_OBJECT ();
0x00176040 ldr r0, [pc, 0x54] | r0 = *(0x176098);
0x00176044 add r2, sp, 0x14 | r2 += var_14h;
0x00176048 mov r1, r4 | r1 = r4;
0x0017604c add r0, pc, r0 | r0 = pc + r0;
0x00176050 b 0x175e74 | goto label_0;
| label_6:
0x00176054 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00176058 b 0x175e84 | 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/libcrypto.so.1.1 @ 0x1760a0 */
| #include <stdint.h>
|
; (fcn) sym.i2v_GENERAL_NAMES () | void i2v_GENERAL_NAMES (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x001760a0 push {r4, r5, r6, r7, r8, lr} |
0x001760a4 mov r7, r0 | r7 = r0;
0x001760a8 mov r6, r1 | r6 = r1;
0x001760ac mov r4, r2 | r4 = r2;
0x001760b0 mov r5, 0 | r5 = 0;
| do {
0x001760b4 mov r0, r6 | r0 = r6;
0x001760b8 bl 0x154518 | r0 = OPENSSL_sk_num ();
0x001760bc cmp r5, r0 |
| if (r5 >= r0) {
0x001760c0 blt 0x1760d4 |
0x001760c4 cmp r4, 0 |
| if (r4 != 0) {
0x001760c8 bne 0x1760fc | goto label_0;
| }
0x001760cc pop {r4, r5, r6, r7, r8, lr} |
0x001760d0 b 0x1544bc | void (*0x1544bc)() ();
| }
0x001760d4 mov r1, r5 | r1 = r5;
0x001760d8 mov r0, r6 | r0 = r6;
0x001760dc bl 0x154528 | OPENSSL_sk_value ();
0x001760e0 mov r2, r4 | r2 = r4;
0x001760e4 add r5, r5, 1 | r5++;
0x001760e8 mov r1, r0 | r1 = r0;
0x001760ec mov r0, r7 | r0 = r7;
0x001760f0 bl 0x175e1c | r0 = i2v_GENERAL_NAME ();
0x001760f4 mov r4, r0 | r4 = r0;
0x001760f8 b 0x1760b4 |
| } while (1);
| label_0:
0x001760fc mov r0, r4 | r0 = r4;
0x00176100 pop {r4, r5, r6, r7, r8, pc} |
| }
[*] Function strcat used 9 times libcrypto.so.1.1