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

void ldfile_add_arch(char *in_name)

{
  byte bVar1;
  undefined *puVar2;
  byte *pbVar3;
  search_arch_type *psVar4;
  
  pbVar3 = (byte *)xstrdup(in_name);
  psVar4 = (search_arch_type *)xmalloc(8);
  bVar1 = *pbVar3;
  ldfile_output_machine_name = in_name;
  psVar4->name = (char *)pbVar3;
  psVar4->next = (search_arch *)0x0;
  puVar2 = PTR__sch_tolower_001befd8;
  while (bVar1 != 0) {
    *pbVar3 = puVar2[bVar1];
    bVar1 = pbVar3[1];
    pbVar3 = pbVar3 + 1;
  }
  *search_arch_tail_ptr = psVar4;
  search_arch_tail_ptr = &psVar4->next;
  return;
}



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

void FUN_00035ca0(undefined *param_1)

{
  byte bVar1;
  undefined *puVar2;
  byte *pbVar3;
  undefined4 *puVar4;
  
  pbVar3 = (byte *)xstrdup(param_1);
  puVar4 = (undefined4 *)xmalloc(8);
  bVar1 = *pbVar3;
  PTR_s__001bf428 = param_1;
  *puVar4 = pbVar3;
  puVar4[1] = 0;
  puVar2 = PTR__sch_tolower_001befd8;
  while (bVar1 != 0) {
    *pbVar3 = puVar2[bVar1];
    bVar1 = pbVar3[1];
    pbVar3 = pbVar3 + 1;
  }
  *(undefined4 **)PTR_DAT_001bf424 = puVar4;
  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x00017bc0
ADD EBX,0x189354
SUB ESP,0xc
PUSH EDI
CALL 0x00016520
MOV dword ptr [ESP],0x8
MOV ESI,EAX
CALL 0x00016e08
MOVZX EDX,byte ptr [ESI]
MOV dword ptr [EBX + 0x428],EDI
ADD ESP,0x10
MOV dword ptr [EAX],ESI
MOV dword ptr [EAX + 0x4],0x0
TEST DL,DL
JZ 0x00035d01
MOV ECX,dword ptr [EBX + 0xffffffd8]
LEA ESI,[ESI]
NOP
MOVZX EDX,byte ptr [ECX + EDX*0x1]
ADD ESI,0x1
MOV byte ptr [ESI + -0x1],DL
MOVZX EDX,byte ptr [ESI]
TEST DL,DL
JNZ 0x00035cf0
MOV EDX,dword ptr [EBX + 0x424]
MOV dword ptr [EDX],EAX
ADD EAX,0x4
MOV dword ptr [EBX + 0x424],EAX
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00035ca0(undefined *param_1)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}\n\n" comment (function_definition "void FUN_00035ca0(undefined *param_1)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}" primitive_type (function_declarator "FUN_00035ca0(undefined *param_1)" identifier (parameter_list "(undefined *param_1)" ( (parameter_declaration "undefined *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "pbVar3 = (byte *)xstrdup(param_1);" (assignment_expression "pbVar3 = (byte *)xstrdup(param_1)" identifier = (cast_expression "(byte *)xstrdup(param_1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "puVar4 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar4 = (undefined4 *)xmalloc(8)" identifier = (cast_expression "(undefined4 *)xmalloc(8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "PTR_s__001bf428 = param_1;" (assignment_expression "PTR_s__001bf428 = param_1" identifier = identifier) ;) (expression_statement "*puVar4 = pbVar3;" (assignment_expression "*puVar4 = pbVar3" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2 = PTR__sch_tolower_001befd8;" (assignment_expression "puVar2 = PTR__sch_tolower_001befd8" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" { (expression_statement "*pbVar3 = puVar2[bVar1];" (assignment_expression "*pbVar3 = puVar2[bVar1]" (pointer_expression "*pbVar3" * identifier) = (subscript_expression "puVar2[bVar1]" identifier [ identifier ])) ;) (expression_statement "bVar1 = pbVar3[1];" (assignment_expression "bVar1 = pbVar3[1]" identifier = (subscript_expression "pbVar3[1]" identifier [ number_literal ])) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "*(undefined4 **)PTR_DAT_001bf424 = puVar4;" (assignment_expression "*(undefined4 **)PTR_DAT_001bf424 = puVar4" (pointer_expression "*(undefined4 **)PTR_DAT_001bf424" * (cast_expression "(undefined4 **)PTR_DAT_001bf424" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);" (assignment_expression "PTR_DAT_001bf424 = (undefined *)(puVar4 + 1)" identifier = (cast_expression "(undefined *)(puVar4 + 1)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) )))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid ldfile_add_arch(char *in_name)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  search_arch_type *psVar4;\n  \n  pbVar3 = (byte *)xstrdup(in_name);\n  psVar4 = (search_arch_type *)xmalloc(8);\n  bVar1 = *pbVar3;\n  ldfile_output_machine_name = in_name;\n  psVar4->name = (char *)pbVar3;\n  psVar4->next = (search_arch *)0x0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *search_arch_tail_ptr = psVar4;\n  search_arch_tail_ptr = &psVar4->next;\n  return;\n}\n\n" comment comment (function_definition "void ldfile_add_arch(char *in_name)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  search_arch_type *psVar4;\n  \n  pbVar3 = (byte *)xstrdup(in_name);\n  psVar4 = (search_arch_type *)xmalloc(8);\n  bVar1 = *pbVar3;\n  ldfile_output_machine_name = in_name;\n  psVar4->name = (char *)pbVar3;\n  psVar4->next = (search_arch *)0x0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *search_arch_tail_ptr = psVar4;\n  search_arch_tail_ptr = &psVar4->next;\n  return;\n}" primitive_type (function_declarator "ldfile_add_arch(char *in_name)" identifier (parameter_list "(char *in_name)" ( (parameter_declaration "char *in_name" primitive_type (pointer_declarator "*in_name" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  search_arch_type *psVar4;\n  \n  pbVar3 = (byte *)xstrdup(in_name);\n  psVar4 = (search_arch_type *)xmalloc(8);\n  bVar1 = *pbVar3;\n  ldfile_output_machine_name = in_name;\n  psVar4->name = (char *)pbVar3;\n  psVar4->next = (search_arch *)0x0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *search_arch_tail_ptr = psVar4;\n  search_arch_tail_ptr = &psVar4->next;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "search_arch_type *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (expression_statement "pbVar3 = (byte *)xstrdup(in_name);" (assignment_expression "pbVar3 = (byte *)xstrdup(in_name)" identifier = (cast_expression "(byte *)xstrdup(in_name)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(in_name)" identifier (argument_list "(in_name)" ( identifier ))))) ;) (expression_statement "psVar4 = (search_arch_type *)xmalloc(8);" (assignment_expression "psVar4 = (search_arch_type *)xmalloc(8)" identifier = (cast_expression "(search_arch_type *)xmalloc(8)" ( (type_descriptor "search_arch_type *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "ldfile_output_machine_name = in_name;" (assignment_expression "ldfile_output_machine_name = in_name" identifier = identifier) ;) (expression_statement "psVar4->name = (char *)pbVar3;" (assignment_expression "psVar4->name = (char *)pbVar3" (field_expression "psVar4->name" identifier -> field_identifier) = (cast_expression "(char *)pbVar3" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "psVar4->next = (search_arch *)0x0;" (assignment_expression "psVar4->next = (search_arch *)0x0" (field_expression "psVar4->next" identifier -> field_identifier) = (cast_expression "(search_arch *)0x0" ( (type_descriptor "search_arch *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "puVar2 = PTR__sch_tolower_001befd8;" (assignment_expression "puVar2 = PTR__sch_tolower_001befd8" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" { (expression_statement "*pbVar3 = puVar2[bVar1];" (assignment_expression "*pbVar3 = puVar2[bVar1]" (pointer_expression "*pbVar3" * identifier) = (subscript_expression "puVar2[bVar1]" identifier [ identifier ])) ;) (expression_statement "bVar1 = pbVar3[1];" (assignment_expression "bVar1 = pbVar3[1]" identifier = (subscript_expression "pbVar3[1]" identifier [ number_literal ])) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "*search_arch_tail_ptr = psVar4;" (assignment_expression "*search_arch_tail_ptr = psVar4" (pointer_expression "*search_arch_tail_ptr" * identifier) = identifier) ;) (expression_statement "search_arch_tail_ptr = &psVar4->next;" (assignment_expression "search_arch_tail_ptr = &psVar4->next" identifier = (pointer_expression "&psVar4->next" & (field_expression "psVar4->next" identifier -> field_identifier))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00035ca0(undefined *param_1)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}\n\n" (function_definition "void FUN_00035ca0(undefined *param_1)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}" primitive_type (function_declarator "FUN_00035ca0(undefined *param_1)" identifier (parameter_list "(undefined *param_1)" ( (parameter_declaration "undefined *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "pbVar3 = (byte *)xstrdup(param_1);" (assignment_expression "pbVar3 = (byte *)xstrdup(param_1)" identifier = (cast_expression "(byte *)xstrdup(param_1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "puVar4 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar4 = (undefined4 *)xmalloc(8)" identifier = (cast_expression "(undefined4 *)xmalloc(8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "PTR_s__001bf428 = param_1;" (assignment_expression "PTR_s__001bf428 = param_1" identifier = identifier) ;) (expression_statement "*puVar4 = pbVar3;" (assignment_expression "*puVar4 = pbVar3" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2 = PTR__sch_tolower_001befd8;" (assignment_expression "puVar2 = PTR__sch_tolower_001befd8" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" { (expression_statement "*pbVar3 = puVar2[bVar1];" (assignment_expression "*pbVar3 = puVar2[bVar1]" (pointer_expression "*pbVar3" * identifier) = (subscript_expression "puVar2[bVar1]" identifier [ identifier ])) ;) (expression_statement "bVar1 = pbVar3[1];" (assignment_expression "bVar1 = pbVar3[1]" identifier = (subscript_expression "pbVar3[1]" identifier [ number_literal ])) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "*(undefined4 **)PTR_DAT_001bf424 = puVar4;" (assignment_expression "*(undefined4 **)PTR_DAT_001bf424 = puVar4" (pointer_expression "*(undefined4 **)PTR_DAT_001bf424" * (cast_expression "(undefined4 **)PTR_DAT_001bf424" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);" (assignment_expression "PTR_DAT_001bf424 = (undefined *)(puVar4 + 1)" identifier = (cast_expression "(undefined *)(puVar4 + 1)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) )))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ IDENT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (return_statement return ;) })))
(function_definition "void FUN_00035ca0(undefined *param_1)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00035ca0(undefined *param_1)" (identifier "FUN_00035ca0") (parameter_list "(undefined *param_1)" (( "(") (parameter_declaration "undefined *param_1" (type_identifier "undefined") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  \n  pbVar3 = (byte *)xstrdup(param_1);\n  puVar4 = (undefined4 *)xmalloc(8);\n  bVar1 = *pbVar3;\n  PTR_s__001bf428 = param_1;\n  *puVar4 = pbVar3;\n  puVar4[1] = 0;\n  puVar2 = PTR__sch_tolower_001befd8;\n  while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }\n  *(undefined4 **)PTR_DAT_001bf424 = puVar4;\n  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "pbVar3 = (byte *)xstrdup(param_1);" (assignment_expression "pbVar3 = (byte *)xstrdup(param_1)" (identifier "pbVar3") (= "=") (cast_expression "(byte *)xstrdup(param_1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xstrdup(param_1)" (identifier "xstrdup") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "puVar4 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar4 = (undefined4 *)xmalloc(8)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)xmalloc(8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(8)" (identifier "xmalloc") (argument_list "(8)" (( "(") (number_literal "8") () ")"))))) (; ";")) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" (identifier "bVar1") (= "=") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3"))) (; ";")) (expression_statement "PTR_s__001bf428 = param_1;" (assignment_expression "PTR_s__001bf428 = param_1" (identifier "PTR_s__001bf428") (= "=") (identifier "param_1")) (; ";")) (expression_statement "*puVar4 = pbVar3;" (assignment_expression "*puVar4 = pbVar3" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (identifier "pbVar3")) (; ";")) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2 = PTR__sch_tolower_001befd8;" (assignment_expression "puVar2 = PTR__sch_tolower_001befd8" (identifier "puVar2") (= "=") (identifier "PTR__sch_tolower_001befd8")) (; ";")) (while_statement "while (bVar1 != 0) {\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" (while "while") (parenthesized_expression "(bVar1 != 0)" (( "(") (binary_expression "bVar1 != 0" (identifier "bVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *pbVar3 = puVar2[bVar1];\n    bVar1 = pbVar3[1];\n    pbVar3 = pbVar3 + 1;\n  }" ({ "{") (expression_statement "*pbVar3 = puVar2[bVar1];" (assignment_expression "*pbVar3 = puVar2[bVar1]" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (= "=") (subscript_expression "puVar2[bVar1]" (identifier "puVar2") ([ "[") (identifier "bVar1") (] "]"))) (; ";")) (expression_statement "bVar1 = pbVar3[1];" (assignment_expression "bVar1 = pbVar3[1]" (identifier "bVar1") (= "=") (subscript_expression "pbVar3[1]" (identifier "pbVar3") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 **)PTR_DAT_001bf424 = puVar4;" (assignment_expression "*(undefined4 **)PTR_DAT_001bf424 = puVar4" (pointer_expression "*(undefined4 **)PTR_DAT_001bf424" (* "*") (cast_expression "(undefined4 **)PTR_DAT_001bf424" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_DAT_001bf424"))) (= "=") (identifier "puVar4")) (; ";")) (expression_statement "PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);" (assignment_expression "PTR_DAT_001bf424 = (undefined *)(puVar4 + 1)" (identifier "PTR_DAT_001bf424") (= "=") (cast_expression "(undefined *)(puVar4 + 1)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 1)" (( "(") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1")) () ")")))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(char *in_name)

{
  type_1 var_3;
  type_2 *puVar2;
  type_1 *var_4;
  type_3 *psVar4;
  
  var_4 = (type_1 *)var_1(in_name);
  psVar4 = (type_3 *)var_2(8);
  var_3 = *var_4;
  ldfile_output_machine_name = in_name;
  psVar4->name = (char *)var_4;
  psVar4->next = (type_4 *)0x0;
  puVar2 = PTR__sch_tolower_001befd8;
  while (var_3 != 0) {
    *var_4 = puVar2[var_3];
    var_3 = var_4[1];
    var_4 = var_4 + 1;
  }
  *search_arch_tail_ptr = psVar4;
  search_arch_tail_ptr = &psVar4->next;
  return;
}


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

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

void MASKED(undefined *param_1)

{
  byte bVar1;
  undefined *puVar2;
  byte *pbVar3;
  undefined4 *puVar4;
  
  pbVar3 = (byte *)xstrdup(param_1);
  puVar4 = (undefined4 *)xmalloc(8);
  bVar1 = *pbVar3;
  PTR_s__001bf428 = param_1;
  *puVar4 = pbVar3;
  puVar4[1] = 0;
  puVar2 = PTR__sch_tolower_001befd8;
  while (bVar1 != 0) {
    *pbVar3 = puVar2[bVar1];
    bVar1 = pbVar3[1];
    pbVar3 = pbVar3 + 1;
  }
  *(undefined4 **)PTR_DAT_001bf424 = puVar4;
  PTR_DAT_001bf424 = (undefined *)(puVar4 + 1);
  return;
}

