
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

uchar * ssh2_mkkey(Ssh_conflict ssh,Bignum K,uchar *H,char chr,int keylen)

{
  ssh_hash *h;
  int iVar1;
  size_t n;
  uchar *puVar2;
  void *pvVar3;
  void *pvVar4;
  void *extraout_ECX;
  Bignum b;
  int iVar5;
  undefined8 uVar6;
  undefined1 local_20 [16];
  
  uVar6 = __x86_get_pc_thunk_di();
  b = (Bignum)((ulonglong)uVar6 >> 0x20);
  iVar1 = (int)uVar6;
  local_20[0] = SUB41(ssh,0);
  if (K == (Bignum)0x0) {
    return (uchar *)0x0;
  }
  h = *(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc);
  iVar5 = h->hlen;
  n = ((iVar5 + -1 + (int)K) / iVar5) * iVar5;
  puVar2 = (uchar *)safemalloc(n,1);
  pvVar3 = (*h->init)();
  if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {
    hash_mpint(h,pvVar3,b);
  }
  (*h->bytes)(pvVar3,extraout_ECX,h->hlen);
  (*h->bytes)(pvVar3,local_20,1);
  (*h->bytes)(pvVar3,(void *)(iVar1 + 0xa4),*(int *)(iVar1 + 0xe4));
  (*h->final)(pvVar3,puVar2);
  if (h->hlen < (int)n) {
    pvVar3 = (*h->init)();
    if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {
      hash_mpint(h,pvVar3,b);
    }
    (*h->bytes)(pvVar3,extraout_ECX,h->hlen);
    iVar1 = h->hlen;
    for (iVar5 = iVar1; iVar5 < (int)n; iVar5 = iVar5 + iVar1) {
      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);
      pvVar4 = (*h->copy)(pvVar3);
      (*h->final)(pvVar4,puVar2 + iVar5);
      iVar1 = h->hlen;
    }
    (*h->free)(pvVar3);
  }
  if ((int)K < (int)n) {
    smemclr((uchar *)((int)K + (int)puVar2),n - (int)K);
    return puVar2;
  }
  return puVar2;
}



int FUN_00029360(undefined1 param_1,int param_2)

{
  undefined4 *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  undefined4 extraout_ECX;
  int iVar7;
  undefined1 local_20 [16];
  
  iVar2 = FUN_0003c47b();
  local_20[0] = param_1;
  if (param_2 == 0) {
    return 0;
  }
  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);
  iVar3 = puVar1[5];
  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;
  iVar4 = FUN_0001c990(iVar3,1);
  uVar5 = (*(code *)*puVar1)();
  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {
    FUN_000292f0();
  }
  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);
  (*(code *)puVar1[2])(uVar5,local_20,1);
  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));
  (*(code *)puVar1[3])(uVar5,iVar4);
  if ((int)puVar1[5] < iVar3) {
    uVar5 = (*(code *)*puVar1)();
    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {
      FUN_000292f0();
    }
    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);
    iVar2 = puVar1[5];
    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {
      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);
      uVar6 = (*(code *)puVar1[1])(uVar5);
      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);
      iVar2 = puVar1[5];
    }
    (*(code *)puVar1[4])(uVar5);
  }
  if (param_2 < iVar3) {
    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);
    return iVar4;
  }
  return iVar4;
}


PUSH EBP
PUSH EDI
CALL 0x0003c47b
ADD EDI,0x7ba09
PUSH ESI
PUSH EBX
SUB ESP,0x2c
MOV EBX,dword ptr [ESP + 0x40]
MOV dword ptr [ESP + 0x14],EDI
MOV byte ptr [ESP + 0x1c],BL
MOV EBX,dword ptr [ESP + 0x44]
TEST EBX,EBX
JZ 0x000294d8
MOV EBP,EAX
MOV EAX,dword ptr [EAX + 0x98]
MOV dword ptr [ESP + 0x10],ECX
SUB ESP,0x8
MOV dword ptr [ESP + 0x20],EDX
MOV EBX,EDI
MOV ESI,dword ptr [EAX + 0xc]
MOV EAX,dword ptr [ESP + 0x4c]
MOV ECX,dword ptr [ESI + 0x14]
LEA EAX,[ECX + EAX*0x1 + -0x1]
CDQ
IDIV ECX
IMUL EAX,ECX
MOV dword ptr [ESP + 0x14],EAX
PUSH 0x1
PUSH EAX
CALL 0x0001c990
MOV EDI,EAX
CALL dword ptr [ESI]
ADD ESP,0x10
MOV EBX,EAX
TEST byte ptr [EBP + 0x50],0x20
JZ 0x00029490
SUB ESP,0x4
PUSH dword ptr [ESI + 0x14]
PUSH dword ptr [ESP + 0x18]
PUSH EBX
CALL dword ptr [ESI + 0x8]
ADD ESP,0xc
PUSH 0x1
LEA EAX,[ESP + 0x24]
PUSH EAX
PUSH EBX
CALL dword ptr [ESI + 0x8]
LEA EAX,[EBP + 0xa4]
ADD ESP,0xc
PUSH dword ptr [EBP + 0xe4]
PUSH EAX
PUSH EBX
CALL dword ptr [ESI + 0x8]
POP EAX
POP EDX
PUSH EDI
PUSH EBX
CALL dword ptr [ESI + 0xc]
MOV EAX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
CMP dword ptr [ESI + 0x14],EAX
JGE 0x00029479
CALL dword ptr [ESI]
MOV EBX,EAX
TEST byte ptr [EBP + 0x50],0x20
JZ 0x000294e8
SUB ESP,0x4
PUSH dword ptr [ESI + 0x14]
PUSH dword ptr [ESP + 0x18]
PUSH EBX
CALL dword ptr [ESI + 0x8]
MOV EAX,dword ptr [ESI + 0x14]
ADD ESP,0x10
MOV EBP,EAX
CMP dword ptr [ESP + 0xc],EAX
JLE 0x0002946f
NOP
MOV EDX,EBP
SUB ESP,0x4
SUB EDX,EAX
PUSH EAX
MOV EAX,EDX
ADD EAX,EDI
PUSH EAX
PUSH EBX
CALL dword ptr [ESI + 0x8]
MOV dword ptr [ESP],EBX
CALL dword ptr [ESI + 0x4]
POP EDX
POP ECX
LEA ECX,[EDI + EBP*0x1]
PUSH ECX
PUSH EAX
CALL dword ptr [ESI + 0xc]
MOV EAX,dword ptr [ESI + 0x14]
ADD ESP,0x10
ADD EBP,EAX
CMP dword ptr [ESP + 0xc],EBP
JG 0x00029440
SUB ESP,0xc
PUSH EBX
CALL dword ptr [ESI + 0x10]
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
CMP dword ptr [ESP + 0x44],EAX
JL 0x000294a8
ADD ESP,0x2c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESP + 0x18]
MOV EDX,EAX
MOV EAX,ESI
CALL 0x000292f0
JMP 0x000293d2
SUB ESP,0x8
MOV EAX,dword ptr [ESP + 0x14]
SUB EAX,dword ptr [ESP + 0x4c]
PUSH EAX
MOV EAX,dword ptr [ESP + 0x50]
ADD EAX,EDI
PUSH EAX
MOV EBX,dword ptr [ESP + 0x24]
CALL 0x0001d300
ADD ESP,0x10
MOV EAX,EDI
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x2c
XOR EDI,EDI
POP EBX
MOV EAX,EDI
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESP + 0x18]
MOV EDX,EAX
MOV EAX,ESI
CALL 0x000292f0
JMP 0x00029423
(translation_unit "int FUN_00029360(undefined1 param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_00029360(undefined1 param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00029360(undefined1 param_1,int param_2)" identifier (parameter_list "(undefined1 param_1,int param_2)" ( (parameter_declaration "undefined1 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 extraout_ECX;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined1 local_20 [16];" type_identifier (array_declarator "local_20 [16]" identifier [ number_literal ]) ;) (expression_statement "iVar2 = FUN_0003c47b();" (assignment_expression "iVar2 = FUN_0003c47b()" identifier = (call_expression "FUN_0003c47b()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_20[0] = param_1;" (assignment_expression "local_20[0] = param_1" (subscript_expression "local_20[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);" (assignment_expression "puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" identifier = (pointer_expression "*(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" * (cast_expression "(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar2 + 0x98) + 0xc)" ( (binary_expression "*(int *)(iVar2 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar2 + 0x98)" * (cast_expression "(int *)(iVar2 + 0x98)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x98)" ( (binary_expression "iVar2 + 0x98" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar3 = puVar1[5];" (assignment_expression "iVar3 = puVar1[5]" identifier = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;" (assignment_expression "iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3" identifier = (binary_expression "((iVar3 + -1 + param_2) / iVar3) * iVar3" (parenthesized_expression "((iVar3 + -1 + param_2) / iVar3)" ( (binary_expression "(iVar3 + -1 + param_2) / iVar3" (parenthesized_expression "(iVar3 + -1 + param_2)" ( (binary_expression "iVar3 + -1 + param_2" (binary_expression "iVar3 + -1" identifier + number_literal) + identifier) )) / identifier) )) * identifier)) ;) (expression_statement "iVar4 = FUN_0001c990(iVar3,1);" (assignment_expression "iVar4 = FUN_0001c990(iVar3,1)" identifier = (call_expression "FUN_0001c990(iVar3,1)" identifier (argument_list "(iVar3,1)" ( identifier , number_literal )))) ;) (expression_statement "uVar5 = (*(code *)*puVar1)();" (assignment_expression "uVar5 = (*(code *)*puVar1)()" identifier = (call_expression "(*(code *)*puVar1)()" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }" if (parenthesized_expression "((*(byte *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(byte *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(byte *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar2 + 0x50)" * (cast_expression "(byte *)(iVar2 + 0x50)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_000292f0();\n  }" { (expression_statement "FUN_000292f0();" (call_expression "FUN_000292f0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);" (call_expression "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5])" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,extraout_ECX,puVar1[5])" ( identifier , identifier , (subscript_expression "puVar1[5]" identifier [ number_literal ]) ))) ;) (expression_statement "(*(code *)puVar1[2])(uVar5,local_20,1);" (call_expression "(*(code *)puVar1[2])(uVar5,local_20,1)" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,local_20,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));" (call_expression "(*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" ( identifier , (binary_expression "iVar2 + 0xa4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar2 + 0xe4)" * (cast_expression "(undefined4 *)(iVar2 + 0xe4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe4)" ( (binary_expression "iVar2 + 0xe4" identifier + number_literal) )))) ))) ;) (expression_statement "(*(code *)puVar1[3])(uVar5,iVar4);" (call_expression "(*(code *)puVar1[3])(uVar5,iVar4)" (parenthesized_expression "(*(code *)puVar1[3])" ( (pointer_expression "*(code *)puVar1[3]" * (cast_expression "(code *)puVar1[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[3]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar4)" ( identifier , identifier ))) ;) (if_statement "if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }" if (parenthesized_expression "((int)puVar1[5] < iVar3)" ( (binary_expression "(int)puVar1[5] < iVar3" (cast_expression "(int)puVar1[5]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "puVar1[5]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }" { (expression_statement "uVar5 = (*(code *)*puVar1)();" (assignment_expression "uVar5 = (*(code *)*puVar1)()" identifier = (call_expression "(*(code *)*puVar1)()" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }" if (parenthesized_expression "((*(byte *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(byte *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(byte *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar2 + 0x50)" * (cast_expression "(byte *)(iVar2 + 0x50)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_000292f0();\n    }" { (expression_statement "FUN_000292f0();" (call_expression "FUN_000292f0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);" (call_expression "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5])" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,extraout_ECX,puVar1[5])" ( identifier , identifier , (subscript_expression "puVar1[5]" identifier [ number_literal ]) ))) ;) (expression_statement "iVar2 = puVar1[5];" (assignment_expression "iVar2 = puVar1[5]" identifier = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (for_statement "for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }" for ( (assignment_expression "iVar7 = iVar2" identifier = identifier) ; (binary_expression "iVar7 < iVar3" identifier < identifier) ; (assignment_expression "iVar7 = iVar7 + iVar2" identifier = (binary_expression "iVar7 + iVar2" identifier + identifier)) ) (compound_statement "{\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }" { (expression_statement "(*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);" (call_expression "(*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2)" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,(iVar7 - iVar2) + iVar4,iVar2)" ( identifier , (binary_expression "(iVar7 - iVar2) + iVar4" (parenthesized_expression "(iVar7 - iVar2)" ( (binary_expression "iVar7 - iVar2" identifier - identifier) )) + identifier) , identifier ))) ;) (expression_statement "uVar6 = (*(code *)puVar1[1])(uVar5);" (assignment_expression "uVar6 = (*(code *)puVar1[1])(uVar5)" identifier = (call_expression "(*(code *)puVar1[1])(uVar5)" (parenthesized_expression "(*(code *)puVar1[1])" ( (pointer_expression "*(code *)puVar1[1]" * (cast_expression "(code *)puVar1[1]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[1]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier )))) ;) (expression_statement "(*(code *)puVar1[3])(uVar6,iVar4 + iVar7);" (call_expression "(*(code *)puVar1[3])(uVar6,iVar4 + iVar7)" (parenthesized_expression "(*(code *)puVar1[3])" ( (pointer_expression "*(code *)puVar1[3]" * (cast_expression "(code *)puVar1[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[3]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar4 + iVar7)" ( identifier , (binary_expression "iVar4 + iVar7" identifier + identifier) ))) ;) (expression_statement "iVar2 = puVar1[5];" (assignment_expression "iVar2 = puVar1[5]" identifier = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) })) (expression_statement "(*(code *)puVar1[4])(uVar5);" (call_expression "(*(code *)puVar1[4])(uVar5)" (parenthesized_expression "(*(code *)puVar1[4])" ( (pointer_expression "*(code *)puVar1[4]" * (cast_expression "(code *)puVar1[4]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[4]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier ))) ;) })) (if_statement "if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }" if (parenthesized_expression "(param_2 < iVar3)" ( (binary_expression "param_2 < iVar3" identifier < identifier) )) (compound_statement "{\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }" { (expression_statement "FUN_0001d300(param_2 + iVar4,iVar3 - param_2);" (call_expression "FUN_0001d300(param_2 + iVar4,iVar3 - param_2)" identifier (argument_list "(param_2 + iVar4,iVar3 - param_2)" ( (binary_expression "param_2 + iVar4" identifier + identifier) , (binary_expression "iVar3 - param_2" identifier - identifier) ))) ;) (return_statement "return iVar4;" return identifier ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nuchar * ssh2_mkkey(Ssh_conflict ssh,Bignum K,uchar *H,char chr,int keylen)\n\n{\n  ssh_hash *h;\n  int iVar1;\n  size_t n;\n  uchar *puVar2;\n  void *pvVar3;\n  void *pvVar4;\n  void *extraout_ECX;\n  Bignum b;\n  int iVar5;\n  undefined8 uVar6;\n  undefined1 local_20 [16];\n  \n  uVar6 = __x86_get_pc_thunk_di();\n  b = (Bignum)((ulonglong)uVar6 >> 0x20);\n  iVar1 = (int)uVar6;\n  local_20[0] = SUB41(ssh,0);\n  if (K == (Bignum)0x0) {\n    return (uchar *)0x0;\n  }\n  h = *(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc);\n  iVar5 = h->hlen;\n  n = ((iVar5 + -1 + (int)K) / iVar5) * iVar5;\n  puVar2 = (uchar *)safemalloc(n,1);\n  pvVar3 = (*h->init)();\n  if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n    hash_mpint(h,pvVar3,b);\n  }\n  (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n  (*h->bytes)(pvVar3,local_20,1);\n  (*h->bytes)(pvVar3,(void *)(iVar1 + 0xa4),*(int *)(iVar1 + 0xe4));\n  (*h->final)(pvVar3,puVar2);\n  if (h->hlen < (int)n) {\n    pvVar3 = (*h->init)();\n    if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n      hash_mpint(h,pvVar3,b);\n    }\n    (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n    iVar1 = h->hlen;\n    for (iVar5 = iVar1; iVar5 < (int)n; iVar5 = iVar5 + iVar1) {\n      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);\n      pvVar4 = (*h->copy)(pvVar3);\n      (*h->final)(pvVar4,puVar2 + iVar5);\n      iVar1 = h->hlen;\n    }\n    (*h->free)(pvVar3);\n  }\n  if ((int)K < (int)n) {\n    smemclr((uchar *)((int)K + (int)puVar2),n - (int)K);\n    return puVar2;\n  }\n  return puVar2;\n}\n\n" comment (function_definition "uchar * ssh2_mkkey(Ssh_conflict ssh,Bignum K,uchar *H,char chr,int keylen)\n\n{\n  ssh_hash *h;\n  int iVar1;\n  size_t n;\n  uchar *puVar2;\n  void *pvVar3;\n  void *pvVar4;\n  void *extraout_ECX;\n  Bignum b;\n  int iVar5;\n  undefined8 uVar6;\n  undefined1 local_20 [16];\n  \n  uVar6 = __x86_get_pc_thunk_di();\n  b = (Bignum)((ulonglong)uVar6 >> 0x20);\n  iVar1 = (int)uVar6;\n  local_20[0] = SUB41(ssh,0);\n  if (K == (Bignum)0x0) {\n    return (uchar *)0x0;\n  }\n  h = *(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc);\n  iVar5 = h->hlen;\n  n = ((iVar5 + -1 + (int)K) / iVar5) * iVar5;\n  puVar2 = (uchar *)safemalloc(n,1);\n  pvVar3 = (*h->init)();\n  if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n    hash_mpint(h,pvVar3,b);\n  }\n  (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n  (*h->bytes)(pvVar3,local_20,1);\n  (*h->bytes)(pvVar3,(void *)(iVar1 + 0xa4),*(int *)(iVar1 + 0xe4));\n  (*h->final)(pvVar3,puVar2);\n  if (h->hlen < (int)n) {\n    pvVar3 = (*h->init)();\n    if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n      hash_mpint(h,pvVar3,b);\n    }\n    (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n    iVar1 = h->hlen;\n    for (iVar5 = iVar1; iVar5 < (int)n; iVar5 = iVar5 + iVar1) {\n      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);\n      pvVar4 = (*h->copy)(pvVar3);\n      (*h->final)(pvVar4,puVar2 + iVar5);\n      iVar1 = h->hlen;\n    }\n    (*h->free)(pvVar3);\n  }\n  if ((int)K < (int)n) {\n    smemclr((uchar *)((int)K + (int)puVar2),n - (int)K);\n    return puVar2;\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* ssh2_mkkey(Ssh_conflict ssh,Bignum K,uchar *H,char chr,int keylen)" * (function_declarator "ssh2_mkkey(Ssh_conflict ssh,Bignum K,uchar *H,char chr,int keylen)" identifier (parameter_list "(Ssh_conflict ssh,Bignum K,uchar *H,char chr,int keylen)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "Bignum K" type_identifier identifier) , (parameter_declaration "uchar *H" type_identifier (pointer_declarator "*H" * identifier)) , (parameter_declaration "char chr" primitive_type identifier) , (parameter_declaration "int keylen" primitive_type identifier) )))) (compound_statement "{\n  ssh_hash *h;\n  int iVar1;\n  size_t n;\n  uchar *puVar2;\n  void *pvVar3;\n  void *pvVar4;\n  void *extraout_ECX;\n  Bignum b;\n  int iVar5;\n  undefined8 uVar6;\n  undefined1 local_20 [16];\n  \n  uVar6 = __x86_get_pc_thunk_di();\n  b = (Bignum)((ulonglong)uVar6 >> 0x20);\n  iVar1 = (int)uVar6;\n  local_20[0] = SUB41(ssh,0);\n  if (K == (Bignum)0x0) {\n    return (uchar *)0x0;\n  }\n  h = *(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc);\n  iVar5 = h->hlen;\n  n = ((iVar5 + -1 + (int)K) / iVar5) * iVar5;\n  puVar2 = (uchar *)safemalloc(n,1);\n  pvVar3 = (*h->init)();\n  if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n    hash_mpint(h,pvVar3,b);\n  }\n  (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n  (*h->bytes)(pvVar3,local_20,1);\n  (*h->bytes)(pvVar3,(void *)(iVar1 + 0xa4),*(int *)(iVar1 + 0xe4));\n  (*h->final)(pvVar3,puVar2);\n  if (h->hlen < (int)n) {\n    pvVar3 = (*h->init)();\n    if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n      hash_mpint(h,pvVar3,b);\n    }\n    (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n    iVar1 = h->hlen;\n    for (iVar5 = iVar1; iVar5 < (int)n; iVar5 = iVar5 + iVar1) {\n      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);\n      pvVar4 = (*h->copy)(pvVar3);\n      (*h->final)(pvVar4,puVar2 + iVar5);\n      iVar1 = h->hlen;\n    }\n    (*h->free)(pvVar3);\n  }\n  if ((int)K < (int)n) {\n    smemclr((uchar *)((int)K + (int)puVar2),n - (int)K);\n    return puVar2;\n  }\n  return puVar2;\n}" { (declaration "ssh_hash *h;" type_identifier (pointer_declarator "*h" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t n;" primitive_type identifier ;) (declaration "uchar *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "void *extraout_ECX;" primitive_type (pointer_declarator "*extraout_ECX" * identifier) ;) (declaration "Bignum b;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined8 uVar6;" type_identifier identifier ;) (declaration "undefined1 local_20 [16];" type_identifier (array_declarator "local_20 [16]" identifier [ number_literal ]) ;) (expression_statement "uVar6 = __x86_get_pc_thunk_di();" (assignment_expression "uVar6 = __x86_get_pc_thunk_di()" identifier = (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( )))) ;) (expression_statement "b = (Bignum)((ulonglong)uVar6 >> 0x20);" (assignment_expression "b = (Bignum)((ulonglong)uVar6 >> 0x20)" identifier = (call_expression "(Bignum)((ulonglong)uVar6 >> 0x20)" (parenthesized_expression "(Bignum)" ( identifier )) (argument_list "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "iVar1 = (int)uVar6;" (assignment_expression "iVar1 = (int)uVar6" identifier = (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_20[0] = SUB41(ssh,0);" (assignment_expression "local_20[0] = SUB41(ssh,0)" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (call_expression "SUB41(ssh,0)" identifier (argument_list "(ssh,0)" ( identifier , number_literal )))) ;) (if_statement "if (K == (Bignum)0x0) {\n    return (uchar *)0x0;\n  }" if (parenthesized_expression "(K == (Bignum)0x0)" ( (binary_expression "K == (Bignum)0x0" identifier == (cast_expression "(Bignum)0x0" ( (type_descriptor "Bignum" type_identifier) ) number_literal)) )) (compound_statement "{\n    return (uchar *)0x0;\n  }" { (return_statement "return (uchar *)0x0;" return (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "h = *(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc);" (assignment_expression "h = *(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc)" identifier = (pointer_expression "*(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc)" * (cast_expression "(ssh_hash **)(*(int *)(iVar1 + 0x98) + 0xc)" ( (type_descriptor "ssh_hash **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar1 + 0x98) + 0xc)" ( (binary_expression "*(int *)(iVar1 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar1 + 0x98)" * (cast_expression "(int *)(iVar1 + 0x98)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x98)" ( (binary_expression "iVar1 + 0x98" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar5 = h->hlen;" (assignment_expression "iVar5 = h->hlen" identifier = (field_expression "h->hlen" identifier -> field_identifier)) ;) (expression_statement "n = ((iVar5 + -1 + (int)K) / iVar5) * iVar5;" (assignment_expression "n = ((iVar5 + -1 + (int)K) / iVar5) * iVar5" identifier = (binary_expression "((iVar5 + -1 + (int)K) / iVar5) * iVar5" (parenthesized_expression "((iVar5 + -1 + (int)K) / iVar5)" ( (binary_expression "(iVar5 + -1 + (int)K) / iVar5" (parenthesized_expression "(iVar5 + -1 + (int)K)" ( (binary_expression "iVar5 + -1 + (int)K" (binary_expression "iVar5 + -1" identifier + number_literal) + (cast_expression "(int)K" ( (type_descriptor "int" primitive_type) ) identifier)) )) / identifier) )) * identifier)) ;) (expression_statement "puVar2 = (uchar *)safemalloc(n,1);" (assignment_expression "puVar2 = (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 ))))) ;) (expression_statement "pvVar3 = (*h->init)();" (assignment_expression "pvVar3 = (*h->init)()" identifier = (call_expression "(*h->init)()" (parenthesized_expression "(*h->init)" ( (pointer_expression "*h->init" * (field_expression "h->init" identifier -> field_identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n    hash_mpint(h,pvVar3,b);\n  }" if (parenthesized_expression "((*(byte *)(iVar1 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x50) & 0x20)" ( (binary_expression "*(byte *)(iVar1 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar1 + 0x50)" * (cast_expression "(byte *)(iVar1 + 0x50)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x50)" ( (binary_expression "iVar1 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    hash_mpint(h,pvVar3,b);\n  }" { (expression_statement "hash_mpint(h,pvVar3,b);" (call_expression "hash_mpint(h,pvVar3,b)" identifier (argument_list "(h,pvVar3,b)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "(*h->bytes)(pvVar3,extraout_ECX,h->hlen);" (call_expression "(*h->bytes)(pvVar3,extraout_ECX,h->hlen)" (parenthesized_expression "(*h->bytes)" ( (pointer_expression "*h->bytes" * (field_expression "h->bytes" identifier -> field_identifier)) )) (argument_list "(pvVar3,extraout_ECX,h->hlen)" ( identifier , identifier , (field_expression "h->hlen" identifier -> field_identifier) ))) ;) (expression_statement "(*h->bytes)(pvVar3,local_20,1);" (call_expression "(*h->bytes)(pvVar3,local_20,1)" (parenthesized_expression "(*h->bytes)" ( (pointer_expression "*h->bytes" * (field_expression "h->bytes" identifier -> field_identifier)) )) (argument_list "(pvVar3,local_20,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*h->bytes)(pvVar3,(void *)(iVar1 + 0xa4),*(int *)(iVar1 + 0xe4));" (call_expression "(*h->bytes)(pvVar3,(void *)(iVar1 + 0xa4),*(int *)(iVar1 + 0xe4))" (parenthesized_expression "(*h->bytes)" ( (pointer_expression "*h->bytes" * (field_expression "h->bytes" identifier -> field_identifier)) )) (argument_list "(pvVar3,(void *)(iVar1 + 0xa4),*(int *)(iVar1 + 0xe4))" ( identifier , (cast_expression "(void *)(iVar1 + 0xa4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xa4)" ( (binary_expression "iVar1 + 0xa4" identifier + number_literal) ))) , (pointer_expression "*(int *)(iVar1 + 0xe4)" * (cast_expression "(int *)(iVar1 + 0xe4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xe4)" ( (binary_expression "iVar1 + 0xe4" identifier + number_literal) )))) ))) ;) (expression_statement "(*h->final)(pvVar3,puVar2);" (call_expression "(*h->final)(pvVar3,puVar2)" (parenthesized_expression "(*h->final)" ( (pointer_expression "*h->final" * (field_expression "h->final" identifier -> field_identifier)) )) (argument_list "(pvVar3,puVar2)" ( identifier , identifier ))) ;) (if_statement "if (h->hlen < (int)n) {\n    pvVar3 = (*h->init)();\n    if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n      hash_mpint(h,pvVar3,b);\n    }\n    (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n    iVar1 = h->hlen;\n    for (iVar5 = iVar1; iVar5 < (int)n; iVar5 = iVar5 + iVar1) {\n      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);\n      pvVar4 = (*h->copy)(pvVar3);\n      (*h->final)(pvVar4,puVar2 + iVar5);\n      iVar1 = h->hlen;\n    }\n    (*h->free)(pvVar3);\n  }" if (parenthesized_expression "(h->hlen < (int)n)" ( (binary_expression "h->hlen < (int)n" (field_expression "h->hlen" identifier -> field_identifier) < (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    pvVar3 = (*h->init)();\n    if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n      hash_mpint(h,pvVar3,b);\n    }\n    (*h->bytes)(pvVar3,extraout_ECX,h->hlen);\n    iVar1 = h->hlen;\n    for (iVar5 = iVar1; iVar5 < (int)n; iVar5 = iVar5 + iVar1) {\n      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);\n      pvVar4 = (*h->copy)(pvVar3);\n      (*h->final)(pvVar4,puVar2 + iVar5);\n      iVar1 = h->hlen;\n    }\n    (*h->free)(pvVar3);\n  }" { (expression_statement "pvVar3 = (*h->init)();" (assignment_expression "pvVar3 = (*h->init)()" identifier = (call_expression "(*h->init)()" (parenthesized_expression "(*h->init)" ( (pointer_expression "*h->init" * (field_expression "h->init" identifier -> field_identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(byte *)(iVar1 + 0x50) & 0x20) == 0) {\n      hash_mpint(h,pvVar3,b);\n    }" if (parenthesized_expression "((*(byte *)(iVar1 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x50) & 0x20)" ( (binary_expression "*(byte *)(iVar1 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar1 + 0x50)" * (cast_expression "(byte *)(iVar1 + 0x50)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x50)" ( (binary_expression "iVar1 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      hash_mpint(h,pvVar3,b);\n    }" { (expression_statement "hash_mpint(h,pvVar3,b);" (call_expression "hash_mpint(h,pvVar3,b)" identifier (argument_list "(h,pvVar3,b)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "(*h->bytes)(pvVar3,extraout_ECX,h->hlen);" (call_expression "(*h->bytes)(pvVar3,extraout_ECX,h->hlen)" (parenthesized_expression "(*h->bytes)" ( (pointer_expression "*h->bytes" * (field_expression "h->bytes" identifier -> field_identifier)) )) (argument_list "(pvVar3,extraout_ECX,h->hlen)" ( identifier , identifier , (field_expression "h->hlen" identifier -> field_identifier) ))) ;) (expression_statement "iVar1 = h->hlen;" (assignment_expression "iVar1 = h->hlen" identifier = (field_expression "h->hlen" identifier -> field_identifier)) ;) (for_statement "for (iVar5 = iVar1; iVar5 < (int)n; iVar5 = iVar5 + iVar1) {\n      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);\n      pvVar4 = (*h->copy)(pvVar3);\n      (*h->final)(pvVar4,puVar2 + iVar5);\n      iVar1 = h->hlen;\n    }" for ( (assignment_expression "iVar5 = iVar1" identifier = identifier) ; (binary_expression "iVar5 < (int)n" identifier < (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier)) ; (assignment_expression "iVar5 = iVar5 + iVar1" identifier = (binary_expression "iVar5 + iVar1" identifier + identifier)) ) (compound_statement "{\n      (*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);\n      pvVar4 = (*h->copy)(pvVar3);\n      (*h->final)(pvVar4,puVar2 + iVar5);\n      iVar1 = h->hlen;\n    }" { (expression_statement "(*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1);" (call_expression "(*h->bytes)(pvVar3,puVar2 + (iVar5 - iVar1),iVar1)" (parenthesized_expression "(*h->bytes)" ( (pointer_expression "*h->bytes" * (field_expression "h->bytes" identifier -> field_identifier)) )) (argument_list "(pvVar3,puVar2 + (iVar5 - iVar1),iVar1)" ( identifier , (binary_expression "puVar2 + (iVar5 - iVar1)" identifier + (parenthesized_expression "(iVar5 - iVar1)" ( (binary_expression "iVar5 - iVar1" identifier - identifier) ))) , identifier ))) ;) (expression_statement "pvVar4 = (*h->copy)(pvVar3);" (assignment_expression "pvVar4 = (*h->copy)(pvVar3)" identifier = (call_expression "(*h->copy)(pvVar3)" (parenthesized_expression "(*h->copy)" ( (pointer_expression "*h->copy" * (field_expression "h->copy" identifier -> field_identifier)) )) (argument_list "(pvVar3)" ( identifier )))) ;) (expression_statement "(*h->final)(pvVar4,puVar2 + iVar5);" (call_expression "(*h->final)(pvVar4,puVar2 + iVar5)" (parenthesized_expression "(*h->final)" ( (pointer_expression "*h->final" * (field_expression "h->final" identifier -> field_identifier)) )) (argument_list "(pvVar4,puVar2 + iVar5)" ( identifier , (binary_expression "puVar2 + iVar5" identifier + identifier) ))) ;) (expression_statement "iVar1 = h->hlen;" (assignment_expression "iVar1 = h->hlen" identifier = (field_expression "h->hlen" identifier -> field_identifier)) ;) })) (expression_statement "(*h->free)(pvVar3);" (call_expression "(*h->free)(pvVar3)" (parenthesized_expression "(*h->free)" ( (pointer_expression "*h->free" * (field_expression "h->free" identifier -> field_identifier)) )) (argument_list "(pvVar3)" ( identifier ))) ;) })) (if_statement "if ((int)K < (int)n) {\n    smemclr((uchar *)((int)K + (int)puVar2),n - (int)K);\n    return puVar2;\n  }" if (parenthesized_expression "((int)K < (int)n)" ( (binary_expression "(int)K < (int)n" (cast_expression "(int)K" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    smemclr((uchar *)((int)K + (int)puVar2),n - (int)K);\n    return puVar2;\n  }" { (expression_statement "smemclr((uchar *)((int)K + (int)puVar2),n - (int)K);" (call_expression "smemclr((uchar *)((int)K + (int)puVar2),n - (int)K)" identifier (argument_list "((uchar *)((int)K + (int)puVar2),n - (int)K)" ( (cast_expression "(uchar *)((int)K + (int)puVar2)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)K + (int)puVar2)" ( (binary_expression "(int)K + (int)puVar2" (cast_expression "(int)K" ( (type_descriptor "int" primitive_type) ) identifier) + (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , (binary_expression "n - (int)K" identifier - (cast_expression "(int)K" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return puVar2;" return identifier ;) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit "int FUN_00029360(undefined1 param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_00029360(undefined1 param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00029360(undefined1 param_1,int param_2)" identifier (parameter_list "(undefined1 param_1,int param_2)" ( (parameter_declaration "undefined1 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 extraout_ECX;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined1 local_20 [16];" type_identifier (array_declarator "local_20 [16]" identifier [ number_literal ]) ;) (expression_statement "iVar2 = FUN_0003c47b();" (assignment_expression "iVar2 = FUN_0003c47b()" identifier = (call_expression "FUN_0003c47b()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_20[0] = param_1;" (assignment_expression "local_20[0] = param_1" (subscript_expression "local_20[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);" (assignment_expression "puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" identifier = (pointer_expression "*(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" * (cast_expression "(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar2 + 0x98) + 0xc)" ( (binary_expression "*(int *)(iVar2 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar2 + 0x98)" * (cast_expression "(int *)(iVar2 + 0x98)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x98)" ( (binary_expression "iVar2 + 0x98" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar3 = puVar1[5];" (assignment_expression "iVar3 = puVar1[5]" identifier = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;" (assignment_expression "iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3" identifier = (binary_expression "((iVar3 + -1 + param_2) / iVar3) * iVar3" (parenthesized_expression "((iVar3 + -1 + param_2) / iVar3)" ( (binary_expression "(iVar3 + -1 + param_2) / iVar3" (parenthesized_expression "(iVar3 + -1 + param_2)" ( (binary_expression "iVar3 + -1 + param_2" (binary_expression "iVar3 + -1" identifier + number_literal) + identifier) )) / identifier) )) * identifier)) ;) (expression_statement "iVar4 = FUN_0001c990(iVar3,1);" (assignment_expression "iVar4 = FUN_0001c990(iVar3,1)" identifier = (call_expression "FUN_0001c990(iVar3,1)" identifier (argument_list "(iVar3,1)" ( identifier , number_literal )))) ;) (expression_statement "uVar5 = (*(code *)*puVar1)();" (assignment_expression "uVar5 = (*(code *)*puVar1)()" identifier = (call_expression "(*(code *)*puVar1)()" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }" if (parenthesized_expression "((*(byte *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(byte *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(byte *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar2 + 0x50)" * (cast_expression "(byte *)(iVar2 + 0x50)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_000292f0();\n  }" { (expression_statement "FUN_000292f0();" (call_expression "FUN_000292f0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);" (call_expression "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5])" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,extraout_ECX,puVar1[5])" ( identifier , identifier , (subscript_expression "puVar1[5]" identifier [ number_literal ]) ))) ;) (expression_statement "(*(code *)puVar1[2])(uVar5,local_20,1);" (call_expression "(*(code *)puVar1[2])(uVar5,local_20,1)" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,local_20,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));" (call_expression "(*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" ( identifier , (binary_expression "iVar2 + 0xa4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar2 + 0xe4)" * (cast_expression "(undefined4 *)(iVar2 + 0xe4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe4)" ( (binary_expression "iVar2 + 0xe4" identifier + number_literal) )))) ))) ;) (expression_statement "(*(code *)puVar1[3])(uVar5,iVar4);" (call_expression "(*(code *)puVar1[3])(uVar5,iVar4)" (parenthesized_expression "(*(code *)puVar1[3])" ( (pointer_expression "*(code *)puVar1[3]" * (cast_expression "(code *)puVar1[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[3]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar4)" ( identifier , identifier ))) ;) (if_statement "if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }" if (parenthesized_expression "((int)puVar1[5] < iVar3)" ( (binary_expression "(int)puVar1[5] < iVar3" (cast_expression "(int)puVar1[5]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "puVar1[5]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }" { (expression_statement "uVar5 = (*(code *)*puVar1)();" (assignment_expression "uVar5 = (*(code *)*puVar1)()" identifier = (call_expression "(*(code *)*puVar1)()" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }" if (parenthesized_expression "((*(byte *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(byte *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(byte *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar2 + 0x50)" * (cast_expression "(byte *)(iVar2 + 0x50)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_000292f0();\n    }" { (expression_statement "FUN_000292f0();" (call_expression "FUN_000292f0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);" (call_expression "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5])" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,extraout_ECX,puVar1[5])" ( identifier , identifier , (subscript_expression "puVar1[5]" identifier [ number_literal ]) ))) ;) (expression_statement "iVar2 = puVar1[5];" (assignment_expression "iVar2 = puVar1[5]" identifier = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (for_statement "for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }" for ( (assignment_expression "iVar7 = iVar2" identifier = identifier) ; (binary_expression "iVar7 < iVar3" identifier < identifier) ; (assignment_expression "iVar7 = iVar7 + iVar2" identifier = (binary_expression "iVar7 + iVar2" identifier + identifier)) ) (compound_statement "{\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }" { (expression_statement "(*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);" (call_expression "(*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2)" (parenthesized_expression "(*(code *)puVar1[2])" ( (pointer_expression "*(code *)puVar1[2]" * (cast_expression "(code *)puVar1[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,(iVar7 - iVar2) + iVar4,iVar2)" ( identifier , (binary_expression "(iVar7 - iVar2) + iVar4" (parenthesized_expression "(iVar7 - iVar2)" ( (binary_expression "iVar7 - iVar2" identifier - identifier) )) + identifier) , identifier ))) ;) (expression_statement "uVar6 = (*(code *)puVar1[1])(uVar5);" (assignment_expression "uVar6 = (*(code *)puVar1[1])(uVar5)" identifier = (call_expression "(*(code *)puVar1[1])(uVar5)" (parenthesized_expression "(*(code *)puVar1[1])" ( (pointer_expression "*(code *)puVar1[1]" * (cast_expression "(code *)puVar1[1]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[1]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier )))) ;) (expression_statement "(*(code *)puVar1[3])(uVar6,iVar4 + iVar7);" (call_expression "(*(code *)puVar1[3])(uVar6,iVar4 + iVar7)" (parenthesized_expression "(*(code *)puVar1[3])" ( (pointer_expression "*(code *)puVar1[3]" * (cast_expression "(code *)puVar1[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[3]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar4 + iVar7)" ( identifier , (binary_expression "iVar4 + iVar7" identifier + identifier) ))) ;) (expression_statement "iVar2 = puVar1[5];" (assignment_expression "iVar2 = puVar1[5]" identifier = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) })) (expression_statement "(*(code *)puVar1[4])(uVar5);" (call_expression "(*(code *)puVar1[4])(uVar5)" (parenthesized_expression "(*(code *)puVar1[4])" ( (pointer_expression "*(code *)puVar1[4]" * (cast_expression "(code *)puVar1[4]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[4]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier ))) ;) })) (if_statement "if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }" if (parenthesized_expression "(param_2 < iVar3)" ( (binary_expression "param_2 < iVar3" identifier < identifier) )) (compound_statement "{\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }" { (expression_statement "FUN_0001d300(param_2 + iVar4,iVar3 - param_2);" (call_expression "FUN_0001d300(param_2 + iVar4,iVar3 - param_2)" identifier (argument_list "(param_2 + iVar4,iVar3 - param_2)" ( (binary_expression "param_2 + iVar4" identifier + identifier) , (binary_expression "iVar3 - param_2" identifier - identifier) ))) ;) (return_statement "return iVar4;" return identifier ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )) / IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (for_statement for ( (assignment_expression IDENT = IDENT) ; (binary_expression IDENT < IDENT) ; (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) + IDENT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , (binary_expression IDENT + IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (binary_expression IDENT - IDENT) ))) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00029360(undefined1 param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_00029360(undefined1 param_1,int param_2)" (identifier "FUN_00029360") (parameter_list "(undefined1 param_1,int param_2)" (( "(") (parameter_declaration "undefined1 param_1" (type_identifier "undefined1") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  undefined4 extraout_ECX;\n  int iVar7;\n  undefined1 local_20 [16];\n  \n  iVar2 = FUN_0003c47b();\n  local_20[0] = param_1;\n  if (param_2 == 0) {\n    return 0;\n  }\n  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar1[5];\n  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;\n  iVar4 = FUN_0001c990(iVar3,1);\n  uVar5 = (*(code *)*puVar1)();\n  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }\n  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n  (*(code *)puVar1[2])(uVar5,local_20,1);\n  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar1[3])(uVar5,iVar4);\n  if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }\n  if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }\n  return iVar4;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "undefined4 extraout_ECX;" (type_identifier "undefined4") (identifier "extraout_ECX") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "undefined1 local_20 [16];" (type_identifier "undefined1") (array_declarator "local_20 [16]" (identifier "local_20") ([ "[") (number_literal "16") (] "]")) (; ";")) (expression_statement "iVar2 = FUN_0003c47b();" (assignment_expression "iVar2 = FUN_0003c47b()" (identifier "iVar2") (= "=") (call_expression "FUN_0003c47b()" (identifier "FUN_0003c47b") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "local_20[0] = param_1;" (assignment_expression "local_20[0] = param_1" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "param_1")) (; ";")) (if_statement "if (param_2 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);" (assignment_expression "puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" (identifier "puVar1") (= "=") (pointer_expression "*(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" (* "*") (cast_expression "(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(iVar2 + 0x98) + 0xc)" (( "(") (binary_expression "*(int *)(iVar2 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar2 + 0x98)" (* "*") (cast_expression "(int *)(iVar2 + 0x98)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x98)" (( "(") (binary_expression "iVar2 + 0x98" (identifier "iVar2") (+ "+") (number_literal "0x98")) () ")")))) (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "iVar3 = puVar1[5];" (assignment_expression "iVar3 = puVar1[5]" (identifier "iVar3") (= "=") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]"))) (; ";")) (expression_statement "iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;" (assignment_expression "iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3" (identifier "iVar3") (= "=") (binary_expression "((iVar3 + -1 + param_2) / iVar3) * iVar3" (parenthesized_expression "((iVar3 + -1 + param_2) / iVar3)" (( "(") (binary_expression "(iVar3 + -1 + param_2) / iVar3" (parenthesized_expression "(iVar3 + -1 + param_2)" (( "(") (binary_expression "iVar3 + -1 + param_2" (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1")) (+ "+") (identifier "param_2")) () ")")) (/ "/") (identifier "iVar3")) () ")")) (* "*") (identifier "iVar3"))) (; ";")) (expression_statement "iVar4 = FUN_0001c990(iVar3,1);" (assignment_expression "iVar4 = FUN_0001c990(iVar3,1)" (identifier "iVar4") (= "=") (call_expression "FUN_0001c990(iVar3,1)" (identifier "FUN_0001c990") (argument_list "(iVar3,1)" (( "(") (identifier "iVar3") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "uVar5 = (*(code *)*puVar1)();" (assignment_expression "uVar5 = (*(code *)*puVar1)()" (identifier "uVar5") (= "=") (call_expression "(*(code *)*puVar1)()" (parenthesized_expression "(*(code *)*puVar1)" (( "(") (pointer_expression "*(code *)*puVar1" (* "*") (cast_expression "(code *)*puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_000292f0();\n  }" (if "if") (parenthesized_expression "((*(byte *)(iVar2 + 0x50) & 0x20) == 0)" (( "(") (binary_expression "(*(byte *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x50) & 0x20)" (( "(") (binary_expression "*(byte *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar2 + 0x50)" (* "*") (cast_expression "(byte *)(iVar2 + 0x50)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x50)" (( "(") (binary_expression "iVar2 + 0x50" (identifier "iVar2") (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000292f0();\n  }" ({ "{") (expression_statement "FUN_000292f0();" (call_expression "FUN_000292f0()" (identifier "FUN_000292f0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);" (call_expression "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5])" (parenthesized_expression "(*(code *)puVar1[2])" (( "(") (pointer_expression "*(code *)puVar1[2]" (* "*") (cast_expression "(code *)puVar1[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,extraout_ECX,puVar1[5])" (( "(") (identifier "uVar5") (, ",") (identifier "extraout_ECX") (, ",") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) () ")"))) (; ";")) (expression_statement "(*(code *)puVar1[2])(uVar5,local_20,1);" (call_expression "(*(code *)puVar1[2])(uVar5,local_20,1)" (parenthesized_expression "(*(code *)puVar1[2])" (( "(") (pointer_expression "*(code *)puVar1[2]" (* "*") (cast_expression "(code *)puVar1[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,local_20,1)" (( "(") (identifier "uVar5") (, ",") (identifier "local_20") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "(*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));" (call_expression "(*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (parenthesized_expression "(*(code *)puVar1[2])" (( "(") (pointer_expression "*(code *)puVar1[2]" (* "*") (cast_expression "(code *)puVar1[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (( "(") (identifier "uVar5") (, ",") (binary_expression "iVar2 + 0xa4" (identifier "iVar2") (+ "+") (number_literal "0xa4")) (, ",") (pointer_expression "*(undefined4 *)(iVar2 + 0xe4)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0xe4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xe4)" (( "(") (binary_expression "iVar2 + 0xe4" (identifier "iVar2") (+ "+") (number_literal "0xe4")) () ")")))) () ")"))) (; ";")) (expression_statement "(*(code *)puVar1[3])(uVar5,iVar4);" (call_expression "(*(code *)puVar1[3])(uVar5,iVar4)" (parenthesized_expression "(*(code *)puVar1[3])" (( "(") (pointer_expression "*(code *)puVar1[3]" (* "*") (cast_expression "(code *)puVar1[3]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")))) () ")")) (argument_list "(uVar5,iVar4)" (( "(") (identifier "uVar5") (, ",") (identifier "iVar4") () ")"))) (; ";")) (if_statement "if ((int)puVar1[5] < iVar3) {\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }" (if "if") (parenthesized_expression "((int)puVar1[5] < iVar3)" (( "(") (binary_expression "(int)puVar1[5] < iVar3" (cast_expression "(int)puVar1[5]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]"))) (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    uVar5 = (*(code *)*puVar1)();\n    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }\n    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);\n    iVar2 = puVar1[5];\n    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }\n    (*(code *)puVar1[4])(uVar5);\n  }" ({ "{") (expression_statement "uVar5 = (*(code *)*puVar1)();" (assignment_expression "uVar5 = (*(code *)*puVar1)()" (identifier "uVar5") (= "=") (call_expression "(*(code *)*puVar1)()" (parenthesized_expression "(*(code *)*puVar1)" (( "(") (pointer_expression "*(code *)*puVar1" (* "*") (cast_expression "(code *)*puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_000292f0();\n    }" (if "if") (parenthesized_expression "((*(byte *)(iVar2 + 0x50) & 0x20) == 0)" (( "(") (binary_expression "(*(byte *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x50) & 0x20)" (( "(") (binary_expression "*(byte *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(byte *)(iVar2 + 0x50)" (* "*") (cast_expression "(byte *)(iVar2 + 0x50)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x50)" (( "(") (binary_expression "iVar2 + 0x50" (identifier "iVar2") (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_000292f0();\n    }" ({ "{") (expression_statement "FUN_000292f0();" (call_expression "FUN_000292f0()" (identifier "FUN_000292f0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);" (call_expression "(*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5])" (parenthesized_expression "(*(code *)puVar1[2])" (( "(") (pointer_expression "*(code *)puVar1[2]" (* "*") (cast_expression "(code *)puVar1[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,extraout_ECX,puVar1[5])" (( "(") (identifier "uVar5") (, ",") (identifier "extraout_ECX") (, ",") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) () ")"))) (; ";")) (expression_statement "iVar2 = puVar1[5];" (assignment_expression "iVar2 = puVar1[5]" (identifier "iVar2") (= "=") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]"))) (; ";")) (for_statement "for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }" (for "for") (( "(") (assignment_expression "iVar7 = iVar2" (identifier "iVar7") (= "=") (identifier "iVar2")) (; ";") (binary_expression "iVar7 < iVar3" (identifier "iVar7") (< "<") (identifier "iVar3")) (; ";") (assignment_expression "iVar7 = iVar7 + iVar2" (identifier "iVar7") (= "=") (binary_expression "iVar7 + iVar2" (identifier "iVar7") (+ "+") (identifier "iVar2"))) () ")") (compound_statement "{\n      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);\n      uVar6 = (*(code *)puVar1[1])(uVar5);\n      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);\n      iVar2 = puVar1[5];\n    }" ({ "{") (expression_statement "(*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);" (call_expression "(*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2)" (parenthesized_expression "(*(code *)puVar1[2])" (( "(") (pointer_expression "*(code *)puVar1[2]" (* "*") (cast_expression "(code *)puVar1[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,(iVar7 - iVar2) + iVar4,iVar2)" (( "(") (identifier "uVar5") (, ",") (binary_expression "(iVar7 - iVar2) + iVar4" (parenthesized_expression "(iVar7 - iVar2)" (( "(") (binary_expression "iVar7 - iVar2" (identifier "iVar7") (- "-") (identifier "iVar2")) () ")")) (+ "+") (identifier "iVar4")) (, ",") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "uVar6 = (*(code *)puVar1[1])(uVar5);" (assignment_expression "uVar6 = (*(code *)puVar1[1])(uVar5)" (identifier "uVar6") (= "=") (call_expression "(*(code *)puVar1[1])(uVar5)" (parenthesized_expression "(*(code *)puVar1[1])" (( "(") (pointer_expression "*(code *)puVar1[1]" (* "*") (cast_expression "(code *)puVar1[1]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")))) () ")")) (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")")))) (; ";")) (expression_statement "(*(code *)puVar1[3])(uVar6,iVar4 + iVar7);" (call_expression "(*(code *)puVar1[3])(uVar6,iVar4 + iVar7)" (parenthesized_expression "(*(code *)puVar1[3])" (( "(") (pointer_expression "*(code *)puVar1[3]" (* "*") (cast_expression "(code *)puVar1[3]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")))) () ")")) (argument_list "(uVar6,iVar4 + iVar7)" (( "(") (identifier "uVar6") (, ",") (binary_expression "iVar4 + iVar7" (identifier "iVar4") (+ "+") (identifier "iVar7")) () ")"))) (; ";")) (expression_statement "iVar2 = puVar1[5];" (assignment_expression "iVar2 = puVar1[5]" (identifier "iVar2") (= "=") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]"))) (; ";")) (} "}"))) (expression_statement "(*(code *)puVar1[4])(uVar5);" (call_expression "(*(code *)puVar1[4])(uVar5)" (parenthesized_expression "(*(code *)puVar1[4])" (( "(") (pointer_expression "*(code *)puVar1[4]" (* "*") (cast_expression "(code *)puVar1[4]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[4]" (identifier "puVar1") ([ "[") (number_literal "4") (] "]")))) () ")")) (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 < iVar3) {\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }" (if "if") (parenthesized_expression "(param_2 < iVar3)" (( "(") (binary_expression "param_2 < iVar3" (identifier "param_2") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);\n    return iVar4;\n  }" ({ "{") (expression_statement "FUN_0001d300(param_2 + iVar4,iVar3 - param_2);" (call_expression "FUN_0001d300(param_2 + iVar4,iVar3 - param_2)" (identifier "FUN_0001d300") (argument_list "(param_2 + iVar4,iVar3 - param_2)" (( "(") (binary_expression "param_2 + iVar4" (identifier "param_2") (+ "+") (identifier "iVar4")) (, ",") (binary_expression "iVar3 - param_2" (identifier "iVar3") (- "-") (identifier "param_2")) () ")"))) (; ";")) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 * function_1(type_2 ssh,type_3 var_3,type_1 *H,char chr,int keylen)

{
  type_4 *h;
  int var_4;
  size_t var_10;
  type_1 *var_8;
  void *pvVar3;
  void *pvVar4;
  void *extraout_ECX;
  type_3 b;
  int var_5;
  type_5 uVar6;
  type_6 local_20 [16];
  
  uVar6 = var_1();
  b = (type_3)((type_7)uVar6 >> 0x20);
  var_4 = (int)uVar6;
  local_20[0] = var_2(ssh,0);
  if (var_3 == (type_3)0x0) {
    return (type_1 *)0x0;
  }
  h = *(type_4 **)(*(int *)(var_4 + 0x98) + 0xc);
  var_5 = h->hlen;
  var_10 = ((var_5 + -1 + (int)var_3) / var_5) * var_5;
  var_8 = (type_1 *)var_6(var_10,1);
  pvVar3 = (*h->init)();
  if ((*(type_8 *)(var_4 + 0x50) & 0x20) == 0) {
    var_7(h,pvVar3,b);
  }
  (*h->bytes)(pvVar3,extraout_ECX,h->hlen);
  (*h->bytes)(pvVar3,local_20,1);
  (*h->bytes)(pvVar3,(void *)(var_4 + 0xa4),*(int *)(var_4 + 0xe4));
  (*h->final)(pvVar3,var_8);
  if (h->hlen < (int)var_10) {
    pvVar3 = (*h->init)();
    if ((*(type_8 *)(var_4 + 0x50) & 0x20) == 0) {
      var_7(h,pvVar3,b);
    }
    (*h->bytes)(pvVar3,extraout_ECX,h->hlen);
    var_4 = h->hlen;
    for (var_5 = var_4; var_5 < (int)var_10; var_5 = var_5 + var_4) {
      (*h->bytes)(pvVar3,var_8 + (var_5 - var_4),var_4);
      pvVar4 = (*h->copy)(pvVar3);
      (*h->final)(pvVar4,var_8 + var_5);
      var_4 = h->hlen;
    }
    (*h->free)(pvVar3);
  }
  if ((int)var_3 < (int)var_10) {
    var_9((type_1 *)((int)var_3 + (int)var_8),var_10 - (int)var_3);
    return var_8;
  }
  return var_8;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) 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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (identifier) (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (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)))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (identifier) (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (for_statement initializer: (assignment_expression left: (identifier) right: (identifier)) condition: (binary_expression left: (identifier) right: (identifier)) update: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))) body: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (binary_expression left: (identifier) right: (identifier))))) (return_statement (identifier)))) (return_statement (identifier)))))

int MASKED(undefined1 param_1,int param_2)

{
  undefined4 *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  undefined4 extraout_ECX;
  int iVar7;
  undefined1 local_20 [16];
  
  iVar2 = FUN_0003c47b();
  local_20[0] = param_1;
  if (param_2 == 0) {
    return 0;
  }
  puVar1 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);
  iVar3 = puVar1[5];
  iVar3 = ((iVar3 + -1 + param_2) / iVar3) * iVar3;
  iVar4 = FUN_0001c990(iVar3,1);
  uVar5 = (*(code *)*puVar1)();
  if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {
    FUN_000292f0();
  }
  (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);
  (*(code *)puVar1[2])(uVar5,local_20,1);
  (*(code *)puVar1[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));
  (*(code *)puVar1[3])(uVar5,iVar4);
  if ((int)puVar1[5] < iVar3) {
    uVar5 = (*(code *)*puVar1)();
    if ((*(byte *)(iVar2 + 0x50) & 0x20) == 0) {
      FUN_000292f0();
    }
    (*(code *)puVar1[2])(uVar5,extraout_ECX,puVar1[5]);
    iVar2 = puVar1[5];
    for (iVar7 = iVar2; iVar7 < iVar3; iVar7 = iVar7 + iVar2) {
      (*(code *)puVar1[2])(uVar5,(iVar7 - iVar2) + iVar4,iVar2);
      uVar6 = (*(code *)puVar1[1])(uVar5);
      (*(code *)puVar1[3])(uVar6,iVar4 + iVar7);
      iVar2 = puVar1[5];
    }
    (*(code *)puVar1[4])(uVar5);
  }
  if (param_2 < iVar3) {
    FUN_0001d300(param_2 + iVar4,iVar3 - param_2);
    return iVar4;
  }
  return iVar4;
}

