
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

char * MagickToMime(char *magick)

{
  int iVar1;
  ExceptionInfo *exception;
  MimeInfo *mime_info;
  char *pcVar2;
  int in_GS_OFFSET;
  char filename [4096];
  char media [4096];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  FormatLocaleString(filename,0x1000,"file.%s",magick);
  LocaleLower(filename);
  exception = AcquireExceptionInfo();
  mime_info = GetMimeInfo(filename," ",1,exception);
  DestroyExceptionInfo(exception);
  if (mime_info == (MimeInfo *)0x0) {
    FormatLocaleString(media,0x1000,"image/x-%s",magick);
    LocaleLower(media + 8);
    pcVar2 = ConstantString(media);
  }
  else {
    pcVar2 = GetMimeType(mime_info);
    pcVar2 = ConstantString(pcVar2);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pcVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void MagickToMime(undefined4 param_1)

{
  undefined4 uVar1;
  int iVar2;
  int in_GS_OFFSET;
  undefined1 local_2020 [4096];
  undefined1 local_1020 [8];
  undefined1 local_1018 [4088];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x10f7c9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);
  LocaleLower(local_2020);
  uVar1 = AcquireExceptionInfo();
  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);
  DestroyExceptionInfo(uVar1);
  if (iVar2 == 0) {
    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);
    LocaleLower(local_1018);
    ConstantString(local_1020);
  }
  else {
    uVar1 = GetMimeType(iVar2);
    ConstantString(uVar1);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_002decd0();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00039d70
ADD EBX,0x30e837
SUB ESP,0x201c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x200c],EAX
XOR EAX,EAX
MOV EBP,dword ptr [ESP + 0x2030]
PUSH EBP
LEA EAX,[EBX + 0xffedc87a]
PUSH EAX
PUSH 0x1000
LEA ESI,[ESP + 0x18]
PUSH ESI
CALL 0x000334e0
MOV dword ptr [ESP],ESI
CALL 0x000335c0
ADD ESP,0x10
CALL 0x00032f50
PUSH EAX
MOV EDI,EAX
LEA EAX,[EBX + 0xffeee194]
PUSH 0x1
PUSH EAX
PUSH ESI
CALL 0x00030a10
MOV dword ptr [ESP],EDI
MOV ESI,EAX
CALL 0x000335b0
ADD ESP,0x10
TEST ESI,ESI
JZ 0x0010f868
SUB ESP,0xc
PUSH ESI
CALL 0x00033000
MOV dword ptr [ESP],EAX
CALL 0x00033ab8
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x200c]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x0010f89d
ADD ESP,0x201c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xffedc882]
PUSH EBP
PUSH EAX
PUSH 0x1000
LEA ESI,[ESP + 0x1018]
PUSH ESI
CALL 0x000334e0
POP EAX
LEA EAX,[ESP + 0x1020]
PUSH EAX
CALL 0x000335c0
MOV dword ptr [ESP],ESI
CALL 0x00033ab8
ADD ESP,0x10
JMP 0x0010f849
CALL 0x002decd0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid MagickToMime(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_002decd0();\n}\n\n" comment (function_definition "void MagickToMime(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_002decd0();\n}" primitive_type (function_declarator "MagickToMime(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_002decd0();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2020 [4096];" type_identifier (array_declarator "local_2020 [4096]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1020 [8];" type_identifier (array_declarator "local_1020 [8]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1018 [4088];" type_identifier (array_declarator "local_1018 [4088]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x10f7c9;" (assignment_expression "uStack_14 = 0x10f7c9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FormatLocaleString(local_2020,0x1000,"file.%s",param_1);" (call_expression "FormatLocaleString(local_2020,0x1000,"file.%s",param_1)" identifier (argument_list "(local_2020,0x1000,"file.%s",param_1)" ( identifier , number_literal , (string_literal ""file.%s"" " string_content ") , identifier ))) ;) (expression_statement "LocaleLower(local_2020);" (call_expression "LocaleLower(local_2020)" identifier (argument_list "(local_2020)" ( identifier ))) ;) (expression_statement "uVar1 = AcquireExceptionInfo();" (assignment_expression "uVar1 = AcquireExceptionInfo()" identifier = (call_expression "AcquireExceptionInfo()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);" (assignment_expression "iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1)" identifier = (call_expression "GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1)" identifier (argument_list "(local_2020,&DAT_0030c194,1,uVar1)" ( identifier , (pointer_expression "&DAT_0030c194" & identifier) , number_literal , identifier )))) ;) (expression_statement "DestroyExceptionInfo(uVar1);" (call_expression "DestroyExceptionInfo(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (if_statement "if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }" { (expression_statement "FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);" (call_expression "FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1)" identifier (argument_list "(local_1020,0x1000,"image/x-%s",param_1)" ( identifier , number_literal , (string_literal ""image/x-%s"" " string_content ") , identifier ))) ;) (expression_statement "LocaleLower(local_1018);" (call_expression "LocaleLower(local_1018)" identifier (argument_list "(local_1018)" ( identifier ))) ;) (expression_statement "ConstantString(local_1020);" (call_expression "ConstantString(local_1020)" identifier (argument_list "(local_1020)" ( identifier ))) ;) }) (else_clause "else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" else (compound_statement "{\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" { (expression_statement "uVar1 = GetMimeType(iVar2);" (assignment_expression "uVar1 = GetMimeType(iVar2)" identifier = (call_expression "GetMimeType(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "ConstantString(uVar1);" (call_expression "ConstantString(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_002decd0();" (call_expression "FUN_002decd0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n\nchar * MagickToMime(char *magick)\n\n{\n  int iVar1;\n  ExceptionInfo *exception;\n  MimeInfo *mime_info;\n  char *pcVar2;\n  int in_GS_OFFSET;\n  char filename [4096];\n  char media [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(filename,0x1000,"file.%s",magick);\n  LocaleLower(filename);\n  exception = AcquireExceptionInfo();\n  mime_info = GetMimeInfo(filename," ",1,exception);\n  DestroyExceptionInfo(exception);\n  if (mime_info == (MimeInfo *)0x0) {\n    FormatLocaleString(media,0x1000,"image/x-%s",magick);\n    LocaleLower(media + 8);\n    pcVar2 = ConstantString(media);\n  }\n  else {\n    pcVar2 = GetMimeType(mime_info);\n    pcVar2 = ConstantString(pcVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "char * MagickToMime(char *magick)\n\n{\n  int iVar1;\n  ExceptionInfo *exception;\n  MimeInfo *mime_info;\n  char *pcVar2;\n  int in_GS_OFFSET;\n  char filename [4096];\n  char media [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(filename,0x1000,"file.%s",magick);\n  LocaleLower(filename);\n  exception = AcquireExceptionInfo();\n  mime_info = GetMimeInfo(filename," ",1,exception);\n  DestroyExceptionInfo(exception);\n  if (mime_info == (MimeInfo *)0x0) {\n    FormatLocaleString(media,0x1000,"image/x-%s",magick);\n    LocaleLower(media + 8);\n    pcVar2 = ConstantString(media);\n  }\n  else {\n    pcVar2 = GetMimeType(mime_info);\n    pcVar2 = ConstantString(pcVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (pointer_declarator "* MagickToMime(char *magick)" * (function_declarator "MagickToMime(char *magick)" identifier (parameter_list "(char *magick)" ( (parameter_declaration "char *magick" primitive_type (pointer_declarator "*magick" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  ExceptionInfo *exception;\n  MimeInfo *mime_info;\n  char *pcVar2;\n  int in_GS_OFFSET;\n  char filename [4096];\n  char media [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(filename,0x1000,"file.%s",magick);\n  LocaleLower(filename);\n  exception = AcquireExceptionInfo();\n  mime_info = GetMimeInfo(filename," ",1,exception);\n  DestroyExceptionInfo(exception);\n  if (mime_info == (MimeInfo *)0x0) {\n    FormatLocaleString(media,0x1000,"image/x-%s",magick);\n    LocaleLower(media + 8);\n    pcVar2 = ConstantString(media);\n  }\n  else {\n    pcVar2 = GetMimeType(mime_info);\n    pcVar2 = ConstantString(pcVar2);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ExceptionInfo *exception;" type_identifier (pointer_declarator "*exception" * identifier) ;) (declaration "MimeInfo *mime_info;" type_identifier (pointer_declarator "*mime_info" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char filename [4096];" primitive_type (array_declarator "filename [4096]" identifier [ number_literal ]) ;) (declaration "char media [4096];" primitive_type (array_declarator "media [4096]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FormatLocaleString(filename,0x1000,"file.%s",magick);" (call_expression "FormatLocaleString(filename,0x1000,"file.%s",magick)" identifier (argument_list "(filename,0x1000,"file.%s",magick)" ( identifier , number_literal , (string_literal ""file.%s"" " string_content ") , identifier ))) ;) (expression_statement "LocaleLower(filename);" (call_expression "LocaleLower(filename)" identifier (argument_list "(filename)" ( identifier ))) ;) (expression_statement "exception = AcquireExceptionInfo();" (assignment_expression "exception = AcquireExceptionInfo()" identifier = (call_expression "AcquireExceptionInfo()" identifier (argument_list "()" ( )))) ;) (expression_statement "mime_info = GetMimeInfo(filename," ",1,exception);" (assignment_expression "mime_info = GetMimeInfo(filename," ",1,exception)" identifier = (call_expression "GetMimeInfo(filename," ",1,exception)" identifier (argument_list "(filename," ",1,exception)" ( identifier , (string_literal "" "" " string_content ") , number_literal , identifier )))) ;) (expression_statement "DestroyExceptionInfo(exception);" (call_expression "DestroyExceptionInfo(exception)" identifier (argument_list "(exception)" ( identifier ))) ;) (if_statement "if (mime_info == (MimeInfo *)0x0) {\n    FormatLocaleString(media,0x1000,"image/x-%s",magick);\n    LocaleLower(media + 8);\n    pcVar2 = ConstantString(media);\n  }\n  else {\n    pcVar2 = GetMimeType(mime_info);\n    pcVar2 = ConstantString(pcVar2);\n  }" if (parenthesized_expression "(mime_info == (MimeInfo *)0x0)" ( (binary_expression "mime_info == (MimeInfo *)0x0" identifier == (cast_expression "(MimeInfo *)0x0" ( (type_descriptor "MimeInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    FormatLocaleString(media,0x1000,"image/x-%s",magick);\n    LocaleLower(media + 8);\n    pcVar2 = ConstantString(media);\n  }" { (expression_statement "FormatLocaleString(media,0x1000,"image/x-%s",magick);" (call_expression "FormatLocaleString(media,0x1000,"image/x-%s",magick)" identifier (argument_list "(media,0x1000,"image/x-%s",magick)" ( identifier , number_literal , (string_literal ""image/x-%s"" " string_content ") , identifier ))) ;) (expression_statement "LocaleLower(media + 8);" (call_expression "LocaleLower(media + 8)" identifier (argument_list "(media + 8)" ( (binary_expression "media + 8" identifier + number_literal) ))) ;) (expression_statement "pcVar2 = ConstantString(media);" (assignment_expression "pcVar2 = ConstantString(media)" identifier = (call_expression "ConstantString(media)" identifier (argument_list "(media)" ( identifier )))) ;) }) (else_clause "else {\n    pcVar2 = GetMimeType(mime_info);\n    pcVar2 = ConstantString(pcVar2);\n  }" else (compound_statement "{\n    pcVar2 = GetMimeType(mime_info);\n    pcVar2 = ConstantString(pcVar2);\n  }" { (expression_statement "pcVar2 = GetMimeType(mime_info);" (assignment_expression "pcVar2 = GetMimeType(mime_info)" identifier = (call_expression "GetMimeType(mime_info)" identifier (argument_list "(mime_info)" ( identifier )))) ;) (expression_statement "pcVar2 = ConstantString(pcVar2);" (assignment_expression "pcVar2 = ConstantString(pcVar2)" identifier = (call_expression "ConstantString(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) }))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return pcVar2;\n  }" { (return_statement "return pcVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void MagickToMime(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_002decd0();\n}\n\n" (function_definition "void MagickToMime(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_002decd0();\n}" primitive_type (function_declarator "MagickToMime(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_002decd0();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2020 [4096];" type_identifier (array_declarator "local_2020 [4096]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1020 [8];" type_identifier (array_declarator "local_1020 [8]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1018 [4088];" type_identifier (array_declarator "local_1018 [4088]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x10f7c9;" (assignment_expression "uStack_14 = 0x10f7c9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FormatLocaleString(local_2020,0x1000,"file.%s",param_1);" (call_expression "FormatLocaleString(local_2020,0x1000,"file.%s",param_1)" identifier (argument_list "(local_2020,0x1000,"file.%s",param_1)" ( identifier , number_literal , (string_literal ""file.%s"" " string_content ") , identifier ))) ;) (expression_statement "LocaleLower(local_2020);" (call_expression "LocaleLower(local_2020)" identifier (argument_list "(local_2020)" ( identifier ))) ;) (expression_statement "uVar1 = AcquireExceptionInfo();" (assignment_expression "uVar1 = AcquireExceptionInfo()" identifier = (call_expression "AcquireExceptionInfo()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);" (assignment_expression "iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1)" identifier = (call_expression "GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1)" identifier (argument_list "(local_2020,&DAT_0030c194,1,uVar1)" ( identifier , (pointer_expression "&DAT_0030c194" & identifier) , number_literal , identifier )))) ;) (expression_statement "DestroyExceptionInfo(uVar1);" (call_expression "DestroyExceptionInfo(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (if_statement "if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }" { (expression_statement "FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);" (call_expression "FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1)" identifier (argument_list "(local_1020,0x1000,"image/x-%s",param_1)" ( identifier , number_literal , (string_literal ""image/x-%s"" " string_content ") , identifier ))) ;) (expression_statement "LocaleLower(local_1018);" (call_expression "LocaleLower(local_1018)" identifier (argument_list "(local_1018)" ( identifier ))) ;) (expression_statement "ConstantString(local_1020);" (call_expression "ConstantString(local_1020)" identifier (argument_list "(local_1020)" ( identifier ))) ;) }) (else_clause "else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" else (compound_statement "{\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" { (expression_statement "uVar1 = GetMimeType(iVar2);" (assignment_expression "uVar1 = GetMimeType(iVar2)" identifier = (call_expression "GetMimeType(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "ConstantString(uVar1);" (call_expression "ConstantString(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_002decd0();" (call_expression "FUN_002decd0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void MagickToMime(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_002decd0();\n}" (primitive_type "void") (function_declarator "MagickToMime(undefined4 param_1)" (identifier "MagickToMime") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [8];\n  undefined1 local_1018 [4088];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x10f7c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);\n  LocaleLower(local_2020);\n  uVar1 = AcquireExceptionInfo();\n  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);\n  DestroyExceptionInfo(uVar1);\n  if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_002decd0();\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_2020 [4096];" (type_identifier "undefined1") (array_declarator "local_2020 [4096]" (identifier "local_2020") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "undefined1 local_1020 [8];" (type_identifier "undefined1") (array_declarator "local_1020 [8]" (identifier "local_1020") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "undefined1 local_1018 [4088];" (type_identifier "undefined1") (array_declarator "local_1018 [4088]" (identifier "local_1018") ([ "[") (number_literal "4088") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x10f7c9;" (assignment_expression "uStack_14 = 0x10f7c9" (identifier "uStack_14") (= "=") (number_literal "0x10f7c9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "FormatLocaleString(local_2020,0x1000,"file.%s",param_1);" (call_expression "FormatLocaleString(local_2020,0x1000,"file.%s",param_1)" (identifier "FormatLocaleString") (argument_list "(local_2020,0x1000,"file.%s",param_1)" (( "(") (identifier "local_2020") (, ",") (number_literal "0x1000") (, ",") (string_literal ""file.%s"" (" """) (string_content "file.%s") (" """)) (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "LocaleLower(local_2020);" (call_expression "LocaleLower(local_2020)" (identifier "LocaleLower") (argument_list "(local_2020)" (( "(") (identifier "local_2020") () ")"))) (; ";")) (expression_statement "uVar1 = AcquireExceptionInfo();" (assignment_expression "uVar1 = AcquireExceptionInfo()" (identifier "uVar1") (= "=") (call_expression "AcquireExceptionInfo()" (identifier "AcquireExceptionInfo") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);" (assignment_expression "iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1)" (identifier "iVar2") (= "=") (call_expression "GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1)" (identifier "GetMimeInfo") (argument_list "(local_2020,&DAT_0030c194,1,uVar1)" (( "(") (identifier "local_2020") (, ",") (pointer_expression "&DAT_0030c194" (& "&") (identifier "DAT_0030c194")) (, ",") (number_literal "1") (, ",") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "DestroyExceptionInfo(uVar1);" (call_expression "DestroyExceptionInfo(uVar1)" (identifier "DestroyExceptionInfo") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (if_statement "if (iVar2 == 0) {\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }\n  else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);\n    LocaleLower(local_1018);\n    ConstantString(local_1020);\n  }" ({ "{") (expression_statement "FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);" (call_expression "FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1)" (identifier "FormatLocaleString") (argument_list "(local_1020,0x1000,"image/x-%s",param_1)" (( "(") (identifier "local_1020") (, ",") (number_literal "0x1000") (, ",") (string_literal ""image/x-%s"" (" """) (string_content "image/x-%s") (" """)) (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "LocaleLower(local_1018);" (call_expression "LocaleLower(local_1018)" (identifier "LocaleLower") (argument_list "(local_1018)" (( "(") (identifier "local_1018") () ")"))) (; ";")) (expression_statement "ConstantString(local_1020);" (call_expression "ConstantString(local_1020)" (identifier "ConstantString") (argument_list "(local_1020)" (( "(") (identifier "local_1020") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" (else "else") (compound_statement "{\n    uVar1 = GetMimeType(iVar2);\n    ConstantString(uVar1);\n  }" ({ "{") (expression_statement "uVar1 = GetMimeType(iVar2);" (assignment_expression "uVar1 = GetMimeType(iVar2)" (identifier "uVar1") (= "=") (call_expression "GetMimeType(iVar2)" (identifier "GetMimeType") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "ConstantString(uVar1);" (call_expression "ConstantString(uVar1)" (identifier "ConstantString") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_002decd0();" (call_expression "FUN_002decd0()" (identifier "FUN_002decd0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

char * function_1(char *magick)

{
  int var_11;
  type_1 *exception;
  type_2 *var_7;
  char *pcVar2;
  int var_1;
  char filename [4096];
  char var_8 [4096];
  
  var_11 = *(int *)(var_1 + 0x14);
  var_2(filename,0x1000,"file.%s",magick);
  var_3(filename);
  exception = var_4();
  var_7 = var_5(filename," ",1,exception);
  var_6(exception);
  if (var_7 == (type_2 *)0x0) {
    var_2(var_8,0x1000,"image/x-%s",magick);
    var_3(var_8 + 8);
    pcVar2 = var_9(var_8);
  }
  else {
    pcVar2 = var_10(var_7);
    pcVar2 = var_9(pcVar2);
  }
  if (var_11 == *(int *)(var_1 + 0x14)) {
    return pcVar2;
  }
                    /* WARNING: Subroutine does not return */
  var_12();
}


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

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

void MASKED(undefined4 param_1)

{
  undefined4 uVar1;
  int iVar2;
  int in_GS_OFFSET;
  undefined1 local_2020 [4096];
  undefined1 local_1020 [8];
  undefined1 local_1018 [4088];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x10f7c9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FormatLocaleString(local_2020,0x1000,"file.%s",param_1);
  LocaleLower(local_2020);
  uVar1 = AcquireExceptionInfo();
  iVar2 = GetMimeInfo(local_2020,&DAT_0030c194,1,uVar1);
  DestroyExceptionInfo(uVar1);
  if (iVar2 == 0) {
    FormatLocaleString(local_1020,0x1000,"image/x-%s",param_1);
    LocaleLower(local_1018);
    ConstantString(local_1020);
  }
  else {
    uVar1 = GetMimeType(iVar2);
    ConstantString(uVar1);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_002decd0();
}

