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

Bignum ssh_ecdhkex_getkey(void *key,char *remoteKey,int remoteKeyLen)

{
  int iVar1;
  ec_curve *peVar2;
  int iVar3;
  ec_point *point;
  int iVar4;
  uchar *data;
  Bignum_conflict bn;
  uint n;
  uint i;
  int in_GS_OFFSET;
  ec_point remote;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  peVar2 = *(ec_curve **)((int)key + 4);
  if (peVar2->type == EC_WEIERSTRASS) {
    remote.infinity = '\0';
    remote.curve = peVar2;
    iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote);
    if (iVar3 == 0) {
LAB_0002ca20:
      bn = (Bignum_conflict)0x0;
      goto LAB_0002ca03;
    }
  }
  else {
    iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);
    iVar3 = iVar4 + 7;
    if (iVar4 + 7 < 0) {
      iVar3 = iVar4 + 0xe;
    }
    if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;
    remote.curve = *(ec_curve **)((int)key + 4);
    remote.infinity = '\0';
    remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);
    remote.y = (Bignum)0x0;
    remote.z = (Bignum)0x0;
  }
  point = ecp_mul(&remote,*(Bignum *)((int)key + 0x18));
  if (point == (ec_point *)0x0) {
    bn = (Bignum_conflict)0x0;
  }
  else {
    bn = (Bignum_conflict)point->x;
    point->x = (Bignum)0x0;
    if (point->curve->type == EC_MONTGOMERY) {
      n = point->curve->fieldBits + 7 >> 3;
      data = (uchar *)safemalloc(n,1);
      if (n != 0) {
        i = 0;
        do {
          iVar3 = bignum_byte(bn,i);
          data[i] = (uchar)iVar3;
          i = i + 1;
        } while (n != i);
      }
      freebn(bn);
      bn = bignum_from_bytes(data,n);
      smemclr(data,n);
      safefree(data);
    }
    ec_point_free(point);
  }
  if (remote.x != (Bignum)0x0) {
    freebn((Bignum_conflict)remote.x);
  }
  if (remote.y != (Bignum)0x0) {
    freebn((Bignum_conflict)remote.y);
  }
LAB_0002ca03:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return bn;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_0002c950(int param_1,undefined4 param_2,int param_3)

{
  undefined1 uVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  int in_GS_OFFSET;
  int *local_34;
  int local_30;
  int local_2c;
  undefined4 local_28;
  undefined1 local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2c959;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar3 = *(int **)(param_1 + 4);
  if (*piVar3 == 0) {
    local_24 = 0;
    local_34 = piVar3;
    iVar2 = FUN_0002a740();
    if (iVar2 == 0) {
LAB_0002ca20:
      iVar2 = 0;
      goto LAB_0002ca03;
    }
  }
  else {
    iVar4 = FUN_000221a0(piVar3[4]);
    iVar2 = iVar4 + 7;
    if (iVar4 + 7 < 0) {
      iVar2 = iVar4 + 0xe;
    }
    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;
    local_34 = *(int **)(param_1 + 4);
    local_24 = 0;
    local_30 = FUN_00022070(param_2,iVar2 >> 3);
    local_2c = 0;
    local_28 = 0;
  }
  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));
  if (piVar3 == (int *)0x0) {
    iVar2 = 0;
  }
  else {
    iVar2 = piVar3[1];
    piVar3[1] = 0;
    if (*(int *)*piVar3 == 1) {
      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;
      iVar4 = FUN_0001bd60(uVar5,1);
      if (uVar5 != 0) {
        uVar6 = 0;
        do {
          uVar1 = FUN_00022290(iVar2,uVar6);
          *(undefined1 *)(iVar4 + uVar6) = uVar1;
          uVar6 = uVar6 + 1;
        } while (uVar5 != uVar6);
      }
      FUN_00021b10(iVar2);
      iVar2 = FUN_00021fa0(iVar4,uVar5);
      FUN_0001c6d0(iVar4,uVar5);
      FUN_0001c5f0(iVar4);
    }
    FUN_0002ac70(piVar3);
  }
  if (local_30 != 0) {
    FUN_00021b10(local_30);
  }
  if (local_2c != 0) {
    FUN_00021b10(local_2c);
  }
LAB_0002ca03:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003dc30();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014540
ADD EBX,0x3050b
SUB ESP,0x3c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x50]
MOV EDI,dword ptr [ESP + 0x54]
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [EAX]
TEST EDX,EDX
JNZ 0x0002ca28
LEA EBP,[ESP + 0x18]
MOV EDX,dword ptr [ESP + 0x58]
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,EDI
MOV ECX,EBP
MOV byte ptr [ESP + 0x28],0x0
CALL 0x0002a740
TEST EAX,EAX
JZ 0x0002ca20
SUB ESP,0x8
PUSH dword ptr [ESI + 0x18]
PUSH EBP
CALL 0x0002add0
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0002cb00
MOV ESI,dword ptr [EAX + 0x4]
MOV dword ptr [EAX + 0x4],0x0
MOV EAX,dword ptr [EAX]
CMP dword ptr [EAX],0x1
JZ 0x0002ca80
SUB ESP,0xc
PUSH EBP
CALL 0x0002ac70
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x1c]
TEST EAX,EAX
JZ 0x0002c9ef
SUB ESP,0xc
PUSH EAX
CALL 0x00021b10
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x20]
TEST EAX,EAX
JZ 0x0002ca03
SUB ESP,0xc
PUSH EAX
CALL 0x00021b10
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x2c]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x0002cb07
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR ESI,ESI
JMP 0x0002ca03
SUB ESP,0xc
PUSH dword ptr [EAX + 0x10]
CALL 0x000221a0
ADD ESP,0x10
LEA EDX,[EAX + 0xe]
ADD EAX,0x7
CMOVS EAX,EDX
SAR EAX,0x3
CMP EAX,dword ptr [ESP + 0x58]
JNZ 0x0002ca20
MOV EDX,dword ptr [ESI + 0x4]
MOV byte ptr [ESP + 0x28],0x0
SUB ESP,0x8
MOV dword ptr [ESP + 0x20],EDX
PUSH EAX
PUSH EDI
CALL 0x00022070
MOV dword ptr [ESP + 0x30],0x0
MOV dword ptr [ESP + 0x2c],EAX
MOV dword ptr [ESP + 0x34],0x0
ADD ESP,0x10
LEA EBP,[ESP + 0x18]
JMP 0x0002c9a1
MOV EDI,dword ptr [EAX + 0xc]
SUB ESP,0x8
ADD EDI,0x7
SHR EDI,0x3
MOV dword ptr [ESP + 0x10],EDI
PUSH 0x1
PUSH EDI
CALL 0x0001bd60
MOV dword ptr [ESP + 0x1c],EAX
ADD ESP,0x10
TEST EDI,EDI
JZ 0x0002cac5
XOR EDI,EDI
LEA ESI,[ESI]
SUB ESP,0x8
PUSH EDI
PUSH ESI
CALL 0x00022290
MOV ECX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV byte ptr [ECX + EDI*0x1],AL
ADD EDI,0x1
CMP dword ptr [ESP + 0x8],EDI
JNZ 0x0002caa8
SUB ESP,0xc
PUSH ESI
CALL 0x00021b10
POP EAX
POP EDX
PUSH dword ptr [ESP + 0x10]
MOV EDI,dword ptr [ESP + 0x18]
PUSH EDI
CALL 0x00021fa0
POP ECX
MOV ESI,EAX
POP EAX
PUSH dword ptr [ESP + 0x10]
PUSH EDI
CALL 0x0001c6d0
MOV dword ptr [ESP],EDI
CALL 0x0001c5f0
ADD ESP,0x10
JMP 0x0002c9cf
XOR ESI,ESI
JMP 0x0002c9db
CALL 0x0003dc30
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0002c950(int param_1,undefined4 param_2,int param_3)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003dc30();\n}\n\n" comment (function_definition "int FUN_0002c950(int param_1,undefined4 param_2,int param_3)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003dc30();\n}" primitive_type (function_declarator "FUN_0002c950(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003dc30();\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_34;" primitive_type (pointer_declarator "*local_34" * identifier) ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined1 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2c959;" (assignment_expression "uStack_14 = 0x2c959" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" if (parenthesized_expression "(*piVar3 == 0)" ( (binary_expression "*piVar3 == 0" (pointer_expression "*piVar3" * identifier) == number_literal) )) (compound_statement "{\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }" { (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "local_34 = piVar3;" (assignment_expression "local_34 = piVar3" identifier = identifier) ;) (expression_statement "iVar2 = FUN_0002a740();" (assignment_expression "iVar2 = FUN_0002a740()" identifier = (call_expression "FUN_0002a740()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }" { (labeled_statement "LAB_0002ca20:\n      iVar2 = 0;" statement_identifier : (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;)) (goto_statement "goto LAB_0002ca03;" goto statement_identifier ;) })) }) (else_clause "else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" else (compound_statement "{\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" { (expression_statement "iVar4 = FUN_000221a0(piVar3[4]);" (assignment_expression "iVar4 = FUN_000221a0(piVar3[4])" identifier = (call_expression "FUN_000221a0(piVar3[4])" identifier (argument_list "(piVar3[4])" ( (subscript_expression "piVar3[4]" identifier [ number_literal ]) )))) ;) (expression_statement "iVar2 = iVar4 + 7;" (assignment_expression "iVar2 = iVar4 + 7" identifier = (binary_expression "iVar4 + 7" identifier + number_literal)) ;) (if_statement "if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }" if (parenthesized_expression "(iVar4 + 7 < 0)" ( (binary_expression "iVar4 + 7 < 0" (binary_expression "iVar4 + 7" identifier + number_literal) < number_literal) )) (compound_statement "{\n      iVar2 = iVar4 + 0xe;\n    }" { (expression_statement "iVar2 = iVar4 + 0xe;" (assignment_expression "iVar2 = iVar4 + 0xe" identifier = (binary_expression "iVar4 + 0xe" identifier + number_literal)) ;) })) (if_statement "if (iVar2 >> 3 != param_3) goto LAB_0002ca20;" if (parenthesized_expression "(iVar2 >> 3 != param_3)" ( (binary_expression "iVar2 >> 3 != param_3" (binary_expression "iVar2 >> 3" identifier >> number_literal) != identifier) )) (goto_statement "goto LAB_0002ca20;" goto statement_identifier ;)) (expression_statement "local_34 = *(int **)(param_1 + 4);" (assignment_expression "local_34 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "local_30 = FUN_00022070(param_2,iVar2 >> 3);" (assignment_expression "local_30 = FUN_00022070(param_2,iVar2 >> 3)" identifier = (call_expression "FUN_00022070(param_2,iVar2 >> 3)" identifier (argument_list "(param_2,iVar2 >> 3)" ( identifier , (binary_expression "iVar2 >> 3" identifier >> number_literal) )))) ;) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) }))) (expression_statement "piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));" (assignment_expression "piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" identifier = (cast_expression "(int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" identifier (argument_list "(&local_34,*(undefined4 *)(param_1 + 0x18))" ( (pointer_expression "&local_34" & identifier) , (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = 0;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" else (compound_statement "{\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" { (expression_statement "iVar2 = piVar3[1];" (assignment_expression "iVar2 = piVar3[1]" identifier = (subscript_expression "piVar3[1]" identifier [ number_literal ])) ;) (expression_statement "piVar3[1] = 0;" (assignment_expression "piVar3[1] = 0" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }" if (parenthesized_expression "(*(int *)*piVar3 == 1)" ( (binary_expression "*(int *)*piVar3 == 1" (pointer_expression "*(int *)*piVar3" * (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) == number_literal) )) (compound_statement "{\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }" { (expression_statement "uVar5 = ((int *)*piVar3)[3] + 7U >> 3;" (assignment_expression "uVar5 = ((int *)*piVar3)[3] + 7U >> 3" identifier = (binary_expression "((int *)*piVar3)[3] + 7U >> 3" (binary_expression "((int *)*piVar3)[3] + 7U" (subscript_expression "((int *)*piVar3)[3]" (parenthesized_expression "((int *)*piVar3)" ( (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier)) )) [ number_literal ]) + number_literal) >> number_literal)) ;) (expression_statement "iVar4 = FUN_0001bd60(uVar5,1);" (assignment_expression "iVar4 = FUN_0001bd60(uVar5,1)" identifier = (call_expression "FUN_0001bd60(uVar5,1)" identifier (argument_list "(uVar5,1)" ( identifier , number_literal )))) ;) (if_statement "if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }" if (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);" do (compound_statement "{\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        }" { (expression_statement "uVar1 = FUN_00022290(iVar2,uVar6);" (assignment_expression "uVar1 = FUN_00022290(iVar2,uVar6)" identifier = (call_expression "FUN_00022290(iVar2,uVar6)" identifier (argument_list "(iVar2,uVar6)" ( identifier , identifier )))) ;) (expression_statement "*(undefined1 *)(iVar4 + uVar6) = uVar1;" (assignment_expression "*(undefined1 *)(iVar4 + uVar6) = uVar1" (pointer_expression "*(undefined1 *)(iVar4 + uVar6)" * (cast_expression "(undefined1 *)(iVar4 + uVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + uVar6)" ( (binary_expression "iVar4 + uVar6" identifier + identifier) )))) = identifier) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != uVar6)" ( (binary_expression "uVar5 != uVar6" identifier != identifier) )) ;) })) (expression_statement "FUN_00021b10(iVar2);" (call_expression "FUN_00021b10(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar2 = FUN_00021fa0(iVar4,uVar5);" (assignment_expression "iVar2 = FUN_00021fa0(iVar4,uVar5)" identifier = (call_expression "FUN_00021fa0(iVar4,uVar5)" identifier (argument_list "(iVar4,uVar5)" ( identifier , identifier )))) ;) (expression_statement "FUN_0001c6d0(iVar4,uVar5);" (call_expression "FUN_0001c6d0(iVar4,uVar5)" identifier (argument_list "(iVar4,uVar5)" ( identifier , identifier ))) ;) (expression_statement "FUN_0001c5f0(iVar4);" (call_expression "FUN_0001c5f0(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })) (expression_statement "FUN_0002ac70(piVar3);" (call_expression "FUN_0002ac70(piVar3)" identifier (argument_list "(piVar3)" ( identifier ))) ;) }))) (if_statement "if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }" if (parenthesized_expression "(local_30 != 0)" ( (binary_expression "local_30 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_00021b10(local_30);\n  }" { (expression_statement "FUN_00021b10(local_30);" (call_expression "FUN_00021b10(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) })) (if_statement "if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }" if (parenthesized_expression "(local_2c != 0)" ( (binary_expression "local_2c != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_00021b10(local_2c);\n  }" { (expression_statement "FUN_00021b10(local_2c);" (call_expression "FUN_00021b10(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;) })) (labeled_statement "LAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) }))) comment (expression_statement "FUN_0003dc30();" (call_expression "FUN_0003dc30()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nBignum ssh_ecdhkex_getkey(void *key,char *remoteKey,int remoteKeyLen)\n\n{\n  int iVar1;\n  ec_curve *peVar2;\n  int iVar3;\n  ec_point *point;\n  int iVar4;\n  uchar *data;\n  Bignum_conflict bn;\n  uint n;\n  uint i;\n  int in_GS_OFFSET;\n  ec_point remote;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  peVar2 = *(ec_curve **)((int)key + 4);\n  if (peVar2->type == EC_WEIERSTRASS) {\n    remote.infinity = '\0';\n    remote.curve = peVar2;\n    iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote);\n    if (iVar3 == 0) {\nLAB_0002ca20:\n      bn = (Bignum_conflict)0x0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);\n    iVar3 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar3 = iVar4 + 0xe;\n    }\n    if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;\n    remote.curve = *(ec_curve **)((int)key + 4);\n    remote.infinity = '\0';\n    remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);\n    remote.y = (Bignum)0x0;\n    remote.z = (Bignum)0x0;\n  }\n  point = ecp_mul(&remote,*(Bignum *)((int)key + 0x18));\n  if (point == (ec_point *)0x0) {\n    bn = (Bignum_conflict)0x0;\n  }\n  else {\n    bn = (Bignum_conflict)point->x;\n    point->x = (Bignum)0x0;\n    if (point->curve->type == EC_MONTGOMERY) {\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }\n    ec_point_free(point);\n  }\n  if (remote.x != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.x);\n  }\n  if (remote.y != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.y);\n  }\nLAB_0002ca03:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return bn;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "Bignum ssh_ecdhkex_getkey(void *key,char *remoteKey,int remoteKeyLen)\n\n{\n  int iVar1;\n  ec_curve *peVar2;\n  int iVar3;\n  ec_point *point;\n  int iVar4;\n  uchar *data;\n  Bignum_conflict bn;\n  uint n;\n  uint i;\n  int in_GS_OFFSET;\n  ec_point remote;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  peVar2 = *(ec_curve **)((int)key + 4);\n  if (peVar2->type == EC_WEIERSTRASS) {\n    remote.infinity = '\0';\n    remote.curve = peVar2;\n    iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote);\n    if (iVar3 == 0) {\nLAB_0002ca20:\n      bn = (Bignum_conflict)0x0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);\n    iVar3 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar3 = iVar4 + 0xe;\n    }\n    if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;\n    remote.curve = *(ec_curve **)((int)key + 4);\n    remote.infinity = '\0';\n    remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);\n    remote.y = (Bignum)0x0;\n    remote.z = (Bignum)0x0;\n  }\n  point = ecp_mul(&remote,*(Bignum *)((int)key + 0x18));\n  if (point == (ec_point *)0x0) {\n    bn = (Bignum_conflict)0x0;\n  }\n  else {\n    bn = (Bignum_conflict)point->x;\n    point->x = (Bignum)0x0;\n    if (point->curve->type == EC_MONTGOMERY) {\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }\n    ec_point_free(point);\n  }\n  if (remote.x != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.x);\n  }\n  if (remote.y != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.y);\n  }\nLAB_0002ca03:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return bn;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "ssh_ecdhkex_getkey(void *key,char *remoteKey,int remoteKeyLen)" identifier (parameter_list "(void *key,char *remoteKey,int remoteKeyLen)" ( (parameter_declaration "void *key" primitive_type (pointer_declarator "*key" * identifier)) , (parameter_declaration "char *remoteKey" primitive_type (pointer_declarator "*remoteKey" * identifier)) , (parameter_declaration "int remoteKeyLen" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ec_curve *peVar2;\n  int iVar3;\n  ec_point *point;\n  int iVar4;\n  uchar *data;\n  Bignum_conflict bn;\n  uint n;\n  uint i;\n  int in_GS_OFFSET;\n  ec_point remote;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  peVar2 = *(ec_curve **)((int)key + 4);\n  if (peVar2->type == EC_WEIERSTRASS) {\n    remote.infinity = '\0';\n    remote.curve = peVar2;\n    iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote);\n    if (iVar3 == 0) {\nLAB_0002ca20:\n      bn = (Bignum_conflict)0x0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);\n    iVar3 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar3 = iVar4 + 0xe;\n    }\n    if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;\n    remote.curve = *(ec_curve **)((int)key + 4);\n    remote.infinity = '\0';\n    remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);\n    remote.y = (Bignum)0x0;\n    remote.z = (Bignum)0x0;\n  }\n  point = ecp_mul(&remote,*(Bignum *)((int)key + 0x18));\n  if (point == (ec_point *)0x0) {\n    bn = (Bignum_conflict)0x0;\n  }\n  else {\n    bn = (Bignum_conflict)point->x;\n    point->x = (Bignum)0x0;\n    if (point->curve->type == EC_MONTGOMERY) {\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }\n    ec_point_free(point);\n  }\n  if (remote.x != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.x);\n  }\n  if (remote.y != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.y);\n  }\nLAB_0002ca03:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return bn;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ec_curve *peVar2;" type_identifier (pointer_declarator "*peVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ec_point *point;" type_identifier (pointer_declarator "*point" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uchar *data;" type_identifier (pointer_declarator "*data" * identifier) ;) (declaration "Bignum_conflict bn;" type_identifier identifier ;) (declaration "uint n;" type_identifier identifier ;) (declaration "uint i;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "ec_point remote;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "peVar2 = *(ec_curve **)((int)key + 4);" (assignment_expression "peVar2 = *(ec_curve **)((int)key + 4)" identifier = (pointer_expression "*(ec_curve **)((int)key + 4)" * (cast_expression "(ec_curve **)((int)key + 4)" ( (type_descriptor "ec_curve **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)key + 4)" ( (binary_expression "(int)key + 4" (cast_expression "(int)key" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (if_statement "if (peVar2->type == EC_WEIERSTRASS) {\n    remote.infinity = '\0';\n    remote.curve = peVar2;\n    iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote);\n    if (iVar3 == 0) {\nLAB_0002ca20:\n      bn = (Bignum_conflict)0x0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);\n    iVar3 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar3 = iVar4 + 0xe;\n    }\n    if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;\n    remote.curve = *(ec_curve **)((int)key + 4);\n    remote.infinity = '\0';\n    remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);\n    remote.y = (Bignum)0x0;\n    remote.z = (Bignum)0x0;\n  }" if (parenthesized_expression "(peVar2->type == EC_WEIERSTRASS)" ( (binary_expression "peVar2->type == EC_WEIERSTRASS" (field_expression "peVar2->type" identifier -> field_identifier) == identifier) )) (compound_statement "{\n    remote.infinity = '\0';\n    remote.curve = peVar2;\n    iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote);\n    if (iVar3 == 0) {\nLAB_0002ca20:\n      bn = (Bignum_conflict)0x0;\n      goto LAB_0002ca03;\n    }\n  }" { (expression_statement "remote.infinity = '\0';" (assignment_expression "remote.infinity = '\0'" (field_expression "remote.infinity" identifier . field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "remote.curve = peVar2;" (assignment_expression "remote.curve = peVar2" (field_expression "remote.curve" identifier . field_identifier) = identifier) ;) (expression_statement "iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote);" (assignment_expression "iVar3 = decodepoint(remoteKey,remoteKeyLen,&remote)" identifier = (call_expression "decodepoint(remoteKey,remoteKeyLen,&remote)" identifier (argument_list "(remoteKey,remoteKeyLen,&remote)" ( identifier , identifier , (pointer_expression "&remote" & identifier) )))) ;) (if_statement "if (iVar3 == 0) {\nLAB_0002ca20:\n      bn = (Bignum_conflict)0x0;\n      goto LAB_0002ca03;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0002ca20:\n      bn = (Bignum_conflict)0x0;\n      goto LAB_0002ca03;\n    }" { (labeled_statement "LAB_0002ca20:\n      bn = (Bignum_conflict)0x0;" statement_identifier : (expression_statement "bn = (Bignum_conflict)0x0;" (assignment_expression "bn = (Bignum_conflict)0x0" identifier = (cast_expression "(Bignum_conflict)0x0" ( (type_descriptor "Bignum_conflict" type_identifier) ) number_literal)) ;)) (goto_statement "goto LAB_0002ca03;" goto statement_identifier ;) })) }) (else_clause "else {\n    iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);\n    iVar3 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar3 = iVar4 + 0xe;\n    }\n    if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;\n    remote.curve = *(ec_curve **)((int)key + 4);\n    remote.infinity = '\0';\n    remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);\n    remote.y = (Bignum)0x0;\n    remote.z = (Bignum)0x0;\n  }" else (compound_statement "{\n    iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);\n    iVar3 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar3 = iVar4 + 0xe;\n    }\n    if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;\n    remote.curve = *(ec_curve **)((int)key + 4);\n    remote.infinity = '\0';\n    remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);\n    remote.y = (Bignum)0x0;\n    remote.z = (Bignum)0x0;\n  }" { (expression_statement "iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p);" (assignment_expression "iVar4 = bignum_bitcount((Bignum_conflict)peVar2->p)" identifier = (call_expression "bignum_bitcount((Bignum_conflict)peVar2->p)" identifier (argument_list "((Bignum_conflict)peVar2->p)" ( (cast_expression "(Bignum_conflict)peVar2->p" ( (type_descriptor "Bignum_conflict" type_identifier) ) (field_expression "peVar2->p" identifier -> field_identifier)) )))) ;) (expression_statement "iVar3 = iVar4 + 7;" (assignment_expression "iVar3 = iVar4 + 7" identifier = (binary_expression "iVar4 + 7" identifier + number_literal)) ;) (if_statement "if (iVar4 + 7 < 0) {\n      iVar3 = iVar4 + 0xe;\n    }" if (parenthesized_expression "(iVar4 + 7 < 0)" ( (binary_expression "iVar4 + 7 < 0" (binary_expression "iVar4 + 7" identifier + number_literal) < number_literal) )) (compound_statement "{\n      iVar3 = iVar4 + 0xe;\n    }" { (expression_statement "iVar3 = iVar4 + 0xe;" (assignment_expression "iVar3 = iVar4 + 0xe" identifier = (binary_expression "iVar4 + 0xe" identifier + number_literal)) ;) })) (if_statement "if (iVar3 >> 3 != remoteKeyLen) goto LAB_0002ca20;" if (parenthesized_expression "(iVar3 >> 3 != remoteKeyLen)" ( (binary_expression "iVar3 >> 3 != remoteKeyLen" (binary_expression "iVar3 >> 3" identifier >> number_literal) != identifier) )) (goto_statement "goto LAB_0002ca20;" goto statement_identifier ;)) (expression_statement "remote.curve = *(ec_curve **)((int)key + 4);" (assignment_expression "remote.curve = *(ec_curve **)((int)key + 4)" (field_expression "remote.curve" identifier . field_identifier) = (pointer_expression "*(ec_curve **)((int)key + 4)" * (cast_expression "(ec_curve **)((int)key + 4)" ( (type_descriptor "ec_curve **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)key + 4)" ( (binary_expression "(int)key + 4" (cast_expression "(int)key" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "remote.infinity = '\0';" (assignment_expression "remote.infinity = '\0'" (field_expression "remote.infinity" identifier . field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3);" (assignment_expression "remote.x = bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3)" (field_expression "remote.x" identifier . field_identifier) = (call_expression "bignum_from_bytes_le((uchar *)remoteKey,iVar3 >> 3)" identifier (argument_list "((uchar *)remoteKey,iVar3 >> 3)" ( (cast_expression "(uchar *)remoteKey" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "iVar3 >> 3" identifier >> number_literal) )))) ;) (expression_statement "remote.y = (Bignum)0x0;" (assignment_expression "remote.y = (Bignum)0x0" (field_expression "remote.y" identifier . field_identifier) = (cast_expression "(Bignum)0x0" ( (type_descriptor "Bignum" type_identifier) ) number_literal)) ;) (expression_statement "remote.z = (Bignum)0x0;" (assignment_expression "remote.z = (Bignum)0x0" (field_expression "remote.z" identifier . field_identifier) = (cast_expression "(Bignum)0x0" ( (type_descriptor "Bignum" type_identifier) ) number_literal)) ;) }))) (expression_statement "point = ecp_mul(&remote,*(Bignum *)((int)key + 0x18));" (assignment_expression "point = ecp_mul(&remote,*(Bignum *)((int)key + 0x18))" identifier = (call_expression "ecp_mul(&remote,*(Bignum *)((int)key + 0x18))" identifier (argument_list "(&remote,*(Bignum *)((int)key + 0x18))" ( (pointer_expression "&remote" & identifier) , (pointer_expression "*(Bignum *)((int)key + 0x18)" * (cast_expression "(Bignum *)((int)key + 0x18)" ( (type_descriptor "Bignum *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)key + 0x18)" ( (binary_expression "(int)key + 0x18" (cast_expression "(int)key" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) )))) ;) (if_statement "if (point == (ec_point *)0x0) {\n    bn = (Bignum_conflict)0x0;\n  }\n  else {\n    bn = (Bignum_conflict)point->x;\n    point->x = (Bignum)0x0;\n    if (point->curve->type == EC_MONTGOMERY) {\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }\n    ec_point_free(point);\n  }" if (parenthesized_expression "(point == (ec_point *)0x0)" ( (binary_expression "point == (ec_point *)0x0" identifier == (cast_expression "(ec_point *)0x0" ( (type_descriptor "ec_point *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    bn = (Bignum_conflict)0x0;\n  }" { (expression_statement "bn = (Bignum_conflict)0x0;" (assignment_expression "bn = (Bignum_conflict)0x0" identifier = (cast_expression "(Bignum_conflict)0x0" ( (type_descriptor "Bignum_conflict" type_identifier) ) number_literal)) ;) }) (else_clause "else {\n    bn = (Bignum_conflict)point->x;\n    point->x = (Bignum)0x0;\n    if (point->curve->type == EC_MONTGOMERY) {\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }\n    ec_point_free(point);\n  }" else (compound_statement "{\n    bn = (Bignum_conflict)point->x;\n    point->x = (Bignum)0x0;\n    if (point->curve->type == EC_MONTGOMERY) {\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }\n    ec_point_free(point);\n  }" { (expression_statement "bn = (Bignum_conflict)point->x;" (assignment_expression "bn = (Bignum_conflict)point->x" identifier = (cast_expression "(Bignum_conflict)point->x" ( (type_descriptor "Bignum_conflict" type_identifier) ) (field_expression "point->x" identifier -> field_identifier))) ;) (expression_statement "point->x = (Bignum)0x0;" (assignment_expression "point->x = (Bignum)0x0" (field_expression "point->x" identifier -> field_identifier) = (cast_expression "(Bignum)0x0" ( (type_descriptor "Bignum" type_identifier) ) number_literal)) ;) (if_statement "if (point->curve->type == EC_MONTGOMERY) {\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }" if (parenthesized_expression "(point->curve->type == EC_MONTGOMERY)" ( (binary_expression "point->curve->type == EC_MONTGOMERY" (field_expression "point->curve->type" (field_expression "point->curve" identifier -> field_identifier) -> field_identifier) == identifier) )) (compound_statement "{\n      n = point->curve->fieldBits + 7 >> 3;\n      data = (uchar *)safemalloc(n,1);\n      if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }\n      freebn(bn);\n      bn = bignum_from_bytes(data,n);\n      smemclr(data,n);\n      safefree(data);\n    }" { (expression_statement "n = point->curve->fieldBits + 7 >> 3;" (assignment_expression "n = point->curve->fieldBits + 7 >> 3" identifier = (binary_expression "point->curve->fieldBits + 7 >> 3" (binary_expression "point->curve->fieldBits + 7" (field_expression "point->curve->fieldBits" (field_expression "point->curve" identifier -> field_identifier) -> field_identifier) + number_literal) >> number_literal)) ;) (expression_statement "data = (uchar *)safemalloc(n,1);" (assignment_expression "data = (uchar *)safemalloc(n,1)" identifier = (cast_expression "(uchar *)safemalloc(n,1)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(n,1)" identifier (argument_list "(n,1)" ( identifier , number_literal ))))) ;) (if_statement "if (n != 0) {\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }" if (parenthesized_expression "(n != 0)" ( (binary_expression "n != 0" identifier != number_literal) )) (compound_statement "{\n        i = 0;\n        do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);\n      }" { (expression_statement "i = 0;" (assignment_expression "i = 0" identifier = number_literal) ;) (do_statement "do {\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        } while (n != i);" do (compound_statement "{\n          iVar3 = bignum_byte(bn,i);\n          data[i] = (uchar)iVar3;\n          i = i + 1;\n        }" { (expression_statement "iVar3 = bignum_byte(bn,i);" (assignment_expression "iVar3 = bignum_byte(bn,i)" identifier = (call_expression "bignum_byte(bn,i)" identifier (argument_list "(bn,i)" ( identifier , identifier )))) ;) (expression_statement "data[i] = (uchar)iVar3;" (assignment_expression "data[i] = (uchar)iVar3" (subscript_expression "data[i]" identifier [ identifier ]) = (cast_expression "(uchar)iVar3" ( (type_descriptor "uchar" type_identifier) ) identifier)) ;) (expression_statement "i = i + 1;" (assignment_expression "i = i + 1" identifier = (binary_expression "i + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(n != i)" ( (binary_expression "n != i" identifier != identifier) )) ;) })) (expression_statement "freebn(bn);" (call_expression "freebn(bn)" identifier (argument_list "(bn)" ( identifier ))) ;) (expression_statement "bn = bignum_from_bytes(data,n);" (assignment_expression "bn = bignum_from_bytes(data,n)" identifier = (call_expression "bignum_from_bytes(data,n)" identifier (argument_list "(data,n)" ( identifier , identifier )))) ;) (expression_statement "smemclr(data,n);" (call_expression "smemclr(data,n)" identifier (argument_list "(data,n)" ( identifier , identifier ))) ;) (expression_statement "safefree(data);" (call_expression "safefree(data)" identifier (argument_list "(data)" ( identifier ))) ;) })) (expression_statement "ec_point_free(point);" (call_expression "ec_point_free(point)" identifier (argument_list "(point)" ( identifier ))) ;) }))) (if_statement "if (remote.x != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.x);\n  }" if (parenthesized_expression "(remote.x != (Bignum)0x0)" ( (binary_expression "remote.x != (Bignum)0x0" (field_expression "remote.x" identifier . field_identifier) != (cast_expression "(Bignum)0x0" ( (type_descriptor "Bignum" type_identifier) ) number_literal)) )) (compound_statement "{\n    freebn((Bignum_conflict)remote.x);\n  }" { (expression_statement "freebn((Bignum_conflict)remote.x);" (call_expression "freebn((Bignum_conflict)remote.x)" identifier (argument_list "((Bignum_conflict)remote.x)" ( (cast_expression "(Bignum_conflict)remote.x" ( (type_descriptor "Bignum_conflict" type_identifier) ) (field_expression "remote.x" identifier . field_identifier)) ))) ;) })) (if_statement "if (remote.y != (Bignum)0x0) {\n    freebn((Bignum_conflict)remote.y);\n  }" if (parenthesized_expression "(remote.y != (Bignum)0x0)" ( (binary_expression "remote.y != (Bignum)0x0" (field_expression "remote.y" identifier . field_identifier) != (cast_expression "(Bignum)0x0" ( (type_descriptor "Bignum" type_identifier) ) number_literal)) )) (compound_statement "{\n    freebn((Bignum_conflict)remote.y);\n  }" { (expression_statement "freebn((Bignum_conflict)remote.y);" (call_expression "freebn((Bignum_conflict)remote.y)" identifier (argument_list "((Bignum_conflict)remote.y)" ( (cast_expression "(Bignum_conflict)remote.y" ( (type_descriptor "Bignum_conflict" type_identifier) ) (field_expression "remote.y" identifier . field_identifier)) ))) ;) })) (labeled_statement "LAB_0002ca03:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return bn;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return bn;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return bn;\n  }" { (return_statement "return bn;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_0002c950(int param_1,undefined4 param_2,int param_3)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0003dc30();\n}\n\n" (function_definition "int FUN_0002c950(int param_1,undefined4 param_2,int param_3)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0003dc30();\n}" primitive_type (function_declarator "FUN_0002c950(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0003dc30();\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_34;" primitive_type (pointer_declarator "*local_34" * identifier) ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined1 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2c959;" (assignment_expression "uStack_14 = 0x2c959" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" if (parenthesized_expression "(*piVar3 == 0)" ( (binary_expression "*piVar3 == 0" (pointer_expression "*piVar3" * identifier) == number_literal) )) (compound_statement "{\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }" { (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "local_34 = piVar3;" (assignment_expression "local_34 = piVar3" identifier = identifier) ;) (expression_statement "iVar2 = FUN_0002a740();" (assignment_expression "iVar2 = FUN_0002a740()" identifier = (call_expression "FUN_0002a740()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }" { (labeled_statement "LAB_0002ca20:\n      iVar2 = 0;" statement_identifier : (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;)) (goto_statement "goto LAB_0002ca03;" goto statement_identifier ;) })) }) (else_clause "else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" else (compound_statement "{\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" { (expression_statement "iVar4 = FUN_000221a0(piVar3[4]);" (assignment_expression "iVar4 = FUN_000221a0(piVar3[4])" identifier = (call_expression "FUN_000221a0(piVar3[4])" identifier (argument_list "(piVar3[4])" ( (subscript_expression "piVar3[4]" identifier [ number_literal ]) )))) ;) (expression_statement "iVar2 = iVar4 + 7;" (assignment_expression "iVar2 = iVar4 + 7" identifier = (binary_expression "iVar4 + 7" identifier + number_literal)) ;) (if_statement "if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }" if (parenthesized_expression "(iVar4 + 7 < 0)" ( (binary_expression "iVar4 + 7 < 0" (binary_expression "iVar4 + 7" identifier + number_literal) < number_literal) )) (compound_statement "{\n      iVar2 = iVar4 + 0xe;\n    }" { (expression_statement "iVar2 = iVar4 + 0xe;" (assignment_expression "iVar2 = iVar4 + 0xe" identifier = (binary_expression "iVar4 + 0xe" identifier + number_literal)) ;) })) (if_statement "if (iVar2 >> 3 != param_3) goto LAB_0002ca20;" if (parenthesized_expression "(iVar2 >> 3 != param_3)" ( (binary_expression "iVar2 >> 3 != param_3" (binary_expression "iVar2 >> 3" identifier >> number_literal) != identifier) )) (goto_statement "goto LAB_0002ca20;" goto statement_identifier ;)) (expression_statement "local_34 = *(int **)(param_1 + 4);" (assignment_expression "local_34 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "local_30 = FUN_00022070(param_2,iVar2 >> 3);" (assignment_expression "local_30 = FUN_00022070(param_2,iVar2 >> 3)" identifier = (call_expression "FUN_00022070(param_2,iVar2 >> 3)" identifier (argument_list "(param_2,iVar2 >> 3)" ( identifier , (binary_expression "iVar2 >> 3" identifier >> number_literal) )))) ;) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) }))) (expression_statement "piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));" (assignment_expression "piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" identifier = (cast_expression "(int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" identifier (argument_list "(&local_34,*(undefined4 *)(param_1 + 0x18))" ( (pointer_expression "&local_34" & identifier) , (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = 0;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" else (compound_statement "{\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" { (expression_statement "iVar2 = piVar3[1];" (assignment_expression "iVar2 = piVar3[1]" identifier = (subscript_expression "piVar3[1]" identifier [ number_literal ])) ;) (expression_statement "piVar3[1] = 0;" (assignment_expression "piVar3[1] = 0" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }" if (parenthesized_expression "(*(int *)*piVar3 == 1)" ( (binary_expression "*(int *)*piVar3 == 1" (pointer_expression "*(int *)*piVar3" * (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) == number_literal) )) (compound_statement "{\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }" { (expression_statement "uVar5 = ((int *)*piVar3)[3] + 7U >> 3;" (assignment_expression "uVar5 = ((int *)*piVar3)[3] + 7U >> 3" identifier = (binary_expression "((int *)*piVar3)[3] + 7U >> 3" (binary_expression "((int *)*piVar3)[3] + 7U" (subscript_expression "((int *)*piVar3)[3]" (parenthesized_expression "((int *)*piVar3)" ( (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier)) )) [ number_literal ]) + number_literal) >> number_literal)) ;) (expression_statement "iVar4 = FUN_0001bd60(uVar5,1);" (assignment_expression "iVar4 = FUN_0001bd60(uVar5,1)" identifier = (call_expression "FUN_0001bd60(uVar5,1)" identifier (argument_list "(uVar5,1)" ( identifier , number_literal )))) ;) (if_statement "if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }" if (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);" do (compound_statement "{\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        }" { (expression_statement "uVar1 = FUN_00022290(iVar2,uVar6);" (assignment_expression "uVar1 = FUN_00022290(iVar2,uVar6)" identifier = (call_expression "FUN_00022290(iVar2,uVar6)" identifier (argument_list "(iVar2,uVar6)" ( identifier , identifier )))) ;) (expression_statement "*(undefined1 *)(iVar4 + uVar6) = uVar1;" (assignment_expression "*(undefined1 *)(iVar4 + uVar6) = uVar1" (pointer_expression "*(undefined1 *)(iVar4 + uVar6)" * (cast_expression "(undefined1 *)(iVar4 + uVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + uVar6)" ( (binary_expression "iVar4 + uVar6" identifier + identifier) )))) = identifier) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != uVar6)" ( (binary_expression "uVar5 != uVar6" identifier != identifier) )) ;) })) (expression_statement "FUN_00021b10(iVar2);" (call_expression "FUN_00021b10(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar2 = FUN_00021fa0(iVar4,uVar5);" (assignment_expression "iVar2 = FUN_00021fa0(iVar4,uVar5)" identifier = (call_expression "FUN_00021fa0(iVar4,uVar5)" identifier (argument_list "(iVar4,uVar5)" ( identifier , identifier )))) ;) (expression_statement "FUN_0001c6d0(iVar4,uVar5);" (call_expression "FUN_0001c6d0(iVar4,uVar5)" identifier (argument_list "(iVar4,uVar5)" ( identifier , identifier ))) ;) (expression_statement "FUN_0001c5f0(iVar4);" (call_expression "FUN_0001c5f0(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })) (expression_statement "FUN_0002ac70(piVar3);" (call_expression "FUN_0002ac70(piVar3)" identifier (argument_list "(piVar3)" ( identifier ))) ;) }))) (if_statement "if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }" if (parenthesized_expression "(local_30 != 0)" ( (binary_expression "local_30 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_00021b10(local_30);\n  }" { (expression_statement "FUN_00021b10(local_30);" (call_expression "FUN_00021b10(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) })) (if_statement "if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }" if (parenthesized_expression "(local_2c != 0)" ( (binary_expression "local_2c != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_00021b10(local_2c);\n  }" { (expression_statement "FUN_00021b10(local_2c);" (call_expression "FUN_00021b10(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;) })) (labeled_statement "LAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) }))) (expression_statement "FUN_0003dc30();" (call_expression "FUN_0003dc30()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT >> LIT) != IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (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 = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (subscript_expression (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) )) [ LIT ]) + LIT) >> LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_0002c950(int param_1,undefined4 param_2,int param_3)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0003dc30();\n}" (primitive_type "int") (function_declarator "FUN_0002c950(int param_1,undefined4 param_2,int param_3)" (identifier "FUN_0002c950") (parameter_list "(int param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  int *local_34;\n  int local_30;\n  int local_2c;\n  undefined4 local_28;\n  undefined1 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2c959;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar3 = *(int **)(param_1 + 4);\n  if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }\n  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));\n  if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }\n  if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }\n  if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }\nLAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0003dc30();\n}" ({ "{") (declaration "undefined1 uVar1;" (type_identifier "undefined1") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int *local_34;" (primitive_type "int") (pointer_declarator "*local_34" (* "*") (identifier "local_34")) (; ";")) (declaration "int local_30;" (primitive_type "int") (identifier "local_30") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (declaration "undefined1 local_24;" (type_identifier "undefined1") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x2c959;" (assignment_expression "uStack_14 = 0x2c959" (identifier "uStack_14") (= "=") (number_literal "0x2c959")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if (*piVar3 == 0) {\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }\n  else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" (if "if") (parenthesized_expression "(*piVar3 == 0)" (( "(") (binary_expression "*piVar3 == 0" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_24 = 0;\n    local_34 = piVar3;\n    iVar2 = FUN_0002a740();\n    if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }\n  }" ({ "{") (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_34 = piVar3;" (assignment_expression "local_34 = piVar3" (identifier "local_34") (= "=") (identifier "piVar3")) (; ";")) (expression_statement "iVar2 = FUN_0002a740();" (assignment_expression "iVar2 = FUN_0002a740()" (identifier "iVar2") (= "=") (call_expression "FUN_0002a740()" (identifier "FUN_0002a740") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0002ca20:\n      iVar2 = 0;\n      goto LAB_0002ca03;\n    }" ({ "{") (labeled_statement "LAB_0002ca20:\n      iVar2 = 0;" (statement_identifier "LAB_0002ca20") (: ":") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";"))) (goto_statement "goto LAB_0002ca03;" (goto "goto") (statement_identifier "LAB_0002ca03") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" (else "else") (compound_statement "{\n    iVar4 = FUN_000221a0(piVar3[4]);\n    iVar2 = iVar4 + 7;\n    if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }\n    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;\n    local_34 = *(int **)(param_1 + 4);\n    local_24 = 0;\n    local_30 = FUN_00022070(param_2,iVar2 >> 3);\n    local_2c = 0;\n    local_28 = 0;\n  }" ({ "{") (expression_statement "iVar4 = FUN_000221a0(piVar3[4]);" (assignment_expression "iVar4 = FUN_000221a0(piVar3[4])" (identifier "iVar4") (= "=") (call_expression "FUN_000221a0(piVar3[4])" (identifier "FUN_000221a0") (argument_list "(piVar3[4])" (( "(") (subscript_expression "piVar3[4]" (identifier "piVar3") ([ "[") (number_literal "4") (] "]")) () ")")))) (; ";")) (expression_statement "iVar2 = iVar4 + 7;" (assignment_expression "iVar2 = iVar4 + 7" (identifier "iVar2") (= "=") (binary_expression "iVar4 + 7" (identifier "iVar4") (+ "+") (number_literal "7"))) (; ";")) (if_statement "if (iVar4 + 7 < 0) {\n      iVar2 = iVar4 + 0xe;\n    }" (if "if") (parenthesized_expression "(iVar4 + 7 < 0)" (( "(") (binary_expression "iVar4 + 7 < 0" (binary_expression "iVar4 + 7" (identifier "iVar4") (+ "+") (number_literal "7")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = iVar4 + 0xe;\n    }" ({ "{") (expression_statement "iVar2 = iVar4 + 0xe;" (assignment_expression "iVar2 = iVar4 + 0xe" (identifier "iVar2") (= "=") (binary_expression "iVar4 + 0xe" (identifier "iVar4") (+ "+") (number_literal "0xe"))) (; ";")) (} "}"))) (if_statement "if (iVar2 >> 3 != param_3) goto LAB_0002ca20;" (if "if") (parenthesized_expression "(iVar2 >> 3 != param_3)" (( "(") (binary_expression "iVar2 >> 3 != param_3" (binary_expression "iVar2 >> 3" (identifier "iVar2") (>> ">>") (number_literal "3")) (!= "!=") (identifier "param_3")) () ")")) (goto_statement "goto LAB_0002ca20;" (goto "goto") (statement_identifier "LAB_0002ca20") (; ";"))) (expression_statement "local_34 = *(int **)(param_1 + 4);" (assignment_expression "local_34 = *(int **)(param_1 + 4)" (identifier "local_34") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_30 = FUN_00022070(param_2,iVar2 >> 3);" (assignment_expression "local_30 = FUN_00022070(param_2,iVar2 >> 3)" (identifier "local_30") (= "=") (call_expression "FUN_00022070(param_2,iVar2 >> 3)" (identifier "FUN_00022070") (argument_list "(param_2,iVar2 >> 3)" (( "(") (identifier "param_2") (, ",") (binary_expression "iVar2 >> 3" (identifier "iVar2") (>> ">>") (number_literal "3")) () ")")))) (; ";")) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" (identifier "local_2c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));" (assignment_expression "piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" (identifier "piVar3") (= "=") (cast_expression "(int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18))" (identifier "FUN_0002add0") (argument_list "(&local_34,*(undefined4 *)(param_1 + 0x18))" (( "(") (pointer_expression "&local_34" (& "&") (identifier "local_34")) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) () ")"))))) (; ";")) (if_statement "if (piVar3 == (int *)0x0) {\n    iVar2 = 0;\n  }\n  else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" (if "if") (parenthesized_expression "(piVar3 == (int *)0x0)" (( "(") (binary_expression "piVar3 == (int *)0x0" (identifier "piVar3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar2 = 0;\n  }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" (else "else") (compound_statement "{\n    iVar2 = piVar3[1];\n    piVar3[1] = 0;\n    if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }\n    FUN_0002ac70(piVar3);\n  }" ({ "{") (expression_statement "iVar2 = piVar3[1];" (assignment_expression "iVar2 = piVar3[1]" (identifier "iVar2") (= "=") (subscript_expression "piVar3[1]" (identifier "piVar3") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar3[1] = 0;" (assignment_expression "piVar3[1] = 0" (subscript_expression "piVar3[1]" (identifier "piVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(int *)*piVar3 == 1) {\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }" (if "if") (parenthesized_expression "(*(int *)*piVar3 == 1)" (( "(") (binary_expression "*(int *)*piVar3 == 1" (pointer_expression "*(int *)*piVar3" (* "*") (cast_expression "(int *)*piVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;\n      iVar4 = FUN_0001bd60(uVar5,1);\n      if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }\n      FUN_00021b10(iVar2);\n      iVar2 = FUN_00021fa0(iVar4,uVar5);\n      FUN_0001c6d0(iVar4,uVar5);\n      FUN_0001c5f0(iVar4);\n    }" ({ "{") (expression_statement "uVar5 = ((int *)*piVar3)[3] + 7U >> 3;" (assignment_expression "uVar5 = ((int *)*piVar3)[3] + 7U >> 3" (identifier "uVar5") (= "=") (binary_expression "((int *)*piVar3)[3] + 7U >> 3" (binary_expression "((int *)*piVar3)[3] + 7U" (subscript_expression "((int *)*piVar3)[3]" (parenthesized_expression "((int *)*piVar3)" (( "(") (cast_expression "(int *)*piVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) () ")")) ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "7U")) (>> ">>") (number_literal "3"))) (; ";")) (expression_statement "iVar4 = FUN_0001bd60(uVar5,1);" (assignment_expression "iVar4 = FUN_0001bd60(uVar5,1)" (identifier "iVar4") (= "=") (call_expression "FUN_0001bd60(uVar5,1)" (identifier "FUN_0001bd60") (argument_list "(uVar5,1)" (( "(") (identifier "uVar5") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (uVar5 != 0) {\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }" (if "if") (parenthesized_expression "(uVar5 != 0)" (( "(") (binary_expression "uVar5 != 0" (identifier "uVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar6 = 0;\n        do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);\n      }" ({ "{") (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" (identifier "uVar6") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        } while (uVar5 != uVar6);" (do "do") (compound_statement "{\n          uVar1 = FUN_00022290(iVar2,uVar6);\n          *(undefined1 *)(iVar4 + uVar6) = uVar1;\n          uVar6 = uVar6 + 1;\n        }" ({ "{") (expression_statement "uVar1 = FUN_00022290(iVar2,uVar6);" (assignment_expression "uVar1 = FUN_00022290(iVar2,uVar6)" (identifier "uVar1") (= "=") (call_expression "FUN_00022290(iVar2,uVar6)" (identifier "FUN_00022290") (argument_list "(iVar2,uVar6)" (( "(") (identifier "iVar2") (, ",") (identifier "uVar6") () ")")))) (; ";")) (expression_statement "*(undefined1 *)(iVar4 + uVar6) = uVar1;" (assignment_expression "*(undefined1 *)(iVar4 + uVar6) = uVar1" (pointer_expression "*(undefined1 *)(iVar4 + uVar6)" (* "*") (cast_expression "(undefined1 *)(iVar4 + uVar6)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + uVar6)" (( "(") (binary_expression "iVar4 + uVar6" (identifier "iVar4") (+ "+") (identifier "uVar6")) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" (identifier "uVar6") (= "=") (binary_expression "uVar6 + 1" (identifier "uVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 != uVar6)" (( "(") (binary_expression "uVar5 != uVar6" (identifier "uVar5") (!= "!=") (identifier "uVar6")) () ")")) (; ";")) (} "}"))) (expression_statement "FUN_00021b10(iVar2);" (call_expression "FUN_00021b10(iVar2)" (identifier "FUN_00021b10") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "iVar2 = FUN_00021fa0(iVar4,uVar5);" (assignment_expression "iVar2 = FUN_00021fa0(iVar4,uVar5)" (identifier "iVar2") (= "=") (call_expression "FUN_00021fa0(iVar4,uVar5)" (identifier "FUN_00021fa0") (argument_list "(iVar4,uVar5)" (( "(") (identifier "iVar4") (, ",") (identifier "uVar5") () ")")))) (; ";")) (expression_statement "FUN_0001c6d0(iVar4,uVar5);" (call_expression "FUN_0001c6d0(iVar4,uVar5)" (identifier "FUN_0001c6d0") (argument_list "(iVar4,uVar5)" (( "(") (identifier "iVar4") (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "FUN_0001c5f0(iVar4);" (call_expression "FUN_0001c5f0(iVar4)" (identifier "FUN_0001c5f0") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0002ac70(piVar3);" (call_expression "FUN_0002ac70(piVar3)" (identifier "FUN_0002ac70") (argument_list "(piVar3)" (( "(") (identifier "piVar3") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_30 != 0) {\n    FUN_00021b10(local_30);\n  }" (if "if") (parenthesized_expression "(local_30 != 0)" (( "(") (binary_expression "local_30 != 0" (identifier "local_30") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00021b10(local_30);\n  }" ({ "{") (expression_statement "FUN_00021b10(local_30);" (call_expression "FUN_00021b10(local_30)" (identifier "FUN_00021b10") (argument_list "(local_30)" (( "(") (identifier "local_30") () ")"))) (; ";")) (} "}"))) (if_statement "if (local_2c != 0) {\n    FUN_00021b10(local_2c);\n  }" (if "if") (parenthesized_expression "(local_2c != 0)" (( "(") (binary_expression "local_2c != 0" (identifier "local_2c") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00021b10(local_2c);\n  }" ({ "{") (expression_statement "FUN_00021b10(local_2c);" (call_expression "FUN_00021b10(local_2c)" (identifier "FUN_00021b10") (argument_list "(local_2c)" (( "(") (identifier "local_2c") () ")"))) (; ";")) (} "}"))) (labeled_statement "LAB_0002ca03:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" (statement_identifier "LAB_0002ca03") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar2;\n  }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))) (expression_statement "FUN_0003dc30();" (call_expression "FUN_0003dc30()" (identifier "FUN_0003dc30") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 function_1(void *key,char *remoteKey,int var_7)

{
  int var_21;
  type_2 *peVar2;
  int var_4;
  type_3 *var_10;
  int var_6;
  type_4 *data;
  type_5 bn;
  type_6 var_13;
  type_6 var_15;
  int var_1;
  type_3 remote;
  
  var_21 = *(int *)(var_1 + 0x14);
  peVar2 = *(type_2 **)((int)key + 4);
  if (peVar2->type == var_2) {
    remote.infinity = '\0';
    remote.curve = peVar2;
    var_4 = var_3(remoteKey,var_7,&remote);
    if (var_4 == 0) {
LAB_0002ca20:
      bn = (type_5)0x0;
      goto LAB_0002ca03;
    }
  }
  else {
    var_6 = var_5((type_5)peVar2->p);
    var_4 = var_6 + 7;
    if (var_6 + 7 < 0) {
      var_4 = var_6 + 0xe;
    }
    if (var_4 >> 3 != var_7) goto LAB_0002ca20;
    remote.curve = *(type_2 **)((int)key + 4);
    remote.infinity = '\0';
    remote.x = var_8((type_4 *)remoteKey,var_4 >> 3);
    remote.y = (type_1)0x0;
    remote.z = (type_1)0x0;
  }
  var_10 = var_9(&remote,*(type_1 *)((int)key + 0x18));
  if (var_10 == (type_3 *)0x0) {
    bn = (type_5)0x0;
  }
  else {
    bn = (type_5)var_10->x;
    var_10->x = (type_1)0x0;
    if (var_10->curve->type == var_11) {
      var_13 = var_10->curve->fieldBits + 7 >> 3;
      data = (type_4 *)var_12(var_13,1);
      if (var_13 != 0) {
        var_15 = 0;
        do {
          var_4 = var_14(bn,var_15);
          data[var_15] = (type_4)var_4;
          var_15 = var_15 + 1;
        } while (var_13 != var_15);
      }
      var_16(bn);
      bn = var_17(data,var_13);
      var_18(data,var_13);
      var_19(data);
    }
    var_20(var_10);
  }
  if (remote.x != (type_1)0x0) {
    var_16((type_5)remote.x);
  }
  if (remote.y != (type_1)0x0) {
    var_16((type_5)remote.y);
  }
LAB_0002ca03:
  if (var_21 == *(int *)(var_1 + 0x14)) {
    return bn;
  }
                    /* WARNING: Subroutine does not return */
  var_22();
}


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

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

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

{
  undefined1 uVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  int in_GS_OFFSET;
  int *local_34;
  int local_30;
  int local_2c;
  undefined4 local_28;
  undefined1 local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2c959;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar3 = *(int **)(param_1 + 4);
  if (*piVar3 == 0) {
    local_24 = 0;
    local_34 = piVar3;
    iVar2 = FUN_0002a740();
    if (iVar2 == 0) {
LAB_0002ca20:
      iVar2 = 0;
      goto LAB_0002ca03;
    }
  }
  else {
    iVar4 = FUN_000221a0(piVar3[4]);
    iVar2 = iVar4 + 7;
    if (iVar4 + 7 < 0) {
      iVar2 = iVar4 + 0xe;
    }
    if (iVar2 >> 3 != param_3) goto LAB_0002ca20;
    local_34 = *(int **)(param_1 + 4);
    local_24 = 0;
    local_30 = FUN_00022070(param_2,iVar2 >> 3);
    local_2c = 0;
    local_28 = 0;
  }
  piVar3 = (int *)FUN_0002add0(&local_34,*(undefined4 *)(param_1 + 0x18));
  if (piVar3 == (int *)0x0) {
    iVar2 = 0;
  }
  else {
    iVar2 = piVar3[1];
    piVar3[1] = 0;
    if (*(int *)*piVar3 == 1) {
      uVar5 = ((int *)*piVar3)[3] + 7U >> 3;
      iVar4 = FUN_0001bd60(uVar5,1);
      if (uVar5 != 0) {
        uVar6 = 0;
        do {
          uVar1 = FUN_00022290(iVar2,uVar6);
          *(undefined1 *)(iVar4 + uVar6) = uVar1;
          uVar6 = uVar6 + 1;
        } while (uVar5 != uVar6);
      }
      FUN_00021b10(iVar2);
      iVar2 = FUN_00021fa0(iVar4,uVar5);
      FUN_0001c6d0(iVar4,uVar5);
      FUN_0001c5f0(iVar4);
    }
    FUN_0002ac70(piVar3);
  }
  if (local_30 != 0) {
    FUN_00021b10(local_30);
  }
  if (local_2c != 0) {
    FUN_00021b10(local_2c);
  }
LAB_0002ca03:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003dc30();
}

