
char * rlogin_init(void *frontend_handle,void **backend_handle,Conf *conf,char *host,int port,
                  char **realhost,int nodelay,int keepalive)

{
                    /* WARNING: Subroutine does not return */
  safemalloc(1,0x2c);
}



int FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,
                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  int iVar3;
  int *piVar4;
  char *pcVar5;
  int iVar6;
  undefined4 *puVar7;
  undefined1 *puVar8;
  undefined4 uVar9;
  
  puVar1 = (undefined4 *)safemalloc(1,0x2c);
  puVar1[8] = param_1;
  puVar1[1] = 0;
  puVar1[2] = 0;
  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;
  uVar2 = conf_get_int(param_3,0x73);
  puVar1[6] = uVar2;
  uVar2 = conf_get_int(param_3,0x74);
  puVar1[4] = 1;
  puVar1[7] = uVar2;
  puVar1[5] = 0;
  puVar1[10] = 0;
  uVar2 = conf_copy(param_3);
  puVar1[9] = uVar2;
  *param_2 = puVar1;
  uVar2 = conf_get_int(param_3,3);
  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);
  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);
  if (iVar3 == 0) {
    if (param_5 < 0) {
      param_5 = 0x201;
    }
    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);
    puVar1[1] = piVar4;
    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);
    if (iVar3 == 0) {
      pcVar5 = (char *)conf_get_str(param_3,9);
      if (*pcVar5 != '\0') {
        safefree(*param_6);
        uVar2 = dupstr(pcVar5);
        *param_6 = uVar2;
        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);
        if (puVar8 != (undefined1 *)0x0) {
          *puVar8 = 0;
        }
      }
      iVar6 = get_remote_username(param_3);
      if (iVar6 == 0) {
        puVar7 = (undefined4 *)new_prompts(puVar1[8]);
        puVar1[10] = puVar7;
        *puVar7 = 1;
        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);
        uVar9 = puVar1[10];
        puVar7[1] = uVar2;
        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);
        add_prompt(uVar9,uVar2,1);
        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);
        if (iVar3 < 0) {
          iVar3 = 0;
        }
        else {
          iVar3 = 0;
          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));
        }
      }
      else {
        FUN_0003fda8(puVar1,iVar6);
        safefree(iVar6);
      }
    }
    return iVar3;
  }
  (*(code *)PTR_sk_addr_free_00111658)(uVar2);
  return iVar3;
}


lui gp,0xe
addiu gp,gp,-0x6e54
addu gp,gp,t9
addiu sp,sp,-0x58
lw t9,-0x7fc4(gp)
sw s5,0x50(sp)
or s5,a0,zero
sw s4,0x4c(sp)
li a0,0x1
or s4,a1,zero
sw ra,0x54(sp)
li a1,0x2c
sw gp,0x28(sp)
sw s3,0x48(sp)
sw s2,0x44(sp)
or s2,a3,zero
sw s1,0x40(sp)
or s1,a2,zero
sw s0,0x3c(sp)
bal 0x00039514
_lw s3,0x68(sp)
li a1,0x73
lw gp,0x28(sp)
or s0,v0,zero
sw s5,0x20(v0)
or a0,s1,zero
sw zero,0x4(v0)
sw zero,0x8(v0)
lw v0,-0x7fd8(gp)
lw t9,-0x7efc(gp)
addiu v0,v0,-0xb38
bal 0x000254b0
_sw v0,0x0(s0)
li a1,0x74
lw gp,0x28(sp)
or a0,s1,zero
lw t9,-0x7efc(gp)
bal 0x000254b0
_sw v0,0x18(s0)
li v1,0x1
lw gp,0x28(sp)
or a0,s1,zero
sw v1,0x10(s0)
sw v0,0x1c(s0)
sw zero,0x14(s0)
lw t9,-0x7cbc(gp)
bal 0x0002545c
_sw zero,0x28(s0)
li a1,0x3
lw gp,0x28(sp)
or a0,s1,zero
sw v0,0x24(s0)
lw t9,-0x7efc(gp)
bal 0x000254b0
_sw s0,0x0(s4)
or a0,s2,zero
lw gp,0x28(sp)
or a3,s1,zero
lw a2,0x6c(sp)
or a1,s3,zero
lw v1,-0x7fb8(gp)
lw t9,-0x7c60(gp)
addiu v1,v1,-0x76d0
sw v1,0x18(sp)
lw v1,0x20(s0)
sw v0,0x10(sp)
bal 0x0003e0bc
_sw v1,0x14(sp)
lw gp,0x28(sp)
or a0,v0,zero
lw t9,-0x7c5c(gp)
jalr t9
_or s4,v0,zero
bne v0,zero,0x000402c4
_lw gp,0x28(sp)
bltz s3,0x000402bc
_nop
lw v0,0x6c(sp)
li a3,0x1
lw t9,-0x7c54(gp)
or a0,s4,zero
or a2,s3,zero
lw a1,0x0(v0)
lw v0,0x74(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw v0,0x18(sp)
sw zero,0x10(sp)
lw v0,0x70(sp)
bal 0x0003e2d4
_sw v0,0x14(sp)
sw v0,0x4(s0)
or a0,v0,zero
lw v0,0x0(v0)
lw t9,0x1c(v0)
jalr t9
_nop
lw gp,0x28(sp)
beq v0,zero,0x000402fc
_or s2,v0,zero
lw ra,0x54(sp)
or v0,s2,zero
lw s5,0x50(sp)
lw s4,0x4c(sp)
lw s3,0x48(sp)
lw s2,0x44(sp)
lw s1,0x40(sp)
lw s0,0x3c(sp)
jr ra
_addiu sp,sp,0x58
b 0x00040238
_li s3,0x201
lw t9,-0x7c58(gp)
or a0,s4,zero
jalr t9
_or s2,v0,zero
or v0,s2,zero
lw ra,0x54(sp)
lw s5,0x50(sp)
lw s4,0x4c(sp)
lw s3,0x48(sp)
lw s2,0x44(sp)
lw s1,0x40(sp)
lw s0,0x3c(sp)
jr ra
_addiu sp,sp,0x58
lw t9,-0x7eac(gp)
li a1,0x9
bal 0x000256e0
_or a0,s1,zero
lb v1,0x0(v0)
bne v1,zero,0x000403ec
_lw gp,0x28(sp)
lw t9,-0x7bc8(gp)
bal 0x00042020
_or a0,s1,zero
beq v0,zero,0x00040360
_lw gp,0x28(sp)
lw t9,-0x7ca0(gp)
or a1,v0,zero
or a0,s0,zero
addiu t9,t9,-0x258
bal 0x0003fda8
_sw v0,0x34(sp)
lw gp,0x28(sp)
lw v0,0x34(sp)
lw t9,-0x7fc0(gp)
bal 0x0003a244
_or a0,v0,zero
b 0x00040298
_lw ra,0x54(sp)
lw t9,-0x7bc4(gp)
bal 0x000395f4
_lw a0,0x20(s0)
lw gp,0x28(sp)
or s1,v0,zero
sw v0,0x28(s0)
li v0,0x1
sw v0,0x0(s1)
lw a0,-0x7fb8(gp)
lw t9,-0x7f94(gp)
bal 0x0003965c
_addiu a0,a0,-0x76bc
lw gp,0x28(sp)
lw s2,0x28(s0)
sw v0,0x4(s1)
lw a0,-0x7fb8(gp)
lw t9,-0x7f94(gp)
bal 0x0003965c
_addiu a0,a0,-0x76a8
li a2,0x1
lw gp,0x28(sp)
or a1,v0,zero
lw t9,-0x7bc0(gp)
bal 0x00039c50
_or a0,s2,zero
or a2,zero,zero
lw gp,0x28(sp)
or a1,zero,zero
lw t9,-0x7bd0(gp)
jalr t9
_lw a0,0x28(s0)
bgez v0,0x00040440
_lw gp,0x28(sp)
b 0x00040294
_or s2,zero,zero
lw t9,-0x7fc0(gp)
sw v0,0x34(sp)
lw v0,0x6c(sp)
bal 0x0003a244
_lw a0,0x0(v0)
lw gp,0x28(sp)
lw v0,0x34(sp)
lw t9,-0x7f94(gp)
bal 0x0003965c
_or a0,v0,zero
li a1,0x3a
lw gp,0x28(sp)
or a0,v0,zero
lw v1,0x6c(sp)
lw t9,-0x7be4(gp)
bal 0x00038c8c
_sw v0,0x0(v1)
beq v0,zero,0x00040318
_lw gp,0x28(sp)
b 0x00040318
_sb zero,0x0(v0)
lw v0,0x28(s0)
or a0,s0,zero
lw t9,-0x7ca0(gp)
or s2,zero,zero
lw v0,0x18(v0)
addiu t9,t9,-0x258
lw v0,0x0(v0)
bal 0x0003fda8
_lw a1,0x8(v0)
b 0x00040298
_lw ra,0x54(sp)
(translation_unit "int FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}\n\n" (function_definition "int FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "undefined4 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 param_8" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined1 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 uVar9;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0x2c);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0x2c)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x2c)" identifier (argument_list "(1,0x2c)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[8] = param_1;" (assignment_expression "puVar1[8] = param_1" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;" (assignment_expression "*puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38" (pointer_expression "*puVar1" * identifier) = (binary_expression "PTR_PTR_s_3des_cbc_001112d8 + -0xb38" identifier + number_literal)) ;) (expression_statement "uVar2 = conf_get_int(param_3,0x73);" (assignment_expression "uVar2 = conf_get_int(param_3,0x73)" identifier = (call_expression "conf_get_int(param_3,0x73)" identifier (argument_list "(param_3,0x73)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[6] = uVar2;" (assignment_expression "puVar1[6] = uVar2" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar2 = conf_get_int(param_3,0x74);" (assignment_expression "uVar2 = conf_get_int(param_3,0x74)" identifier = (call_expression "conf_get_int(param_3,0x74)" identifier (argument_list "(param_3,0x74)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[4] = 1;" (assignment_expression "puVar1[4] = 1" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[7] = uVar2;" (assignment_expression "puVar1[7] = uVar2" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[10] = 0;" (assignment_expression "puVar1[10] = 0" (subscript_expression "puVar1[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar2 = conf_copy(param_3);" (assignment_expression "uVar2 = conf_copy(param_3)" identifier = (call_expression "conf_copy(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "puVar1[9] = uVar2;" (assignment_expression "puVar1[9] = uVar2" (subscript_expression "puVar1[9]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "uVar2 = conf_get_int(param_3,3);" (assignment_expression "uVar2 = conf_get_int(param_3,3)" identifier = (call_expression "conf_get_int(param_3,3)" identifier (argument_list "(param_3,3)" ( identifier , number_literal )))) ;) (expression_statement "uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);" (assignment_expression "uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" identifier = (call_expression "name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" identifier (argument_list "(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" ( identifier , identifier , identifier , identifier , identifier , (subscript_expression "puVar1[8]" identifier [ number_literal ]) , (binary_expression "PTR_DAT_001112f8 + -0x76d0" identifier + number_literal) )))) ;) (expression_statement "iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);" (assignment_expression "iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2)" identifier = (call_expression "(*(code *)PTR_sk_addr_error_00111654)(uVar2)" (parenthesized_expression "(*(code *)PTR_sk_addr_error_00111654)" ( (pointer_expression "*(code *)PTR_sk_addr_error_00111654" * (cast_expression "(code *)PTR_sk_addr_error_00111654" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier )))) ;) (if_statement "if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }" { (if_statement "if (param_5 < 0) {\n      param_5 = 0x201;\n    }" if (parenthesized_expression "(param_5 < 0)" ( (binary_expression "param_5 < 0" identifier < number_literal) )) (compound_statement "{\n      param_5 = 0x201;\n    }" { (expression_statement "param_5 = 0x201;" (assignment_expression "param_5 = 0x201" identifier = number_literal) ;) })) (expression_statement "piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);" (assignment_expression "piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" identifier = (cast_expression "(int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" identifier (argument_list "(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" ( identifier , (pointer_expression "*param_6" * identifier) , identifier , number_literal , number_literal , identifier , identifier , identifier , identifier ))))) ;) (expression_statement "puVar1[1] = piVar4;" (assignment_expression "puVar1[1] = piVar4" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);" (assignment_expression "iVar3 = (**(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 (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }" { (expression_statement "pcVar5 = (char *)conf_get_str(param_3,9);" (assignment_expression "pcVar5 = (char *)conf_get_str(param_3,9)" identifier = (cast_expression "(char *)conf_get_str(param_3,9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "conf_get_str(param_3,9)" identifier (argument_list "(param_3,9)" ( identifier , number_literal ))))) ;) (if_statement "if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }" if (parenthesized_expression "(*pcVar5 != '\0')" ( (binary_expression "*pcVar5 != '\0'" (pointer_expression "*pcVar5" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }" { (expression_statement "safefree(*param_6);" (call_expression "safefree(*param_6)" identifier (argument_list "(*param_6)" ( (pointer_expression "*param_6" * identifier) ))) ;) (expression_statement "uVar2 = dupstr(pcVar5);" (assignment_expression "uVar2 = dupstr(pcVar5)" identifier = (call_expression "dupstr(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier )))) ;) (expression_statement "*param_6 = uVar2;" (assignment_expression "*param_6 = uVar2" (pointer_expression "*param_6" * identifier) = identifier) ;) (expression_statement "puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);" (assignment_expression "puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a)" identifier = (cast_expression "(undefined1 *)host_strrchr(uVar2,0x3a)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "host_strrchr(uVar2,0x3a)" identifier (argument_list "(uVar2,0x3a)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }" if (parenthesized_expression "(puVar8 != (undefined1 *)0x0)" ( (binary_expression "puVar8 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *puVar8 = 0;\n        }" { (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" * identifier) = number_literal) ;) })) })) (expression_statement "iVar6 = get_remote_username(param_3);" (assignment_expression "iVar6 = get_remote_username(param_3)" identifier = (call_expression "get_remote_username(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }" { (expression_statement "puVar7 = (undefined4 *)new_prompts(puVar1[8]);" (assignment_expression "puVar7 = (undefined4 *)new_prompts(puVar1[8])" identifier = (cast_expression "(undefined4 *)new_prompts(puVar1[8])" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "new_prompts(puVar1[8])" identifier (argument_list "(puVar1[8])" ( (subscript_expression "puVar1[8]" identifier [ number_literal ]) ))))) ;) (expression_statement "puVar1[10] = puVar7;" (assignment_expression "puVar1[10] = puVar7" (subscript_expression "puVar1[10]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar7 = 1;" (assignment_expression "*puVar7 = 1" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);" (assignment_expression "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc)" identifier = (call_expression "dupstr(PTR_DAT_001112f8 + -0x76bc)" identifier (argument_list "(PTR_DAT_001112f8 + -0x76bc)" ( (binary_expression "PTR_DAT_001112f8 + -0x76bc" identifier + number_literal) )))) ;) (expression_statement "uVar9 = puVar1[10];" (assignment_expression "uVar9 = puVar1[10]" identifier = (subscript_expression "puVar1[10]" identifier [ number_literal ])) ;) (expression_statement "puVar7[1] = uVar2;" (assignment_expression "puVar7[1] = uVar2" (subscript_expression "puVar7[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);" (assignment_expression "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8)" identifier = (call_expression "dupstr(PTR_DAT_001112f8 + -0x76a8)" identifier (argument_list "(PTR_DAT_001112f8 + -0x76a8)" ( (binary_expression "PTR_DAT_001112f8 + -0x76a8" identifier + number_literal) )))) ;) (expression_statement "add_prompt(uVar9,uVar2,1);" (call_expression "add_prompt(uVar9,uVar2,1)" identifier (argument_list "(uVar9,uVar2,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);" (assignment_expression "iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0)" identifier = (call_expression "(*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0)" (parenthesized_expression "(*(code *)PTR_get_userpass_input_001116e0)" ( (pointer_expression "*(code *)PTR_get_userpass_input_001116e0" * (cast_expression "(code *)PTR_get_userpass_input_001116e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar1[10],0,0)" ( (subscript_expression "puVar1[10]" identifier [ number_literal ]) , number_literal , number_literal )))) ;) (if_statement "if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n          iVar3 = 0;\n        }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" else (compound_statement "{\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));" (call_expression "FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8))" identifier (argument_list "(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8))" ( identifier , (pointer_expression "*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8)" * (cast_expression "(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(**(int **)(puVar1[10] + 0x18) + 8)" ( (binary_expression "**(int **)(puVar1[10] + 0x18) + 8" (pointer_expression "**(int **)(puVar1[10] + 0x18)" * (pointer_expression "*(int **)(puVar1[10] + 0x18)" * (cast_expression "(int **)(puVar1[10] + 0x18)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1[10] + 0x18)" ( (binary_expression "puVar1[10] + 0x18" (subscript_expression "puVar1[10]" identifier [ number_literal ]) + number_literal) ))))) + number_literal) )))) ))) ;) }))) }) (else_clause "else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" else (compound_statement "{\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" { (expression_statement "FUN_0003fda8(puVar1,iVar6);" (call_expression "FUN_0003fda8(puVar1,iVar6)" identifier (argument_list "(puVar1,iVar6)" ( identifier , identifier ))) ;) (expression_statement "safefree(iVar6);" (call_expression "safefree(iVar6)" identifier (argument_list "(iVar6)" ( identifier ))) ;) }))) })) (return_statement "return iVar3;" return identifier ;) })) (expression_statement "(*(code *)PTR_sk_addr_free_00111658)(uVar2);" (call_expression "(*(code *)PTR_sk_addr_free_00111658)(uVar2)" (parenthesized_expression "(*(code *)PTR_sk_addr_free_00111658)" ( (pointer_expression "*(code *)PTR_sk_addr_free_00111658" * (cast_expression "(code *)PTR_sk_addr_free_00111658" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "char * rlogin_init(void *frontend_handle,void **backend_handle,Conf *conf,char *host,int port,\n                  char **realhost,int nodelay,int keepalive)\n\n{\n                    /* WARNING: Subroutine does not return */\n  safemalloc(1,0x2c);\n}\n\n" (function_definition "char * rlogin_init(void *frontend_handle,void **backend_handle,Conf *conf,char *host,int port,\n                  char **realhost,int nodelay,int keepalive)\n\n{\n                    /* WARNING: Subroutine does not return */\n  safemalloc(1,0x2c);\n}" primitive_type (pointer_declarator "* rlogin_init(void *frontend_handle,void **backend_handle,Conf *conf,char *host,int port,\n                  char **realhost,int nodelay,int keepalive)" * (function_declarator "rlogin_init(void *frontend_handle,void **backend_handle,Conf *conf,char *host,int port,\n                  char **realhost,int nodelay,int keepalive)" identifier (parameter_list "(void *frontend_handle,void **backend_handle,Conf *conf,char *host,int port,\n                  char **realhost,int nodelay,int keepalive)" ( (parameter_declaration "void *frontend_handle" primitive_type (pointer_declarator "*frontend_handle" * identifier)) , (parameter_declaration "void **backend_handle" primitive_type (pointer_declarator "**backend_handle" * (pointer_declarator "*backend_handle" * identifier))) , (parameter_declaration "Conf *conf" type_identifier (pointer_declarator "*conf" * identifier)) , (parameter_declaration "char *host" primitive_type (pointer_declarator "*host" * identifier)) , (parameter_declaration "int port" primitive_type identifier) , (parameter_declaration "char **realhost" primitive_type (pointer_declarator "**realhost" * (pointer_declarator "*realhost" * identifier))) , (parameter_declaration "int nodelay" primitive_type identifier) , (parameter_declaration "int keepalive" primitive_type identifier) )))) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n  safemalloc(1,0x2c);\n}" { comment (expression_statement "safemalloc(1,0x2c);" (call_expression "safemalloc(1,0x2c)" identifier (argument_list "(1,0x2c)" ( number_literal , number_literal ))) ;) })))
(translation_unit "int FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}\n\n" (function_definition "int FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "undefined4 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 param_8" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined1 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 uVar9;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0x2c);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0x2c)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x2c)" identifier (argument_list "(1,0x2c)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[8] = param_1;" (assignment_expression "puVar1[8] = param_1" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;" (assignment_expression "*puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38" (pointer_expression "*puVar1" * identifier) = (binary_expression "PTR_PTR_s_3des_cbc_001112d8 + -0xb38" identifier + number_literal)) ;) (expression_statement "uVar2 = conf_get_int(param_3,0x73);" (assignment_expression "uVar2 = conf_get_int(param_3,0x73)" identifier = (call_expression "conf_get_int(param_3,0x73)" identifier (argument_list "(param_3,0x73)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[6] = uVar2;" (assignment_expression "puVar1[6] = uVar2" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar2 = conf_get_int(param_3,0x74);" (assignment_expression "uVar2 = conf_get_int(param_3,0x74)" identifier = (call_expression "conf_get_int(param_3,0x74)" identifier (argument_list "(param_3,0x74)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[4] = 1;" (assignment_expression "puVar1[4] = 1" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[7] = uVar2;" (assignment_expression "puVar1[7] = uVar2" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[10] = 0;" (assignment_expression "puVar1[10] = 0" (subscript_expression "puVar1[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar2 = conf_copy(param_3);" (assignment_expression "uVar2 = conf_copy(param_3)" identifier = (call_expression "conf_copy(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "puVar1[9] = uVar2;" (assignment_expression "puVar1[9] = uVar2" (subscript_expression "puVar1[9]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "uVar2 = conf_get_int(param_3,3);" (assignment_expression "uVar2 = conf_get_int(param_3,3)" identifier = (call_expression "conf_get_int(param_3,3)" identifier (argument_list "(param_3,3)" ( identifier , number_literal )))) ;) (expression_statement "uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);" (assignment_expression "uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" identifier = (call_expression "name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" identifier (argument_list "(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" ( identifier , identifier , identifier , identifier , identifier , (subscript_expression "puVar1[8]" identifier [ number_literal ]) , (binary_expression "PTR_DAT_001112f8 + -0x76d0" identifier + number_literal) )))) ;) (expression_statement "iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);" (assignment_expression "iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2)" identifier = (call_expression "(*(code *)PTR_sk_addr_error_00111654)(uVar2)" (parenthesized_expression "(*(code *)PTR_sk_addr_error_00111654)" ( (pointer_expression "*(code *)PTR_sk_addr_error_00111654" * (cast_expression "(code *)PTR_sk_addr_error_00111654" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier )))) ;) (if_statement "if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }" { (if_statement "if (param_5 < 0) {\n      param_5 = 0x201;\n    }" if (parenthesized_expression "(param_5 < 0)" ( (binary_expression "param_5 < 0" identifier < number_literal) )) (compound_statement "{\n      param_5 = 0x201;\n    }" { (expression_statement "param_5 = 0x201;" (assignment_expression "param_5 = 0x201" identifier = number_literal) ;) })) (expression_statement "piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);" (assignment_expression "piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" identifier = (cast_expression "(int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" identifier (argument_list "(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" ( identifier , (pointer_expression "*param_6" * identifier) , identifier , number_literal , number_literal , identifier , identifier , identifier , identifier ))))) ;) (expression_statement "puVar1[1] = piVar4;" (assignment_expression "puVar1[1] = piVar4" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);" (assignment_expression "iVar3 = (**(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 (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }" { (expression_statement "pcVar5 = (char *)conf_get_str(param_3,9);" (assignment_expression "pcVar5 = (char *)conf_get_str(param_3,9)" identifier = (cast_expression "(char *)conf_get_str(param_3,9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "conf_get_str(param_3,9)" identifier (argument_list "(param_3,9)" ( identifier , number_literal ))))) ;) (if_statement "if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }" if (parenthesized_expression "(*pcVar5 != '\0')" ( (binary_expression "*pcVar5 != '\0'" (pointer_expression "*pcVar5" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }" { (expression_statement "safefree(*param_6);" (call_expression "safefree(*param_6)" identifier (argument_list "(*param_6)" ( (pointer_expression "*param_6" * identifier) ))) ;) (expression_statement "uVar2 = dupstr(pcVar5);" (assignment_expression "uVar2 = dupstr(pcVar5)" identifier = (call_expression "dupstr(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier )))) ;) (expression_statement "*param_6 = uVar2;" (assignment_expression "*param_6 = uVar2" (pointer_expression "*param_6" * identifier) = identifier) ;) (expression_statement "puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);" (assignment_expression "puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a)" identifier = (cast_expression "(undefined1 *)host_strrchr(uVar2,0x3a)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "host_strrchr(uVar2,0x3a)" identifier (argument_list "(uVar2,0x3a)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }" if (parenthesized_expression "(puVar8 != (undefined1 *)0x0)" ( (binary_expression "puVar8 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *puVar8 = 0;\n        }" { (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" * identifier) = number_literal) ;) })) })) (expression_statement "iVar6 = get_remote_username(param_3);" (assignment_expression "iVar6 = get_remote_username(param_3)" identifier = (call_expression "get_remote_username(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }" { (expression_statement "puVar7 = (undefined4 *)new_prompts(puVar1[8]);" (assignment_expression "puVar7 = (undefined4 *)new_prompts(puVar1[8])" identifier = (cast_expression "(undefined4 *)new_prompts(puVar1[8])" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "new_prompts(puVar1[8])" identifier (argument_list "(puVar1[8])" ( (subscript_expression "puVar1[8]" identifier [ number_literal ]) ))))) ;) (expression_statement "puVar1[10] = puVar7;" (assignment_expression "puVar1[10] = puVar7" (subscript_expression "puVar1[10]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar7 = 1;" (assignment_expression "*puVar7 = 1" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);" (assignment_expression "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc)" identifier = (call_expression "dupstr(PTR_DAT_001112f8 + -0x76bc)" identifier (argument_list "(PTR_DAT_001112f8 + -0x76bc)" ( (binary_expression "PTR_DAT_001112f8 + -0x76bc" identifier + number_literal) )))) ;) (expression_statement "uVar9 = puVar1[10];" (assignment_expression "uVar9 = puVar1[10]" identifier = (subscript_expression "puVar1[10]" identifier [ number_literal ])) ;) (expression_statement "puVar7[1] = uVar2;" (assignment_expression "puVar7[1] = uVar2" (subscript_expression "puVar7[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);" (assignment_expression "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8)" identifier = (call_expression "dupstr(PTR_DAT_001112f8 + -0x76a8)" identifier (argument_list "(PTR_DAT_001112f8 + -0x76a8)" ( (binary_expression "PTR_DAT_001112f8 + -0x76a8" identifier + number_literal) )))) ;) (expression_statement "add_prompt(uVar9,uVar2,1);" (call_expression "add_prompt(uVar9,uVar2,1)" identifier (argument_list "(uVar9,uVar2,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);" (assignment_expression "iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0)" identifier = (call_expression "(*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0)" (parenthesized_expression "(*(code *)PTR_get_userpass_input_001116e0)" ( (pointer_expression "*(code *)PTR_get_userpass_input_001116e0" * (cast_expression "(code *)PTR_get_userpass_input_001116e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar1[10],0,0)" ( (subscript_expression "puVar1[10]" identifier [ number_literal ]) , number_literal , number_literal )))) ;) (if_statement "if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n          iVar3 = 0;\n        }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" else (compound_statement "{\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));" (call_expression "FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8))" identifier (argument_list "(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8))" ( identifier , (pointer_expression "*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8)" * (cast_expression "(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(**(int **)(puVar1[10] + 0x18) + 8)" ( (binary_expression "**(int **)(puVar1[10] + 0x18) + 8" (pointer_expression "**(int **)(puVar1[10] + 0x18)" * (pointer_expression "*(int **)(puVar1[10] + 0x18)" * (cast_expression "(int **)(puVar1[10] + 0x18)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1[10] + 0x18)" ( (binary_expression "puVar1[10] + 0x18" (subscript_expression "puVar1[10]" identifier [ number_literal ]) + number_literal) ))))) + number_literal) )))) ))) ;) }))) }) (else_clause "else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" else (compound_statement "{\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" { (expression_statement "FUN_0003fda8(puVar1,iVar6);" (call_expression "FUN_0003fda8(puVar1,iVar6)" identifier (argument_list "(puVar1,iVar6)" ( identifier , identifier ))) ;) (expression_statement "safefree(iVar6);" (call_expression "safefree(iVar6)" identifier (argument_list "(iVar6)" ( identifier ))) ;) }))) })) (return_statement "return iVar3;" return identifier ;) })) (expression_statement "(*(code *)PTR_sk_addr_free_00111658)(uVar2);" (call_expression "(*(code *)PTR_sk_addr_free_00111658)(uVar2)" (parenthesized_expression "(*(code *)PTR_sk_addr_free_00111658)" ( (pointer_expression "*(code *)PTR_sk_addr_free_00111658" * (cast_expression "(code *)PTR_sk_addr_free_00111658" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * 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 (subscript_expression IDENT [ LIT ]) = IDENT) ;) (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 = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = 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 (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , (subscript_expression IDENT [ LIT ]) , (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , IDENT , LIT , LIT , IDENT , IDENT , 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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (subscript_expression IDENT [ LIT ]) , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) + LIT) )))) ))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) })) (return_statement return IDENT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}" (primitive_type "int") (function_declarator "FUN_00040104(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)" (identifier "FUN_00040104") (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,\n                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 *param_6" (type_identifier "undefined4") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) (, ",") (parameter_declaration "undefined4 param_7" (type_identifier "undefined4") (identifier "param_7")) (, ",") (parameter_declaration "undefined4 param_8" (type_identifier "undefined4") (identifier "param_8")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int *piVar4;\n  char *pcVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined1 *puVar8;\n  undefined4 uVar9;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x2c);\n  puVar1[8] = param_1;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;\n  uVar2 = conf_get_int(param_3,0x73);\n  puVar1[6] = uVar2;\n  uVar2 = conf_get_int(param_3,0x74);\n  puVar1[4] = 1;\n  puVar1[7] = uVar2;\n  puVar1[5] = 0;\n  puVar1[10] = 0;\n  uVar2 = conf_copy(param_3);\n  puVar1[9] = uVar2;\n  *param_2 = puVar1;\n  uVar2 = conf_get_int(param_3,3);\n  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);\n  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);\n  if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }\n  (*(code *)PTR_sk_addr_free_00111658)(uVar2);\n  return iVar3;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined4 *puVar7;" (type_identifier "undefined4") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "undefined1 *puVar8;" (type_identifier "undefined1") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "undefined4 uVar9;" (type_identifier "undefined4") (identifier "uVar9") (; ";")) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0x2c);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0x2c)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)safemalloc(1,0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safemalloc(1,0x2c)" (identifier "safemalloc") (argument_list "(1,0x2c)" (( "(") (number_literal "1") (, ",") (number_literal "0x2c") () ")"))))) (; ";")) (expression_statement "puVar1[8] = param_1;" (assignment_expression "puVar1[8] = param_1" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;" (assignment_expression "*puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (binary_expression "PTR_PTR_s_3des_cbc_001112d8 + -0xb38" (identifier "PTR_PTR_s_3des_cbc_001112d8") (+ "+") (number_literal "-0xb38"))) (; ";")) (expression_statement "uVar2 = conf_get_int(param_3,0x73);" (assignment_expression "uVar2 = conf_get_int(param_3,0x73)" (identifier "uVar2") (= "=") (call_expression "conf_get_int(param_3,0x73)" (identifier "conf_get_int") (argument_list "(param_3,0x73)" (( "(") (identifier "param_3") (, ",") (number_literal "0x73") () ")")))) (; ";")) (expression_statement "puVar1[6] = uVar2;" (assignment_expression "puVar1[6] = uVar2" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = conf_get_int(param_3,0x74);" (assignment_expression "uVar2 = conf_get_int(param_3,0x74)" (identifier "uVar2") (= "=") (call_expression "conf_get_int(param_3,0x74)" (identifier "conf_get_int") (argument_list "(param_3,0x74)" (( "(") (identifier "param_3") (, ",") (number_literal "0x74") () ")")))) (; ";")) (expression_statement "puVar1[4] = 1;" (assignment_expression "puVar1[4] = 1" (subscript_expression "puVar1[4]" (identifier "puVar1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar1[7] = uVar2;" (assignment_expression "puVar1[7] = uVar2" (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[10] = 0;" (assignment_expression "puVar1[10] = 0" (subscript_expression "puVar1[10]" (identifier "puVar1") ([ "[") (number_literal "10") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = conf_copy(param_3);" (assignment_expression "uVar2 = conf_copy(param_3)" (identifier "uVar2") (= "=") (call_expression "conf_copy(param_3)" (identifier "conf_copy") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "puVar1[9] = uVar2;" (assignment_expression "puVar1[9] = uVar2" (subscript_expression "puVar1[9]" (identifier "puVar1") ([ "[") (number_literal "9") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "puVar1")) (; ";")) (expression_statement "uVar2 = conf_get_int(param_3,3);" (assignment_expression "uVar2 = conf_get_int(param_3,3)" (identifier "uVar2") (= "=") (call_expression "conf_get_int(param_3,3)" (identifier "conf_get_int") (argument_list "(param_3,3)" (( "(") (identifier "param_3") (, ",") (number_literal "3") () ")")))) (; ";")) (expression_statement "uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);" (assignment_expression "uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" (identifier "uVar2") (= "=") (call_expression "name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" (identifier "name_lookup") (argument_list "(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0)" (( "(") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (identifier "param_3") (, ",") (identifier "uVar2") (, ",") (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (, ",") (binary_expression "PTR_DAT_001112f8 + -0x76d0" (identifier "PTR_DAT_001112f8") (+ "+") (number_literal "-0x76d0")) () ")")))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);" (assignment_expression "iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_sk_addr_error_00111654)(uVar2)" (parenthesized_expression "(*(code *)PTR_sk_addr_error_00111654)" (( "(") (pointer_expression "*(code *)PTR_sk_addr_error_00111654" (* "*") (cast_expression "(code *)PTR_sk_addr_error_00111654" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sk_addr_error_00111654"))) () ")")) (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_5 < 0) {\n      param_5 = 0x201;\n    }\n    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);\n    puVar1[1] = piVar4;\n    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);\n    if (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }\n    return iVar3;\n  }" ({ "{") (if_statement "if (param_5 < 0) {\n      param_5 = 0x201;\n    }" (if "if") (parenthesized_expression "(param_5 < 0)" (( "(") (binary_expression "param_5 < 0" (identifier "param_5") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      param_5 = 0x201;\n    }" ({ "{") (expression_statement "param_5 = 0x201;" (assignment_expression "param_5 = 0x201" (identifier "param_5") (= "=") (number_literal "0x201")) (; ";")) (} "}"))) (expression_statement "piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);" (assignment_expression "piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" (identifier "piVar4") (= "=") (cast_expression "(int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" (identifier "new_connection") (argument_list "(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3)" (( "(") (identifier "uVar2") (, ",") (pointer_expression "*param_6" (* "*") (identifier "param_6")) (, ",") (identifier "param_5") (, ",") (number_literal "1") (, ",") (number_literal "0") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (identifier "puVar1") (, ",") (identifier "param_3") () ")"))))) (; ";")) (expression_statement "puVar1[1] = piVar4;" (assignment_expression "puVar1[1] = piVar4" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "piVar4")) (; ";")) (expression_statement "iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);" (assignment_expression "iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4)" (identifier "iVar3") (= "=") (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 (iVar3 == 0) {\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      pcVar5 = (char *)conf_get_str(param_3,9);\n      if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }\n      iVar6 = get_remote_username(param_3);\n      if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }\n    }" ({ "{") (expression_statement "pcVar5 = (char *)conf_get_str(param_3,9);" (assignment_expression "pcVar5 = (char *)conf_get_str(param_3,9)" (identifier "pcVar5") (= "=") (cast_expression "(char *)conf_get_str(param_3,9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "conf_get_str(param_3,9)" (identifier "conf_get_str") (argument_list "(param_3,9)" (( "(") (identifier "param_3") (, ",") (number_literal "9") () ")"))))) (; ";")) (if_statement "if (*pcVar5 != '\0') {\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }" (if "if") (parenthesized_expression "(*pcVar5 != '\0')" (( "(") (binary_expression "*pcVar5 != '\0'" (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        safefree(*param_6);\n        uVar2 = dupstr(pcVar5);\n        *param_6 = uVar2;\n        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);\n        if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }\n      }" ({ "{") (expression_statement "safefree(*param_6);" (call_expression "safefree(*param_6)" (identifier "safefree") (argument_list "(*param_6)" (( "(") (pointer_expression "*param_6" (* "*") (identifier "param_6")) () ")"))) (; ";")) (expression_statement "uVar2 = dupstr(pcVar5);" (assignment_expression "uVar2 = dupstr(pcVar5)" (identifier "uVar2") (= "=") (call_expression "dupstr(pcVar5)" (identifier "dupstr") (argument_list "(pcVar5)" (( "(") (identifier "pcVar5") () ")")))) (; ";")) (expression_statement "*param_6 = uVar2;" (assignment_expression "*param_6 = uVar2" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);" (assignment_expression "puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a)" (identifier "puVar8") (= "=") (cast_expression "(undefined1 *)host_strrchr(uVar2,0x3a)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "host_strrchr(uVar2,0x3a)" (identifier "host_strrchr") (argument_list "(uVar2,0x3a)" (( "(") (identifier "uVar2") (, ",") (number_literal "0x3a") () ")"))))) (; ";")) (if_statement "if (puVar8 != (undefined1 *)0x0) {\n          *puVar8 = 0;\n        }" (if "if") (parenthesized_expression "(puVar8 != (undefined1 *)0x0)" (( "(") (binary_expression "puVar8 != (undefined1 *)0x0" (identifier "puVar8") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          *puVar8 = 0;\n        }" ({ "{") (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar6 = get_remote_username(param_3);" (assignment_expression "iVar6 = get_remote_username(param_3)" (identifier "iVar6") (= "=") (call_expression "get_remote_username(param_3)" (identifier "get_remote_username") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar6 == 0) {\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }\n      else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        puVar7 = (undefined4 *)new_prompts(puVar1[8]);\n        puVar1[10] = puVar7;\n        *puVar7 = 1;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);\n        uVar9 = puVar1[10];\n        puVar7[1] = uVar2;\n        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);\n        add_prompt(uVar9,uVar2,1);\n        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);\n        if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }\n      }" ({ "{") (expression_statement "puVar7 = (undefined4 *)new_prompts(puVar1[8]);" (assignment_expression "puVar7 = (undefined4 *)new_prompts(puVar1[8])" (identifier "puVar7") (= "=") (cast_expression "(undefined4 *)new_prompts(puVar1[8])" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "new_prompts(puVar1[8])" (identifier "new_prompts") (argument_list "(puVar1[8])" (( "(") (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) () ")"))))) (; ";")) (expression_statement "puVar1[10] = puVar7;" (assignment_expression "puVar1[10] = puVar7" (subscript_expression "puVar1[10]" (identifier "puVar1") ([ "[") (number_literal "10") (] "]")) (= "=") (identifier "puVar7")) (; ";")) (expression_statement "*puVar7 = 1;" (assignment_expression "*puVar7 = 1" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);" (assignment_expression "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc)" (identifier "uVar2") (= "=") (call_expression "dupstr(PTR_DAT_001112f8 + -0x76bc)" (identifier "dupstr") (argument_list "(PTR_DAT_001112f8 + -0x76bc)" (( "(") (binary_expression "PTR_DAT_001112f8 + -0x76bc" (identifier "PTR_DAT_001112f8") (+ "+") (number_literal "-0x76bc")) () ")")))) (; ";")) (expression_statement "uVar9 = puVar1[10];" (assignment_expression "uVar9 = puVar1[10]" (identifier "uVar9") (= "=") (subscript_expression "puVar1[10]" (identifier "puVar1") ([ "[") (number_literal "10") (] "]"))) (; ";")) (expression_statement "puVar7[1] = uVar2;" (assignment_expression "puVar7[1] = uVar2" (subscript_expression "puVar7[1]" (identifier "puVar7") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);" (assignment_expression "uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8)" (identifier "uVar2") (= "=") (call_expression "dupstr(PTR_DAT_001112f8 + -0x76a8)" (identifier "dupstr") (argument_list "(PTR_DAT_001112f8 + -0x76a8)" (( "(") (binary_expression "PTR_DAT_001112f8 + -0x76a8" (identifier "PTR_DAT_001112f8") (+ "+") (number_literal "-0x76a8")) () ")")))) (; ";")) (expression_statement "add_prompt(uVar9,uVar2,1);" (call_expression "add_prompt(uVar9,uVar2,1)" (identifier "add_prompt") (argument_list "(uVar9,uVar2,1)" (( "(") (identifier "uVar9") (, ",") (identifier "uVar2") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);" (assignment_expression "iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0)" (parenthesized_expression "(*(code *)PTR_get_userpass_input_001116e0)" (( "(") (pointer_expression "*(code *)PTR_get_userpass_input_001116e0" (* "*") (cast_expression "(code *)PTR_get_userpass_input_001116e0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_get_userpass_input_001116e0"))) () ")")) (argument_list "(puVar1[10],0,0)" (( "(") (subscript_expression "puVar1[10]" (identifier "puVar1") ([ "[") (number_literal "10") (] "]")) (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar3 < 0) {\n          iVar3 = 0;\n        }\n        else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" (if "if") (parenthesized_expression "(iVar3 < 0)" (( "(") (binary_expression "iVar3 < 0" (identifier "iVar3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n          iVar3 = 0;\n        }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" (else "else") (compound_statement "{\n          iVar3 = 0;\n          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));\n        }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));" (call_expression "FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8))" (identifier "FUN_0003fda8") (argument_list "(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8))" (( "(") (identifier "puVar1") (, ",") (pointer_expression "*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8)" (* "*") (cast_expression "(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(**(int **)(puVar1[10] + 0x18) + 8)" (( "(") (binary_expression "**(int **)(puVar1[10] + 0x18) + 8" (pointer_expression "**(int **)(puVar1[10] + 0x18)" (* "*") (pointer_expression "*(int **)(puVar1[10] + 0x18)" (* "*") (cast_expression "(int **)(puVar1[10] + 0x18)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar1[10] + 0x18)" (( "(") (binary_expression "puVar1[10] + 0x18" (subscript_expression "puVar1[10]" (identifier "puVar1") ([ "[") (number_literal "10") (] "]")) (+ "+") (number_literal "0x18")) () ")"))))) (+ "+") (number_literal "8")) () ")")))) () ")"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" (else "else") (compound_statement "{\n        FUN_0003fda8(puVar1,iVar6);\n        safefree(iVar6);\n      }" ({ "{") (expression_statement "FUN_0003fda8(puVar1,iVar6);" (call_expression "FUN_0003fda8(puVar1,iVar6)" (identifier "FUN_0003fda8") (argument_list "(puVar1,iVar6)" (( "(") (identifier "puVar1") (, ",") (identifier "iVar6") () ")"))) (; ";")) (expression_statement "safefree(iVar6);" (call_expression "safefree(iVar6)" (identifier "safefree") (argument_list "(iVar6)" (( "(") (identifier "iVar6") () ")"))) (; ";")) (} "}")))) (} "}"))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_sk_addr_free_00111658)(uVar2);" (call_expression "(*(code *)PTR_sk_addr_free_00111658)(uVar2)" (parenthesized_expression "(*(code *)PTR_sk_addr_free_00111658)" (( "(") (pointer_expression "*(code *)PTR_sk_addr_free_00111658" (* "*") (cast_expression "(code *)PTR_sk_addr_free_00111658" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sk_addr_free_00111658"))) () ")")) (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))
(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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) 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: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator 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: (subscript_expression argument: (identifier) index: (number_literal)) 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: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (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) (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: (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: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (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: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (identifier) (subscript_expression argument: (identifier) index: (number_literal)) (binary_expression left: (identifier) right: (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: (identifier)))) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (identifier) (number_literal) (number_literal) (identifier) (identifier) (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (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 (identifier) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (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 (subscript_expression argument: (identifier) index: (number_literal))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (identifier)))) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))) right: (number_literal)))))))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))))) (return_statement (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (return_statement (identifier)))))

int MASKED(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4,
                int param_5,undefined4 *param_6,undefined4 param_7,undefined4 param_8)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  int iVar3;
  int *piVar4;
  char *pcVar5;
  int iVar6;
  undefined4 *puVar7;
  undefined1 *puVar8;
  undefined4 uVar9;
  
  puVar1 = (undefined4 *)safemalloc(1,0x2c);
  puVar1[8] = param_1;
  puVar1[1] = 0;
  puVar1[2] = 0;
  *puVar1 = PTR_PTR_s_3des_cbc_001112d8 + -0xb38;
  uVar2 = conf_get_int(param_3,0x73);
  puVar1[6] = uVar2;
  uVar2 = conf_get_int(param_3,0x74);
  puVar1[4] = 1;
  puVar1[7] = uVar2;
  puVar1[5] = 0;
  puVar1[10] = 0;
  uVar2 = conf_copy(param_3);
  puVar1[9] = uVar2;
  *param_2 = puVar1;
  uVar2 = conf_get_int(param_3,3);
  uVar2 = name_lookup(param_4,param_5,param_6,param_3,uVar2,puVar1[8],PTR_DAT_001112f8 + -0x76d0);
  iVar3 = (*(code *)PTR_sk_addr_error_00111654)(uVar2);
  if (iVar3 == 0) {
    if (param_5 < 0) {
      param_5 = 0x201;
    }
    piVar4 = (int *)new_connection(uVar2,*param_6,param_5,1,0,param_7,param_8,puVar1,param_3);
    puVar1[1] = piVar4;
    iVar3 = (**(code **)(*piVar4 + 0x1c))(piVar4);
    if (iVar3 == 0) {
      pcVar5 = (char *)conf_get_str(param_3,9);
      if (*pcVar5 != '\0') {
        safefree(*param_6);
        uVar2 = dupstr(pcVar5);
        *param_6 = uVar2;
        puVar8 = (undefined1 *)host_strrchr(uVar2,0x3a);
        if (puVar8 != (undefined1 *)0x0) {
          *puVar8 = 0;
        }
      }
      iVar6 = get_remote_username(param_3);
      if (iVar6 == 0) {
        puVar7 = (undefined4 *)new_prompts(puVar1[8]);
        puVar1[10] = puVar7;
        *puVar7 = 1;
        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76bc);
        uVar9 = puVar1[10];
        puVar7[1] = uVar2;
        uVar2 = dupstr(PTR_DAT_001112f8 + -0x76a8);
        add_prompt(uVar9,uVar2,1);
        iVar3 = (*(code *)PTR_get_userpass_input_001116e0)(puVar1[10],0,0);
        if (iVar3 < 0) {
          iVar3 = 0;
        }
        else {
          iVar3 = 0;
          FUN_0003fda8(puVar1,*(undefined4 *)(**(int **)(puVar1[10] + 0x18) + 8));
        }
      }
      else {
        FUN_0003fda8(puVar1,iVar6);
        safefree(iVar6);
      }
    }
    return iVar3;
  }
  (*(code *)PTR_sk_addr_free_00111658)(uVar2);
  return iVar3;
}

