[*] Binary protection state of AJAJSaveFile.dll
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH Symbols
[*] Function fprintf tear down of AJAJSaveFile.dll
; 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/root/AJAJSaveFile.dll @ 0x1a530 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| int32_t var_14h;
| int32_t var_10h;
| int32_t var_ch;
| int32_t var_8h;
| int32_t var_4h_2;
| int32_t var_4h;
0x0001a530 push {fp, lr} |
0x0001a534 add fp, sp, 4 |
0x0001a538 sub sp, sp, 0x10 |
0x0001a53c ldr r0, [pc, 0x134] | r0 = *(0x1a674);
0x0001a540 bl 0x1c7d0 | r0 = scgi_initialize ();
0x0001a544 mov r3, r0 | r3 = r0;
0x0001a548 cmp r3, 0 |
| if (r3 == 0) {
0x0001a54c movne r3, 1 | r3 = 1;
| }
| if (r3 != 0) {
0x0001a550 moveq r3, 0 | r3 = 0;
| }
0x0001a554 and r3, r3, 0xff | r3 &= 0xff;
0x0001a558 cmp r3, 0 |
| if (r3 != 0) {
0x0001a55c beq 0x1a57c |
0x0001a560 ldr r3, [pc, 0x114] |
0x0001a564 ldr r3, [r3] | r3 = $d;
0x0001a568 ldr r2, [pc, 0x108] | r2 = *(0x1a674);
0x0001a56c ldr r1, [pc, 0x10c] | r1 = stderr;
0x0001a570 mov r0, r3 | r0 = r3;
0x0001a574 bl 0x11378 | fprintf (r0, r1, r2, r3)
0x0001a578 b 0x1a59c |
| } else {
0x0001a57c ldr r3, [pc, 0xf8] |
0x0001a580 ldr r3, [r3] | r3 = $d;
0x0001a584 ldr r2, [pc, 0xec] | r2 = *(0x1a674);
0x0001a588 ldr r1, [pc, 0xf4] | r1 = "Successfully_AJAJSaveFile.dll_port__d.";
0x0001a58c mov r0, r3 | r0 = r3;
0x0001a590 bl 0x11378 | fprintf (r0, "Successfully_AJAJSaveFile.dll_port__d.", r2, r3)
0x0001a594 mov r3, 0 | r3 = 0;
0x0001a598 b 0x1a66c | goto label_2;
| }
| do {
| label_1:
0x0001a59c ldr r0, [pc, 0xe4] | r0 = "Failed_AJAJSaveFile.dll_port__d.";
0x0001a5a0 bl 0x111ec | usleep ("Failed_AJAJSaveFile.dll_port__d.");
0x0001a5a4 mov r3, 0 | r3 = 0;
0x0001a5a8 str r3, [fp, -8] | var_8h = r3;
| label_0:
0x0001a5ac ldr r3, [fp, -8] | r3 = var_8h;
0x0001a5b0 cmp r3, 4 |
0x0001a5b4 bgt 0x1a59c |
| } while (r3 > 4);
0x0001a5b8 bl 0x1ca90 | r0 = scgi_recv ();
0x0001a5bc mov r3, r0 | r3 = r0;
0x0001a5c0 str r3, [fp, -0xc] | var_ch = r3;
0x0001a5c4 ldr r3, [fp, -0xc] | r3 = var_ch;
0x0001a5c8 cmp r3, 0 |
| if (r3 == 0) {
0x0001a5cc beq 0x1a664 | goto label_3;
| }
0x0001a5d0 ldr r3, [fp, -8] | r3 = var_8h;
0x0001a5d4 add r3, r3, 1 | r3++;
0x0001a5d8 str r3, [fp, -8] | var_8h = r3;
0x0001a5dc mov r3, 0 | r3 = 0;
0x0001a5e0 str r3, [fp, -0x14] | var_14h = r3;
0x0001a5e4 ldr r3, [fp, -0xc] | r3 = var_ch;
0x0001a5e8 sub r2, fp, 0x14 | r2 -= var_14h;
0x0001a5ec str r2, [r3, 0x28] | *((r3 + 0x28)) = r2;
0x0001a5f0 ldr r0, [fp, -0xc] | r0 = var_ch;
0x0001a5f4 bl 0x11648 | r0 = sym ();
0x0001a5f8 mov r3, r0 | r3 = r0;
0x0001a5fc str r3, [fp, -0x10] | var_10h = r3;
0x0001a600 ldr r3, [fp, -0x10] | r3 = var_10h;
0x0001a604 cmp r3, 1 |
| if (r3 != 1) {
0x0001a608 beq 0x1a624 |
0x0001a60c ldr r3, [pc, 0x68] |
0x0001a610 ldr r3, [r3] | r3 = $d;
0x0001a614 ldr r2, [fp, -0x10] | r2 = var_10h;
0x0001a618 ldr r1, [pc, 0x6c] | r1 = *(0x1a688);
0x0001a61c mov r0, r3 | r0 = r3;
0x0001a620 bl 0x11378 | fprintf (r0, r1, r2, r3)
| }
0x0001a624 ldr r3, [fp, -0x14] | r3 = var_14h;
0x0001a628 cmp r3, 1 |
| if (r3 == 1) {
0x0001a62c bne 0x1a648 |
0x0001a630 ldr r3, [pc, 0x44] |
0x0001a634 ldr r3, [r3] | r3 = $d;
0x0001a638 mov r2, 0x6f | r2 = 0x6f;
0x0001a63c mov r1, 1 | r1 = 1;
0x0001a640 ldr r0, [pc, 0x48] | r0 = "HttpExtensionProc_error:_d";
0x0001a644 bl 0x111d4 | fwrite ("HttpExtensionProc_error:_d", r1, r2, r3);
| }
0x0001a648 ldr r3, [fp, -0x14] | r3 = var_14h;
0x0001a64c cmp r3, 0 |
| if (r3 != 0) {
0x0001a650 bne 0x1a5ac | goto label_0;
| }
0x0001a654 ldr r3, [fp, -0xc] | r3 = var_ch;
0x0001a658 mov r2, 0 | r2 = 0;
0x0001a65c str r2, [r3, 0x28] | *((r3 + 0x28)) = r2;
0x0001a660 b 0x1a5ac | goto label_0;
| label_3:
0x0001a664 mov r0, r0 |
0x0001a668 b 0x1a59c | goto label_1;
| label_2:
0x0001a66c mov r0, r3 | r0 = r3;
0x0001a670 sub sp, fp, 4 |
0x0001a674 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/root/AJAJSaveFile.dll @ 0x136f4 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) method.CFile.Open_char_const__unsigned_int__int_ () | void method_CFile_Open_char_const_unsigned_int_int_ (int32_t arg1, char * arg2) {
| int32_t var_12ch;
| int32_t var_128h;
| char * src;
| int32_t var_120h;
| int32_t var_118h;
| char * dest;
| int32_t var_14h;
| int32_t var_10h;
| int32_t var_ch;
| int32_t var_8h;
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_sp_8h;
| int32_t var_4h_3;
| int32_t var_4h_2;
| r0 = arg1;
| r1 = arg2;
| /* CFile::Open(char const*, unsigned int, int*) */
0x000136f4 push {fp, lr} |
0x000136f8 add fp, sp, 4 |
0x000136fc sub sp, sp, 0x138 |
0x00013700 str r0, [fp, -0x120] | var_120h = r0;
0x00013704 str r1, [fp, -0x124] | src = r1;
0x00013708 str r2, [fp, -0x128] | var_128h = r2;
0x0001370c str r3, [fp, -0x12c] | var_12ch = r3;
0x00013710 ldr r3, [fp, -0x128] | r3 = var_128h;
0x00013714 and r3, r3, 0x4000 | r3 &= 0x4000;
0x00013718 cmp r3, 0 |
| if (r3 != 0) {
0x0001371c beq 0x13734 |
0x00013720 ldr r3, [pc, 0x218] | r3 = *(0x1393c);
0x00013724 mov r2, 0xf0 | r2 = 0xf0;
0x00013728 ldr r1, [pc, 0x214] | r1 = "int_CFile::Open_const_char__unsigned_int__int_";
0x0001372c ldr r0, [pc, 0x214] | r0 = "_home_flecuyer_workspace_BSP_mirrors_ajajsavefile_CFile.cpp";
0x00013730 bl 0x112d0 | assert ();
| }
0x00013734 ldr r3, [fp, -0x128] | r3 = var_128h;
0x00013738 bic r3, r3, 0x8000 | r3 = BIT_MASK (r3, 0x8000);
0x0001373c str r3, [fp, -0x128] | var_128h = r3;
0x00013740 ldr r3, [fp, -0x120] | r3 = var_120h;
0x00013744 mov r2, 0 | r2 = 0;
0x00013748 strb r2, [r3, 4] | *((r3 + 4)) = r2;
0x0001374c ldr r3, [fp, -0x120] | r3 = var_120h;
0x00013750 mvn r2, 0 | r2 = ~0;
0x00013754 str r2, [r3] | *(r3) = r2;
0x00013758 ldr r3, [fp, -0x120] | r3 = var_120h;
0x0001375c add r3, r3, 8 | r3 += 8;
0x00013760 mov r0, r3 | r0 = r3;
0x00013764 bl 0x144e0 | method (r0);
0x00013768 sub r3, fp, 0x114 | r3 -= dest;
0x0001376c ldr r1, [fp, -0x124] | r1 = src;
0x00013770 mov r0, r3 | r0 = r3;
0x00013774 bl 0x11480 | strcpy (r0, r1);
0x00013778 ldr r3, [fp, -0x120] | r3 = var_120h;
0x0001377c add r3, r3, 8 | r3 += 8;
0x00013780 sub r2, fp, 0x114 | r2 -= dest;
0x00013784 mov r1, r2 | r1 = r2;
0x00013788 mov r0, r3 | r0 = r3;
0x0001378c bl 0x14714 | method (r0, r1);
0x00013790 mov r3, 0 | r3 = 0;
0x00013794 str r3, [fp, -8] | var_8h = r3;
0x00013798 ldr r3, [fp, -0x128] | r3 = var_128h;
0x0001379c and r3, r3, 3 | r3 &= 3;
0x000137a0 cmp r3, 1 |
| if (r3 != 1) {
0x000137a4 beq 0x137c8 |
0x000137a8 cmp r3, 1 |
| if (r3 > 1) {
0x000137ac blo 0x137bc |
0x000137b0 cmp r3, 2 |
| if (r3 != 2) {
0x000137b4 beq 0x137d4 |
0x000137b8 b 0x137e0 |
| } else {
0x000137bc mov r3, 0x80000000 | r3 = 0x80000000;
0x000137c0 str r3, [fp, -8] | var_8h = r3;
0x000137c4 b 0x137fc |
| } else {
0x000137c8 mov r3, 0x40000000 | r3 = 0x40000000;
0x000137cc str r3, [fp, -8] | var_8h = r3;
0x000137d0 b 0x137fc | goto label_0;
| }
0x000137d4 mov r3, 0xc0000000 | r3 = 0xc0000000;
0x000137d8 str r3, [fp, -8] | var_8h = r3;
0x000137dc b 0x137fc | goto label_0;
| }
0x000137e0 ldr r3, [pc, 0x164] |
0x000137e4 ldr r3, [r3] | r3 = "_nOpenFlags__typeText___0";
0x000137e8 ldr r2, [pc, 0x160] | r2 = stderr;
0x000137ec ldr r1, [pc, 0x160] | r1 = "Open";
0x000137f0 mov r0, r3 | r0 = r3;
0x000137f4 bl 0x11378 | r0 = fprintf (r0, "Open", r2, "_nOpenFlags__typeText___0")
0x000137f8 mov r0, r0 |
| }
| label_0:
0x000137fc mov r3, 0 | r3 = 0;
0x00013800 str r3, [fp, -0xc] | var_ch = r3;
0x00013804 ldr r3, [fp, -0x128] | r3 = var_128h;
0x00013808 and r3, r3, 0x70 | r3 &= 0x70;
0x0001380c cmp r3, 0x20 |
| if (r3 != 0x20) {
0x00013810 beq 0x13868 |
0x00013814 cmp r3, 0x20 |
| if (r3 <= 0x20) {
0x00013818 bhi 0x13830 |
0x0001381c cmp r3, 0 |
| if (r3 == 0) {
0x00013820 beq 0x1385c | goto label_1;
| }
0x00013824 cmp r3, 0x10 |
| if (r3 == 0x10) {
0x00013828 beq 0x1385c | goto label_1;
| }
0x0001382c b 0x13840 |
| } else {
0x00013830 cmp r3, 0x30 |
| if (r3 == 0x30) {
0x00013834 beq 0x13874 | goto label_2;
| }
0x00013838 cmp r3, 0x40 |
| if (r3 == 0x40) {
0x0001383c beq 0x13880 | goto label_3;
| }
| }
0x00013840 ldr r3, [pc, 0x104] |
0x00013844 ldr r3, [r3] | r3 = "_nOpenFlags__typeText___0";
0x00013848 ldr r2, [pc, 0x100] | r2 = stderr;
0x0001384c ldr r1, [pc, 0x104] | r1 = "_s_invalid_read_write_mode";
0x00013850 mov r0, r3 | r0 = r3;
0x00013854 bl 0x11378 | fprintf (r0, "_s_invalid_read_write_mode", r2, "_nOpenFlags__typeText___0")
0x00013858 b 0x1388c | goto label_4;
| label_1:
0x0001385c mov r3, 0 | r3 = 0;
0x00013860 str r3, [fp, -0xc] | var_ch = r3;
0x00013864 b 0x1388c |
| } else {
0x00013868 mov r3, 1 | r3 = 1;
0x0001386c str r3, [fp, -0xc] | var_ch = r3;
0x00013870 b 0x1388c | goto label_4;
| label_2:
0x00013874 mov r3, 2 | r3 = 2;
0x00013878 str r3, [fp, -0xc] | var_ch = r3;
0x0001387c b 0x1388c | goto label_4;
| label_3:
0x00013880 mov r3, 3 | r3 = 3;
0x00013884 str r3, [fp, -0xc] | var_ch = r3;
0x00013888 mov r0, r0 |
| }
| label_4:
0x0001388c ldr r3, [fp, -0x128] | r3 = var_128h;
0x00013890 and r3, r3, 0x1000 | r3 &= 0x1000;
0x00013894 cmp r3, 0 |
| if (r3 != 0) {
0x00013898 beq 0x138c4 |
0x0001389c ldr r3, [fp, -0x128] | r3 = var_128h;
0x000138a0 and r3, r3, 0x2000 | r3 &= 0x2000;
0x000138a4 cmp r3, 0 |
| if (r3 != 0) {
0x000138a8 beq 0x138b8 |
0x000138ac mov r3, 4 | r3 = 4;
0x000138b0 str r3, [fp, -0x10] | var_10h = r3;
0x000138b4 b 0x138cc |
| } else {
0x000138b8 mov r3, 2 | r3 = 2;
| }
0x000138bc str r3, [fp, -0x10] | var_10h = r3;
0x000138c0 b 0x138cc |
| } else {
0x000138c4 mov r3, 3 | r3 = 3;
0x000138c8 str r3, [fp, -0x10] | var_10h = r3;
| }
0x000138cc sub r2, fp, 0x118 | r2 -= var_118h;
0x000138d0 mov r3, 0 | r3 = 0;
0x000138d4 str r3, [sp, 8] | var_sp_8h = r3;
0x000138d8 mov r3, 0x80 | r3 = 0x80;
0x000138dc str r3, [sp, 4] | var_4h = r3;
0x000138e0 ldr r3, [fp, -0x10] | r3 = var_10h;
0x000138e4 str r3, [sp] | *(sp) = r3;
0x000138e8 mov r3, r2 | r3 = r2;
0x000138ec ldr r2, [fp, -0xc] | r2 = var_ch;
0x000138f0 ldr r1, [fp, -8] | r1 = var_8h;
0x000138f4 ldr r0, [fp, -0x124] | r0 = src;
0x000138f8 bl 0x12f14 | r0 = sym ();
0x000138fc mov r3, r0 | r3 = r0;
0x00013900 str r3, [fp, -0x14] | var_14h = r3;
0x00013904 ldr r3, [fp, -0x14] | r3 = var_14h;
0x00013908 cmn r3, 1 |
| if (r3 == 1) {
0x0001390c bne 0x13918 |
0x00013910 mov r3, 0 | r3 = 0;
0x00013914 b 0x13934 |
| } else {
0x00013918 ldr r2, [fp, -0x14] | r2 = var_14h;
0x0001391c ldr r3, [fp, -0x120] | r3 = var_120h;
0x00013920 str r2, [r3] | *(r3) = r2;
0x00013924 ldr r3, [fp, -0x120] | r3 = var_120h;
0x00013928 mov r2, 1 | r2 = 1;
0x0001392c strb r2, [r3, 4] | *((r3 + 4)) = r2;
0x00013930 mov r3, 1 | r3 = 1;
| }
0x00013934 mov r0, r3 | r0 = r3;
0x00013938 sub sp, fp, 4 |
0x0001393c pop {fp, pc} |
| }
Error: no data available.
Please analyze the function/binary first.
Error: no data available.
Please analyze the function/binary first.
; 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/root/AJAJSaveFile.dll @ 0x1afa4 */
| #include <stdint.h>
|
; (fcn) sym.scgi_answer_the_phone () | void scgi_answer_the_phone (int32_t arg1) {
| int32_t var_a8h;
| int32_t var_a4h;
| int32_t var_9ch;
| int32_t var_98h;
| int32_t var_94h;
| int32_t var_90h;
| int32_t fildes;
| int32_t var_sp_94h;
| int32_t var_sp_10h;
| int32_t var_8h_2;
| int32_t var_8h;
| r0 = arg1;
0x0001afa4 push {r4, fp, lr} |
0x0001afa8 add fp, sp, 8 |
0x0001afac sub sp, sp, 0xa4 |
0x0001afb0 str r0, [fp, -0xa8] | var_a8h = r0;
0x0001afb4 mov r3, 0x80 | r3 = 0x80;
0x0001afb8 str r3, [fp, -0x94] | var_94h = r3;
0x0001afbc sub r3, fp, 0xa4 | r3 = fp - 0xa4;
0x0001afc0 mov r1, 0 | r1 = 0;
0x0001afc4 mov r0, r3 | r0 = r3;
0x0001afc8 bl 0x1121c | gettimeofday ();
0x0001afcc ldr r3, [fp, -0xa8] | r3 = var_a8h;
0x0001afd0 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x0001afd4 sub r2, fp, 0x94 | r2 -= var_sp_94h;
0x0001afd8 sub r1, fp, 0x90 | r1 -= var_9ch;
0x0001afdc mov r0, r3 | r0 = r3;
0x0001afe0 bl 0x11414 | r0 = accept (r0, r1, r2);
0x0001afe4 mov r3, r0 | r3 = r0;
0x0001afe8 str r3, [fp, -0x10] | fildes = r3;
0x0001afec ldr r3, [fp, -0x10] | r3 = fildes;
0x0001aff0 lsr r3, r3, 0x1f | r3 >>= 0x1f;
0x0001aff4 and r3, r3, 0xff | r3 &= 0xff;
0x0001aff8 cmp r3, 0 |
| if (r3 != 0) {
0x0001affc beq 0x1b00c |
0x0001b000 ldr r0, [pc, 0x4c8] | r0 = *(0x1b4cc);
0x0001b004 bl 0x1b8ec | scgi_perror ();
0x0001b008 b 0x1b4c8 |
| } else {
0x0001b00c ldr r3, [pc, 0x4c0] |
0x0001b010 ldr r3, [r3] | r3 = "Warning:_scgilibs_phone_rang_but_something_prevented_scgilib_from_answering_it.";
0x0001b014 cmp r3, 0 |
| if (r3 > 0) {
0x0001b018 ble 0x1b034 |
0x0001b01c ldr r3, [pc, 0x4b4] |
0x0001b020 ldr r3, [r3] | r3 = *(0x1b4d4);
0x0001b024 ldr r2, [fp, -0x10] | r2 = fildes;
0x0001b028 ldr r1, [pc, 0x4ac] | r1 = stderr;
0x0001b02c mov r0, r3 | r0 = r3;
0x0001b030 bl 0x11378 | fprintf (r0, r1, r2, r3)
| }
0x0001b034 mov r2, 0x800 | r2 = 0x800;
0x0001b038 mov r1, 4 | r1 = 4;
0x0001b03c ldr r0, [fp, -0x10] | r0 = fildes;
0x0001b040 bl 0x11288 | r0 = fcntl ();
0x0001b044 mov r3, r0 | r3 = r0;
0x0001b048 cmn r3, 1 |
| if (r3 != 1) {
0x0001b04c moveq r3, 1 | r3 = 1;
| }
| if (r3 == 1) {
0x0001b050 movne r3, 0 | r3 = 0;
| }
0x0001b054 and r3, r3, 0xff | r3 &= 0xff;
0x0001b058 cmp r3, 0 |
| if (r3 != 0) {
0x0001b05c beq 0x1b074 |
0x0001b060 ldr r0, [pc, 0x478] | r0 = "scgi_answer_the_phone:_accept_on_port__d";
0x0001b064 bl 0x1b8ec | scgi_perror ();
0x0001b068 ldr r0, [fp, -0x10] | r0 = fildes;
0x0001b06c bl 0x11324 | close (r0);
0x0001b070 b 0x1b4c8 |
| } else {
0x0001b074 mov r1, 0x50 | r1 = 0x50;
0x0001b078 mov r0, 1 | r0 = 1;
0x0001b07c bl 0x111b0 | r0 = calloc (r0, r1);
0x0001b080 mov r3, r0 | r3 = r0;
0x0001b084 str r3, [fp, -0x98] | var_a4h = r3;
0x0001b088 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b08c cmp r3, 0 |
| if (r3 != 0) {
0x0001b090 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 0) {
0x0001b094 movne r3, 0 | r3 = 0;
| }
0x0001b098 and r3, r3, 0xff | r3 &= 0xff;
0x0001b09c cmp r3, 0 |
| if (r3 != 0) {
0x0001b0a0 beq 0x1b0b0 |
0x0001b0a4 ldr r0, [pc, 0x438] | r0 = "Warning:_scgilib_was_unable_to_set_a_socket_to_non_blocking_mode.__scgilib_hung_up_the_phone_on_this_socket.";
0x0001b0a8 bl 0x1b8ec | scgi_perror ();
0x0001b0ac bl 0x11390 | abort ();
| }
0x0001b0b0 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b0b4 mov r2, 0 | r2 = 0;
0x0001b0b8 str r2, [r3] | *(r3) = r2;
0x0001b0bc ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b0c0 mov r2, 0 | r2 = 0;
0x0001b0c4 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x0001b0c8 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b0cc ldr r2, [fp, -0xa8] | r2 = var_a8h;
0x0001b0d0 str r2, [r3, 8] | *((r3 + 8)) = r2;
0x0001b0d4 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b0d8 ldr r2, [fp, -0x10] | r2 = fildes;
0x0001b0dc str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x0001b0e0 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b0e4 ldr r2, [fp, -0xa4] | r2 = var_a4h;
0x0001b0e8 str r2, [r3, 0x2c] | *((r3 + 0x2c)) = r2;
0x0001b0ec ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b0f0 mov r2, 0 | r2 = 0;
0x0001b0f4 str r2, [r3, 0x30] | *((r3 + 0x30)) = r2;
0x0001b0f8 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b0fc mov r2, 0 | r2 = 0;
0x0001b100 str r2, [r3, 0x34] | *((r3 + 0x34)) = r2;
0x0001b104 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b108 mov r2, 0 | r2 = 0;
0x0001b10c str r2, [r3, 0x3c] | *((r3 + 0x3c)) = r2;
0x0001b110 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b114 mov r2, 0 | r2 = 0;
0x0001b118 str r2, [r3, 0x40] | *((r3 + 0x40)) = r2;
0x0001b11c ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b120 mov r2, 0 | r2 = 0;
0x0001b124 str r2, [r3, 0x4c] | *((r3 + 0x4c)) = r2;
0x0001b128 ldr r3, [pc, 0x3b8] |
0x0001b12c ldr r3, [r3] | r3 = "scgilib:_Out_of_RAM__Emergency_shutdown.";
0x0001b130 cmp r3, 0 |
| if (r3 != 0) {
0x0001b134 beq 0x1b158 |
0x0001b138 ldr r3, [pc, 0x3a8] |
0x0001b13c ldr r3, [r3] | r3 = "scgilib:_Out_of_RAM__Emergency_shutdown.";
0x0001b140 ldr r4, [fp, -0x98] | r4 = var_a4h;
0x0001b144 mov r1, 1 | r1 = 1;
0x0001b148 ldr r0, [fp, -0x10] | r0 = fildes;
0x0001b14c blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, char*) (r0, r1, "scgilib:_Out_of_RAM__Emergency_shutdown.");
0x0001b150 mov r3, r0 | r3 = r0;
0x0001b154 str r3, [r4, 0x38] | *((r4 + 0x38)) = r3;
| }
0x0001b158 ldr r4, [fp, -0x98] | r4 = var_a4h;
0x0001b15c mov r1, 1 | r1 = 1;
0x0001b160 ldr r0, [pc, 0x384] | r0 = scgi_fd_newfd_cb;
0x0001b164 bl 0x111b0 | r0 = calloc (r0, r1);
0x0001b168 mov r3, r0 | r3 = r0;
0x0001b16c str r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
0x0001b170 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x0001b174 cmp r3, 0 |
| if (r3 != 0) {
0x0001b178 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 0) {
0x0001b17c movne r3, 0 | r3 = 0;
| }
0x0001b180 and r3, r3, 0xff | r3 &= 0xff;
0x0001b184 cmp r3, 0 |
| if (r3 != 0) {
0x0001b188 beq 0x1b198 |
0x0001b18c ldr r0, [pc, 0x350] | r0 = "Warning:_scgilib_was_unable_to_set_a_socket_to_non_blocking_mode.__scgilib_hung_up_the_phone_on_this_socket.";
0x0001b190 bl 0x1b8ec | scgi_perror ();
0x0001b194 bl 0x11390 | abort ();
| }
0x0001b198 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b19c mov r2, 0x20000 | r2 = 0x20000;
0x0001b1a0 str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x0001b1a4 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b1a8 mov r2, 0 | r2 = 0;
0x0001b1ac str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x0001b1b0 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b1b4 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x0001b1b8 mov r2, 0 | r2 = 0;
0x0001b1bc strb r2, [r3] | *(r3) = r2;
0x0001b1c0 ldr r4, [fp, -0x98] | r4 = var_a4h;
0x0001b1c4 mov r1, 1 | r1 = 1;
0x0001b1c8 ldr r0, [pc, 0x320] | r0 = *(0x1b4ec);
0x0001b1cc bl 0x111b0 | r0 = calloc (r0, r1);
0x0001b1d0 mov r3, r0 | r3 = r0;
0x0001b1d4 str r3, [r4, 0x20] | *((r4 + 0x20)) = r3;
0x0001b1d8 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0001b1dc cmp r3, 0 |
| if (r3 != 0) {
0x0001b1e0 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 0) {
0x0001b1e4 movne r3, 0 | r3 = 0;
| }
0x0001b1e8 and r3, r3, 0xff | r3 &= 0xff;
0x0001b1ec cmp r3, 0 |
| if (r3 != 0) {
0x0001b1f0 beq 0x1b200 |
0x0001b1f4 ldr r0, [pc, 0x2e8] | r0 = "Warning:_scgilib_was_unable_to_set_a_socket_to_non_blocking_mode.__scgilib_hung_up_the_phone_on_this_socket.";
0x0001b1f8 bl 0x1b8ec | scgi_perror ();
0x0001b1fc bl 0x11390 | abort ();
| }
0x0001b200 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b204 mov r2, 0x4000 | r2 = 0x4000;
0x0001b208 str r2, [r3, 0x24] | *((r3 + 0x24)) = r2;
0x0001b20c ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b210 mov r2, 0 | r2 = 0;
0x0001b214 str r2, [r3, 0x28] | *((r3 + 0x28)) = r2;
0x0001b218 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b21c ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x0001b220 mov r2, 0 | r2 = 0;
0x0001b224 strb r2, [r3] | *(r3) = r2;
0x0001b228 mov r1, 0x6c | r1 = 0x6c;
0x0001b22c mov r0, 1 | r0 = 1;
0x0001b230 bl 0x111b0 | r0 = calloc (r0, r1);
0x0001b234 mov r3, r0 | r3 = r0;
0x0001b238 str r3, [fp, -0x9c] | var_a8h = r3;
0x0001b23c ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b240 cmp r3, 0 |
| if (r3 != 0) {
0x0001b244 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 0) {
0x0001b248 movne r3, 0 | r3 = 0;
| }
0x0001b24c and r3, r3, 0xff | r3 &= 0xff;
0x0001b250 cmp r3, 0 |
| if (r3 != 0) {
0x0001b254 beq 0x1b264 |
0x0001b258 ldr r0, [pc, 0x284] | r0 = "Warning:_scgilib_was_unable_to_set_a_socket_to_non_blocking_mode.__scgilib_hung_up_the_phone_on_this_socket.";
0x0001b25c bl 0x1b8ec | scgi_perror ();
0x0001b260 bl 0x11390 | abort ();
| }
0x0001b264 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b268 mov r2, 0 | r2 = 0;
0x0001b26c str r2, [r3] | *(r3) = r2;
0x0001b270 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b274 mov r2, 0 | r2 = 0;
0x0001b278 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x0001b27c ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b280 mov r2, 0 | r2 = 0;
0x0001b284 str r2, [r3, 8] | *((r3 + 8)) = r2;
0x0001b288 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b28c mov r2, 0 | r2 = 0;
0x0001b290 str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
0x0001b294 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b298 ldr r2, [fp, -0x98] | r2 = var_a4h;
0x0001b29c str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x0001b2a0 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2a4 mov r2, 0 | r2 = 0;
0x0001b2a8 str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x0001b2ac ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2b0 mov r2, 0 | r2 = 0;
0x0001b2b4 str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x0001b2b8 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2bc mov r2, 0 | r2 = 0;
0x0001b2c0 str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x0001b2c4 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2c8 mvn r2, 0 | r2 = ~0;
0x0001b2cc str r2, [r3, 0x20] | *((r3 + 0x20)) = r2;
0x0001b2d0 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2d4 mov r2, 0 | r2 = 0;
0x0001b2d8 strb r2, [r3, 0x24] | *((r3 + 0x24)) = r2;
0x0001b2dc ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2e0 mov r2, 0 | r2 = 0;
0x0001b2e4 str r2, [r3, 0x28] | *((r3 + 0x28)) = r2;
0x0001b2e8 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2ec mov r2, 0 | r2 = 0;
0x0001b2f0 str r2, [r3, 0x2c] | *((r3 + 0x2c)) = r2;
0x0001b2f4 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b2f8 mov r2, 0 | r2 = 0;
0x0001b2fc str r2, [r3, 0x30] | *((r3 + 0x30)) = r2;
0x0001b300 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b304 mov r2, 0 | r2 = 0;
0x0001b308 str r2, [r3, 0x34] | *((r3 + 0x34)) = r2;
0x0001b30c ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b310 mov r2, 0 | r2 = 0;
0x0001b314 str r2, [r3, 0x38] | *((r3 + 0x38)) = r2;
0x0001b318 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b31c mov r2, 0 | r2 = 0;
0x0001b320 str r2, [r3, 0x3c] | *((r3 + 0x3c)) = r2;
0x0001b324 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b328 mov r2, 0 | r2 = 0;
0x0001b32c str r2, [r3, 0x40] | *((r3 + 0x40)) = r2;
0x0001b330 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b334 mov r2, 0 | r2 = 0;
0x0001b338 str r2, [r3, 0x44] | *((r3 + 0x44)) = r2;
0x0001b33c ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b340 mov r2, 0 | r2 = 0;
0x0001b344 str r2, [r3, 0x48] | *((r3 + 0x48)) = r2;
0x0001b348 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b34c mov r2, 0 | r2 = 0;
0x0001b350 str r2, [r3, 0x4c] | *((r3 + 0x4c)) = r2;
0x0001b354 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b358 mov r2, 0 | r2 = 0;
0x0001b35c str r2, [r3, 0x50] | *((r3 + 0x50)) = r2;
0x0001b360 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b364 mov r2, 0 | r2 = 0;
0x0001b368 str r2, [r3, 0x54] | *((r3 + 0x54)) = r2;
0x0001b36c ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b370 mov r2, 0 | r2 = 0;
0x0001b374 str r2, [r3, 0x58] | *((r3 + 0x58)) = r2;
0x0001b378 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b37c mov r2, 0 | r2 = 0;
0x0001b380 str r2, [r3, 0x5c] | *((r3 + 0x5c)) = r2;
0x0001b384 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b388 mov r2, 0 | r2 = 0;
0x0001b38c str r2, [r3, 0x60] | *((r3 + 0x60)) = r2;
0x0001b390 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b394 mov r2, 0 | r2 = 0;
0x0001b398 str r2, [r3, 0x64] | *((r3 + 0x64)) = r2;
0x0001b39c ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b3a0 mov r2, 0 | r2 = 0;
0x0001b3a4 str r2, [r3, 0x68] | *((r3 + 0x68)) = r2;
0x0001b3a8 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b3ac ldr r2, [fp, -0x9c] | r2 = var_a8h;
0x0001b3b0 str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
0x0001b3b4 ldr r3, [pc, 0x138] |
0x0001b3b8 ldr r3, [r3] | r3 = *(0x1b4f0);
0x0001b3bc cmp r3, 0 |
| if (r3 == 0) {
0x0001b3c0 bne 0x1b3e0 |
0x0001b3c4 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b3c8 ldr r2, [pc, 0x124] | r2 = *(0x1b4f0);
0x0001b3cc str r3, [r2] | *(r2) = r3;
0x0001b3d0 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b3d4 ldr r2, [pc, 0x11c] | r2 = *(0x1b4f4);
0x0001b3d8 str r3, [r2] | *(r2) = r3;
0x0001b3dc b 0x1b3f0 |
| } else {
0x0001b3e0 ldr r3, [pc, 0x110] |
0x0001b3e4 ldr r3, [r3] | r3 = *(0x1b4f4);
0x0001b3e8 ldr r2, [fp, -0x9c] | r2 = var_a8h;
0x0001b3ec str r2, [r3] | *(r3) = r2;
| }
0x0001b3f0 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b3f4 mov r2, 0 | r2 = 0;
0x0001b3f8 str r2, [r3] | *(r3) = r2;
0x0001b3fc ldr r3, [pc, 0xf0] | r3 = *(0x1b4f0);
0x0001b400 ldr r2, [r3] | r2 = *(0x1b4f0);
0x0001b404 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b408 cmp r2, r3 |
| if (r2 == r3) {
0x0001b40c bne 0x1b420 |
0x0001b410 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b414 mov r2, 0 | r2 = 0;
0x0001b418 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x0001b41c b 0x1b430 |
| } else {
0x0001b420 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b424 ldr r2, [pc, 0xcc] |
0x0001b428 ldr r2, [r2] | r2 = *(0x1b4f4);
0x0001b42c str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
0x0001b430 ldr r3, [fp, -0x9c] | r3 = var_a8h;
0x0001b434 ldr r2, [pc, 0xbc] | r2 = *(0x1b4f4);
0x0001b438 str r3, [r2] | *(r2) = r3;
0x0001b43c ldr r3, [fp, -0xa8] | r3 = var_a8h;
0x0001b440 ldr r3, [r3, 8] | r3 = *((r3 + 8));
0x0001b444 cmp r3, 0 |
| if (r3 == 0) {
0x0001b448 bne 0x1b468 |
0x0001b44c ldr r2, [fp, -0x98] | r2 = var_a4h;
0x0001b450 ldr r3, [fp, -0xa8] | r3 = var_a8h;
0x0001b454 str r2, [r3, 8] | *((r3 + 8)) = r2;
0x0001b458 ldr r2, [fp, -0x98] | r2 = var_a4h;
0x0001b45c ldr r3, [fp, -0xa8] | r3 = var_a8h;
0x0001b460 str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
0x0001b464 b 0x1b478 |
| } else {
0x0001b468 ldr r3, [fp, -0xa8] | r3 = var_a8h;
0x0001b46c ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x0001b470 ldr r2, [fp, -0x98] | r2 = var_a4h;
0x0001b474 str r2, [r3] | *(r3) = r2;
| }
0x0001b478 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b47c mov r2, 0 | r2 = 0;
0x0001b480 str r2, [r3] | *(r3) = r2;
0x0001b484 ldr r3, [fp, -0xa8] | r3 = var_a8h;
0x0001b488 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x0001b48c ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b490 cmp r2, r3 |
| if (r2 == r3) {
0x0001b494 bne 0x1b4a8 |
0x0001b498 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b49c mov r2, 0 | r2 = 0;
0x0001b4a0 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x0001b4a4 b 0x1b4b8 |
| } else {
0x0001b4a8 ldr r3, [fp, -0x98] | r3 = var_a4h;
0x0001b4ac ldr r2, [fp, -0xa8] | r2 = var_a8h;
0x0001b4b0 ldr r2, [r2, 0xc] | r2 = *((r2 + 0xc));
0x0001b4b4 str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
0x0001b4b8 ldr r2, [fp, -0x98] | r2 = var_a4h;
0x0001b4bc ldr r3, [fp, -0xa8] | r3 = var_a8h;
0x0001b4c0 str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
0x0001b4c4 mov r0, r0 |
| }
| }
0x0001b4c8 sub sp, fp, 8 |
0x0001b4cc pop {r4, 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/root/AJAJSaveFile.dll @ 0x1b5e8 */
| #include <stdint.h>
|
; (fcn) sym.scgi_listen_to_request () | void scgi_listen_to_request (int32_t arg1) {
| int32_t var_30h;
| int32_t var_28h;
| int32_t var_24h;
| int32_t var_20h;
| int32_t var_1ch;
| int32_t var_15h;
| int32_t var_14h;
| void * buffer;
| int32_t var_sp_28h;
| int32_t var_sp_20h;
| int8_t var_sp_15h;
| int32_t var_8h;
| r0 = arg1;
0x0001b5e8 push {r4, fp, lr} |
0x0001b5ec add fp, sp, 8 |
0x0001b5f0 sub sp, sp, 0x2c |
0x0001b5f4 str r0, [fp, -0x30] | var_30h = r0;
0x0001b5f8 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b5fc ldr r3, [r3, 0x1c] | r3 = *((r3 + 0x1c));
0x0001b600 str r3, [fp, -0x10] | buffer = r3;
0x0001b604 mov r3, 0 | r3 = 0;
0x0001b608 strb r3, [fp, -0x15] | var_15h = r3;
0x0001b60c ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b610 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x0001b614 str r3, [fp, -0x28] | var_28h = r3;
0x0001b618 mov r3, 1 | r3 = 1;
0x0001b61c strh r3, [fp, -0x24] | var_30h = r3;
| do {
0x0001b620 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b624 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x0001b628 sub r2, r3, 5 | r2 = r3 - 5;
0x0001b62c ldr r3, [fp, -0x10] | r3 = buffer;
0x0001b630 sub r3, r2, r3 | r3 = r2 - r3;
0x0001b634 cmp r3, 0x20000 |
| if (r3 > 0x20000) {
0x0001b638 ble 0x1b648 |
0x0001b63c mov r3, 0x20000 | r3 = 0x20000;
0x0001b640 str r3, [fp, -0x1c] | var_28h = r3;
0x0001b644 b 0x1b660 |
| } else {
0x0001b648 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b64c ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x0001b650 sub r2, r3, 5 | r2 = r3 - 5;
0x0001b654 ldr r3, [fp, -0x10] | r3 = buffer;
0x0001b658 sub r3, r2, r3 | r3 = r2 - r3;
0x0001b65c str r3, [fp, -0x1c] | var_28h = r3;
| }
0x0001b660 sub r3, fp, 0x28 | r3 -= var_sp_28h;
0x0001b664 mov r2, 0x3e8 | r2 = 0x3e8;
0x0001b668 mov r1, 1 | r1 = 1;
0x0001b66c mov r0, r3 | r0 = r3;
0x0001b670 bl 0x11174 | r0 = poll ();
0x0001b674 mov r3, r0 | r3 = r0;
0x0001b678 str r3, [fp, -0x20] | var_20h = r3;
0x0001b67c ldr r3, [fp, -0x20] | r3 = var_20h;
0x0001b680 cmn r3, 1 |
| if (r3 != 1) {
0x0001b684 beq 0x1b694 |
0x0001b688 cmp r3, 0 |
| if (r3 != 0) {
0x0001b68c beq 0x1b6c4 |
0x0001b690 b 0x1b6d0 |
| } else {
0x0001b694 ldr r3, [pc, 0x18c] | r3 = *(0x1b824);
0x0001b698 ldr r4, [r3] | r4 = *(0x1b824);
0x0001b69c bl 0x111bc | r0 = errno_location ();
0x0001b6a0 mov r3, r0 | r3 = r0;
0x0001b6a4 ldr r3, [r3] | r3 = *(r3);
0x0001b6a8 mov r2, r3 | r2 = r3;
0x0001b6ac ldr r1, [pc, 0x178] | r1 = stderr;
0x0001b6b0 mov r0, r4 | r0 = r4;
0x0001b6b4 bl 0x11378 | fprintf (r0, r1, r2, r3)
0x0001b6b8 mvn r3, 0 | r3 = ~0;
0x0001b6bc str r3, [fp, -0x14] | var_20h = r3;
0x0001b6c0 b 0x1b700 | goto label_0;
| }
0x0001b6c4 mov r3, 0 | r3 = 0;
0x0001b6c8 str r3, [fp, -0x14] | var_20h = r3;
0x0001b6cc b 0x1b700 | goto label_0;
| }
0x0001b6d0 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b6d4 ldr r0, [r3, 0x10] | r0 = *((r3 + 0x10));
0x0001b6d8 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b6dc ldr r2, [r3, 0x14] | r2 = *((r3 + 0x14));
0x0001b6e0 ldr r3, [fp, -0x10] | r3 = buffer;
0x0001b6e4 add r1, r2, r3 | r1 = r2 + r3;
0x0001b6e8 ldr r2, [fp, -0x1c] | r2 = var_28h;
0x0001b6ec mov r3, 0 | r3 = 0;
0x0001b6f0 bl 0x11264 | r0 = recv (r0, r1);
0x0001b6f4 mov r3, r0 | r3 = r0;
0x0001b6f8 str r3, [fp, -0x14] | var_20h = r3;
0x0001b6fc mov r0, r0 |
| label_0:
0x0001b700 ldr r3, [fp, -0x14] | r3 = var_20h;
0x0001b704 cmp r3, 0 |
| if (r3 > 0) {
0x0001b708 ble 0x1b78c |
0x0001b70c mov r3, 1 | r3 = 1;
0x0001b710 strb r3, [fp, -0x15] | var_15h = r3;
0x0001b714 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b718 ldr r2, [r3, 0x1c] | r2 = *((r3 + 0x1c));
0x0001b71c ldr r3, [fp, -0x14] | r3 = var_20h;
0x0001b720 add r2, r2, r3 | r2 += r3;
0x0001b724 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b728 str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x0001b72c ldr r2, [fp, -0x10] | r2 = buffer;
0x0001b730 ldr r3, [fp, -0x14] | r3 = var_20h;
0x0001b734 add r3, r2, r3 | r3 = r2 + r3;
0x0001b738 str r3, [fp, -0x10] | buffer = r3;
0x0001b73c ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b740 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x0001b744 sub r3, r3, 5 | r3 -= 5;
0x0001b748 ldr r2, [fp, -0x10] | r2 = buffer;
0x0001b74c cmp r2, r3 |
| if (r2 < r3) {
0x0001b750 blt 0x1b7bc | goto label_1;
| }
0x0001b754 ldr r3, [fp, -0x30] | r3 = var_30h;
0x0001b758 add r3, r3, 0x14 | r3 += 0x14;
0x0001b75c mov r1, r3 | r1 = r3;
0x0001b760 ldr r0, [fp, -0x30] | r0 = var_30h;
0x0001b764 bl 0x1b4fc | r0 = sym ();
0x0001b768 mov r3, r0 | r3 = r0;
0x0001b76c cmp r3, 0 |
| if (r3 != 0) {
0x0001b770 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 0) {
0x0001b774 movne r3, 0 | r3 = 0;
| }
0x0001b778 and r3, r3, 0xff | r3 &= 0xff;
0x0001b77c cmp r3, 0 |
| if (r3 == 0) {
0x0001b780 beq 0x1b7bc | goto label_1;
| }
0x0001b784 mov r3, 0 | r3 = 0;
0x0001b788 b 0x1b81c | goto label_2;
| }
0x0001b78c ldr r3, [fp, -0x14] | r3 = var_20h;
0x0001b790 cmp r3, 0 |
| if (r3 < 0) {
0x0001b794 bge 0x1b7bc |
0x0001b798 ldr r3, [pc, 0x88] | r3 = *(0x1b824);
0x0001b79c ldr r4, [r3] | r4 = *(0x1b824);
0x0001b7a0 bl 0x111bc | r0 = errno_location ();
0x0001b7a4 mov r3, r0 | r3 = r0;
0x0001b7a8 ldr r2, [r3] | r2 = *(r3);
0x0001b7ac ldr r3, [fp, -0x14] | r3 = var_20h;
0x0001b7b0 ldr r1, [pc, 0x78] | r1 = "poll__1_error:_d_";
0x0001b7b4 mov r0, r4 | r0 = r4;
0x0001b7b8 bl 0x11378 | fprintf (r0, "poll__1_error:_d_", r2, r3)
| }
| label_1:
0x0001b7bc ldr r3, [fp, -0x14] | r3 = var_20h;
0x0001b7c0 cmp r3, 0 |
| if (r3 <= 0) {
0x0001b7c4 ble 0x1b7cc | goto label_3;
| }
0x0001b7c8 b 0x1b620 |
| } while (1);
| label_3:
0x0001b7cc ldrb r3, [fp, -0x15] | r3 = var_15h;
0x0001b7d0 cmp r3, 0 |
| if (r3 != 0) {
0x0001b7d4 beq 0x1b7e8 |
0x0001b7d8 ldr r0, [fp, -0x30] | r0 = var_30h;
0x0001b7dc bl 0x1b928 | sym ();
0x0001b7e0 mov r3, 1 | r3 = 1;
0x0001b7e4 b 0x1b81c |
| } else {
0x0001b7e8 ldr r3, [fp, -0x14] | r3 = var_20h;
0x0001b7ec cmp r3, 0 |
| if (r3 != 0) {
0x0001b7f0 beq 0x1b808 |
0x0001b7f4 bl 0x111bc | r0 = errno_location ();
0x0001b7f8 mov r3, r0 | r3 = r0;
0x0001b7fc ldr r3, [r3] | r3 = *(r3);
0x0001b800 cmp r3, 0xb |
| if (r3 == 0xb) {
0x0001b804 beq 0x1b818 | goto label_4;
| }
| }
0x0001b808 ldr r0, [fp, -0x30] | r0 = var_30h;
0x0001b80c bl 0x1abc0 | scgi_kill_socket ();
0x0001b810 mov r3, 0 | r3 = 0;
0x0001b814 b 0x1b81c | goto label_2;
| label_4:
0x0001b818 mov r3, 0 | r3 = 0;
| }
| label_2:
0x0001b81c mov r0, r3 | r0 = r3;
0x0001b820 sub sp, fp, 8 |
0x0001b824 pop {r4, 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/root/AJAJSaveFile.dll @ 0x1b8ec */
| #include <stdint.h>
|
; (fcn) sym.scgi_perror () | void scgi_perror (int32_t arg1) {
| int32_t var_8h;
| int32_t var_4h_2;
| int32_t var_4h;
| r0 = arg1;
0x0001b8ec push {fp, lr} |
0x0001b8f0 add fp, sp, 4 |
0x0001b8f4 sub sp, sp, 8 |
0x0001b8f8 str r0, [fp, -8] | var_8h = r0;
0x0001b8fc ldr r3, [pc, 0x1c] |
0x0001b900 ldr r3, [r3] | r3 = *(0x1b91c);
0x0001b904 ldr r2, [fp, -8] | r2 = var_8h;
0x0001b908 ldr r1, [pc, 0x14] | r1 = stderr;
0x0001b90c mov r0, r3 | r0 = r3;
0x0001b910 bl 0x11378 | r0 = fprintf (r0, r1, r2, r3)
0x0001b914 mov r0, r0 |
0x0001b918 sub sp, fp, 4 |
0x0001b91c pop {fp, pc} |
| }
[*] Function fprintf used 10 times AJAJSaveFile.dll