[*] Binary protection state of checkTime
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH Symbols
[*] Function printf tear down of checkTime
; 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/sbin/checkTime @ 0x10a0c */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| int32_t var_ch;
| int32_t var_8h;
| int32_t var_4h_2;
| int32_t var_4h;
0x00010a0c push {fp, lr} |
0x00010a10 add fp, sp, 4 |
0x00010a14 sub sp, sp, 8 |
0x00010a18 mov r3, 0 | r3 = 0;
0x00010a1c str r3, [fp, -0xc] | var_ch = r3;
0x00010a20 mov r3, 0 | r3 = 0;
0x00010a24 str r3, [fp, -8] | var_8h = r3;
0x00010a28 sub r0, fp, 0xc | r0 -= var_ch;
0x00010a2c mov r3, 0 | r3 = 0;
0x00010a30 ldr r2, [pc, 0xec] | r2 = *(0x10b20);
0x00010a34 mov r1, 0 | r1 = 0;
0x00010a38 bl 0x10870 | r0 = pthread_create (r0, r1, r2, r3);
0x00010a3c mov r3, r0 | r3 = r0;
0x00010a40 cmp r3, 0 |
| if (r3 == 0) {
0x00010a44 movne r3, 1 | r3 = 1;
| }
| if (r3 != 0) {
0x00010a48 moveq r3, 0 | r3 = 0;
| }
0x00010a4c and r3, r3, 0xff | r3 &= 0xff;
0x00010a50 cmp r3, 0 |
| if (r3 != 0) {
0x00010a54 beq 0x10a7c |
0x00010a58 bl 0x107d4 | r0 = errno_location ();
0x00010a5c mov r3, r0 | r3 = r0;
0x00010a60 ldr r3, [r3] | r3 = *(r3);
0x00010a64 mov r1, r3 | r1 = r3;
0x00010a68 ldr r0, [pc, 0xb8] | r0 = $d;
0x00010a6c bl 0x108dc | printf (r0, r1, r2, r3)
0x00010a70 mov r3, 0 | r3 = 0;
0x00010a74 str r3, [fp, -8] | var_8h = r3;
0x00010a78 b 0x10a84 |
| } else {
0x00010a7c mov r3, 1 | r3 = 1;
0x00010a80 str r3, [fp, -8] | var_8h = r3;
| }
0x00010a84 ldr r3, [fp, -8] | r3 = var_8h;
0x00010a88 cmp r3, 0 |
| if (r3 != 0) {
0x00010a8c beq 0x10aec |
0x00010a90 sub r0, fp, 0xc | r0 -= var_ch;
0x00010a94 mov r3, 0 | r3 = 0;
0x00010a98 ldr r2, [pc, 0x8c] | r2 = "correctTimeThread_creation_error:_d";
0x00010a9c mov r1, 0 | r1 = 0;
0x00010aa0 bl 0x10870 | r0 = pthread_create (r0, r1, "correctTimeThread_creation_error:_d", r3);
0x00010aa4 mov r3, r0 | r3 = r0;
0x00010aa8 cmp r3, 0 |
| if (r3 == 0) {
0x00010aac movne r3, 1 | r3 = 1;
| }
| if (r3 != 0) {
0x00010ab0 moveq r3, 0 | r3 = 0;
| }
0x00010ab4 and r3, r3, 0xff | r3 &= 0xff;
0x00010ab8 cmp r3, 0 |
| if (r3 != 0) {
0x00010abc beq 0x10ae4 |
0x00010ac0 bl 0x107d4 | r0 = errno_location ();
0x00010ac4 mov r3, r0 | r3 = r0;
0x00010ac8 ldr r3, [r3] | r3 = *(r3);
0x00010acc mov r1, r3 | r1 = r3;
0x00010ad0 ldr r0, [pc, 0x58] | r0 = *(0x10b2c);
0x00010ad4 bl 0x108dc | printf (r0, r1, r2, r3)
0x00010ad8 mov r3, 0 | r3 = 0;
0x00010adc str r3, [fp, -8] | var_8h = r3;
0x00010ae0 b 0x10aec |
| } else {
0x00010ae4 mov r3, 1 | r3 = 1;
0x00010ae8 str r3, [fp, -8] | var_8h = r3;
| }
| }
0x00010aec ldr r3, [fp, -8] | r3 = var_8h;
0x00010af0 cmp r3, 0 |
| if (r3 == 0) {
0x00010af4 beq 0x10b04 | goto label_0;
| }
| do {
0x00010af8 mov r0, 0xa | r0 = 0xa;
0x00010afc bl 0x107ec | sleep (r0);
0x00010b00 b 0x10af8 |
| } while (1);
| label_0:
0x00010b04 ldr r0, [pc, 0x28] | r0 = "checkTimeThread_creation_error:_d";
0x00010b08 bl 0x108d0 | pthread_cond_destroy ();
0x00010b0c ldr r0, [pc, 0x24] | r0 = *(0x10b34);
0x00010b10 bl 0x1084c | pthread_mutex_destroy ();
0x00010b14 mov r3, 0 | r3 = 0;
0x00010b18 mov r0, r3 | r0 = r3;
0x00010b1c sub sp, fp, 4 |
0x00010b20 pop {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/sbin/checkTime @ 0x10c30 */
| #include <stdint.h>
|
; (fcn) sym.UpdateExtRTC__ () | void UpdateExtRTC_ () {
| void * s;
| int32_t var_5ch;
| int32_t var_58h;
| int32_t var_54h;
| int32_t var_50h;
| int32_t var_4ch;
| int32_t var_48h;
| int32_t var_3ch;
| int32_t var_38h;
| int32_t var_34h;
| int32_t var_30h;
| int32_t var_2ch;
| int32_t var_28h;
| int32_t var_24h;
| time_t * request;
| int32_t var_ch;
| int32_t fildes;
| int32_t var_4h_2;
| int32_t var_4h;
| /* UpdateExtRTC() */
0x00010c30 push {fp, lr} |
0x00010c34 add fp, sp, 4 |
0x00010c38 sub sp, sp, 0x60 |
0x00010c3c mvn r3, 0 | r3 = ~0;
0x00010c40 str r3, [fp, -8] | fildes = r3;
0x00010c44 sub r3, fp, 0x60 | r3 -= s;
0x00010c48 mov r2, 0x24 | r2 = 0x24;
0x00010c4c mov r1, 0 | r1 = 0;
0x00010c50 mov r0, r3 | r0 = r3;
0x00010c54 bl 0x108a0 | memset (r0, r1, r2);
0x00010c58 mov r1, 2 | r1 = 2;
0x00010c5c ldr r0, [pc, 0x110] | r0 = *(0x10d70);
0x00010c60 bl 0x107e0 | r0 = open (r0, r1, r2);
0x00010c64 mov r3, r0 | r3 = r0;
0x00010c68 str r3, [fp, -8] | fildes = r3;
0x00010c6c ldr r3, [fp, -8] | r3 = fildes;
0x00010c70 cmn r3, 1 |
| if (r3 == 1) {
0x00010c74 bne 0x10c94 |
0x00010c78 bl 0x107d4 | r0 = errno_location ();
0x00010c7c mov r3, r0 | r3 = r0;
0x00010c80 ldr r3, [r3] | r3 = *(r3);
0x00010c84 mov r1, r3 | r1 = r3;
0x00010c88 ldr r0, [pc, 0xe8] | r0 = "_dev_rtc0";
0x00010c8c bl 0x108dc | printf ("_dev_rtc0", r1, r2, r3)
0x00010c90 b 0x10d50 |
| } else {
0x00010c94 mov r0, 0 | r0 = 0;
0x00010c98 bl 0x10864 | r0 = time (r0);
0x00010c9c mov r3, r0 | r3 = r0;
0x00010ca0 str r3, [fp, -0x10] | request = r3;
0x00010ca4 sub r3, fp, 0x10 | r3 -= request;
0x00010ca8 mov r0, r3 | r0 = r3;
0x00010cac bl 0x1081c | r0 = gmtime (r0);
0x00010cb0 mov r3, r0 | r3 = r0;
0x00010cb4 sub ip, fp, 0x3c |
0x00010cb8 mov lr, r3 | lr = r3;
0x00010cbc ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x00010cc0 stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x00010cc4 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x00010cc8 stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x00010ccc ldm lr, {r0, r1, r2} | r0 = *(lr);
| r1 = *((lr + 4));
| r2 = *((lr + 8));
0x00010cd0 stm ip, {r0, r1, r2} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
0x00010cd4 ldr r3, [fp, -0x34] | r3 = var_34h;
0x00010cd8 str r3, [fp, -0x58] | var_58h = r3;
0x00010cdc ldr r3, [fp, -0x38] | r3 = var_38h;
0x00010ce0 str r3, [fp, -0x5c] | var_5ch = r3;
0x00010ce4 ldr r3, [fp, -0x3c] | r3 = var_3ch;
0x00010ce8 str r3, [fp, -0x60] | s = r3;
0x00010cec ldr r3, [fp, -0x28] | r3 = var_28h;
0x00010cf0 str r3, [fp, -0x4c] | var_4ch = r3;
0x00010cf4 ldr r3, [fp, -0x2c] | r3 = var_2ch;
0x00010cf8 str r3, [fp, -0x50] | var_50h = r3;
0x00010cfc ldr r3, [fp, -0x30] | r3 = var_30h;
0x00010d00 str r3, [fp, -0x54] | var_54h = r3;
0x00010d04 ldr r3, [fp, -0x24] | r3 = var_24h;
0x00010d08 str r3, [fp, -0x48] | var_48h = r3;
0x00010d0c sub r3, fp, 0x60 | r3 -= s;
0x00010d10 mov r2, r3 | r2 = r3;
0x00010d14 ldr r1, [pc, 0x60] | r1 = "UpdateExtRTC_open_error:_d";
0x00010d18 ldr r0, [fp, -8] | r0 = fildes;
0x00010d1c bl 0x10810 | ioctl (r0, "UpdateExtRTC_open_error:_d");
0x00010d20 str r0, [fp, -0xc] | var_ch = r0;
0x00010d24 ldr r3, [fp, -0xc] | r3 = var_ch;
0x00010d28 cmn r3, 1 |
| if (r3 == 1) {
0x00010d2c bne 0x10d4c |
0x00010d30 bl 0x107d4 | r0 = errno_location ();
0x00010d34 mov r3, r0 | r3 = r0;
0x00010d38 ldr r3, [r3] | r3 = *(r3);
0x00010d3c mov r1, r3 | r1 = r3;
0x00010d40 ldr r0, [pc, 0x38] | r0 = *(0x10d7c);
0x00010d44 bl 0x108dc | printf (r0, r1, r2, r3)
0x00010d48 b 0x10d50 |
| } else {
0x00010d4c mov r0, r0 |
| }
| }
0x00010d50 ldr r3, [fp, -8] | r3 = fildes;
0x00010d54 cmp r3, 0 |
| if (r3 >= 0) {
0x00010d58 blt 0x10d64 |
0x00010d5c ldr r0, [fp, -8] | r0 = fildes;
0x00010d60 bl 0x10888 | close (r0);
| }
0x00010d64 mov r3, 0 | r3 = 0;
0x00010d68 mov r0, r3 | r0 = r3;
0x00010d6c sub sp, fp, 4 |
0x00010d70 pop {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/sbin/checkTime @ 0x10d84 */
| #include <stdint.h>
|
; (fcn) sym.UpdateIntRTC__ () | void UpdateIntRTC_ () {
| int32_t var_68h;
| int32_t var_64h;
| int32_t var_60h;
| int32_t var_5ch;
| int32_t var_58h;
| int32_t var_54h;
| int32_t var_50h;
| int32_t var_44h;
| int32_t var_40h;
| int32_t var_3ch;
| int32_t var_38h;
| int32_t var_34h;
| int32_t var_30h;
| int32_t var_2ch;
| int32_t var_18h;
| int32_t var_14h;
| int32_t var_10h;
| int32_t var_ch;
| int32_t fildes;
| int32_t var_4h_2;
| int32_t var_4h;
| /* UpdateIntRTC() */
0x00010d84 push {fp, lr} |
0x00010d88 add fp, sp, 4 |
0x00010d8c sub sp, sp, 0x68 |
0x00010d90 mvn r3, 0 | r3 = ~0;
0x00010d94 str r3, [fp, -8] | fildes = r3;
0x00010d98 mov r1, 2 | r1 = 2;
0x00010d9c ldr r0, [pc, 0xfc] | r0 = *(0x10e9c);
0x00010da0 bl 0x107e0 | r0 = open (r0, r1, r2);
0x00010da4 mov r3, r0 | r3 = r0;
0x00010da8 str r3, [fp, -8] | fildes = r3;
0x00010dac ldr r3, [fp, -8] | r3 = fildes;
0x00010db0 cmn r3, 1 |
| if (r3 == 1) {
0x00010db4 bne 0x10dd4 |
0x00010db8 bl 0x107d4 | r0 = errno_location ();
0x00010dbc mov r3, r0 | r3 = r0;
0x00010dc0 ldr r3, [r3] | r3 = *(r3);
0x00010dc4 mov r1, r3 | r1 = r3;
0x00010dc8 ldr r0, [pc, 0xd4] | r0 = "_dev_rtc0";
0x00010dcc bl 0x108dc | printf ("_dev_rtc0", r1, r2, r3)
0x00010dd0 b 0x10e7c |
| } else {
0x00010dd4 sub r3, fp, 0x68 | r3 -= var_68h;
0x00010dd8 mov r2, r3 | r2 = r3;
0x00010ddc ldr r1, [pc, 0xc4] | r1 = "UpdateExtRTC_open_error:_d";
0x00010de0 ldr r0, [fp, -8] | r0 = fildes;
0x00010de4 bl 0x10810 | ioctl (r0, "UpdateExtRTC_open_error:_d");
0x00010de8 str r0, [fp, -0xc] | var_ch = r0;
0x00010dec ldr r3, [fp, -0xc] | r3 = var_ch;
0x00010df0 cmn r3, 1 |
| if (r3 == 1) {
0x00010df4 bne 0x10e10 |
0x00010df8 bl 0x107d4 | r0 = errno_location ();
0x00010dfc mov r3, r0 | r3 = r0;
0x00010e00 ldr r3, [r3] | r3 = *(r3);
0x00010e04 mov r1, r3 | r1 = r3;
0x00010e08 ldr r0, [pc, 0x9c] | r0 = *(0x10ea8);
0x00010e0c bl 0x108dc | printf (r0, r1, r2, r3)
| }
0x00010e10 ldr r3, [fp, -0x60] | r3 = var_60h;
0x00010e14 str r3, [fp, -0x3c] | var_3ch = r3;
0x00010e18 ldr r3, [fp, -0x64] | r3 = var_64h;
0x00010e1c str r3, [fp, -0x40] | var_40h = r3;
0x00010e20 ldr r3, [fp, -0x68] | r3 = var_68h;
0x00010e24 str r3, [fp, -0x44] | var_44h = r3;
0x00010e28 ldr r3, [fp, -0x54] | r3 = var_54h;
0x00010e2c str r3, [fp, -0x30] | var_30h = r3;
0x00010e30 ldr r3, [fp, -0x58] | r3 = var_58h;
0x00010e34 str r3, [fp, -0x34] | var_34h = r3;
0x00010e38 ldr r3, [fp, -0x5c] | r3 = var_5ch;
0x00010e3c str r3, [fp, -0x38] | var_38h = r3;
0x00010e40 ldr r3, [fp, -0x50] | r3 = var_50h;
0x00010e44 str r3, [fp, -0x2c] | var_2ch = r3;
0x00010e48 sub r3, fp, 0x44 | r3 -= var_44h;
0x00010e4c mov r0, r3 | r0 = r3;
0x00010e50 bl 0x10840 | timegm ();
0x00010e54 str r0, [fp, -0x10] | var_10h = r0;
0x00010e58 ldr r3, [fp, -0x10] | r3 = var_10h;
0x00010e5c str r3, [fp, -0x18] | var_18h = r3;
0x00010e60 mov r3, 0 | r3 = 0;
0x00010e64 str r3, [fp, -0x14] | var_14h = r3;
0x00010e68 sub r3, fp, 0x18 | r3 -= var_18h;
0x00010e6c mov r1, 0 | r1 = 0;
0x00010e70 mov r0, r3 | r0 = r3;
0x00010e74 bl 0x10828 | settimeofday ();
0x00010e78 str r0, [fp, -0xc] | var_ch = r0;
| }
0x00010e7c ldr r3, [fp, -8] | r3 = fildes;
0x00010e80 cmp r3, 0 |
| if (r3 >= 0) {
0x00010e84 blt 0x10e90 |
0x00010e88 ldr r0, [fp, -8] | r0 = fildes;
0x00010e8c bl 0x10888 | close (r0);
| }
0x00010e90 mov r3, 0 | r3 = 0;
0x00010e94 mov r0, r3 | r0 = r3;
0x00010e98 sub sp, fp, 4 |
0x00010e9c pop {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/sbin/checkTime @ 0x10eb0 */
| #include <stdint.h>
|
; (fcn) sym.correctTimeThread_void_ () | void correctTimeThread_void_ (int32_t arg1) {
| int32_t var_60h;
| time_t * var_58h;
| int32_t var_54h;
| int32_t var_4ch;
| int32_t var_48h;
| int32_t var_44h;
| time_t * timer;
| int32_t var_1ch;
| int32_t var_18h;
| int32_t var_16h;
| int32_t var_14h;
| int32_t var_10h;
| int32_t var_ch;
| int32_t var_6h;
| int32_t var_4h;
| r0 = arg1;
| /* correctTimeThread(void*) */
0x00010eb0 push {fp, lr} |
0x00010eb4 add fp, sp, 4 |
0x00010eb8 sub sp, sp, 0x60 |
0x00010ebc str r0, [fp, -0x60] | var_60h = r0;
0x00010ec0 mov r3, 0 | r3 = 0;
0x00010ec4 str r3, [fp, -0xc] | var_ch = r3;
0x00010ec8 ldr r1, [pc, 0x260] | r1 = *(0x1112c);
0x00010ecc ldr r0, [pc, 0x260] | r0 = $d;
0x00010ed0 bl 0x10b3c | r0 = sym ();
0x00010ed4 mov r3, r0 | r3 = r0;
0x00010ed8 str r3, [fp, -0x10] | var_10h = r3;
0x00010edc ldr r3, [fp, -0x10] | r3 = var_10h;
0x00010ee0 add r3, r3, 4 | r3 += 4;
0x00010ee4 str r3, [fp, -0x14] | var_14h = r3;
0x00010ee8 ldr r3, [fp, -0x14] | r3 = var_14h;
0x00010eec ldr r3, [r3, 0xe0] | r3 = *((r3 + 0xe0));
0x00010ef0 lsr r3, r3, 8 | r3 >>= 8;
0x00010ef4 strh r3, [fp, -0x16] | var_16h = r3;
0x00010ef8 ldr r3, [fp, -0x14] | r3 = var_14h;
0x00010efc ldr r3, [r3, 0xe0] | r3 = *((r3 + 0xe0));
0x00010f00 lsl r3, r3, 0x10 | r3 <<= 0x10;
0x00010f04 lsr r3, r3, 0x10 | r3 >>= 0x10;
0x00010f08 and r3, r3, 0xff | r3 &= 0xff;
0x00010f0c strh r3, [fp, -0x18] | var_18h = r3;
0x00010f10 ldr r1, [pc, 0x218] | r1 = *(0x1112c);
0x00010f14 ldr r0, [fp, -0x10] | r0 = var_10h;
0x00010f18 bl 0x10be4 | sym ();
0x00010f1c ldrh r3, [fp, -0x16] | r3 = var_16h;
0x00010f20 ldrh r2, [fp, -0x18] | r2 = var_18h;
0x00010f24 mov r1, r3 | r1 = r3;
0x00010f28 ldr r0, [pc, 0x208] | r0 = *(0x11134);
0x00010f2c bl 0x108dc | printf (r0, r1, r2, r3)
0x00010f30 mov r0, 0 | r0 = 0;
0x00010f34 bl 0x10864 | r0 = time (r0);
0x00010f38 mov r3, r0 | r3 = r0;
0x00010f3c str r3, [fp, -0x20] | timer = r3;
0x00010f40 sub r3, fp, 0x20 | r3 -= timer;
0x00010f44 mov r0, r3 | r0 = r3;
0x00010f48 bl 0x1081c | r0 = gmtime (r0);
0x00010f4c mov r3, r0 | r3 = r0;
0x00010f50 sub ip, fp, 0x4c |
0x00010f54 mov lr, r3 | lr = r3;
0x00010f58 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x00010f5c stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x00010f60 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x00010f64 stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x00010f68 ldm lr, {r0, r1, r2} | r0 = *(lr);
| r1 = *((lr + 4));
| r2 = *((lr + 8));
0x00010f6c stm ip, {r0, r1, r2} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
0x00010f70 ldr r2, [fp, -0x44] | r2 = var_44h;
0x00010f74 ldrh r3, [fp, -0x16] | r3 = var_16h;
0x00010f78 add r1, r2, r3 | r1 = r2 + r3;
0x00010f7c ldr r0, [pc, 0x1b8] | r0 = "wSyncHour:_d__wSyncMin:_d";
0x00010f80 smull r2, r3, r1, r0 | r2:r3 = r1 * r0;
0x00010f84 asr r2, r3, 2 | r2 = r3 >> 2;
0x00010f88 asr r3, r1, 0x1f | r3 = r1 >> 0x1f;
0x00010f8c sub r2, r2, r3 | r2 -= r3;
0x00010f90 mov r3, r2 | r3 = r2;
0x00010f94 lsl r3, r3, 1 | r3 <<= 1;
0x00010f98 add r3, r3, r2 | r3 += r2;
0x00010f9c lsl r3, r3, 3 | r3 <<= 3;
0x00010fa0 sub r2, r1, r3 | r2 = r1 - r3;
0x00010fa4 strh r2, [fp, -6] | var_6h = r2;
| do {
| label_0:
0x00010fa8 mov r3, 0 | r3 = 0;
0x00010fac str r3, [fp, -0x1c] | var_1ch = r3;
0x00010fb0 sub r3, fp, 0x58 | r3 -= var_58h;
0x00010fb4 mov r0, r3 | r0 = r3;
0x00010fb8 bl 0x10864 | time (r0);
0x00010fbc ldr r3, [fp, -0x58] | r3 = var_58h;
0x00010fc0 add r3, r3, 0x37 | r3 += 0x37;
0x00010fc4 str r3, [fp, -0x54] | var_54h = r3;
0x00010fc8 sub r3, fp, 0x54 | r3 -= var_54h;
0x00010fcc mov r2, r3 | r2 = r3;
0x00010fd0 ldr r1, [pc, 0x168] | r1 = *(0x1113c);
0x00010fd4 ldr r0, [pc, 0x168] | r0 = m;
0x00010fd8 bl 0x10894 | r0 = pthread_cond_timedwait ();
0x00010fdc mov r3, r0 | r3 = r0;
0x00010fe0 str r3, [fp, -0x1c] | var_1ch = r3;
0x00010fe4 ldr r3, [fp, -0x1c] | r3 = var_1ch;
0x00010fe8 cmp r3, 0x6e |
| if (r3 != 0x6e) {
0x00010fec bne 0x11098 | goto label_1;
| }
0x00010ff0 mov r0, 0 | r0 = 0;
0x00010ff4 bl 0x10864 | r0 = time (r0);
0x00010ff8 mov r3, r0 | r3 = r0;
0x00010ffc str r3, [fp, -0x20] | timer = r3;
0x00011000 sub r3, fp, 0x20 | r3 -= timer;
0x00011004 mov r0, r3 | r0 = r3;
0x00011008 bl 0x1081c | r0 = gmtime (r0);
0x0001100c mov r3, r0 | r3 = r0;
0x00011010 sub ip, fp, 0x4c |
0x00011014 mov lr, r3 | lr = r3;
0x00011018 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x0001101c stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x00011020 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x00011024 stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x00011028 ldm lr, {r0, r1, r2} | r0 = *(lr);
| r1 = *((lr + 4));
| r2 = *((lr + 8));
0x0001102c stm ip, {r0, r1, r2} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
0x00011030 ldr r2, [fp, -0x44] | r2 = var_44h;
0x00011034 ldrh r3, [fp, -6] | r3 = var_6h;
0x00011038 cmp r2, r3 |
0x0001103c bne 0x10fa8 |
| } while (r2 != r3);
0x00011040 ldr r2, [fp, -0x48] | r2 = var_48h;
0x00011044 ldrh r3, [fp, -0x18] | r3 = var_18h;
0x00011048 cmp r2, r3 |
| if (r2 != r3) {
0x0001104c bne 0x10fa8 | goto label_0;
| }
0x00011050 ldr r2, [fp, -0x44] | r2 = var_44h;
0x00011054 ldrh r3, [fp, -0x16] | r3 = var_16h;
0x00011058 add r1, r2, r3 | r1 = r2 + r3;
0x0001105c ldr r0, [pc, 0xd8] | r0 = "wSyncHour:_d__wSyncMin:_d";
0x00011060 smull r2, r3, r1, r0 | r2:r3 = r1 * r0;
0x00011064 asr r2, r3, 2 | r2 = r3 >> 2;
0x00011068 asr r3, r1, 0x1f | r3 = r1 >> 0x1f;
0x0001106c sub r2, r2, r3 | r2 -= r3;
0x00011070 mov r3, r2 | r3 = r2;
0x00011074 lsl r3, r3, 1 | r3 <<= 1;
0x00011078 add r3, r3, r2 | r3 += r2;
0x0001107c lsl r3, r3, 3 | r3 <<= 3;
0x00011080 sub r2, r1, r3 | r2 = r1 - r3;
0x00011084 strh r2, [fp, -6] | var_6h = r2;
0x00011088 mov r3, 1 | r3 = 1;
0x0001108c str r3, [fp, -0xc] | var_ch = r3;
0x00011090 bl 0x10d84 | sym ();
0x00011094 b 0x10fa8 | goto label_0;
| label_1:
0x00011098 ldr r3, [fp, -0xc] | r3 = var_ch;
0x0001109c cmp r3, 0 |
| if (r3 == 0) {
0x000110a0 bne 0x11124 |
0x000110a4 bl 0x10c30 | sym ();
0x000110a8 mov r0, 0 | r0 = 0;
0x000110ac bl 0x10864 | r0 = time (r0);
0x000110b0 mov r3, r0 | r3 = r0;
0x000110b4 str r3, [fp, -0x20] | timer = r3;
0x000110b8 sub r3, fp, 0x20 | r3 -= timer;
0x000110bc mov r0, r3 | r0 = r3;
0x000110c0 bl 0x1081c | r0 = gmtime (r0);
0x000110c4 mov r3, r0 | r3 = r0;
0x000110c8 sub ip, fp, 0x4c |
0x000110cc mov lr, r3 | lr = r3;
0x000110d0 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x000110d4 stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x000110d8 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x000110dc stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x000110e0 ldm lr, {r0, r1, r2} | r0 = *(lr);
| r1 = *((lr + 4));
| r2 = *((lr + 8));
0x000110e4 stm ip, {r0, r1, r2} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
0x000110e8 ldr r2, [fp, -0x44] | r2 = var_44h;
0x000110ec ldrh r3, [fp, -0x16] | r3 = var_16h;
0x000110f0 add r1, r2, r3 | r1 = r2 + r3;
0x000110f4 ldr r0, [pc, 0x40] | r0 = "wSyncHour:_d__wSyncMin:_d";
0x000110f8 smull r2, r3, r1, r0 | r2:r3 = r1 * r0;
0x000110fc asr r2, r3, 2 | r2 = r3 >> 2;
0x00011100 asr r3, r1, 0x1f | r3 = r1 >> 0x1f;
0x00011104 sub r2, r2, r3 | r2 -= r3;
0x00011108 mov r3, r2 | r3 = r2;
0x0001110c lsl r3, r3, 1 | r3 <<= 1;
0x00011110 add r3, r3, r2 | r3 += r2;
0x00011114 lsl r3, r3, 3 | r3 <<= 3;
0x00011118 sub r2, r1, r3 | r2 = r1 - r3;
0x0001111c strh r2, [fp, -6] | var_6h = r2;
0x00011120 b 0x10fa8 | goto label_0;
| }
0x00011124 mov r3, 0 | r3 = 0;
0x00011128 str r3, [fp, -0xc] | var_ch = r3;
0x0001112c b 0x10fa8 | 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/sbin/checkTime @ 0x10b3c */
| #include <stdint.h>
|
; (fcn) sym.my_mmap_unsigned_int__unsigned_int_ () | void my_mmap_unsigned_int_unsigned_int_ (int32_t arg1, size_t arg2) {
| size_t length;
| int32_t var_10h;
| int32_t var_8h;
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_4h_3;
| int32_t var_4h_2;
| r0 = arg1;
| r1 = arg2;
| /* my_mmap(unsigned int, unsigned int) */
0x00010b3c push {fp, lr} |
0x00010b40 add fp, sp, 4 |
0x00010b44 sub sp, sp, 0x18 |
0x00010b48 str r0, [fp, -0x10] | var_10h = r0;
0x00010b4c str r1, [fp, -0x14] | length = r1;
0x00010b50 mov r2, 0 | r2 = 0;
0x00010b54 mov r1, 2 | r1 = 2;
0x00010b58 ldr r0, [pc, 0x78] | r0 = *(0x10bd4);
0x00010b5c bl 0x107e0 | r0 = open (r0, r1, r2);
0x00010b60 mov r2, r0 | r2 = r0;
0x00010b64 ldr r3, [pc, 0x70] | r3 = "_dev_mem";
0x00010b68 str r2, [r3] | *(r3) = r2;
0x00010b6c ldr r3, [pc, 0x68] |
0x00010b70 ldr r3, [r3] | r3 = "_dev_mem";
0x00010b74 cmp r3, 0 |
| if (r3 < 0) {
0x00010b78 bge 0x10b9c |
0x00010b7c bl 0x107d4 | r0 = errno_location ();
0x00010b80 mov r3, r0 | r3 = r0;
0x00010b84 ldr r3, [r3] | r3 = *(r3);
0x00010b88 mov r1, r3 | r1 = r3;
0x00010b8c ldr r0, [pc, 0x4c] | r0 = *(0x10bdc);
0x00010b90 bl 0x108dc | printf (r0, r1, r2, r3)
0x00010b94 mov r3, 0 | r3 = 0;
0x00010b98 b 0x10bcc |
| } else {
0x00010b9c ldr r3, [pc, 0x38] |
0x00010ba0 ldr r3, [r3] | r3 = "_dev_mem";
0x00010ba4 ldr r2, [fp, -0x10] | r2 = var_10h;
0x00010ba8 str r2, [sp, 4] | var_4h = r2;
0x00010bac str r3, [sp] | *(sp) = r3;
0x00010bb0 mov r3, 1 | r3 = 1;
0x00010bb4 mov r2, 3 | r2 = 3;
0x00010bb8 ldr r1, [fp, -0x14] | r1 = length;
0x00010bbc mov r0, 0 | r0 = 0;
0x00010bc0 bl 0x10858 | mmap (r0, r1, r2, r3, r4, r5);
0x00010bc4 str r0, [fp, -8] | var_8h = r0;
0x00010bc8 ldr r3, [fp, -8] | r3 = var_8h;
| }
0x00010bcc mov r0, r3 | r0 = r3;
0x00010bd0 sub sp, fp, 4 |
0x00010bd4 pop {fp, pc} |
| }
[*] Function printf used 9 times checkTime