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

MagickBooleanType GetExecutionPath(char *path,size_t extent)

{
  int iVar1;
  __pid_t _Var2;
  int iVar3;
  MagickBooleanType MVar4;
  int in_GS_OFFSET;
  char link_path [4096];
  char execution_path [4097];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  *path = '\0';
  getcwd(path,extent);
  _Var2 = getpid();
  FormatLocaleString(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2);
  iVar3 = readlink(link_path,execution_path,0x1000);
  if (iVar3 == -1) {
    _Var2 = getpid();
    FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);
    iVar3 = readlink(link_path,execution_path,0x1000);
  }
  if (iVar3 - 1U < 0x1000) {
    execution_path[iVar3] = '\0';
    CopyMagickString(path,execution_path,extent);
  }
  MVar4 = IsPathAccessible(path);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return MVar4;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void FUN_001b2e70(char *param_1,size_t param_2)

{
  __pid_t _Var1;
  int iVar2;
  int in_GS_OFFSET;
  char local_2021 [4096];
  char local_1021 [4097];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1b2e79;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_1 = '\0';
  getcwd(param_1,param_2);
  _Var1 = getpid();
  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);
  iVar2 = readlink(local_2021,local_1021,0x1000);
  if (iVar2 == -1) {
    _Var1 = getpid();
    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);
    iVar2 = readlink(local_2021,local_1021,0x1000);
  }
  if (iVar2 - 1U < 0x1000) {
    local_1021[iVar2] = '\0';
    CopyMagickString();
  }
  IsPathAccessible();
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0029eab0();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00038830
ADD EBX,0x226187
SUB ESP,0x2034
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2024],EAX
XOR EAX,EAX
MOV EBP,dword ptr [ESP + 0x2048]
MOV byte ptr [EBP],0x0
PUSH dword ptr [ESP + 0x204c]
PUSH EBP
CALL 0x00032f20
CALL 0x000307f0
SUB ESP,0x4
MOV dword ptr [ESP + 0x20],EAX
FILD dword ptr [ESP + 0x20]
LEA EAX,[EBX + 0xffef1689]
FSTP qword ptr [ESP]
PUSH EAX
PUSH 0x1000
LEA ESI,[ESP + 0x37]
PUSH ESI
CALL 0x000334e0
ADD ESP,0x1c
PUSH 0x1000
LEA EDI,[ESP + 0x1023]
PUSH EDI
PUSH ESI
CALL 0x00032d20
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x001b2f48
LEA ECX,[EAX + -0x1]
CMP ECX,0xfff
JA 0x001b2f1a
MOV byte ptr [ESP + EAX*0x1 + 0x101b],0x0
SUB ESP,0x4
PUSH dword ptr [ESP + 0x2048]
PUSH EDI
PUSH EBP
CALL 0x00030b70
ADD ESP,0x10
SUB ESP,0xc
PUSH EBP
CALL 0x000339e0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x201c]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x001b2f84
ADD ESP,0x202c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000307f0
SUB ESP,0x14
MOV dword ptr [ESP + 0x20],EAX
FILD dword ptr [ESP + 0x20]
LEA EAX,[EBX + 0xffef1699]
FSTP qword ptr [ESP]
PUSH EAX
PUSH 0x1000
PUSH ESI
CALL 0x000334e0
ADD ESP,0x1c
PUSH 0x1000
PUSH EDI
PUSH ESI
CALL 0x00032d20
ADD ESP,0x10
JMP 0x001b2ef3
CALL 0x0029eab0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_001b2e70(char *param_1,size_t param_2)\n\n{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0029eab0();\n}\n\n" comment (function_definition "void FUN_001b2e70(char *param_1,size_t param_2)\n\n{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0029eab0();\n}" primitive_type (function_declarator "FUN_001b2e70(char *param_1,size_t param_2)" identifier (parameter_list "(char *param_1,size_t param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) ))) (compound_statement "{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0029eab0();\n}" { (declaration "__pid_t _Var1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_2021 [4096];" primitive_type (array_declarator "local_2021 [4096]" identifier [ number_literal ]) ;) (declaration "char local_1021 [4097];" primitive_type (array_declarator "local_1021 [4097]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1b2e79;" (assignment_expression "uStack_14 = 0x1b2e79" 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 "*param_1 = '\0';" (assignment_expression "*param_1 = '\0'" (pointer_expression "*param_1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "getcwd(param_1,param_2);" (call_expression "getcwd(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "_Var1 = getpid();" (assignment_expression "_Var1 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);" (call_expression "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1)" identifier (argument_list "(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1)" ( identifier , number_literal , (string_literal ""/proc/%.20g/exe"" " string_content ") , (cast_expression "(double)_Var1" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (expression_statement "iVar2 = readlink(local_2021,local_1021,0x1000);" (assignment_expression "iVar2 = readlink(local_2021,local_1021,0x1000)" identifier = (call_expression "readlink(local_2021,local_1021,0x1000)" identifier (argument_list "(local_2021,local_1021,0x1000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }" { (expression_statement "_Var1 = getpid();" (assignment_expression "_Var1 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);" (call_expression "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1)" identifier (argument_list "(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1)" ( identifier , number_literal , (string_literal ""/proc/%.20g/file"" " string_content ") , (cast_expression "(double)_Var1" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (expression_statement "iVar2 = readlink(local_2021,local_1021,0x1000);" (assignment_expression "iVar2 = readlink(local_2021,local_1021,0x1000)" identifier = (call_expression "readlink(local_2021,local_1021,0x1000)" identifier (argument_list "(local_2021,local_1021,0x1000)" ( identifier , identifier , number_literal )))) ;) })) (if_statement "if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }" if (parenthesized_expression "(iVar2 - 1U < 0x1000)" ( (binary_expression "iVar2 - 1U < 0x1000" (binary_expression "iVar2 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }" { (expression_statement "local_1021[iVar2] = '\0';" (assignment_expression "local_1021[iVar2] = '\0'" (subscript_expression "local_1021[iVar2]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "CopyMagickString();" (call_expression "CopyMagickString()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "IsPathAccessible();" (call_expression "IsPathAccessible()" identifier (argument_list "()" ( ))) ;) (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_0029eab0();" (call_expression "FUN_0029eab0()" 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\nMagickBooleanType GetExecutionPath(char *path,size_t extent)\n\n{\n  int iVar1;\n  __pid_t _Var2;\n  int iVar3;\n  MagickBooleanType MVar4;\n  int in_GS_OFFSET;\n  char link_path [4096];\n  char execution_path [4097];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  *path = '\0';\n  getcwd(path,extent);\n  _Var2 = getpid();\n  FormatLocaleString(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2);\n  iVar3 = readlink(link_path,execution_path,0x1000);\n  if (iVar3 == -1) {\n    _Var2 = getpid();\n    FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);\n    iVar3 = readlink(link_path,execution_path,0x1000);\n  }\n  if (iVar3 - 1U < 0x1000) {\n    execution_path[iVar3] = '\0';\n    CopyMagickString(path,execution_path,extent);\n  }\n  MVar4 = IsPathAccessible(path);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return MVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "MagickBooleanType GetExecutionPath(char *path,size_t extent)\n\n{\n  int iVar1;\n  __pid_t _Var2;\n  int iVar3;\n  MagickBooleanType MVar4;\n  int in_GS_OFFSET;\n  char link_path [4096];\n  char execution_path [4097];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  *path = '\0';\n  getcwd(path,extent);\n  _Var2 = getpid();\n  FormatLocaleString(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2);\n  iVar3 = readlink(link_path,execution_path,0x1000);\n  if (iVar3 == -1) {\n    _Var2 = getpid();\n    FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);\n    iVar3 = readlink(link_path,execution_path,0x1000);\n  }\n  if (iVar3 - 1U < 0x1000) {\n    execution_path[iVar3] = '\0';\n    CopyMagickString(path,execution_path,extent);\n  }\n  MVar4 = IsPathAccessible(path);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return MVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "GetExecutionPath(char *path,size_t extent)" identifier (parameter_list "(char *path,size_t extent)" ( (parameter_declaration "char *path" primitive_type (pointer_declarator "*path" * identifier)) , (parameter_declaration "size_t extent" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  __pid_t _Var2;\n  int iVar3;\n  MagickBooleanType MVar4;\n  int in_GS_OFFSET;\n  char link_path [4096];\n  char execution_path [4097];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  *path = '\0';\n  getcwd(path,extent);\n  _Var2 = getpid();\n  FormatLocaleString(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2);\n  iVar3 = readlink(link_path,execution_path,0x1000);\n  if (iVar3 == -1) {\n    _Var2 = getpid();\n    FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);\n    iVar3 = readlink(link_path,execution_path,0x1000);\n  }\n  if (iVar3 - 1U < 0x1000) {\n    execution_path[iVar3] = '\0';\n    CopyMagickString(path,execution_path,extent);\n  }\n  MVar4 = IsPathAccessible(path);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return MVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "__pid_t _Var2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "MagickBooleanType MVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char link_path [4096];" primitive_type (array_declarator "link_path [4096]" identifier [ number_literal ]) ;) (declaration "char execution_path [4097];" primitive_type (array_declarator "execution_path [4097]" 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 "*path = '\0';" (assignment_expression "*path = '\0'" (pointer_expression "*path" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "getcwd(path,extent);" (call_expression "getcwd(path,extent)" identifier (argument_list "(path,extent)" ( identifier , identifier ))) ;) (expression_statement "_Var2 = getpid();" (assignment_expression "_Var2 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "FormatLocaleString(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2);" (call_expression "FormatLocaleString(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2)" identifier (argument_list "(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2)" ( identifier , number_literal , (string_literal ""/proc/%.20g/exe"" " string_content ") , (cast_expression "(double)_Var2" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (expression_statement "iVar3 = readlink(link_path,execution_path,0x1000);" (assignment_expression "iVar3 = readlink(link_path,execution_path,0x1000)" identifier = (call_expression "readlink(link_path,execution_path,0x1000)" identifier (argument_list "(link_path,execution_path,0x1000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar3 == -1) {\n    _Var2 = getpid();\n    FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);\n    iVar3 = readlink(link_path,execution_path,0x1000);\n  }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n    _Var2 = getpid();\n    FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);\n    iVar3 = readlink(link_path,execution_path,0x1000);\n  }" { (expression_statement "_Var2 = getpid();" (assignment_expression "_Var2 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);" (call_expression "FormatLocaleString(link_path,0x1000,"/proc/%.20g/file",(double)_Var2)" identifier (argument_list "(link_path,0x1000,"/proc/%.20g/file",(double)_Var2)" ( identifier , number_literal , (string_literal ""/proc/%.20g/file"" " string_content ") , (cast_expression "(double)_Var2" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (expression_statement "iVar3 = readlink(link_path,execution_path,0x1000);" (assignment_expression "iVar3 = readlink(link_path,execution_path,0x1000)" identifier = (call_expression "readlink(link_path,execution_path,0x1000)" identifier (argument_list "(link_path,execution_path,0x1000)" ( identifier , identifier , number_literal )))) ;) })) (if_statement "if (iVar3 - 1U < 0x1000) {\n    execution_path[iVar3] = '\0';\n    CopyMagickString(path,execution_path,extent);\n  }" if (parenthesized_expression "(iVar3 - 1U < 0x1000)" ( (binary_expression "iVar3 - 1U < 0x1000" (binary_expression "iVar3 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n    execution_path[iVar3] = '\0';\n    CopyMagickString(path,execution_path,extent);\n  }" { (expression_statement "execution_path[iVar3] = '\0';" (assignment_expression "execution_path[iVar3] = '\0'" (subscript_expression "execution_path[iVar3]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "CopyMagickString(path,execution_path,extent);" (call_expression "CopyMagickString(path,execution_path,extent)" identifier (argument_list "(path,execution_path,extent)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "MVar4 = IsPathAccessible(path);" (assignment_expression "MVar4 = IsPathAccessible(path)" identifier = (call_expression "IsPathAccessible(path)" identifier (argument_list "(path)" ( identifier )))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return MVar4;\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 MVar4;\n  }" { (return_statement "return MVar4;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_001b2e70(char *param_1,size_t param_2)\n\n{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0029eab0();\n}\n\n" (function_definition "void FUN_001b2e70(char *param_1,size_t param_2)\n\n{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0029eab0();\n}" primitive_type (function_declarator "FUN_001b2e70(char *param_1,size_t param_2)" identifier (parameter_list "(char *param_1,size_t param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) ))) (compound_statement "{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0029eab0();\n}" { (declaration "__pid_t _Var1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_2021 [4096];" primitive_type (array_declarator "local_2021 [4096]" identifier [ number_literal ]) ;) (declaration "char local_1021 [4097];" primitive_type (array_declarator "local_1021 [4097]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1b2e79;" (assignment_expression "uStack_14 = 0x1b2e79" 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 "*param_1 = '\0';" (assignment_expression "*param_1 = '\0'" (pointer_expression "*param_1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "getcwd(param_1,param_2);" (call_expression "getcwd(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "_Var1 = getpid();" (assignment_expression "_Var1 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);" (call_expression "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1)" identifier (argument_list "(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1)" ( identifier , number_literal , (string_literal ""/proc/%.20g/exe"" " string_content ") , (cast_expression "(double)_Var1" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (expression_statement "iVar2 = readlink(local_2021,local_1021,0x1000);" (assignment_expression "iVar2 = readlink(local_2021,local_1021,0x1000)" identifier = (call_expression "readlink(local_2021,local_1021,0x1000)" identifier (argument_list "(local_2021,local_1021,0x1000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }" { (expression_statement "_Var1 = getpid();" (assignment_expression "_Var1 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);" (call_expression "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1)" identifier (argument_list "(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1)" ( identifier , number_literal , (string_literal ""/proc/%.20g/file"" " string_content ") , (cast_expression "(double)_Var1" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (expression_statement "iVar2 = readlink(local_2021,local_1021,0x1000);" (assignment_expression "iVar2 = readlink(local_2021,local_1021,0x1000)" identifier = (call_expression "readlink(local_2021,local_1021,0x1000)" identifier (argument_list "(local_2021,local_1021,0x1000)" ( identifier , identifier , number_literal )))) ;) })) (if_statement "if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }" if (parenthesized_expression "(iVar2 - 1U < 0x1000)" ( (binary_expression "iVar2 - 1U < 0x1000" (binary_expression "iVar2 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }" { (expression_statement "local_1021[iVar2] = '\0';" (assignment_expression "local_1021[iVar2] = '\0'" (subscript_expression "local_1021[iVar2]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "CopyMagickString();" (call_expression "CopyMagickString()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "IsPathAccessible();" (call_expression "IsPathAccessible()" identifier (argument_list "()" ( ))) ;) (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_0029eab0();" (call_expression "FUN_0029eab0()" identifier (argument_list "()" ( ))) ;) })))
(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 IDENT ;) (declaration TYPE IDENT ;) (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 (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (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 FUN_001b2e70(char *param_1,size_t param_2)\n\n{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0029eab0();\n}" (primitive_type "void") (function_declarator "FUN_001b2e70(char *param_1,size_t param_2)" (identifier "FUN_001b2e70") (parameter_list "(char *param_1,size_t param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) () ")"))) (compound_statement "{\n  __pid_t _Var1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char local_2021 [4096];\n  char local_1021 [4097];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1b2e79;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = '\0';\n  getcwd(param_1,param_2);\n  _Var1 = getpid();\n  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);\n  iVar2 = readlink(local_2021,local_1021,0x1000);\n  if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }\n  if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }\n  IsPathAccessible();\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0029eab0();\n}" ({ "{") (declaration "__pid_t _Var1;" (type_identifier "__pid_t") (identifier "_Var1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char local_2021 [4096];" (primitive_type "char") (array_declarator "local_2021 [4096]" (identifier "local_2021") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "char local_1021 [4097];" (primitive_type "char") (array_declarator "local_1021 [4097]" (identifier "local_1021") ([ "[") (number_literal "4097") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1b2e79;" (assignment_expression "uStack_14 = 0x1b2e79" (identifier "uStack_14") (= "=") (number_literal "0x1b2e79")) (; ";")) (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 "*param_1 = '\0';" (assignment_expression "*param_1 = '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "getcwd(param_1,param_2);" (call_expression "getcwd(param_1,param_2)" (identifier "getcwd") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "_Var1 = getpid();" (assignment_expression "_Var1 = getpid()" (identifier "_Var1") (= "=") (call_expression "getpid()" (identifier "getpid") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);" (call_expression "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1)" (identifier "FormatLocaleString") (argument_list "(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1)" (( "(") (identifier "local_2021") (, ",") (number_literal "0x1000") (, ",") (string_literal ""/proc/%.20g/exe"" (" """) (string_content "/proc/%.20g/exe") (" """)) (, ",") (cast_expression "(double)_Var1" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "_Var1")) () ")"))) (; ";")) (expression_statement "iVar2 = readlink(local_2021,local_1021,0x1000);" (assignment_expression "iVar2 = readlink(local_2021,local_1021,0x1000)" (identifier "iVar2") (= "=") (call_expression "readlink(local_2021,local_1021,0x1000)" (identifier "readlink") (argument_list "(local_2021,local_1021,0x1000)" (( "(") (identifier "local_2021") (, ",") (identifier "local_1021") (, ",") (number_literal "0x1000") () ")")))) (; ";")) (if_statement "if (iVar2 == -1) {\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }" (if "if") (parenthesized_expression "(iVar2 == -1)" (( "(") (binary_expression "iVar2 == -1" (identifier "iVar2") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    _Var1 = getpid();\n    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);\n    iVar2 = readlink(local_2021,local_1021,0x1000);\n  }" ({ "{") (expression_statement "_Var1 = getpid();" (assignment_expression "_Var1 = getpid()" (identifier "_Var1") (= "=") (call_expression "getpid()" (identifier "getpid") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);" (call_expression "FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1)" (identifier "FormatLocaleString") (argument_list "(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1)" (( "(") (identifier "local_2021") (, ",") (number_literal "0x1000") (, ",") (string_literal ""/proc/%.20g/file"" (" """) (string_content "/proc/%.20g/file") (" """)) (, ",") (cast_expression "(double)_Var1" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "_Var1")) () ")"))) (; ";")) (expression_statement "iVar2 = readlink(local_2021,local_1021,0x1000);" (assignment_expression "iVar2 = readlink(local_2021,local_1021,0x1000)" (identifier "iVar2") (= "=") (call_expression "readlink(local_2021,local_1021,0x1000)" (identifier "readlink") (argument_list "(local_2021,local_1021,0x1000)" (( "(") (identifier "local_2021") (, ",") (identifier "local_1021") (, ",") (number_literal "0x1000") () ")")))) (; ";")) (} "}"))) (if_statement "if (iVar2 - 1U < 0x1000) {\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }" (if "if") (parenthesized_expression "(iVar2 - 1U < 0x1000)" (( "(") (binary_expression "iVar2 - 1U < 0x1000" (binary_expression "iVar2 - 1U" (identifier "iVar2") (- "-") (number_literal "1U")) (< "<") (number_literal "0x1000")) () ")")) (compound_statement "{\n    local_1021[iVar2] = '\0';\n    CopyMagickString();\n  }" ({ "{") (expression_statement "local_1021[iVar2] = '\0';" (assignment_expression "local_1021[iVar2] = '\0'" (subscript_expression "local_1021[iVar2]" (identifier "local_1021") ([ "[") (identifier "iVar2") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "CopyMagickString();" (call_expression "CopyMagickString()" (identifier "CopyMagickString") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "IsPathAccessible();" (call_expression "IsPathAccessible()" (identifier "IsPathAccessible") (argument_list "()" (( "(") () ")"))) (; ";")) (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_0029eab0();" (call_expression "FUN_0029eab0()" (identifier "FUN_0029eab0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 function_1(char *path,size_t extent)

{
  int var_9;
  type_2 _Var2;
  int var_6;
  type_1 MVar4;
  int var_1;
  char link_path [4096];
  char execution_path [4097];
  
  var_9 = *(int *)(var_1 + 0x14);
  *path = '\0';
  var_2(path,extent);
  _Var2 = var_3();
  var_4(link_path,0x1000,"/proc/%.20g/exe",(double)_Var2);
  var_6 = var_5(link_path,execution_path,0x1000);
  if (var_6 == -1) {
    _Var2 = var_3();
    var_4(link_path,0x1000,"/proc/%.20g/file",(double)_Var2);
    var_6 = var_5(link_path,execution_path,0x1000);
  }
  if (var_6 - 1U < 0x1000) {
    execution_path[var_6] = '\0';
    var_7(path,execution_path,extent);
  }
  MVar4 = var_8(path);
  if (var_9 == *(int *)(var_1 + 0x14)) {
    return MVar4;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) 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 (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (string_literal (string_content)) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (string_literal (string_content)) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (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(char *param_1,size_t param_2)

{
  __pid_t _Var1;
  int iVar2;
  int in_GS_OFFSET;
  char local_2021 [4096];
  char local_1021 [4097];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1b2e79;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_1 = '\0';
  getcwd(param_1,param_2);
  _Var1 = getpid();
  FormatLocaleString(local_2021,0x1000,"/proc/%.20g/exe",(double)_Var1);
  iVar2 = readlink(local_2021,local_1021,0x1000);
  if (iVar2 == -1) {
    _Var1 = getpid();
    FormatLocaleString(local_2021,0x1000,"/proc/%.20g/file",(double)_Var1);
    iVar2 = readlink(local_2021,local_1021,0x1000);
  }
  if (iVar2 - 1U < 0x1000) {
    local_1021[iVar2] = '\0';
    CopyMagickString();
  }
  IsPathAccessible();
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0029eab0();
}

