
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void disable_priv_mode(void)

{
  uid_t uVar1;
  uid_t uVar2;
  gid_t gVar3;
  gid_t gVar4;
  int iVar5;
  char *pcVar6;
  
  iVar5 = setuid(current_user.uid);
  uVar2 = current_user.euid;
  uVar1 = current_user.uid;
  if (iVar5 < 0) {
    pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5);
    sys_error(pcVar6,uVar1,uVar2);
  }
  iVar5 = setgid(current_user.gid);
  gVar4 = current_user.egid;
  gVar3 = current_user.gid;
  if (iVar5 < 0) {
    pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5);
    sys_error(pcVar6,gVar3,gVar4);
  }
  current_user.euid = current_user.uid;
  current_user.egid = current_user.gid;
  return;
}



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

void disable_priv_mode(void)

{
  __uid_t _Var1;
  undefined4 uVar2;
  __gid_t _Var3;
  int iVar4;
  undefined4 uVar5;
  
  iVar4 = setuid(current_user);
  uVar2 = DAT_0014a398;
  _Var1 = current_user;
  if (iVar4 < 0) {
    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);
    sys_error(uVar5,_Var1,uVar2);
  }
  iVar4 = setgid(DAT_0014a39c);
  uVar2 = DAT_0014a3a0;
  _Var3 = DAT_0014a39c;
  if (iVar4 < 0) {
    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);
    sys_error(uVar5,_Var3,uVar2);
  }
  DAT_0014a398 = current_user;
  DAT_0014a3a0 = DAT_0014a39c;
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x117398
SUB ESP,0xc
PUSH dword ptr [EBX + 0x394]
CALL 0x0002fb10
ADD ESP,0x10
TEST EAX,EAX
JS 0x00032cb8
SUB ESP,0xc
PUSH dword ptr [EBX + 0x39c]
CALL 0x0002f640
ADD ESP,0x10
TEST EAX,EAX
JS 0x00032cf0
MOV EAX,dword ptr [EBX + 0x394]
MOV dword ptr [EBX + 0x398],EAX
MOV EAX,dword ptr [EBX + 0x39c]
MOV dword ptr [EBX + 0x3a0],EAX
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xfffa3444]
MOV EDI,dword ptr [EBX + 0x398]
MOV ESI,dword ptr [EBX + 0x394]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x0002f380
ADD ESP,0xc
PUSH EDI
PUSH ESI
PUSH EAX
CALL 0x000598c0
ADD ESP,0x10
JMP 0x00032c83
SUB ESP,0x4
LEA EAX,[EBX + 0xfffa346c]
MOV EDI,dword ptr [EBX + 0x3a0]
MOV ESI,dword ptr [EBX + 0x39c]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x0002f380
ADD ESP,0xc
PUSH EDI
PUSH ESI
PUSH EAX
CALL 0x000598c0
ADD ESP,0x10
JMP 0x00032c98
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid disable_priv_mode(void)\n\n{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}\n\n" comment (function_definition "void disable_priv_mode(void)\n\n{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}" primitive_type (function_declarator "disable_priv_mode(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}" { (declaration "__uid_t _Var1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "__gid_t _Var3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "iVar4 = setuid(current_user);" (assignment_expression "iVar4 = setuid(current_user)" identifier = (call_expression "setuid(current_user)" identifier (argument_list "(current_user)" ( identifier )))) ;) (expression_statement "uVar2 = DAT_0014a398;" (assignment_expression "uVar2 = DAT_0014a398" identifier = identifier) ;) (expression_statement "_Var1 = current_user;" (assignment_expression "_Var1 = current_user" identifier = identifier) ;) (if_statement "if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }" { (expression_statement "uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5)" identifier = (call_expression "dcgettext(0,"cannot set uid to %d: effective uid %d",5)" identifier (argument_list "(0,"cannot set uid to %d: effective uid %d",5)" ( number_literal , (string_literal ""cannot set uid to %d: effective uid %d"" " string_content ") , number_literal )))) ;) (expression_statement "sys_error(uVar5,_Var1,uVar2);" (call_expression "sys_error(uVar5,_Var1,uVar2)" identifier (argument_list "(uVar5,_Var1,uVar2)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "iVar4 = setgid(DAT_0014a39c);" (assignment_expression "iVar4 = setgid(DAT_0014a39c)" identifier = (call_expression "setgid(DAT_0014a39c)" identifier (argument_list "(DAT_0014a39c)" ( identifier )))) ;) (expression_statement "uVar2 = DAT_0014a3a0;" (assignment_expression "uVar2 = DAT_0014a3a0" identifier = identifier) ;) (expression_statement "_Var3 = DAT_0014a39c;" (assignment_expression "_Var3 = DAT_0014a39c" identifier = identifier) ;) (if_statement "if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }" { (expression_statement "uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5)" identifier = (call_expression "dcgettext(0,"cannot set gid to %d: effective gid %d",5)" identifier (argument_list "(0,"cannot set gid to %d: effective gid %d",5)" ( number_literal , (string_literal ""cannot set gid to %d: effective gid %d"" " string_content ") , number_literal )))) ;) (expression_statement "sys_error(uVar5,_Var3,uVar2);" (call_expression "sys_error(uVar5,_Var3,uVar2)" identifier (argument_list "(uVar5,_Var3,uVar2)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "DAT_0014a398 = current_user;" (assignment_expression "DAT_0014a398 = current_user" identifier = identifier) ;) (expression_statement "DAT_0014a3a0 = DAT_0014a39c;" (assignment_expression "DAT_0014a3a0 = DAT_0014a39c" identifier = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n\nvoid disable_priv_mode(void)\n\n{\n  uid_t uVar1;\n  uid_t uVar2;\n  gid_t gVar3;\n  gid_t gVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  iVar5 = setuid(current_user.uid);\n  uVar2 = current_user.euid;\n  uVar1 = current_user.uid;\n  if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(pcVar6,uVar1,uVar2);\n  }\n  iVar5 = setgid(current_user.gid);\n  gVar4 = current_user.egid;\n  gVar3 = current_user.gid;\n  if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(pcVar6,gVar3,gVar4);\n  }\n  current_user.euid = current_user.uid;\n  current_user.egid = current_user.gid;\n  return;\n}\n\n" comment comment (function_definition "void disable_priv_mode(void)\n\n{\n  uid_t uVar1;\n  uid_t uVar2;\n  gid_t gVar3;\n  gid_t gVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  iVar5 = setuid(current_user.uid);\n  uVar2 = current_user.euid;\n  uVar1 = current_user.uid;\n  if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(pcVar6,uVar1,uVar2);\n  }\n  iVar5 = setgid(current_user.gid);\n  gVar4 = current_user.egid;\n  gVar3 = current_user.gid;\n  if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(pcVar6,gVar3,gVar4);\n  }\n  current_user.euid = current_user.uid;\n  current_user.egid = current_user.gid;\n  return;\n}" primitive_type (function_declarator "disable_priv_mode(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uid_t uVar1;\n  uid_t uVar2;\n  gid_t gVar3;\n  gid_t gVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  iVar5 = setuid(current_user.uid);\n  uVar2 = current_user.euid;\n  uVar1 = current_user.uid;\n  if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(pcVar6,uVar1,uVar2);\n  }\n  iVar5 = setgid(current_user.gid);\n  gVar4 = current_user.egid;\n  gVar3 = current_user.gid;\n  if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(pcVar6,gVar3,gVar4);\n  }\n  current_user.euid = current_user.uid;\n  current_user.egid = current_user.gid;\n  return;\n}" { (declaration "uid_t uVar1;" type_identifier identifier ;) (declaration "uid_t uVar2;" type_identifier identifier ;) (declaration "gid_t gVar3;" type_identifier identifier ;) (declaration "gid_t gVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (expression_statement "iVar5 = setuid(current_user.uid);" (assignment_expression "iVar5 = setuid(current_user.uid)" identifier = (call_expression "setuid(current_user.uid)" identifier (argument_list "(current_user.uid)" ( (field_expression "current_user.uid" identifier . field_identifier) )))) ;) (expression_statement "uVar2 = current_user.euid;" (assignment_expression "uVar2 = current_user.euid" identifier = (field_expression "current_user.euid" identifier . field_identifier)) ;) (expression_statement "uVar1 = current_user.uid;" (assignment_expression "uVar1 = current_user.uid" identifier = (field_expression "current_user.uid" identifier . field_identifier)) ;) (if_statement "if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(pcVar6,uVar1,uVar2);\n  }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n    pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(pcVar6,uVar1,uVar2);\n  }" { (expression_statement "pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5);" (assignment_expression "pcVar6 = (char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5)" identifier = (cast_expression "(char *)dcgettext(0,"cannot set uid to %d: effective uid %d",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"cannot set uid to %d: effective uid %d",5)" identifier (argument_list "(0,"cannot set uid to %d: effective uid %d",5)" ( number_literal , (string_literal ""cannot set uid to %d: effective uid %d"" " string_content ") , number_literal ))))) ;) (expression_statement "sys_error(pcVar6,uVar1,uVar2);" (call_expression "sys_error(pcVar6,uVar1,uVar2)" identifier (argument_list "(pcVar6,uVar1,uVar2)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "iVar5 = setgid(current_user.gid);" (assignment_expression "iVar5 = setgid(current_user.gid)" identifier = (call_expression "setgid(current_user.gid)" identifier (argument_list "(current_user.gid)" ( (field_expression "current_user.gid" identifier . field_identifier) )))) ;) (expression_statement "gVar4 = current_user.egid;" (assignment_expression "gVar4 = current_user.egid" identifier = (field_expression "current_user.egid" identifier . field_identifier)) ;) (expression_statement "gVar3 = current_user.gid;" (assignment_expression "gVar3 = current_user.gid" identifier = (field_expression "current_user.gid" identifier . field_identifier)) ;) (if_statement "if (iVar5 < 0) {\n    pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(pcVar6,gVar3,gVar4);\n  }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n    pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(pcVar6,gVar3,gVar4);\n  }" { (expression_statement "pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5);" (assignment_expression "pcVar6 = (char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5)" identifier = (cast_expression "(char *)dcgettext(0,"cannot set gid to %d: effective gid %d",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"cannot set gid to %d: effective gid %d",5)" identifier (argument_list "(0,"cannot set gid to %d: effective gid %d",5)" ( number_literal , (string_literal ""cannot set gid to %d: effective gid %d"" " string_content ") , number_literal ))))) ;) (expression_statement "sys_error(pcVar6,gVar3,gVar4);" (call_expression "sys_error(pcVar6,gVar3,gVar4)" identifier (argument_list "(pcVar6,gVar3,gVar4)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "current_user.euid = current_user.uid;" (assignment_expression "current_user.euid = current_user.uid" (field_expression "current_user.euid" identifier . field_identifier) = (field_expression "current_user.uid" identifier . field_identifier)) ;) (expression_statement "current_user.egid = current_user.gid;" (assignment_expression "current_user.egid = current_user.gid" (field_expression "current_user.egid" identifier . field_identifier) = (field_expression "current_user.gid" identifier . field_identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit "void disable_priv_mode(void)\n\n{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}\n\n" (function_definition "void disable_priv_mode(void)\n\n{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}" primitive_type (function_declarator "disable_priv_mode(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}" { (declaration "__uid_t _Var1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "__gid_t _Var3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "iVar4 = setuid(current_user);" (assignment_expression "iVar4 = setuid(current_user)" identifier = (call_expression "setuid(current_user)" identifier (argument_list "(current_user)" ( identifier )))) ;) (expression_statement "uVar2 = DAT_0014a398;" (assignment_expression "uVar2 = DAT_0014a398" identifier = identifier) ;) (expression_statement "_Var1 = current_user;" (assignment_expression "_Var1 = current_user" identifier = identifier) ;) (if_statement "if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }" { (expression_statement "uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5)" identifier = (call_expression "dcgettext(0,"cannot set uid to %d: effective uid %d",5)" identifier (argument_list "(0,"cannot set uid to %d: effective uid %d",5)" ( number_literal , (string_literal ""cannot set uid to %d: effective uid %d"" " string_content ") , number_literal )))) ;) (expression_statement "sys_error(uVar5,_Var1,uVar2);" (call_expression "sys_error(uVar5,_Var1,uVar2)" identifier (argument_list "(uVar5,_Var1,uVar2)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "iVar4 = setgid(DAT_0014a39c);" (assignment_expression "iVar4 = setgid(DAT_0014a39c)" identifier = (call_expression "setgid(DAT_0014a39c)" identifier (argument_list "(DAT_0014a39c)" ( identifier )))) ;) (expression_statement "uVar2 = DAT_0014a3a0;" (assignment_expression "uVar2 = DAT_0014a3a0" identifier = identifier) ;) (expression_statement "_Var3 = DAT_0014a39c;" (assignment_expression "_Var3 = DAT_0014a39c" identifier = identifier) ;) (if_statement "if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }" { (expression_statement "uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5)" identifier = (call_expression "dcgettext(0,"cannot set gid to %d: effective gid %d",5)" identifier (argument_list "(0,"cannot set gid to %d: effective gid %d",5)" ( number_literal , (string_literal ""cannot set gid to %d: effective gid %d"" " string_content ") , number_literal )))) ;) (expression_statement "sys_error(uVar5,_Var3,uVar2);" (call_expression "sys_error(uVar5,_Var3,uVar2)" identifier (argument_list "(uVar5,_Var3,uVar2)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "DAT_0014a398 = current_user;" (assignment_expression "DAT_0014a398 = current_user" identifier = identifier) ;) (expression_statement "DAT_0014a3a0 = DAT_0014a39c;" (assignment_expression "DAT_0014a3a0 = DAT_0014a39c" identifier = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (return_statement return ;) })))
(function_definition "void disable_priv_mode(void)\n\n{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}" (primitive_type "void") (function_declarator "disable_priv_mode(void)" (identifier "disable_priv_mode") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  __uid_t _Var1;\n  undefined4 uVar2;\n  __gid_t _Var3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  iVar4 = setuid(current_user);\n  uVar2 = DAT_0014a398;\n  _Var1 = current_user;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }\n  iVar4 = setgid(DAT_0014a39c);\n  uVar2 = DAT_0014a3a0;\n  _Var3 = DAT_0014a39c;\n  if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }\n  DAT_0014a398 = current_user;\n  DAT_0014a3a0 = DAT_0014a39c;\n  return;\n}" ({ "{") (declaration "__uid_t _Var1;" (type_identifier "__uid_t") (identifier "_Var1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "__gid_t _Var3;" (type_identifier "__gid_t") (identifier "_Var3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (expression_statement "iVar4 = setuid(current_user);" (assignment_expression "iVar4 = setuid(current_user)" (identifier "iVar4") (= "=") (call_expression "setuid(current_user)" (identifier "setuid") (argument_list "(current_user)" (( "(") (identifier "current_user") () ")")))) (; ";")) (expression_statement "uVar2 = DAT_0014a398;" (assignment_expression "uVar2 = DAT_0014a398" (identifier "uVar2") (= "=") (identifier "DAT_0014a398")) (; ";")) (expression_statement "_Var1 = current_user;" (assignment_expression "_Var1 = current_user" (identifier "_Var1") (= "=") (identifier "current_user")) (; ";")) (if_statement "if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);\n    sys_error(uVar5,_Var1,uVar2);\n  }" ({ "{") (expression_statement "uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5)" (identifier "uVar5") (= "=") (call_expression "dcgettext(0,"cannot set uid to %d: effective uid %d",5)" (identifier "dcgettext") (argument_list "(0,"cannot set uid to %d: effective uid %d",5)" (( "(") (number_literal "0") (, ",") (string_literal ""cannot set uid to %d: effective uid %d"" (" """) (string_content "cannot set uid to %d: effective uid %d") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "sys_error(uVar5,_Var1,uVar2);" (call_expression "sys_error(uVar5,_Var1,uVar2)" (identifier "sys_error") (argument_list "(uVar5,_Var1,uVar2)" (( "(") (identifier "uVar5") (, ",") (identifier "_Var1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar4 = setgid(DAT_0014a39c);" (assignment_expression "iVar4 = setgid(DAT_0014a39c)" (identifier "iVar4") (= "=") (call_expression "setgid(DAT_0014a39c)" (identifier "setgid") (argument_list "(DAT_0014a39c)" (( "(") (identifier "DAT_0014a39c") () ")")))) (; ";")) (expression_statement "uVar2 = DAT_0014a3a0;" (assignment_expression "uVar2 = DAT_0014a3a0" (identifier "uVar2") (= "=") (identifier "DAT_0014a3a0")) (; ";")) (expression_statement "_Var3 = DAT_0014a39c;" (assignment_expression "_Var3 = DAT_0014a39c" (identifier "_Var3") (= "=") (identifier "DAT_0014a39c")) (; ";")) (if_statement "if (iVar4 < 0) {\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);\n    sys_error(uVar5,_Var3,uVar2);\n  }" ({ "{") (expression_statement "uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);" (assignment_expression "uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5)" (identifier "uVar5") (= "=") (call_expression "dcgettext(0,"cannot set gid to %d: effective gid %d",5)" (identifier "dcgettext") (argument_list "(0,"cannot set gid to %d: effective gid %d",5)" (( "(") (number_literal "0") (, ",") (string_literal ""cannot set gid to %d: effective gid %d"" (" """) (string_content "cannot set gid to %d: effective gid %d") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "sys_error(uVar5,_Var3,uVar2);" (call_expression "sys_error(uVar5,_Var3,uVar2)" (identifier "sys_error") (argument_list "(uVar5,_Var3,uVar2)" (( "(") (identifier "uVar5") (, ",") (identifier "_Var3") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "DAT_0014a398 = current_user;" (assignment_expression "DAT_0014a398 = current_user" (identifier "DAT_0014a398") (= "=") (identifier "current_user")) (; ";")) (expression_statement "DAT_0014a3a0 = DAT_0014a39c;" (assignment_expression "DAT_0014a3a0 = DAT_0014a39c" (identifier "DAT_0014a3a0") (= "=") (identifier "DAT_0014a39c")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void function_1(void)

{
  type_1 uVar1;
  type_1 uVar2;
  type_2 gVar3;
  type_2 gVar4;
  int var_2;
  char *pcVar6;
  
  var_2 = var_1(current_user.uid);
  uVar2 = current_user.euid;
  uVar1 = current_user.uid;
  if (var_2 < 0) {
    pcVar6 = (char *)var_3(0,"cannot set uid to %d: effective uid %d",5);
    var_4(pcVar6,uVar1,uVar2);
  }
  var_2 = var_5(current_user.gid);
  gVar4 = current_user.egid;
  gVar3 = current_user.gid;
  if (var_2 < 0) {
    pcVar6 = (char *)var_3(0,"cannot set gid to %d: effective gid %d",5);
    var_4(pcVar6,gVar3,gVar4);
  }
  current_user.euid = current_user.uid;
  current_user.egid = current_user.gid;
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (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 (number_literal) (string_literal (string_content)) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (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 (number_literal) (string_literal (string_content)) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (return_statement))))

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

void MASKED(void)

{
  __uid_t _Var1;
  undefined4 uVar2;
  __gid_t _Var3;
  int iVar4;
  undefined4 uVar5;
  
  iVar4 = setuid(current_user);
  uVar2 = DAT_0014a398;
  _Var1 = current_user;
  if (iVar4 < 0) {
    uVar5 = dcgettext(0,"cannot set uid to %d: effective uid %d",5);
    sys_error(uVar5,_Var1,uVar2);
  }
  iVar4 = setgid(DAT_0014a39c);
  uVar2 = DAT_0014a3a0;
  _Var3 = DAT_0014a39c;
  if (iVar4 < 0) {
    uVar5 = dcgettext(0,"cannot set gid to %d: effective gid %d",5);
    sys_error(uVar5,_Var3,uVar2);
  }
  DAT_0014a398 = current_user;
  DAT_0014a3a0 = DAT_0014a39c;
  return;
}

