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

void __regparm3 calc_resp(uchar *keys,uchar *plaintext,uchar *results)

{
  int iVar1;
  int in_GS_OFFSET;
  des_ctx des;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  setup_des_key(keys,&des);
  nettle_des_encrypt(&des,8,results,plaintext);
  setup_des_key(keys + 7,&des);
  nettle_des_encrypt(&des,8,results + 8,plaintext);
  setup_des_key(keys + 0xe,&des);
  nettle_des_encrypt(&des,8,results + 0x10,plaintext);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void __regparm3 FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)

{
  int in_GS_OFFSET;
  undefined1 local_a0 [128];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x5159d;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_000514b0();
  nettle_des_encrypt(local_a0,8,param_3,param_2);
  FUN_000514b0();
  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);
  FUN_000514b0();
  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}


PUSH EBP
MOV EBP,EDX
PUSH EDI
MOV EDI,ECX
PUSH ESI
PUSH EBX
CALL 0x00019070
ADD EBX,0x4f633
SUB ESP,0xac
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x9c],ECX
XOR ECX,ECX
LEA ESI,[ESP + 0x1c]
MOV dword ptr [ESP + 0xc],EAX
MOV EDX,ESI
CALL 0x000514b0
PUSH EBP
PUSH EDI
PUSH 0x8
PUSH ESI
CALL 0x000161c0
MOV EAX,dword ptr [ESP + 0x1c]
MOV EDX,ESI
ADD EAX,0x7
CALL 0x000514b0
LEA EAX,[EDI + 0x8]
PUSH EBP
ADD EDI,0x10
PUSH EAX
PUSH 0x8
PUSH ESI
CALL 0x000161c0
ADD ESP,0x20
MOV EAX,dword ptr [ESP + 0xc]
MOV EDX,ESI
ADD EAX,0xe
CALL 0x000514b0
PUSH EBP
PUSH EDI
PUSH 0x8
PUSH ESI
CALL 0x000161c0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x9c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00051629
ADD ESP,0xac
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0006da50
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}\n\n" comment (function_definition "void __regparm3 FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" { (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_a0 [128];" type_identifier (array_declarator "local_a0 [128]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5159d;" (assignment_expression "uStack_14 = 0x5159d" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "nettle_des_encrypt(local_a0,8,param_3,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3,param_2)" identifier (argument_list "(local_a0,8,param_3,param_2)" ( identifier , number_literal , identifier , identifier ))) ;) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3 + 8,param_2)" identifier (argument_list "(local_a0,8,param_3 + 8,param_2)" ( identifier , number_literal , (binary_expression "param_3 + 8" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2)" identifier (argument_list "(local_a0,8,param_3 + 0x10,param_2)" ( identifier , number_literal , (binary_expression "param_3 + 0x10" identifier + number_literal) , identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 calc_resp(uchar *keys,uchar *plaintext,uchar *results)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  des_ctx des;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  setup_des_key(keys,&des);\n  nettle_des_encrypt(&des,8,results,plaintext);\n  setup_des_key(keys + 7,&des);\n  nettle_des_encrypt(&des,8,results + 8,plaintext);\n  setup_des_key(keys + 0xe,&des);\n  nettle_des_encrypt(&des,8,results + 0x10,plaintext);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void __regparm3 calc_resp(uchar *keys,uchar *plaintext,uchar *results)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  des_ctx des;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  setup_des_key(keys,&des);\n  nettle_des_encrypt(&des,8,results,plaintext);\n  setup_des_key(keys + 7,&des);\n  nettle_des_encrypt(&des,8,results + 8,plaintext);\n  setup_des_key(keys + 0xe,&des);\n  nettle_des_encrypt(&des,8,results + 0x10,plaintext);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "calc_resp(uchar *keys,uchar *plaintext,uchar *results)" identifier (parameter_list "(uchar *keys,uchar *plaintext,uchar *results)" ( (parameter_declaration "uchar *keys" type_identifier (pointer_declarator "*keys" * identifier)) , (parameter_declaration "uchar *plaintext" type_identifier (pointer_declarator "*plaintext" * identifier)) , (parameter_declaration "uchar *results" type_identifier (pointer_declarator "*results" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  des_ctx des;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  setup_des_key(keys,&des);\n  nettle_des_encrypt(&des,8,results,plaintext);\n  setup_des_key(keys + 7,&des);\n  nettle_des_encrypt(&des,8,results + 8,plaintext);\n  setup_des_key(keys + 0xe,&des);\n  nettle_des_encrypt(&des,8,results + 0x10,plaintext);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "des_ctx des;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "setup_des_key(keys,&des);" (call_expression "setup_des_key(keys,&des)" identifier (argument_list "(keys,&des)" ( identifier , (pointer_expression "&des" & identifier) ))) ;) (expression_statement "nettle_des_encrypt(&des,8,results,plaintext);" (call_expression "nettle_des_encrypt(&des,8,results,plaintext)" identifier (argument_list "(&des,8,results,plaintext)" ( (pointer_expression "&des" & identifier) , number_literal , identifier , identifier ))) ;) (expression_statement "setup_des_key(keys + 7,&des);" (call_expression "setup_des_key(keys + 7,&des)" identifier (argument_list "(keys + 7,&des)" ( (binary_expression "keys + 7" identifier + number_literal) , (pointer_expression "&des" & identifier) ))) ;) (expression_statement "nettle_des_encrypt(&des,8,results + 8,plaintext);" (call_expression "nettle_des_encrypt(&des,8,results + 8,plaintext)" identifier (argument_list "(&des,8,results + 8,plaintext)" ( (pointer_expression "&des" & identifier) , number_literal , (binary_expression "results + 8" identifier + number_literal) , identifier ))) ;) (expression_statement "setup_des_key(keys + 0xe,&des);" (call_expression "setup_des_key(keys + 0xe,&des)" identifier (argument_list "(keys + 0xe,&des)" ( (binary_expression "keys + 0xe" identifier + number_literal) , (pointer_expression "&des" & identifier) ))) ;) (expression_statement "nettle_des_encrypt(&des,8,results + 0x10,plaintext);" (call_expression "nettle_des_encrypt(&des,8,results + 0x10,plaintext)" identifier (argument_list "(&des,8,results + 0x10,plaintext)" ( (pointer_expression "&des" & identifier) , number_literal , (binary_expression "results + 0x10" identifier + number_literal) , identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006da50();\n}\n\n" (function_definition "void __regparm3 FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006da50();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006da50();\n}" { (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_a0 [128];" type_identifier (array_declarator "local_a0 [128]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5159d;" (assignment_expression "uStack_14 = 0x5159d" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "nettle_des_encrypt(local_a0,8,param_3,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3,param_2)" identifier (argument_list "(local_a0,8,param_3,param_2)" ( identifier , number_literal , identifier , identifier ))) ;) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3 + 8,param_2)" identifier (argument_list "(local_a0,8,param_3 + 8,param_2)" ( identifier , number_literal , (binary_expression "param_3 + 8" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2)" identifier (argument_list "(local_a0,8,param_3 + 0x10,param_2)" ( identifier , number_literal , (binary_expression "param_3 + 0x10" identifier + number_literal) , identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression IDENT + LIT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006da50();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00051590(undefined4 param_1,undefined4 param_2,int param_3)" (identifier "FUN_00051590") (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int in_GS_OFFSET;\n  undefined1 local_a0 [128];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5159d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);\n  FUN_000514b0();\n  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006da50();\n}" ({ "{") (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_a0 [128];" (type_identifier "undefined1") (array_declarator "local_a0 [128]" (identifier "local_a0") ([ "[") (number_literal "128") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x5159d;" (assignment_expression "uStack_14 = 0x5159d" (identifier "uStack_14") (= "=") (number_literal "0x5159d")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" (identifier "FUN_000514b0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "nettle_des_encrypt(local_a0,8,param_3,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3,param_2)" (identifier "nettle_des_encrypt") (argument_list "(local_a0,8,param_3,param_2)" (( "(") (identifier "local_a0") (, ",") (number_literal "8") (, ",") (identifier "param_3") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" (identifier "FUN_000514b0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3 + 8,param_2)" (identifier "nettle_des_encrypt") (argument_list "(local_a0,8,param_3 + 8,param_2)" (( "(") (identifier "local_a0") (, ",") (number_literal "8") (, ",") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8")) (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "FUN_000514b0();" (call_expression "FUN_000514b0()" (identifier "FUN_000514b0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);" (call_expression "nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2)" (identifier "nettle_des_encrypt") (argument_list "(local_a0,8,param_3 + 0x10,param_2)" (( "(") (identifier "local_a0") (, ",") (number_literal "8") (, ",") (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) (, ",") (identifier "param_2") () ")"))) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" (identifier "FUN_0006da50") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *var_4,type_1 *plaintext,type_1 *var_5)

{
  int var_6;
  int var_1;
  type_2 des;
  
  var_6 = *(int *)(var_1 + 0x14);
  var_2(var_4,&des);
  var_3(&des,8,var_5,plaintext);
  var_2(var_4 + 7,&des);
  var_3(&des,8,var_5 + 8,plaintext);
  var_2(var_4 + 0xe,&des);
  var_3(&des,8,var_5 + 0x10,plaintext);
  if (var_6 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_7();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (binary_expression left: (identifier) right: (number_literal)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (binary_expression left: (identifier) right: (number_literal)) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void __regparm3 MASKED(undefined4 param_1,undefined4 param_2,int param_3)

{
  int in_GS_OFFSET;
  undefined1 local_a0 [128];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x5159d;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_000514b0();
  nettle_des_encrypt(local_a0,8,param_3,param_2);
  FUN_000514b0();
  nettle_des_encrypt(local_a0,8,param_3 + 8,param_2);
  FUN_000514b0();
  nettle_des_encrypt(local_a0,8,param_3 + 0x10,param_2);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}

