[*] Binary protection state of vmd
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of vmd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/share/packages/AXIS_Video_Motion_Detection_4_4_5_mipsisa32r2el_signed.eap_extract/0-972268.gzip_extract/AXIS_Video_Motion_Detection_4_4-5_mipsisa32r2el.eap_new_extract/vmd @ 0x45f150 */
| #include <stdint.h>
|
; (fcn) method.SceneReader.initialize_int__int__int__API_Version_const_ () | void method_SceneReader_initialize_int_int_int_API_Version_const_ () {
| /* SceneReader::initialize(int, int, int, API_Version const&) */
0x0045f150 addiu sp, sp, -0xb8 |
0x0045f154 sw fp, 0xb0(sp) | *(var_b0h) = fp;
0x0045f158 sw s4, 0xa0(sp) | *(var_a0h) = s4;
0x0045f15c sw s1, 0x94(sp) | *(var_94h) = s1;
0x0045f160 sw ra, 0xb4(sp) | *(var_b4h) = ra;
0x0045f164 sw s7, 0xac(sp) | *(var_ach) = s7;
0x0045f168 sw s6, 0xa8(sp) | *(var_a8h) = s6;
0x0045f16c sw s5, 0xa4(sp) | *(var_a4h) = s5;
0x0045f170 sw s3, 0x9c(sp) | *(var_9ch) = s3;
0x0045f174 sw s2, 0x98(sp) | *(var_98h) = s2;
0x0045f178 sw s0, 0x90(sp) | *(var_90h) = s0;
0x0045f17c move s1, a1 | s1 = a1;
0x0045f180 move s4, a0 | s4 = a0;
0x0045f184 sw a3, 0xc4(sp) | *(arg_c4h) = a3;
0x0045f188 lw fp, 0xc8(sp) | fp = *(arg_c8h);
| if (a1 < 0) {
0x0045f18c bltz a1, 0x45f420 | goto label_10;
| }
0x0045f190 addiu s2, sp, 0x18 | s2 = sp + 0x18;
0x0045f194 move a0, s2 | a0 = s2;
0x0045f198 addiu a1, fp, 8 | a1 = fp + 8;
0x0045f19c move s7, a2 | s7 = a2;
0x0045f1a0 jal 0x4d7940 | fcn_004d7940 ();
0x0045f1a4 addiu a0, sp, 0x84 | a0 = sp + 0x84;
0x0045f1a8 move a1, s2 | a1 = s2;
0x0045f1ac jal 0x4d7940 | fcn_004d7940 ();
0x0045f1b0 lui a1, 0x4b | a1 = " OPEN";
| /* str._OPEN */
0x0045f1b4 addiu a1, a1, 0x4b50 |
0x0045f1b8 addiu a0, sp, 0x84 | a0 = sp + 0x84;
0x0045f1bc addiu a2, zero, 5 | a2 = 5;
0x0045f1c0 jal 0x4d7fb0 | fcn_004d7fb0 ();
0x0045f1c4 lw a0, 0x18(sp) | a0 = *(var_18h);
0x0045f1c8 lui s5, 0x4f | s5 = 0x4e90a0;
| /* obj.std::string::_Rep::_S_empty_rep_storage */
0x0045f1cc addiu s5, s5, -0x6f60 |
0x0045f1d0 addiu s0, a0, -0xc | s0 = a0 + -0xc;
| if (s0 != s5) {
0x0045f1d4 bne s0, s5, 0x45f520 | goto label_11;
| }
0x0045f1d8 nop |
0x0045f1dc lui s0, 0x4b | s0 = 0x4b4b90;
| label_7:
0x0045f1e0 addiu s0, s0, 0x4b90 |
0x0045f1e4 addiu s6, s0, 0x10 | s6 = s0 + 0x10;
0x0045f1e8 lw s3, (s0) | s3 = *(s0);
| do {
0x0045f1ec move a0, fp | a0 = fp;
0x0045f1f0 move a1, s3 | a1 = s3;
0x0045f1f4 jal 0x46e670 | method ();
| if (v0 != 0) {
0x0045f1f8 beql v0, zero, 0x45f220 |
0x0045f1fc addiu s0, s0, 4 | s0 += 4;
0x0045f200 and v0, s3, s7 | v0 = s3 & s7;
0x0045f204 lui v0, 0x4b | v0 = 0x4b0000;
| if (s3 == v0) {
0x0045f208 beq s3, v0, 0x45f3a8 | goto label_12;
| }
| /* esilref: ' 0' */
0x0045f20c addiu a1, v0, 0x3cec | a1 = v0 + 0x3cec;
| label_0:
0x0045f210 addiu a0, sp, 0x84 | a0 = sp + 0x84;
0x0045f214 addiu a2, zero, 2 | a2 = 2;
0x0045f218 jal 0x4d7fb0 | fcn_004d7fb0 ();
0x0045f21c addiu s0, s0, 4 | s0 += 4;
| }
0x0045f220 lw s3, (s0) | s3 = *(s0);
0x0045f224 bnel s0, s6, 0x45f1ec |
| } while (s0 == s6);
0x0045f228 lw a1, 0xc4(sp) | a1 = *(arg_c4h);
0x0045f22c addiu a0, sp, 0x80 | a0 = sp + 0x80;
0x0045f230 jal 0x46d570 | method ();
0x0045f234 lw v0, 0x80(sp) | v0 = *(var_80h);
0x0045f238 addiu s3, sp, 0x7c | s3 = sp + 0x7c;
0x0045f23c move a0, s3 | a0 = s3;
0x0045f240 lw a1, -0xc(v0) | a1 = *((v0 - 3));
0x0045f244 lui v0, 0x4f | v0 = 0x4e90ac;
0x0045f248 addiu v0, v0, -0x6f54 |
0x0045f24c addiu a1, a1, 1 | a1++;
0x0045f250 sw v0, 0x7c(sp) | *(var_7ch) = v0;
0x0045f254 jal 0x4d7b60 | fcn_004d7b60 ();
0x0045f258 lui a1, 0x4b | a1 = 0x4b6514;
0x0045f25c addiu a1, a1, 0x6514 |
0x0045f260 move a0, s3 | a0 = s3;
0x0045f264 addiu a2, zero, 1 | a2 = 1;
0x0045f268 jal 0x4d7fb0 | fcn_004d7fb0 ();
0x0045f26c move a0, s3 | a0 = s3;
0x0045f270 addiu a1, sp, 0x80 | a1 = sp + 0x80;
0x0045f274 jal 0x4d7f30 | fcn_004d7f30 ();
0x0045f278 move a0, s2 | a0 = s2;
0x0045f27c move a1, s3 | a1 = s3;
0x0045f280 jal 0x4d7940 | fcn_004d7940 ();
0x0045f284 lui a1, 0x4b | a1 = 0x4b2d74;
0x0045f288 addiu a1, a1, 0x2d74 |
0x0045f28c move a0, s2 | a0 = s2;
0x0045f290 addiu a2, zero, 1 | a2 = 1;
0x0045f294 jal 0x4d7fb0 | fcn_004d7fb0 ();
0x0045f298 addiu a0, sp, 0x84 | a0 = sp + 0x84;
0x0045f29c move a1, s2 | a1 = s2;
0x0045f2a0 jal 0x4d7f30 | fcn_004d7f30 ();
0x0045f2a4 lw a0, 0x18(sp) | a0 = *(var_18h);
0x0045f2a8 addiu s0, a0, -0xc | s0 = a0 + -0xc;
| if (s0 != s5) {
0x0045f2ac bne s0, s5, 0x45f544 | goto label_13;
| }
0x0045f2b0 nop |
0x0045f2b4 lw a0, 0x7c(sp) | a0 = *(var_7ch);
| label_8:
0x0045f2b8 addiu s0, a0, -0xc | s0 = a0 + -0xc;
| if (s0 != s5) {
0x0045f2bc bne s0, s5, 0x45f4f4 | goto label_14;
| }
0x0045f2c0 nop |
0x0045f2c4 lw a0, 0x80(sp) | a0 = *(var_80h);
| label_6:
0x0045f2c8 addiu s0, a0, -0xc | s0 = a0 + -0xc;
0x0045f2cc lw a1, 0x84(sp) | a1 = *(var_84h);
| if (s0 != s5) {
0x0045f2d0 bne s0, s5, 0x45f4d0 | goto label_15;
| }
| label_5:
0x0045f2d4 move a0, s1 | a0 = s1;
0x0045f2d8 move a3, zero | a3 = 0;
0x0045f2dc lw a2, -0xc(a1) | a2 = *((a1 - 3));
0x0045f2e0 jal 0x4d7bc0 | fcn_004d7bc0 ();
0x0045f2e4 move a0, s2 | a0 = s2;
| if (v0 <= 0) {
0x0045f2e8 blez v0, 0x45f3b4 | goto label_16;
| }
0x0045f2ec move a1, zero | a1 = 0;
0x0045f2f0 addiu a2, zero, 0x64 | a2 = 0x64;
0x0045f2f4 move s0, s2 | s0 = s2;
0x0045f2f8 jal 0x4d84a0 | fcn_004d84a0 ();
0x0045f2fc move a0, s1 | a0 = s1;
| do {
0x0045f300 move a1, s0 | a1 = s0;
0x0045f304 addiu a2, zero, 1 | a2 = 1;
0x0045f308 jal 0x45eec0 | fcn_0045eec0 ();
0x0045f30c lui a1, 0x4b | a1 = 0x4b0000;
| if (v0 == 0) {
0x0045f310 beqz v0, 0x45f43c | goto label_17;
| }
0x0045f314 lb v0, (s0) | v0 = *(s0);
0x0045f318 move a1, s2 | a1 = s2;
| if (v0 == 0) {
0x0045f31c beqz v0, 0x45f340 | goto label_3;
| }
0x0045f320 addiu s0, s0, 1 | s0++;
0x0045f324 move a0, s1 | a0 = s1;
0x0045f328 bnel s3, s0, 0x45f300 |
| } while (s3 == s0);
0x0045f32c lui a1, 0x4b | a1 = "Reached max_len without match\n";
| /* str.Reached_max_len_without_match_n */
0x0045f330 addiu a1, a1, 0x4b68 |
0x0045f334 addiu a0, zero, 3 | a0 = 3;
0x0045f338 jal 0x4d8430 | fcn_004d8430 ();
0x0045f33c move a1, s2 | a1 = s2;
| label_3:
0x0045f340 move a0, s3 | a0 = s3;
0x0045f344 addiu a2, sp, 0x8c | a2 = sp + 0x8c;
0x0045f348 jal 0x4d7fd0 | fcn_004d7fd0 ();
0x0045f34c move a0, s4 | a0 = s4;
0x0045f350 move a1, s3 | a1 = s3;
0x0045f354 jal 0x45f6a0 | method ();
0x0045f358 lw a0, 0x7c(sp) | a0 = *(var_7ch);
0x0045f35c addiu s0, a0, -0xc | s0 = a0 + -0xc;
| if (s0 != s5) {
0x0045f360 bne s0, s5, 0x45f5b0 | goto label_18;
| }
0x0045f364 nop |
0x0045f368 lw a0, 0x84(sp) | a0 = *(var_84h);
| label_9:
0x0045f36c addiu s0, a0, -0xc | s0 = a0 + -0xc;
0x0045f370 lw ra, 0xb4(sp) | ra = *(var_b4h);
| if (s0 != s5) {
0x0045f374 bne s0, s5, 0x45f3fc | goto label_19;
| }
| do {
| label_1:
0x0045f378 move v0, s4 | v0 = s4;
0x0045f37c lw fp, 0xb0(sp) | fp = *(var_b0h);
0x0045f380 lw s7, 0xac(sp) | s7 = *(var_ach);
0x0045f384 lw s6, 0xa8(sp) | s6 = *(var_a8h);
0x0045f388 lw s5, 0xa4(sp) | s5 = *(var_a4h);
0x0045f38c lw s4, 0xa0(sp) | s4 = *(var_a0h);
0x0045f390 lw s3, 0x9c(sp) | s3 = *(var_9ch);
0x0045f394 lw s2, 0x98(sp) | s2 = *(var_98h);
0x0045f398 lw s1, 0x94(sp) | s1 = *(var_94h);
0x0045f39c lw s0, 0x90(sp) | s0 = *(var_90h);
0x0045f3a0 addiu sp, sp, 0xb8 |
0x0045f3a4 jr ra | return v0;
| label_12:
0x0045f3a8 lui v0, 0x4b | v0 = 0x4b0000;
0x0045f3ac j 0x45f210 | goto label_0;
| /* esilref: ' 1' */
0x0045f3b0 addiu a1, v0, 0x4b4c | a1 = v0 + 0x4b4c;
| label_16:
0x0045f3b4 lw a0, 0x84(sp) | a0 = *(var_84h);
0x0045f3b8 addiu s0, a0, -0xc | s0 = a0 + -0xc;
| if (s0 != s5) {
0x0045f3bc bne s0, s5, 0x45f464 | goto label_20;
| }
0x0045f3c0 nop |
| label_2:
0x0045f3c4 lui a1, 0x4b | a1 = 0x4b7960;
| label_4:
0x0045f3c8 addiu a1, a1, 0x7960 |
0x0045f3cc move a0, s2 | a0 = s2;
0x0045f3d0 addiu a2, sp, 0x8c | a2 = sp + 0x8c;
0x0045f3d4 jal 0x4d7fd0 | fcn_004d7fd0 ();
0x0045f3d8 move a0, s4 | a0 = s4;
0x0045f3dc move a1, s2 | a1 = s2;
0x0045f3e0 jal 0x45f6a0 | method ();
0x0045f3e4 lw a0, 0x18(sp) | a0 = *(var_18h);
0x0045f3e8 lui v0, 0x4f | v0 = 0x4f0000;
0x0045f3ec addiu s0, a0, -0xc | s0 = a0 + -0xc;
| /* obj.std::string::_Rep::_S_empty_rep_storage */
0x0045f3f0 addiu v0, v0, -0x6f60 | v0 += -0x6f60;
0x0045f3f4 lw ra, 0xb4(sp) | ra = *(var_b4h);
0x0045f3f8 beq s0, v0, 0x45f378 |
| } while (s0 == v0);
| label_19:
0x0045f3fc addiu a0, a0, -4 | a0 += -4;
0x0045f400 jal 0x41fce0 | sym_imp_fprintf ()
| if (v0 > 0) {
0x0045f404 bgtzl v0, 0x45f378 | goto label_1;
| }
0x0045f408 lw ra, 0xb4(sp) | ra = *(var_b4h);
0x0045f40c move a0, s0 | a0 = s0;
0x0045f410 addiu a1, sp, 0x88 | a1 = sp + 0x88;
0x0045f414 jal 0x4d7be0 | fcn_004d7be0 ();
0x0045f418 j 0x45f378 | goto label_1;
0x0045f41c lw ra, 0xb4(sp) | ra = *(var_b4h);
| label_10:
0x0045f420 lui a1, 0x4b | a1 = "Invalid scene descriptor: %i\n\n";
| /* str.Invalid_scene_descriptor:__i_n_n */
0x0045f424 addiu a1, a1, 0x4b00 |
0x0045f428 move a2, s1 | a2 = s1;
0x0045f42c addiu a0, zero, 3 | a0 = 3;
0x0045f430 jal 0x4d8430 | fcn_004d8430 ();
0x0045f434 j 0x45f3c4 | goto label_2;
0x0045f438 addiu s2, sp, 0x18 | s2 = sp + 0x18;
| /* str.Read_failed_n */
| label_17:
0x0045f43c addiu a1, a1, 0x4b58 | a1 += 0x4b58;
0x0045f440 addiu a0, zero, 3 | a0 = 3;
0x0045f444 jal 0x4d8430 | fcn_004d8430 ();
0x0045f448 j 0x45f340 | goto label_3;
0x0045f44c move a1, s2 | a1 = s2;
| label_20:
0x0045f464 addiu a0, a0, -4 | a0 += -4;
0x0045f468 jal 0x41fce0 | sym_imp_fprintf ()
| if (v0 > 0) {
0x0045f46c bgtzl v0, 0x45f3c8 | goto label_4;
| }
0x0045f470 lui a1, 0x4b | a1 = 0x4b0000;
0x0045f474 move a0, s0 | a0 = s0;
0x0045f478 addiu a1, sp, 0x88 | a1 = sp + 0x88;
0x0045f47c jal 0x4d7be0 | fcn_004d7be0 ();
0x0045f480 j 0x45f3c8 | goto label_4;
0x0045f484 lui a1, 0x4b | a1 = 0x4b0000;
| label_15:
0x0045f4d0 addiu a0, a0, -4 | a0 += -4;
0x0045f4d4 jal 0x41fce0 | sym_imp_fprintf ()
| if (v0 > 0) {
0x0045f4d8 bgtzl v0, 0x45f2d4 | goto label_5;
| }
0x0045f4dc lw a1, 0x84(sp) | a1 = *(var_84h);
0x0045f4e0 move a0, s0 | a0 = s0;
0x0045f4e4 addiu a1, sp, 0x88 | a1 = sp + 0x88;
0x0045f4e8 jal 0x4d7be0 | fcn_004d7be0 ();
0x0045f4ec j 0x45f2d4 | goto label_5;
0x0045f4f0 lw a1, 0x84(sp) | a1 = *(var_84h);
| label_14:
0x0045f4f4 addiu a0, a0, -4 | a0 += -4;
0x0045f4f8 jal 0x41fce0 | sym_imp_fprintf ()
| if (v0 > 0) {
0x0045f4fc bgtzl v0, 0x45f2c8 | goto label_6;
| }
0x0045f500 lw a0, 0x80(sp) | a0 = *(var_80h);
0x0045f504 move a0, s0 | a0 = s0;
0x0045f508 addiu a1, sp, 0x88 | a1 = sp + 0x88;
0x0045f50c jal 0x4d7be0 | fcn_004d7be0 ();
0x0045f510 j 0x45f2c8 | goto label_6;
0x0045f514 lw a0, 0x80(sp) | a0 = *(var_80h);
| label_11:
0x0045f520 addiu a0, a0, -4 | a0 += -4;
0x0045f524 jal 0x41fce0 | sym_imp_fprintf ()
| if (v0 > 0) {
0x0045f528 bgtzl v0, 0x45f1e0 | goto label_7;
| }
0x0045f52c lui s0, 0x4b | s0 = 0x4b0000;
0x0045f530 move a0, s0 | a0 = s0;
0x0045f534 addiu a1, sp, 0x88 | a1 = sp + 0x88;
0x0045f538 jal 0x4d7be0 | fcn_004d7be0 ();
0x0045f53c j 0x45f1e0 | goto label_7;
0x0045f540 lui s0, 0x4b | s0 = 0x4b0000;
| label_13:
0x0045f544 addiu a0, a0, -4 | a0 += -4;
0x0045f548 jal 0x41fce0 | sym_imp_fprintf ()
| if (v0 > 0) {
0x0045f54c bgtzl v0, 0x45f2b8 | goto label_8;
| }
0x0045f550 lw a0, 0x7c(sp) | a0 = *(var_7ch);
0x0045f554 move a0, s0 | a0 = s0;
0x0045f558 addiu a1, sp, 0x88 | a1 = sp + 0x88;
0x0045f55c jal 0x4d7be0 | fcn_004d7be0 ();
0x0045f560 j 0x45f2b8 | goto label_8;
0x0045f564 lw a0, 0x7c(sp) | a0 = *(var_7ch);
| label_18:
0x0045f5b0 addiu a0, a0, -4 | a0 += -4;
0x0045f5b4 jal 0x41fce0 | sym_imp_fprintf ()
| if (v0 > 0) {
0x0045f5b8 bgtzl v0, 0x45f36c | goto label_9;
| }
0x0045f5bc lw a0, 0x84(sp) | a0 = *(var_84h);
0x0045f5c0 move a0, s0 | a0 = s0;
0x0045f5c4 addiu a1, sp, 0x88 | a1 = sp + 0x88;
0x0045f5c8 jal 0x4d7be0 | fcn_004d7be0 ();
0x0045f5cc j 0x45f36c | goto label_9;
0x0045f5d0 lw a0, 0x84(sp) | a0 = *(var_84h);
| }
[*] Function printf used 8 times vmd