
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "MHD_FLAG": Some values do not have unique names */
/* WARNING: Enum "gnutls_pk_algorithm_t": Some values do not have unique names */
/* WARNING: Enum "gnutls_certificate_type_t": Some values do not have unique names */

void __regparm3 transmit_error_response(MHD_Connection *connection,uint status_code,char *message)

{
  uint uVar1;
  uint uVar2;
  MHD_Response *response;
  int iVar3;
  char *format;
  uint *puVar4;
  uint *puVar5;
  bool bVar6;
  
  if (connection->version == (char *)0x0) {
    connection->version = "HTTP/1.0";
  }
  connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
  connection->read_closed = true;
  MHD_DLOG(connection->daemon,
           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",
           status_code,message);
  puVar5 = (uint *)message;
  if (connection->response != (MHD_Response *)0x0) {
    MHD_destroy_response(connection->response);
    connection->response = (MHD_Response *)0x0;
  }
  do {
    puVar4 = puVar5;
    uVar1 = *puVar4 + 0xfefefeff & ~*puVar4;
    uVar2 = uVar1 & 0x80808080;
    puVar5 = puVar4 + 1;
  } while (uVar2 == 0);
  bVar6 = (uVar1 & 0x8080) == 0;
  if (bVar6) {
    uVar2 = uVar2 >> 0x10;
  }
  if (bVar6) {
    puVar5 = (uint *)((int)puVar4 + 6);
  }
  response = MHD_create_response_from_buffer
                       ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),
                        message,MHD_RESPMEM_PERSISTENT);
  if (response == (MHD_Response *)0x0) {
    connection->state = MHD_CONNECTION_CLOSED;
    return;
  }
  iVar3 = MHD_queue_response(connection,status_code,response);
  MHD_destroy_response(response);
  if (iVar3 == 1) {
    connection->keepalive = MHD_CONN_MUST_CLOSE;
    iVar3 = build_header_response(connection);
    if (iVar3 != 0) {
      connection->state = MHD_CONNECTION_HEADERS_SENDING;
      return;
    }
    format = "Closing connection (failed to create response header)\n";
  }
  else {
    format = "Closing connection (failed to queue response)\n";
  }
  MHD_DLOG(connection->daemon,format);
  MHD_connection_close_(connection,MHD_REQUEST_TERMINATED_WITH_ERROR);
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 FUN_00016610(int param_1,undefined4 param_2,uint *param_3)

{
  uint uVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  char *pcVar5;
  uint *puVar6;
  uint *puVar7;
  bool bVar8;
  
  if (*(int *)(param_1 + 0x3c) == 0) {
    *(char **)(param_1 + 0x3c) = "HTTP/1.0";
  }
  *(undefined4 *)(param_1 + 0xb4) = 9;
  *(undefined1 *)(param_1 + 0xa9) = 1;
  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),
               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",
               param_2,param_3);
  puVar7 = param_3;
  if (*(int *)(param_1 + 0x24) != 0) {
    MHD_destroy_response(*(int *)(param_1 + 0x24));
    *(undefined4 *)(param_1 + 0x24) = 0;
  }
  do {
    puVar6 = puVar7;
    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;
    uVar2 = uVar1 & 0x80808080;
    puVar7 = puVar6 + 1;
  } while (uVar2 == 0);
  bVar8 = (uVar1 & 0x8080) == 0;
  if (bVar8) {
    uVar2 = uVar2 >> 0x10;
  }
  if (bVar8) {
    puVar7 = (uint *)((int)puVar6 + 6);
  }
  iVar3 = MHD_create_response_from_buffer
                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),
                     param_3,0);
  if (iVar3 == 0) {
    *(undefined4 *)(param_1 + 0xb4) = 0x13;
    return;
  }
  iVar4 = MHD_queue_response(param_1,param_2,iVar3);
  MHD_destroy_response(iVar3);
  if (iVar4 == 1) {
    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;
    iVar3 = FUN_000140f0();
    if (iVar3 != 0) {
      *(undefined4 *)(param_1 + 0xb4) = 10;
      return;
    }
    pcVar5 = "Closing connection (failed to create response header)\n";
  }
  else {
    pcVar5 = "Closing connection (failed to queue response)\n";
  }
  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);
  FUN_00015170(param_1,1);
  return;
}


PUSH EBP
MOV EBP,ECX
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00013810
ADD EBX,0x1d7c1
SUB ESP,0xc
MOV ECX,dword ptr [EAX + 0x3c]
TEST ECX,ECX
JZ 0x00016748
LEA EAX,[EBX + 0xffff5760]
PUSH EBP
MOV dword ptr [ESI + 0xb4],0x9
PUSH EDI
MOV byte ptr [ESI + 0xa9],0x1
PUSH EAX
PUSH dword ptr [ESI + 0x18]
CALL 0x00020aa0
MOV EAX,dword ptr [ESI + 0x24]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00016672
SUB ESP,0xc
PUSH EAX
CALL 0x000131b0
MOV dword ptr [ESI + 0x24],0x0
ADD ESP,0x10
MOV EDX,EBP
MOV ECX,dword ptr [EDX]
ADD EDX,0x4
LEA EAX,[ECX + 0xfefefeff]
NOT ECX
AND EAX,ECX
AND EAX,0x80808080
JZ 0x00016674
MOV ECX,EAX
SHR ECX,0x10
TEST EAX,0x8080
CMOVZ EAX,ECX
LEA ECX,[EDX + 0x2]
CMOVZ EDX,ECX
MOV ECX,EAX
ADD CL,AL
SBB EDX,0x3
SUB ESP,0x4
SUB EDX,EBP
PUSH 0x0
PUSH EBP
PUSH EDX
CALL 0x000132f0
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x00016730
SUB ESP,0x4
PUSH EAX
PUSH EDI
PUSH ESI
CALL 0x00013360
MOV dword ptr [ESP],EBP
MOV EDI,EAX
CALL 0x000131b0
ADD ESP,0x10
CMP EDI,0x1
JNZ 0x00016700
MOV dword ptr [ESI + 0x40],0xffffffff
MOV EAX,ESI
CALL 0x000140f0
TEST EAX,EAX
JZ 0x00016760
MOV dword ptr [ESI + 0xb4],0xa
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xffff57b4]
PUSH EAX
PUSH dword ptr [ESI + 0x18]
CALL 0x00020aa0
POP EAX
POP EDX
PUSH 0x1
PUSH ESI
CALL 0x00015170
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESI + 0xb4],0x13
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xffff527f]
MOV dword ptr [ESI + 0x3c],EAX
JMP 0x00016633
SUB ESP,0x8
LEA EAX,[EBX + 0xffff57e4]
JMP 0x00016709
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00016610(int param_1,undefined4 param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00016610(int param_1,undefined4 param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00016610(int param_1,undefined4 param_2,uint *param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,uint *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "bool bVar8;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 0)" ( (binary_expression "*(int *)(param_1 + 0x3c) == 0" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }" { (expression_statement "*(char **)(param_1 + 0x3c) = "HTTP/1.0";" (assignment_expression "*(char **)(param_1 + 0x3c) = "HTTP/1.0"" (pointer_expression "*(char **)(param_1 + 0x3c)" * (cast_expression "(char **)(param_1 + 0x3c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (string_literal ""HTTP/1.0"" " string_content ")) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 9;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 9" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" * (cast_expression "(undefined4 *)(param_1 + 0xb4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 0xa9) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xa9) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xa9)" * (cast_expression "(undefined1 *)(param_1 + 0xa9)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa9)" ( (binary_expression "param_1 + 0xa9" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);" (call_expression "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , (string_literal ""Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n"" " string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "puVar7 = param_3;" (assignment_expression "puVar7 = param_3" identifier = identifier) ;) (if_statement "if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x24) != 0)" ( (binary_expression "*(int *)(param_1 + 0x24) != 0" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }" { (expression_statement "MHD_destroy_response(*(int *)(param_1 + 0x24));" (call_expression "MHD_destroy_response(*(int *)(param_1 + 0x24))" identifier (argument_list "(*(int *)(param_1 + 0x24))" ( (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) })) (do_statement "do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);" do (compound_statement "{\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  }" { (expression_statement "puVar6 = puVar7;" (assignment_expression "puVar6 = puVar7" identifier = identifier) ;) (expression_statement "uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;" (assignment_expression "uVar1 = *puVar6 + 0xfefefeff & ~*puVar6" identifier = (binary_expression "*puVar6 + 0xfefefeff & ~*puVar6" (binary_expression "*puVar6 + 0xfefefeff" (pointer_expression "*puVar6" * identifier) + number_literal) & (unary_expression "~*puVar6" ~ (pointer_expression "*puVar6" * identifier)))) ;) (expression_statement "uVar2 = uVar1 & 0x80808080;" (assignment_expression "uVar2 = uVar1 & 0x80808080" identifier = (binary_expression "uVar1 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar7 = puVar6 + 1;" (assignment_expression "puVar7 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) ;) (expression_statement "bVar8 = (uVar1 & 0x8080) == 0;" (assignment_expression "bVar8 = (uVar1 & 0x8080) == 0" identifier = (binary_expression "(uVar1 & 0x8080) == 0" (parenthesized_expression "(uVar1 & 0x8080)" ( (binary_expression "uVar1 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    uVar2 = uVar2 >> 0x10;\n  }" { (expression_statement "uVar2 = uVar2 >> 0x10;" (assignment_expression "uVar2 = uVar2 >> 0x10" identifier = (binary_expression "uVar2 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }" { (expression_statement "puVar7 = (uint *)((int)puVar6 + 6);" (assignment_expression "puVar7 = (uint *)((int)puVar6 + 6)" identifier = (cast_expression "(uint *)((int)puVar6 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + 6)" ( (binary_expression "(int)puVar6 + 6" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);" (assignment_expression "iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" identifier = (call_expression "MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" identifier (argument_list "((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" ( (binary_expression "(int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3)" (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3)" ( (binary_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2))" ( (binary_expression "-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)" number_literal - (cast_expression "(uint)CARRY1((byte)uVar2,(byte)uVar2)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar2,(byte)uVar2)" identifier (argument_list "((byte)uVar2,(byte)uVar2)" ( (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) )) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , identifier , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 0x13;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 0x13" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" * (cast_expression "(undefined4 *)(param_1 + 0xb4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "iVar4 = MHD_queue_response(param_1,param_2,iVar3);" (assignment_expression "iVar4 = MHD_queue_response(param_1,param_2,iVar3)" identifier = (call_expression "MHD_queue_response(param_1,param_2,iVar3)" identifier (argument_list "(param_1,param_2,iVar3)" ( identifier , identifier , identifier )))) ;) (expression_statement "MHD_destroy_response(iVar3);" (call_expression "MHD_destroy_response(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (if_statement "if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x40) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x40) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x40)" * (cast_expression "(undefined4 *)(param_1 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = FUN_000140f0();" (assignment_expression "iVar3 = FUN_000140f0()" identifier = (call_expression "FUN_000140f0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }" { (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 10;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 10" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" * (cast_expression "(undefined4 *)(param_1 + 0xb4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar5 = "Closing connection (failed to create response header)\n";" (assignment_expression "pcVar5 = "Closing connection (failed to create response header)\n"" identifier = (string_literal ""Closing connection (failed to create response header)\n"" " string_content escape_sequence ")) ;) }) (else_clause "else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" else (compound_statement "{\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" { (expression_statement "pcVar5 = "Closing connection (failed to queue response)\n";" (assignment_expression "pcVar5 = "Closing connection (failed to queue response)\n"" identifier = (string_literal ""Closing connection (failed to queue response)\n"" " string_content escape_sequence ")) ;) }))) (expression_statement "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);" (call_expression "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x18),pcVar5)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "FUN_00015170(param_1,1);" (call_expression "FUN_00015170(param_1,1)" identifier (argument_list "(param_1,1)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "MHD_FLAG": Some values do not have unique names */\n/* WARNING: Enum "gnutls_pk_algorithm_t": Some values do not have unique names */\n/* WARNING: Enum "gnutls_certificate_type_t": Some values do not have unique names */\n\nvoid __regparm3 transmit_error_response(MHD_Connection *connection,uint status_code,char *message)\n\n{\n  uint uVar1;\n  uint uVar2;\n  MHD_Response *response;\n  int iVar3;\n  char *format;\n  uint *puVar4;\n  uint *puVar5;\n  bool bVar6;\n  \n  if (connection->version == (char *)0x0) {\n    connection->version = "HTTP/1.0";\n  }\n  connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;\n  connection->read_closed = true;\n  MHD_DLOG(connection->daemon,\n           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n           status_code,message);\n  puVar5 = (uint *)message;\n  if (connection->response != (MHD_Response *)0x0) {\n    MHD_destroy_response(connection->response);\n    connection->response = (MHD_Response *)0x0;\n  }\n  do {\n    puVar4 = puVar5;\n    uVar1 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar4 + 1;\n  } while (uVar2 == 0);\n  bVar6 = (uVar1 & 0x8080) == 0;\n  if (bVar6) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar6) {\n    puVar5 = (uint *)((int)puVar4 + 6);\n  }\n  response = MHD_create_response_from_buffer\n                       ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),\n                        message,MHD_RESPMEM_PERSISTENT);\n  if (response == (MHD_Response *)0x0) {\n    connection->state = MHD_CONNECTION_CLOSED;\n    return;\n  }\n  iVar3 = MHD_queue_response(connection,status_code,response);\n  MHD_destroy_response(response);\n  if (iVar3 == 1) {\n    connection->keepalive = MHD_CONN_MUST_CLOSE;\n    iVar3 = build_header_response(connection);\n    if (iVar3 != 0) {\n      connection->state = MHD_CONNECTION_HEADERS_SENDING;\n      return;\n    }\n    format = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    format = "Closing connection (failed to queue response)\n";\n  }\n  MHD_DLOG(connection->daemon,format);\n  MHD_connection_close_(connection,MHD_REQUEST_TERMINATED_WITH_ERROR);\n  return;\n}\n\n" comment comment comment comment (function_definition "void __regparm3 transmit_error_response(MHD_Connection *connection,uint status_code,char *message)\n\n{\n  uint uVar1;\n  uint uVar2;\n  MHD_Response *response;\n  int iVar3;\n  char *format;\n  uint *puVar4;\n  uint *puVar5;\n  bool bVar6;\n  \n  if (connection->version == (char *)0x0) {\n    connection->version = "HTTP/1.0";\n  }\n  connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;\n  connection->read_closed = true;\n  MHD_DLOG(connection->daemon,\n           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n           status_code,message);\n  puVar5 = (uint *)message;\n  if (connection->response != (MHD_Response *)0x0) {\n    MHD_destroy_response(connection->response);\n    connection->response = (MHD_Response *)0x0;\n  }\n  do {\n    puVar4 = puVar5;\n    uVar1 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar4 + 1;\n  } while (uVar2 == 0);\n  bVar6 = (uVar1 & 0x8080) == 0;\n  if (bVar6) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar6) {\n    puVar5 = (uint *)((int)puVar4 + 6);\n  }\n  response = MHD_create_response_from_buffer\n                       ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),\n                        message,MHD_RESPMEM_PERSISTENT);\n  if (response == (MHD_Response *)0x0) {\n    connection->state = MHD_CONNECTION_CLOSED;\n    return;\n  }\n  iVar3 = MHD_queue_response(connection,status_code,response);\n  MHD_destroy_response(response);\n  if (iVar3 == 1) {\n    connection->keepalive = MHD_CONN_MUST_CLOSE;\n    iVar3 = build_header_response(connection);\n    if (iVar3 != 0) {\n      connection->state = MHD_CONNECTION_HEADERS_SENDING;\n      return;\n    }\n    format = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    format = "Closing connection (failed to queue response)\n";\n  }\n  MHD_DLOG(connection->daemon,format);\n  MHD_connection_close_(connection,MHD_REQUEST_TERMINATED_WITH_ERROR);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "transmit_error_response(MHD_Connection *connection,uint status_code,char *message)" identifier (parameter_list "(MHD_Connection *connection,uint status_code,char *message)" ( (parameter_declaration "MHD_Connection *connection" type_identifier (pointer_declarator "*connection" * identifier)) , (parameter_declaration "uint status_code" type_identifier identifier) , (parameter_declaration "char *message" primitive_type (pointer_declarator "*message" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  MHD_Response *response;\n  int iVar3;\n  char *format;\n  uint *puVar4;\n  uint *puVar5;\n  bool bVar6;\n  \n  if (connection->version == (char *)0x0) {\n    connection->version = "HTTP/1.0";\n  }\n  connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;\n  connection->read_closed = true;\n  MHD_DLOG(connection->daemon,\n           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n           status_code,message);\n  puVar5 = (uint *)message;\n  if (connection->response != (MHD_Response *)0x0) {\n    MHD_destroy_response(connection->response);\n    connection->response = (MHD_Response *)0x0;\n  }\n  do {\n    puVar4 = puVar5;\n    uVar1 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar4 + 1;\n  } while (uVar2 == 0);\n  bVar6 = (uVar1 & 0x8080) == 0;\n  if (bVar6) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar6) {\n    puVar5 = (uint *)((int)puVar4 + 6);\n  }\n  response = MHD_create_response_from_buffer\n                       ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),\n                        message,MHD_RESPMEM_PERSISTENT);\n  if (response == (MHD_Response *)0x0) {\n    connection->state = MHD_CONNECTION_CLOSED;\n    return;\n  }\n  iVar3 = MHD_queue_response(connection,status_code,response);\n  MHD_destroy_response(response);\n  if (iVar3 == 1) {\n    connection->keepalive = MHD_CONN_MUST_CLOSE;\n    iVar3 = build_header_response(connection);\n    if (iVar3 != 0) {\n      connection->state = MHD_CONNECTION_HEADERS_SENDING;\n      return;\n    }\n    format = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    format = "Closing connection (failed to queue response)\n";\n  }\n  MHD_DLOG(connection->daemon,format);\n  MHD_connection_close_(connection,MHD_REQUEST_TERMINATED_WITH_ERROR);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "MHD_Response *response;" type_identifier (pointer_declarator "*response" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "bool bVar6;" primitive_type identifier ;) (if_statement "if (connection->version == (char *)0x0) {\n    connection->version = "HTTP/1.0";\n  }" if (parenthesized_expression "(connection->version == (char *)0x0)" ( (binary_expression "connection->version == (char *)0x0" (field_expression "connection->version" identifier -> field_identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    connection->version = "HTTP/1.0";\n  }" { (expression_statement "connection->version = "HTTP/1.0";" (assignment_expression "connection->version = "HTTP/1.0"" (field_expression "connection->version" identifier -> field_identifier) = (string_literal ""HTTP/1.0"" " string_content ")) ;) })) (expression_statement "connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;" (assignment_expression "connection->state = MHD_CONNECTION_FOOTERS_RECEIVED" (field_expression "connection->state" identifier -> field_identifier) = identifier) ;) (expression_statement "connection->read_closed = true;" (assignment_expression "connection->read_closed = true" (field_expression "connection->read_closed" identifier -> field_identifier) = true) ;) (expression_statement "MHD_DLOG(connection->daemon,\n           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n           status_code,message);" (call_expression "MHD_DLOG(connection->daemon,\n           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n           status_code,message)" identifier (argument_list "(connection->daemon,\n           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n           status_code,message)" ( (field_expression "connection->daemon" identifier -> field_identifier) , (string_literal ""Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n"" " string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "puVar5 = (uint *)message;" (assignment_expression "puVar5 = (uint *)message" identifier = (cast_expression "(uint *)message" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (connection->response != (MHD_Response *)0x0) {\n    MHD_destroy_response(connection->response);\n    connection->response = (MHD_Response *)0x0;\n  }" if (parenthesized_expression "(connection->response != (MHD_Response *)0x0)" ( (binary_expression "connection->response != (MHD_Response *)0x0" (field_expression "connection->response" identifier -> field_identifier) != (cast_expression "(MHD_Response *)0x0" ( (type_descriptor "MHD_Response *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    MHD_destroy_response(connection->response);\n    connection->response = (MHD_Response *)0x0;\n  }" { (expression_statement "MHD_destroy_response(connection->response);" (call_expression "MHD_destroy_response(connection->response)" identifier (argument_list "(connection->response)" ( (field_expression "connection->response" identifier -> field_identifier) ))) ;) (expression_statement "connection->response = (MHD_Response *)0x0;" (assignment_expression "connection->response = (MHD_Response *)0x0" (field_expression "connection->response" identifier -> field_identifier) = (cast_expression "(MHD_Response *)0x0" ( (type_descriptor "MHD_Response *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (do_statement "do {\n    puVar4 = puVar5;\n    uVar1 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar4 + 1;\n  } while (uVar2 == 0);" do (compound_statement "{\n    puVar4 = puVar5;\n    uVar1 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar4 + 1;\n  }" { (expression_statement "puVar4 = puVar5;" (assignment_expression "puVar4 = puVar5" identifier = identifier) ;) (expression_statement "uVar1 = *puVar4 + 0xfefefeff & ~*puVar4;" (assignment_expression "uVar1 = *puVar4 + 0xfefefeff & ~*puVar4" identifier = (binary_expression "*puVar4 + 0xfefefeff & ~*puVar4" (binary_expression "*puVar4 + 0xfefefeff" (pointer_expression "*puVar4" * identifier) + number_literal) & (unary_expression "~*puVar4" ~ (pointer_expression "*puVar4" * identifier)))) ;) (expression_statement "uVar2 = uVar1 & 0x80808080;" (assignment_expression "uVar2 = uVar1 & 0x80808080" identifier = (binary_expression "uVar1 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar5 = puVar4 + 1;" (assignment_expression "puVar5 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) ;) (expression_statement "bVar6 = (uVar1 & 0x8080) == 0;" (assignment_expression "bVar6 = (uVar1 & 0x8080) == 0" identifier = (binary_expression "(uVar1 & 0x8080) == 0" (parenthesized_expression "(uVar1 & 0x8080)" ( (binary_expression "uVar1 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar6) {\n    uVar2 = uVar2 >> 0x10;\n  }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n    uVar2 = uVar2 >> 0x10;\n  }" { (expression_statement "uVar2 = uVar2 >> 0x10;" (assignment_expression "uVar2 = uVar2 >> 0x10" identifier = (binary_expression "uVar2 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar6) {\n    puVar5 = (uint *)((int)puVar4 + 6);\n  }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n    puVar5 = (uint *)((int)puVar4 + 6);\n  }" { (expression_statement "puVar5 = (uint *)((int)puVar4 + 6);" (assignment_expression "puVar5 = (uint *)((int)puVar4 + 6)" identifier = (cast_expression "(uint *)((int)puVar4 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 6)" ( (binary_expression "(int)puVar4 + 6" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "response = MHD_create_response_from_buffer\n                       ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),\n                        message,MHD_RESPMEM_PERSISTENT);" (assignment_expression "response = MHD_create_response_from_buffer\n                       ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),\n                        message,MHD_RESPMEM_PERSISTENT)" identifier = (call_expression "MHD_create_response_from_buffer\n                       ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),\n                        message,MHD_RESPMEM_PERSISTENT)" identifier (argument_list "((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message),\n                        message,MHD_RESPMEM_PERSISTENT)" ( (binary_expression "(int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message)" ( (binary_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)message" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2))" ( (binary_expression "-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)" number_literal - (cast_expression "(uint)CARRY1((byte)uVar2,(byte)uVar2)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar2,(byte)uVar2)" identifier (argument_list "((byte)uVar2,(byte)uVar2)" ( (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) )) - (cast_expression "(int)message" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , identifier , identifier )))) ;) (if_statement "if (response == (MHD_Response *)0x0) {\n    connection->state = MHD_CONNECTION_CLOSED;\n    return;\n  }" if (parenthesized_expression "(response == (MHD_Response *)0x0)" ( (binary_expression "response == (MHD_Response *)0x0" identifier == (cast_expression "(MHD_Response *)0x0" ( (type_descriptor "MHD_Response *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    connection->state = MHD_CONNECTION_CLOSED;\n    return;\n  }" { (expression_statement "connection->state = MHD_CONNECTION_CLOSED;" (assignment_expression "connection->state = MHD_CONNECTION_CLOSED" (field_expression "connection->state" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "iVar3 = MHD_queue_response(connection,status_code,response);" (assignment_expression "iVar3 = MHD_queue_response(connection,status_code,response)" identifier = (call_expression "MHD_queue_response(connection,status_code,response)" identifier (argument_list "(connection,status_code,response)" ( identifier , identifier , identifier )))) ;) (expression_statement "MHD_destroy_response(response);" (call_expression "MHD_destroy_response(response)" identifier (argument_list "(response)" ( identifier ))) ;) (if_statement "if (iVar3 == 1) {\n    connection->keepalive = MHD_CONN_MUST_CLOSE;\n    iVar3 = build_header_response(connection);\n    if (iVar3 != 0) {\n      connection->state = MHD_CONNECTION_HEADERS_SENDING;\n      return;\n    }\n    format = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    format = "Closing connection (failed to queue response)\n";\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    connection->keepalive = MHD_CONN_MUST_CLOSE;\n    iVar3 = build_header_response(connection);\n    if (iVar3 != 0) {\n      connection->state = MHD_CONNECTION_HEADERS_SENDING;\n      return;\n    }\n    format = "Closing connection (failed to create response header)\n";\n  }" { (expression_statement "connection->keepalive = MHD_CONN_MUST_CLOSE;" (assignment_expression "connection->keepalive = MHD_CONN_MUST_CLOSE" (field_expression "connection->keepalive" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar3 = build_header_response(connection);" (assignment_expression "iVar3 = build_header_response(connection)" identifier = (call_expression "build_header_response(connection)" identifier (argument_list "(connection)" ( identifier )))) ;) (if_statement "if (iVar3 != 0) {\n      connection->state = MHD_CONNECTION_HEADERS_SENDING;\n      return;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      connection->state = MHD_CONNECTION_HEADERS_SENDING;\n      return;\n    }" { (expression_statement "connection->state = MHD_CONNECTION_HEADERS_SENDING;" (assignment_expression "connection->state = MHD_CONNECTION_HEADERS_SENDING" (field_expression "connection->state" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "format = "Closing connection (failed to create response header)\n";" (assignment_expression "format = "Closing connection (failed to create response header)\n"" identifier = (string_literal ""Closing connection (failed to create response header)\n"" " string_content escape_sequence ")) ;) }) (else_clause "else {\n    format = "Closing connection (failed to queue response)\n";\n  }" else (compound_statement "{\n    format = "Closing connection (failed to queue response)\n";\n  }" { (expression_statement "format = "Closing connection (failed to queue response)\n";" (assignment_expression "format = "Closing connection (failed to queue response)\n"" identifier = (string_literal ""Closing connection (failed to queue response)\n"" " string_content escape_sequence ")) ;) }))) (expression_statement "MHD_DLOG(connection->daemon,format);" (call_expression "MHD_DLOG(connection->daemon,format)" identifier (argument_list "(connection->daemon,format)" ( (field_expression "connection->daemon" identifier -> field_identifier) , identifier ))) ;) (expression_statement "MHD_connection_close_(connection,MHD_REQUEST_TERMINATED_WITH_ERROR);" (call_expression "MHD_connection_close_(connection,MHD_REQUEST_TERMINATED_WITH_ERROR)" identifier (argument_list "(connection,MHD_REQUEST_TERMINATED_WITH_ERROR)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00016610(int param_1,undefined4 param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00016610(int param_1,undefined4 param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00016610(int param_1,undefined4 param_2,uint *param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,uint *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "bool bVar8;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 0)" ( (binary_expression "*(int *)(param_1 + 0x3c) == 0" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }" { (expression_statement "*(char **)(param_1 + 0x3c) = "HTTP/1.0";" (assignment_expression "*(char **)(param_1 + 0x3c) = "HTTP/1.0"" (pointer_expression "*(char **)(param_1 + 0x3c)" * (cast_expression "(char **)(param_1 + 0x3c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (string_literal ""HTTP/1.0"" " string_content ")) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 9;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 9" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" * (cast_expression "(undefined4 *)(param_1 + 0xb4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 0xa9) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xa9) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xa9)" * (cast_expression "(undefined1 *)(param_1 + 0xa9)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa9)" ( (binary_expression "param_1 + 0xa9" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);" (call_expression "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , (string_literal ""Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n"" " string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "puVar7 = param_3;" (assignment_expression "puVar7 = param_3" identifier = identifier) ;) (if_statement "if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x24) != 0)" ( (binary_expression "*(int *)(param_1 + 0x24) != 0" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }" { (expression_statement "MHD_destroy_response(*(int *)(param_1 + 0x24));" (call_expression "MHD_destroy_response(*(int *)(param_1 + 0x24))" identifier (argument_list "(*(int *)(param_1 + 0x24))" ( (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) })) (do_statement "do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);" do (compound_statement "{\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  }" { (expression_statement "puVar6 = puVar7;" (assignment_expression "puVar6 = puVar7" identifier = identifier) ;) (expression_statement "uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;" (assignment_expression "uVar1 = *puVar6 + 0xfefefeff & ~*puVar6" identifier = (binary_expression "*puVar6 + 0xfefefeff & ~*puVar6" (binary_expression "*puVar6 + 0xfefefeff" (pointer_expression "*puVar6" * identifier) + number_literal) & (unary_expression "~*puVar6" ~ (pointer_expression "*puVar6" * identifier)))) ;) (expression_statement "uVar2 = uVar1 & 0x80808080;" (assignment_expression "uVar2 = uVar1 & 0x80808080" identifier = (binary_expression "uVar1 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar7 = puVar6 + 1;" (assignment_expression "puVar7 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) ;) (expression_statement "bVar8 = (uVar1 & 0x8080) == 0;" (assignment_expression "bVar8 = (uVar1 & 0x8080) == 0" identifier = (binary_expression "(uVar1 & 0x8080) == 0" (parenthesized_expression "(uVar1 & 0x8080)" ( (binary_expression "uVar1 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    uVar2 = uVar2 >> 0x10;\n  }" { (expression_statement "uVar2 = uVar2 >> 0x10;" (assignment_expression "uVar2 = uVar2 >> 0x10" identifier = (binary_expression "uVar2 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }" { (expression_statement "puVar7 = (uint *)((int)puVar6 + 6);" (assignment_expression "puVar7 = (uint *)((int)puVar6 + 6)" identifier = (cast_expression "(uint *)((int)puVar6 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + 6)" ( (binary_expression "(int)puVar6 + 6" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);" (assignment_expression "iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" identifier = (call_expression "MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" identifier (argument_list "((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" ( (binary_expression "(int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3)" (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3)" ( (binary_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2))" ( (binary_expression "-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)" number_literal - (cast_expression "(uint)CARRY1((byte)uVar2,(byte)uVar2)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar2,(byte)uVar2)" identifier (argument_list "((byte)uVar2,(byte)uVar2)" ( (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) )) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , identifier , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 0x13;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 0x13" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" * (cast_expression "(undefined4 *)(param_1 + 0xb4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "iVar4 = MHD_queue_response(param_1,param_2,iVar3);" (assignment_expression "iVar4 = MHD_queue_response(param_1,param_2,iVar3)" identifier = (call_expression "MHD_queue_response(param_1,param_2,iVar3)" identifier (argument_list "(param_1,param_2,iVar3)" ( identifier , identifier , identifier )))) ;) (expression_statement "MHD_destroy_response(iVar3);" (call_expression "MHD_destroy_response(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (if_statement "if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x40) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x40) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x40)" * (cast_expression "(undefined4 *)(param_1 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = FUN_000140f0();" (assignment_expression "iVar3 = FUN_000140f0()" identifier = (call_expression "FUN_000140f0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }" { (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 10;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 10" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" * (cast_expression "(undefined4 *)(param_1 + 0xb4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar5 = "Closing connection (failed to create response header)\n";" (assignment_expression "pcVar5 = "Closing connection (failed to create response header)\n"" identifier = (string_literal ""Closing connection (failed to create response header)\n"" " string_content escape_sequence ")) ;) }) (else_clause "else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" else (compound_statement "{\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" { (expression_statement "pcVar5 = "Closing connection (failed to queue response)\n";" (assignment_expression "pcVar5 = "Closing connection (failed to queue response)\n"" identifier = (string_literal ""Closing connection (failed to queue response)\n"" " string_content escape_sequence ")) ;) }))) (expression_statement "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);" (call_expression "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x18),pcVar5)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "FUN_00015170(param_1,1);" (call_expression "FUN_00015170(param_1,1)" identifier (argument_list "(param_1,1)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (string_literal " string_content ")) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content escape_sequence string_content escape_sequence ") , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) & (unary_expression ~ (pointer_expression * IDENT)))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) })) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))))) )) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (string_literal " string_content escape_sequence ")) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content escape_sequence ")) ;) }))) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00016610(int param_1,undefined4 param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00016610(int param_1,undefined4 param_2,uint *param_3)" (identifier "FUN_00016610") (parameter_list "(int param_1,undefined4 param_2,uint *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  uint *puVar6;\n  uint *puVar7;\n  bool bVar8;\n  \n  if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }\n  *(undefined4 *)(param_1 + 0xb4) = 9;\n  *(undefined1 *)(param_1 + 0xa9) = 1;\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);\n  puVar7 = param_3;\n  if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }\n  do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);\n  bVar8 = (uVar1 & 0x8080) == 0;\n  if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }\n  iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);\n  if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }\n  iVar4 = MHD_queue_response(param_1,param_2,iVar3);\n  MHD_destroy_response(iVar3);\n  if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }\n  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);\n  FUN_00015170(param_1,1);\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "uint *puVar6;" (type_identifier "uint") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "uint *puVar7;" (type_identifier "uint") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "bool bVar8;" (primitive_type "bool") (identifier "bVar8") (; ";")) (if_statement "if (*(int *)(param_1 + 0x3c) == 0) {\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x3c) == 0" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(char **)(param_1 + 0x3c) = "HTTP/1.0";\n  }" ({ "{") (expression_statement "*(char **)(param_1 + 0x3c) = "HTTP/1.0";" (assignment_expression "*(char **)(param_1 + 0x3c) = "HTTP/1.0"" (pointer_expression "*(char **)(param_1 + 0x3c)" (* "*") (cast_expression "(char **)(param_1 + 0x3c)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (string_literal ""HTTP/1.0"" (" """) (string_content "HTTP/1.0") (" """))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 9;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 9" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xb4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb4)" (( "(") (binary_expression "param_1 + 0xb4" (identifier "param_1") (+ "+") (number_literal "0xb4")) () ")")))) (= "=") (number_literal "9")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0xa9) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xa9) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xa9)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0xa9)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa9)" (( "(") (binary_expression "param_1 + 0xa9" (identifier "param_1") (+ "+") (number_literal "0xa9")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3);" (call_expression "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3)" (identifier "FUN_00020aa0") (argument_list "(*(undefined4 *)(param_1 + 0x18),\n               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",\n               param_2,param_3)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (, ",") (string_literal ""Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n"" (" """) (string_content "Error processing request (HTTP response code is %u (`%s") (escape_sequence "\'") (string_content ")). Closing connection.") (escape_sequence "\n") (" """)) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "puVar7 = param_3;" (assignment_expression "puVar7 = param_3" (identifier "puVar7") (= "=") (identifier "param_3")) (; ";")) (if_statement "if (*(int *)(param_1 + 0x24) != 0) {\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x24) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x24) != 0" (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    MHD_destroy_response(*(int *)(param_1 + 0x24));\n    *(undefined4 *)(param_1 + 0x24) = 0;\n  }" ({ "{") (expression_statement "MHD_destroy_response(*(int *)(param_1 + 0x24));" (call_expression "MHD_destroy_response(*(int *)(param_1 + 0x24))" (identifier "MHD_destroy_response") (argument_list "(*(int *)(param_1 + 0x24))" (( "(") (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (do_statement "do {\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  } while (uVar2 == 0);" (do "do") (compound_statement "{\n    puVar6 = puVar7;\n    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;\n    uVar2 = uVar1 & 0x80808080;\n    puVar7 = puVar6 + 1;\n  }" ({ "{") (expression_statement "puVar6 = puVar7;" (assignment_expression "puVar6 = puVar7" (identifier "puVar6") (= "=") (identifier "puVar7")) (; ";")) (expression_statement "uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;" (assignment_expression "uVar1 = *puVar6 + 0xfefefeff & ~*puVar6" (identifier "uVar1") (= "=") (binary_expression "*puVar6 + 0xfefefeff & ~*puVar6" (binary_expression "*puVar6 + 0xfefefeff" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (+ "+") (number_literal "0xfefefeff")) (& "&") (unary_expression "~*puVar6" (~ "~") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))))) (; ";")) (expression_statement "uVar2 = uVar1 & 0x80808080;" (assignment_expression "uVar2 = uVar1 & 0x80808080" (identifier "uVar2") (= "=") (binary_expression "uVar1 & 0x80808080" (identifier "uVar1") (& "&") (number_literal "0x80808080"))) (; ";")) (expression_statement "puVar7 = puVar6 + 1;" (assignment_expression "puVar7 = puVar6 + 1" (identifier "puVar7") (= "=") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar2 == 0)" (( "(") (binary_expression "uVar2 == 0" (identifier "uVar2") (== "==") (number_literal "0")) () ")")) (; ";")) (expression_statement "bVar8 = (uVar1 & 0x8080) == 0;" (assignment_expression "bVar8 = (uVar1 & 0x8080) == 0" (identifier "bVar8") (= "=") (binary_expression "(uVar1 & 0x8080) == 0" (parenthesized_expression "(uVar1 & 0x8080)" (( "(") (binary_expression "uVar1 & 0x8080" (identifier "uVar1") (& "&") (number_literal "0x8080")) () ")")) (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar8) {\n    uVar2 = uVar2 >> 0x10;\n  }" (if "if") (parenthesized_expression "(bVar8)" (( "(") (identifier "bVar8") () ")")) (compound_statement "{\n    uVar2 = uVar2 >> 0x10;\n  }" ({ "{") (expression_statement "uVar2 = uVar2 >> 0x10;" (assignment_expression "uVar2 = uVar2 >> 0x10" (identifier "uVar2") (= "=") (binary_expression "uVar2 >> 0x10" (identifier "uVar2") (>> ">>") (number_literal "0x10"))) (; ";")) (} "}"))) (if_statement "if (bVar8) {\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }" (if "if") (parenthesized_expression "(bVar8)" (( "(") (identifier "bVar8") () ")")) (compound_statement "{\n    puVar7 = (uint *)((int)puVar6 + 6);\n  }" ({ "{") (expression_statement "puVar7 = (uint *)((int)puVar6 + 6);" (assignment_expression "puVar7 = (uint *)((int)puVar6 + 6)" (identifier "puVar7") (= "=") (cast_expression "(uint *)((int)puVar6 + 6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar6 + 6)" (( "(") (binary_expression "(int)puVar6 + 6" (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6")) (+ "+") (number_literal "6")) () ")")))) (; ";")) (} "}"))) (expression_statement "iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0);" (assignment_expression "iVar3 = MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" (identifier "iVar3") (= "=") (call_expression "MHD_create_response_from_buffer\n                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" (identifier "MHD_create_response_from_buffer") (argument_list "((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),\n                     param_3,0)" (( "(") (binary_expression "(int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3)" (cast_expression "(int)puVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar7")) (+ "+") (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3)" (( "(") (binary_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2))" (( "(") (binary_expression "-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)" (number_literal "-3") (- "-") (cast_expression "(uint)CARRY1((byte)uVar2,(byte)uVar2)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CARRY1((byte)uVar2,(byte)uVar2)" (identifier "CARRY1") (argument_list "((byte)uVar2,(byte)uVar2)" (( "(") (cast_expression "(byte)uVar2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar2")) (, ",") (cast_expression "(byte)uVar2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar2")) () ")"))))) () ")")) (- "-") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3"))) () ")"))) (, ",") (identifier "param_3") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0xb4) = 0x13;\n    return;\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 0x13;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 0x13" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xb4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb4)" (( "(") (binary_expression "param_1 + 0xb4" (identifier "param_1") (+ "+") (number_literal "0xb4")) () ")")))) (= "=") (number_literal "0x13")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar4 = MHD_queue_response(param_1,param_2,iVar3);" (assignment_expression "iVar4 = MHD_queue_response(param_1,param_2,iVar3)" (identifier "iVar4") (= "=") (call_expression "MHD_queue_response(param_1,param_2,iVar3)" (identifier "MHD_queue_response") (argument_list "(param_1,param_2,iVar3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "MHD_destroy_response(iVar3);" (call_expression "MHD_destroy_response(iVar3)" (identifier "MHD_destroy_response") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (if_statement "if (iVar4 == 1) {\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }\n  else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" (if "if") (parenthesized_expression "(iVar4 == 1)" (( "(") (binary_expression "iVar4 == 1" (identifier "iVar4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;\n    iVar3 = FUN_000140f0();\n    if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }\n    pcVar5 = "Closing connection (failed to create response header)\n";\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x40) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x40) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x40)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x40)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "iVar3 = FUN_000140f0();" (assignment_expression "iVar3 = FUN_000140f0()" (identifier "iVar3") (= "=") (call_expression "FUN_000140f0()" (identifier "FUN_000140f0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined4 *)(param_1 + 0xb4) = 10;\n      return;\n    }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0xb4) = 10;" (assignment_expression "*(undefined4 *)(param_1 + 0xb4) = 10" (pointer_expression "*(undefined4 *)(param_1 + 0xb4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xb4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb4)" (( "(") (binary_expression "param_1 + 0xb4" (identifier "param_1") (+ "+") (number_literal "0xb4")) () ")")))) (= "=") (number_literal "10")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "pcVar5 = "Closing connection (failed to create response header)\n";" (assignment_expression "pcVar5 = "Closing connection (failed to create response header)\n"" (identifier "pcVar5") (= "=") (string_literal ""Closing connection (failed to create response header)\n"" (" """) (string_content "Closing connection (failed to create response header)") (escape_sequence "\n") (" """))) (; ";")) (} "}")) (else_clause "else {\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" (else "else") (compound_statement "{\n    pcVar5 = "Closing connection (failed to queue response)\n";\n  }" ({ "{") (expression_statement "pcVar5 = "Closing connection (failed to queue response)\n";" (assignment_expression "pcVar5 = "Closing connection (failed to queue response)\n"" (identifier "pcVar5") (= "=") (string_literal ""Closing connection (failed to queue response)\n"" (" """) (string_content "Closing connection (failed to queue response)") (escape_sequence "\n") (" """))) (; ";")) (} "}")))) (expression_statement "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);" (call_expression "FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5)" (identifier "FUN_00020aa0") (argument_list "(*(undefined4 *)(param_1 + 0x18),pcVar5)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (, ",") (identifier "pcVar5") () ")"))) (; ";")) (expression_statement "FUN_00015170(param_1,1);" (call_expression "FUN_00015170(param_1,1)" (identifier "FUN_00015170") (argument_list "(param_1,1)" (( "(") (identifier "param_1") (, ",") (number_literal "1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "MHD_FLAG": Some values do not have unique names */
/* WARNING: Enum "gnutls_pk_algorithm_t": Some values do not have unique names */
/* WARNING: Enum "gnutls_certificate_type_t": Some values do not have unique names */

void __regparm3 function_1(type_1 *connection,type_2 status_code,char *message)

{
  type_2 var_3;
  type_2 var_5;
  type_3 *var_8;
  int var_10;
  char *format;
  type_2 *var_4;
  type_2 *puVar5;
  bool bVar6;
  
  if (connection->version == (char *)0x0) {
    connection->version = "HTTP/1.0";
  }
  connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
  connection->read_closed = true;
  var_1(connection->daemon,
           "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",
           status_code,message);
  puVar5 = (type_2 *)message;
  if (connection->var_8 != (type_3 *)0x0) {
    var_2(connection->var_8);
    connection->var_8 = (type_3 *)0x0;
  }
  do {
    var_4 = puVar5;
    var_3 = *var_4 + 0xfefefeff & ~*var_4;
    var_5 = var_3 & 0x80808080;
    puVar5 = var_4 + 1;
  } while (var_5 == 0);
  bVar6 = (var_3 & 0x8080) == 0;
  if (bVar6) {
    var_5 = var_5 >> 0x10;
  }
  if (bVar6) {
    puVar5 = (type_2 *)((int)var_4 + 6);
  }
  var_8 = var_6
                       ((int)puVar5 + ((-3 - (type_2)var_7((type_4)var_5,(type_4)var_5)) - (int)message),
                        message,MHD_RESPMEM_PERSISTENT);
  if (var_8 == (type_3 *)0x0) {
    connection->state = MHD_CONNECTION_CLOSED;
    return;
  }
  var_10 = var_9(connection,status_code,var_8);
  var_2(var_8);
  if (var_10 == 1) {
    connection->keepalive = MHD_CONN_MUST_CLOSE;
    var_10 = var_11(connection);
    if (var_10 != 0) {
      connection->state = MHD_CONNECTION_HEADERS_SENDING;
      return;
    }
    format = "Closing connection (failed to create response header)\n";
  }
  else {
    format = "Closing connection (failed to queue response)\n";
  }
  var_1(connection->daemon,format);
  var_12(connection,MHD_REQUEST_TERMINATED_WITH_ERROR);
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (string_literal (string_content)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence)) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)) right: (unary_expression argument: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content) (escape_sequence))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content) (escape_sequence))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 MASKED(int param_1,undefined4 param_2,uint *param_3)

{
  uint uVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  char *pcVar5;
  uint *puVar6;
  uint *puVar7;
  bool bVar8;
  
  if (*(int *)(param_1 + 0x3c) == 0) {
    *(char **)(param_1 + 0x3c) = "HTTP/1.0";
  }
  *(undefined4 *)(param_1 + 0xb4) = 9;
  *(undefined1 *)(param_1 + 0xa9) = 1;
  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),
               "Error processing request (HTTP response code is %u (`%s\')). Closing connection.\n",
               param_2,param_3);
  puVar7 = param_3;
  if (*(int *)(param_1 + 0x24) != 0) {
    MHD_destroy_response(*(int *)(param_1 + 0x24));
    *(undefined4 *)(param_1 + 0x24) = 0;
  }
  do {
    puVar6 = puVar7;
    uVar1 = *puVar6 + 0xfefefeff & ~*puVar6;
    uVar2 = uVar1 & 0x80808080;
    puVar7 = puVar6 + 1;
  } while (uVar2 == 0);
  bVar8 = (uVar1 & 0x8080) == 0;
  if (bVar8) {
    uVar2 = uVar2 >> 0x10;
  }
  if (bVar8) {
    puVar7 = (uint *)((int)puVar6 + 6);
  }
  iVar3 = MHD_create_response_from_buffer
                    ((int)puVar7 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)param_3),
                     param_3,0);
  if (iVar3 == 0) {
    *(undefined4 *)(param_1 + 0xb4) = 0x13;
    return;
  }
  iVar4 = MHD_queue_response(param_1,param_2,iVar3);
  MHD_destroy_response(iVar3);
  if (iVar4 == 1) {
    *(undefined4 *)(param_1 + 0x40) = 0xffffffff;
    iVar3 = FUN_000140f0();
    if (iVar3 != 0) {
      *(undefined4 *)(param_1 + 0xb4) = 10;
      return;
    }
    pcVar5 = "Closing connection (failed to create response header)\n";
  }
  else {
    pcVar5 = "Closing connection (failed to queue response)\n";
  }
  FUN_00020aa0(*(undefined4 *)(param_1 + 0x18),pcVar5);
  FUN_00015170(param_1,1);
  return;
}

