
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

_Bool remote_to_utf8(iri *iri,char *str,char **new)

{
  char cVar1;
  _Bool _Var2;
  int iVar3;
  char *pcVar4;
  char *in_org;
  char *out;
  
  pcVar4 = iri->uri_encoding;
  if (pcVar4 != (char *)0x0) {
    out = "UTF-8";
    iVar3 = c_strcasecmp(pcVar4,"UTF-8");
    if (iVar3 != 0) {
      in_org = (char *)strlen(str);
      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);
      pcVar4 = *new;
      if (pcVar4 == (char *)0x0) {
        return _Var2;
      }
      iVar3 = strcmp(str,pcVar4);
      if (iVar3 != 0) {
        return _Var2;
      }
      free(pcVar4);
      *new = (char *)0x0;
      return false;
    }
    cVar1 = *str;
    pcVar4 = str;
    while (cVar1 != '\0') {
      if (cVar1 < '\0') {
        pcVar4 = strdup(str);
        *new = pcVar4;
        return true;
      }
      pcVar4 = pcVar4 + 1;
      cVar1 = *pcVar4;
    }
  }
  return false;
}



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

undefined4 FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  undefined4 uVar4;
  
  if (*param_1 != 0) {
    iVar2 = FUN_00059550(*param_1,"UTF-8");
    if (iVar2 != 0) {
      strlen(param_2);
      uVar4 = FUN_000550c0(param_3);
      pcVar3 = (char *)*param_3;
      if (pcVar3 == (char *)0x0) {
        return uVar4;
      }
      iVar2 = strcmp(param_2,pcVar3);
      if (iVar2 != 0) {
        return uVar4;
      }
      free(pcVar3);
      *param_3 = 0;
      return 0;
    }
    cVar1 = *param_2;
    pcVar3 = param_2;
    while (cVar1 != '\0') {
      if (cVar1 < '\0') {
        pcVar3 = strdup(param_2);
        *param_3 = pcVar3;
        return 1;
      }
      pcVar3 = pcVar3 + 1;
      cVar1 = *pcVar3;
    }
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000190b0
ADD EBX,0x59407
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x20]
MOV ESI,dword ptr [ESP + 0x24]
MOV EDI,dword ptr [EAX]
TEST EDI,EDI
JZ 0x00055812
SUB ESP,0x8
LEA EAX,[EBX + 0xfffe088a]
PUSH EAX
PUSH EDI
CALL 0x00059550
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00055848
CMP byte ptr [ESI],0x0
JZ 0x00055812
JS 0x00055820
MOV EAX,ESI
JMP 0x0005580a
JS 0x00055820
ADD EAX,0x1
CMP byte ptr [EAX],0x0
JNZ 0x00055808
XOR EDI,EDI
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
MOV EDI,0x1
PUSH ESI
CALL 0x00016e60
MOV EDX,dword ptr [ESP + 0x38]
ADD ESP,0x10
MOV dword ptr [EDX],EAX
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH ESI
CALL 0x000168c0
POP EDX
PUSH dword ptr [ESP + 0x34]
MOV EDX,ESI
MOV ECX,EAX
MOV EAX,EDI
CALL 0x000550c0
MOV EDI,EAX
MOV EAX,dword ptr [ESP + 0x38]
ADD ESP,0x10
MOV EBP,dword ptr [EAX]
TEST EBP,EBP
JZ 0x00055814
SUB ESP,0x8
PUSH EBP
PUSH ESI
CALL 0x00016f78
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00055814
SUB ESP,0xc
XOR EDI,EDI
PUSH EBP
CALL 0x00016670
MOV EAX,dword ptr [ESP + 0x38]
ADD ESP,0x10
MOV dword ptr [EAX],0x0
JMP 0x00055814
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)" identifier (parameter_list "(int *param_1,char *param_2,undefined4 *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (if_statement "if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }" if (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) )) (compound_statement "{\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }" { (expression_statement "iVar2 = FUN_00059550(*param_1,"UTF-8");" (assignment_expression "iVar2 = FUN_00059550(*param_1,"UTF-8")" identifier = (call_expression "FUN_00059550(*param_1,"UTF-8")" identifier (argument_list "(*param_1,"UTF-8")" ( (pointer_expression "*param_1" * identifier) , (string_literal ""UTF-8"" " string_content ") )))) ;) (if_statement "if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }" { (expression_statement "strlen(param_2);" (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (expression_statement "uVar4 = FUN_000550c0(param_3);" (assignment_expression "uVar4 = FUN_000550c0(param_3)" identifier = (call_expression "FUN_000550c0(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)*param_3;" (assignment_expression "pcVar3 = (char *)*param_3" identifier = (cast_expression "(char *)*param_3" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return uVar4;\n      }" { (return_statement "return uVar4;" return identifier ;) })) (expression_statement "iVar2 = strcmp(param_2,pcVar3);" (assignment_expression "iVar2 = strcmp(param_2,pcVar3)" identifier = (call_expression "strcmp(param_2,pcVar3)" identifier (argument_list "(param_2,pcVar3)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        return uVar4;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return uVar4;\n      }" { (return_statement "return uVar4;" return identifier ;) })) (expression_statement "free(pcVar3);" (call_expression "free(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pcVar3 = param_2;" (assignment_expression "pcVar3 = param_2" identifier = identifier) ;) (while_statement "while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }" while (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }" { (if_statement "if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }" if (parenthesized_expression "(cVar1 < '\0')" ( (binary_expression "cVar1 < '\0'" identifier < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }" { (expression_statement "pcVar3 = strdup(param_2);" (assignment_expression "pcVar3 = strdup(param_2)" identifier = (call_expression "strdup(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*param_3 = pcVar3;" (assignment_expression "*param_3 = pcVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar1 = *pcVar3;" (assignment_expression "cVar1 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\n_Bool remote_to_utf8(iri *iri,char *str,char **new)\n\n{\n  char cVar1;\n  _Bool _Var2;\n  int iVar3;\n  char *pcVar4;\n  char *in_org;\n  char *out;\n  \n  pcVar4 = iri->uri_encoding;\n  if (pcVar4 != (char *)0x0) {\n    out = "UTF-8";\n    iVar3 = c_strcasecmp(pcVar4,"UTF-8");\n    if (iVar3 != 0) {\n      in_org = (char *)strlen(str);\n      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);\n      pcVar4 = *new;\n      if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }\n      iVar3 = strcmp(str,pcVar4);\n      if (iVar3 != 0) {\n        return _Var2;\n      }\n      free(pcVar4);\n      *new = (char *)0x0;\n      return false;\n    }\n    cVar1 = *str;\n    pcVar4 = str;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }\n      pcVar4 = pcVar4 + 1;\n      cVar1 = *pcVar4;\n    }\n  }\n  return false;\n}\n\n" comment comment (function_definition "_Bool remote_to_utf8(iri *iri,char *str,char **new)\n\n{\n  char cVar1;\n  _Bool _Var2;\n  int iVar3;\n  char *pcVar4;\n  char *in_org;\n  char *out;\n  \n  pcVar4 = iri->uri_encoding;\n  if (pcVar4 != (char *)0x0) {\n    out = "UTF-8";\n    iVar3 = c_strcasecmp(pcVar4,"UTF-8");\n    if (iVar3 != 0) {\n      in_org = (char *)strlen(str);\n      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);\n      pcVar4 = *new;\n      if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }\n      iVar3 = strcmp(str,pcVar4);\n      if (iVar3 != 0) {\n        return _Var2;\n      }\n      free(pcVar4);\n      *new = (char *)0x0;\n      return false;\n    }\n    cVar1 = *str;\n    pcVar4 = str;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }\n      pcVar4 = pcVar4 + 1;\n      cVar1 = *pcVar4;\n    }\n  }\n  return false;\n}" type_identifier (function_declarator "remote_to_utf8(iri *iri,char *str,char **new)" identifier (parameter_list "(iri *iri,char *str,char **new)" ( (parameter_declaration "iri *iri" type_identifier (pointer_declarator "*iri" * identifier)) , (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) , (parameter_declaration "char **new" primitive_type (pointer_declarator "**new" * (pointer_declarator "*new" * identifier))) ))) (compound_statement "{\n  char cVar1;\n  _Bool _Var2;\n  int iVar3;\n  char *pcVar4;\n  char *in_org;\n  char *out;\n  \n  pcVar4 = iri->uri_encoding;\n  if (pcVar4 != (char *)0x0) {\n    out = "UTF-8";\n    iVar3 = c_strcasecmp(pcVar4,"UTF-8");\n    if (iVar3 != 0) {\n      in_org = (char *)strlen(str);\n      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);\n      pcVar4 = *new;\n      if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }\n      iVar3 = strcmp(str,pcVar4);\n      if (iVar3 != 0) {\n        return _Var2;\n      }\n      free(pcVar4);\n      *new = (char *)0x0;\n      return false;\n    }\n    cVar1 = *str;\n    pcVar4 = str;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }\n      pcVar4 = pcVar4 + 1;\n      cVar1 = *pcVar4;\n    }\n  }\n  return false;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "_Bool _Var2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *in_org;" primitive_type (pointer_declarator "*in_org" * identifier) ;) (declaration "char *out;" primitive_type (pointer_declarator "*out" * identifier) ;) (expression_statement "pcVar4 = iri->uri_encoding;" (assignment_expression "pcVar4 = iri->uri_encoding" identifier = (field_expression "iri->uri_encoding" identifier -> field_identifier)) ;) (if_statement "if (pcVar4 != (char *)0x0) {\n    out = "UTF-8";\n    iVar3 = c_strcasecmp(pcVar4,"UTF-8");\n    if (iVar3 != 0) {\n      in_org = (char *)strlen(str);\n      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);\n      pcVar4 = *new;\n      if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }\n      iVar3 = strcmp(str,pcVar4);\n      if (iVar3 != 0) {\n        return _Var2;\n      }\n      free(pcVar4);\n      *new = (char *)0x0;\n      return false;\n    }\n    cVar1 = *str;\n    pcVar4 = str;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }\n      pcVar4 = pcVar4 + 1;\n      cVar1 = *pcVar4;\n    }\n  }" if (parenthesized_expression "(pcVar4 != (char *)0x0)" ( (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    out = "UTF-8";\n    iVar3 = c_strcasecmp(pcVar4,"UTF-8");\n    if (iVar3 != 0) {\n      in_org = (char *)strlen(str);\n      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);\n      pcVar4 = *new;\n      if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }\n      iVar3 = strcmp(str,pcVar4);\n      if (iVar3 != 0) {\n        return _Var2;\n      }\n      free(pcVar4);\n      *new = (char *)0x0;\n      return false;\n    }\n    cVar1 = *str;\n    pcVar4 = str;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }\n      pcVar4 = pcVar4 + 1;\n      cVar1 = *pcVar4;\n    }\n  }" { (expression_statement "out = "UTF-8";" (assignment_expression "out = "UTF-8"" identifier = (string_literal ""UTF-8"" " string_content ")) ;) (expression_statement "iVar3 = c_strcasecmp(pcVar4,"UTF-8");" (assignment_expression "iVar3 = c_strcasecmp(pcVar4,"UTF-8")" identifier = (call_expression "c_strcasecmp(pcVar4,"UTF-8")" identifier (argument_list "(pcVar4,"UTF-8")" ( identifier , (string_literal ""UTF-8"" " string_content ") )))) ;) (if_statement "if (iVar3 != 0) {\n      in_org = (char *)strlen(str);\n      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);\n      pcVar4 = *new;\n      if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }\n      iVar3 = strcmp(str,pcVar4);\n      if (iVar3 != 0) {\n        return _Var2;\n      }\n      free(pcVar4);\n      *new = (char *)0x0;\n      return false;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      in_org = (char *)strlen(str);\n      _Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);\n      pcVar4 = *new;\n      if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }\n      iVar3 = strcmp(str,pcVar4);\n      if (iVar3 != 0) {\n        return _Var2;\n      }\n      free(pcVar4);\n      *new = (char *)0x0;\n      return false;\n    }" { (expression_statement "in_org = (char *)strlen(str);" (assignment_expression "in_org = (char *)strlen(str)" identifier = (cast_expression "(char *)strlen(str)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "strlen(str)" identifier (argument_list "(str)" ( identifier ))))) ;) (expression_statement "_Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out);" (assignment_expression "_Var2 = do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out)" identifier = (call_expression "do_conversion(pcVar4,str,in_org,(size_t)new,(char **)out)" identifier (argument_list "(pcVar4,str,in_org,(size_t)new,(char **)out)" ( identifier , identifier , identifier , (cast_expression "(size_t)new" ( (type_descriptor "size_t" primitive_type) ) identifier) , (cast_expression "(char **)out" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier) )))) ;) (expression_statement "pcVar4 = *new;" (assignment_expression "pcVar4 = *new" identifier = (pointer_expression "*new" * identifier)) ;) (if_statement "if (pcVar4 == (char *)0x0) {\n        return _Var2;\n      }" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return _Var2;\n      }" { (return_statement "return _Var2;" return identifier ;) })) (expression_statement "iVar3 = strcmp(str,pcVar4);" (assignment_expression "iVar3 = strcmp(str,pcVar4)" identifier = (call_expression "strcmp(str,pcVar4)" identifier (argument_list "(str,pcVar4)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n        return _Var2;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        return _Var2;\n      }" { (return_statement "return _Var2;" return identifier ;) })) (expression_statement "free(pcVar4);" (call_expression "free(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (expression_statement "*new = (char *)0x0;" (assignment_expression "*new = (char *)0x0" (pointer_expression "*new" * identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return false;" return false ;) })) (expression_statement "cVar1 = *str;" (assignment_expression "cVar1 = *str" identifier = (pointer_expression "*str" * identifier)) ;) (expression_statement "pcVar4 = str;" (assignment_expression "pcVar4 = str" identifier = identifier) ;) (while_statement "while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }\n      pcVar4 = pcVar4 + 1;\n      cVar1 = *pcVar4;\n    }" while (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }\n      pcVar4 = pcVar4 + 1;\n      cVar1 = *pcVar4;\n    }" { (if_statement "if (cVar1 < '\0') {\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }" if (parenthesized_expression "(cVar1 < '\0')" ( (binary_expression "cVar1 < '\0'" identifier < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        pcVar4 = strdup(str);\n        *new = pcVar4;\n        return true;\n      }" { (expression_statement "pcVar4 = strdup(str);" (assignment_expression "pcVar4 = strdup(str)" identifier = (call_expression "strdup(str)" identifier (argument_list "(str)" ( identifier )))) ;) (expression_statement "*new = pcVar4;" (assignment_expression "*new = pcVar4" (pointer_expression "*new" * identifier) = identifier) ;) (return_statement "return true;" return true ;) })) (expression_statement "pcVar4 = pcVar4 + 1;" (assignment_expression "pcVar4 = pcVar4 + 1" identifier = (binary_expression "pcVar4 + 1" identifier + number_literal)) ;) (expression_statement "cVar1 = *pcVar4;" (assignment_expression "cVar1 = *pcVar4" identifier = (pointer_expression "*pcVar4" * identifier)) ;) })) })) (return_statement "return false;" return false ;) })))
(translation_unit "undefined4 FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)" identifier (parameter_list "(int *param_1,char *param_2,undefined4 *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (if_statement "if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }" if (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) )) (compound_statement "{\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }" { (expression_statement "iVar2 = FUN_00059550(*param_1,"UTF-8");" (assignment_expression "iVar2 = FUN_00059550(*param_1,"UTF-8")" identifier = (call_expression "FUN_00059550(*param_1,"UTF-8")" identifier (argument_list "(*param_1,"UTF-8")" ( (pointer_expression "*param_1" * identifier) , (string_literal ""UTF-8"" " string_content ") )))) ;) (if_statement "if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }" { (expression_statement "strlen(param_2);" (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (expression_statement "uVar4 = FUN_000550c0(param_3);" (assignment_expression "uVar4 = FUN_000550c0(param_3)" identifier = (call_expression "FUN_000550c0(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)*param_3;" (assignment_expression "pcVar3 = (char *)*param_3" identifier = (cast_expression "(char *)*param_3" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return uVar4;\n      }" { (return_statement "return uVar4;" return identifier ;) })) (expression_statement "iVar2 = strcmp(param_2,pcVar3);" (assignment_expression "iVar2 = strcmp(param_2,pcVar3)" identifier = (call_expression "strcmp(param_2,pcVar3)" identifier (argument_list "(param_2,pcVar3)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        return uVar4;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return uVar4;\n      }" { (return_statement "return uVar4;" return identifier ;) })) (expression_statement "free(pcVar3);" (call_expression "free(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pcVar3 = param_2;" (assignment_expression "pcVar3 = param_2" identifier = identifier) ;) (while_statement "while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }" while (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }" { (if_statement "if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }" if (parenthesized_expression "(cVar1 < '\0')" ( (binary_expression "cVar1 < '\0'" identifier < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }" { (expression_statement "pcVar3 = strdup(param_2);" (assignment_expression "pcVar3 = strdup(param_2)" identifier = (call_expression "strdup(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*param_3 = pcVar3;" (assignment_expression "*param_3 = pcVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar1 = *pcVar3;" (assignment_expression "cVar1 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_000557c0(int *param_1,char *param_2,undefined4 *param_3)" (identifier "FUN_000557c0") (parameter_list "(int *param_1,char *param_2,undefined4 *param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  \n  if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (if_statement "if (*param_1 != 0) {\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }" (if "if") (parenthesized_expression "(*param_1 != 0)" (( "(") (binary_expression "*param_1 != 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = FUN_00059550(*param_1,"UTF-8");\n    if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }\n    cVar1 = *param_2;\n    pcVar3 = param_2;\n    while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }\n  }" ({ "{") (expression_statement "iVar2 = FUN_00059550(*param_1,"UTF-8");" (assignment_expression "iVar2 = FUN_00059550(*param_1,"UTF-8")" (identifier "iVar2") (= "=") (call_expression "FUN_00059550(*param_1,"UTF-8")" (identifier "FUN_00059550") (argument_list "(*param_1,"UTF-8")" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (string_literal ""UTF-8"" (" """) (string_content "UTF-8") (" """)) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      strlen(param_2);\n      uVar4 = FUN_000550c0(param_3);\n      pcVar3 = (char *)*param_3;\n      if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }\n      iVar2 = strcmp(param_2,pcVar3);\n      if (iVar2 != 0) {\n        return uVar4;\n      }\n      free(pcVar3);\n      *param_3 = 0;\n      return 0;\n    }" ({ "{") (expression_statement "strlen(param_2);" (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (expression_statement "uVar4 = FUN_000550c0(param_3);" (assignment_expression "uVar4 = FUN_000550c0(param_3)" (identifier "uVar4") (= "=") (call_expression "FUN_000550c0(param_3)" (identifier "FUN_000550c0") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "pcVar3 = (char *)*param_3;" (assignment_expression "pcVar3 = (char *)*param_3" (identifier "pcVar3") (= "=") (cast_expression "(char *)*param_3" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_3" (* "*") (identifier "param_3")))) (; ";")) (if_statement "if (pcVar3 == (char *)0x0) {\n        return uVar4;\n      }" (if "if") (parenthesized_expression "(pcVar3 == (char *)0x0)" (( "(") (binary_expression "pcVar3 == (char *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return uVar4;\n      }" ({ "{") (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "iVar2 = strcmp(param_2,pcVar3);" (assignment_expression "iVar2 = strcmp(param_2,pcVar3)" (identifier "iVar2") (= "=") (call_expression "strcmp(param_2,pcVar3)" (identifier "strcmp") (argument_list "(param_2,pcVar3)" (( "(") (identifier "param_2") (, ",") (identifier "pcVar3") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        return uVar4;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return uVar4;\n      }" ({ "{") (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "free(pcVar3);" (call_expression "free(pcVar3)" (identifier "free") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")"))) (; ";")) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" (identifier "cVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "pcVar3 = param_2;" (assignment_expression "pcVar3 = param_2" (identifier "pcVar3") (= "=") (identifier "param_2")) (; ";")) (while_statement "while (cVar1 != '\0') {\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }" (while "while") (parenthesized_expression "(cVar1 != '\0')" (( "(") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }\n      pcVar3 = pcVar3 + 1;\n      cVar1 = *pcVar3;\n    }" ({ "{") (if_statement "if (cVar1 < '\0') {\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }" (if "if") (parenthesized_expression "(cVar1 < '\0')" (( "(") (binary_expression "cVar1 < '\0'" (identifier "cVar1") (< "<") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        pcVar3 = strdup(param_2);\n        *param_3 = pcVar3;\n        return 1;\n      }" ({ "{") (expression_statement "pcVar3 = strdup(param_2);" (assignment_expression "pcVar3 = strdup(param_2)" (identifier "pcVar3") (= "=") (call_expression "strdup(param_2)" (identifier "strdup") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "*param_3 = pcVar3;" (assignment_expression "*param_3 = pcVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "pcVar3")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" (identifier "pcVar3") (= "=") (binary_expression "pcVar3 + 1" (identifier "pcVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "cVar1 = *pcVar3;" (assignment_expression "cVar1 = *pcVar3" (identifier "cVar1") (= "=") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

type_1 function_1(type_2 *type_2,char *str,char **new)

{
  char var_8;
  type_1 _Var2;
  int var_3;
  char *var_1;
  char *in_org;
  char *out;
  
  var_1 = type_2->uri_encoding;
  if (var_1 != (char *)0x0) {
    out = "UTF-8";
    var_3 = var_2(var_1,"UTF-8");
    if (var_3 != 0) {
      in_org = (char *)var_4(str);
      _Var2 = var_5(var_1,str,in_org,(size_t)new,(char **)out);
      var_1 = *new;
      if (var_1 == (char *)0x0) {
        return _Var2;
      }
      var_3 = var_6(str,var_1);
      if (var_3 != 0) {
        return _Var2;
      }
      var_7(var_1);
      *new = (char *)0x0;
      return false;
    }
    var_8 = *str;
    var_1 = str;
    while (var_8 != '\0') {
      if (var_8 < '\0') {
        var_1 = var_9(str);
        *new = var_1;
        return true;
      }
      var_1 = var_1 + 1;
      var_8 = *var_1;
    }
  }
  return false;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (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: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))))) (return_statement (number_literal)))))

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

undefined4 MASKED(int *param_1,char *param_2,undefined4 *param_3)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  undefined4 uVar4;
  
  if (*param_1 != 0) {
    iVar2 = FUN_00059550(*param_1,"UTF-8");
    if (iVar2 != 0) {
      strlen(param_2);
      uVar4 = FUN_000550c0(param_3);
      pcVar3 = (char *)*param_3;
      if (pcVar3 == (char *)0x0) {
        return uVar4;
      }
      iVar2 = strcmp(param_2,pcVar3);
      if (iVar2 != 0) {
        return uVar4;
      }
      free(pcVar3);
      *param_3 = 0;
      return 0;
    }
    cVar1 = *param_2;
    pcVar3 = param_2;
    while (cVar1 != '\0') {
      if (cVar1 < '\0') {
        pcVar3 = strdup(param_2);
        *param_3 = pcVar3;
        return 1;
      }
      pcVar3 = pcVar3 + 1;
      cVar1 = *pcVar3;
    }
  }
  return 0;
}

