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

int makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)

{
  byte bVar1;
  ushort uVar2;
  uint3 uVar3;
  int iVar4;
  int iVar5;
  uchar *puVar6;
  int iVar7;
  
  if (len < 4) {
    return -1;
  }
  iVar7 = len + -4;
  if (result == (RSAKey *)0x0) {
    puVar6 = data + 4;
    if (order == 0) {
      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);
      if (iVar4 < 0) {
        return -1;
      }
      puVar6 = puVar6 + iVar4;
      iVar7 = iVar7 - iVar4;
    }
    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);
    if (iVar4 < 0) {
      return -1;
    }
  }
  else {
    result->bits = 0;
    bVar1 = *data;
    puVar6 = data + 4;
    result->bits = (uint)bVar1;
    uVar2 = CONCAT11(bVar1,data[1]);
    result->bits = (uint)uVar2;
    uVar3 = CONCAT21(uVar2,data[2]);
    result->bits = (uint)uVar3;
    result->bits = CONCAT31(uVar3,data[3]);
    if (order == 0) {
      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);
      if (iVar4 < 0) {
        return -1;
      }
      puVar6 = puVar6 + iVar4;
      iVar7 = iVar7 - iVar4;
    }
    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);
    if (iVar4 < 0) {
      return -1;
    }
    iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);
    if (iVar5 == 0) {
      return -1;
    }
    result->bytes = iVar4 + -2;
  }
  if (keystr != (uchar **)0x0) {
    *keystr = puVar6 + 2;
  }
  puVar6 = puVar6 + iVar4;
  if (order == 1) {
    if (result != (RSAKey *)0x0) {
      result = (RSAKey *)&result->exponent;
    }
    iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result);
    if (iVar7 < 0) {
      return -1;
    }
    puVar6 = puVar6 + iVar7;
  }
  return (int)puVar6 - (int)data;
}



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

int FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)

{
  byte bVar1;
  ushort uVar2;
  uint3 uVar3;
  int iVar4;
  int iVar5;
  byte *pbVar6;
  
  if (param_2 < 4) {
    return -1;
  }
  param_2 = param_2 + -4;
  if (param_3 == (uint *)0x0) {
    pbVar6 = param_1 + 4;
    if (param_5 == 0) {
      iVar4 = FUN_000567c0(pbVar6,param_2,0);
      if (iVar4 < 0) {
        return -1;
      }
      pbVar6 = pbVar6 + iVar4;
      param_2 = param_2 - iVar4;
    }
    iVar4 = FUN_000567c0(pbVar6,param_2,0);
    if (iVar4 < 0) {
      return -1;
    }
  }
  else {
    *param_3 = 0;
    bVar1 = *param_1;
    pbVar6 = param_1 + 4;
    *param_3 = (uint)bVar1;
    uVar2 = CONCAT11(bVar1,param_1[1]);
    *param_3 = (uint)uVar2;
    uVar3 = CONCAT21(uVar2,param_1[2]);
    *param_3 = (uint)uVar3;
    *param_3 = CONCAT31(uVar3,param_1[3]);
    if (param_5 == 0) {
      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);
      if (iVar4 < 0) {
        return -1;
      }
      pbVar6 = pbVar6 + iVar4;
      param_2 = param_2 - iVar4;
    }
    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);
    if (iVar4 < 0) {
      return -1;
    }
    iVar5 = FUN_000568f0(param_3[2]);
    if (iVar5 == 0) {
      return -1;
    }
    param_3[1] = iVar4 - 2;
  }
  if (param_4 != (int *)0x0) {
    *param_4 = (int)(pbVar6 + 2);
  }
  pbVar6 = pbVar6 + iVar4;
  if (param_5 == 1) {
    if (param_3 != (uint *)0x0) {
      param_3 = param_3 + 3;
    }
    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);
    if (iVar4 < 0) {
      return -1;
    }
    pbVar6 = pbVar6 + iVar4;
  }
  return (int)pbVar6 - (int)param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x5e087
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x34]
MOV EBP,dword ptr [ESP + 0x38]
CMP EDI,0x3
JLE 0x0006ee14
SUB EDI,0x4
TEST EBP,EBP
JZ 0x0006edf0
MOV EAX,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x30]
MOV dword ptr [EBP],0x0
MOVZX EAX,byte ptr [EAX]
LEA ESI,[EDX + 0x4]
MOV dword ptr [EBP],EAX
MOVZX ECX,byte ptr [EDX + 0x1]
SHL EAX,0x8
ADD EAX,ECX
MOV dword ptr [EBP],EAX
MOVZX ECX,byte ptr [EDX + 0x2]
SHL EAX,0x8
ADD EAX,ECX
MOV dword ptr [EBP],EAX
MOVZX ECX,byte ptr [EDX + 0x3]
SHL EAX,0x8
ADD EAX,ECX
MOV ECX,dword ptr [ESP + 0x40]
MOV dword ptr [EBP],EAX
TEST ECX,ECX
JNZ 0x0006ed6f
SUB ESP,0x4
LEA EAX,[EBP + 0xc]
PUSH EAX
PUSH EDI
PUSH ESI
CALL 0x000567c0
ADD ESP,0x10
TEST EAX,EAX
JS 0x0006ee14
ADD ESI,EAX
SUB EDI,EAX
SUB ESP,0x4
LEA EAX,[EBP + 0x8]
PUSH EAX
PUSH EDI
PUSH ESI
CALL 0x000567c0
ADD ESP,0x10
TEST EAX,EAX
MOV dword ptr [ESP + 0xc],EAX
JS 0x0006ee14
SUB ESP,0xc
PUSH dword ptr [EBP + 0x8]
CALL 0x000568f0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
TEST EAX,EAX
JZ 0x0006ee14
LEA EAX,[ECX + -0x2]
MOV dword ptr [EBP + 0x4],EAX
MOV EAX,dword ptr [ESP + 0x3c]
TEST EAX,EAX
JZ 0x0006edb9
MOV EDX,dword ptr [ESP + 0x3c]
LEA EAX,[ESI + 0x2]
MOV dword ptr [EDX],EAX
ADD ESI,ECX
CMP dword ptr [ESP + 0x40],0x1
JZ 0x0006edd0
MOV EAX,ESI
SUB EAX,dword ptr [ESP + 0x30]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST EBP,EBP
LEA EAX,[EBP + 0xc]
CMOVNZ EBP,EAX
SUB ESP,0x4
SUB EDI,ECX
PUSH EBP
PUSH EDI
PUSH ESI
CALL 0x000567c0
ADD ESP,0x10
TEST EAX,EAX
JS 0x0006ee14
ADD ESI,EAX
JMP 0x0006edc2
MOV EAX,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x40]
LEA ESI,[EAX + 0x4]
TEST EDX,EDX
JZ 0x0006ee28
SUB ESP,0x4
PUSH 0x0
PUSH EDI
PUSH ESI
CALL 0x000567c0
ADD ESP,0x10
MOV ECX,EAX
TEST EAX,EAX
JNS 0x0006eda8
ADD ESP,0x1c
MOV EAX,0xffffffff
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH 0x0
PUSH EDI
PUSH ESI
CALL 0x000567c0
ADD ESP,0x10
TEST EAX,EAX
JS 0x0006ee14
ADD ESI,EAX
SUB EDI,EAX
JMP 0x0006edff
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}\n\n" comment (function_definition "int FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}" primitive_type (function_declarator "FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)" identifier (parameter_list "(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint3 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (if_statement "if (param_2 < 4) {\n    return -1;\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_2 = param_2 + -4;" (assignment_expression "param_2 = param_2 + -4" identifier = (binary_expression "param_2 + -4" identifier + number_literal)) ;) (if_statement "if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" if (parenthesized_expression "(param_3 == (uint *)0x0)" ( (binary_expression "param_3 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }" { (expression_statement "pbVar6 = param_1 + 4;" (assignment_expression "pbVar6 = param_1 + 4" identifier = (binary_expression "param_1 + 4" identifier + number_literal)) ;) (if_statement "if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" { (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,0);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,0)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,0)" identifier (argument_list "(pbVar6,param_2,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar4;" (assignment_expression "param_2 = param_2 - iVar4" identifier = (binary_expression "param_2 - iVar4" identifier - identifier)) ;) })) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,0);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,0)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,0)" identifier (argument_list "(pbVar6,param_2,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) }) (else_clause "else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" else (compound_statement "{\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pbVar6 = param_1 + 4;" (assignment_expression "pbVar6 = param_1 + 4" identifier = (binary_expression "param_1 + 4" identifier + number_literal)) ;) (expression_statement "*param_3 = (uint)bVar1;" (assignment_expression "*param_3 = (uint)bVar1" (pointer_expression "*param_3" * identifier) = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar2 = CONCAT11(bVar1,param_1[1]);" (assignment_expression "uVar2 = CONCAT11(bVar1,param_1[1])" identifier = (call_expression "CONCAT11(bVar1,param_1[1])" identifier (argument_list "(bVar1,param_1[1])" ( identifier , (subscript_expression "param_1[1]" identifier [ number_literal ]) )))) ;) (expression_statement "*param_3 = (uint)uVar2;" (assignment_expression "*param_3 = (uint)uVar2" (pointer_expression "*param_3" * identifier) = (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = CONCAT21(uVar2,param_1[2]);" (assignment_expression "uVar3 = CONCAT21(uVar2,param_1[2])" identifier = (call_expression "CONCAT21(uVar2,param_1[2])" identifier (argument_list "(uVar2,param_1[2])" ( identifier , (subscript_expression "param_1[2]" identifier [ number_literal ]) )))) ;) (expression_statement "*param_3 = (uint)uVar3;" (assignment_expression "*param_3 = (uint)uVar3" (pointer_expression "*param_3" * identifier) = (cast_expression "(uint)uVar3" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "*param_3 = CONCAT31(uVar3,param_1[3]);" (assignment_expression "*param_3 = CONCAT31(uVar3,param_1[3])" (pointer_expression "*param_3" * identifier) = (call_expression "CONCAT31(uVar3,param_1[3])" identifier (argument_list "(uVar3,param_1[3])" ( identifier , (subscript_expression "param_1[3]" identifier [ number_literal ]) )))) ;) (if_statement "if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" { (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,param_3 + 3)" identifier (argument_list "(pbVar6,param_2,param_3 + 3)" ( identifier , identifier , (binary_expression "param_3 + 3" identifier + number_literal) )))) ;) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar4;" (assignment_expression "param_2 = param_2 - iVar4" identifier = (binary_expression "param_2 - iVar4" identifier - identifier)) ;) })) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,param_3 + 2)" identifier (argument_list "(pbVar6,param_2,param_3 + 2)" ( identifier , identifier , (binary_expression "param_3 + 2" identifier + number_literal) )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar5 = FUN_000568f0(param_3[2]);" (assignment_expression "iVar5 = FUN_000568f0(param_3[2])" identifier = (call_expression "FUN_000568f0(param_3[2])" identifier (argument_list "(param_3[2])" ( (subscript_expression "param_3[2]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar5 == 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_3[1] = iVar4 - 2;" (assignment_expression "param_3[1] = iVar4 - 2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = (binary_expression "iVar4 - 2" identifier - number_literal)) ;) }))) (if_statement "if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }" if (parenthesized_expression "(param_4 != (int *)0x0)" ( (binary_expression "param_4 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_4 = (int)(pbVar6 + 2);\n  }" { (expression_statement "*param_4 = (int)(pbVar6 + 2);" (assignment_expression "*param_4 = (int)(pbVar6 + 2)" (pointer_expression "*param_4" * identifier) = (cast_expression "(int)(pbVar6 + 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar6 + 2)" ( (binary_expression "pbVar6 + 2" identifier + number_literal) )))) ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) (if_statement "if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }" { (if_statement "if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }" if (parenthesized_expression "(param_3 != (uint *)0x0)" ( (binary_expression "param_3 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      param_3 = param_3 + 3;\n    }" { (expression_statement "param_3 = param_3 + 3;" (assignment_expression "param_3 = param_3 + 3" identifier = (binary_expression "param_3 + 3" identifier + number_literal)) ;) })) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2 - iVar4,param_3)" identifier (argument_list "(pbVar6,param_2 - iVar4,param_3)" ( identifier , (binary_expression "param_2 - iVar4" identifier - identifier) , identifier )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) })) (return_statement "return (int)pbVar6 - (int)param_1;" return (binary_expression "(int)pbVar6 - (int)param_1" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  uchar *puVar6;\n  int iVar7;\n  \n  if (len < 4) {\n    return -1;\n  }\n  iVar7 = len + -4;\n  if (result == (RSAKey *)0x0) {\n    puVar6 = data + 4;\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    result->bits = 0;\n    bVar1 = *data;\n    puVar6 = data + 4;\n    result->bits = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,data[1]);\n    result->bits = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,data[2]);\n    result->bits = (uint)uVar3;\n    result->bits = CONCAT31(uVar3,data[3]);\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    result->bytes = iVar4 + -2;\n  }\n  if (keystr != (uchar **)0x0) {\n    *keystr = puVar6 + 2;\n  }\n  puVar6 = puVar6 + iVar4;\n  if (order == 1) {\n    if (result != (RSAKey *)0x0) {\n      result = (RSAKey *)&result->exponent;\n    }\n    iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result);\n    if (iVar7 < 0) {\n      return -1;\n    }\n    puVar6 = puVar6 + iVar7;\n  }\n  return (int)puVar6 - (int)data;\n}\n\n" comment (function_definition "int makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  uchar *puVar6;\n  int iVar7;\n  \n  if (len < 4) {\n    return -1;\n  }\n  iVar7 = len + -4;\n  if (result == (RSAKey *)0x0) {\n    puVar6 = data + 4;\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    result->bits = 0;\n    bVar1 = *data;\n    puVar6 = data + 4;\n    result->bits = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,data[1]);\n    result->bits = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,data[2]);\n    result->bits = (uint)uVar3;\n    result->bits = CONCAT31(uVar3,data[3]);\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    result->bytes = iVar4 + -2;\n  }\n  if (keystr != (uchar **)0x0) {\n    *keystr = puVar6 + 2;\n  }\n  puVar6 = puVar6 + iVar4;\n  if (order == 1) {\n    if (result != (RSAKey *)0x0) {\n      result = (RSAKey *)&result->exponent;\n    }\n    iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result);\n    if (iVar7 < 0) {\n      return -1;\n    }\n    puVar6 = puVar6 + iVar7;\n  }\n  return (int)puVar6 - (int)data;\n}" primitive_type (function_declarator "makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)" identifier (parameter_list "(uchar *data,int len,RSAKey *result,uchar **keystr,int order)" ( (parameter_declaration "uchar *data" type_identifier (pointer_declarator "*data" * identifier)) , (parameter_declaration "int len" primitive_type identifier) , (parameter_declaration "RSAKey *result" type_identifier (pointer_declarator "*result" * identifier)) , (parameter_declaration "uchar **keystr" type_identifier (pointer_declarator "**keystr" * (pointer_declarator "*keystr" * identifier))) , (parameter_declaration "int order" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  uchar *puVar6;\n  int iVar7;\n  \n  if (len < 4) {\n    return -1;\n  }\n  iVar7 = len + -4;\n  if (result == (RSAKey *)0x0) {\n    puVar6 = data + 4;\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    result->bits = 0;\n    bVar1 = *data;\n    puVar6 = data + 4;\n    result->bits = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,data[1]);\n    result->bits = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,data[2]);\n    result->bits = (uint)uVar3;\n    result->bits = CONCAT31(uVar3,data[3]);\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    result->bytes = iVar4 + -2;\n  }\n  if (keystr != (uchar **)0x0) {\n    *keystr = puVar6 + 2;\n  }\n  puVar6 = puVar6 + iVar4;\n  if (order == 1) {\n    if (result != (RSAKey *)0x0) {\n      result = (RSAKey *)&result->exponent;\n    }\n    iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result);\n    if (iVar7 < 0) {\n      return -1;\n    }\n    puVar6 = puVar6 + iVar7;\n  }\n  return (int)puVar6 - (int)data;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint3 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uchar *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (if_statement "if (len < 4) {\n    return -1;\n  }" if (parenthesized_expression "(len < 4)" ( (binary_expression "len < 4" identifier < number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar7 = len + -4;" (assignment_expression "iVar7 = len + -4" identifier = (binary_expression "len + -4" identifier + number_literal)) ;) (if_statement "if (result == (RSAKey *)0x0) {\n    puVar6 = data + 4;\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    result->bits = 0;\n    bVar1 = *data;\n    puVar6 = data + 4;\n    result->bits = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,data[1]);\n    result->bits = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,data[2]);\n    result->bits = (uint)uVar3;\n    result->bits = CONCAT31(uVar3,data[3]);\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    result->bytes = iVar4 + -2;\n  }" if (parenthesized_expression "(result == (RSAKey *)0x0)" ( (binary_expression "result == (RSAKey *)0x0" identifier == (cast_expression "(RSAKey *)0x0" ( (type_descriptor "RSAKey *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar6 = data + 4;\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }" { (expression_statement "puVar6 = data + 4;" (assignment_expression "puVar6 = data + 4" identifier = (binary_expression "data + 4" identifier + number_literal)) ;) (if_statement "if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }" if (parenthesized_expression "(order == 0)" ( (binary_expression "order == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }" { (expression_statement "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);" (assignment_expression "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0)" identifier = (call_expression "ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0)" identifier (argument_list "(puVar6,iVar7,(Bignum_conflict *)0x0)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)0x0" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "puVar6 = puVar6 + iVar4;" (assignment_expression "puVar6 = puVar6 + iVar4" identifier = (binary_expression "puVar6 + iVar4" identifier + identifier)) ;) (expression_statement "iVar7 = iVar7 - iVar4;" (assignment_expression "iVar7 = iVar7 - iVar4" identifier = (binary_expression "iVar7 - iVar4" identifier - identifier)) ;) })) (expression_statement "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0);" (assignment_expression "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0)" identifier = (call_expression "ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)0x0)" identifier (argument_list "(puVar6,iVar7,(Bignum_conflict *)0x0)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)0x0" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) }) (else_clause "else {\n    result->bits = 0;\n    bVar1 = *data;\n    puVar6 = data + 4;\n    result->bits = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,data[1]);\n    result->bits = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,data[2]);\n    result->bits = (uint)uVar3;\n    result->bits = CONCAT31(uVar3,data[3]);\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    result->bytes = iVar4 + -2;\n  }" else (compound_statement "{\n    result->bits = 0;\n    bVar1 = *data;\n    puVar6 = data + 4;\n    result->bits = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,data[1]);\n    result->bits = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,data[2]);\n    result->bits = (uint)uVar3;\n    result->bits = CONCAT31(uVar3,data[3]);\n    if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }\n    iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    result->bytes = iVar4 + -2;\n  }" { (expression_statement "result->bits = 0;" (assignment_expression "result->bits = 0" (field_expression "result->bits" identifier -> field_identifier) = number_literal) ;) (expression_statement "bVar1 = *data;" (assignment_expression "bVar1 = *data" identifier = (pointer_expression "*data" * identifier)) ;) (expression_statement "puVar6 = data + 4;" (assignment_expression "puVar6 = data + 4" identifier = (binary_expression "data + 4" identifier + number_literal)) ;) (expression_statement "result->bits = (uint)bVar1;" (assignment_expression "result->bits = (uint)bVar1" (field_expression "result->bits" identifier -> field_identifier) = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar2 = CONCAT11(bVar1,data[1]);" (assignment_expression "uVar2 = CONCAT11(bVar1,data[1])" identifier = (call_expression "CONCAT11(bVar1,data[1])" identifier (argument_list "(bVar1,data[1])" ( identifier , (subscript_expression "data[1]" identifier [ number_literal ]) )))) ;) (expression_statement "result->bits = (uint)uVar2;" (assignment_expression "result->bits = (uint)uVar2" (field_expression "result->bits" identifier -> field_identifier) = (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = CONCAT21(uVar2,data[2]);" (assignment_expression "uVar3 = CONCAT21(uVar2,data[2])" identifier = (call_expression "CONCAT21(uVar2,data[2])" identifier (argument_list "(uVar2,data[2])" ( identifier , (subscript_expression "data[2]" identifier [ number_literal ]) )))) ;) (expression_statement "result->bits = (uint)uVar3;" (assignment_expression "result->bits = (uint)uVar3" (field_expression "result->bits" identifier -> field_identifier) = (cast_expression "(uint)uVar3" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "result->bits = CONCAT31(uVar3,data[3]);" (assignment_expression "result->bits = CONCAT31(uVar3,data[3])" (field_expression "result->bits" identifier -> field_identifier) = (call_expression "CONCAT31(uVar3,data[3])" identifier (argument_list "(uVar3,data[3])" ( identifier , (subscript_expression "data[3]" identifier [ number_literal ]) )))) ;) (if_statement "if (order == 0) {\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }" if (parenthesized_expression "(order == 0)" ( (binary_expression "order == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      puVar6 = puVar6 + iVar4;\n      iVar7 = iVar7 - iVar4;\n    }" { (expression_statement "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent);" (assignment_expression "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent)" identifier = (call_expression "ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->exponent)" identifier (argument_list "(puVar6,iVar7,(Bignum_conflict *)&result->exponent)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)&result->exponent" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&result->exponent" & (field_expression "result->exponent" identifier -> field_identifier))) )))) ;) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "puVar6 = puVar6 + iVar4;" (assignment_expression "puVar6 = puVar6 + iVar4" identifier = (binary_expression "puVar6 + iVar4" identifier + identifier)) ;) (expression_statement "iVar7 = iVar7 - iVar4;" (assignment_expression "iVar7 = iVar7 - iVar4" identifier = (binary_expression "iVar7 - iVar4" identifier - identifier)) ;) })) (expression_statement "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus);" (assignment_expression "iVar4 = ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus)" identifier = (call_expression "ssh1_read_bignum(puVar6,iVar7,(Bignum_conflict *)&result->modulus)" identifier (argument_list "(puVar6,iVar7,(Bignum_conflict *)&result->modulus)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)&result->modulus" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&result->modulus" & (field_expression "result->modulus" identifier -> field_identifier))) )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar5 = bignum_bitcount((Bignum_conflict)result->modulus);" (assignment_expression "iVar5 = bignum_bitcount((Bignum_conflict)result->modulus)" identifier = (call_expression "bignum_bitcount((Bignum_conflict)result->modulus)" identifier (argument_list "((Bignum_conflict)result->modulus)" ( (cast_expression "(Bignum_conflict)result->modulus" ( (type_descriptor "Bignum_conflict" type_identifier) ) (field_expression "result->modulus" identifier -> field_identifier)) )))) ;) (if_statement "if (iVar5 == 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "result->bytes = iVar4 + -2;" (assignment_expression "result->bytes = iVar4 + -2" (field_expression "result->bytes" identifier -> field_identifier) = (binary_expression "iVar4 + -2" identifier + number_literal)) ;) }))) (if_statement "if (keystr != (uchar **)0x0) {\n    *keystr = puVar6 + 2;\n  }" if (parenthesized_expression "(keystr != (uchar **)0x0)" ( (binary_expression "keystr != (uchar **)0x0" identifier != (cast_expression "(uchar **)0x0" ( (type_descriptor "uchar **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    *keystr = puVar6 + 2;\n  }" { (expression_statement "*keystr = puVar6 + 2;" (assignment_expression "*keystr = puVar6 + 2" (pointer_expression "*keystr" * identifier) = (binary_expression "puVar6 + 2" identifier + number_literal)) ;) })) (expression_statement "puVar6 = puVar6 + iVar4;" (assignment_expression "puVar6 = puVar6 + iVar4" identifier = (binary_expression "puVar6 + iVar4" identifier + identifier)) ;) (if_statement "if (order == 1) {\n    if (result != (RSAKey *)0x0) {\n      result = (RSAKey *)&result->exponent;\n    }\n    iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result);\n    if (iVar7 < 0) {\n      return -1;\n    }\n    puVar6 = puVar6 + iVar7;\n  }" if (parenthesized_expression "(order == 1)" ( (binary_expression "order == 1" identifier == number_literal) )) (compound_statement "{\n    if (result != (RSAKey *)0x0) {\n      result = (RSAKey *)&result->exponent;\n    }\n    iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result);\n    if (iVar7 < 0) {\n      return -1;\n    }\n    puVar6 = puVar6 + iVar7;\n  }" { (if_statement "if (result != (RSAKey *)0x0) {\n      result = (RSAKey *)&result->exponent;\n    }" if (parenthesized_expression "(result != (RSAKey *)0x0)" ( (binary_expression "result != (RSAKey *)0x0" identifier != (cast_expression "(RSAKey *)0x0" ( (type_descriptor "RSAKey *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      result = (RSAKey *)&result->exponent;\n    }" { (expression_statement "result = (RSAKey *)&result->exponent;" (assignment_expression "result = (RSAKey *)&result->exponent" identifier = (cast_expression "(RSAKey *)&result->exponent" ( (type_descriptor "RSAKey *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&result->exponent" & (field_expression "result->exponent" identifier -> field_identifier)))) ;) })) (expression_statement "iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result);" (assignment_expression "iVar7 = ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result)" identifier = (call_expression "ssh1_read_bignum(puVar6,iVar7 - iVar4,(Bignum_conflict *)result)" identifier (argument_list "(puVar6,iVar7 - iVar4,(Bignum_conflict *)result)" ( identifier , (binary_expression "iVar7 - iVar4" identifier - identifier) , (cast_expression "(Bignum_conflict *)result" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar7 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "puVar6 = puVar6 + iVar7;" (assignment_expression "puVar6 = puVar6 + iVar7" identifier = (binary_expression "puVar6 + iVar7" identifier + identifier)) ;) })) (return_statement "return (int)puVar6 - (int)data;" return (binary_expression "(int)puVar6 - (int)data" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })))
(translation_unit "int FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}\n\n" (function_definition "int FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}" primitive_type (function_declarator "FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)" identifier (parameter_list "(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint3 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (if_statement "if (param_2 < 4) {\n    return -1;\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_2 = param_2 + -4;" (assignment_expression "param_2 = param_2 + -4" identifier = (binary_expression "param_2 + -4" identifier + number_literal)) ;) (if_statement "if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" if (parenthesized_expression "(param_3 == (uint *)0x0)" ( (binary_expression "param_3 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }" { (expression_statement "pbVar6 = param_1 + 4;" (assignment_expression "pbVar6 = param_1 + 4" identifier = (binary_expression "param_1 + 4" identifier + number_literal)) ;) (if_statement "if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" { (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,0);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,0)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,0)" identifier (argument_list "(pbVar6,param_2,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar4;" (assignment_expression "param_2 = param_2 - iVar4" identifier = (binary_expression "param_2 - iVar4" identifier - identifier)) ;) })) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,0);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,0)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,0)" identifier (argument_list "(pbVar6,param_2,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) }) (else_clause "else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" else (compound_statement "{\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pbVar6 = param_1 + 4;" (assignment_expression "pbVar6 = param_1 + 4" identifier = (binary_expression "param_1 + 4" identifier + number_literal)) ;) (expression_statement "*param_3 = (uint)bVar1;" (assignment_expression "*param_3 = (uint)bVar1" (pointer_expression "*param_3" * identifier) = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar2 = CONCAT11(bVar1,param_1[1]);" (assignment_expression "uVar2 = CONCAT11(bVar1,param_1[1])" identifier = (call_expression "CONCAT11(bVar1,param_1[1])" identifier (argument_list "(bVar1,param_1[1])" ( identifier , (subscript_expression "param_1[1]" identifier [ number_literal ]) )))) ;) (expression_statement "*param_3 = (uint)uVar2;" (assignment_expression "*param_3 = (uint)uVar2" (pointer_expression "*param_3" * identifier) = (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = CONCAT21(uVar2,param_1[2]);" (assignment_expression "uVar3 = CONCAT21(uVar2,param_1[2])" identifier = (call_expression "CONCAT21(uVar2,param_1[2])" identifier (argument_list "(uVar2,param_1[2])" ( identifier , (subscript_expression "param_1[2]" identifier [ number_literal ]) )))) ;) (expression_statement "*param_3 = (uint)uVar3;" (assignment_expression "*param_3 = (uint)uVar3" (pointer_expression "*param_3" * identifier) = (cast_expression "(uint)uVar3" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "*param_3 = CONCAT31(uVar3,param_1[3]);" (assignment_expression "*param_3 = CONCAT31(uVar3,param_1[3])" (pointer_expression "*param_3" * identifier) = (call_expression "CONCAT31(uVar3,param_1[3])" identifier (argument_list "(uVar3,param_1[3])" ( identifier , (subscript_expression "param_1[3]" identifier [ number_literal ]) )))) ;) (if_statement "if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" { (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,param_3 + 3)" identifier (argument_list "(pbVar6,param_2,param_3 + 3)" ( identifier , identifier , (binary_expression "param_3 + 3" identifier + number_literal) )))) ;) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar4;" (assignment_expression "param_2 = param_2 - iVar4" identifier = (binary_expression "param_2 - iVar4" identifier - identifier)) ;) })) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2,param_3 + 2)" identifier (argument_list "(pbVar6,param_2,param_3 + 2)" ( identifier , identifier , (binary_expression "param_3 + 2" identifier + number_literal) )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar5 = FUN_000568f0(param_3[2]);" (assignment_expression "iVar5 = FUN_000568f0(param_3[2])" identifier = (call_expression "FUN_000568f0(param_3[2])" identifier (argument_list "(param_3[2])" ( (subscript_expression "param_3[2]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar5 == 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_3[1] = iVar4 - 2;" (assignment_expression "param_3[1] = iVar4 - 2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = (binary_expression "iVar4 - 2" identifier - number_literal)) ;) }))) (if_statement "if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }" if (parenthesized_expression "(param_4 != (int *)0x0)" ( (binary_expression "param_4 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_4 = (int)(pbVar6 + 2);\n  }" { (expression_statement "*param_4 = (int)(pbVar6 + 2);" (assignment_expression "*param_4 = (int)(pbVar6 + 2)" (pointer_expression "*param_4" * identifier) = (cast_expression "(int)(pbVar6 + 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar6 + 2)" ( (binary_expression "pbVar6 + 2" identifier + number_literal) )))) ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) (if_statement "if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }" { (if_statement "if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }" if (parenthesized_expression "(param_3 != (uint *)0x0)" ( (binary_expression "param_3 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      param_3 = param_3 + 3;\n    }" { (expression_statement "param_3 = param_3 + 3;" (assignment_expression "param_3 = param_3 + 3" identifier = (binary_expression "param_3 + 3" identifier + number_literal)) ;) })) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3)" identifier = (call_expression "FUN_000567c0(pbVar6,param_2 - iVar4,param_3)" identifier (argument_list "(pbVar6,param_2 - iVar4,param_3)" ( identifier , (binary_expression "param_2 - iVar4" identifier - identifier) , identifier )))) ;) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" identifier = (binary_expression "pbVar6 + iVar4" identifier + identifier)) ;) })) (return_statement "return (int)pbVar6 - (int)param_1;" return (binary_expression "(int)pbVar6 - (int)param_1" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT - LIT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT - IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (return_statement return (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })))
(function_definition "int FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}" (primitive_type "int") (function_declarator "FUN_0006ece0(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)" (identifier "FUN_0006ece0") (parameter_list "(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  byte bVar1;\n  ushort uVar2;\n  uint3 uVar3;\n  int iVar4;\n  int iVar5;\n  byte *pbVar6;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }\n  if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }\n  pbVar6 = pbVar6 + iVar4;\n  if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }\n  return (int)pbVar6 - (int)param_1;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "ushort uVar2;" (type_identifier "ushort") (identifier "uVar2") (; ";")) (declaration "uint3 uVar3;" (type_identifier "uint3") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (if_statement "if (param_2 < 4) {\n    return -1;\n  }" (if "if") (parenthesized_expression "(param_2 < 4)" (( "(") (binary_expression "param_2 < 4" (identifier "param_2") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    return -1;\n  }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "param_2 = param_2 + -4;" (assignment_expression "param_2 = param_2 + -4" (identifier "param_2") (= "=") (binary_expression "param_2 + -4" (identifier "param_2") (+ "+") (number_literal "-4"))) (; ";")) (if_statement "if (param_3 == (uint *)0x0) {\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }\n  else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" (if "if") (parenthesized_expression "(param_3 == (uint *)0x0)" (( "(") (binary_expression "param_3 == (uint *)0x0" (identifier "param_3") (== "==") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pbVar6 = param_1 + 4;\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,0);\n    if (iVar4 < 0) {\n      return -1;\n    }\n  }" ({ "{") (expression_statement "pbVar6 = param_1 + 4;" (assignment_expression "pbVar6 = param_1 + 4" (identifier "pbVar6") (= "=") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4"))) (; ";")) (if_statement "if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = FUN_000567c0(pbVar6,param_2,0);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" ({ "{") (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,0);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,0)" (identifier "iVar4") (= "=") (call_expression "FUN_000567c0(pbVar6,param_2,0)" (identifier "FUN_000567c0") (argument_list "(pbVar6,param_2,0)" (( "(") (identifier "pbVar6") (, ",") (identifier "param_2") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        return -1;\n      }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + iVar4" (identifier "pbVar6") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "param_2 = param_2 - iVar4;" (assignment_expression "param_2 = param_2 - iVar4" (identifier "param_2") (= "=") (binary_expression "param_2 - iVar4" (identifier "param_2") (- "-") (identifier "iVar4"))) (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,0);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,0)" (identifier "iVar4") (= "=") (call_expression "FUN_000567c0(pbVar6,param_2,0)" (identifier "FUN_000567c0") (argument_list "(pbVar6,param_2,0)" (( "(") (identifier "pbVar6") (, ",") (identifier "param_2") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" (else "else") (compound_statement "{\n    *param_3 = 0;\n    bVar1 = *param_1;\n    pbVar6 = param_1 + 4;\n    *param_3 = (uint)bVar1;\n    uVar2 = CONCAT11(bVar1,param_1[1]);\n    *param_3 = (uint)uVar2;\n    uVar3 = CONCAT21(uVar2,param_1[2]);\n    *param_3 = (uint)uVar3;\n    *param_3 = CONCAT31(uVar3,param_1[3]);\n    if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    iVar5 = FUN_000568f0(param_3[2]);\n    if (iVar5 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar4 - 2;\n  }" ({ "{") (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "pbVar6 = param_1 + 4;" (assignment_expression "pbVar6 = param_1 + 4" (identifier "pbVar6") (= "=") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "*param_3 = (uint)bVar1;" (assignment_expression "*param_3 = (uint)bVar1" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (cast_expression "(uint)bVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar1"))) (; ";")) (expression_statement "uVar2 = CONCAT11(bVar1,param_1[1]);" (assignment_expression "uVar2 = CONCAT11(bVar1,param_1[1])" (identifier "uVar2") (= "=") (call_expression "CONCAT11(bVar1,param_1[1])" (identifier "CONCAT11") (argument_list "(bVar1,param_1[1])" (( "(") (identifier "bVar1") (, ",") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) () ")")))) (; ";")) (expression_statement "*param_3 = (uint)uVar2;" (assignment_expression "*param_3 = (uint)uVar2" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (cast_expression "(uint)uVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar2"))) (; ";")) (expression_statement "uVar3 = CONCAT21(uVar2,param_1[2]);" (assignment_expression "uVar3 = CONCAT21(uVar2,param_1[2])" (identifier "uVar3") (= "=") (call_expression "CONCAT21(uVar2,param_1[2])" (identifier "CONCAT21") (argument_list "(uVar2,param_1[2])" (( "(") (identifier "uVar2") (, ",") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) () ")")))) (; ";")) (expression_statement "*param_3 = (uint)uVar3;" (assignment_expression "*param_3 = (uint)uVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (cast_expression "(uint)uVar3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar3"))) (; ";")) (expression_statement "*param_3 = CONCAT31(uVar3,param_1[3]);" (assignment_expression "*param_3 = CONCAT31(uVar3,param_1[3])" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (call_expression "CONCAT31(uVar3,param_1[3])" (identifier "CONCAT31") (argument_list "(uVar3,param_1[3])" (( "(") (identifier "uVar3") (, ",") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) () ")")))) (; ";")) (if_statement "if (param_5 == 0) {\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);\n      if (iVar4 < 0) {\n        return -1;\n      }\n      pbVar6 = pbVar6 + iVar4;\n      param_2 = param_2 - iVar4;\n    }" ({ "{") (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3)" (identifier "iVar4") (= "=") (call_expression "FUN_000567c0(pbVar6,param_2,param_3 + 3)" (identifier "FUN_000567c0") (argument_list "(pbVar6,param_2,param_3 + 3)" (( "(") (identifier "pbVar6") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 + 3" (identifier "param_3") (+ "+") (number_literal "3")) () ")")))) (; ";")) (if_statement "if (iVar4 < 0) {\n        return -1;\n      }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        return -1;\n      }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + iVar4" (identifier "pbVar6") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "param_2 = param_2 - iVar4;" (assignment_expression "param_2 = param_2 - iVar4" (identifier "param_2") (= "=") (binary_expression "param_2 - iVar4" (identifier "param_2") (- "-") (identifier "iVar4"))) (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2)" (identifier "iVar4") (= "=") (call_expression "FUN_000567c0(pbVar6,param_2,param_3 + 2)" (identifier "FUN_000567c0") (argument_list "(pbVar6,param_2,param_3 + 2)" (( "(") (identifier "pbVar6") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 + 2" (identifier "param_3") (+ "+") (number_literal "2")) () ")")))) (; ";")) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "iVar5 = FUN_000568f0(param_3[2]);" (assignment_expression "iVar5 = FUN_000568f0(param_3[2])" (identifier "iVar5") (= "=") (call_expression "FUN_000568f0(param_3[2])" (identifier "FUN_000568f0") (argument_list "(param_3[2])" (( "(") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]")) () ")")))) (; ";")) (if_statement "if (iVar5 == 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "param_3[1] = iVar4 - 2;" (assignment_expression "param_3[1] = iVar4 - 2" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar4 - 2" (identifier "iVar4") (- "-") (number_literal "2"))) (; ";")) (} "}")))) (if_statement "if (param_4 != (int *)0x0) {\n    *param_4 = (int)(pbVar6 + 2);\n  }" (if "if") (parenthesized_expression "(param_4 != (int *)0x0)" (( "(") (binary_expression "param_4 != (int *)0x0" (identifier "param_4") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *param_4 = (int)(pbVar6 + 2);\n  }" ({ "{") (expression_statement "*param_4 = (int)(pbVar6 + 2);" (assignment_expression "*param_4 = (int)(pbVar6 + 2)" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (cast_expression "(int)(pbVar6 + 2)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(pbVar6 + 2)" (( "(") (binary_expression "pbVar6 + 2" (identifier "pbVar6") (+ "+") (number_literal "2")) () ")")))) (; ";")) (} "}"))) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + iVar4" (identifier "pbVar6") (+ "+") (identifier "iVar4"))) (; ";")) (if_statement "if (param_5 == 1) {\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }" (if "if") (parenthesized_expression "(param_5 == 1)" (( "(") (binary_expression "param_5 == 1" (identifier "param_5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);\n    if (iVar4 < 0) {\n      return -1;\n    }\n    pbVar6 = pbVar6 + iVar4;\n  }" ({ "{") (if_statement "if (param_3 != (uint *)0x0) {\n      param_3 = param_3 + 3;\n    }" (if "if") (parenthesized_expression "(param_3 != (uint *)0x0)" (( "(") (binary_expression "param_3 != (uint *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      param_3 = param_3 + 3;\n    }" ({ "{") (expression_statement "param_3 = param_3 + 3;" (assignment_expression "param_3 = param_3 + 3" (identifier "param_3") (= "=") (binary_expression "param_3 + 3" (identifier "param_3") (+ "+") (number_literal "3"))) (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);" (assignment_expression "iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3)" (identifier "iVar4") (= "=") (call_expression "FUN_000567c0(pbVar6,param_2 - iVar4,param_3)" (identifier "FUN_000567c0") (argument_list "(pbVar6,param_2 - iVar4,param_3)" (( "(") (identifier "pbVar6") (, ",") (binary_expression "param_2 - iVar4" (identifier "param_2") (- "-") (identifier "iVar4")) (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar4 < 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "pbVar6 = pbVar6 + iVar4;" (assignment_expression "pbVar6 = pbVar6 + iVar4" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + iVar4" (identifier "pbVar6") (+ "+") (identifier "iVar4"))) (; ";")) (} "}"))) (return_statement "return (int)pbVar6 - (int)param_1;" (return "return") (binary_expression "(int)pbVar6 - (int)param_1" (cast_expression "(int)pbVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar6")) (- "-") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) (; ";")) (} "}")))

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

int function_1(type_1 *var_3,int var_1,type_2 *var_2,type_1 **var_14,int var_4)

{
  type_3 bVar1;
  type_4 uVar2;
  type_5 uVar3;
  int var_6;
  int var_13;
  type_1 *var_7;
  int var_8;
  
  if (var_1 < 4) {
    return -1;
  }
  var_8 = var_1 + -4;
  if (var_2 == (type_2 *)0x0) {
    var_7 = var_3 + 4;
    if (var_4 == 0) {
      var_6 = var_5(var_7,var_8,(type_6 *)0x0);
      if (var_6 < 0) {
        return -1;
      }
      var_7 = var_7 + var_6;
      var_8 = var_8 - var_6;
    }
    var_6 = var_5(var_7,var_8,(type_6 *)0x0);
    if (var_6 < 0) {
      return -1;
    }
  }
  else {
    var_2->bits = 0;
    bVar1 = *var_3;
    var_7 = var_3 + 4;
    var_2->bits = (type_7)bVar1;
    uVar2 = var_9(bVar1,var_3[1]);
    var_2->bits = (type_7)uVar2;
    uVar3 = var_10(uVar2,var_3[2]);
    var_2->bits = (type_7)uVar3;
    var_2->bits = var_11(uVar3,var_3[3]);
    if (var_4 == 0) {
      var_6 = var_5(var_7,var_8,(type_6 *)&var_2->exponent);
      if (var_6 < 0) {
        return -1;
      }
      var_7 = var_7 + var_6;
      var_8 = var_8 - var_6;
    }
    var_6 = var_5(var_7,var_8,(type_6 *)&var_2->modulus);
    if (var_6 < 0) {
      return -1;
    }
    var_13 = var_12((type_6)var_2->modulus);
    if (var_13 == 0) {
      return -1;
    }
    var_2->bytes = var_6 + -2;
  }
  if (var_14 != (type_1 **)0x0) {
    *var_14 = var_7 + 2;
  }
  var_7 = var_7 + var_6;
  if (var_4 == 1) {
    if (var_2 != (type_2 *)0x0) {
      var_2 = (type_2 *)&var_2->exponent;
    }
    var_8 = var_5(var_7,var_8 - var_6,(type_6 *)var_2);
    if (var_8 < 0) {
      return -1;
    }
    var_7 = var_7 + var_8;
  }
  return (int)var_7 - (int)var_3;
}


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

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

int MASKED(byte *param_1,int param_2,uint *param_3,int *param_4,int param_5)

{
  byte bVar1;
  ushort uVar2;
  uint3 uVar3;
  int iVar4;
  int iVar5;
  byte *pbVar6;
  
  if (param_2 < 4) {
    return -1;
  }
  param_2 = param_2 + -4;
  if (param_3 == (uint *)0x0) {
    pbVar6 = param_1 + 4;
    if (param_5 == 0) {
      iVar4 = FUN_000567c0(pbVar6,param_2,0);
      if (iVar4 < 0) {
        return -1;
      }
      pbVar6 = pbVar6 + iVar4;
      param_2 = param_2 - iVar4;
    }
    iVar4 = FUN_000567c0(pbVar6,param_2,0);
    if (iVar4 < 0) {
      return -1;
    }
  }
  else {
    *param_3 = 0;
    bVar1 = *param_1;
    pbVar6 = param_1 + 4;
    *param_3 = (uint)bVar1;
    uVar2 = CONCAT11(bVar1,param_1[1]);
    *param_3 = (uint)uVar2;
    uVar3 = CONCAT21(uVar2,param_1[2]);
    *param_3 = (uint)uVar3;
    *param_3 = CONCAT31(uVar3,param_1[3]);
    if (param_5 == 0) {
      iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 3);
      if (iVar4 < 0) {
        return -1;
      }
      pbVar6 = pbVar6 + iVar4;
      param_2 = param_2 - iVar4;
    }
    iVar4 = FUN_000567c0(pbVar6,param_2,param_3 + 2);
    if (iVar4 < 0) {
      return -1;
    }
    iVar5 = FUN_000568f0(param_3[2]);
    if (iVar5 == 0) {
      return -1;
    }
    param_3[1] = iVar4 - 2;
  }
  if (param_4 != (int *)0x0) {
    *param_4 = (int)(pbVar6 + 2);
  }
  pbVar6 = pbVar6 + iVar4;
  if (param_5 == 1) {
    if (param_3 != (uint *)0x0) {
      param_3 = param_3 + 3;
    }
    iVar4 = FUN_000567c0(pbVar6,param_2 - iVar4,param_3);
    if (iVar4 < 0) {
      return -1;
    }
    pbVar6 = pbVar6 + iVar4;
  }
  return (int)pbVar6 - (int)param_1;
}

