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

int pfl_accepting(Plug p,accept_fn_t constructor,accept_ctx_t ctx)

{
  undefined *puVar1;
  PortForwarding *pf;
  plug_function_table *ppVar2;
  Socket ppsVar3;
  char *pcVar4;
  socket_function_table *psVar5;
  
  pf = (PortForwarding *)safemalloc(1,0x3c);
  ppVar2 = p[1];
  pf->hostname = (char *)0x0;
  pf->socksbuf = (char *)0x0;
  pf->backhandle = ppVar2;
  puVar1 = PTR_DAT_000b2398;
  pf->sockssize = 0;
  pf->sockslen = 0;
  pf->buffer = (void *)0x0;
  pf->c = (ssh_channel *)0x0;
  pf->fn = (plug_function_table *)(puVar1 + 0xe58);
  ppsVar3 = (*constructor)((accept_ctx_t)ctx.p,(Plug)pf);
  pf->s = ppsVar3;
  pcVar4 = (*(*ppsVar3)->socket_error)(ppsVar3);
  if (pcVar4 != (char *)0x0) {
    free_portfwd_state(pf);
    return 1;
  }
  ppVar2 = p[3];
  pf->throttle_override = 0;
  pf->throttled = 0;
  pf->ready = 0;
  if (ppVar2 != (plug_function_table *)0x0) {
    psVar5 = *ppsVar3;
    pf->port = 0;
    pf->dynamic = 1;
    (*psVar5->set_frozen)(ppsVar3,0);
    return 0;
  }
  ppVar2 = p[4];
                    /* WARNING: Subroutine does not return */
  pf->dynamic = 0;
  dupstr((char *)ppVar2);
}



undefined4 FUN_00022240(int param_1,code *param_2,undefined4 param_3)

{
  undefined *puVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int *piVar4;
  int iVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  
  puVar2 = (undefined4 *)safemalloc(1,0x3c);
  uVar3 = *(undefined4 *)(param_1 + 4);
  puVar2[8] = 0;
  puVar2[10] = 0;
  puVar2[2] = uVar3;
  puVar1 = PTR_DAT_000b2398;
  puVar2[0xc] = 0;
  puVar2[0xb] = 0;
  puVar2[0xd] = 0;
  puVar2[1] = 0;
  *puVar2 = puVar1 + 0xe58;
  piVar4 = (int *)(*param_2)(param_3,puVar2);
  puVar2[3] = piVar4;
  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);
  if (iVar5 == 0) {
    iVar5 = *(int *)(param_1 + 0xc);
    puVar2[5] = 0;
    puVar2[4] = 0;
    puVar2[6] = 0;
    if (iVar5 != 0) {
      iVar5 = *piVar4;
      puVar2[9] = 0;
      puVar2[7] = 1;
      (**(code **)(iVar5 + 0x18))(piVar4,0);
      return 0;
    }
    uVar3 = *(undefined4 *)(param_1 + 0x10);
    puVar2[7] = 0;
    uVar3 = dupstr(uVar3);
    uVar6 = *(undefined4 *)(param_1 + 0x14);
    uVar7 = *(undefined4 *)(param_1 + 4);
    puVar2[8] = uVar3;
    puVar2[9] = uVar6;
    iVar5 = new_sock_channel(uVar7,puVar2);
    puVar2[1] = iVar5;
    if (iVar5 != 0) {
      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);
      return 0;
    }
  }
  FUN_000221d8(puVar2);
  return 1;
}


lui gp,0xa
addiu gp,gp,-0x7ed0
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x7f68(gp)
sw s2,0x24(sp)
or s2,a0,zero
sw s1,0x20(sp)
li a0,0x1
or s1,a1,zero
sw ra,0x2c(sp)
li a1,0x3c
sw gp,0x10(sp)
sw s0,0x1c(sp)
or s0,a2,zero
bal 0x00020904
_sw s3,0x28(sp)
or a0,s0,zero
lw gp,0x10(sp)
or s0,v0,zero
lw v0,0x4(s2)
or t9,s1,zero
or a1,s0,zero
sw zero,0x20(s0)
sw zero,0x28(s0)
sw v0,0x8(s0)
lw v0,-0x7fd8(gp)
sw zero,0x30(s0)
sw zero,0x2c(s0)
addiu v0,v0,0xe58
sw zero,0x34(s0)
sw zero,0x4(s0)
jalr t9
_sw v0,0x0(s0)
sw v0,0xc(s0)
or a0,v0,zero
or s1,v0,zero
lw v0,0x0(v0)
lw t9,0x1c(v0)
jalr t9
_nop
bne v0,zero,0x000223bc
_lw gp,0x10(sp)
lw s3,0xc(s2)
sw zero,0x14(s0)
sw zero,0x10(s0)
beq s3,zero,0x00022344
_sw zero,0x18(s0)
lw v0,0x0(s1)
li v1,0x1
or a1,zero,zero
sw zero,0x24(s0)
sw v1,0x1c(s0)
or a0,s1,zero
lw t9,0x18(v0)
jalr t9
_or s3,zero,zero
or v0,s3,zero
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7f60(gp)
lw a0,0x10(s2)
bal 0x00020a4c
_sw zero,0x1c(s0)
or a1,s0,zero
lw gp,0x10(sp)
lw v1,0x14(s2)
lw a0,0x4(s2)
sw v0,0x20(s0)
lw t9,-0x7df4(gp)
bal 0x0003f124
_sw v1,0x24(s0)
lw gp,0x10(sp)
beq v0,zero,0x000223bc
_sw v0,0x4(s0)
lw t9,-0x7fcc(gp)
or a3,s1,zero
lw a2,0x24(s0)
or a0,v0,zero
addiu t9,t9,0x2100
bal 0x00022100
_lw a1,0x20(s0)
or v0,s3,zero
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7fcc(gp)
or a0,s0,zero
addiu t9,t9,0x21d8
bal 0x000221d8
_li s3,0x1
or v0,s3,zero
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "undefined4 FUN_00022240(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_00022240(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}" type_identifier (function_declarator "FUN_00022240(int param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (expression_statement "puVar2 = (undefined4 *)safemalloc(1,0x3c);" (assignment_expression "puVar2 = (undefined4 *)safemalloc(1,0x3c)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 4);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 4)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[10] = 0;" (assignment_expression "puVar2[10] = 0" (subscript_expression "puVar2[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[2] = uVar3;" (assignment_expression "puVar2[2] = uVar3" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = PTR_DAT_000b2398;" (assignment_expression "puVar1 = PTR_DAT_000b2398" identifier = identifier) ;) (expression_statement "puVar2[0xc] = 0;" (assignment_expression "puVar2[0xc] = 0" (subscript_expression "puVar2[0xc]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[0xb] = 0;" (assignment_expression "puVar2[0xb] = 0" (subscript_expression "puVar2[0xb]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[0xd] = 0;" (assignment_expression "puVar2[0xd] = 0" (subscript_expression "puVar2[0xd]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar2 = puVar1 + 0xe58;" (assignment_expression "*puVar2 = puVar1 + 0xe58" (pointer_expression "*puVar2" * identifier) = (binary_expression "puVar1 + 0xe58" identifier + number_literal)) ;) (expression_statement "piVar4 = (int *)(*param_2)(param_3,puVar2);" (assignment_expression "piVar4 = (int *)(*param_2)(param_3,puVar2)" identifier = (cast_expression "(int *)(*param_2)(param_3,puVar2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*param_2)(param_3,puVar2)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3,puVar2)" ( identifier , identifier ))))) ;) (expression_statement "puVar2[3] = piVar4;" (assignment_expression "puVar2[3] = piVar4" (subscript_expression "puVar2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);" (assignment_expression "iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4)" identifier = (call_expression "(**(code **)(*piVar4 + 0x1c))(piVar4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x1c))" ( (pointer_expression "**(code **)(*piVar4 + 0x1c)" * (pointer_expression "*(code **)(*piVar4 + 0x1c)" * (cast_expression "(code **)(*piVar4 + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x1c)" ( (binary_expression "*piVar4 + 0x1c" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(piVar4)" ( identifier )))) ;) (if_statement "if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "puVar2[5] = 0;" (assignment_expression "puVar2[5] = 0" (subscript_expression "puVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[4] = 0;" (assignment_expression "puVar2[4] = 0" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[6] = 0;" (assignment_expression "puVar2[6] = 0" (subscript_expression "puVar2[6]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }" { (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "puVar2[9] = 0;" (assignment_expression "puVar2[9] = 0" (subscript_expression "puVar2[9]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[7] = 1;" (assignment_expression "puVar2[7] = 1" (subscript_expression "puVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "(**(code **)(iVar5 + 0x18))(piVar4,0);" (call_expression "(**(code **)(iVar5 + 0x18))(piVar4,0)" (parenthesized_expression "(**(code **)(iVar5 + 0x18))" ( (pointer_expression "**(code **)(iVar5 + 0x18)" * (pointer_expression "*(code **)(iVar5 + 0x18)" * (cast_expression "(code **)(iVar5 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar5 + 0x18)" ( (binary_expression "iVar5 + 0x18" identifier + number_literal) ))))) )) (argument_list "(piVar4,0)" ( identifier , number_literal ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 0x10);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "puVar2[7] = 0;" (assignment_expression "puVar2[7] = 0" (subscript_expression "puVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar3 = dupstr(uVar3);" (assignment_expression "uVar3 = dupstr(uVar3)" identifier = (call_expression "dupstr(uVar3)" identifier (argument_list "(uVar3)" ( identifier )))) ;) (expression_statement "uVar6 = *(undefined4 *)(param_1 + 0x14);" (assignment_expression "uVar6 = *(undefined4 *)(param_1 + 0x14)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar7 = *(undefined4 *)(param_1 + 4);" (assignment_expression "uVar7 = *(undefined4 *)(param_1 + 4)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar2[8] = uVar3;" (assignment_expression "puVar2[8] = uVar3" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2[9] = uVar6;" (assignment_expression "puVar2[9] = uVar6" (subscript_expression "puVar2[9]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = new_sock_channel(uVar7,puVar2);" (assignment_expression "iVar5 = new_sock_channel(uVar7,puVar2)" identifier = (call_expression "new_sock_channel(uVar7,puVar2)" identifier (argument_list "(uVar7,puVar2)" ( identifier , identifier )))) ;) (expression_statement "puVar2[1] = iVar5;" (assignment_expression "puVar2[1] = iVar5" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }" { (expression_statement "FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);" (call_expression "FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4)" identifier (argument_list "(iVar5,puVar2[8],puVar2[9],piVar4)" ( identifier , (subscript_expression "puVar2[8]" identifier [ number_literal ]) , (subscript_expression "puVar2[9]" identifier [ number_literal ]) , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "FUN_000221d8(puVar2);" (call_expression "FUN_000221d8(puVar2)" identifier (argument_list "(puVar2)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint pfl_accepting(Plug p,accept_fn_t constructor,accept_ctx_t ctx)\n\n{\n  undefined *puVar1;\n  PortForwarding *pf;\n  plug_function_table *ppVar2;\n  Socket ppsVar3;\n  char *pcVar4;\n  socket_function_table *psVar5;\n  \n  pf = (PortForwarding *)safemalloc(1,0x3c);\n  ppVar2 = p[1];\n  pf->hostname = (char *)0x0;\n  pf->socksbuf = (char *)0x0;\n  pf->backhandle = ppVar2;\n  puVar1 = PTR_DAT_000b2398;\n  pf->sockssize = 0;\n  pf->sockslen = 0;\n  pf->buffer = (void *)0x0;\n  pf->c = (ssh_channel *)0x0;\n  pf->fn = (plug_function_table *)(puVar1 + 0xe58);\n  ppsVar3 = (*constructor)((accept_ctx_t)ctx.p,(Plug)pf);\n  pf->s = ppsVar3;\n  pcVar4 = (*(*ppsVar3)->socket_error)(ppsVar3);\n  if (pcVar4 != (char *)0x0) {\n    free_portfwd_state(pf);\n    return 1;\n  }\n  ppVar2 = p[3];\n  pf->throttle_override = 0;\n  pf->throttled = 0;\n  pf->ready = 0;\n  if (ppVar2 != (plug_function_table *)0x0) {\n    psVar5 = *ppsVar3;\n    pf->port = 0;\n    pf->dynamic = 1;\n    (*psVar5->set_frozen)(ppsVar3,0);\n    return 0;\n  }\n  ppVar2 = p[4];\n                    /* WARNING: Subroutine does not return */\n  pf->dynamic = 0;\n  dupstr((char *)ppVar2);\n}\n\n" comment (function_definition "int pfl_accepting(Plug p,accept_fn_t constructor,accept_ctx_t ctx)\n\n{\n  undefined *puVar1;\n  PortForwarding *pf;\n  plug_function_table *ppVar2;\n  Socket ppsVar3;\n  char *pcVar4;\n  socket_function_table *psVar5;\n  \n  pf = (PortForwarding *)safemalloc(1,0x3c);\n  ppVar2 = p[1];\n  pf->hostname = (char *)0x0;\n  pf->socksbuf = (char *)0x0;\n  pf->backhandle = ppVar2;\n  puVar1 = PTR_DAT_000b2398;\n  pf->sockssize = 0;\n  pf->sockslen = 0;\n  pf->buffer = (void *)0x0;\n  pf->c = (ssh_channel *)0x0;\n  pf->fn = (plug_function_table *)(puVar1 + 0xe58);\n  ppsVar3 = (*constructor)((accept_ctx_t)ctx.p,(Plug)pf);\n  pf->s = ppsVar3;\n  pcVar4 = (*(*ppsVar3)->socket_error)(ppsVar3);\n  if (pcVar4 != (char *)0x0) {\n    free_portfwd_state(pf);\n    return 1;\n  }\n  ppVar2 = p[3];\n  pf->throttle_override = 0;\n  pf->throttled = 0;\n  pf->ready = 0;\n  if (ppVar2 != (plug_function_table *)0x0) {\n    psVar5 = *ppsVar3;\n    pf->port = 0;\n    pf->dynamic = 1;\n    (*psVar5->set_frozen)(ppsVar3,0);\n    return 0;\n  }\n  ppVar2 = p[4];\n                    /* WARNING: Subroutine does not return */\n  pf->dynamic = 0;\n  dupstr((char *)ppVar2);\n}" primitive_type (function_declarator "pfl_accepting(Plug p,accept_fn_t constructor,accept_ctx_t ctx)" identifier (parameter_list "(Plug p,accept_fn_t constructor,accept_ctx_t ctx)" ( (parameter_declaration "Plug p" type_identifier identifier) , (parameter_declaration "accept_fn_t constructor" type_identifier identifier) , (parameter_declaration "accept_ctx_t ctx" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  PortForwarding *pf;\n  plug_function_table *ppVar2;\n  Socket ppsVar3;\n  char *pcVar4;\n  socket_function_table *psVar5;\n  \n  pf = (PortForwarding *)safemalloc(1,0x3c);\n  ppVar2 = p[1];\n  pf->hostname = (char *)0x0;\n  pf->socksbuf = (char *)0x0;\n  pf->backhandle = ppVar2;\n  puVar1 = PTR_DAT_000b2398;\n  pf->sockssize = 0;\n  pf->sockslen = 0;\n  pf->buffer = (void *)0x0;\n  pf->c = (ssh_channel *)0x0;\n  pf->fn = (plug_function_table *)(puVar1 + 0xe58);\n  ppsVar3 = (*constructor)((accept_ctx_t)ctx.p,(Plug)pf);\n  pf->s = ppsVar3;\n  pcVar4 = (*(*ppsVar3)->socket_error)(ppsVar3);\n  if (pcVar4 != (char *)0x0) {\n    free_portfwd_state(pf);\n    return 1;\n  }\n  ppVar2 = p[3];\n  pf->throttle_override = 0;\n  pf->throttled = 0;\n  pf->ready = 0;\n  if (ppVar2 != (plug_function_table *)0x0) {\n    psVar5 = *ppsVar3;\n    pf->port = 0;\n    pf->dynamic = 1;\n    (*psVar5->set_frozen)(ppsVar3,0);\n    return 0;\n  }\n  ppVar2 = p[4];\n                    /* WARNING: Subroutine does not return */\n  pf->dynamic = 0;\n  dupstr((char *)ppVar2);\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "PortForwarding *pf;" type_identifier (pointer_declarator "*pf" * identifier) ;) (declaration "plug_function_table *ppVar2;" type_identifier (pointer_declarator "*ppVar2" * identifier) ;) (declaration "Socket ppsVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "socket_function_table *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (expression_statement "pf = (PortForwarding *)safemalloc(1,0x3c);" (assignment_expression "pf = (PortForwarding *)safemalloc(1,0x3c)" identifier = (cast_expression "(PortForwarding *)safemalloc(1,0x3c)" ( (type_descriptor "PortForwarding *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "ppVar2 = p[1];" (assignment_expression "ppVar2 = p[1]" identifier = (subscript_expression "p[1]" identifier [ number_literal ])) ;) (expression_statement "pf->hostname = (char *)0x0;" (assignment_expression "pf->hostname = (char *)0x0" (field_expression "pf->hostname" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pf->socksbuf = (char *)0x0;" (assignment_expression "pf->socksbuf = (char *)0x0" (field_expression "pf->socksbuf" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pf->backhandle = ppVar2;" (assignment_expression "pf->backhandle = ppVar2" (field_expression "pf->backhandle" identifier -> field_identifier) = identifier) ;) (expression_statement "puVar1 = PTR_DAT_000b2398;" (assignment_expression "puVar1 = PTR_DAT_000b2398" identifier = identifier) ;) (expression_statement "pf->sockssize = 0;" (assignment_expression "pf->sockssize = 0" (field_expression "pf->sockssize" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->sockslen = 0;" (assignment_expression "pf->sockslen = 0" (field_expression "pf->sockslen" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->buffer = (void *)0x0;" (assignment_expression "pf->buffer = (void *)0x0" (field_expression "pf->buffer" identifier -> field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pf->c = (ssh_channel *)0x0;" (assignment_expression "pf->c = (ssh_channel *)0x0" (field_expression "pf->c" identifier -> field_identifier) = (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pf->fn = (plug_function_table *)(puVar1 + 0xe58);" (assignment_expression "pf->fn = (plug_function_table *)(puVar1 + 0xe58)" (field_expression "pf->fn" identifier -> field_identifier) = (cast_expression "(plug_function_table *)(puVar1 + 0xe58)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 0xe58)" ( (binary_expression "puVar1 + 0xe58" identifier + number_literal) )))) ;) (expression_statement "ppsVar3 = (*constructor)((accept_ctx_t)ctx.p,(Plug)pf);" (assignment_expression "ppsVar3 = (*constructor)((accept_ctx_t)ctx.p,(Plug)pf)" identifier = (call_expression "(*constructor)((accept_ctx_t)ctx.p,(Plug)pf)" (parenthesized_expression "(*constructor)" ( (pointer_expression "*constructor" * identifier) )) (argument_list "((accept_ctx_t)ctx.p,(Plug)pf)" ( (cast_expression "(accept_ctx_t)ctx.p" ( (type_descriptor "accept_ctx_t" type_identifier) ) (field_expression "ctx.p" identifier . field_identifier)) , (cast_expression "(Plug)pf" ( (type_descriptor "Plug" type_identifier) ) identifier) )))) ;) (expression_statement "pf->s = ppsVar3;" (assignment_expression "pf->s = ppsVar3" (field_expression "pf->s" identifier -> field_identifier) = identifier) ;) (expression_statement "pcVar4 = (*(*ppsVar3)->socket_error)(ppsVar3);" (assignment_expression "pcVar4 = (*(*ppsVar3)->socket_error)(ppsVar3)" identifier = (call_expression "(*(*ppsVar3)->socket_error)(ppsVar3)" (parenthesized_expression "(*(*ppsVar3)->socket_error)" ( (pointer_expression "*(*ppsVar3)->socket_error" * (field_expression "(*ppsVar3)->socket_error" (parenthesized_expression "(*ppsVar3)" ( (pointer_expression "*ppsVar3" * identifier) )) -> field_identifier)) )) (argument_list "(ppsVar3)" ( identifier )))) ;) (if_statement "if (pcVar4 != (char *)0x0) {\n    free_portfwd_state(pf);\n    return 1;\n  }" if (parenthesized_expression "(pcVar4 != (char *)0x0)" ( (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free_portfwd_state(pf);\n    return 1;\n  }" { (expression_statement "free_portfwd_state(pf);" (call_expression "free_portfwd_state(pf)" identifier (argument_list "(pf)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "ppVar2 = p[3];" (assignment_expression "ppVar2 = p[3]" identifier = (subscript_expression "p[3]" identifier [ number_literal ])) ;) (expression_statement "pf->throttle_override = 0;" (assignment_expression "pf->throttle_override = 0" (field_expression "pf->throttle_override" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->throttled = 0;" (assignment_expression "pf->throttled = 0" (field_expression "pf->throttled" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->ready = 0;" (assignment_expression "pf->ready = 0" (field_expression "pf->ready" identifier -> field_identifier) = number_literal) ;) (if_statement "if (ppVar2 != (plug_function_table *)0x0) {\n    psVar5 = *ppsVar3;\n    pf->port = 0;\n    pf->dynamic = 1;\n    (*psVar5->set_frozen)(ppsVar3,0);\n    return 0;\n  }" if (parenthesized_expression "(ppVar2 != (plug_function_table *)0x0)" ( (binary_expression "ppVar2 != (plug_function_table *)0x0" identifier != (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    psVar5 = *ppsVar3;\n    pf->port = 0;\n    pf->dynamic = 1;\n    (*psVar5->set_frozen)(ppsVar3,0);\n    return 0;\n  }" { (expression_statement "psVar5 = *ppsVar3;" (assignment_expression "psVar5 = *ppsVar3" identifier = (pointer_expression "*ppsVar3" * identifier)) ;) (expression_statement "pf->port = 0;" (assignment_expression "pf->port = 0" (field_expression "pf->port" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->dynamic = 1;" (assignment_expression "pf->dynamic = 1" (field_expression "pf->dynamic" identifier -> field_identifier) = number_literal) ;) (expression_statement "(*psVar5->set_frozen)(ppsVar3,0);" (call_expression "(*psVar5->set_frozen)(ppsVar3,0)" (parenthesized_expression "(*psVar5->set_frozen)" ( (pointer_expression "*psVar5->set_frozen" * (field_expression "psVar5->set_frozen" identifier -> field_identifier)) )) (argument_list "(ppsVar3,0)" ( identifier , number_literal ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "ppVar2 = p[4];" (assignment_expression "ppVar2 = p[4]" identifier = (subscript_expression "p[4]" identifier [ number_literal ])) ;) comment (expression_statement "pf->dynamic = 0;" (assignment_expression "pf->dynamic = 0" (field_expression "pf->dynamic" identifier -> field_identifier) = number_literal) ;) (expression_statement "dupstr((char *)ppVar2);" (call_expression "dupstr((char *)ppVar2)" identifier (argument_list "((char *)ppVar2)" ( (cast_expression "(char *)ppVar2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) })))
(translation_unit "undefined4 FUN_00022240(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_00022240(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}" type_identifier (function_declarator "FUN_00022240(int param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (expression_statement "puVar2 = (undefined4 *)safemalloc(1,0x3c);" (assignment_expression "puVar2 = (undefined4 *)safemalloc(1,0x3c)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 4);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 4)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[10] = 0;" (assignment_expression "puVar2[10] = 0" (subscript_expression "puVar2[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[2] = uVar3;" (assignment_expression "puVar2[2] = uVar3" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = PTR_DAT_000b2398;" (assignment_expression "puVar1 = PTR_DAT_000b2398" identifier = identifier) ;) (expression_statement "puVar2[0xc] = 0;" (assignment_expression "puVar2[0xc] = 0" (subscript_expression "puVar2[0xc]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[0xb] = 0;" (assignment_expression "puVar2[0xb] = 0" (subscript_expression "puVar2[0xb]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[0xd] = 0;" (assignment_expression "puVar2[0xd] = 0" (subscript_expression "puVar2[0xd]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar2 = puVar1 + 0xe58;" (assignment_expression "*puVar2 = puVar1 + 0xe58" (pointer_expression "*puVar2" * identifier) = (binary_expression "puVar1 + 0xe58" identifier + number_literal)) ;) (expression_statement "piVar4 = (int *)(*param_2)(param_3,puVar2);" (assignment_expression "piVar4 = (int *)(*param_2)(param_3,puVar2)" identifier = (cast_expression "(int *)(*param_2)(param_3,puVar2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*param_2)(param_3,puVar2)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3,puVar2)" ( identifier , identifier ))))) ;) (expression_statement "puVar2[3] = piVar4;" (assignment_expression "puVar2[3] = piVar4" (subscript_expression "puVar2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);" (assignment_expression "iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4)" identifier = (call_expression "(**(code **)(*piVar4 + 0x1c))(piVar4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x1c))" ( (pointer_expression "**(code **)(*piVar4 + 0x1c)" * (pointer_expression "*(code **)(*piVar4 + 0x1c)" * (cast_expression "(code **)(*piVar4 + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x1c)" ( (binary_expression "*piVar4 + 0x1c" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(piVar4)" ( identifier )))) ;) (if_statement "if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "puVar2[5] = 0;" (assignment_expression "puVar2[5] = 0" (subscript_expression "puVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[4] = 0;" (assignment_expression "puVar2[4] = 0" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[6] = 0;" (assignment_expression "puVar2[6] = 0" (subscript_expression "puVar2[6]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }" { (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "puVar2[9] = 0;" (assignment_expression "puVar2[9] = 0" (subscript_expression "puVar2[9]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[7] = 1;" (assignment_expression "puVar2[7] = 1" (subscript_expression "puVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "(**(code **)(iVar5 + 0x18))(piVar4,0);" (call_expression "(**(code **)(iVar5 + 0x18))(piVar4,0)" (parenthesized_expression "(**(code **)(iVar5 + 0x18))" ( (pointer_expression "**(code **)(iVar5 + 0x18)" * (pointer_expression "*(code **)(iVar5 + 0x18)" * (cast_expression "(code **)(iVar5 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar5 + 0x18)" ( (binary_expression "iVar5 + 0x18" identifier + number_literal) ))))) )) (argument_list "(piVar4,0)" ( identifier , number_literal ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 0x10);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "puVar2[7] = 0;" (assignment_expression "puVar2[7] = 0" (subscript_expression "puVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar3 = dupstr(uVar3);" (assignment_expression "uVar3 = dupstr(uVar3)" identifier = (call_expression "dupstr(uVar3)" identifier (argument_list "(uVar3)" ( identifier )))) ;) (expression_statement "uVar6 = *(undefined4 *)(param_1 + 0x14);" (assignment_expression "uVar6 = *(undefined4 *)(param_1 + 0x14)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar7 = *(undefined4 *)(param_1 + 4);" (assignment_expression "uVar7 = *(undefined4 *)(param_1 + 4)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar2[8] = uVar3;" (assignment_expression "puVar2[8] = uVar3" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2[9] = uVar6;" (assignment_expression "puVar2[9] = uVar6" (subscript_expression "puVar2[9]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = new_sock_channel(uVar7,puVar2);" (assignment_expression "iVar5 = new_sock_channel(uVar7,puVar2)" identifier = (call_expression "new_sock_channel(uVar7,puVar2)" identifier (argument_list "(uVar7,puVar2)" ( identifier , identifier )))) ;) (expression_statement "puVar2[1] = iVar5;" (assignment_expression "puVar2[1] = iVar5" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }" { (expression_statement "FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);" (call_expression "FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4)" identifier (argument_list "(iVar5,puVar2[8],puVar2[9],piVar4)" ( identifier , (subscript_expression "puVar2[8]" identifier [ number_literal ]) , (subscript_expression "puVar2[9]" identifier [ number_literal ]) , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "FUN_000221d8(puVar2);" (call_expression "FUN_000221d8(puVar2)" identifier (argument_list "(puVar2)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , LIT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , (subscript_expression IDENT [ LIT ]) , IDENT ))) ;) (return_statement return LIT ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00022240(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00022240(int param_1,code *param_2,undefined4 param_3)" (identifier "FUN_00022240") (parameter_list "(int param_1,code *param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "code *param_2" (type_identifier "code") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  \n  puVar2 = (undefined4 *)safemalloc(1,0x3c);\n  uVar3 = *(undefined4 *)(param_1 + 4);\n  puVar2[8] = 0;\n  puVar2[10] = 0;\n  puVar2[2] = uVar3;\n  puVar1 = PTR_DAT_000b2398;\n  puVar2[0xc] = 0;\n  puVar2[0xb] = 0;\n  puVar2[0xd] = 0;\n  puVar2[1] = 0;\n  *puVar2 = puVar1 + 0xe58;\n  piVar4 = (int *)(*param_2)(param_3,puVar2);\n  puVar2[3] = piVar4;\n  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n  if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }\n  FUN_000221d8(puVar2);\n  return 1;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "undefined4 uVar7;" (type_identifier "undefined4") (identifier "uVar7") (; ";")) (expression_statement "puVar2 = (undefined4 *)safemalloc(1,0x3c);" (assignment_expression "puVar2 = (undefined4 *)safemalloc(1,0x3c)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)safemalloc(1,0x3c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safemalloc(1,0x3c)" (identifier "safemalloc") (argument_list "(1,0x3c)" (( "(") (number_literal "1") (, ",") (number_literal "0x3c") () ")"))))) (; ";")) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 4);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 4)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" (identifier "puVar2") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[10] = 0;" (assignment_expression "puVar2[10] = 0" (subscript_expression "puVar2[10]" (identifier "puVar2") ([ "[") (number_literal "10") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[2] = uVar3;" (assignment_expression "puVar2[2] = uVar3" (subscript_expression "puVar2[2]" (identifier "puVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "puVar1 = PTR_DAT_000b2398;" (assignment_expression "puVar1 = PTR_DAT_000b2398" (identifier "puVar1") (= "=") (identifier "PTR_DAT_000b2398")) (; ";")) (expression_statement "puVar2[0xc] = 0;" (assignment_expression "puVar2[0xc] = 0" (subscript_expression "puVar2[0xc]" (identifier "puVar2") ([ "[") (number_literal "0xc") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[0xb] = 0;" (assignment_expression "puVar2[0xb] = 0" (subscript_expression "puVar2[0xb]" (identifier "puVar2") ([ "[") (number_literal "0xb") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[0xd] = 0;" (assignment_expression "puVar2[0xd] = 0" (subscript_expression "puVar2[0xd]" (identifier "puVar2") ([ "[") (number_literal "0xd") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar2 = puVar1 + 0xe58;" (assignment_expression "*puVar2 = puVar1 + 0xe58" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (binary_expression "puVar1 + 0xe58" (identifier "puVar1") (+ "+") (number_literal "0xe58"))) (; ";")) (expression_statement "piVar4 = (int *)(*param_2)(param_3,puVar2);" (assignment_expression "piVar4 = (int *)(*param_2)(param_3,puVar2)" (identifier "piVar4") (= "=") (cast_expression "(int *)(*param_2)(param_3,puVar2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*param_2)(param_3,puVar2)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(param_3,puVar2)" (( "(") (identifier "param_3") (, ",") (identifier "puVar2") () ")"))))) (; ";")) (expression_statement "puVar2[3] = piVar4;" (assignment_expression "puVar2[3] = piVar4" (subscript_expression "puVar2[3]" (identifier "puVar2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "piVar4")) (; ";")) (expression_statement "iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);" (assignment_expression "iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4)" (identifier "iVar5") (= "=") (call_expression "(**(code **)(*piVar4 + 0x1c))(piVar4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x1c))" (( "(") (pointer_expression "**(code **)(*piVar4 + 0x1c)" (* "*") (pointer_expression "*(code **)(*piVar4 + 0x1c)" (* "*") (cast_expression "(code **)(*piVar4 + 0x1c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar4 + 0x1c)" (( "(") (binary_expression "*piVar4 + 0x1c" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "0x1c")) () ")"))))) () ")")) (argument_list "(piVar4)" (( "(") (identifier "piVar4") () ")")))) (; ";")) (if_statement "if (iVar5 == 0) {\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0xc);\n    puVar2[5] = 0;\n    puVar2[4] = 0;\n    puVar2[6] = 0;\n    if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }\n    uVar3 = *(undefined4 *)(param_1 + 0x10);\n    puVar2[7] = 0;\n    uVar3 = dupstr(uVar3);\n    uVar6 = *(undefined4 *)(param_1 + 0x14);\n    uVar7 = *(undefined4 *)(param_1 + 4);\n    puVar2[8] = uVar3;\n    puVar2[9] = uVar6;\n    iVar5 = new_sock_channel(uVar7,puVar2);\n    puVar2[1] = iVar5;\n    if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }\n  }" ({ "{") (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "puVar2[5] = 0;" (assignment_expression "puVar2[5] = 0" (subscript_expression "puVar2[5]" (identifier "puVar2") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[4] = 0;" (assignment_expression "puVar2[4] = 0" (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[6] = 0;" (assignment_expression "puVar2[6] = 0" (subscript_expression "puVar2[6]" (identifier "puVar2") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar5 != 0) {\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar5 != 0)" (( "(") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar5 = *piVar4;\n      puVar2[9] = 0;\n      puVar2[7] = 1;\n      (**(code **)(iVar5 + 0x18))(piVar4,0);\n      return 0;\n    }" ({ "{") (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" (identifier "iVar5") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (expression_statement "puVar2[9] = 0;" (assignment_expression "puVar2[9] = 0" (subscript_expression "puVar2[9]" (identifier "puVar2") ([ "[") (number_literal "9") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[7] = 1;" (assignment_expression "puVar2[7] = 1" (subscript_expression "puVar2[7]" (identifier "puVar2") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "(**(code **)(iVar5 + 0x18))(piVar4,0);" (call_expression "(**(code **)(iVar5 + 0x18))(piVar4,0)" (parenthesized_expression "(**(code **)(iVar5 + 0x18))" (( "(") (pointer_expression "**(code **)(iVar5 + 0x18)" (* "*") (pointer_expression "*(code **)(iVar5 + 0x18)" (* "*") (cast_expression "(code **)(iVar5 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar5 + 0x18)" (( "(") (binary_expression "iVar5 + 0x18" (identifier "iVar5") (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(piVar4,0)" (( "(") (identifier "piVar4") (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 0x10);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 0x10)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "puVar2[7] = 0;" (assignment_expression "puVar2[7] = 0" (subscript_expression "puVar2[7]" (identifier "puVar2") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = dupstr(uVar3);" (assignment_expression "uVar3 = dupstr(uVar3)" (identifier "uVar3") (= "=") (call_expression "dupstr(uVar3)" (identifier "dupstr") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")")))) (; ";")) (expression_statement "uVar6 = *(undefined4 *)(param_1 + 0x14);" (assignment_expression "uVar6 = *(undefined4 *)(param_1 + 0x14)" (identifier "uVar6") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar7 = *(undefined4 *)(param_1 + 4);" (assignment_expression "uVar7 = *(undefined4 *)(param_1 + 4)" (identifier "uVar7") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "puVar2[8] = uVar3;" (assignment_expression "puVar2[8] = uVar3" (subscript_expression "puVar2[8]" (identifier "puVar2") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "puVar2[9] = uVar6;" (assignment_expression "puVar2[9] = uVar6" (subscript_expression "puVar2[9]" (identifier "puVar2") ([ "[") (number_literal "9") (] "]")) (= "=") (identifier "uVar6")) (; ";")) (expression_statement "iVar5 = new_sock_channel(uVar7,puVar2);" (assignment_expression "iVar5 = new_sock_channel(uVar7,puVar2)" (identifier "iVar5") (= "=") (call_expression "new_sock_channel(uVar7,puVar2)" (identifier "new_sock_channel") (argument_list "(uVar7,puVar2)" (( "(") (identifier "uVar7") (, ",") (identifier "puVar2") () ")")))) (; ";")) (expression_statement "puVar2[1] = iVar5;" (assignment_expression "puVar2[1] = iVar5" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar5")) (; ";")) (if_statement "if (iVar5 != 0) {\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar5 != 0)" (( "(") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);\n      return 0;\n    }" ({ "{") (expression_statement "FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);" (call_expression "FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4)" (identifier "FUN_00022100") (argument_list "(iVar5,puVar2[8],puVar2[9],piVar4)" (( "(") (identifier "iVar5") (, ",") (subscript_expression "puVar2[8]" (identifier "puVar2") ([ "[") (number_literal "8") (] "]")) (, ",") (subscript_expression "puVar2[9]" (identifier "puVar2") ([ "[") (number_literal "9") (] "]")) (, ",") (identifier "piVar4") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_000221d8(puVar2);" (call_expression "FUN_000221d8(puVar2)" (identifier "FUN_000221d8") (argument_list "(puVar2)" (( "(") (identifier "puVar2") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (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 (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (identifier) (identifier)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (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: (identifier)) right: (number_literal))))))) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (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: (identifier) right: (number_literal))))))) arguments: (argument_list (identifier) (number_literal)))) (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)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (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 (assignment_expression left: (identifier) right: (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 (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (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 (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (subscript_expression argument: (identifier) index: (number_literal)) (subscript_expression argument: (identifier) index: (number_literal)) (identifier)))) (return_statement (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (number_literal)))))

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

{
  undefined *puVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int *piVar4;
  int iVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  
  puVar2 = (undefined4 *)safemalloc(1,0x3c);
  uVar3 = *(undefined4 *)(param_1 + 4);
  puVar2[8] = 0;
  puVar2[10] = 0;
  puVar2[2] = uVar3;
  puVar1 = PTR_DAT_000b2398;
  puVar2[0xc] = 0;
  puVar2[0xb] = 0;
  puVar2[0xd] = 0;
  puVar2[1] = 0;
  *puVar2 = puVar1 + 0xe58;
  piVar4 = (int *)(*param_2)(param_3,puVar2);
  puVar2[3] = piVar4;
  iVar5 = (**(code **)(*piVar4 + 0x1c))(piVar4);
  if (iVar5 == 0) {
    iVar5 = *(int *)(param_1 + 0xc);
    puVar2[5] = 0;
    puVar2[4] = 0;
    puVar2[6] = 0;
    if (iVar5 != 0) {
      iVar5 = *piVar4;
      puVar2[9] = 0;
      puVar2[7] = 1;
      (**(code **)(iVar5 + 0x18))(piVar4,0);
      return 0;
    }
    uVar3 = *(undefined4 *)(param_1 + 0x10);
    puVar2[7] = 0;
    uVar3 = dupstr(uVar3);
    uVar6 = *(undefined4 *)(param_1 + 0x14);
    uVar7 = *(undefined4 *)(param_1 + 4);
    puVar2[8] = uVar3;
    puVar2[9] = uVar6;
    iVar5 = new_sock_channel(uVar7,puVar2);
    puVar2[1] = iVar5;
    if (iVar5 != 0) {
      FUN_00022100(iVar5,puVar2[8],puVar2[9],piVar4);
      return 0;
    }
  }
  FUN_000221d8(puVar2);
  return 1;
}

