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

symbolS * symbol_find_noref(char *name,int noref)

{
  byte bVar1;
  char *pcVar2;
  undefined *puVar3;
  symbolS *psVar4;
  size_t sVar5;
  char *name_00;
  
  if (symbols_case_sensitive != 0) {
    psVar4 = symbol_find_exact_noref(name,noref);
    return psVar4;
  }
  sVar5 = strlen(name);
  name_00 = (char *)xmalloc(sVar5 + 1);
  puVar3 = PTR__sch_toupper_00069ff0;
  bVar1 = *name;
  pcVar2 = name_00;
  while (bVar1 != 0) {
    name = (char *)((byte *)name + 1);
    *pcVar2 = puVar3[bVar1];
    pcVar2 = pcVar2 + 1;
    bVar1 = *name;
  }
  *pcVar2 = '\0';
  psVar4 = symbol_find_exact_noref(name_00,noref);
  free(name_00);
  return psVar4;
}



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

undefined4 FUN_00038350(byte *param_1,undefined4 param_2)

{
  byte bVar1;
  undefined1 *puVar2;
  undefined *puVar3;
  undefined4 uVar4;
  size_t sVar5;
  undefined1 *__ptr;
  
  if (DAT_0006a4e4 != 0) {
    uVar4 = FUN_000382c0();
    return uVar4;
  }
  sVar5 = strlen((char *)param_1);
  __ptr = (undefined1 *)xmalloc(sVar5 + 1);
  puVar3 = PTR__sch_toupper_00069ff0;
  bVar1 = *param_1;
  puVar2 = __ptr;
  while (bVar1 != 0) {
    param_1 = param_1 + 1;
    *puVar2 = puVar3[bVar1];
    puVar2 = puVar2 + 1;
    bVar1 = *param_1;
  }
  *puVar2 = 0;
  uVar4 = FUN_000382c0(__ptr,param_2);
  free(__ptr);
  return uVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000160b0
ADD EBX,0x31ca7
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x20]
MOV ESI,dword ptr [ESP + 0x24]
MOV EAX,dword ptr [EBX + 0x4e4]
TEST EAX,EAX
JZ 0x00038380
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x000382c0
SUB ESP,0xc
PUSH EBP
CALL 0x00014470
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00014820
MOVZX ECX,byte ptr [EBP]
LEA EDX,[EBP + 0x1]
ADD ESP,0x10
MOV EDI,EAX
TEST CL,CL
JZ 0x000383c6
MOV EBP,dword ptr [EBX + 0xfffffff0]
LEA ESI,[ESI]
MOVZX ECX,byte ptr [EBP + ECX*0x1]
ADD EAX,0x1
ADD EDX,0x1
MOV byte ptr [EAX + -0x1],CL
MOVZX ECX,byte ptr [EDX + -0x1]
TEST CL,CL
JNZ 0x000383b0
SUB ESP,0x8
MOV byte ptr [EAX],0x0
PUSH ESI
PUSH EDI
CALL 0x000382c0
MOV dword ptr [ESP],EDI
MOV ESI,EAX
CALL 0x00014810
ADD ESP,0x1c
MOV EAX,ESI
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\nundefined4 FUN_00038350(byte *param_1,undefined4 param_2)\n\n{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}\n\n" comment (function_definition "undefined4 FUN_00038350(byte *param_1,undefined4 param_2)\n\n{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00038350(byte *param_1,undefined4 param_2)" identifier (parameter_list "(byte *param_1,undefined4 param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "undefined1 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (if_statement "if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }" if (parenthesized_expression "(DAT_0006a4e4 != 0)" ( (binary_expression "DAT_0006a4e4 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }" { (expression_statement "uVar4 = FUN_000382c0();" (assignment_expression "uVar4 = FUN_000382c0()" identifier = (call_expression "FUN_000382c0()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "sVar5 = strlen((char *)param_1);" (assignment_expression "sVar5 = strlen((char *)param_1)" identifier = (call_expression "strlen((char *)param_1)" identifier (argument_list "((char *)param_1)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__ptr = (undefined1 *)xmalloc(sVar5 + 1);" (assignment_expression "__ptr = (undefined1 *)xmalloc(sVar5 + 1)" identifier = (cast_expression "(undefined1 *)xmalloc(sVar5 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar5 + 1)" identifier (argument_list "(sVar5 + 1)" ( (binary_expression "sVar5 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = PTR__sch_toupper_00069ff0;" (assignment_expression "puVar3 = PTR__sch_toupper_00069ff0" identifier = identifier) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar2 = __ptr;" (assignment_expression "puVar2 = __ptr" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "*puVar2 = puVar3[bVar1];" (assignment_expression "*puVar2 = puVar3[bVar1]" (pointer_expression "*puVar2" * identifier) = (subscript_expression "puVar3[bVar1]" identifier [ identifier ])) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "uVar4 = FUN_000382c0(__ptr,param_2);" (assignment_expression "uVar4 = FUN_000382c0(__ptr,param_2)" identifier = (call_expression "FUN_000382c0(__ptr,param_2)" identifier (argument_list "(__ptr,param_2)" ( identifier , identifier )))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsymbolS * symbol_find_noref(char *name,int noref)\n\n{\n  byte bVar1;\n  char *pcVar2;\n  undefined *puVar3;\n  symbolS *psVar4;\n  size_t sVar5;\n  char *name_00;\n  \n  if (symbols_case_sensitive != 0) {\n    psVar4 = symbol_find_exact_noref(name,noref);\n    return psVar4;\n  }\n  sVar5 = strlen(name);\n  name_00 = (char *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *name;\n  pcVar2 = name_00;\n  while (bVar1 != 0) {\n    name = (char *)((byte *)name + 1);\n    *pcVar2 = puVar3[bVar1];\n    pcVar2 = pcVar2 + 1;\n    bVar1 = *name;\n  }\n  *pcVar2 = '\0';\n  psVar4 = symbol_find_exact_noref(name_00,noref);\n  free(name_00);\n  return psVar4;\n}\n\n" comment (function_definition "symbolS * symbol_find_noref(char *name,int noref)\n\n{\n  byte bVar1;\n  char *pcVar2;\n  undefined *puVar3;\n  symbolS *psVar4;\n  size_t sVar5;\n  char *name_00;\n  \n  if (symbols_case_sensitive != 0) {\n    psVar4 = symbol_find_exact_noref(name,noref);\n    return psVar4;\n  }\n  sVar5 = strlen(name);\n  name_00 = (char *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *name;\n  pcVar2 = name_00;\n  while (bVar1 != 0) {\n    name = (char *)((byte *)name + 1);\n    *pcVar2 = puVar3[bVar1];\n    pcVar2 = pcVar2 + 1;\n    bVar1 = *name;\n  }\n  *pcVar2 = '\0';\n  psVar4 = symbol_find_exact_noref(name_00,noref);\n  free(name_00);\n  return psVar4;\n}" type_identifier (pointer_declarator "* symbol_find_noref(char *name,int noref)" * (function_declarator "symbol_find_noref(char *name,int noref)" identifier (parameter_list "(char *name,int noref)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "int noref" primitive_type identifier) )))) (compound_statement "{\n  byte bVar1;\n  char *pcVar2;\n  undefined *puVar3;\n  symbolS *psVar4;\n  size_t sVar5;\n  char *name_00;\n  \n  if (symbols_case_sensitive != 0) {\n    psVar4 = symbol_find_exact_noref(name,noref);\n    return psVar4;\n  }\n  sVar5 = strlen(name);\n  name_00 = (char *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *name;\n  pcVar2 = name_00;\n  while (bVar1 != 0) {\n    name = (char *)((byte *)name + 1);\n    *pcVar2 = puVar3[bVar1];\n    pcVar2 = pcVar2 + 1;\n    bVar1 = *name;\n  }\n  *pcVar2 = '\0';\n  psVar4 = symbol_find_exact_noref(name_00,noref);\n  free(name_00);\n  return psVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "symbolS *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "char *name_00;" primitive_type (pointer_declarator "*name_00" * identifier) ;) (if_statement "if (symbols_case_sensitive != 0) {\n    psVar4 = symbol_find_exact_noref(name,noref);\n    return psVar4;\n  }" if (parenthesized_expression "(symbols_case_sensitive != 0)" ( (binary_expression "symbols_case_sensitive != 0" identifier != number_literal) )) (compound_statement "{\n    psVar4 = symbol_find_exact_noref(name,noref);\n    return psVar4;\n  }" { (expression_statement "psVar4 = symbol_find_exact_noref(name,noref);" (assignment_expression "psVar4 = symbol_find_exact_noref(name,noref)" identifier = (call_expression "symbol_find_exact_noref(name,noref)" identifier (argument_list "(name,noref)" ( identifier , identifier )))) ;) (return_statement "return psVar4;" return identifier ;) })) (expression_statement "sVar5 = strlen(name);" (assignment_expression "sVar5 = strlen(name)" identifier = (call_expression "strlen(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "name_00 = (char *)xmalloc(sVar5 + 1);" (assignment_expression "name_00 = (char *)xmalloc(sVar5 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar5 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar5 + 1)" identifier (argument_list "(sVar5 + 1)" ( (binary_expression "sVar5 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = PTR__sch_toupper_00069ff0;" (assignment_expression "puVar3 = PTR__sch_toupper_00069ff0" identifier = identifier) ;) (expression_statement "bVar1 = *name;" (assignment_expression "bVar1 = *name" identifier = (pointer_expression "*name" * identifier)) ;) (expression_statement "pcVar2 = name_00;" (assignment_expression "pcVar2 = name_00" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\n    name = (char *)((byte *)name + 1);\n    *pcVar2 = puVar3[bVar1];\n    pcVar2 = pcVar2 + 1;\n    bVar1 = *name;\n  }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    name = (char *)((byte *)name + 1);\n    *pcVar2 = puVar3[bVar1];\n    pcVar2 = pcVar2 + 1;\n    bVar1 = *name;\n  }" { (expression_statement "name = (char *)((byte *)name + 1);" (assignment_expression "name = (char *)((byte *)name + 1)" identifier = (cast_expression "(char *)((byte *)name + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)name + 1)" ( (binary_expression "(byte *)name + 1" (cast_expression "(byte *)name" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "*pcVar2 = puVar3[bVar1];" (assignment_expression "*pcVar2 = puVar3[bVar1]" (pointer_expression "*pcVar2" * identifier) = (subscript_expression "puVar3[bVar1]" identifier [ identifier ])) ;) (expression_statement "pcVar2 = pcVar2 + 1;" (assignment_expression "pcVar2 = pcVar2 + 1" identifier = (binary_expression "pcVar2 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = *name;" (assignment_expression "bVar1 = *name" identifier = (pointer_expression "*name" * identifier)) ;) })) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "psVar4 = symbol_find_exact_noref(name_00,noref);" (assignment_expression "psVar4 = symbol_find_exact_noref(name_00,noref)" identifier = (call_expression "symbol_find_exact_noref(name_00,noref)" identifier (argument_list "(name_00,noref)" ( identifier , identifier )))) ;) (expression_statement "free(name_00);" (call_expression "free(name_00)" identifier (argument_list "(name_00)" ( identifier ))) ;) (return_statement "return psVar4;" return identifier ;) })))
(translation_unit "undefined4 FUN_00038350(byte *param_1,undefined4 param_2)\n\n{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}\n\n" (function_definition "undefined4 FUN_00038350(byte *param_1,undefined4 param_2)\n\n{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00038350(byte *param_1,undefined4 param_2)" identifier (parameter_list "(byte *param_1,undefined4 param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "undefined1 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (if_statement "if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }" if (parenthesized_expression "(DAT_0006a4e4 != 0)" ( (binary_expression "DAT_0006a4e4 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }" { (expression_statement "uVar4 = FUN_000382c0();" (assignment_expression "uVar4 = FUN_000382c0()" identifier = (call_expression "FUN_000382c0()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "sVar5 = strlen((char *)param_1);" (assignment_expression "sVar5 = strlen((char *)param_1)" identifier = (call_expression "strlen((char *)param_1)" identifier (argument_list "((char *)param_1)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__ptr = (undefined1 *)xmalloc(sVar5 + 1);" (assignment_expression "__ptr = (undefined1 *)xmalloc(sVar5 + 1)" identifier = (cast_expression "(undefined1 *)xmalloc(sVar5 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar5 + 1)" identifier (argument_list "(sVar5 + 1)" ( (binary_expression "sVar5 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = PTR__sch_toupper_00069ff0;" (assignment_expression "puVar3 = PTR__sch_toupper_00069ff0" identifier = identifier) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar2 = __ptr;" (assignment_expression "puVar2 = __ptr" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "*puVar2 = puVar3[bVar1];" (assignment_expression "*puVar2 = puVar3[bVar1]" (pointer_expression "*puVar2" * identifier) = (subscript_expression "puVar3[bVar1]" identifier [ identifier ])) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "uVar4 = FUN_000382c0(__ptr,param_2);" (assignment_expression "uVar4 = FUN_000382c0(__ptr,param_2)" identifier = (call_expression "FUN_000382c0(__ptr,param_2)" identifier (argument_list "(__ptr,param_2)" ( identifier , identifier )))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ IDENT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00038350(byte *param_1,undefined4 param_2)\n\n{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}" (type_identifier "undefined4") (function_declarator "FUN_00038350(byte *param_1,undefined4 param_2)" (identifier "FUN_00038350") (parameter_list "(byte *param_1,undefined4 param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte bVar1;\n  undefined1 *puVar2;\n  undefined *puVar3;\n  undefined4 uVar4;\n  size_t sVar5;\n  undefined1 *__ptr;\n  \n  if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }\n  sVar5 = strlen((char *)param_1);\n  __ptr = (undefined1 *)xmalloc(sVar5 + 1);\n  puVar3 = PTR__sch_toupper_00069ff0;\n  bVar1 = *param_1;\n  puVar2 = __ptr;\n  while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }\n  *puVar2 = 0;\n  uVar4 = FUN_000382c0(__ptr,param_2);\n  free(__ptr);\n  return uVar4;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "undefined1 *__ptr;" (type_identifier "undefined1") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (if_statement "if (DAT_0006a4e4 != 0) {\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(DAT_0006a4e4 != 0)" (( "(") (binary_expression "DAT_0006a4e4 != 0" (identifier "DAT_0006a4e4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar4 = FUN_000382c0();\n    return uVar4;\n  }" ({ "{") (expression_statement "uVar4 = FUN_000382c0();" (assignment_expression "uVar4 = FUN_000382c0()" (identifier "uVar4") (= "=") (call_expression "FUN_000382c0()" (identifier "FUN_000382c0") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "sVar5 = strlen((char *)param_1);" (assignment_expression "sVar5 = strlen((char *)param_1)" (identifier "sVar5") (= "=") (call_expression "strlen((char *)param_1)" (identifier "strlen") (argument_list "((char *)param_1)" (( "(") (cast_expression "(char *)param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")) () ")")))) (; ";")) (expression_statement "__ptr = (undefined1 *)xmalloc(sVar5 + 1);" (assignment_expression "__ptr = (undefined1 *)xmalloc(sVar5 + 1)" (identifier "__ptr") (= "=") (cast_expression "(undefined1 *)xmalloc(sVar5 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar5 + 1)" (identifier "xmalloc") (argument_list "(sVar5 + 1)" (( "(") (binary_expression "sVar5 + 1" (identifier "sVar5") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "puVar3 = PTR__sch_toupper_00069ff0;" (assignment_expression "puVar3 = PTR__sch_toupper_00069ff0" (identifier "puVar3") (= "=") (identifier "PTR__sch_toupper_00069ff0")) (; ";")) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "puVar2 = __ptr;" (assignment_expression "puVar2 = __ptr" (identifier "puVar2") (= "=") (identifier "__ptr")) (; ";")) (while_statement "while (bVar1 != 0) {\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }" (while "while") (parenthesized_expression "(bVar1 != 0)" (( "(") (binary_expression "bVar1 != 0" (identifier "bVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    param_1 = param_1 + 1;\n    *puVar2 = puVar3[bVar1];\n    puVar2 = puVar2 + 1;\n    bVar1 = *param_1;\n  }" ({ "{") (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar2 = puVar3[bVar1];" (assignment_expression "*puVar2 = puVar3[bVar1]" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (subscript_expression "puVar3[bVar1]" (identifier "puVar3") ([ "[") (identifier "bVar1") (] "]"))) (; ";")) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}"))) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = FUN_000382c0(__ptr,param_2);" (assignment_expression "uVar4 = FUN_000382c0(__ptr,param_2)" (identifier "uVar4") (= "=") (call_expression "FUN_000382c0(__ptr,param_2)" (identifier "FUN_000382c0") (argument_list "(__ptr,param_2)" (( "(") (identifier "__ptr") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

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

type_1 * function_1(char *name,int noref)

{
  type_2 var_6;
  char *var_7;
  type_3 *puVar3;
  type_1 *psVar4;
  size_t var_5;
  char *name_00;
  
  if (var_1 != 0) {
    psVar4 = var_2(name,noref);
    return psVar4;
  }
  var_5 = var_3(name);
  name_00 = (char *)var_4(var_5 + 1);
  puVar3 = PTR__sch_toupper_00069ff0;
  var_6 = *name;
  var_7 = name_00;
  while (var_6 != 0) {
    name = (char *)((type_2 *)name + 1);
    *var_7 = puVar3[var_6];
    var_7 = var_7 + 1;
    var_6 = *name;
  }
  *var_7 = '\0';
  psVar4 = var_2(name_00,noref);
  var_8(name_00);
  return psVar4;
}


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

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

undefined4 MASKED(byte *param_1,undefined4 param_2)

{
  byte bVar1;
  undefined1 *puVar2;
  undefined *puVar3;
  undefined4 uVar4;
  size_t sVar5;
  undefined1 *__ptr;
  
  if (DAT_0006a4e4 != 0) {
    uVar4 = FUN_000382c0();
    return uVar4;
  }
  sVar5 = strlen((char *)param_1);
  __ptr = (undefined1 *)xmalloc(sVar5 + 1);
  puVar3 = PTR__sch_toupper_00069ff0;
  bVar1 = *param_1;
  puVar2 = __ptr;
  while (bVar1 != 0) {
    param_1 = param_1 + 1;
    *puVar2 = puVar3[bVar1];
    puVar2 = puVar2 + 1;
    bVar1 = *param_1;
  }
  *puVar2 = 0;
  uVar4 = FUN_000382c0(__ptr,param_2);
  free(__ptr);
  return uVar4;
}

