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

void des3_encrypt_pubkey(uchar *key,uchar *blk,int len)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  int in_GS_OFFSET;
  DESContext ourkeys [3];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = *(uint *)(key + 4);
  uVar3 = *(uint *)key;
  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,
                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,
                ourkeys);
  uVar2 = *(uint *)(key + 0xc);
  uVar3 = *(uint *)(key + 8);
  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,
                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,
                ourkeys + 1);
  uVar2 = *(uint *)(key + 4);
  uVar3 = *(uint *)key;
  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,
                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,
                ourkeys + 2);
  des_3cbc_encrypt(blk,len,ourkeys);
  smemclr(ourkeys,0x198);
  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 FUN_0004b6d0(void)

{
  int in_GS_OFFSET;
  undefined1 local_1b8 [408];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x4b6d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_00049840();
  FUN_00049840();
  FUN_00049840();
  FUN_0004b060();
  FUN_0001b330(local_1b8,0x198);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014980
ADD EBX,0x5d697
SUB ESP,0x1ac
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x19c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x1c0]
LEA EDI,[ESP + 0x4]
MOV EBP,dword ptr [ESP + 0x1c4]
MOV ECX,EDI
MOV EDX,dword ptr [ESI + 0x4]
MOV EAX,dword ptr [ESI]
BSWAP EDX
BSWAP EAX
CALL 0x00049840
MOV EDX,dword ptr [ESI + 0xc]
MOV EAX,dword ptr [ESI + 0x8]
LEA ECX,[ESP + 0x8c]
BSWAP EDX
BSWAP EAX
CALL 0x00049840
MOV EDX,dword ptr [ESI + 0x4]
MOV EAX,dword ptr [ESI]
LEA ECX,[ESP + 0x114]
BSWAP EDX
BSWAP EAX
CALL 0x00049840
MOV EAX,EBP
MOV EDX,dword ptr [ESP + 0x1c8]
MOV ECX,EDI
CALL 0x0004b060
SUB ESP,0x8
PUSH 0x198
PUSH EDI
CALL 0x0001b330
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x19c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0004b77d
ADD ESP,0x1ac
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0006f2a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0004b6d0(void)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}\n\n" comment (function_definition "void FUN_0004b6d0(void)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" primitive_type (function_declarator "FUN_0004b6d0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" { (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_1b8 [408];" type_identifier (array_declarator "local_1b8 [408]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x4b6d9;" (assignment_expression "uStack_14 = 0x4b6d9" 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_00049840();" (call_expression "FUN_00049840()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00049840();" (call_expression "FUN_00049840()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00049840();" (call_expression "FUN_00049840()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0004b060();" (call_expression "FUN_0004b060()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0001b330(local_1b8,0x198);" (call_expression "FUN_0001b330(local_1b8,0x198)" identifier (argument_list "(local_1b8,0x198)" ( identifier , number_literal ))) ;) (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_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid des3_encrypt_pubkey(uchar *key,uchar *blk,int len)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  DESContext ourkeys [3];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(key + 4);\n  uVar3 = *(uint *)key;\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys);\n  uVar2 = *(uint *)(key + 0xc);\n  uVar3 = *(uint *)(key + 8);\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 1);\n  uVar2 = *(uint *)(key + 4);\n  uVar3 = *(uint *)key;\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 2);\n  des_3cbc_encrypt(blk,len,ourkeys);\n  smemclr(ourkeys,0x198);\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 comment (function_definition "void des3_encrypt_pubkey(uchar *key,uchar *blk,int len)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  DESContext ourkeys [3];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(key + 4);\n  uVar3 = *(uint *)key;\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys);\n  uVar2 = *(uint *)(key + 0xc);\n  uVar3 = *(uint *)(key + 8);\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 1);\n  uVar2 = *(uint *)(key + 4);\n  uVar3 = *(uint *)key;\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 2);\n  des_3cbc_encrypt(blk,len,ourkeys);\n  smemclr(ourkeys,0x198);\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 (function_declarator "des3_encrypt_pubkey(uchar *key,uchar *blk,int len)" identifier (parameter_list "(uchar *key,uchar *blk,int len)" ( (parameter_declaration "uchar *key" type_identifier (pointer_declarator "*key" * identifier)) , (parameter_declaration "uchar *blk" type_identifier (pointer_declarator "*blk" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  DESContext ourkeys [3];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(key + 4);\n  uVar3 = *(uint *)key;\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys);\n  uVar2 = *(uint *)(key + 0xc);\n  uVar3 = *(uint *)(key + 8);\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 1);\n  uVar2 = *(uint *)(key + 4);\n  uVar3 = *(uint *)key;\n  des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 2);\n  des_3cbc_encrypt(blk,len,ourkeys);\n  smemclr(ourkeys,0x198);\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 "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "DESContext ourkeys [3];" type_identifier (array_declarator "ourkeys [3]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(key + 4);" (assignment_expression "uVar2 = *(uint *)(key + 4)" identifier = (pointer_expression "*(uint *)(key + 4)" * (cast_expression "(uint *)(key + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(key + 4)" ( (binary_expression "key + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(uint *)key;" (assignment_expression "uVar3 = *(uint *)key" identifier = (pointer_expression "*(uint *)key" * (cast_expression "(uint *)key" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys);" (call_expression "des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys)" identifier (argument_list "(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys)" ( (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8" (binary_expression "uVar3 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar3 & 0xff0000) >> 8" (parenthesized_expression "(uVar3 & 0xff0000)" ( (binary_expression "uVar3 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar3 & 0xff00) << 8" (parenthesized_expression "(uVar3 & 0xff00)" ( (binary_expression "uVar3 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar3 << 0x18" identifier << number_literal)) , (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal)) , identifier ))) ;) (expression_statement "uVar2 = *(uint *)(key + 0xc);" (assignment_expression "uVar2 = *(uint *)(key + 0xc)" identifier = (pointer_expression "*(uint *)(key + 0xc)" * (cast_expression "(uint *)(key + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(key + 0xc)" ( (binary_expression "key + 0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(uint *)(key + 8);" (assignment_expression "uVar3 = *(uint *)(key + 8)" identifier = (pointer_expression "*(uint *)(key + 8)" * (cast_expression "(uint *)(key + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(key + 8)" ( (binary_expression "key + 8" identifier + number_literal) ))))) ;) (expression_statement "des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 1);" (call_expression "des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 1)" identifier (argument_list "(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 1)" ( (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8" (binary_expression "uVar3 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar3 & 0xff0000) >> 8" (parenthesized_expression "(uVar3 & 0xff0000)" ( (binary_expression "uVar3 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar3 & 0xff00) << 8" (parenthesized_expression "(uVar3 & 0xff00)" ( (binary_expression "uVar3 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar3 << 0x18" identifier << number_literal)) , (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal)) , (binary_expression "ourkeys + 1" identifier + number_literal) ))) ;) (expression_statement "uVar2 = *(uint *)(key + 4);" (assignment_expression "uVar2 = *(uint *)(key + 4)" identifier = (pointer_expression "*(uint *)(key + 4)" * (cast_expression "(uint *)(key + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(key + 4)" ( (binary_expression "key + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(uint *)key;" (assignment_expression "uVar3 = *(uint *)key" identifier = (pointer_expression "*(uint *)key" * (cast_expression "(uint *)key" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 2);" (call_expression "des_key_setup(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 2)" identifier (argument_list "(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18,\n                uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18,\n                ourkeys + 2)" ( (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8" (binary_expression "uVar3 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar3 & 0xff0000) >> 8" (parenthesized_expression "(uVar3 & 0xff0000)" ( (binary_expression "uVar3 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar3 & 0xff00) << 8" (parenthesized_expression "(uVar3 & 0xff00)" ( (binary_expression "uVar3 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar3 << 0x18" identifier << number_literal)) , (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal)) , (binary_expression "ourkeys + 2" identifier + number_literal) ))) ;) (expression_statement "des_3cbc_encrypt(blk,len,ourkeys);" (call_expression "des_3cbc_encrypt(blk,len,ourkeys)" identifier (argument_list "(blk,len,ourkeys)" ( identifier , identifier , identifier ))) ;) (expression_statement "smemclr(ourkeys,0x198);" (call_expression "smemclr(ourkeys,0x198)" identifier (argument_list "(ourkeys,0x198)" ( identifier , number_literal ))) ;) (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 FUN_0004b6d0(void)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}\n\n" (function_definition "void FUN_0004b6d0(void)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" primitive_type (function_declarator "FUN_0004b6d0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" { (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_1b8 [408];" type_identifier (array_declarator "local_1b8 [408]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x4b6d9;" (assignment_expression "uStack_14 = 0x4b6d9" 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_00049840();" (call_expression "FUN_00049840()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00049840();" (call_expression "FUN_00049840()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00049840();" (call_expression "FUN_00049840()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0004b060();" (call_expression "FUN_0004b060()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0001b330(local_1b8,0x198);" (call_expression "FUN_0001b330(local_1b8,0x198)" identifier (argument_list "(local_1b8,0x198)" ( identifier , number_literal ))) ;) (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_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (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 ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_0004b6d0(void)\n\n{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" (primitive_type "void") (function_declarator "FUN_0004b6d0(void)" (identifier "FUN_0004b6d0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int in_GS_OFFSET;\n  undefined1 local_1b8 [408];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4b6d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_00049840();\n  FUN_00049840();\n  FUN_00049840();\n  FUN_0004b060();\n  FUN_0001b330(local_1b8,0x198);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" ({ "{") (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_1b8 [408];" (type_identifier "undefined1") (array_declarator "local_1b8 [408]" (identifier "local_1b8") ([ "[") (number_literal "408") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x4b6d9;" (assignment_expression "uStack_14 = 0x4b6d9" (identifier "uStack_14") (= "=") (number_literal "0x4b6d9")) (; ";")) (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_00049840();" (call_expression "FUN_00049840()" (identifier "FUN_00049840") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00049840();" (call_expression "FUN_00049840()" (identifier "FUN_00049840") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00049840();" (call_expression "FUN_00049840()" (identifier "FUN_00049840") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0004b060();" (call_expression "FUN_0004b060()" (identifier "FUN_0004b060") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0001b330(local_1b8,0x198);" (call_expression "FUN_0001b330(local_1b8,0x198)" (identifier "FUN_0001b330") (argument_list "(local_1b8,0x198)" (( "(") (identifier "local_1b8") (, ",") (number_literal "0x198") () ")"))) (; ";")) (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_0006f2a0();" (call_expression "FUN_0006f2a0()" (identifier "FUN_0006f2a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void function_1(type_1 *var_2,type_1 *blk,int len)

{
  int var_9;
  type_2 var_5;
  type_2 var_4;
  int var_1;
  type_3 var_6 [3];
  
  var_9 = *(int *)(var_1 + 0x14);
  var_5 = *(type_2 *)(var_2 + 4);
  var_4 = *(type_2 *)var_2;
  var_3(var_4 >> 0x18 | (var_4 & 0xff0000) >> 8 | (var_4 & 0xff00) << 8 | var_4 << 0x18,
                var_5 >> 0x18 | (var_5 & 0xff0000) >> 8 | (var_5 & 0xff00) << 8 | var_5 << 0x18,
                var_6);
  var_5 = *(type_2 *)(var_2 + 0xc);
  var_4 = *(type_2 *)(var_2 + 8);
  var_3(var_4 >> 0x18 | (var_4 & 0xff0000) >> 8 | (var_4 & 0xff00) << 8 | var_4 << 0x18,
                var_5 >> 0x18 | (var_5 & 0xff0000) >> 8 | (var_5 & 0xff00) << 8 | var_5 << 0x18,
                var_6 + 1);
  var_5 = *(type_2 *)(var_2 + 4);
  var_4 = *(type_2 *)var_2;
  var_3(var_4 >> 0x18 | (var_4 & 0xff0000) >> 8 | (var_4 & 0xff00) << 8 | var_4 << 0x18,
                var_5 >> 0x18 | (var_5 & 0xff0000) >> 8 | (var_5 & 0xff00) << 8 | var_5 << 0x18,
                var_6 + 2);
  var_7(blk,len,var_6);
  var_8(var_6,0x198);
  if (var_9 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) 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))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void MASKED(void)

{
  int in_GS_OFFSET;
  undefined1 local_1b8 [408];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x4b6d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_00049840();
  FUN_00049840();
  FUN_00049840();
  FUN_0004b060();
  FUN_0001b330(local_1b8,0x198);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}

