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

void __regparm3 x11_send_init_error(X11Connection *xconn,char *err_message)

{
  uint uVar1;
  char cVar2;
  char *__s;
  size_t __n;
  char *buf;
  char cVar3;
  
  __s = dupprintf("%s X11 proxy: %s\n",appname,err_message);
  __n = strlen(__s);
  buf = (char *)safemalloc(__n + 0xd,1);
  *buf = '\0';
  buf[1] = (char)__n;
  uVar1 = __n + 3;
  *(undefined4 *)(buf + 2) = *(undefined4 *)(xconn->firstpkt + 2);
  cVar2 = (char)((int)uVar1 >> 2);
  cVar3 = (char)((int)uVar1 >> 10);
  if (xconn->firstpkt[0] == 'B') {
    buf[6] = cVar3;
    buf[7] = cVar2;
  }
  else {
    buf[6] = cVar2;
    buf[7] = cVar3;
  }
  memset(buf + 8,0,uVar1 & 0xfffffffc);
  memcpy(buf + 8,__s,__n);
  sshfwd_write(xconn->c,buf,(uVar1 & 0xfffffffc) + 8);
  sshfwd_write_eof(xconn->c);
  xconn->no_data_sent_to_x_client = 0;
  safefree(buf);
  safefree(__s);
  return;
}



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

void __regparm3 FUN_0006d4e0(int param_1,undefined4 param_2)

{
  uint uVar1;
  undefined1 uVar2;
  char *__s;
  size_t __n;
  undefined1 *puVar3;
  undefined1 uVar4;
  
  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);
  __n = strlen(__s);
  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);
  *puVar3 = 0;
  puVar3[1] = (char)__n;
  uVar1 = __n + 3;
  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);
  uVar2 = (undefined1)((int)uVar1 >> 2);
  uVar4 = (undefined1)((int)uVar1 >> 10);
  if (*(char *)(param_1 + 4) == 'B') {
    puVar3[6] = uVar4;
    puVar3[7] = uVar2;
  }
  else {
    puVar3[6] = uVar2;
    puVar3[7] = uVar4;
  }
  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);
  memcpy(puVar3 + 8,__s,__n);
  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);
  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));
  *(undefined4 *)(param_1 + 0x40) = 0;
  FUN_0001b250(puVar3);
  FUN_0001b250(__s);
  return;
}


PUSH EBP
MOV EBP,EAX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014980
ADD EBX,0x3b885
SUB ESP,0x20
PUSH EDX
LEA EAX,[EBX + 0xffffebb4]
PUSH dword ptr [EAX]
LEA EAX,[EBX + 0xfffd7c21]
PUSH EAX
CALL 0x0001b030
MOV dword ptr [ESP + 0x14],EAX
MOV dword ptr [ESP],EAX
CALL 0x00014460
POP ECX
POP ESI
PUSH 0x1
MOV EDX,EAX
ADD EAX,0xd
MOV dword ptr [ESP + 0x14],EDX
PUSH EAX
CALL 0x0001a9c0
MOV EDX,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV byte ptr [EAX],0x0
MOV ESI,EAX
MOV byte ptr [EAX + 0x1],DL
LEA EDI,[EDX + 0x3]
MOV EAX,dword ptr [EBP + 0x6]
AND EDI,0xfffffffc
MOV dword ptr [ESI + 0x2],EAX
MOV ECX,EDI
MOV EAX,EDI
SAR EAX,0x2
SAR ECX,0xa
CMP byte ptr [EBP + 0x4],0x42
JZ 0x0006d5c0
MOV byte ptr [ESI + 0x6],AL
MOV byte ptr [ESI + 0x7],CL
MOV dword ptr [ESP + 0xc],EDX
LEA ECX,[ESI + 0x8]
SUB ESP,0x4
PUSH EDI
ADD EDI,0x8
PUSH 0x0
PUSH ECX
MOV dword ptr [ESP + 0x18],ECX
CALL 0x000144f0
ADD ESP,0xc
MOV EDX,dword ptr [ESP + 0x10]
PUSH EDX
PUSH dword ptr [ESP + 0xc]
MOV ECX,dword ptr [ESP + 0x14]
PUSH ECX
CALL 0x00014130
ADD ESP,0xc
PUSH EDI
PUSH ESI
PUSH dword ptr [EBP + 0x4c]
CALL 0x0003b910
POP EAX
PUSH dword ptr [EBP + 0x4c]
CALL 0x00039e40
MOV dword ptr [EBP + 0x40],0x0
MOV dword ptr [ESP],ESI
CALL 0x0001b250
POP EDX
PUSH dword ptr [ESP + 0x10]
CALL 0x0001b250
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV byte ptr [ESI + 0x6],CL
MOV byte ptr [ESI + 0x7],AL
JMP 0x0006d559
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0006d4e0(int param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0006d4e0(int param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006d4e0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined1 uVar2;" type_identifier identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 uVar4;" type_identifier identifier ;) (expression_statement "__s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);" (assignment_expression "__s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" identifier = (cast_expression "(char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" identifier (argument_list "("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" ( (string_literal ""%s X11 proxy: %s\n"" " string_content escape_sequence ") , identifier , identifier ))))) ;) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);" (assignment_expression "puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1)" identifier = (cast_expression "(undefined1 *)FUN_0001a9c0(__n + 0xd,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9c0(__n + 0xd,1)" identifier (argument_list "(__n + 0xd,1)" ( (binary_expression "__n + 0xd" identifier + number_literal) , number_literal ))))) ;) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3[1] = (char)__n;" (assignment_expression "puVar3[1] = (char)__n" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = (cast_expression "(char)__n" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "uVar1 = __n + 3;" (assignment_expression "uVar1 = __n + 3" identifier = (binary_expression "__n + 3" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);" (assignment_expression "*(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6)" (pointer_expression "*(undefined4 *)(puVar3 + 2)" * (cast_expression "(undefined4 *)(puVar3 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 2)" ( (binary_expression "puVar3 + 2" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_1 + 6)" * (cast_expression "(undefined4 *)(param_1 + 6)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = (undefined1)((int)uVar1 >> 2);" (assignment_expression "uVar2 = (undefined1)((int)uVar1 >> 2)" identifier = (call_expression "(undefined1)((int)uVar1 >> 2)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((int)uVar1 >> 2)" ( (binary_expression "(int)uVar1 >> 2" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar4 = (undefined1)((int)uVar1 >> 10);" (assignment_expression "uVar4 = (undefined1)((int)uVar1 >> 10)" identifier = (call_expression "(undefined1)((int)uVar1 >> 10)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((int)uVar1 >> 10)" ( (binary_expression "(int)uVar1 >> 10" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 4) == 'B')" ( (binary_expression "*(char *)(param_1 + 4) == 'B'" (pointer_expression "*(char *)(param_1 + 4)" * (cast_expression "(char *)(param_1 + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == (char_literal "'B'" ' character ')) )) (compound_statement "{\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }" { (expression_statement "puVar3[6] = uVar4;" (assignment_expression "puVar3[6] = uVar4" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[7] = uVar2;" (assignment_expression "puVar3[7] = uVar2" (subscript_expression "puVar3[7]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" else (compound_statement "{\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" { (expression_statement "puVar3[6] = uVar2;" (assignment_expression "puVar3[6] = uVar2" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[7] = uVar4;" (assignment_expression "puVar3[7] = uVar4" (subscript_expression "puVar3[7]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "memset(puVar3 + 8,0,uVar1 & 0xfffffffc);" (call_expression "memset(puVar3 + 8,0,uVar1 & 0xfffffffc)" identifier (argument_list "(puVar3 + 8,0,uVar1 & 0xfffffffc)" ( (binary_expression "puVar3 + 8" identifier + number_literal) , number_literal , (binary_expression "uVar1 & 0xfffffffc" identifier & number_literal) ))) ;) (expression_statement "memcpy(puVar3 + 8,__s,__n);" (call_expression "memcpy(puVar3 + 8,__s,__n)" identifier (argument_list "(puVar3 + 8,__s,__n)" ( (binary_expression "puVar3 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);" (call_expression "FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" * (cast_expression "(undefined4 *)(param_1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) , identifier , (binary_expression "(uVar1 & 0xfffffffc) + 8" (parenthesized_expression "(uVar1 & 0xfffffffc)" ( (binary_expression "uVar1 & 0xfffffffc" identifier & number_literal) )) + number_literal) ))) ;) (expression_statement "FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));" (call_expression "FUN_00039e40(*(undefined4 *)(param_1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" * (cast_expression "(undefined4 *)(param_1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x40) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x40) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x40)" * (cast_expression "(undefined4 *)(param_1 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0001b250(puVar3);" (call_expression "FUN_0001b250(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "FUN_0001b250(__s);" (call_expression "FUN_0001b250(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid __regparm3 x11_send_init_error(X11Connection *xconn,char *err_message)\n\n{\n  uint uVar1;\n  char cVar2;\n  char *__s;\n  size_t __n;\n  char *buf;\n  char cVar3;\n  \n  __s = dupprintf("%s X11 proxy: %s\n",appname,err_message);\n  __n = strlen(__s);\n  buf = (char *)safemalloc(__n + 0xd,1);\n  *buf = '\0';\n  buf[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(buf + 2) = *(undefined4 *)(xconn->firstpkt + 2);\n  cVar2 = (char)((int)uVar1 >> 2);\n  cVar3 = (char)((int)uVar1 >> 10);\n  if (xconn->firstpkt[0] == 'B') {\n    buf[6] = cVar3;\n    buf[7] = cVar2;\n  }\n  else {\n    buf[6] = cVar2;\n    buf[7] = cVar3;\n  }\n  memset(buf + 8,0,uVar1 & 0xfffffffc);\n  memcpy(buf + 8,__s,__n);\n  sshfwd_write(xconn->c,buf,(uVar1 & 0xfffffffc) + 8);\n  sshfwd_write_eof(xconn->c);\n  xconn->no_data_sent_to_x_client = 0;\n  safefree(buf);\n  safefree(__s);\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 x11_send_init_error(X11Connection *xconn,char *err_message)\n\n{\n  uint uVar1;\n  char cVar2;\n  char *__s;\n  size_t __n;\n  char *buf;\n  char cVar3;\n  \n  __s = dupprintf("%s X11 proxy: %s\n",appname,err_message);\n  __n = strlen(__s);\n  buf = (char *)safemalloc(__n + 0xd,1);\n  *buf = '\0';\n  buf[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(buf + 2) = *(undefined4 *)(xconn->firstpkt + 2);\n  cVar2 = (char)((int)uVar1 >> 2);\n  cVar3 = (char)((int)uVar1 >> 10);\n  if (xconn->firstpkt[0] == 'B') {\n    buf[6] = cVar3;\n    buf[7] = cVar2;\n  }\n  else {\n    buf[6] = cVar2;\n    buf[7] = cVar3;\n  }\n  memset(buf + 8,0,uVar1 & 0xfffffffc);\n  memcpy(buf + 8,__s,__n);\n  sshfwd_write(xconn->c,buf,(uVar1 & 0xfffffffc) + 8);\n  sshfwd_write_eof(xconn->c);\n  xconn->no_data_sent_to_x_client = 0;\n  safefree(buf);\n  safefree(__s);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "x11_send_init_error(X11Connection *xconn,char *err_message)" identifier (parameter_list "(X11Connection *xconn,char *err_message)" ( (parameter_declaration "X11Connection *xconn" type_identifier (pointer_declarator "*xconn" * identifier)) , (parameter_declaration "char *err_message" primitive_type (pointer_declarator "*err_message" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  char cVar2;\n  char *__s;\n  size_t __n;\n  char *buf;\n  char cVar3;\n  \n  __s = dupprintf("%s X11 proxy: %s\n",appname,err_message);\n  __n = strlen(__s);\n  buf = (char *)safemalloc(__n + 0xd,1);\n  *buf = '\0';\n  buf[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(buf + 2) = *(undefined4 *)(xconn->firstpkt + 2);\n  cVar2 = (char)((int)uVar1 >> 2);\n  cVar3 = (char)((int)uVar1 >> 10);\n  if (xconn->firstpkt[0] == 'B') {\n    buf[6] = cVar3;\n    buf[7] = cVar2;\n  }\n  else {\n    buf[6] = cVar2;\n    buf[7] = cVar3;\n  }\n  memset(buf + 8,0,uVar1 & 0xfffffffc);\n  memcpy(buf + 8,__s,__n);\n  sshfwd_write(xconn->c,buf,(uVar1 & 0xfffffffc) + 8);\n  sshfwd_write_eof(xconn->c);\n  xconn->no_data_sent_to_x_client = 0;\n  safefree(buf);\n  safefree(__s);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "char *buf;" primitive_type (pointer_declarator "*buf" * identifier) ;) (declaration "char cVar3;" primitive_type identifier ;) (expression_statement "__s = dupprintf("%s X11 proxy: %s\n",appname,err_message);" (assignment_expression "__s = dupprintf("%s X11 proxy: %s\n",appname,err_message)" identifier = (call_expression "dupprintf("%s X11 proxy: %s\n",appname,err_message)" identifier (argument_list "("%s X11 proxy: %s\n",appname,err_message)" ( (string_literal ""%s X11 proxy: %s\n"" " string_content escape_sequence ") , identifier , identifier )))) ;) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "buf = (char *)safemalloc(__n + 0xd,1);" (assignment_expression "buf = (char *)safemalloc(__n + 0xd,1)" identifier = (cast_expression "(char *)safemalloc(__n + 0xd,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(__n + 0xd,1)" identifier (argument_list "(__n + 0xd,1)" ( (binary_expression "__n + 0xd" identifier + number_literal) , number_literal ))))) ;) (expression_statement "*buf = '\0';" (assignment_expression "*buf = '\0'" (pointer_expression "*buf" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[1] = (char)__n;" (assignment_expression "buf[1] = (char)__n" (subscript_expression "buf[1]" identifier [ number_literal ]) = (cast_expression "(char)__n" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "uVar1 = __n + 3;" (assignment_expression "uVar1 = __n + 3" identifier = (binary_expression "__n + 3" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(buf + 2) = *(undefined4 *)(xconn->firstpkt + 2);" (assignment_expression "*(undefined4 *)(buf + 2) = *(undefined4 *)(xconn->firstpkt + 2)" (pointer_expression "*(undefined4 *)(buf + 2)" * (cast_expression "(undefined4 *)(buf + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(buf + 2)" ( (binary_expression "buf + 2" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(xconn->firstpkt + 2)" * (cast_expression "(undefined4 *)(xconn->firstpkt + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(xconn->firstpkt + 2)" ( (binary_expression "xconn->firstpkt + 2" (field_expression "xconn->firstpkt" identifier -> field_identifier) + number_literal) ))))) ;) (expression_statement "cVar2 = (char)((int)uVar1 >> 2);" (assignment_expression "cVar2 = (char)((int)uVar1 >> 2)" identifier = (cast_expression "(char)((int)uVar1 >> 2)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((int)uVar1 >> 2)" ( (binary_expression "(int)uVar1 >> 2" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (expression_statement "cVar3 = (char)((int)uVar1 >> 10);" (assignment_expression "cVar3 = (char)((int)uVar1 >> 10)" identifier = (cast_expression "(char)((int)uVar1 >> 10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((int)uVar1 >> 10)" ( (binary_expression "(int)uVar1 >> 10" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (xconn->firstpkt[0] == 'B') {\n    buf[6] = cVar3;\n    buf[7] = cVar2;\n  }\n  else {\n    buf[6] = cVar2;\n    buf[7] = cVar3;\n  }" if (parenthesized_expression "(xconn->firstpkt[0] == 'B')" ( (binary_expression "xconn->firstpkt[0] == 'B'" (subscript_expression "xconn->firstpkt[0]" (field_expression "xconn->firstpkt" identifier -> field_identifier) [ number_literal ]) == (char_literal "'B'" ' character ')) )) (compound_statement "{\n    buf[6] = cVar3;\n    buf[7] = cVar2;\n  }" { (expression_statement "buf[6] = cVar3;" (assignment_expression "buf[6] = cVar3" (subscript_expression "buf[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "buf[7] = cVar2;" (assignment_expression "buf[7] = cVar2" (subscript_expression "buf[7]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    buf[6] = cVar2;\n    buf[7] = cVar3;\n  }" else (compound_statement "{\n    buf[6] = cVar2;\n    buf[7] = cVar3;\n  }" { (expression_statement "buf[6] = cVar2;" (assignment_expression "buf[6] = cVar2" (subscript_expression "buf[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "buf[7] = cVar3;" (assignment_expression "buf[7] = cVar3" (subscript_expression "buf[7]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "memset(buf + 8,0,uVar1 & 0xfffffffc);" (call_expression "memset(buf + 8,0,uVar1 & 0xfffffffc)" identifier (argument_list "(buf + 8,0,uVar1 & 0xfffffffc)" ( (binary_expression "buf + 8" identifier + number_literal) , number_literal , (binary_expression "uVar1 & 0xfffffffc" identifier & number_literal) ))) ;) (expression_statement "memcpy(buf + 8,__s,__n);" (call_expression "memcpy(buf + 8,__s,__n)" identifier (argument_list "(buf + 8,__s,__n)" ( (binary_expression "buf + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "sshfwd_write(xconn->c,buf,(uVar1 & 0xfffffffc) + 8);" (call_expression "sshfwd_write(xconn->c,buf,(uVar1 & 0xfffffffc) + 8)" identifier (argument_list "(xconn->c,buf,(uVar1 & 0xfffffffc) + 8)" ( (field_expression "xconn->c" identifier -> field_identifier) , identifier , (binary_expression "(uVar1 & 0xfffffffc) + 8" (parenthesized_expression "(uVar1 & 0xfffffffc)" ( (binary_expression "uVar1 & 0xfffffffc" identifier & number_literal) )) + number_literal) ))) ;) (expression_statement "sshfwd_write_eof(xconn->c);" (call_expression "sshfwd_write_eof(xconn->c)" identifier (argument_list "(xconn->c)" ( (field_expression "xconn->c" identifier -> field_identifier) ))) ;) (expression_statement "xconn->no_data_sent_to_x_client = 0;" (assignment_expression "xconn->no_data_sent_to_x_client = 0" (field_expression "xconn->no_data_sent_to_x_client" identifier -> field_identifier) = number_literal) ;) (expression_statement "safefree(buf);" (call_expression "safefree(buf)" identifier (argument_list "(buf)" ( identifier ))) ;) (expression_statement "safefree(__s);" (call_expression "safefree(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0006d4e0(int param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0006d4e0(int param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006d4e0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined1 uVar2;" type_identifier identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 uVar4;" type_identifier identifier ;) (expression_statement "__s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);" (assignment_expression "__s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" identifier = (cast_expression "(char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" identifier (argument_list "("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" ( (string_literal ""%s X11 proxy: %s\n"" " string_content escape_sequence ") , identifier , identifier ))))) ;) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);" (assignment_expression "puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1)" identifier = (cast_expression "(undefined1 *)FUN_0001a9c0(__n + 0xd,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9c0(__n + 0xd,1)" identifier (argument_list "(__n + 0xd,1)" ( (binary_expression "__n + 0xd" identifier + number_literal) , number_literal ))))) ;) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3[1] = (char)__n;" (assignment_expression "puVar3[1] = (char)__n" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = (cast_expression "(char)__n" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "uVar1 = __n + 3;" (assignment_expression "uVar1 = __n + 3" identifier = (binary_expression "__n + 3" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);" (assignment_expression "*(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6)" (pointer_expression "*(undefined4 *)(puVar3 + 2)" * (cast_expression "(undefined4 *)(puVar3 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 2)" ( (binary_expression "puVar3 + 2" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_1 + 6)" * (cast_expression "(undefined4 *)(param_1 + 6)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = (undefined1)((int)uVar1 >> 2);" (assignment_expression "uVar2 = (undefined1)((int)uVar1 >> 2)" identifier = (call_expression "(undefined1)((int)uVar1 >> 2)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((int)uVar1 >> 2)" ( (binary_expression "(int)uVar1 >> 2" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar4 = (undefined1)((int)uVar1 >> 10);" (assignment_expression "uVar4 = (undefined1)((int)uVar1 >> 10)" identifier = (call_expression "(undefined1)((int)uVar1 >> 10)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((int)uVar1 >> 10)" ( (binary_expression "(int)uVar1 >> 10" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 4) == 'B')" ( (binary_expression "*(char *)(param_1 + 4) == 'B'" (pointer_expression "*(char *)(param_1 + 4)" * (cast_expression "(char *)(param_1 + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == (char_literal "'B'" ' character ')) )) (compound_statement "{\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }" { (expression_statement "puVar3[6] = uVar4;" (assignment_expression "puVar3[6] = uVar4" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[7] = uVar2;" (assignment_expression "puVar3[7] = uVar2" (subscript_expression "puVar3[7]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" else (compound_statement "{\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" { (expression_statement "puVar3[6] = uVar2;" (assignment_expression "puVar3[6] = uVar2" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[7] = uVar4;" (assignment_expression "puVar3[7] = uVar4" (subscript_expression "puVar3[7]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "memset(puVar3 + 8,0,uVar1 & 0xfffffffc);" (call_expression "memset(puVar3 + 8,0,uVar1 & 0xfffffffc)" identifier (argument_list "(puVar3 + 8,0,uVar1 & 0xfffffffc)" ( (binary_expression "puVar3 + 8" identifier + number_literal) , number_literal , (binary_expression "uVar1 & 0xfffffffc" identifier & number_literal) ))) ;) (expression_statement "memcpy(puVar3 + 8,__s,__n);" (call_expression "memcpy(puVar3 + 8,__s,__n)" identifier (argument_list "(puVar3 + 8,__s,__n)" ( (binary_expression "puVar3 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);" (call_expression "FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" * (cast_expression "(undefined4 *)(param_1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) , identifier , (binary_expression "(uVar1 & 0xfffffffc) + 8" (parenthesized_expression "(uVar1 & 0xfffffffc)" ( (binary_expression "uVar1 & 0xfffffffc" identifier & number_literal) )) + number_literal) ))) ;) (expression_statement "FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));" (call_expression "FUN_00039e40(*(undefined4 *)(param_1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" * (cast_expression "(undefined4 *)(param_1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x40) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x40) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x40)" * (cast_expression "(undefined4 *)(param_1 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0001b250(puVar3);" (call_expression "FUN_0001b250(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "FUN_0001b250(__s);" (call_expression "FUN_0001b250(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT , (binary_expression IDENT & LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0006d4e0(int param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0006d4e0(int param_1,undefined4 param_2)" (identifier "FUN_0006d4e0") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  uint uVar1;\n  undefined1 uVar2;\n  char *__s;\n  size_t __n;\n  undefined1 *puVar3;\n  undefined1 uVar4;\n  \n  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);\n  __n = strlen(__s);\n  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);\n  *puVar3 = 0;\n  puVar3[1] = (char)__n;\n  uVar1 = __n + 3;\n  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);\n  uVar2 = (undefined1)((int)uVar1 >> 2);\n  uVar4 = (undefined1)((int)uVar1 >> 10);\n  if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }\n  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);\n  memcpy(puVar3 + 8,__s,__n);\n  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);\n  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));\n  *(undefined4 *)(param_1 + 0x40) = 0;\n  FUN_0001b250(puVar3);\n  FUN_0001b250(__s);\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined1 uVar2;" (type_identifier "undefined1") (identifier "uVar2") (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "undefined1 *puVar3;" (type_identifier "undefined1") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined1 uVar4;" (type_identifier "undefined1") (identifier "uVar4") (; ";")) (expression_statement "__s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);" (assignment_expression "__s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" (identifier "__s") (= "=") (cast_expression "(char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" (identifier "FUN_0001b030") (argument_list "("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2)" (( "(") (string_literal ""%s X11 proxy: %s\n"" (" """) (string_content "%s X11 proxy: %s") (escape_sequence "\n") (" """)) (, ",") (identifier "PTR_DAT_000a7924") (, ",") (identifier "param_2") () ")"))))) (; ";")) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" (identifier "__n") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);" (assignment_expression "puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1)" (identifier "puVar3") (= "=") (cast_expression "(undefined1 *)FUN_0001a9c0(__n + 0xd,1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001a9c0(__n + 0xd,1)" (identifier "FUN_0001a9c0") (argument_list "(__n + 0xd,1)" (( "(") (binary_expression "__n + 0xd" (identifier "__n") (+ "+") (number_literal "0xd")) (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[1] = (char)__n;" (assignment_expression "puVar3[1] = (char)__n" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (cast_expression "(char)__n" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "__n"))) (; ";")) (expression_statement "uVar1 = __n + 3;" (assignment_expression "uVar1 = __n + 3" (identifier "uVar1") (= "=") (binary_expression "__n + 3" (identifier "__n") (+ "+") (number_literal "3"))) (; ";")) (expression_statement "*(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);" (assignment_expression "*(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6)" (pointer_expression "*(undefined4 *)(puVar3 + 2)" (* "*") (cast_expression "(undefined4 *)(puVar3 + 2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 2)" (( "(") (binary_expression "puVar3 + 2" (identifier "puVar3") (+ "+") (number_literal "2")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 6)" (* "*") (cast_expression "(undefined4 *)(param_1 + 6)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 6)" (( "(") (binary_expression "param_1 + 6" (identifier "param_1") (+ "+") (number_literal "6")) () ")"))))) (; ";")) (expression_statement "uVar2 = (undefined1)((int)uVar1 >> 2);" (assignment_expression "uVar2 = (undefined1)((int)uVar1 >> 2)" (identifier "uVar2") (= "=") (call_expression "(undefined1)((int)uVar1 >> 2)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "((int)uVar1 >> 2)" (( "(") (binary_expression "(int)uVar1 >> 2" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (>> ">>") (number_literal "2")) () ")")))) (; ";")) (expression_statement "uVar4 = (undefined1)((int)uVar1 >> 10);" (assignment_expression "uVar4 = (undefined1)((int)uVar1 >> 10)" (identifier "uVar4") (= "=") (call_expression "(undefined1)((int)uVar1 >> 10)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "((int)uVar1 >> 10)" (( "(") (binary_expression "(int)uVar1 >> 10" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (>> ">>") (number_literal "10")) () ")")))) (; ";")) (if_statement "if (*(char *)(param_1 + 4) == 'B') {\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }\n  else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 4) == 'B')" (( "(") (binary_expression "*(char *)(param_1 + 4) == 'B'" (pointer_expression "*(char *)(param_1 + 4)" (* "*") (cast_expression "(char *)(param_1 + 4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (== "==") (char_literal "'B'" (' "'") (character "B") (' "'"))) () ")")) (compound_statement "{\n    puVar3[6] = uVar4;\n    puVar3[7] = uVar2;\n  }" ({ "{") (expression_statement "puVar3[6] = uVar4;" (assignment_expression "puVar3[6] = uVar4" (subscript_expression "puVar3[6]" (identifier "puVar3") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "puVar3[7] = uVar2;" (assignment_expression "puVar3[7] = uVar2" (subscript_expression "puVar3[7]" (identifier "puVar3") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (} "}")) (else_clause "else {\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" (else "else") (compound_statement "{\n    puVar3[6] = uVar2;\n    puVar3[7] = uVar4;\n  }" ({ "{") (expression_statement "puVar3[6] = uVar2;" (assignment_expression "puVar3[6] = uVar2" (subscript_expression "puVar3[6]" (identifier "puVar3") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "puVar3[7] = uVar4;" (assignment_expression "puVar3[7] = uVar4" (subscript_expression "puVar3[7]" (identifier "puVar3") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "uVar4")) (; ";")) (} "}")))) (expression_statement "memset(puVar3 + 8,0,uVar1 & 0xfffffffc);" (call_expression "memset(puVar3 + 8,0,uVar1 & 0xfffffffc)" (identifier "memset") (argument_list "(puVar3 + 8,0,uVar1 & 0xfffffffc)" (( "(") (binary_expression "puVar3 + 8" (identifier "puVar3") (+ "+") (number_literal "8")) (, ",") (number_literal "0") (, ",") (binary_expression "uVar1 & 0xfffffffc" (identifier "uVar1") (& "&") (number_literal "0xfffffffc")) () ")"))) (; ";")) (expression_statement "memcpy(puVar3 + 8,__s,__n);" (call_expression "memcpy(puVar3 + 8,__s,__n)" (identifier "memcpy") (argument_list "(puVar3 + 8,__s,__n)" (( "(") (binary_expression "puVar3 + 8" (identifier "puVar3") (+ "+") (number_literal "8")) (, ",") (identifier "__s") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);" (call_expression "FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8)" (identifier "FUN_0003b910") (argument_list "(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c)" (( "(") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c")) () ")")))) (, ",") (identifier "puVar3") (, ",") (binary_expression "(uVar1 & 0xfffffffc) + 8" (parenthesized_expression "(uVar1 & 0xfffffffc)" (( "(") (binary_expression "uVar1 & 0xfffffffc" (identifier "uVar1") (& "&") (number_literal "0xfffffffc")) () ")")) (+ "+") (number_literal "8")) () ")"))) (; ";")) (expression_statement "FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));" (call_expression "FUN_00039e40(*(undefined4 *)(param_1 + 0x4c))" (identifier "FUN_00039e40") (argument_list "(*(undefined4 *)(param_1 + 0x4c))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c)" (( "(") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x40) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x40) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x40)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x40)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0001b250(puVar3);" (call_expression "FUN_0001b250(puVar3)" (identifier "FUN_0001b250") (argument_list "(puVar3)" (( "(") (identifier "puVar3") () ")"))) (; ";")) (expression_statement "FUN_0001b250(__s);" (call_expression "FUN_0001b250(__s)" (identifier "FUN_0001b250") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *xconn,char *err_message)

{
  type_2 var_7;
  char cVar2;
  char *__s;
  size_t var_4;
  char *var_5;
  char cVar3;
  
  __s = var_1("%s X11 proxy: %s\n",appname,err_message);
  var_4 = var_2(__s);
  var_5 = (char *)var_3(var_4 + 0xd,1);
  *var_5 = '\0';
  var_5[1] = (char)var_4;
  var_7 = var_4 + 3;
  *(type_3 *)(var_5 + 2) = *(type_3 *)(xconn->firstpkt + 2);
  cVar2 = (char)((int)var_7 >> 2);
  cVar3 = (char)((int)var_7 >> 10);
  if (xconn->firstpkt[0] == 'B') {
    var_5[6] = cVar3;
    var_5[7] = cVar2;
  }
  else {
    var_5[6] = cVar2;
    var_5[7] = cVar3;
  }
  var_6(var_5 + 8,0,var_7 & 0xfffffffc);
  var_8(var_5 + 8,__s,var_4);
  var_9(xconn->c,var_5,(var_7 & 0xfffffffc) + 8);
  var_10(xconn->c);
  xconn->no_data_sent_to_x_client = 0;
  var_11(var_5);
  var_11(__s);
  return;
}


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

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

void __regparm3 MASKED(int param_1,undefined4 param_2)

{
  uint uVar1;
  undefined1 uVar2;
  char *__s;
  size_t __n;
  undefined1 *puVar3;
  undefined1 uVar4;
  
  __s = (char *)FUN_0001b030("%s X11 proxy: %s\n",PTR_DAT_000a7924,param_2);
  __n = strlen(__s);
  puVar3 = (undefined1 *)FUN_0001a9c0(__n + 0xd,1);
  *puVar3 = 0;
  puVar3[1] = (char)__n;
  uVar1 = __n + 3;
  *(undefined4 *)(puVar3 + 2) = *(undefined4 *)(param_1 + 6);
  uVar2 = (undefined1)((int)uVar1 >> 2);
  uVar4 = (undefined1)((int)uVar1 >> 10);
  if (*(char *)(param_1 + 4) == 'B') {
    puVar3[6] = uVar4;
    puVar3[7] = uVar2;
  }
  else {
    puVar3[6] = uVar2;
    puVar3[7] = uVar4;
  }
  memset(puVar3 + 8,0,uVar1 & 0xfffffffc);
  memcpy(puVar3 + 8,__s,__n);
  FUN_0003b910(*(undefined4 *)(param_1 + 0x4c),puVar3,(uVar1 & 0xfffffffc) + 8);
  FUN_00039e40(*(undefined4 *)(param_1 + 0x4c));
  *(undefined4 *)(param_1 + 0x40) = 0;
  FUN_0001b250(puVar3);
  FUN_0001b250(__s);
  return;
}

