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

void Curl_strntoupper(char *dest,char *src,size_t n)

{
  char cVar1;
  char *pcVar2;
  char *pcVar3;
  
  if (n != 0) {
    pcVar2 = dest;
    do {
      pcVar3 = pcVar2 + 1;
      cVar1 = Curl_raw_toupper(*src);
      *pcVar2 = cVar1;
      if (*src == '\0') {
        return;
      }
      pcVar2 = pcVar3;
      src = src + 1;
    } while (dest + n != pcVar3);
  }
  return;
}



void __regparm2 FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)

{
  undefined1 uVar1;
  undefined1 *puVar2;
  undefined1 *puVar3;
  undefined1 *unaff_retaddr;
  
  entry(param_2,0x3e189);
  if (param_4 != 0) {
    puVar2 = unaff_retaddr;
    do {
      puVar3 = puVar2 + 1;
      uVar1 = FUN_0003dfd0((int)*param_3);
      *puVar2 = uVar1;
      if (*param_3 == '\0') {
        return;
      }
      puVar2 = puVar3;
      param_3 = param_3 + 1;
    } while (unaff_retaddr + param_4 != puVar3);
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x78657
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x28]
MOV ESI,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [ESP + 0x24]
TEST EBP,EBP
JZ 0x0003e1d2
ADD EBP,ESI
JMP 0x0003e1b4
CMP EBP,ESI
JZ 0x0003e1d2
MOVSX EAX,byte ptr [EDI]
SUB ESP,0xc
ADD ESI,0x1
ADD EDI,0x1
PUSH EAX
CALL 0x0003dfd0
ADD ESP,0x10
MOV byte ptr [ESI + -0x1],AL
CMP byte ptr [EDI + -0x1],0x0
JNZ 0x0003e1b0
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "void __regparm2 FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)\n\n{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}\n\n" (function_definition "void __regparm2 FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)\n\n{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *unaff_retaddr;" type_identifier (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x3e189);" (call_expression "entry(param_2,0x3e189)" identifier (argument_list "(param_2,0x3e189)" ( identifier , number_literal ))) ;) (if_statement "if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }" { (expression_statement "puVar2 = unaff_retaddr;" (assignment_expression "puVar2 = unaff_retaddr" identifier = identifier) ;) (do_statement "do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);" do (compound_statement "{\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    }" { (expression_statement "puVar3 = puVar2 + 1;" (assignment_expression "puVar3 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = FUN_0003dfd0((int)*param_3);" (assignment_expression "uVar1 = FUN_0003dfd0((int)*param_3)" identifier = (call_expression "FUN_0003dfd0((int)*param_3)" identifier (argument_list "((int)*param_3)" ( (cast_expression "(int)*param_3" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_3" * identifier)) )))) ;) (expression_statement "*puVar2 = uVar1;" (assignment_expression "*puVar2 = uVar1" (pointer_expression "*puVar2" * identifier) = identifier) ;) (if_statement "if (*param_3 == '\0') {\n        return;\n      }" if (parenthesized_expression "(*param_3 == '\0')" ( (binary_expression "*param_3 == '\0'" (pointer_expression "*param_3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "puVar2 = puVar3;" (assignment_expression "puVar2 = puVar3" identifier = identifier) ;) (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(unaff_retaddr + param_4 != puVar3)" ( (binary_expression "unaff_retaddr + param_4 != puVar3" (binary_expression "unaff_retaddr + param_4" identifier + identifier) != identifier) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid Curl_strntoupper(char *dest,char *src,size_t n)\n\n{\n  char cVar1;\n  char *pcVar2;\n  char *pcVar3;\n  \n  if (n != 0) {\n    pcVar2 = dest;\n    do {\n      pcVar3 = pcVar2 + 1;\n      cVar1 = Curl_raw_toupper(*src);\n      *pcVar2 = cVar1;\n      if (*src == '\0') {\n        return;\n      }\n      pcVar2 = pcVar3;\n      src = src + 1;\n    } while (dest + n != pcVar3);\n  }\n  return;\n}\n\n" comment (function_definition "void Curl_strntoupper(char *dest,char *src,size_t n)\n\n{\n  char cVar1;\n  char *pcVar2;\n  char *pcVar3;\n  \n  if (n != 0) {\n    pcVar2 = dest;\n    do {\n      pcVar3 = pcVar2 + 1;\n      cVar1 = Curl_raw_toupper(*src);\n      *pcVar2 = cVar1;\n      if (*src == '\0') {\n        return;\n      }\n      pcVar2 = pcVar3;\n      src = src + 1;\n    } while (dest + n != pcVar3);\n  }\n  return;\n}" primitive_type (function_declarator "Curl_strntoupper(char *dest,char *src,size_t n)" identifier (parameter_list "(char *dest,char *src,size_t n)" ( (parameter_declaration "char *dest" primitive_type (pointer_declarator "*dest" * identifier)) , (parameter_declaration "char *src" primitive_type (pointer_declarator "*src" * identifier)) , (parameter_declaration "size_t n" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  char *pcVar3;\n  \n  if (n != 0) {\n    pcVar2 = dest;\n    do {\n      pcVar3 = pcVar2 + 1;\n      cVar1 = Curl_raw_toupper(*src);\n      *pcVar2 = cVar1;\n      if (*src == '\0') {\n        return;\n      }\n      pcVar2 = pcVar3;\n      src = src + 1;\n    } while (dest + n != pcVar3);\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (if_statement "if (n != 0) {\n    pcVar2 = dest;\n    do {\n      pcVar3 = pcVar2 + 1;\n      cVar1 = Curl_raw_toupper(*src);\n      *pcVar2 = cVar1;\n      if (*src == '\0') {\n        return;\n      }\n      pcVar2 = pcVar3;\n      src = src + 1;\n    } while (dest + n != pcVar3);\n  }" if (parenthesized_expression "(n != 0)" ( (binary_expression "n != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar2 = dest;\n    do {\n      pcVar3 = pcVar2 + 1;\n      cVar1 = Curl_raw_toupper(*src);\n      *pcVar2 = cVar1;\n      if (*src == '\0') {\n        return;\n      }\n      pcVar2 = pcVar3;\n      src = src + 1;\n    } while (dest + n != pcVar3);\n  }" { (expression_statement "pcVar2 = dest;" (assignment_expression "pcVar2 = dest" identifier = identifier) ;) (do_statement "do {\n      pcVar3 = pcVar2 + 1;\n      cVar1 = Curl_raw_toupper(*src);\n      *pcVar2 = cVar1;\n      if (*src == '\0') {\n        return;\n      }\n      pcVar2 = pcVar3;\n      src = src + 1;\n    } while (dest + n != pcVar3);" do (compound_statement "{\n      pcVar3 = pcVar2 + 1;\n      cVar1 = Curl_raw_toupper(*src);\n      *pcVar2 = cVar1;\n      if (*src == '\0') {\n        return;\n      }\n      pcVar2 = pcVar3;\n      src = src + 1;\n    }" { (expression_statement "pcVar3 = pcVar2 + 1;" (assignment_expression "pcVar3 = pcVar2 + 1" identifier = (binary_expression "pcVar2 + 1" identifier + number_literal)) ;) (expression_statement "cVar1 = Curl_raw_toupper(*src);" (assignment_expression "cVar1 = Curl_raw_toupper(*src)" identifier = (call_expression "Curl_raw_toupper(*src)" identifier (argument_list "(*src)" ( (pointer_expression "*src" * identifier) )))) ;) (expression_statement "*pcVar2 = cVar1;" (assignment_expression "*pcVar2 = cVar1" (pointer_expression "*pcVar2" * identifier) = identifier) ;) (if_statement "if (*src == '\0') {\n        return;\n      }" if (parenthesized_expression "(*src == '\0')" ( (binary_expression "*src == '\0'" (pointer_expression "*src" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "pcVar2 = pcVar3;" (assignment_expression "pcVar2 = pcVar3" identifier = identifier) ;) (expression_statement "src = src + 1;" (assignment_expression "src = src + 1" identifier = (binary_expression "src + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(dest + n != pcVar3)" ( (binary_expression "dest + n != pcVar3" (binary_expression "dest + n" identifier + identifier) != identifier) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm2 FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)\n\n{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}\n\n" (function_definition "void __regparm2 FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)\n\n{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *unaff_retaddr;" type_identifier (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x3e189);" (call_expression "entry(param_2,0x3e189)" identifier (argument_list "(param_2,0x3e189)" ( identifier , number_literal ))) ;) (if_statement "if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }" { (expression_statement "puVar2 = unaff_retaddr;" (assignment_expression "puVar2 = unaff_retaddr" identifier = identifier) ;) (do_statement "do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);" do (compound_statement "{\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    }" { (expression_statement "puVar3 = puVar2 + 1;" (assignment_expression "puVar3 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = FUN_0003dfd0((int)*param_3);" (assignment_expression "uVar1 = FUN_0003dfd0((int)*param_3)" identifier = (call_expression "FUN_0003dfd0((int)*param_3)" identifier (argument_list "((int)*param_3)" ( (cast_expression "(int)*param_3" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_3" * identifier)) )))) ;) (expression_statement "*puVar2 = uVar1;" (assignment_expression "*puVar2 = uVar1" (pointer_expression "*puVar2" * identifier) = identifier) ;) (if_statement "if (*param_3 == '\0') {\n        return;\n      }" if (parenthesized_expression "(*param_3 == '\0')" ( (binary_expression "*param_3 == '\0'" (pointer_expression "*param_3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "puVar2 = puVar3;" (assignment_expression "puVar2 = puVar3" identifier = identifier) ;) (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(unaff_retaddr + param_4 != puVar3)" ( (binary_expression "unaff_retaddr + param_4 != puVar3" (binary_expression "unaff_retaddr + param_4" identifier + identifier) != identifier) )) ;) })) (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)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) != IDENT) )) ;) })) (return_statement return ;) })))
(function_definition "void __regparm2 FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)\n\n{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_0003e180(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)" (identifier "FUN_0003e180") (parameter_list "(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined1 uVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  undefined1 *unaff_retaddr;\n  \n  entry(param_2,0x3e189);\n  if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }\n  return;\n}" ({ "{") (declaration "undefined1 uVar1;" (type_identifier "undefined1") (identifier "uVar1") (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined1 *puVar3;" (type_identifier "undefined1") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined1 *unaff_retaddr;" (type_identifier "undefined1") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (expression_statement "entry(param_2,0x3e189);" (call_expression "entry(param_2,0x3e189)" (identifier "entry") (argument_list "(param_2,0x3e189)" (( "(") (identifier "param_2") (, ",") (number_literal "0x3e189") () ")"))) (; ";")) (if_statement "if (param_4 != 0) {\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    puVar2 = unaff_retaddr;\n    do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);\n  }" ({ "{") (expression_statement "puVar2 = unaff_retaddr;" (assignment_expression "puVar2 = unaff_retaddr" (identifier "puVar2") (= "=") (identifier "unaff_retaddr")) (; ";")) (do_statement "do {\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    } while (unaff_retaddr + param_4 != puVar3);" (do "do") (compound_statement "{\n      puVar3 = puVar2 + 1;\n      uVar1 = FUN_0003dfd0((int)*param_3);\n      *puVar2 = uVar1;\n      if (*param_3 == '\0') {\n        return;\n      }\n      puVar2 = puVar3;\n      param_3 = param_3 + 1;\n    }" ({ "{") (expression_statement "puVar3 = puVar2 + 1;" (assignment_expression "puVar3 = puVar2 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar1 = FUN_0003dfd0((int)*param_3);" (assignment_expression "uVar1 = FUN_0003dfd0((int)*param_3)" (identifier "uVar1") (= "=") (call_expression "FUN_0003dfd0((int)*param_3)" (identifier "FUN_0003dfd0") (argument_list "((int)*param_3)" (( "(") (cast_expression "(int)*param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) () ")")))) (; ";")) (expression_statement "*puVar2 = uVar1;" (assignment_expression "*puVar2 = uVar1" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (identifier "uVar1")) (; ";")) (if_statement "if (*param_3 == '\0') {\n        return;\n      }" (if "if") (parenthesized_expression "(*param_3 == '\0')" (( "(") (binary_expression "*param_3 == '\0'" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar2 = puVar3;" (assignment_expression "puVar2 = puVar3" (identifier "puVar2") (= "=") (identifier "puVar3")) (; ";")) (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" (identifier "param_3") (= "=") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(unaff_retaddr + param_4 != puVar3)" (( "(") (binary_expression "unaff_retaddr + param_4 != puVar3" (binary_expression "unaff_retaddr + param_4" (identifier "unaff_retaddr") (+ "+") (identifier "param_4")) (!= "!=") (identifier "puVar3")) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(char *var_5,char *var_4,size_t var_1)

{
  char cVar1;
  char *var_2;
  char *var_6;
  
  if (var_1 != 0) {
    var_2 = var_5;
    do {
      var_6 = var_2 + 1;
      cVar1 = var_3(*var_4);
      *var_2 = cVar1;
      if (*var_4 == '\0') {
        return;
      }
      var_2 = var_6;
      var_4 = var_4 + 1;
    } while (var_5 + var_1 != var_6);
  }
  return;
}


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

void __regparm2 MASKED(undefined4 param_1,undefined4 param_2,char *param_3,int param_4)

{
  undefined1 uVar1;
  undefined1 *puVar2;
  undefined1 *puVar3;
  undefined1 *unaff_retaddr;
  
  entry(param_2,0x3e189);
  if (param_4 != 0) {
    puVar2 = unaff_retaddr;
    do {
      puVar3 = puVar2 + 1;
      uVar1 = FUN_0003dfd0((int)*param_3);
      *puVar2 = uVar1;
      if (*param_3 == '\0') {
        return;
      }
      puVar2 = puVar3;
      param_3 = param_3 + 1;
    } while (unaff_retaddr + param_4 != puVar3);
  }
  return;
}

