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

void __regparm3 string_prepend(string *p,char *s)

{
  size_t __n;
  char *pcVar1;
  char *pcVar2;
  char *__dest;
  
  __n = strlen(s);
  if (__n != 0) {
    string_need(p,__n);
    __dest = p->b;
    pcVar1 = p->p + -1;
    if (__dest <= pcVar1) {
      do {
        pcVar2 = pcVar1 + -1;
        pcVar1[__n] = *pcVar1;
        __dest = p->b;
        pcVar1 = pcVar2;
      } while (__dest <= pcVar2);
    }
    memcpy(__dest,s,__n);
    p->p = p->p + __n;
    return;
  }
  return;
}



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

void __regparm3 FUN_001a7820(undefined4 *param_1,char *param_2)

{
  size_t __n;
  undefined1 *puVar1;
  undefined1 *puVar2;
  undefined1 *__dest;
  
  __n = strlen(param_2);
  if (__n != 0) {
    FUN_001a7490();
    __dest = (undefined1 *)*param_1;
    puVar1 = (undefined1 *)(param_1[1] + -1);
    if (__dest <= puVar1) {
      do {
        puVar2 = puVar1 + -1;
        puVar1[__n] = *puVar1;
        __dest = (undefined1 *)*param_1;
        puVar1 = puVar2;
      } while (__dest <= puVar2);
    }
    memcpy(__dest,param_2,__n);
    param_1[1] = param_1[1] + __n;
    return;
  }
  return;
}


PUSH EBP
MOV EBP,EDX
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x00035680
ADD EBX,0x1977d3
SUB ESP,0x18
PUSH EDX
CALL 0x000285f0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x001a7850
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,EAX
MOV ESI,EAX
MOV EAX,EDI
CALL 0x001a7490
MOV EAX,dword ptr [EDI + 0x4]
MOV EDX,dword ptr [EDI]
SUB EAX,0x1
CMP EAX,EDX
JC 0x001a7880
LEA ESI,[ESI]
NOP
MOVZX EDX,byte ptr [EAX]
SUB EAX,0x1
MOV byte ptr [EAX + ESI*0x1 + 0x1],DL
MOV EDX,dword ptr [EDI]
CMP EAX,EDX
JNC 0x001a7870
SUB ESP,0x4
PUSH ESI
PUSH EBP
PUSH EDX
CALL 0x000285c0
ADD ESP,0x10
ADD dword ptr [EDI + 0x4],ESI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_001a7820(undefined4 *param_1,char *param_2)\n\n{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_001a7820(undefined4 *param_1,char *param_2)\n\n{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_001a7820(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }" { (expression_statement "FUN_001a7490();" (call_expression "FUN_001a7490()" identifier (argument_list "()" ( ))) ;) (expression_statement "__dest = (undefined1 *)*param_1;" (assignment_expression "__dest = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "puVar1 = (undefined1 *)(param_1[1] + -1);" (assignment_expression "puVar1 = (undefined1 *)(param_1[1] + -1)" identifier = (cast_expression "(undefined1 *)(param_1[1] + -1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + -1)" ( (binary_expression "param_1[1] + -1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) ;) (if_statement "if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }" if (parenthesized_expression "(__dest <= puVar1)" ( (binary_expression "__dest <= puVar1" identifier <= identifier) )) (compound_statement "{\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }" { (do_statement "do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);" do (compound_statement "{\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      }" { (expression_statement "puVar2 = puVar1 + -1;" (assignment_expression "puVar2 = puVar1 + -1" identifier = (binary_expression "puVar1 + -1" identifier + number_literal)) ;) (expression_statement "puVar1[__n] = *puVar1;" (assignment_expression "puVar1[__n] = *puVar1" (subscript_expression "puVar1[__n]" identifier [ identifier ]) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "__dest = (undefined1 *)*param_1;" (assignment_expression "__dest = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(__dest <= puVar2)" ( (binary_expression "__dest <= puVar2" identifier <= identifier) )) ;) })) (expression_statement "memcpy(__dest,param_2,__n);" (call_expression "memcpy(__dest,param_2,__n)" identifier (argument_list "(__dest,param_2,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_1[1] = param_1[1] + __n;" (assignment_expression "param_1[1] = param_1[1] + __n" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] + __n" (subscript_expression "param_1[1]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 string_prepend(string *p,char *s)\n\n{\n  size_t __n;\n  char *pcVar1;\n  char *pcVar2;\n  char *__dest;\n  \n  __n = strlen(s);\n  if (__n != 0) {\n    string_need(p,__n);\n    __dest = p->b;\n    pcVar1 = p->p + -1;\n    if (__dest <= pcVar1) {\n      do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);\n    }\n    memcpy(__dest,s,__n);\n    p->p = p->p + __n;\n    return;\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 string_prepend(string *p,char *s)\n\n{\n  size_t __n;\n  char *pcVar1;\n  char *pcVar2;\n  char *__dest;\n  \n  __n = strlen(s);\n  if (__n != 0) {\n    string_need(p,__n);\n    __dest = p->b;\n    pcVar1 = p->p + -1;\n    if (__dest <= pcVar1) {\n      do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);\n    }\n    memcpy(__dest,s,__n);\n    p->p = p->p + __n;\n    return;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "string_prepend(string *p,char *s)" identifier (parameter_list "(string *p,char *s)" ( (parameter_declaration "string *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  char *pcVar1;\n  char *pcVar2;\n  char *__dest;\n  \n  __n = strlen(s);\n  if (__n != 0) {\n    string_need(p,__n);\n    __dest = p->b;\n    pcVar1 = p->p + -1;\n    if (__dest <= pcVar1) {\n      do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);\n    }\n    memcpy(__dest,s,__n);\n    p->p = p->p + __n;\n    return;\n  }\n  return;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__n = strlen(s);" (assignment_expression "__n = strlen(s)" identifier = (call_expression "strlen(s)" identifier (argument_list "(s)" ( identifier )))) ;) (if_statement "if (__n != 0) {\n    string_need(p,__n);\n    __dest = p->b;\n    pcVar1 = p->p + -1;\n    if (__dest <= pcVar1) {\n      do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);\n    }\n    memcpy(__dest,s,__n);\n    p->p = p->p + __n;\n    return;\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    string_need(p,__n);\n    __dest = p->b;\n    pcVar1 = p->p + -1;\n    if (__dest <= pcVar1) {\n      do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);\n    }\n    memcpy(__dest,s,__n);\n    p->p = p->p + __n;\n    return;\n  }" { (expression_statement "string_need(p,__n);" (call_expression "string_need(p,__n)" identifier (argument_list "(p,__n)" ( identifier , identifier ))) ;) (expression_statement "__dest = p->b;" (assignment_expression "__dest = p->b" identifier = (field_expression "p->b" identifier -> field_identifier)) ;) (expression_statement "pcVar1 = p->p + -1;" (assignment_expression "pcVar1 = p->p + -1" identifier = (binary_expression "p->p + -1" (field_expression "p->p" identifier -> field_identifier) + number_literal)) ;) (if_statement "if (__dest <= pcVar1) {\n      do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);\n    }" if (parenthesized_expression "(__dest <= pcVar1)" ( (binary_expression "__dest <= pcVar1" identifier <= identifier) )) (compound_statement "{\n      do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);\n    }" { (do_statement "do {\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      } while (__dest <= pcVar2);" do (compound_statement "{\n        pcVar2 = pcVar1 + -1;\n        pcVar1[__n] = *pcVar1;\n        __dest = p->b;\n        pcVar1 = pcVar2;\n      }" { (expression_statement "pcVar2 = pcVar1 + -1;" (assignment_expression "pcVar2 = pcVar1 + -1" identifier = (binary_expression "pcVar1 + -1" identifier + number_literal)) ;) (expression_statement "pcVar1[__n] = *pcVar1;" (assignment_expression "pcVar1[__n] = *pcVar1" (subscript_expression "pcVar1[__n]" identifier [ identifier ]) = (pointer_expression "*pcVar1" * identifier)) ;) (expression_statement "__dest = p->b;" (assignment_expression "__dest = p->b" identifier = (field_expression "p->b" identifier -> field_identifier)) ;) (expression_statement "pcVar1 = pcVar2;" (assignment_expression "pcVar1 = pcVar2" identifier = identifier) ;) }) while (parenthesized_expression "(__dest <= pcVar2)" ( (binary_expression "__dest <= pcVar2" identifier <= identifier) )) ;) })) (expression_statement "memcpy(__dest,s,__n);" (call_expression "memcpy(__dest,s,__n)" identifier (argument_list "(__dest,s,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "p->p = p->p + __n;" (assignment_expression "p->p = p->p + __n" (field_expression "p->p" identifier -> field_identifier) = (binary_expression "p->p + __n" (field_expression "p->p" identifier -> field_identifier) + identifier)) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_001a7820(undefined4 *param_1,char *param_2)\n\n{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_001a7820(undefined4 *param_1,char *param_2)\n\n{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_001a7820(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }" { (expression_statement "FUN_001a7490();" (call_expression "FUN_001a7490()" identifier (argument_list "()" ( ))) ;) (expression_statement "__dest = (undefined1 *)*param_1;" (assignment_expression "__dest = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "puVar1 = (undefined1 *)(param_1[1] + -1);" (assignment_expression "puVar1 = (undefined1 *)(param_1[1] + -1)" identifier = (cast_expression "(undefined1 *)(param_1[1] + -1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + -1)" ( (binary_expression "param_1[1] + -1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) ;) (if_statement "if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }" if (parenthesized_expression "(__dest <= puVar1)" ( (binary_expression "__dest <= puVar1" identifier <= identifier) )) (compound_statement "{\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }" { (do_statement "do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);" do (compound_statement "{\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      }" { (expression_statement "puVar2 = puVar1 + -1;" (assignment_expression "puVar2 = puVar1 + -1" identifier = (binary_expression "puVar1 + -1" identifier + number_literal)) ;) (expression_statement "puVar1[__n] = *puVar1;" (assignment_expression "puVar1[__n] = *puVar1" (subscript_expression "puVar1[__n]" identifier [ identifier ]) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "__dest = (undefined1 *)*param_1;" (assignment_expression "__dest = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(__dest <= puVar2)" ( (binary_expression "__dest <= puVar2" identifier <= identifier) )) ;) })) (expression_statement "memcpy(__dest,param_2,__n);" (call_expression "memcpy(__dest,param_2,__n)" identifier (argument_list "(__dest,param_2,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_1[1] = param_1[1] + __n;" (assignment_expression "param_1[1] = param_1[1] + __n" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] + __n" (subscript_expression "param_1[1]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (return_statement return ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_001a7820(undefined4 *param_1,char *param_2)\n\n{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_001a7820(undefined4 *param_1,char *param_2)" (identifier "FUN_001a7820") (parameter_list "(undefined4 *param_1,char *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  size_t __n;\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *__dest;\n  \n  __n = strlen(param_2);\n  if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }\n  return;\n}" ({ "{") (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined1 *__dest;" (type_identifier "undefined1") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" (identifier "__n") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (__n != 0) {\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_001a7490();\n    __dest = (undefined1 *)*param_1;\n    puVar1 = (undefined1 *)(param_1[1] + -1);\n    if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }\n    memcpy(__dest,param_2,__n);\n    param_1[1] = param_1[1] + __n;\n    return;\n  }" ({ "{") (expression_statement "FUN_001a7490();" (call_expression "FUN_001a7490()" (identifier "FUN_001a7490") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "__dest = (undefined1 *)*param_1;" (assignment_expression "__dest = (undefined1 *)*param_1" (identifier "__dest") (= "=") (cast_expression "(undefined1 *)*param_1" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "puVar1 = (undefined1 *)(param_1[1] + -1);" (assignment_expression "puVar1 = (undefined1 *)(param_1[1] + -1)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(param_1[1] + -1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[1] + -1)" (( "(") (binary_expression "param_1[1] + -1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-1")) () ")")))) (; ";")) (if_statement "if (__dest <= puVar1) {\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }" (if "if") (parenthesized_expression "(__dest <= puVar1)" (( "(") (binary_expression "__dest <= puVar1" (identifier "__dest") (<= "<=") (identifier "puVar1")) () ")")) (compound_statement "{\n      do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);\n    }" ({ "{") (do_statement "do {\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      } while (__dest <= puVar2);" (do "do") (compound_statement "{\n        puVar2 = puVar1 + -1;\n        puVar1[__n] = *puVar1;\n        __dest = (undefined1 *)*param_1;\n        puVar1 = puVar2;\n      }" ({ "{") (expression_statement "puVar2 = puVar1 + -1;" (assignment_expression "puVar2 = puVar1 + -1" (identifier "puVar2") (= "=") (binary_expression "puVar1 + -1" (identifier "puVar1") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "puVar1[__n] = *puVar1;" (assignment_expression "puVar1[__n] = *puVar1" (subscript_expression "puVar1[__n]" (identifier "puVar1") ([ "[") (identifier "__n") (] "]")) (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (expression_statement "__dest = (undefined1 *)*param_1;" (assignment_expression "__dest = (undefined1 *)*param_1" (identifier "__dest") (= "=") (cast_expression "(undefined1 *)*param_1" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" (identifier "puVar1") (= "=") (identifier "puVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(__dest <= puVar2)" (( "(") (binary_expression "__dest <= puVar2" (identifier "__dest") (<= "<=") (identifier "puVar2")) () ")")) (; ";")) (} "}"))) (expression_statement "memcpy(__dest,param_2,__n);" (call_expression "memcpy(__dest,param_2,__n)" (identifier "memcpy") (argument_list "(__dest,param_2,__n)" (( "(") (identifier "__dest") (, ",") (identifier "param_2") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "param_1[1] = param_1[1] + __n;" (assignment_expression "param_1[1] = param_1[1] + __n" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_1[1] + __n" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "__n"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *p,char *s)

{
  size_t var_2;
  char *var_5;
  char *var_6;
  char *var_4;
  
  var_2 = var_1(s);
  if (var_2 != 0) {
    var_3(p,var_2);
    var_4 = p->b;
    var_5 = p->p + -1;
    if (var_4 <= var_5) {
      do {
        var_6 = var_5 + -1;
        var_5[var_2] = *var_5;
        var_4 = p->b;
        var_5 = var_6;
      } while (var_4 <= var_6);
    }
    var_7(var_4,s,var_2);
    p->p = p->p + var_2;
    return;
  }
  return;
}


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

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

void __regparm3 MASKED(undefined4 *param_1,char *param_2)

{
  size_t __n;
  undefined1 *puVar1;
  undefined1 *puVar2;
  undefined1 *__dest;
  
  __n = strlen(param_2);
  if (__n != 0) {
    FUN_001a7490();
    __dest = (undefined1 *)*param_1;
    puVar1 = (undefined1 *)(param_1[1] + -1);
    if (__dest <= puVar1) {
      do {
        puVar2 = puVar1 + -1;
        puVar1[__n] = *puVar1;
        __dest = (undefined1 *)*param_1;
        puVar1 = puVar2;
      } while (__dest <= puVar2);
    }
    memcpy(__dest,param_2,__n);
    param_1[1] = param_1[1] + __n;
    return;
  }
  return;
}

