[*] Binary protection state of AJAJPost.dll
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH Symbols
[*] Function sprintf tear down of AJAJPost.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/AJAJPost.dll @ 0x112ac */
| #include <stdint.h>
|
; (fcn) sym.ExchangeData_SCGI_REQUEST__unsigned_char__unsigned_int_ () | void ExchangeData_SCGI_REQUEST_unsigned_char_unsigned_int_ (int32_t arg1, int32_t arg2) {
| void * buffer;
| int32_t var_b4h;
| int32_t var_b0h;
| int32_t var_ach;
| void * s1;
| void * var_28h;
| char * ptr;
| int32_t var_20h;
| int32_t var_1ch;
| int32_t var_18h;
| int32_t var_12h;
| int32_t var_11h;
| size_t nmeb;
| int32_t var_ch;
| int32_t var_0h;
| int32_t var_sp_b4h;
| int32_t var_sp_b0h;
| int32_t c;
| int32_t var_sp_2ch;
| int32_t var_sp_28h;
| int32_t var_sp_24h;
| int8_t var_sp_12h;
| int8_t var_sp_11h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
| /* ExchangeData(SCGI_REQUEST*, unsigned char*, unsigned int) */
0x000112ac push {r4, fp, lr} |
0x000112b0 add fp, sp, 8 |
0x000112b4 sub sp, sp, 0x8000 |
0x000112b8 sub sp, sp, 0xcc |
0x000112bc sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000112c0 sub r3, r3, 0xc | r3 -= 0xc;
0x000112c4 str r0, [r3, -0xb4] | *((r3 - 0xb4)) = r0;
0x000112c8 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000112cc sub r3, r3, 0xc | r3 -= 0xc;
0x000112d0 str r1, [r3, -0xb8] | *((r3 - 0xb8)) = r1;
0x000112d4 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000112d8 sub r3, r3, 0xc | r3 -= 0xc;
0x000112dc str r2, [r3, -0xbc] | *((r3 - 0xbc)) = r2;
0x000112e0 mov r3, 0 | r3 = 0;
0x000112e4 str r3, [fp, -0x2c] | s1 = r3;
0x000112e8 mov r3, 0 | r3 = 0;
0x000112ec strb r3, [fp, -0x11] | var_11h = r3;
0x000112f0 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000112f4 sub r3, r3, 0xc | r3 -= 0xc;
0x000112f8 sub r3, r3, 0xac | r3 -= 0xac;
0x000112fc mov r0, r3 | r0 = r3;
0x00011300 bl 0x10fcc | r0 = sym ();
0x00011304 mov r3, r0 | r3 = r0;
0x00011308 cmp r3, 0 |
| if (r3 == 0) {
0x0001130c beq 0x11680 | goto label_0;
| }
0x00011310 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011314 sub r3, r3, 0xc | r3 -= 0xc;
0x00011318 ldr r3, [r3, -0xac] | r3 = *((r3 - 0xac));
0x0001131c mov r0, r3 | r0 = r3;
0x00011320 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011324 sub r3, r3, 0xc | r3 -= 0xc;
0x00011328 mov r2, r3 | r2 = r3;
0x0001132c sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011330 sub r3, r3, 0xc | r3 -= 0xc;
0x00011334 mov r1, r3 | r1 = r3;
0x00011338 mov r3, 0 | r3 = 0;
0x0001133c ldr r2, [r2, -0xbc] | r2 = *((r2 - 0xbc));
0x00011340 ldr r1, [r1, -0xb8] | r1 = *((r1 - 0xb8));
0x00011344 bl 0x10bb8 | r0 = send (r0, r1, r2, r3);
0x00011348 mov r3, r0 | r3 = r0;
0x0001134c cmn r3, 1 |
| if (r3 != 1) {
0x00011350 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 1) {
0x00011354 movne r3, 0 | r3 = 0;
| }
0x00011358 and r3, r3, 0xff | r3 &= 0xff;
0x0001135c cmp r3, 0 |
| if (r3 != 0) {
0x00011360 beq 0x1138c |
0x00011364 ldr r3, [pc, 0x320] | r3 = *(0x11688);
0x00011368 ldr r4, [r3] | r4 = *(0x11688);
0x0001136c bl 0x10b70 | r0 = errno_location ();
0x00011370 mov r3, r0 | r3 = r0;
0x00011374 ldr r3, [r3] | r3 = *(r3);
0x00011378 mov r2, r3 | r2 = r3;
0x0001137c ldr r1, [pc, 0x30c] | r1 = stderr;
0x00011380 mov r0, r4 | r0 = r4;
0x00011384 bl 0x10c60 | fprintf (r0, r1, r2, r3);
0x00011388 b 0x115a4 | goto label_1;
| }
0x0001138c sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011390 sub r3, r3, 0xc | r3 -= 0xc;
0x00011394 mov r2, r3 | r2 = r3;
0x00011398 sub r3, fp, 0xac | r3 -= c;
0x0001139c str r3, [r2, -0xb0] | *((r2 - 0xb0)) = r3;
0x000113a0 mov r3, 0 | r3 = 0;
0x000113a4 str r3, [fp, -0x18] | var_18h = r3;
| do {
0x000113a8 ldr r3, [fp, -0x18] | r3 = var_18h;
0x000113ac cmp r3, 0x1f |
| if (r3 > 0x1f) {
0x000113b0 bhi 0x113dc | goto label_2;
| }
0x000113b4 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000113b8 sub r3, r3, 0xc | r3 -= 0xc;
0x000113bc ldr r3, [r3, -0xb0] | r3 = *((r3 - 0xb0));
0x000113c0 ldr r2, [fp, -0x18] | r2 = var_18h;
0x000113c4 mov r1, 0 | r1 = 0;
0x000113c8 str r1, [r3, r2, lsl 2] | offset_0 = r2 << 2;
| *((r3 + offset_0)) = r1;
0x000113cc ldr r3, [fp, -0x18] | r3 = var_18h;
0x000113d0 add r3, r3, 1 | r3++;
0x000113d4 str r3, [fp, -0x18] | var_18h = r3;
0x000113d8 b 0x113a8 |
| } while (1);
| label_2:
0x000113dc sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000113e0 sub r3, r3, 0xc | r3 -= 0xc;
0x000113e4 ldr r3, [r3, -0xac] | r3 = *((r3 - 0xac));
0x000113e8 lsr r2, r3, 5 | r2 = r3 >> 5;
0x000113ec lsl r3, r2, 2 | r3 = r2 << 2;
0x000113f0 sub r1, fp, 0xc | r1 -= var_18h;
0x000113f4 add r3, r1, r3 | r3 = r1 + r3;
0x000113f8 ldr r1, [r3, -0xa0] | r1 = c;
0x000113fc sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011400 sub r3, r3, 0xc | r3 -= 0xc;
0x00011404 ldr r3, [r3, -0xac] | r3 = *((r3 - 0xac));
0x00011408 and r3, r3, 0x1f | r3 &= 0x1f;
0x0001140c mov r0, 1 | r0 = 1;
0x00011410 lsl r3, r0, r3 | r3 = r0 << r3;
0x00011414 orr r1, r1, r3 | r1 |= r3;
0x00011418 lsl r3, r2, 2 | r3 = r2 << 2;
0x0001141c sub r2, fp, 0xc | r2 -= var_18h;
0x00011420 add r3, r2, r3 | r3 = r2 + r3;
0x00011424 str r1, [r3, -0xa0] | c = r1;
0x00011428 mov r3, 5 | r3 = 5;
0x0001142c str r3, [fp, -0xb4] | var_b4h = r3;
0x00011430 mov r3, 0 | r3 = 0;
0x00011434 str r3, [fp, -0xb0] | var_b0h = r3;
0x00011438 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x0001143c sub r3, r3, 0xc | r3 -= 0xc;
0x00011440 sub r3, r3, 0xa8 | r3 -= 0xa8;
0x00011444 mov r2, 0x8000 | r2 = 0x8000;
0x00011448 mov r1, 0 | r1 = 0;
0x0001144c mov r0, r3 | r0 = r3;
0x00011450 bl 0x10c48 | memset (r0, r1, r2);
0x00011454 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011458 sub r3, r3, 0xc | r3 -= 0xc;
0x0001145c ldr r3, [r3, -0xac] | r3 = *((r3 - 0xac));
0x00011460 add r3, r3, 1 | r3++;
0x00011464 mov r0, r3 | r0 = r3;
0x00011468 sub r1, fp, 0xac | r1 -= c;
0x0001146c sub r3, fp, 0xb4 | r3 -= var_sp_b4h;
0x00011470 str r3, [sp] | *(sp) = r3;
0x00011474 mov r3, 0 | r3 = 0;
0x00011478 mov r2, 0 | r2 = 0;
0x0001147c bl 0x10c24 | r0 = select ();
0x00011480 mov r3, r0 | r3 = r0;
0x00011484 str r3, [fp, -0x1c] | var_1ch = r3;
0x00011488 ldr r3, [fp, -0x1c] | r3 = var_1ch;
0x0001148c cmn r3, 1 |
| if (r3 != 1) {
0x00011490 beq 0x114a0 |
0x00011494 cmp r3, 0 |
| if (r3 != 0) {
0x00011498 beq 0x114bc |
0x0001149c b 0x114d8 |
| } else {
0x000114a0 ldr r3, [pc, 0x1e4] |
0x000114a4 ldr r3, [r3] | r3 = *(0x11688);
0x000114a8 mov r2, 0x19 | r2 = 0x19;
0x000114ac mov r1, 1 | r1 = 1;
0x000114b0 ldr r0, [pc, 0x1dc] | r0 = "AjajPost_TCP_error_sending:__d";
0x000114b4 bl 0x10b7c | fwrite ("AjajPost_TCP_error_sending:__d", r1, r2, r3);
0x000114b8 b 0x115a4 | goto label_1;
| }
0x000114bc ldr r3, [pc, 0x1c8] |
0x000114c0 ldr r3, [r3] | r3 = *(0x11688);
0x000114c4 mov r2, 0x1c | r2 = 0x1c;
0x000114c8 mov r1, 1 | r1 = 1;
0x000114cc ldr r0, [pc, 0x1c4] | r0 = "AJAJPost_Socket_error___";
0x000114d0 bl 0x10b7c | fwrite ("AJAJPost_Socket_error___", r1, r2, r3);
0x000114d4 b 0x115a4 | goto label_1;
| }
0x000114d8 mov r3, 0 | r3 = 0;
0x000114dc str r3, [fp, -0x10] | var_1ch = r3;
0x000114e0 mov r3, 0 | r3 = 0;
0x000114e4 strb r3, [fp, -0x12] | var_12h = r3;
| do {
0x000114e8 ldrb r3, [fp, -0x12] | r3 = var_12h;
0x000114ec cmp r3, 2 |
| if (r3 > 2) {
0x000114f0 bhi 0x115a0 | goto label_3;
| }
0x000114f4 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000114f8 sub r3, r3, 0xc | r3 -= 0xc;
0x000114fc ldr r3, [r3, -0xac] | r3 = *((r3 - 0xac));
0x00011500 mov r0, r3 | r0 = r3;
0x00011504 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011508 sub r3, r3, 0xc | r3 -= 0xc;
0x0001150c sub r3, r3, 0xa8 | r3 -= 0xa8;
0x00011510 ldr r2, [fp, -0x10] | r2 = var_1ch;
0x00011514 add r1, r3, r2 | r1 = r3 + r2;
0x00011518 ldr r3, [fp, -0x10] | r3 = var_1ch;
0x0001151c rsb r2, r3, 0x8000 | r2 = 0x8000 - r3;
0x00011520 mov r3, 0 | r3 = 0;
0x00011524 bl 0x10c00 | r0 = recv (r0, r1);
0x00011528 mov r3, r0 | r3 = r0;
0x0001152c str r3, [fp, -0x20] | s1 = r3;
0x00011530 ldr r2, [fp, -0x10] | r2 = var_1ch;
0x00011534 ldr r3, [fp, -0x20] | r3 = s1;
0x00011538 add r3, r2, r3 | r3 = r2 + r3;
0x0001153c str r3, [fp, -0x10] | var_1ch = r3;
0x00011540 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011544 sub r3, r3, 0xc | r3 -= 0xc;
0x00011548 sub r3, r3, 0xa8 | r3 -= 0xa8;
0x0001154c sub r0, fp, 0x2c | r0 -= var_sp_2ch;
0x00011550 mov r2, 4 | r2 = 4;
0x00011554 mov r1, r3 | r1 = r3;
0x00011558 bl 0x10b94 | memcpy (r0, r1, r2);
0x0001155c ldr r2, [fp, -0x10] | r2 = var_1ch;
0x00011560 ldr r3, [fp, -0x2c] | r3 = s1;
0x00011564 cmp r2, r3 |
| if (r2 == r3) {
0x00011568 bne 0x11588 |
0x0001156c ldr r3, [fp, -0x10] | r3 = var_1ch;
0x00011570 sub r3, r3, 4 | r3 -= 4;
0x00011574 str r3, [fp, -0x10] | var_1ch = r3;
0x00011578 mov r3, 1 | r3 = 1;
0x0001157c strb r3, [fp, -0x11] | var_11h = r3;
0x00011580 mov r0, r0 |
0x00011584 b 0x115a0 |
| } else {
0x00011588 ldr r0, [pc, 0x10c] | r0 = "AJAJPost_Receive_timeout___";
0x0001158c bl 0x10b88 | usleep ("AJAJPost_Receive_timeout___");
0x00011590 ldrb r3, [fp, -0x12] | r3 = var_12h;
0x00011594 add r3, r3, 1 | r3++;
0x00011598 strb r3, [fp, -0x12] | var_12h = r3;
0x0001159c b 0x114e8 |
| } while (1);
| }
| label_3:
0x000115a0 mov r0, r0 |
| label_1:
0x000115a4 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000115a8 sub r3, r3, 0xc | r3 -= 0xc;
0x000115ac ldr r3, [r3, -0xac] | r3 = *((r3 - 0xac));
0x000115b0 mov r1, 2 | r1 = 2;
0x000115b4 mov r0, r3 | r0 = r3;
0x000115b8 bl 0x10d20 | shutdown ();
0x000115bc sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x000115c0 sub r3, r3, 0xc | r3 -= 0xc;
0x000115c4 ldr r3, [r3, -0xac] | r3 = *((r3 - 0xac));
0x000115c8 mov r0, r3 | r0 = r3;
0x000115cc bl 0x10c3c | close (r0);
0x000115d0 ldrb r3, [fp, -0x11] | r3 = var_11h;
0x000115d4 cmp r3, 0 |
| if (r3 != 0) {
0x000115d8 beq 0x1166c |
0x000115dc ldr r3, [fp, -0x10] | r3 = var_1ch;
0x000115e0 add r3, r3, 0x80 | r3 += 0x80;
0x000115e4 mov r1, 1 | r1 = 1;
0x000115e8 mov r0, r3 | r0 = r3;
0x000115ec bl 0x10b64 | r0 = calloc (r0, r1);
0x000115f0 mov r3, r0 | r3 = r0;
0x000115f4 str r3, [fp, -0x24] | ptr = r3;
0x000115f8 ldr r3, [fp, -0x24] | r3 = ptr;
0x000115fc cmp r3, 0 |
| if (r3 == 0) {
0x00011600 beq 0x11680 | goto label_0;
| }
0x00011604 ldr r2, [pc, 0x94] | r2 = *(0x1169c);
0x00011608 ldr r1, [pc, 0x94] | r1 = "_00_OK";
0x0001160c ldr r0, [fp, -0x24] | r0 = ptr;
0x00011610 bl 0x10c84 | sprintf (r0, "_00_OK", r2)
0x00011614 str r0, [fp, -0x28] | var_28h = r0;
0x00011618 ldr r3, [fp, -0x28] | r3 = var_28h;
0x0001161c ldr r2, [fp, -0x24] | r2 = ptr;
0x00011620 add r0, r2, r3 | r0 = r2 + r3;
0x00011624 ldr r2, [fp, -0x10] | r2 = var_1ch;
0x00011628 sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x0001162c sub r3, r3, 0xc | r3 -= 0xc;
0x00011630 sub r3, r3, 0xa8 | r3 -= 0xa8;
0x00011634 add r3, r3, 4 | r3 += 4;
0x00011638 mov r1, r3 | r1 = r3;
0x0001163c bl 0x10b94 | memcpy (r0, r1, r2);
0x00011640 ldr r2, [fp, -0x28] | r2 = var_28h;
0x00011644 ldr r3, [fp, -0x10] | r3 = var_1ch;
0x00011648 add r2, r2, r3 | r2 += r3;
0x0001164c sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011650 sub r3, r3, 0xc | r3 -= 0xc;
0x00011654 ldr r1, [fp, -0x24] | r1 = ptr;
0x00011658 ldr r0, [r3, -0xb4] | r0 = *((r3 - 0xb4));
0x0001165c bl 0x13c44 | scgi_send ();
0x00011660 ldr r0, [fp, -0x24] | r0 = ptr;
0x00011664 bl 0x10cd8 | free (r0);
0x00011668 b 0x11680 |
| } else {
0x0001166c sub r3, fp, 0x8000 | r3 = fp - 0x8000;
0x00011670 sub r3, r3, 0xc | r3 -= 0xc;
0x00011674 ldr r1, [pc, 0x2c] | r1 = "Status:__sContent_Type:_text_plain";
0x00011678 ldr r0, [r3, -0xb4] | r0 = *((r3 - 0xb4));
0x0001167c bl 0x111f8 | r0 = sym ();
| }
| label_0:
0x00011680 mov r0, r0 |
0x00011684 sub sp, fp, 8 |
0x00011688 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/AJAJPost.dll @ 0x13d38 */
| #include <stdint.h>
|
; (fcn) sym.scgi_302_redirect_SCGI_REQUEST__char_ () | void scgi_302_redirect_SCGI_REQUEST_char_ (int32_t arg1, char * arg2) {
| char * s;
| int32_t var_110h;
| char * ptr;
| int32_t var_108h;
| size_t nmeb;
| int32_t var_4h_2;
| int32_t var_4h;
| r0 = arg1;
| r1 = arg2;
| /* scgi_302_redirect(SCGI_REQUEST*, char*) */
0x00013d38 push {fp, lr} |
0x00013d3c add fp, sp, 4 |
0x00013d40 sub sp, sp, 0x110 |
0x00013d44 str r0, [fp, -0x110] | var_110h = r0;
0x00013d48 str r1, [fp, -0x114] | s = r1;
0x00013d4c sub r3, fp, 0x108 | r3 -= var_108h;
0x00013d50 str r3, [fp, -0x10c] | ptr = r3;
0x00013d54 ldr r0, [fp, -0x114] | r0 = s;
0x00013d58 bl 0x10c0c | r0 = strlen (r0);
0x00013d5c mov r3, r0 | r3 = r0;
0x00013d60 add r3, r3, 0x64 | r3 += 0x64;
0x00013d64 str r3, [fp, -8] | nmeb = r3;
0x00013d68 ldr r3, [fp, -8] | r3 = nmeb;
0x00013d6c cmp r3, 0xf9 |
| if (r3 > 0xf9) {
0x00013d70 ble 0x13db8 |
0x00013d74 ldr r3, [fp, -8] | r3 = nmeb;
0x00013d78 add r3, r3, 1 | r3++;
0x00013d7c mov r1, 1 | r1 = 1;
0x00013d80 mov r0, r3 | r0 = r3;
0x00013d84 bl 0x10b64 | r0 = calloc (r0, r1);
0x00013d88 mov r3, r0 | r3 = r0;
0x00013d8c str r3, [fp, -0x10c] | ptr = r3;
0x00013d90 ldr r3, [fp, -0x10c] | r3 = ptr;
0x00013d94 cmp r3, 0 |
| if (r3 != 0) {
0x00013d98 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 0) {
0x00013d9c movne r3, 0 | r3 = 0;
| }
0x00013da0 and r3, r3, 0xff | r3 &= 0xff;
0x00013da4 cmp r3, 0 |
| if (r3 == 0) {
0x00013da8 beq 0x13db8 | goto label_0;
| }
0x00013dac ldr r0, [pc, 0x54] | r0 = *(0x13e04);
0x00013db0 bl 0x128dc | scgi_perror ();
0x00013db4 bl 0x10c78 | abort ();
| }
| label_0:
0x00013db8 ldr r3, [fp, -0x10c] | r3 = ptr;
0x00013dbc ldr r2, [fp, -0x114] | r2 = s;
0x00013dc0 ldr r1, [pc, 0x44] | r1 = "scgilib:_Out_of_RAM__Emergency_shutdown.";
0x00013dc4 mov r0, r3 | r0 = r3;
0x00013dc8 bl 0x10c84 | sprintf (r0, "scgilib:_Out_of_RAM__Emergency_shutdown.", r2)
0x00013dcc ldr r3, [fp, -0x10c] | r3 = ptr;
0x00013dd0 ldr r2, [fp, -8] | r2 = nmeb;
0x00013dd4 mov r1, r3 | r1 = r3;
0x00013dd8 ldr r0, [fp, -0x110] | r0 = var_110h;
0x00013ddc bl 0x13c44 | scgi_send ();
0x00013de0 ldr r2, [fp, -0x10c] | r2 = ptr;
0x00013de4 sub r3, fp, 0x108 | r3 -= var_108h;
0x00013de8 cmp r2, r3 |
| if (r2 != r3) {
0x00013dec beq 0x13dfc |
0x00013df0 ldr r3, [fp, -0x10c] | r3 = ptr;
0x00013df4 mov r0, r3 | r0 = r3;
0x00013df8 bl 0x10cd8 | r0 = free (r0);
| }
0x00013dfc mov r0, r0 |
0x00013e00 sub sp, fp, 4 |
0x00013e04 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/AJAJPost.dll @ 0x137c0 */
| #include <stdint.h>
|
; (fcn) sym.scgi_initialize () | void scgi_initialize (int32_t arg1) {
| int32_t var_c8h;
| int32_t var_c0h;
| int32_t var_40h;
| int32_t var_3ch;
| int32_t var_38h;
| int32_t var_34h;
| int32_t var_1ch;
| int32_t var_18h;
| int32_t fildes;
| int32_t var_10h;
| int32_t var_0h;
| char * var_sp_c0h;
| int32_t var_sp_40h;
| void * s;
| int32_t var_sp_38h;
| int32_t var_sp_1ch;
| int32_t var_sp_18h;
| int32_t var_sp_14h;
| int32_t var_8h;
| r0 = arg1;
0x000137c0 push {r4, fp, lr} |
0x000137c4 add fp, sp, 8 |
0x000137c8 sub sp, sp, 0xcc |
0x000137cc str r0, [fp, -0xc8] | var_c8h = r0;
0x000137d0 mov r3, 1 | r3 = 1;
0x000137d4 str r3, [fp, -0x1c] | var_1ch = r3;
0x000137d8 sub r3, fp, 0x3c | r3 -= s;
0x000137dc mov r2, 0x20 | r2 = 0x20;
0x000137e0 mov r1, 0 | r1 = 0;
0x000137e4 mov r0, r3 | r0 = r3;
0x000137e8 bl 0x10c48 | memset (r0, r1, r2);
0x000137ec mov r3, 2 | r3 = 2;
0x000137f0 str r3, [fp, -0x38] | var_38h = r3;
0x000137f4 mov r3, 1 | r3 = 1;
0x000137f8 str r3, [fp, -0x34] | var_34h = r3;
0x000137fc mov r3, 1 | r3 = 1;
0x00013800 str r3, [fp, -0x3c] | var_3ch = r3;
0x00013804 sub r3, fp, 0xc0 | r3 -= var_sp_c0h;
0x00013808 ldr r2, [fp, -0xc8] | r2 = var_c8h;
0x0001380c ldr r1, [pc, 0x2ac] | r1 = *(0x13abc);
0x00013810 mov r0, r3 | r0 = r3;
0x00013814 bl 0x10c84 | sprintf (r0, r1, r2)
0x00013818 sub r3, fp, 0x40 | r3 -= var_sp_40h;
0x0001381c sub r2, fp, 0x3c | r2 -= s;
0x00013820 sub r1, fp, 0xc0 | r1 -= var_sp_c0h;
0x00013824 mov r0, 0 | r0 = 0;
0x00013828 bl 0x10cfc | r0 = getaddrinfo ();
0x0001382c mov r3, r0 | r3 = r0;
0x00013830 str r3, [fp, -0x10] | var_1ch = r3;
0x00013834 ldr r3, [fp, -0x10] | r3 = var_1ch;
0x00013838 cmp r3, 0 |
| if (r3 == 0) {
0x0001383c movne r3, 1 | r3 = 1;
| }
| if (r3 != 0) {
0x00013840 moveq r3, 0 | r3 = 0;
| }
0x00013844 and r3, r3, 0xff | r3 &= 0xff;
0x00013848 cmp r3, 0 |
| if (r3 != 0) {
0x0001384c beq 0x13870 |
0x00013850 ldr r3, [pc, 0x26c] |
0x00013854 ldr r3, [r3] | r3 = "_d";
0x00013858 mov r2, 0x13 | r2 = 0x13;
0x0001385c mov r1, 1 | r1 = 1;
0x00013860 ldr r0, [pc, 0x260] | r0 = stderr;
0x00013864 bl 0x10b7c | fwrite (r0, r1, r2, "_d");
0x00013868 mov r3, 0 | r3 = 0;
0x0001386c b 0x13ab4 |
| } else {
0x00013870 ldr r3, [fp, -0x40] | r3 = var_40h;
0x00013874 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x00013878 ldr r3, [fp, -0x40] | r3 = var_40h;
0x0001387c ldr r1, [r3, 8] | r1 = *((r3 + 8));
0x00013880 ldr r3, [fp, -0x40] | r3 = var_40h;
0x00013884 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00013888 mov r2, r3 | r2 = r3;
0x0001388c bl 0x10c90 | socket (r0, r1, r2);
0x00013890 str r0, [fp, -0x14] | fildes = r0;
0x00013894 ldr r3, [fp, -0x14] | r3 = fildes;
0x00013898 cmn r3, 1 |
| if (r3 == 1) {
0x0001389c bne 0x138cc |
0x000138a0 ldr r3, [pc, 0x21c] | r3 = "_d";
0x000138a4 ldr r4, [r3] | r4 = "_d";
0x000138a8 bl 0x10b70 | r0 = errno_location ();
0x000138ac mov r3, r0 | r3 = r0;
0x000138b0 ldr r3, [r3] | r3 = *(r3);
0x000138b4 mov r2, r3 | r2 = r3;
0x000138b8 ldr r1, [pc, 0x20c] | r1 = "scgi_initialize:_1";
0x000138bc mov r0, r4 | r0 = r4;
0x000138c0 bl 0x10c60 | fprintf (r0, "scgi_initialize:_1", r2, r3);
0x000138c4 mov r3, 0 | r3 = 0;
0x000138c8 b 0x13ab4 |
| } else {
0x000138cc sub r2, fp, 0x1c | r2 -= var_sp_1ch;
0x000138d0 mov r3, 4 | r3 = 4;
0x000138d4 str r3, [sp] | *(sp) = r3;
0x000138d8 mov r3, r2 | r3 = r2;
0x000138dc mov r2, 2 | r2 = 2;
0x000138e0 mov r1, 1 | r1 = 1;
0x000138e4 ldr r0, [fp, -0x14] | r0 = fildes;
0x000138e8 bl 0x10c30 | setsockopt ();
0x000138ec ldr r3, [fp, -0x40] | r3 = var_40h;
0x000138f0 ldr r1, [r3, 0x14] | r1 = *((r3 + 0x14));
0x000138f4 ldr r3, [fp, -0x40] | r3 = var_40h;
0x000138f8 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x000138fc mov r2, r3 | r2 = r3;
0x00013900 ldr r0, [fp, -0x14] | r0 = fildes;
0x00013904 bl 0x10b40 | r0 = bind (r0, r1, r2);
0x00013908 mov r3, r0 | r3 = r0;
0x0001390c cmn r3, 1 |
| if (r3 != 1) {
0x00013910 beq 0x1392c |
0x00013914 mov r1, 0x20 | r1 = 0x20;
0x00013918 ldr r0, [fp, -0x14] | r0 = fildes;
0x0001391c bl 0x10cf0 | r0 = listen (r0, r1);
0x00013920 mov r3, r0 | r3 = r0;
0x00013924 cmn r3, 1 |
| if (r3 != 1) {
0x00013928 bne 0x13934 | goto label_0;
| }
| }
0x0001392c mov r3, 1 | r3 = 1;
0x00013930 b 0x13938 | goto label_1;
| label_0:
0x00013934 mov r3, 0 | r3 = 0;
| label_1:
0x00013938 cmp r3, 0 |
| if (r3 != 0) {
0x0001393c beq 0x13968 |
0x00013940 ldr r3, [pc, 0x17c] |
0x00013944 ldr r3, [r3] | r3 = "_d";
0x00013948 mov r2, 0x13 | r2 = 0x13;
0x0001394c mov r1, 1 | r1 = 1;
0x00013950 ldr r0, [pc, 0x178] | r0 = "socket_failed:__d";
0x00013954 bl 0x10b7c | fwrite ("socket_failed:__d", r1, r2, "_d");
0x00013958 ldr r0, [fp, -0x14] | r0 = fildes;
0x0001395c bl 0x10c3c | close (r0);
0x00013960 mov r3, 0 | r3 = 0;
0x00013964 b 0x13ab4 |
| } else {
0x00013968 ldr r3, [fp, -0x40] | r3 = var_40h;
0x0001396c mov r0, r3 | r0 = r3;
0x00013970 bl 0x10bd0 | freeaddrinfo ();
0x00013974 mov r1, 0x1c | r1 = 0x1c;
0x00013978 mov r0, 1 | r0 = 1;
0x0001397c bl 0x10b64 | r0 = calloc (r0, r1);
0x00013980 mov r3, r0 | r3 = r0;
0x00013984 str r3, [fp, -0x18] | var_18h = r3;
0x00013988 ldr r3, [fp, -0x18] | r3 = var_18h;
0x0001398c cmp r3, 0 |
| if (r3 != 0) {
0x00013990 moveq r3, 1 | r3 = 1;
| }
| if (r3 == 0) {
0x00013994 movne r3, 0 | r3 = 0;
| }
0x00013998 and r3, r3, 0xff | r3 &= 0xff;
0x0001399c cmp r3, 0 |
| if (r3 != 0) {
0x000139a0 beq 0x139b0 |
0x000139a4 ldr r0, [pc, 0x128] | r0 = "scgi_initialize:_3";
0x000139a8 bl 0x128dc | scgi_perror ();
0x000139ac bl 0x10c78 | abort ();
| }
0x000139b0 ldr r3, [fp, -0x18] | r3 = var_18h;
0x000139b4 mov r2, 0 | r2 = 0;
0x000139b8 str r2, [r3] | *(r3) = r2;
0x000139bc ldr r3, [fp, -0x18] | r3 = var_18h;
0x000139c0 mov r2, 0 | r2 = 0;
0x000139c4 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x000139c8 ldr r3, [fp, -0x18] | r3 = var_18h;
0x000139cc mov r2, 0 | r2 = 0;
0x000139d0 str r2, [r3, 8] | *((r3 + 8)) = r2;
0x000139d4 ldr r3, [fp, -0x18] | r3 = var_18h;
0x000139d8 mov r2, 0 | r2 = 0;
0x000139dc str r2, [r3, 0xc] | *((r3 + 0xc)) = r2;
0x000139e0 ldr r3, [fp, -0x18] | r3 = var_18h;
0x000139e4 ldr r2, [fp, -0xc8] | r2 = var_c8h;
0x000139e8 str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x000139ec ldr r3, [fp, -0x18] | r3 = var_18h;
0x000139f0 ldr r2, [fp, -0x14] | r2 = fildes;
0x000139f4 str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x000139f8 ldr r3, [pc, 0xd8] |
0x000139fc ldr r3, [r3] | r3 = "scgilib:_Out_of_RAM__Emergency_shutdown.";
0x00013a00 cmp r3, 0 |
| if (r3 != 0) {
0x00013a04 beq 0x13a28 |
0x00013a08 ldr r3, [pc, 0xc8] |
0x00013a0c ldr r3, [r3] | r3 = "scgilib:_Out_of_RAM__Emergency_shutdown.";
0x00013a10 ldr r4, [fp, -0x18] | r4 = var_18h;
0x00013a14 mov r1, 0 | r1 = 0;
0x00013a18 ldr r0, [fp, -0x14] | r0 = fildes;
0x00013a1c blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, char*) (r0, r1, "scgilib:_Out_of_RAM__Emergency_shutdown.");
0x00013a20 mov r3, r0 | r3 = r0;
0x00013a24 str r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
| }
0x00013a28 ldr r3, [pc, 0xac] |
0x00013a2c ldr r3, [r3] | r3 = scgi_fd_newfd_cb;
0x00013a30 cmp r3, 0 |
| if (r3 == 0) {
0x00013a34 bne 0x13a54 |
0x00013a38 ldr r3, [fp, -0x18] | r3 = var_18h;
0x00013a3c ldr r2, [pc, 0x98] | r2 = scgi_fd_newfd_cb;
0x00013a40 str r3, [r2] | *(r2) = r3;
0x00013a44 ldr r3, [fp, -0x18] | r3 = var_18h;
0x00013a48 ldr r2, [pc, 0x90] | r2 = *(0x13adc);
0x00013a4c str r3, [r2] | *(r2) = r3;
0x00013a50 b 0x13a64 |
| } else {
0x00013a54 ldr r3, [pc, 0x84] |
0x00013a58 ldr r3, [r3] | r3 = *(0x13adc);
0x00013a5c ldr r2, [fp, -0x18] | r2 = var_18h;
0x00013a60 str r2, [r3] | *(r3) = r2;
| }
0x00013a64 ldr r3, [fp, -0x18] | r3 = var_18h;
0x00013a68 mov r2, 0 | r2 = 0;
0x00013a6c str r2, [r3] | *(r3) = r2;
0x00013a70 ldr r3, [pc, 0x64] | r3 = scgi_fd_newfd_cb;
0x00013a74 ldr r2, [r3] | r2 = scgi_fd_newfd_cb;
0x00013a78 ldr r3, [fp, -0x18] | r3 = var_18h;
0x00013a7c cmp r2, r3 |
| if (r2 == r3) {
0x00013a80 bne 0x13a94 |
0x00013a84 ldr r3, [fp, -0x18] | r3 = var_18h;
0x00013a88 mov r2, 0 | r2 = 0;
0x00013a8c str r2, [r3, 4] | *((r3 + 4)) = r2;
0x00013a90 b 0x13aa4 |
| } else {
0x00013a94 ldr r3, [fp, -0x18] | r3 = var_18h;
0x00013a98 ldr r2, [pc, 0x40] |
0x00013a9c ldr r2, [r2] | r2 = *(0x13adc);
0x00013aa0 str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
0x00013aa4 ldr r3, [fp, -0x18] | r3 = var_18h;
0x00013aa8 ldr r2, [pc, 0x30] | r2 = *(0x13adc);
0x00013aac str r3, [r2] | *(r2) = r3;
0x00013ab0 mov r3, 1 | r3 = 1;
| }
| }
| }
0x00013ab4 mov r0, r3 | r0 = r3;
0x00013ab8 sub sp, fp, 8 |
0x00013abc pop {r4, fp, pc} |
| }
[*] Function sprintf used 4 times AJAJPost.dll