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

int sftp_send(sftp_packet *pkt)

{
  int iVar1;
  
  *pkt->data = (char)(pkt->length - 4 >> 0x18);
  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);
  pkt->data[2] = (char)(pkt->length - 4 >> 8);
  pkt->data[3] = (char)pkt->length + -4;
  iVar1 = sftp_senddata(pkt->data,pkt->length);
  sftp_pkt_free(pkt);
  return iVar1;
}



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

undefined4 FUN_000291f0(int *param_1)

{
  undefined4 uVar1;
  
  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);
  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);
  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);
  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;
  uVar1 = FUN_000211c0(*param_1,param_1[1]);
  FUN_000289a0();
  return uVar1;
}


PUSH ESI
PUSH EBX
CALL 0x00014980
ADD EBX,0x7fb79
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x18]
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
SHR EAX,0x18
MOV byte ptr [EDX],AL
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
SHR EAX,0x10
MOV byte ptr [EDX + 0x1],AL
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
MOV byte ptr [EDX + 0x2],AH
MOVZX EAX,byte ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
MOV byte ptr [EDX + 0x3],AL
PUSH dword ptr [ESI + 0x4]
PUSH dword ptr [ESI]
CALL 0x000211c0
MOV EBX,EAX
MOV EAX,ESI
CALL 0x000289a0
ADD ESP,0x14
MOV EAX,EBX
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_000291f0(int *param_1)\n\n{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}\n\n" comment (function_definition "undefined4 FUN_000291f0(int *param_1)\n\n{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}" type_identifier (function_declarator "FUN_000291f0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "*(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);" (assignment_expression "*(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18)" (pointer_expression "*(char *)*param_1" * (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) = (cast_expression "(char)((uint)(param_1[1] + -4) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(param_1[1] + -4) >> 0x18)" ( (binary_expression "(uint)(param_1[1] + -4) >> 0x18" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] + -4)" ( (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*param_1 + 1)" * (cast_expression "(char *)(*param_1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 1)" ( (binary_expression "*param_1 + 1" (pointer_expression "*param_1" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(param_1[1] + -4) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(param_1[1] + -4) >> 0x10)" ( (binary_expression "(uint)(param_1[1] + -4) >> 0x10" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] + -4)" ( (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);" (assignment_expression "*(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8)" (pointer_expression "*(char *)(*param_1 + 2)" * (cast_expression "(char *)(*param_1 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 2)" ( (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(param_1[1] + -4) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(param_1[1] + -4) >> 8)" ( (binary_expression "(uint)(param_1[1] + -4) >> 8" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] + -4)" ( (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*param_1 + 3) = (char)param_1[1] + -4;" (assignment_expression "*(char *)(*param_1 + 3) = (char)param_1[1] + -4" (pointer_expression "*(char *)(*param_1 + 3)" * (cast_expression "(char *)(*param_1 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 3)" ( (binary_expression "*param_1 + 3" (pointer_expression "*param_1" * identifier) + number_literal) )))) = (binary_expression "(char)param_1[1] + -4" (cast_expression "(char)param_1[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "uVar1 = FUN_000211c0(*param_1,param_1[1]);" (assignment_expression "uVar1 = FUN_000211c0(*param_1,param_1[1])" identifier = (call_expression "FUN_000211c0(*param_1,param_1[1])" identifier (argument_list "(*param_1,param_1[1])" ( (pointer_expression "*param_1" * identifier) , (subscript_expression "param_1[1]" identifier [ number_literal ]) )))) ;) (expression_statement "FUN_000289a0();" (call_expression "FUN_000289a0()" identifier (argument_list "()" ( ))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint sftp_send(sftp_packet *pkt)\n\n{\n  int iVar1;\n  \n  *pkt->data = (char)(pkt->length - 4 >> 0x18);\n  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);\n  pkt->data[2] = (char)(pkt->length - 4 >> 8);\n  pkt->data[3] = (char)pkt->length + -4;\n  iVar1 = sftp_senddata(pkt->data,pkt->length);\n  sftp_pkt_free(pkt);\n  return iVar1;\n}\n\n" comment comment (function_definition "int sftp_send(sftp_packet *pkt)\n\n{\n  int iVar1;\n  \n  *pkt->data = (char)(pkt->length - 4 >> 0x18);\n  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);\n  pkt->data[2] = (char)(pkt->length - 4 >> 8);\n  pkt->data[3] = (char)pkt->length + -4;\n  iVar1 = sftp_senddata(pkt->data,pkt->length);\n  sftp_pkt_free(pkt);\n  return iVar1;\n}" primitive_type (function_declarator "sftp_send(sftp_packet *pkt)" identifier (parameter_list "(sftp_packet *pkt)" ( (parameter_declaration "sftp_packet *pkt" type_identifier (pointer_declarator "*pkt" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  *pkt->data = (char)(pkt->length - 4 >> 0x18);\n  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);\n  pkt->data[2] = (char)(pkt->length - 4 >> 8);\n  pkt->data[3] = (char)pkt->length + -4;\n  iVar1 = sftp_senddata(pkt->data,pkt->length);\n  sftp_pkt_free(pkt);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "*pkt->data = (char)(pkt->length - 4 >> 0x18);" (assignment_expression "*pkt->data = (char)(pkt->length - 4 >> 0x18)" (pointer_expression "*pkt->data" * (field_expression "pkt->data" identifier -> field_identifier)) = (cast_expression "(char)(pkt->length - 4 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(pkt->length - 4 >> 0x18)" ( (binary_expression "pkt->length - 4 >> 0x18" (binary_expression "pkt->length - 4" (field_expression "pkt->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "pkt->data[1] = (char)(pkt->length - 4 >> 0x10);" (assignment_expression "pkt->data[1] = (char)(pkt->length - 4 >> 0x10)" (subscript_expression "pkt->data[1]" (field_expression "pkt->data" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(char)(pkt->length - 4 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(pkt->length - 4 >> 0x10)" ( (binary_expression "pkt->length - 4 >> 0x10" (binary_expression "pkt->length - 4" (field_expression "pkt->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "pkt->data[2] = (char)(pkt->length - 4 >> 8);" (assignment_expression "pkt->data[2] = (char)(pkt->length - 4 >> 8)" (subscript_expression "pkt->data[2]" (field_expression "pkt->data" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(char)(pkt->length - 4 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(pkt->length - 4 >> 8)" ( (binary_expression "pkt->length - 4 >> 8" (binary_expression "pkt->length - 4" (field_expression "pkt->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "pkt->data[3] = (char)pkt->length + -4;" (assignment_expression "pkt->data[3] = (char)pkt->length + -4" (subscript_expression "pkt->data[3]" (field_expression "pkt->data" identifier -> field_identifier) [ number_literal ]) = (binary_expression "(char)pkt->length + -4" (cast_expression "(char)pkt->length" ( (type_descriptor "char" primitive_type) ) (field_expression "pkt->length" identifier -> field_identifier)) + number_literal)) ;) (expression_statement "iVar1 = sftp_senddata(pkt->data,pkt->length);" (assignment_expression "iVar1 = sftp_senddata(pkt->data,pkt->length)" identifier = (call_expression "sftp_senddata(pkt->data,pkt->length)" identifier (argument_list "(pkt->data,pkt->length)" ( (field_expression "pkt->data" identifier -> field_identifier) , (field_expression "pkt->length" identifier -> field_identifier) )))) ;) (expression_statement "sftp_pkt_free(pkt);" (call_expression "sftp_pkt_free(pkt)" identifier (argument_list "(pkt)" ( identifier ))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_000291f0(int *param_1)\n\n{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}\n\n" (function_definition "undefined4 FUN_000291f0(int *param_1)\n\n{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}" type_identifier (function_declarator "FUN_000291f0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "*(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);" (assignment_expression "*(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18)" (pointer_expression "*(char *)*param_1" * (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) = (cast_expression "(char)((uint)(param_1[1] + -4) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(param_1[1] + -4) >> 0x18)" ( (binary_expression "(uint)(param_1[1] + -4) >> 0x18" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] + -4)" ( (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*param_1 + 1)" * (cast_expression "(char *)(*param_1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 1)" ( (binary_expression "*param_1 + 1" (pointer_expression "*param_1" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(param_1[1] + -4) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(param_1[1] + -4) >> 0x10)" ( (binary_expression "(uint)(param_1[1] + -4) >> 0x10" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] + -4)" ( (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);" (assignment_expression "*(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8)" (pointer_expression "*(char *)(*param_1 + 2)" * (cast_expression "(char *)(*param_1 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 2)" ( (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(param_1[1] + -4) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(param_1[1] + -4) >> 8)" ( (binary_expression "(uint)(param_1[1] + -4) >> 8" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] + -4)" ( (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*param_1 + 3) = (char)param_1[1] + -4;" (assignment_expression "*(char *)(*param_1 + 3) = (char)param_1[1] + -4" (pointer_expression "*(char *)(*param_1 + 3)" * (cast_expression "(char *)(*param_1 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 3)" ( (binary_expression "*param_1 + 3" (pointer_expression "*param_1" * identifier) + number_literal) )))) = (binary_expression "(char)param_1[1] + -4" (cast_expression "(char)param_1[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "uVar1 = FUN_000211c0(*param_1,param_1[1]);" (assignment_expression "uVar1 = FUN_000211c0(*param_1,param_1[1])" identifier = (call_expression "FUN_000211c0(*param_1,param_1[1])" identifier (argument_list "(*param_1,param_1[1])" ( (pointer_expression "*param_1" * identifier) , (subscript_expression "param_1[1]" identifier [ number_literal ]) )))) ;) (expression_statement "FUN_000289a0();" (call_expression "FUN_000289a0()" identifier (argument_list "()" ( ))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (subscript_expression IDENT [ LIT ]) )))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_000291f0(int *param_1)\n\n{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "FUN_000291f0(int *param_1)" (identifier "FUN_000291f0") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);\n  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);\n  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);\n  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;\n  uVar1 = FUN_000211c0(*param_1,param_1[1]);\n  FUN_000289a0();\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (expression_statement "*(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);" (assignment_expression "*(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18)" (pointer_expression "*(char *)*param_1" (* "*") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (= "=") (cast_expression "(char)((uint)(param_1[1] + -4) >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(param_1[1] + -4) >> 0x18)" (( "(") (binary_expression "(uint)(param_1[1] + -4) >> 0x18" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] + -4)" (( "(") (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "*(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*param_1 + 1)" (* "*") (cast_expression "(char *)(*param_1 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 1)" (( "(") (binary_expression "*param_1 + 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "1")) () ")")))) (= "=") (cast_expression "(char)((uint)(param_1[1] + -4) >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(param_1[1] + -4) >> 0x10)" (( "(") (binary_expression "(uint)(param_1[1] + -4) >> 0x10" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] + -4)" (( "(") (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "*(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);" (assignment_expression "*(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8)" (pointer_expression "*(char *)(*param_1 + 2)" (* "*") (cast_expression "(char *)(*param_1 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 2)" (( "(") (binary_expression "*param_1 + 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "2")) () ")")))) (= "=") (cast_expression "(char)((uint)(param_1[1] + -4) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(param_1[1] + -4) >> 8)" (( "(") (binary_expression "(uint)(param_1[1] + -4) >> 8" (call_expression "(uint)(param_1[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] + -4)" (( "(") (binary_expression "param_1[1] + -4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(char *)(*param_1 + 3) = (char)param_1[1] + -4;" (assignment_expression "*(char *)(*param_1 + 3) = (char)param_1[1] + -4" (pointer_expression "*(char *)(*param_1 + 3)" (* "*") (cast_expression "(char *)(*param_1 + 3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 3)" (( "(") (binary_expression "*param_1 + 3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "3")) () ")")))) (= "=") (binary_expression "(char)param_1[1] + -4" (cast_expression "(char)param_1[1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (+ "+") (number_literal "-4"))) (; ";")) (expression_statement "uVar1 = FUN_000211c0(*param_1,param_1[1]);" (assignment_expression "uVar1 = FUN_000211c0(*param_1,param_1[1])" (identifier "uVar1") (= "=") (call_expression "FUN_000211c0(*param_1,param_1[1])" (identifier "FUN_000211c0") (argument_list "(*param_1,param_1[1])" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) () ")")))) (; ";")) (expression_statement "FUN_000289a0();" (call_expression "FUN_000289a0()" (identifier "FUN_000289a0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

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

int function_1(type_1 *pkt)

{
  int iVar1;
  
  *pkt->data = (char)(pkt->length - 4 >> 0x18);
  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);
  pkt->data[2] = (char)(pkt->length - 4 >> 8);
  pkt->data[3] = (char)pkt->length + -4;
  iVar1 = var_1(pkt->data,pkt->length);
  var_2(pkt);
  return iVar1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (identifier)))))

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

undefined4 MASKED(int *param_1)

{
  undefined4 uVar1;
  
  *(char *)*param_1 = (char)((uint)(param_1[1] + -4) >> 0x18);
  *(char *)(*param_1 + 1) = (char)((uint)(param_1[1] + -4) >> 0x10);
  *(char *)(*param_1 + 2) = (char)((uint)(param_1[1] + -4) >> 8);
  *(char *)(*param_1 + 3) = (char)param_1[1] + -4;
  uVar1 = FUN_000211c0(*param_1,param_1[1]);
  FUN_000289a0();
  return uVar1;
}

