[*] Binary protection state of libtsocks.so.1.8
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function popen tear down of libtsocks.so.1.8
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libtsocks.so.1.8 @ 0x18b0 */
| #include <stdint.h>
|
; (fcn) sym._init () | void init () {
0x000018b0 b.w 0xdd0 | return void (*0xdd0)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libtsocks.so.1.8 @ 0x22d4 */
| #include <stdint.h>
|
; (fcn) sym.close () | void close (int32_t fildes) {
| r0 = fildes;
0x000022d4 push {r4, r5, r6, lr} |
0x000022d6 mov r5, r0 | r5 = r0;
0x000022d8 ldr r4, [pc, 0x98] |
0x000022da add r4, pc | r4 = 0x4652;
0x000022dc ldr r3, [r4, 0x10] | r3 = *(0x4662);
| if (r3 == 0) {
0x000022de cbz r3, 0x233c | goto label_2;
| }
| label_0:
0x000022e0 ldr r4, [pc, 0x94] |
0x000022e2 mov r2, r5 | r2 = r5;
0x000022e4 ldr r1, [pc, 0x94] |
0x000022e6 movs r0, 2 | r0 = 2;
0x000022e8 add r4, pc |
0x000022ea add r1, pc | r1 = 0x466a;
0x000022ec blx 0xc68 | fcn_00000c68 ();
0x000022f0 ldr r3, [r4, 0x10] | r3 = *(0x4674);
0x000022f2 mov r0, r5 | r0 = r5;
0x000022f4 blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x000022f6 ldr r4, [r4, 0x18] | r4 = *(0x467c);
0x000022f8 mov r6, r0 | r6 = r0;
| if (r4 != 0) {
0x000022fa cbnz r4, 0x2304 | goto label_3;
| }
0x000022fc b 0x2338 | goto label_1;
| do {
0x000022fe ldr.w r4, [r4, 0x440] | r4 = *((r4 + 0x440));
| if (r4 == 0) {
0x00002302 cbz r4, 0x2338 | goto label_1;
| }
| label_3:
0x00002304 ldr r3, [r4] | r3 = *(r4);
0x00002306 cmp r5, r3 |
0x00002308 bne 0x22fe |
| } while (r5 != r3);
0x0000230a ldr r1, [pc, 0x74] |
0x0000230c mov r2, r5 | r2 = r5;
0x0000230e ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00002310 movs r0, 2 | r0 = 2;
0x00002312 add r1, pc | r1 = 0x4698;
0x00002314 blx 0xc68 | fcn_00000c68 ();
0x00002316 vstmia r8!, {s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31} | __asm ("vstmia r8!, {s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31}");
0x0000231a add r2, pc | r2 += pc;
0x0000231c ldr r3, [r2, 0x18] | r3 = *((r2 + 0x18));
0x0000231e cmp r3, r4 |
| if (r3 == r4) {
0x00002320 beq 0x2354 | goto label_4;
| }
| if (r3 == 0) {
0x00002322 cbz r3, 0x2332 | goto label_5;
| }
| do {
0x00002324 ldr.w r2, [r3, 0x440] | r2 = *((r3 + 0x440));
0x00002328 cmp r2, r4 |
| if (r2 == r4) {
0x0000232a beq 0x2362 | goto label_6;
| }
0x0000232c mov r3, r2 | r3 = r2;
0x0000232e cmp r3, 0 |
0x00002330 bne 0x2324 |
| } while (r3 != 0);
| label_5:
0x00002332 mov r0, r4 | r0 = r4;
0x00002334 blx 0xbc8 | free (r0);
| label_1:
0x00002338 mov r0, r6 | r0 = r6;
0x0000233a pop {r4, r5, r6, pc} |
| label_2:
0x0000233c bl 0xdd0 | entry0 ();
0x00002340 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00002342 cmp r0, 0 |
| if (r0 != 0) {
0x00002344 bne 0x22e0 | goto label_0;
| }
0x00002346 ldr r1, [pc, 0x40] |
0x00002348 mov.w r6, -1 | r6 = -1;
0x0000234c add r1, pc | r1 = 0x46da;
0x0000234e blx 0xc68 | fcn_00000c68 ();
0x00002352 b 0x2338 | goto label_1;
| label_4:
0x00002354 ldr.w r3, [r4, 0x440] | r3 = *((r4 + 0x440));
0x00002358 mov r0, r4 | r0 = r4;
0x0000235a str r3, [r2, 0x18] | *((r2 + 0x18)) = r3;
0x0000235c blx 0xbc8 | free (r0);
0x0000235e ldc p7, c14, [r4], -0x3a8 | __asm ("ldc p7, c14, [r4], -aav.0x000000ff");
| label_6:
0x00002362 ldr.w r2, [r4, 0x440] | r2 = *((r4 + 0x440));
0x00002366 mov r0, r4 | r0 = r4;
0x00002368 str.w r2, [r3, 0x440] | __asm ("str.w r2, aav.0x000000ff");
0x0000236c blx 0xbc8 | free (r0);
0x0000236e stc p7, c14, [ip], -0x388 | __asm ("stc p7, c14, [ip], -aav.0x000000ff");
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libtsocks.so.1.8 @ 0x18b4 */
| #include <stdint.h>
|
; (fcn) sym.connect () | void connect (void * addr, size_t addrlen, int32_t socket) {
| int16_t var_0h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_2ch;
| int16_t var_2eh;
| void * in;
| int32_t var_34h;
| int32_t var_34h_2;
| int16_t var_3ch;
| r1 = addr;
| r2 = addrlen;
| r0 = socket;
0x000018b4 mvnsmi lr, 0xb4000 | __asm ("mvnsmi lr, aav.0x000000ff");
0x000018b8 mov r6, r1 | r6 = r1;
0x000018ba ldr r3, [pc, 0x3c8] |
0x000018bc mov r8, r2 | r8 = r2;
0x000018be sub sp, 0x44 |
0x000018c0 mov.w r4, -1 | r4 = -1;
0x000018c4 ldr r1, [pc, 0x3c0] |
0x000018c6 mov r5, r0 | r5 = r0;
0x000018c8 ldr r2, [pc, 0x3c0] | r2 = *(0x1c8c);
0x000018ca add r3, pc |
0x000018cc ldr r3, [r3, 0x14] | r3 = *(0x3568);
0x000018ce add r1, pc | r1 = 0x355a;
0x000018d0 ldr r2, [r1, r2] |
0x000018d2 movs r1, 0x10 | r1 = 0x10;
0x000018d4 ldr r2, [r2] | r2 = *(0x355a);
0x000018d6 str r2, [sp, 0x3c] | var_3ch = r2;
0x000018d8 mov.w r2, 0 | r2 = 0;
0x000018dc movs r2, 4 | r2 = 4;
0x000018de str r4, [sp, 0xc] | var_ch = r4;
0x000018e0 strd r1, r2, [sp, 0x10] | __asm ("strd r1, r2, [var_14h]");
| if (r3 == 0) {
0x000018e4 cbnz r3, 0x18ea |
0x000018e6 bl 0x1588 | fcn_00001588 ();
| }
0x000018ea ldr r4, [pc, 0x3a4] |
0x000018ec add r4, pc | r4 = 0x3582;
0x000018ee ldr r3, [r4, 4] | r3 = *(0x3586);
0x000018f0 cmp r3, 0 |
| if (r3 == 0) {
0x000018f2 beq 0x19e0 | goto label_11;
| }
| label_0:
0x000018f4 ldr r1, [pc, 0x39c] |
0x000018f6 movs r0, 2 | r0 = 2;
0x000018f8 add r1, pc | r1 = 0x3590;
0x000018fa blx 0xc68 | fcn_00000c68 ();
0x000018fe add r1, sp, 0x14 | r1 += var_14h;
0x00001900 add r3, sp, 0xc | r3 += var_ch;
0x00001902 str r1, [sp] | *(sp) = r1;
0x00001904 movs r2, 3 | r2 = 3;
0x00001906 movs r1, 1 | r1 = 1;
0x00001908 mov r0, r5 | r0 = r5;
0x0000190a blx 0xc4c | getsockopt ();
0x0000190e ldrh r3, [r6] | r3 = *(r6);
0x00001910 cmp r3, 2 |
| if (r3 == 2) {
0x00001912 bne 0x191a |
0x00001914 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00001916 cmp r3, 1 |
| if (r3 == 1) {
0x00001918 beq 0x1952 | goto label_12;
| }
| }
0x0000191a ldr r1, [pc, 0x37c] |
0x0000191c movs r0, 2 | r0 = 2;
0x0000191e add r1, pc | r1 = 0x35bc;
0x00001920 blx 0xc68 | fcn_00000c68 ();
0x00001924 ldr r3, [pc, 0x374] |
0x00001926 add r3, pc | r3 = 0x35c6;
| label_7:
0x00001928 ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x0000192a mov r2, r8 | r2 = r8;
0x0000192c mov r1, r6 | r1 = r6;
0x0000192e mov r0, r5 | r0 = r5;
0x00001930 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00001932 mov r7, r0 | r7 = r0;
| label_1:
0x00001934 ldr r2, [pc, 0x368] |
0x00001936 ldr r3, [pc, 0x354] | r3 = *(0x1c8e);
0x00001938 add r2, pc | r2 = 0x35dc;
0x0000193a ldr r3, [r2, r3] | r3 = *(0x35dc);
0x0000193c ldr r2, [r3] | r2 = *(0x35dc);
0x0000193e ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x00001940 eors r2, r3 | r2 ^= r3;
0x00001942 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00001946 bne.w 0x1c46 | goto label_13;
| }
0x0000194a mov r0, r7 | r0 = r7;
0x0000194c add sp, 0x44 |
0x0000194e pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_12:
0x00001952 ldr r4, [pc, 0x350] |
0x00001954 add r4, pc | r4 = 0x35fe;
0x00001956 ldr r3, [r4, 0x1c] | r3 = *(0x361a);
| if (r3 == 0) {
0x00001958 cbnz r3, 0x1992 |
0x0000195a ldr r3, [r4] | r3 = *(r4);
0x0000195c cmp r3, 0 |
| if (r3 == 0) {
0x0000195e beq.w 0x1bb0 | goto label_14;
| }
| label_6:
0x00001962 ldr r4, [pc, 0x344] |
0x00001964 movs r0, 0x28 | r0 = 0x28;
0x00001966 blx 0xc8c | fcn_00000c8c ();
0x00001968 invalid |
0x0000196c add r4, pc | r4 = 0x361a;
0x0000196e str r0, [r4, 0x24] | *((r4 + 0x24)) = r0;
| if (r0 == 0) {
0x00001970 cbz r0, 0x1992 | goto label_15;
| }
0x00001972 ldr r0, [r4, 0x20] | r0 = *((r4 + 0x20));
0x00001974 blx 0xd4c | fcn_00000d4c ();
0x00001978 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x0000197a ldr r3, [r3, 0x24] | r3 = *((r3 + 0x24));
| if (r3 != 0) {
0x0000197c cbz r3, 0x198a |
0x0000197e ldr r1, [pc, 0x32c] |
0x00001980 movs r0, 2 | r0 = 2;
0x00001982 ldr r2, [r3] | r2 = *(r3);
0x00001984 add r1, pc | r1 = 0x3636;
0x00001986 blx 0xc68 | fcn_00000c68 ();
| }
0x0000198a ldr r3, [pc, 0x324] |
0x0000198c movs r2, 1 | r2 = 1;
0x0000198e add r3, pc | r3 = 0x3644;
0x00001990 str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
| }
| label_15:
0x00001992 ldr r3, [pc, 0x320] |
0x00001994 add r3, pc | r3 = 0x364e;
0x00001996 ldr r4, [r3, 0x18] | r4 = *(0x3666);
| if (r4 != 0) {
0x00001998 cbnz r4, 0x19a2 | goto label_16;
| }
0x0000199a b 0x1a06 | goto label_17;
| do {
0x0000199c ldr.w r4, [r4, 0x440] | r4 = *((r4 + 0x440));
| if (r4 == 0) {
0x000019a0 cbz r4, 0x1a06 | goto label_17;
| }
| label_16:
0x000019a2 ldr r3, [r4] | r3 = *(r4);
0x000019a4 cmp r5, r3 |
0x000019a6 bne 0x199c |
| } while (r5 != r3);
0x000019a8 movs r2, 0x10 | r2 = 0x10;
0x000019aa mov r1, r6 | r1 = r6;
0x000019ac adds r0, r4, 4 | r0 = r4 + 4;
0x000019ae blx 0xbf8 | r0 = memcmp (r0, r1, r2);
0x000019b2 mov r7, r0 | r7 = r0;
0x000019b4 cmp r0, 0 |
| if (r0 == 0) {
0x000019b6 beq.w 0x1b0c | goto label_18;
| }
0x000019ba ldr r1, [pc, 0x2fc] |
0x000019bc mov r2, r5 | r2 = r5;
0x000019be movs r0, 2 | r0 = 2;
0x000019c0 add r1, pc | r1 = 0x367e;
0x000019c2 blx 0xc68 | fcn_00000c68 ();
0x000019c6 ldr r2, [pc, 0x2f4] |
0x000019c8 add r2, pc | r2 = 0x368a;
0x000019ca ldr r3, [r2, 0x18] | r3 = *(0x36a2);
0x000019cc cmp r4, r3 |
| if (r4 == r3) {
0x000019ce beq.w 0x1b5a | goto label_19;
| }
| if (r3 == 0) {
| do {
0x000019d2 cbz r3, 0x1a00 | goto label_2;
| }
0x000019d4 ldr.w r2, [r3, 0x440] | r2 = *((r3 + 0x440));
0x000019d8 cmp r4, r2 |
| if (r4 == r2) {
0x000019da beq 0x19f8 | goto label_20;
| }
0x000019dc mov r3, r2 | r3 = r2;
0x000019de b 0x19d2 |
| } while (1);
| label_11:
0x000019e0 bl 0xdd0 | entry0 ();
0x000019e4 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x000019e6 cmp r0, 0 |
| if (r0 != 0) {
0x000019e8 bne 0x18f4 | goto label_0;
| }
0x000019ea ldr r1, [pc, 0x2d4] |
0x000019ec mov.w r7, -1 | r7 = -1;
0x000019f0 add r1, pc | r1 = 0x36b6;
0x000019f2 blx 0xc68 | fcn_00000c68 ();
0x000019f6 b 0x1934 | goto label_1;
| label_20:
0x000019f8 ldr.w r2, [r4, 0x440] | r2 = *((r4 + 0x440));
0x000019fc str.w r2, [r3, 0x440] | __asm ("str.w r2, aav.0x000000ff");
| label_2:
0x00001a00 mov r0, r4 | r0 = r4;
0x00001a02 blx 0xbc8 | free (r0);
| label_17:
0x00001a06 add r2, sp, 0x10 | r2 += var_10h;
0x00001a08 add r1, sp, 0x1c | r1 += var_1ch;
0x00001a0a mov r0, r5 | r0 = r5;
0x00001a0c blx 0xd64 | r0 = fcn_00000d64 ();
0x00001a10 cmp r0, 0 |
| if (r0 == 0) {
0x00001a12 beq.w 0x1bbc | goto label_21;
| }
0x00001a16 ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x00001a18 adds r7, r6, 4 | r7 = r6 + 4;
0x00001a1a blx 0xc04 | inet_ntoa (r0);
0x00001a1c ldrd r8, r8, [r4], 0x1c8 | __asm ("ldrd r8, r8, [r4], aav.0x000000ff");
0x00001a1e ldrh r2, [r6, 2] | r2 = *((r6 + 2));
0x00001a20 mov r3, r0 | r3 = r0;
0x00001a22 ldr r4, [pc, 0x2a0] |
0x00001a24 movs r0, 2 | r0 = 2;
0x00001a26 ldr r1, [pc, 0x2a0] |
0x00001a28 rev16 r2, r2 | __asm ("rev16 r2, r2");
0x00001a2a uxth r2, r2 | r2 = (int16_t) r2;
0x00001a2c add r4, pc | r4 = 0x36f6;
0x00001a2e add r1, pc | r1 = 0x36fc;
0x00001a30 str r2, [sp] | *(sp) = r2;
0x00001a32 mov r2, r5 | r2 = r5;
0x00001a34 blx 0xc68 | fcn_00000c68 ();
0x00001a38 ldr r0, [r4, 0x24] | r0 = *(0x371a);
0x00001a3a mov r1, r7 | r1 = r7;
0x00001a3c blx 0xc74 | r0 = fcn_00000c74 ();
0x00001a40 cmp r0, 0 |
| if (r0 == 0) {
0x00001a42 beq.w 0x1bcc | goto label_22;
| }
0x00001a46 ldrh r3, [r6, 2] | r3 = *((r6 + 2));
0x00001a48 mov r2, r7 | r2 = r7;
0x00001a4a ldr r0, [r4, 0x24] | r0 = *((r4 + 0x24));
0x00001a4c add r1, sp, 0x18 | r1 += var_18h;
0x00001a4e rev16 r3, r3 | __asm ("rev16 r3, r3");
0x00001a50 uxth r3, r3 | r3 = (int16_t) r3;
0x00001a52 blx 0xce0 | fcn_00000ce0 ();
0x00001a56 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00001a58 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00001a5a cmp r2, 0 |
| if (r2 == 0) {
0x00001a5c beq.w 0x1b7a | goto label_23;
| }
| label_4:
0x00001a60 ldr r1, [pc, 0x268] |
0x00001a62 movs r0, 2 | r0 = 2;
0x00001a64 add r1, pc | r1 = 0x3734;
0x00001a66 blx 0xc68 | fcn_00000c68 ();
0x00001a6a ldr r3, [sp, 0x18] | r3 = var_18h;
0x00001a6c ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00001a6e cmp r0, 0 |
| if (r0 == 0) {
0x00001a70 beq.w 0x1c4a | goto label_24;
| }
0x00001a74 movs r2, 1 | r2 = 1;
0x00001a76 movs r1, 0 | r1 = 0;
0x00001a78 blx 0xd28 | r0 = fcn_00000d28 ();
0x00001a7c adds r2, r0, 1 | r2 = r0 + 1;
0x00001a7e ldr r3, [sp, 0x18] | r3 = var_18h;
| if (r2 == r0) {
0x00001a80 beq.w 0x1c62 | goto label_25;
| }
0x00001a84 ldr r7, [pc, 0x248] |
0x00001a86 movs r4, 0 | r4 = 0;
0x00001a88 ldr r3, [r3, 8] | r3 = *((r3 + 8));
0x00001a8a movs r2, 2 | r2 = 2;
0x00001a8c str r0, [sp, 0x30] | in = r0;
0x00001a8e add r1, sp, 0x30 | r1 += in;
0x00001a90 add r7, pc | r7 = 0x3764;
0x00001a92 add.w r8, sp, 0x2c | r8 += var_2ch;
0x00001a96 rev16 r3, r3 | __asm ("rev16 r3, r3");
0x00001a98 ldr r0, [r7, 0x24] | r0 = *(0x3788);
0x00001a9a strh.w r2, [sp, 0x2c] | var_2ch = r2;
0x00001a9e strd r4, r4, [sp, 0x34] | __asm ("strd r4, r4, [var_34h]");
0x00001aa2 strh.w r3, [sp, 0x2e] | var_2eh = r3;
0x00001aa6 blx 0xc74 | fcn_00000c74 ();
0x00001aa8 strd r2, r8, [r6], 0 | __asm ("strd r2, r8, [r6], 0");
| if (r2 != 2) {
0x00001aac bne.w 0x1c20 | goto label_26;
| }
0x00001ab0 movs r1, 1 | r1 = 1;
0x00001ab2 movw r0, 0x444 | r0 = 0x444;
0x00001ab6 ldr.w sb, [sp, 0x18] | sb = var_18h;
0x00001aba blx 0xb5c | r0 = calloc (r0, r1);
0x00001abe mov r4, r0 | r4 = r0;
0x00001ac0 cmp r0, 0 |
| if (r0 == 0) {
0x00001ac2 beq.w 0x1c7a | goto label_27;
| }
0x00001ac6 str r5, [r0] | *(r0) = r5;
0x00001ac8 adds r5, r0, 4 | r5 = r0 + 4;
0x00001aca str.w sb, [r0, 0x24] | __asm ("str.w sb, [r0, 0x24]");
0x00001ace ldr r1, [r6, 4] | r1 = *((r6 + 4));
0x00001ad0 ldr r0, [r6] | r0 = *(r6);
0x00001ad2 ldr r2, [r6, 8] | r2 = *((r6 + 8));
0x00001ad4 ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00001ad6 ldr r6, [r7, 0x18] | r6 = *((r7 + 0x18));
0x00001ad8 str r4, [r7, 0x18] | *((r7 + 0x18)) = r4;
0x00001ada stm r5!, {r0, r1, r2, r3} | *(r5!) = r0;
| *((r5! + 4)) = r1;
| *((r5! + 8)) = r2;
| *((r5! + 12)) = r3;
0x00001adc add.w r5, r4, 0x14 | r5 = r4 + 0x14;
0x00001ae0 ldm.w r8, {r0, r1, r2, r3} | r0 = *(r8);
| r1 = *((r8 + 4));
| r2 = *((r8 + 8));
| r3 = *((r8 + 12));
0x00001ae4 stm.w r5, {r0, r1, r2, r3} | *(r5) = r0;
| *((r5 + 4)) = r1;
| *((r5 + 8)) = r2;
| *((r5 + 12)) = r3;
0x00001ae6 movs r7, r1 | r7 = r1;
0x00001ae8 mov r0, r4 | r0 = r4;
0x00001aea str.w r6, [r4, 0x440] | __asm ("str.w r6, aav.0x000000ff");
0x00001aee bl 0xea0 | fcn_00000ea0 (r0);
0x00001af2 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00001af4 mov r5, r0 | r5 = r0;
0x00001af6 subs r3, 0xd | r3 -= 0xd;
0x00001af8 cmp r3, 1 |
| if (r3 < 1) {
0x00001afa bls 0x1b80 | goto label_28;
| }
| label_5:
0x00001afc blx 0xcf8 | fcn_00000cf8 ();
0x00001b00 subs r7, r5, 0 | r7 = r5 - 0;
0x00001b02 str r5, [r0] | *(r0) = r5;
0x00001b04 it ne |
| if (r7 == r5) {
0x00001b06 movne r7, 1 | r7 = 1;
| }
0x00001b08 rsbs r7, r7, 0 | r7 -= ;
0x00001b0a b 0x1934 | goto label_1;
| label_18:
0x00001b0c ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00001b0e cmp r3, 0xe |
| if (r3 == 0xe) {
0x00001b10 beq 0x1be6 | goto label_29;
| }
0x00001b12 cmp r3, 0xd |
| if (r3 == 0xd) {
0x00001b14 beq 0x1b62 | goto label_30;
| }
0x00001b16 ldr r1, [pc, 0x1bc] |
0x00001b18 mov r2, r5 | r2 = r5;
0x00001b1a movs r0, 2 | r0 = 2;
0x00001b1c add r1, pc | r1 = 0x37f6;
0x00001b1e blx 0xc68 | fcn_00000c68 ();
0x00001b22 mov r0, r4 | r0 = r4;
0x00001b24 bl 0xea0 | r0 = fcn_00000ea0 (r0);
0x00001b28 mov r7, r0 | r7 = r0;
0x00001b2a blx 0xcf8 | r0 = fcn_00000cf8 ();
0x00001b2e str r7, [r0] | *(r0) = r7;
0x00001b30 subs r7, 0 |
0x00001b32 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00001b34 it ne |
| if (r7 == 0) {
0x00001b36 movne r7, 1 | r7 = 1;
| }
0x00001b38 rsbs r7, r7, 0 | r7 -= ;
0x00001b3a subs r3, 0xd | r3 -= 0xd;
0x00001b3c cmp r3, 1 |
| if (r3 > 1) {
0x00001b3e bhi.w 0x1934 | goto label_1;
| }
| label_3:
0x00001b42 ldr r2, [pc, 0x194] |
0x00001b44 add r2, pc | r2 = 0x3822;
0x00001b46 ldr r3, [r2, 0x18] | r3 = *(0x383a);
0x00001b48 cmp r4, r3 |
| if (r4 == r3) {
0x00001b4a beq 0x1b94 | goto label_31;
| }
| do {
| if (r3 == 0) {
0x00001b4c cbz r3, 0x1b9a | goto label_8;
| }
0x00001b4e ldr.w r2, [r3, 0x440] | r2 = *((r3 + 0x440));
0x00001b52 cmp r4, r2 |
| if (r4 == r2) {
0x00001b54 beq 0x1c0c | goto label_32;
| }
0x00001b56 mov r3, r2 | r3 = r2;
0x00001b58 b 0x1b4c |
| } while (1);
| label_19:
0x00001b5a ldr.w r3, [r4, 0x440] | r3 = *((r4 + 0x440));
0x00001b5e str r3, [r2, 0x18] | *((r2 + 0x18)) = r3;
0x00001b60 b 0x1a00 | goto label_2;
| label_30:
0x00001b62 ldr r1, [pc, 0x178] |
0x00001b64 mov r2, r5 | r2 = r5;
0x00001b66 ldr r3, [r4, 0x30] | r3 = *((r4 + 0x30));
0x00001b68 add r1, pc | r1 = 0x384a;
0x00001b6a blx 0xc68 | fcn_00000c68 ();
0x00001b6e ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00001b70 subs r3, 0xd | r3 -= 0xd;
0x00001b72 cmp r3, 1 |
| if (r3 > 1) {
0x00001b74 bhi.w 0x1934 | goto label_1;
| }
0x00001b78 b 0x1b42 | goto label_3;
| label_23:
0x00001b7a ldr r2, [pc, 0x164] |
0x00001b7c add r2, pc | r2 = 0x3862;
0x00001b7e b 0x1a60 | goto label_4;
| label_28:
0x00001b80 ldr r3, [r7, 0x18] | r3 = *((r7 + 0x18));
0x00001b82 cmp r4, r3 |
| if (r4 == r3) {
0x00001b84 beq 0x1ba2 | goto label_33;
| }
| do {
| if (r3 == 0) {
0x00001b86 cbz r3, 0x1ba8 | goto label_9;
| }
0x00001b88 ldr.w r2, [r3, 0x440] | r2 = *((r3 + 0x440));
0x00001b8c cmp r4, r2 |
| if (r4 == r2) {
0x00001b8e beq 0x1c16 | goto label_34;
| }
0x00001b90 mov r3, r2 | r3 = r2;
0x00001b92 b 0x1b86 |
| } while (1);
| label_31:
0x00001b94 ldr.w r3, [r4, 0x440] | r3 = *((r4 + 0x440));
0x00001b98 str r3, [r2, 0x18] | *((r2 + 0x18)) = r3;
| label_8:
0x00001b9a mov r0, r4 | r0 = r4;
0x00001b9c blx 0xbc8 | free (r0);
0x00001ba0 b 0x1934 | goto label_1;
| label_33:
0x00001ba2 ldr.w r3, [r4, 0x440] | r3 = *((r4 + 0x440));
0x00001ba6 str r3, [r7, 0x18] | *((r7 + 0x18)) = r3;
| label_9:
0x00001ba8 mov r0, r4 | r0 = r4;
0x00001baa blx 0xbc8 | free (r0);
0x00001bae b 0x1afc | goto label_5;
| label_14:
0x00001bb0 ldr r0, [pc, 0x130] |
0x00001bb2 add r0, pc | r0 = 0x389a;
0x00001bb4 blx 0xc80 | fcn_00000c80 ();
0x00001bb8 str r0, [r4, 0x20] | *((r4 + 0x20)) = r0;
0x00001bba b 0x1962 | goto label_6;
| label_21:
0x00001bbc ldr r1, [pc, 0x128] |
0x00001bbe movs r0, 2 | r0 = 2;
0x00001bc0 add r1, pc | r1 = 0x38ac;
0x00001bc2 blx 0xc68 | fcn_00000c68 ();
0x00001bc4 invalid |
0x00001bc8 add r3, pc | r3 += pc;
0x00001bca b 0x1928 | goto label_7;
| label_22:
0x00001bcc ldr r1, [pc, 0x120] |
0x00001bce mov r2, r5 | r2 = r5;
0x00001bd0 movs r0, 2 | r0 = 2;
0x00001bd2 add r1, pc | r1 = 0x38c6;
0x00001bd4 blx 0xc68 | fcn_00000c68 ();
0x00001bd8 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00001bda mov r2, r8 | r2 = r8;
0x00001bdc mov r1, r6 | r1 = r6;
0x00001bde mov r0, r5 | r0 = r5;
0x00001be0 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00001be2 mov r7, r0 | r7 = r0;
0x00001be4 b 0x1934 | goto label_1;
| label_29:
0x00001be6 ldr r1, [pc, 0x10c] |
0x00001be8 mov r2, r5 | r2 = r5;
0x00001bea ldr r3, [r4, 0x30] | r3 = *((r4 + 0x30));
0x00001bec movs r0, 2 | r0 = 2;
0x00001bee mov.w r7, -1 | r7 = -1;
0x00001bf0 adds r7, 0xff | r7 += 0xff;
0x00001bf2 add r1, pc | r1 = "Connection refused\n";
0x00001bf4 blx 0xc68 | fcn_00000c68 ();
0x00001bf8 blx 0xcf8 | fcn_00000cf8 ();
0x00001bfc ldr r3, [r4, 0x30] | r3 = *((r4 + 0x30));
0x00001bfe str r3, [r0] | *(r0) = r3;
0x00001c00 ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00001c02 subs r3, 0xd | r3 -= 0xd;
0x00001c04 cmp r3, 1 |
| if (r3 > 1) {
0x00001c06 bhi.w 0x1934 | goto label_1;
| }
0x00001c0a b 0x1b42 | goto label_3;
| label_32:
0x00001c0c ldr.w r2, [r4, 0x440] | r2 = *((r4 + 0x440));
0x00001c10 str.w r2, [r3, 0x440] | __asm ("str.w r2, aav.0x000000ff");
0x00001c14 b 0x1b9a | goto label_8;
| label_34:
0x00001c16 ldr.w r2, [r4, 0x440] | r2 = *((r4 + 0x440));
0x00001c1a str.w r2, [r3, 0x440] | __asm ("str.w r2, aav.0x000000ff");
0x00001c1e b 0x1ba8 | goto label_9;
| label_26:
0x00001c20 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00001c22 ldr r0, [sp, 0x30] | r0 = in;
0x00001c24 ldr r5, [r3, 4] | r5 = *((r3 + 4));
0x00001c26 blx 0xc04 | inet_ntoa (r0);
0x00001c2a ldr r1, [pc, 0xcc] |
0x00001c2c mov r3, r0 | r3 = r0;
0x00001c2e mov r2, r5 | r2 = r5;
0x00001c30 mov r0, r4 | r0 = r4;
0x00001c32 add r1, pc | r1 = 0x3930;
0x00001c34 blx 0xc68 | fcn_00000c68 ();
| do {
| label_10:
0x00001c38 blx 0xcf8 | fcn_00000cf8 ();
0x00001c3c movs r3, 0x6f | r3 = 0x6f;
0x00001c3e mov.w r7, -1 | r7 = -1;
0x00001c42 str r3, [r0] | *(r0) = r3;
0x00001c44 b 0x1934 | goto label_1;
| label_13:
0x00001c46 blx 0xc1c | stack_chk_fail ();
| label_24:
0x00001c4a ldr r2, [pc, 0xb0] |
0x00001c4c add r2, pc |
0x00001c4e ldr r2, [r2, 0x24] | r2 = *(0x3972);
0x00001c50 adds r2, 4 | r2 += 4;
0x00001c52 cmp r3, r2 |
| if (r3 == r2) {
0x00001c54 beq 0x1c70 | goto label_35;
| }
0x00001c56 ldr r1, [pc, 0xa8] |
0x00001c58 ldr r2, [r3] | r2 = *(r3);
0x00001c5a add r1, pc | r1 = 0x3960;
0x00001c5c blx 0xc68 | fcn_00000c68 ();
0x00001c60 b 0x1c38 |
| } while (1);
| label_25:
0x00001c62 ldr r1, [pc, 0xa0] |
0x00001c64 movs r0, 0 | r0 = 0;
0x00001c66 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00001c68 add r1, pc | r1 = 0x3972;
0x00001c6a blx 0xc68 | fcn_00000c68 ();
0x00001c6e b 0x1c38 | goto label_10;
| label_35:
0x00001c70 ldr r1, [pc, 0x94] |
0x00001c72 add r1, pc | r1 = 0x397e;
0x00001c74 blx 0xc68 | fcn_00000c68 ();
0x00001c78 b 0x1c38 | goto label_10;
| label_27:
0x00001c7a ldr r1, [pc, 0x90] |
0x00001c7c add r1, pc | r1 = 0x398e;
0x00001c7e blx 0xc68 | fcn_00000c68 ();
0x00001c82 b 0x1c38 | goto label_10;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libtsocks.so.1.8 @ 0x15f0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.poll () | void poll (int16_t arg_0h, int16_t arg_28h, int16_t arg_34h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000015f0 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000015f4 sub sp, 0x2c |
0x000015f6 ldr r4, [pc, 0x274] |
0x000015f8 mov r5, r0 | r5 = r0;
0x000015fa mov r6, r1 | r6 = r1;
0x000015fc str r2, [sp, 0x14] | var_14h = r2;
0x000015fe add r4, pc | r4 = 0x2e70;
0x00001600 ldr r3, [r4, 0xc] | r3 = *(0x2e7c);
0x00001602 cmp r3, 0 |
| if (r3 == 0) {
0x00001604 beq.w 0x1852 | goto label_11;
| }
| label_9:
0x00001608 ldr r3, [pc, 0x264] |
0x0000160a add r3, pc | r3 = 0x2e7e;
0x0000160c ldr r2, [r3, 0x18] | r2 = *(0x2e96);
0x0000160e cmp r2, 0 |
| if (r2 == 0) {
0x00001610 beq.w 0x1842 | goto label_12;
| }
0x00001614 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00001616 cmp r3, 0 |
| if (r3 == 0) {
0x00001618 beq.w 0x1828 | goto label_13;
| }
| label_8:
0x0000161c ldr r1, [sp, 0x14] | r1 = var_14h;
0x0000161e mov r3, r5 | r3 = r5;
0x00001620 mov r2, r6 | r2 = r6;
0x00001622 movs r0, 2 | r0 = 2;
0x00001624 str r1, [sp] | *(sp) = r1;
0x00001626 ldr r1, [pc, 0x24c] |
0x00001628 add r1, pc | r1 = 0x2ea2;
0x0000162a blx 0xc68 | fcn_00000c68 ();
0x0000162e ldr r3, [pc, 0x248] |
0x00001630 movs r2, 0 | r2 = 0;
0x00001632 add r3, pc | r3 = 0x2eb0;
0x00001634 ldr r4, [r3, 0x18] | r4 = *(0x2ec8);
0x00001636 mov r3, r4 | r3 = r4;
| if (r4 == 0) {
0x00001638 cbz r4, 0x1644 | goto label_14;
| }
| do {
0x0000163a str r2, [r3, 0x34] | *((r3 + 0x34)) = r2;
0x0000163c ldr.w r3, [r3, 0x440] | r3 = *((r3 + 0x440));
0x00001640 cmp r3, 0 |
0x00001642 bne 0x163a |
| } while (r3 != 0);
| label_14:
0x00001644 cmp r6, 0 |
| if (r6 == 0) {
0x00001646 beq.w 0x182e | goto label_15;
| }
0x0000164a ldr.w sb, [pc, 0x230] |
0x0000164e movs r1, 0 | r1 = 0;
0x00001650 ldr.w r8, [pc, 0x22c] | r8 = *(0x00001880);
0x00001654 mov r7, r1 | r7 = r1;
0x00001656 add sb, pc | sb = 0x2ed8;
0x00001658 add r8, pc | r8 += pc;
| label_0:
0x0000165a ldr.w r2, [r5, r7, lsl 3] | offset_0 = r7 << 3;
| r2 = *((r5 + offset_0));
| if (r4 != 0) {
0x0000165e cbnz r4, 0x1668 | goto label_16;
| }
0x00001660 b 0x1688 | goto label_17;
| do {
0x00001662 ldr.w r4, [r4, 0x440] | r4 = *((r4 + 0x440));
| if (r4 == 0) {
0x00001666 cbz r4, 0x1688 | goto label_17;
| }
| label_16:
0x00001668 ldr r3, [r4] | r3 = *(r4);
0x0000166a cmp r2, r3 |
0x0000166c bne 0x1662 |
| } while (r2 != r3);
0x0000166e ldr r3, [r4, 0x28] | r3 = *((r4 + 0x28));
0x00001670 subs r3, 0xd | r3 -= 0xd;
0x00001672 cmp r3, 1 |
| if (r3 >= 1) {
0x00001674 bls 0x1688 |
0x00001676 mov r1, sb | r1 = sb;
0x00001678 movs r0, 2 | r0 = 2;
0x0000167a blx 0xc68 | fcn_00000c68 ();
0x0000167e adds r3, r5, 4 | r3 = r5 + 4;
0x00001680 movs r1, 1 | r1 = 1;
0x00001682 ldrsh.w r3, [r3, r7, lsl 3] | offset_1 = r7 << 3;
| r3 = *((r3 + offset_1));
0x00001686 str r3, [r4, 0x34] | *((r4 + 0x34)) = r3;
| }
| label_17:
0x00001688 adds r7, 1 | r7++;
0x0000168a cmp r7, r6 |
| if (r7 != r6) {
0x0000168c beq 0x1694 |
0x0000168e ldr.w r4, [r8, 0x18] | r4 = *((r8 + 0x18));
0x00001692 b 0x165a | goto label_0;
| }
0x00001694 cmp r1, 0 |
| if (r1 == 0) {
0x00001696 beq.w 0x182e | goto label_15;
| }
0x0000169a ldr r3, [pc, 0x1e8] |
0x0000169c add.w r8, r5, r6, lsl 3 | r8 = r5 + (r6 << 3);
0x000016a0 ldr.w sl, [pc, 0x1e4] |
0x000016a4 str r5, [sp, 0x24] | var_24h = r5;
0x000016a6 add r3, pc | r3 = 0x2f30;
0x000016a8 str r3, [sp, 0x1c] | var_1ch = r3;
0x000016aa add sl, pc | sl = 0x2f36;
0x000016ac ldr r3, [pc, 0x1dc] |
0x000016ae add r3, pc | r3 = 0x2f3e;
0x000016b0 str r3, [sp, 0x20] | var_20h = r3;
0x000016b2 ldr r3, [pc, 0x1dc] |
0x000016b4 add r3, pc | r3 = 0x2f4a;
0x000016b6 str r3, [sp, 0x18] | var_18h = r3;
| label_3:
0x000016b8 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000016ba mov r0, r5 | r0 = r5;
0x000016bc ldr r4, [r3, 0x18] | r4 = *((r3 + 0x18));
| label_1:
0x000016be ldr r1, [r0] | r1 = *(r0);
| if (r4 == 0) {
0x000016c0 cbz r4, 0x16fa | goto label_18;
| }
0x000016c2 mov r3, r4 | r3 = r4;
0x000016c4 b 0x16cc |
| while (r1 != r2) {
0x000016c6 ldr.w r3, [r3, 0x440] | r3 = *((r3 + 0x440));
| if (r3 == 0) {
0x000016ca cbz r3, 0x16fa | goto label_18;
| }
0x000016cc ldr r2, [r3] | r2 = *(r3);
0x000016ce cmp r1, r2 |
0x000016d0 bne 0x16c6 |
| }
0x000016d2 ldr r2, [r3, 0x28] | r2 = *((r3 + 0x28));
0x000016d4 sub.w r3, r2, 0xd | r3 = r2 - 0xd;
0x000016d8 cmp r3, 1 |
| if (r3 >= 1) {
0x000016da bls 0x16fa |
0x000016dc bic r3, r2, 2 | r3 = BIT_MASK (r2, 2);
0x000016e0 cmp r2, 4 |
0x000016e2 sub.w r3, r3, 1 | r3--;
0x000016e6 clz r3, r3 | r3 &= r3;
0x000016ea lsr.w r3, r3, 5 | r3 >>= 5;
0x000016ee lsl.w r3, r3, 2 | r3 <<= 2;
0x000016f2 it eq |
| if (r2 != 4) {
0x000016f4 orreq r3, r3, 1 | r3 |= 1;
| }
0x000016f8 strh r3, [r0, 4] | *((r0 + 4)) = r3;
| }
| label_18:
0x000016fa adds r0, 8 | r0 += 8;
0x000016fc cmp r8, r0 |
| if (r8 != r0) {
0x000016fe bne 0x16be | goto label_1;
| }
0x00001700 ldr r4, [sp, 0x20] | r4 = var_20h;
0x00001702 mov r1, r6 | r1 = r6;
0x00001704 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00001706 mov r0, r5 | r0 = r5;
0x00001708 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0000170a blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0000170c subs.w sb, r0, 0 | sb = r0 - 0;
| if (sb <= r0) {
0x00001710 ble 0x179a | goto label_19;
| }
0x00001712 ldr r7, [r4, 0x18] | r7 = *((r4 + 0x18));
0x00001714 cmp r7, 0 |
| if (r7 == 0) {
0x00001716 beq 0x179a | goto label_19;
| }
0x00001718 ldr r3, [pc, 0x178] |
0x0000171a add r3, pc | r3 = 0x2fb2;
0x0000171c strd r8, r3, [sp, 0xc] | __asm ("strd r8, r3, [var_ch]");
| label_2:
0x00001720 mov fp, r7 |
0x00001722 ldr.w r7, [r7, 0x440] | r7 = *((r7 + 0x440));
0x00001726 ldr.w r2, [fp, 0x28] | r2 = *(arg_28h);
0x0000172a subs r2, 0xd | r2 -= 0xd;
0x0000172c cmp r2, 1 |
| if (r2 < 1) {
0x0000172e bls 0x178c | goto label_20;
| }
0x00001730 ldr.w r2, [fp] | r2 = *(fp);
0x00001734 movs r4, 0 | r4 = 0;
0x00001736 b 0x173e |
| while (r3 != r2) {
0x00001738 adds r4, 1 | r4++;
0x0000173a cmp r4, r6 |
| if (r4 == r6) {
0x0000173c beq 0x1746 | goto label_21;
| }
0x0000173e ldr.w r3, [r5, r4, lsl 3] | offset_2 = r4 << 3;
| r3 = *((r5 + offset_2));
0x00001742 cmp r3, r2 |
0x00001744 bne 0x1738 |
| }
| label_21:
0x00001746 cmp r6, r4 |
| if (r6 != r4) {
0x00001748 beq 0x178c |
0x0000174a add.w r4, r5, r4, lsl 3 | r4 = r5 + (r4 << 3);
0x0000174e mov r1, sl | r1 = sl;
0x00001750 movs r0, 2 | r0 = 2;
0x00001752 blx 0xc68 | fcn_00000c68 ();
0x00001756 ldrsh.w r8, [r4, 6] | r8 = *((r4 + 6));
0x0000175a cmp.w r8, 0 |
| if (r8 == 0) {
0x0000175e beq 0x1816 | goto label_22;
| }
0x00001760 tst.w r8, 1 |
| if ((r8 & 1) != 0) {
0x00001764 bne 0x17fe | goto label_23;
| }
| label_7:
0x00001766 tst.w r8, 4 |
| if ((r8 & 4) != 0) {
0x0000176a bne 0x17e8 | goto label_24;
| }
| label_6:
0x0000176c tst.w r8, 0x38 |
| if ((r8 & 0x38) != 0) {
0x00001770 bne 0x17d4 | goto label_25;
| }
0x00001772 mov r0, fp | r0 = fp;
0x00001774 bl 0xea0 | fcn_00000ea0 (r0);
0x00001778 ldr.w r2, [fp, 0x28] | r2 = *(arg_28h);
0x0000177c cmp r2, 0xd |
| if (r2 != 0xd) {
0x0000177e bne 0x178c | goto label_20;
| }
0x00001780 ldr.w r3, [fp, 0x34] | r3 = *(arg_34h);
0x00001784 lsls r3, r3, 0x1e | r3 <<= 0x1e;
0x00001786 it mi |
| if (r3 < r3) {
0x00001788 addmi sb, sb, 1 | sb++;
| goto label_20;
| }
| }
| label_20:
0x0000178c cmp r7, 0 |
| if (r7 != 0) {
0x0000178e bne 0x1720 | goto label_2;
| }
| label_5:
0x00001790 ldr.w r8, [sp, 0xc] | r8 = var_ch;
0x00001794 cmp.w sb, 0 |
| if (sb == 0) {
0x00001798 beq 0x16b8 | goto label_3;
| }
| label_19:
0x0000179a ldr r1, [pc, 0xfc] |
0x0000179c movs r0, 2 | r0 = 2;
0x0000179e mov r2, sb | r2 = sb;
0x000017a0 add r1, pc | r1 = 0x303e;
0x000017a2 blx 0xc68 | fcn_00000c68 ();
0x000017a6 ldr r3, [pc, 0xf4] |
0x000017a8 ldr r4, [sp, 0x24] | r4 = var_24h;
0x000017aa add r3, pc | r3 = 0x304c;
0x000017ac ldr r0, [r3, 0x18] | r0 = *(0x3064);
| label_4:
0x000017ae ldr r1, [r4] | r1 = *(r4);
| if (r0 == 0) {
0x000017b0 cbz r0, 0x17c6 | goto label_26;
| }
0x000017b2 mov r3, r0 | r3 = r0;
0x000017b4 b 0x17bc |
| while (r1 != r2) {
0x000017b6 ldr.w r3, [r3, 0x440] | r3 = *((r3 + 0x440));
| if (r3 == 0) {
0x000017ba cbz r3, 0x17c6 | goto label_26;
| }
0x000017bc ldr r2, [r3] | r2 = *(r3);
0x000017be cmp r1, r2 |
0x000017c0 bne 0x17b6 |
| }
0x000017c2 ldr r3, [r3, 0x34] | r3 = *((r3 + 0x34));
0x000017c4 strh r3, [r4, 4] | *((r4 + 4)) = r3;
| label_26:
0x000017c6 adds r4, 8 | r4 += 8;
0x000017c8 cmp r4, r8 |
| if (r4 != r8) {
0x000017ca bne 0x17ae | goto label_4;
| }
| label_10:
0x000017cc mov r0, sb | r0 = sb;
0x000017ce add sp, 0x2c |
0x000017d0 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_25:
0x000017d4 ldr r1, [sp, 0x18] | r1 = var_18h;
0x000017d6 movs r0, 2 | r0 = 2;
0x000017d8 blx 0xc68 | fcn_00000c68 ();
0x000017dc movs r2, 0xe | r2 = 0xe;
0x000017de str.w r2, [fp, 0x28] | __asm ("str.w r2, [arg_28h]");
0x000017e2 cmp r7, 0 |
| if (r7 != 0) {
0x000017e4 bne 0x1720 | goto label_2;
| }
0x000017e6 b 0x1790 | goto label_5;
| label_24:
0x000017e8 ldr r1, [sp, 0x10] | r1 = var_10h;
0x000017ea movs r0, 2 | r0 = 2;
0x000017ec blx 0xc68 | fcn_00000c68 ();
0x000017f0 ldrh r1, [r4, 6] | r1 = *((r4 + 6));
0x000017f2 add.w sb, sb, -1 | sb += -1;
0x000017f4 subs r1, 0xff | r1 -= 0xff;
0x000017f6 bic r1, r1, 4 | r1 = BIT_MASK (r1, 4);
0x000017fa strh r1, [r4, 6] | *((r4 + 6)) = r1;
0x000017fc b 0x176c | goto label_6;
| label_23:
0x000017fe ldr r1, [pc, 0xa0] |
0x00001800 movs r0, 2 | r0 = 2;
0x00001802 add.w sb, sb, -1 | sb += -1;
0x00001806 add r1, pc | r1 = 0x30ac;
0x00001808 blx 0xc68 | fcn_00000c68 ();
0x0000180c ldrh r1, [r4, 6] | r1 = *((r4 + 6));
0x0000180e bic r1, r1, 1 | r1 = BIT_MASK (r1, 1);
0x00001812 strh r1, [r4, 6] | *((r4 + 6)) = r1;
0x00001814 b 0x1766 | goto label_7;
| label_22:
0x00001816 ldr r1, [pc, 0x8c] |
0x00001818 movs r0, 2 | r0 = 2;
0x0000181a add r1, pc | r1 = 0x30c4;
0x0000181c blx 0xc68 | fcn_00000c68 ();
0x00001820 cmp r7, 0 |
| if (r7 != 0) {
0x00001822 bne.w 0x1720 | goto label_2;
| }
0x00001826 b 0x1790 | goto label_5;
| label_13:
0x00001828 bl 0x1588 | fcn_00001588 ();
0x0000182c b 0x161c | goto label_8;
| label_15:
0x0000182e ldr r3, [pc, 0x78] |
0x00001830 mov r1, r6 | r1 = r6;
0x00001832 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00001834 mov r0, r5 | r0 = r5;
0x00001836 add r3, pc |
0x00001838 ldr r3, [r3, 0xc] | r3 = *(0x30f0);
0x0000183a add sp, 0x2c |
0x0000183c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001840 bx r3 | return uint32_t (*r3)() ();
| label_12:
0x00001842 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00001844 mov r1, r6 | r1 = r6;
0x00001846 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00001848 mov r0, r5 | r0 = r5;
0x0000184a add sp, 0x2c |
0x0000184c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001850 bx r3 | return uint32_t (*r3)() ();
| label_11:
0x00001852 bl 0xdd0 | entry0 ();
0x00001856 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00001858 cmp r0, 0 |
| if (r0 != 0) {
0x0000185a bne.w 0x1608 | goto label_9;
| }
0x0000185e ldr r1, [pc, 0x4c] |
0x00001860 mov.w sb, -1 | sb = -1;
0x00001862 subs r1, 0xff | r1 -= 0xff;
0x00001864 add r1, pc | r1 = 0x3116;
0x00001866 blx 0xc68 | fcn_00000c68 ();
0x0000186a b 0x17cc | goto label_10;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libtsocks.so.1.8 @ 0x1d10 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.select () | void select (int16_t arg_1e8h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| void * var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| void * var_3ch;
| void * s2;
| int16_t var_13ch;
| int16_t var_1bch;
| int16_t var_1c0h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00001d10 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001d14 sub sp, 0x1c4 |
0x00001d16 strd r1, r2, [sp, 0x20] | __asm ("strd r1, r2, [var_20h]");
0x00001d1a ldr r4, [sp, 0x1e8] | r4 = *(arg_1e8h);
0x00001d1c ldr.w r2, [pc, 0x560] | r2 = *(0x00002280);
0x00001d20 str r3, [sp, 0x28] | var_28h = r3;
0x00001d22 ldr.w r3, [pc, 0x560] |
0x00001d26 strd r0, r4, [sp, 0x30] | __asm ("strd r0, r4, [var_34h]");
0x00001d2a add r2, pc | r2 += pc;
0x00001d2c ldr.w r4, [pc, 0x558] | r4 = *(0x00002288);
0x00001d30 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00001d32 add r4, pc | r4 += pc;
0x00001d34 ldr r3, [r3] | r3 = *(0x2286);
0x00001d36 str r3, [sp, 0x1bc] | var_1bch = r3;
0x00001d38 mov.w r3, 0 | r3 = 0;
0x00001d3c ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00001d3e cmp r3, 0 |
| if (r3 == 0) {
0x00001d40 beq.w 0x2262 | goto label_18;
| }
| label_16:
0x00001d44 ldr.w r3, [pc, 0x544] | r3 = *(0x0000228c);
0x00001d48 add r3, pc | r3 += pc;
0x00001d4a ldr r2, [r3, 0x18] | r2 = *((r3 + 0x18));
0x00001d4c cmp r2, 0 |
| if (r2 == 0) {
0x00001d4e beq.w 0x2236 | goto label_19;
| }
0x00001d52 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00001d54 cmp r3, 0 |
| if (r3 == 0) {
0x00001d56 beq.w 0x21da | goto label_20;
| }
| label_15:
0x00001d5a ldr r3, [sp, 0x34] | r3 = var_34h;
0x00001d5c movs r0, 2 | r0 = 2;
0x00001d5e ldr.w r1, [pc, 0x530] |
0x00001d62 ldr r2, [sp, 0x30] | r2 = var_30h;
0x00001d64 str r3, [sp, 8] | var_8h = r3;
0x00001d66 ldr r3, [sp, 0x28] | r3 = var_28h;
0x00001d68 add r1, pc | r1 = 0x3ffe;
0x00001d6a str r3, [sp, 4] | var_4h = r3;
0x00001d6c ldr r3, [sp, 0x24] | r3 = var_24h;
0x00001d6e str r3, [sp] | *(sp) = r3;
0x00001d70 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00001d72 blx 0xc68 | fcn_00000c68 ();
0x00001d76 ldr.w r3, [pc, 0x51c] | r3 = *(0x00002294);
0x00001d7a add r3, pc | r3 += pc;
0x00001d7c ldr.w r8, [r3, 0x18] | r8 = *((r3 + 0x18));
0x00001d80 cmp.w r8, 0 |
| if (r8 == 0) {
0x00001d84 beq.w 0x2206 | goto label_21;
| }
0x00001d88 ldr.w r5, [pc, 0x50c] |
0x00001d8c movs r6, 0 | r6 = 0;
0x00001d8e ldr.w r7, [pc, 0x50c] |
0x00001d92 mov r4, r6 | r4 = r6;
0x00001d94 mov sl, r6 | sl = r6;
0x00001d96 ldr r6, [sp, 0x20] | r6 = var_20h;
0x00001d98 add r5, pc | r5 = 0x4034;
0x00001d9a add r7, pc | r7 = 0x403c;
0x00001d9c mov sb, r5 | sb = r5;
0x00001d9e mov fp, r7 |
0x00001da0 mov r5, r8 | r5 = r8;
0x00001da2 ldr r7, [sp, 0x24] | r7 = var_24h;
0x00001da4 ldr.w r8, [sp, 0x28] | r8 = var_28h;
0x00001da8 b 0x1db2 |
| while (r3 < 1) {
| label_0:
0x00001daa ldr.w r5, [r5, 0x440] | r5 = *((r5 + 0x440));
0x00001dae cmp r5, 0 |
| if (r5 == 0) {
0x00001db0 beq 0x1e54 | goto label_22;
| }
| label_1:
0x00001db2 ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x00001db4 subs r3, 0xd | r3 -= 0xd;
0x00001db6 cmp r3, 1 |
0x00001db8 bls 0x1daa |
| }
0x00001dba ldr r2, [r5] | r2 = *(r5);
0x00001dbc mov r1, sb | r1 = sb;
0x00001dbe movs r0, 2 | r0 = 2;
0x00001dc0 str r4, [r5, 0x34] | *((r5 + 0x34)) = r4;
0x00001dc2 blx 0xc68 | fcn_00000c68 ();
0x00001dc6 mov r3, r7 | r3 = r7;
| if (r7 != 0) {
0x00001dc8 cbz r7, 0x1de8 |
0x00001dca ldr r0, [r5] | r0 = *(r5);
0x00001dcc blx 0xc28 | fdelt_chk ();
0x00001dd0 ldr r3, [r5] | r3 = *(r5);
0x00001dd2 ldr.w r1, [r7, r0, lsl 2] | offset_0 = r0 << 2;
| r1 = *((r7 + offset_0));
0x00001dd6 and r2, r3, 0x1f | r2 = r3 & 0x1f;
0x00001dda movs r3, 1 | r3 = 1;
0x00001ddc lsls r3, r2 | r3 <<= r2;
0x00001dde tst r3, r1 |
0x00001de0 ite ne |
| if ((r3 & r1) == 0) {
0x00001de2 movne r3, 1 | r3 = 1;
| }
| if ((r3 & r1) != 0) {
0x00001de4 moveq r3, 0 | r3 = 0;
| }
0x00001de6 lsls r3, r3, 1 | r3 <<= 1;
| }
0x00001de8 ldr r2, [r5, 0x34] | r2 = *((r5 + 0x34));
0x00001dea orrs r3, r2 | r3 |= r2;
0x00001dec str r3, [r5, 0x34] | *((r5 + 0x34)) = r3;
| if (r6 != 0) {
0x00001dee cbz r6, 0x1e0e |
0x00001df0 ldr r0, [r5] | r0 = *(r5);
0x00001df2 blx 0xc28 | fdelt_chk ();
0x00001df6 ldr r3, [r5] | r3 = *(r5);
0x00001df8 ldr.w r1, [r6, r0, lsl 2] | offset_1 = r0 << 2;
| r1 = *((r6 + offset_1));
0x00001dfc and r2, r3, 0x1f | r2 = r3 & 0x1f;
0x00001e00 movs r3, 1 | r3 = 1;
0x00001e02 lsls r3, r2 | r3 <<= r2;
0x00001e04 tst r3, r1 |
0x00001e06 ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x00001e08 it ne |
| if ((r3 & r1) != 0) {
0x00001e0a orrne r3, r3, 1 | r3 |= 1;
| goto label_23;
| }
| }
| label_23:
0x00001e0e str r3, [r5, 0x34] | *((r5 + 0x34)) = r3;
0x00001e10 cmp.w r8, 0 |
| if (r8 != 0) {
0x00001e14 beq 0x1e38 |
0x00001e16 ldr r0, [r5] | r0 = *(r5);
0x00001e18 blx 0xc28 | fdelt_chk ();
0x00001e1c ldr r3, [r5] | r3 = *(r5);
0x00001e1e ldr.w r1, [r8, r0, lsl 2] | offset_2 = r0 << 2;
| r1 = *((r8 + offset_2));
0x00001e22 and r2, r3, 0x1f | r2 = r3 & 0x1f;
0x00001e26 movs r3, 1 | r3 = 1;
0x00001e28 lsls r3, r2 | r3 <<= r2;
0x00001e2a tst r3, r1 |
0x00001e2c ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x00001e2e ite ne |
| if ((r3 & r1) == 0) {
0x00001e30 movne r2, 1 | r2 = 1;
| }
| if ((r3 & r1) != 0) {
0x00001e32 moveq r2, 0 | r2 = 0;
| }
0x00001e34 orr.w r3, r3, r2, lsl 2 | r3 |= (r2 << 2);
| }
0x00001e38 str r3, [r5, 0x34] | *((r5 + 0x34)) = r3;
0x00001e3a cmp r3, 0 |
| if (r3 == 0) {
0x00001e3c beq 0x1daa | goto label_0;
| }
0x00001e3e ldr r2, [r5] | r2 = *(r5);
0x00001e40 mov r1, fp | r1 = fp;
0x00001e42 movs r0, 2 | r0 = 2;
0x00001e44 mov.w sl, 1 | sl = 1;
0x00001e48 blx 0xc68 | fcn_00000c68 ();
0x00001e4a invalid |
0x00001e4c ldr.w r5, [r5, 0x440] | r5 = *((r5 + 0x440));
0x00001e50 cmp r5, 0 |
| if (r5 != 0) {
0x00001e52 bne 0x1db2 | goto label_1;
| }
| label_22:
0x00001e54 mov r6, sl | r6 = sl;
0x00001e56 cmp r6, 0 |
| if (r6 == 0) {
0x00001e58 beq.w 0x2206 | goto label_21;
| }
0x00001e5c ldr.w r3, [pc, 0x440] | r3 = *(0x000022a0);
0x00001e60 add.w r8, sp, 0xbc | r8 += s2;
0x00001e64 ldr.w sb, [pc, 0x43c] |
0x00001e68 add r7, sp, 0x3c | r7 += var_3ch;
0x00001e6a add r3, pc | r3 += pc;
0x00001e6c str r3, [sp, 0x18] | var_18h = r3;
0x00001e6e add sb, pc | sb = 0x4116;
0x00001e70 ldr.w r3, [pc, 0x434] |
0x00001e74 add r3, pc | r3 = 0x4120;
0x00001e76 str r3, [sp, 0x1c] | var_1ch = r3;
0x00001e78 add r3, sp, 0x13c | r3 += var_13ch;
0x00001e7a str r3, [sp, 0x2c] | var_2ch = r3;
| label_2:
0x00001e7c ldr r1, [sp, 0x20] | r1 = var_20h;
0x00001e7e movs r2, 0x80 | r2 = 0x80;
0x00001e80 cmp r1, 0 |
| if (r1 == 0) {
0x00001e82 beq.w 0x21d0 | goto label_24;
| }
0x00001e86 mov r0, r8 | r0 = r8;
0x00001e88 blx 0xbe0 | memcpy (r0, r1, r2);
| label_14:
0x00001e8c ldr r1, [sp, 0x24] | r1 = var_24h;
0x00001e8e movs r2, 0x80 | r2 = 0x80;
0x00001e90 cmp r1, 0 |
| if (r1 == 0) {
0x00001e92 beq.w 0x21c6 | goto label_25;
| }
0x00001e96 mov r0, r7 | r0 = r7;
0x00001e98 blx 0xbe0 | memcpy (r0, r1, r2);
| label_13:
0x00001e9c ldr r1, [sp, 0x28] | r1 = var_28h;
0x00001e9e movs r2, 0x80 | r2 = 0x80;
0x00001ea0 cmp r1, 0 |
| if (r1 == 0) {
0x00001ea2 beq.w 0x21bc | goto label_26;
| }
0x00001ea6 ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x00001ea8 blx 0xbe0 | memcpy (r0, r1, r2);
| label_12:
0x00001eac ldr r3, [sp, 0x18] | r3 = var_18h;
0x00001eae ldr r5, [r3, 0x18] | r5 = *((r3 + 0x18));
0x00001eb0 cmp r5, 0 |
| if (r5 == 0) {
0x00001eb2 beq 0x1f34 | goto label_27;
| }
0x00001eb4 movs r4, 1 | r4 = 1;
| do {
0x00001eb6 ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x00001eb8 subs r3, 0xd | r3 -= 0xd;
0x00001eba cmp r3, 1 |
| if (r3 >= 1) {
0x00001ebc bls 0x1f2c |
0x00001ebe ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
| if (r3 == 0) {
0x00001ec0 cbz r3, 0x1f2c | goto label_10;
| }
0x00001ec2 ldr r0, [r5] | r0 = *(r5);
0x00001ec4 blx 0xc28 | fdelt_chk ();
0x00001ec8 add r3, sp, 0x1c0 | r3 += var_1c0h;
0x00001eca ldr r6, [r5, 0x28] | r6 = *((r5 + 0x28));
0x00001ecc add.w r1, r3, r0, lsl 2 | r1 = r3 + (r0 << 2);
0x00001ed0 ldr r0, [r5] | r0 = *(r5);
0x00001ed2 ldr r2, [r1, -0x84] | r2 = *((r1 - 0x84));
0x00001ed6 bic r6, r6, 2 | r6 = BIT_MASK (r6, 2);
0x00001eda and r3, r0, 0x1f | r3 = r0 & 0x1f;
0x00001ede cmp r6, 1 |
0x00001ee0 lsl.w r3, r4, r3 | r3 = r4 << r3;
0x00001ee4 orr.w r3, r3, r2 | r3 |= r2;
0x00001ee8 str r3, [r1, -0x84] | *((r1 - 0x84)) = r3;
| if (r6 == 1) {
0x00001eec beq.w 0x21a2 | goto label_28;
| }
0x00001ef0 blx 0xc28 | r0 = fdelt_chk ();
0x00001ef4 mov r3, r0 | r3 = r0;
0x00001ef6 ldr r0, [r5] | r0 = *(r5);
0x00001ef8 ldr.w r2, [r7, r3, lsl 2] | offset_3 = r3 << 2;
| r2 = *((r7 + offset_3));
0x00001efc and r1, r0, 0x1f | r1 = r0 & 0x1f;
0x00001f00 lsl.w r1, r4, r1 | r1 = r4 << r1;
0x00001f04 bic.w r2, r2, r1 | r2 = BIT_MASK (r2, r1);
0x00001f08 str.w r2, [r7, r3, lsl 2] | __asm ("str.w r2, [r7, r3, lsl 2]");
| label_11:
0x00001f0c ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x00001f0e cmp r3, 4 |
| if (r3 != 4) {
0x00001f10 bne.w 0x2186 | goto label_29;
| }
0x00001f14 blx 0xc28 | fdelt_chk ();
0x00001f18 ldr r3, [r5] | r3 = *(r5);
0x00001f1a ldr.w r2, [r8, r0, lsl 2] | offset_4 = r0 << 2;
| r2 = *((r8 + offset_4));
0x00001f1e and r3, r3, 0x1f | r3 &= 0x1f;
0x00001f20 lsls r7, r3, 0xc | r7 = r3 << 0xc;
0x00001f22 lsl.w r3, r4, r3 | r3 = r4 << r3;
0x00001f26 orrs r3, r2 | r3 |= r2;
0x00001f28 str.w r3, [r8, r0, lsl 2] | __asm ("str.w r3, [r8, r0, lsl 2]");
| }
| label_10:
0x00001f2c ldr.w r5, [r5, 0x440] | r5 = *((r5 + 0x440));
0x00001f30 cmp r5, 0 |
0x00001f32 bne 0x1eb6 |
| } while (r5 != 0);
| label_27:
0x00001f34 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00001f36 mov r2, r7 | r2 = r7;
0x00001f38 ldr r0, [sp, 0x30] | r0 = var_30h;
0x00001f3a mov r1, r8 | r1 = r8;
0x00001f3c str r3, [sp] | *(sp) = r3;
0x00001f3e ldr r3, [sp, 0x18] | r3 = var_18h;
0x00001f40 ldr r4, [r3, 8] | r4 = *((r3 + 8));
0x00001f42 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00001f44 blx r4 | r0 = uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00001f46 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 <= r0) {
0x00001f48 ble 0x1fec | goto label_30;
| }
0x00001f4a ldr r3, [sp, 0x18] | r3 = var_18h;
0x00001f4c ldr r4, [r3, 0x18] | r4 = *((r3 + 0x18));
0x00001f4e cmp r4, 0 |
| if (r4 == 0) {
0x00001f50 beq 0x1fec | goto label_30;
| }
0x00001f52 ldr r3, [pc, 0x358] |
0x00001f54 add r3, pc | r3 = 0x4206;
0x00001f56 str r3, [sp, 0x14] | var_14h = r3;
| do {
| label_4:
0x00001f58 mov sl, r4 | sl = r4;
0x00001f5a ldr.w r4, [r4, 0x440] | r4 = *((r4 + 0x440));
0x00001f5e ldr.w r2, [sl, 0x28] | r2 = *((sl + 0x28));
0x00001f62 subs r2, 0xd | r2 -= 0xd;
0x00001f64 cmp r2, 1 |
| if (r2 >= 1) {
0x00001f66 bls 0x1fe2 |
0x00001f68 mov r1, sb | r1 = sb;
0x00001f6a ldr.w r2, [sl] | r2 = *(sl);
0x00001f6e movs r0, 2 | r0 = 2;
0x00001f70 mov.w fp, 1 |
0x00001f74 blx 0xc68 | fcn_00000c68 ();
0x00001f78 ldr.w r0, [sl] | r0 = *(sl);
0x00001f7a movs r0, r0 |
0x00001f7c blx 0xc28 | fdelt_chk ();
0x00001f80 ldr.w r1, [r7, r0, lsl 2] | offset_5 = r0 << 2;
| r1 = *((r7 + offset_5));
0x00001f84 ldr.w r0, [sl] | r0 = *(sl);
0x00001f88 and r5, r0, 0x1f | r5 = r0 & 0x1f;
0x00001f8c lsl.w r5, fp, r5 | r5 = fp << r5;
0x00001f90 ands r5, r1 | r5 &= r1;
| if (r5 != r1) {
0x00001f92 bne.w 0x2156 | goto label_31;
| }
| label_9:
0x00001f96 blx 0xc28 | fdelt_chk ();
0x00001f9a ldr.w r3, [r8, r0, lsl 2] | offset_6 = r0 << 2;
| r3 = *((r8 + offset_6));
0x00001f9e mov.w fp, 1 |
0x00001fa2 ldr.w r0, [sl] | r0 = *(sl);
0x00001fa6 and r1, r0, 0x1f | r1 = r0 & 0x1f;
0x00001faa lsl.w r1, fp, r1 | r1 = fp << r1;
0x00001fae tst r1, r3 |
| if ((r1 & r3) != 0) {
0x00001fb0 bne.w 0x20e4 | goto label_32;
| }
0x00001fb4 blx 0xc28 | fdelt_chk ();
0x00001fb8 add r3, sp, 0x1c0 | r3 += var_1c0h;
0x00001fba ldr.w r2, [sl] | r2 = *(sl);
0x00001fbe add.w r0, r3, r0, lsl 2 | r0 = r3 + (r0 << 2);
0x00001fc0 lsls r0, r0, 2 | r0 <<= 2;
0x00001fc2 and r1, r2, 0x1f | r1 = r2 & 0x1f;
0x00001fc6 ldr r3, [r0, -0x84] | r3 = *((r0 - 0x84));
0x00001fca lsl.w r1, fp, r1 | r1 = fp << r1;
0x00001fce tst r1, r3 |
| if ((r1 & r3) != 0) {
0x00001fd0 bne 0x2026 | goto label_6;
| }
0x00001fd2 cmp r5, 0 |
| if (r5 != 0) {
0x00001fd4 bne.w 0x2130 | goto label_33;
| }
0x00001fd8 ldr r1, [pc, 0x2d4] |
0x00001fda movs r0, 2 | r0 = 2;
0x00001fdc add r1, pc | r1 = 0x4290;
0x00001fde blx 0xc68 | fcn_00000c68 ();
| }
| label_3:
0x00001fe2 cmp r4, 0 |
0x00001fe4 bne 0x1f58 |
| } while (r4 != 0);
| label_5:
0x00001fe6 cmp r6, 0 |
| if (r6 == 0) {
0x00001fe8 beq.w 0x1e7c | goto label_2;
| }
| label_30:
0x00001fec ldr r1, [pc, 0x2c4] |
0x00001fee mov r2, r6 | r2 = r6;
0x00001ff0 movs r0, 2 | r0 = 2;
0x00001ff2 add r1, pc | r1 = 0x42aa;
0x00001ff4 blx 0xc68 | fcn_00000c68 ();
0x00001ff8 ldr r3, [sp, 0x20] | r3 = var_20h;
| if (r3 != 0) {
0x00001ffa cbz r3, 0x2006 |
0x00001ffc mov r1, r8 | r1 = r8;
0x00001ffe mov r0, r3 | r0 = r3;
0x00002000 movs r2, 0x80 | r2 = 0x80;
0x00002002 blx 0xbe0 | memcpy (r0, r1, r2);
| }
0x00002006 ldr r3, [sp, 0x24] | r3 = var_24h;
| if (r3 != 0) {
0x00002008 cbz r3, 0x2014 |
0x0000200a mov r1, r7 | r1 = r7;
0x0000200c mov r0, r3 | r0 = r3;
0x0000200e movs r2, 0x80 | r2 = 0x80;
0x00002010 blx 0xbe0 | memcpy (r0, r1, r2);
| }
0x00002014 ldr r0, [sp, 0x28] | r0 = var_28h;
0x00002016 cmp r0, 0 |
| if (r0 == 0) {
0x00002018 beq.w 0x21ea | goto label_17;
| }
0x0000201c ldr r1, [sp, 0x2c] | r1 = var_2ch;
0x0000201e movs r2, 0x80 | r2 = 0x80;
0x00002020 blx 0xbe0 | memcpy (r0, r1, r2);
0x00002024 b 0x21ea | goto label_17;
| label_6:
0x00002026 ldr r1, [pc, 0x290] |
0x00002028 movs r0, 2 | r0 = 2;
0x0000202a subs r6, 1 | r6--;
0x0000202c add r1, pc | r1 = 0x42ea;
0x0000202e blx 0xc68 | fcn_00000c68 ();
0x00002032 ldr.w r0, [sl] | r0 = *(sl);
0x00002036 blx 0xc28 | fdelt_chk ();
0x0000203a ldr.w r2, [sl] | r2 = *(sl);
0x0000203e add r3, sp, 0x1c0 | r3 += var_1c0h;
0x00002040 add.w r0, r3, r0, lsl 2 | r0 = r3 + (r0 << 2);
0x00002044 movs r1, 1 | r1 = 1;
0x00002046 and r5, r2, 0x1f | r5 = r2 & 0x1f;
0x0000204a ldr r2, [r0, -0x84] | r2 = *((r0 - 0x84));
0x0000204c cmp r4, 0x84 |
0x0000204e lsls r1, r5 | r1 <<= r5;
0x00002050 bic.w r2, r2, r1 | r2 = BIT_MASK (r2, r1);
0x00002052 lsls r1, r0, 8 | r1 = r0 << 8;
0x00002054 str r2, [r0, -0x84] | *((r0 - 0x84)) = r2;
0x00002058 movs r2, 0xe | r2 = 0xe;
0x0000205a str.w r2, [sl, 0x28] | __asm ("str.w r2, [sl, 0x28]");
0x0000205e ldr.w r2, [sl, 0x34] | r2 = *((sl + 0x34));
| label_8:
0x00002062 lsls r1, r2, 0x1d | r1 = r2 << 0x1d;
| if (r1 < r2) {
0x00002064 bpl 0x2090 |
0x00002066 ldr.w r0, [sl] | r0 = *(sl);
0x0000206a adds r6, 1 | r6++;
0x0000206c blx 0xc28 | fdelt_chk ();
0x00002070 ldr.w r2, [sl] | r2 = *(sl);
0x00002074 add r3, sp, 0x1c0 | r3 += var_1c0h;
0x00002076 add.w r0, r3, r0, lsl 2 | r0 = r3 + (r0 << 2);
0x0000207a and r5, r2, 0x1f | r5 = r2 & 0x1f;
0x0000207e ldr r1, [r0, -0x84] | r1 = *((r0 - 0x84));
0x00002082 movs r2, 1 | r2 = 1;
0x00002084 lsls r2, r5 | r2 <<= r5;
0x00002086 orrs r2, r1 | r2 |= r1;
0x00002088 str r2, [r0, -0x84] | *((r0 - 0x84)) = r2;
0x0000208c ldr.w r2, [sl, 0x34] | r2 = *((sl + 0x34));
| }
0x00002090 lsls r3, r2, 0x1f | r3 = r2 << 0x1f;
| if (r3 < r2) {
0x00002092 bpl 0x20b8 |
0x00002094 ldr.w r0, [sl] | r0 = *(sl);
0x00002098 adds r6, 1 | r6++;
0x0000209a blx 0xc28 | fdelt_chk ();
0x0000209e ldr.w r2, [sl] | r2 = *(sl);
0x000020a2 ldr.w r1, [r8, r0, lsl 2] | offset_7 = r0 << 2;
| r1 = *((r8 + offset_7));
0x000020a6 and r5, r2, 0x1f | r5 = r2 & 0x1f;
0x000020aa movs r2, 1 | r2 = 1;
0x000020ac lsls r2, r5 | r2 <<= r5;
0x000020ae orrs r2, r1 | r2 |= r1;
0x000020b0 str.w r2, [r8, r0, lsl 2] | __asm ("str.w r2, [r8, r0, lsl 2]");
0x000020b4 ldr.w r2, [sl, 0x34] | r2 = *((sl + 0x34));
| }
| label_7:
0x000020b8 lsls r2, r2, 0x1e | r2 <<= 0x1e;
| if (r2 >= r2) {
0x000020ba bpl 0x1fe2 | goto label_3;
| }
0x000020bc ldr.w r0, [sl] | r0 = *(sl);
0x000020c0 adds r6, 1 | r6++;
0x000020c2 blx 0xc28 | fdelt_chk ();
0x000020c6 ldr.w r1, [sl] | r1 = *(sl);
0x000020ca movs r3, 1 | r3 = 1;
0x000020cc ldr.w r2, [r7, r0, lsl 2] | offset_8 = r0 << 2;
| r2 = *((r7 + offset_8));
0x000020d0 and r1, r1, 0x1f | r1 &= 0x1f;
0x000020d4 lsls r3, r1 | r3 <<= r1;
0x000020d6 orrs r3, r2 | r3 |= r2;
0x000020d8 str.w r3, [r7, r0, lsl 2] | __asm ("str.w r3, [r7, r0, lsl 2]");
0x000020dc cmp r4, 0 |
| if (r4 != 0) {
0x000020de bne.w 0x1f58 | goto label_4;
| }
0x000020e2 b 0x1fe6 | goto label_5;
| label_32:
0x000020e4 ldr r1, [sp, 0x14] | r1 = var_14h;
0x000020e6 movs r0, 2 | r0 = 2;
0x000020e8 blx 0xc68 | fcn_00000c68 ();
0x000020ec ldr.w r0, [sl] | r0 = *(sl);
0x000020f0 subs r6, 1 | r6--;
0x000020f2 blx 0xc28 | r0 = fdelt_chk ();
0x000020f6 mov r5, r0 | r5 = r0;
0x000020f8 ldr.w r0, [sl] | r0 = *(sl);
0x000020fc ldr.w r1, [r8, r5, lsl 2] | offset_9 = r5 << 2;
| r1 = *((r8 + offset_9));
0x00002100 and ip, r0, 0x1f |
0x00002104 lsl.w ip, fp, ip |
0x00002108 bic.w r1, r1, ip | r1 = BIT_MASK (r1, ip);
0x0000210c str.w r1, [r8, r5, lsl 2] | __asm ("str.w r1, [r8, r5, lsl 2]");
0x00002110 blx 0xc28 | fdelt_chk ();
0x00002114 ldr.w r1, [sl] | r1 = *(sl);
0x00002116 asrs r0, r0, 0x20 | r0 >>= 0x20;
0x00002118 add r3, sp, 0x1c0 | r3 += var_1c0h;
0x0000211a add.w r0, r3, r0, lsl 2 | r0 = r3 + (r0 << 2);
0x0000211e and r1, r1, 0x1f | r1 &= 0x1f;
0x00002120 lsls r7, r3, 4 | r7 = r3 << 4;
0x00002122 ldr r0, [r0, -0x84] | r0 = *((r0 - 0x84));
0x00002126 lsl.w r1, fp, r1 | r1 = fp << r1;
0x00002128 add.w r2, r1, -0x7f000000 | r2 = r1 + -0x7f000000;
| if (r7 != r3) {
0x0000212c bne.w 0x2026 | goto label_6;
| }
| label_33:
0x00002130 mov r0, sl | r0 = sl;
0x00002132 bl 0xea0 | r0 = fcn_00000ea0 (r0);
0x00002136 bic r0, r0, 4 | r0 = BIT_MASK (r0, 4);
0x0000213a cmp r0, 0x6b |
| if (r0 == 0x6b) {
0x0000213c beq 0x21e0 | goto label_34;
| }
0x0000213e ldr.w r1, [sl, 0x28] | r1 = *((sl + 0x28));
0x00002142 sub.w r2, r1, 0xd | r2 = r1 - 0xd;
0x00002146 cmp r2, 1 |
| if (r2 > 1) {
0x00002148 bhi.w 0x1fe2 | goto label_3;
| }
0x0000214c cmp r1, 0xe |
0x0000214e ldr.w r2, [sl, 0x34] | r2 = *((sl + 0x34));
| if (r1 != 0xe) {
0x00002152 bne 0x20b8 | goto label_7;
| }
0x00002154 b 0x2062 | goto label_8;
| label_31:
0x00002156 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00002158 movs r0, 2 | r0 = 2;
0x0000215a blx 0xc68 | fcn_00000c68 ();
0x0000215e ldr.w r0, [sl] | r0 = *(sl);
0x00002162 subs r6, 1 | r6--;
0x00002164 blx 0xc28 | r0 = fdelt_chk ();
0x00002168 mov ip, r0 |
0x0000216a ldr.w r0, [sl] | r0 = *(sl);
0x0000216e ldr.w r1, [r7, ip, lsl 2] | offset_10 = ip << 2;
| r1 = *((r7 + offset_10));
0x00002172 movs r5, 2 | r5 = 2;
0x00002174 and lr, r0, 0x1f | lr = r0 & 0x1f;
0x00002176 lsrs r7, r3, 0x18 | r7 = r3 >> 0x18;
0x00002178 lsl.w r2, fp, lr | r2 = fp << lr;
0x0000217c bic.w r1, r1, r2 | r1 = BIT_MASK (r1, r2);
0x00002180 str.w r1, [r7, ip, lsl 2] | __asm ("str.w r1, [r7, ip, lsl 2]");
0x00002184 b 0x1f96 | goto label_9;
| label_29:
0x00002186 blx 0xc28 | fdelt_chk ();
0x0000218a ldr r3, [r5] | r3 = *(r5);
0x0000218c ldr.w r2, [r8, r0, lsl 2] | offset_11 = r0 << 2;
| r2 = *((r8 + offset_11));
0x00002190 and r3, r3, 0x1f | r3 &= 0x1f;
0x00002194 lsl.w r3, r4, r3 | r3 = r4 << r3;
0x00002196 blx 0x3055dc | r0 = void (*0x3055dc)(uint32_t, uint32_t) (r2, r3);
0x0000219a lsls r3, r0, 8 | r3 = r0 << 8;
0x0000219c str.w r2, [r8, r0, lsl 2] | __asm ("str.w r2, [r8, r0, lsl 2]");
0x000021a0 b 0x1f2c | goto label_10;
| label_28:
0x000021a2 blx 0xc28 | r0 = fdelt_chk ();
0x000021a6 mov r2, r0 | r2 = r0;
0x000021a8 ldr r0, [r5] | r0 = *(r5);
0x000021aa ldr.w r3, [r7, r2, lsl 2] | offset_12 = r2 << 2;
| r3 = *((r7 + offset_12));
0x000021ae and r1, r0, 0x1f | r1 = r0 & 0x1f;
0x000021b2 lsls r6, r1 | r6 <<= r1;
0x000021b4 orrs r6, r3 | r6 |= r3;
0x000021b6 str.w r6, [r7, r2, lsl 2] | __asm ("str.w r6, [r7, r2, lsl 2]");
0x000021ba b 0x1f0c | goto label_11;
| label_26:
0x000021bc ldrd r1, r0, [sp, 0x28] | __asm ("ldrd r1, r0, [var_28h]");
0x000021c0 blx 0xd04 | fcn_00000d04 ();
0x000021c4 b 0x1eac | goto label_12;
| label_25:
0x000021c6 ldr r1, [sp, 0x24] | r1 = var_24h;
0x000021c8 mov r0, r7 | r0 = r7;
0x000021ca blx 0xd04 | fcn_00000d04 ();
0x000021ce b 0x1e9c | goto label_13;
| label_24:
0x000021d0 ldr r1, [sp, 0x20] | r1 = var_20h;
0x000021d2 mov r0, r8 | r0 = r8;
0x000021d4 blx 0xd04 | fcn_00000d04 ();
0x000021d8 b 0x1e8c | goto label_14;
| label_20:
0x000021da bl 0x1588 | fcn_00001588 ();
0x000021de b 0x1d5a | goto label_15;
| label_34:
0x000021e0 ldr r1, [pc, 0xd8] |
0x000021e2 movs r0, 2 | r0 = 2;
0x000021e4 add r1, pc | r1 = 0x44a4;
0x000021e6 blx 0xc68 | fcn_00000c68 ();
| label_17:
0x000021ea ldr r2, [pc, 0xd4] |
0x000021ec ldr r3, [pc, 0x94] | r3 = *(0x2284);
0x000021ee add r2, pc | r2 = 0x44b4;
0x000021f0 ldr r3, [r2, r3] | r3 = *(0x44b4);
0x000021f2 ldr r2, [r3] | r2 = *(0x44b4);
0x000021f4 ldr r3, [sp, 0x1bc] | r3 = var_1bch;
0x000021f6 eors r2, r3 | r2 ^= r3;
0x000021f8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000021fc bne 0x227c | goto label_35;
| }
0x000021fe mov r0, r6 | r0 = r6;
0x00002200 add sp, 0x1c4 |
0x00002202 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_21:
0x00002206 ldr r2, [pc, 0xbc] |
0x00002208 ldr r3, [pc, 0x78] | r3 = *(0x2284);
0x0000220a add r2, pc | r2 = 0x44d4;
0x0000220c ldr r3, [r2, r3] | r3 = *(0x44d4);
0x0000220e ldr r2, [r3] | r2 = *(0x44d4);
0x00002210 ldr r3, [sp, 0x1bc] | r3 = var_1bch;
0x00002212 eors r2, r3 | r2 ^= r3;
0x00002214 mov.w r3, 0 | r3 = 0;
0x00002216 lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x00002218 bne 0x227c | goto label_35;
| }
0x0000221a ldr r4, [pc, 0xac] |
0x0000221c ldr r3, [sp, 0x34] | r3 = var_34h;
0x0000221e ldr r1, [sp, 0x20] | r1 = var_20h;
0x00002220 add r4, pc |
0x00002222 ldr r0, [sp, 0x30] | r0 = var_30h;
0x00002224 str r3, [sp, 0x1e8] | *(arg_1e8h) = r3;
0x00002226 ldr r4, [r4, 8] | r4 = *(0x44f6);
0x00002228 ldrd r2, r3, [sp, 0x24] | __asm ("ldrd r2, r3, [var_28h]");
0x0000222c mov ip, r4 |
0x0000222e add sp, 0x1c4 |
0x00002230 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00002234 bx ip | return void (*ip)() ();
| label_19:
0x00002236 ldr r1, [pc, 0x94] |
0x00002238 ldr r2, [pc, 0x48] | r2 = *(0x2284);
0x0000223a add r1, pc | r1 = 0x450c;
0x0000223c ldr r2, [r1, r2] | r2 = imp.__stack_chk_guard;
0x0000223e ldr r1, [r2] | r1 = imp.__stack_chk_guard;
0x00002240 ldr r2, [sp, 0x1bc] | r2 = var_1bch;
0x00002242 eors r1, r2 | r1 ^= r2;
0x00002244 mov.w r2, 0 | r2 = 0;
| if (r1 != r2) {
0x00002248 bne 0x227c | goto label_35;
| }
0x0000224a ldr r2, [sp, 0x34] | r2 = var_34h;
0x0000224c ldr r1, [sp, 0x20] | r1 = var_20h;
0x0000224e ldr r0, [sp, 0x30] | r0 = var_30h;
0x00002250 str r2, [sp, 0x1e8] | *(arg_1e8h) = r2;
0x00002252 ldr r4, [r3, 8] | r4 = *((r3 + 8));
0x00002254 ldrd r2, r3, [sp, 0x24] | __asm ("ldrd r2, r3, [var_28h]");
0x00002256 movs r3, 9 | r3 = 9;
0x00002258 mov ip, r4 |
0x0000225a add sp, 0x1c4 |
0x0000225c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00002260 bx ip | return void (*ip)() ();
| label_18:
0x00002262 bl 0xdd0 | entry0 ();
0x00002266 ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x00002268 cmp r0, 0 |
| if (r0 != 0) {
0x0000226a bne.w 0x1d44 | goto label_16;
| }
0x0000226c add r5, sp, 0x1ac | r5 = sp + 0x1ac;
0x0000226e ldr r1, [pc, 0x60] |
0x00002270 mov.w r6, -1 | r6 = -1;
0x00002274 add r1, pc | r1 = 0x454a;
0x00002276 blx 0xc68 | fcn_00000c68 ();
0x0000227a b 0x21ea | goto label_17;
| label_35:
0x0000227c blx 0xc1c | stack_chk_fail ();
0x00002280 rors r2, r3 | __asm ("rors r2, r3");
0x00002282 movs r1, r0 | r1 = r0;
0x00002284 lsls r4, r4, 3 | r4 <<= 3;
0x00002286 movs r0, r0 |
0x00002288 cmn r6, r1 |
0x0000228a movs r1, r0 | r1 = r0;
0x0000228c cmp r0, r7 |
0x0000228e movs r1, r0 | r1 = r0;
0x00002290 movs r2, 0 | r2 = 0;
0x00002292 movs r0, r0 |
0x00002294 cmp r6, r0 |
0x00002296 movs r1, r0 | r1 = r0;
0x00002298 movs r2, 0x1c | r2 = 0x1c;
0x0000229a movs r0, r0 |
0x0000229c movs r2, 0x4a | r2 = 0x4a;
0x0000229e movs r0, r0 |
0x000022a0 sbcs r6, r2 | __asm ("sbcs r6, r2");
0x000022a2 movs r1, r0 | r1 = r0;
0x000022a4 subs r2, r4, r7 | r2 = r4 - r7;
0x000022a6 movs r0, r0 |
0x000022a8 adds r4, r5, 0 | r4 = r5 + 0;
0x000022aa movs r0, r0 |
0x000022ac subs r4, r1, r5 | r4 = r1 - r5;
0x000022ae movs r0, r0 |
0x000022b0 movs r0, 0x28 | r0 = 0x28;
0x000022b2 movs r0, r0 |
0x000022b4 movs r0, 0x5a | r0 = 0x5a;
0x000022b6 movs r0, r0 |
0x000022b8 movs r0, 0x4c | r0 = 0x4c;
0x000022ba movs r0, r0 |
0x000022bc subs r0, r7, 0 | r0 = r7 - 0;
0x000022be movs r0, r0 |
0x000022c0 subs r5, 0x16 | r5 -= 0x16;
0x000022c2 movs r1, r0 | r1 = r0;
0x000022c4 subs r4, 0xfa | r4 -= 0xfa;
0x000022c6 movs r1, r0 | r1 = r0;
0x000022c8 subs r5, 0xe0 | r5 -= 0xe0;
0x000022ca movs r1, r0 | r1 = r0;
0x000022cc subs r4, 0xca | r4 -= 0xca;
0x000022ce movs r1, r0 | r1 = r0;
0x000022d0 adds r0, r3, 3 | r0 = r3 + 3;
0x000022d2 movs r0, r0 |
| }
[*] Function popen used 1 times libtsocks.so.1.8