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

CURLcode __regparm3 easy_connection(Curl_easy *data,curl_socket_t *sfd,connectdata **connp)

{
  curl_socket_t cVar1;
  char *fmt;
  
  if (data == (Curl_easy *)0x0) {
    return CURLE_BAD_FUNCTION_ARGUMENT;
  }
  if ((data->set).connect_only == false) {
    fmt = "CONNECT_ONLY is required!";
  }
  else {
    cVar1 = Curl_getconnectinfo(data,connp);
    *sfd = cVar1;
    if (cVar1 != -1) {
      return CURLE_OK;
    }
    fmt = "Failed to get recent socket";
  }
  Curl_failf(data,fmt);
  return CURLE_UNSUPPORTED_PROTOCOL;
}



undefined4 __regparm3 FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  int unaff_EBX;
  
  iVar2 = entry(param_2,0x3bbe8);
  if (iVar2 == 0) {
    return 0x2b;
  }
  if (*(char *)(iVar2 + 0x955) == '\0') {
    puVar1 = &UNK_000453fb;
  }
  else {
    iVar3 = FUN_0003ff80(iVar2,param_3);
    *param_2 = iVar3;
    if (iVar3 != -1) {
      return 0;
    }
    puVar1 = &UNK_00045415;
  }
  FUN_00027240(iVar2,puVar1 + unaff_EBX);
  return 1;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x74bf8
TEST EAX,EAX
JZ 0x0003bc40
CMP byte ptr [EAX + 0x955],0x0
MOV EDI,EDX
MOV ESI,EAX
JZ 0x0003bc20
SUB ESP,0x8
PUSH ECX
PUSH EAX
CALL 0x0003ff80
ADD ESP,0x10
MOV EDX,EAX
MOV dword ptr [EDI],EAX
XOR EAX,EAX
CMP EDX,-0x1
JZ 0x0003bc50
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffd0803]
PUSH EAX
PUSH ESI
CALL 0x00027240
ADD ESP,0x10
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
RET
POP EBX
MOV EAX,0x2b
POP ESI
POP EDI
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffd081d]
JMP 0x0003bc29
(translation_unit "undefined4 __regparm3 FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int *param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (expression_statement "iVar2 = entry(param_2,0x3bbe8);" (assignment_expression "iVar2 = entry(param_2,0x3bbe8)" identifier = (call_expression "entry(param_2,0x3bbe8)" identifier (argument_list "(param_2,0x3bbe8)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n    return 0x2b;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0x2b;\n  }" { (return_statement "return 0x2b;" return number_literal ;) })) (if_statement "if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" if (parenthesized_expression "(*(char *)(iVar2 + 0x955) == '\0')" ( (binary_expression "*(char *)(iVar2 + 0x955) == '\0'" (pointer_expression "*(char *)(iVar2 + 0x955)" * (cast_expression "(char *)(iVar2 + 0x955)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x955)" ( (binary_expression "iVar2 + 0x955" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    puVar1 = &UNK_000453fb;\n  }" { (expression_statement "puVar1 = &UNK_000453fb;" (assignment_expression "puVar1 = &UNK_000453fb" identifier = (pointer_expression "&UNK_000453fb" & identifier)) ;) }) (else_clause "else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" else (compound_statement "{\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" { (expression_statement "iVar3 = FUN_0003ff80(iVar2,param_3);" (assignment_expression "iVar3 = FUN_0003ff80(iVar2,param_3)" identifier = (call_expression "FUN_0003ff80(iVar2,param_3)" identifier (argument_list "(iVar2,param_3)" ( identifier , identifier )))) ;) (expression_statement "*param_2 = iVar3;" (assignment_expression "*param_2 = iVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (iVar3 != -1) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 != -1)" ( (binary_expression "iVar3 != -1" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar1 = &UNK_00045415;" (assignment_expression "puVar1 = &UNK_00045415" identifier = (pointer_expression "&UNK_00045415" & identifier)) ;) }))) (expression_statement "FUN_00027240(iVar2,puVar1 + unaff_EBX);" (call_expression "FUN_00027240(iVar2,puVar1 + unaff_EBX)" identifier (argument_list "(iVar2,puVar1 + unaff_EBX)" ( identifier , (binary_expression "puVar1 + unaff_EBX" identifier + identifier) ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode __regparm3 easy_connection(Curl_easy *data,curl_socket_t *sfd,connectdata **connp)\n\n{\n  curl_socket_t cVar1;\n  char *fmt;\n  \n  if (data == (Curl_easy *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  if ((data->set).connect_only == false) {\n    fmt = "CONNECT_ONLY is required!";\n  }\n  else {\n    cVar1 = Curl_getconnectinfo(data,connp);\n    *sfd = cVar1;\n    if (cVar1 != -1) {\n      return CURLE_OK;\n    }\n    fmt = "Failed to get recent socket";\n  }\n  Curl_failf(data,fmt);\n  return CURLE_UNSUPPORTED_PROTOCOL;\n}\n\n" comment comment (function_definition "CURLcode __regparm3 easy_connection(Curl_easy *data,curl_socket_t *sfd,connectdata **connp)\n\n{\n  curl_socket_t cVar1;\n  char *fmt;\n  \n  if (data == (Curl_easy *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  if ((data->set).connect_only == false) {\n    fmt = "CONNECT_ONLY is required!";\n  }\n  else {\n    cVar1 = Curl_getconnectinfo(data,connp);\n    *sfd = cVar1;\n    if (cVar1 != -1) {\n      return CURLE_OK;\n    }\n    fmt = "Failed to get recent socket";\n  }\n  Curl_failf(data,fmt);\n  return CURLE_UNSUPPORTED_PROTOCOL;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "easy_connection(Curl_easy *data,curl_socket_t *sfd,connectdata **connp)" identifier (parameter_list "(Curl_easy *data,curl_socket_t *sfd,connectdata **connp)" ( (parameter_declaration "Curl_easy *data" type_identifier (pointer_declarator "*data" * identifier)) , (parameter_declaration "curl_socket_t *sfd" type_identifier (pointer_declarator "*sfd" * identifier)) , (parameter_declaration "connectdata **connp" type_identifier (pointer_declarator "**connp" * (pointer_declarator "*connp" * identifier))) ))) (compound_statement "{\n  curl_socket_t cVar1;\n  char *fmt;\n  \n  if (data == (Curl_easy *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  if ((data->set).connect_only == false) {\n    fmt = "CONNECT_ONLY is required!";\n  }\n  else {\n    cVar1 = Curl_getconnectinfo(data,connp);\n    *sfd = cVar1;\n    if (cVar1 != -1) {\n      return CURLE_OK;\n    }\n    fmt = "Failed to get recent socket";\n  }\n  Curl_failf(data,fmt);\n  return CURLE_UNSUPPORTED_PROTOCOL;\n}" { (declaration "curl_socket_t cVar1;" type_identifier identifier ;) (declaration "char *fmt;" primitive_type (pointer_declarator "*fmt" * identifier) ;) (if_statement "if (data == (Curl_easy *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }" if (parenthesized_expression "(data == (Curl_easy *)0x0)" ( (binary_expression "data == (Curl_easy *)0x0" identifier == (cast_expression "(Curl_easy *)0x0" ( (type_descriptor "Curl_easy *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }" { (return_statement "return CURLE_BAD_FUNCTION_ARGUMENT;" return identifier ;) })) (if_statement "if ((data->set).connect_only == false) {\n    fmt = "CONNECT_ONLY is required!";\n  }\n  else {\n    cVar1 = Curl_getconnectinfo(data,connp);\n    *sfd = cVar1;\n    if (cVar1 != -1) {\n      return CURLE_OK;\n    }\n    fmt = "Failed to get recent socket";\n  }" if (parenthesized_expression "((data->set).connect_only == false)" ( (binary_expression "(data->set).connect_only == false" (field_expression "(data->set).connect_only" (parenthesized_expression "(data->set)" ( (field_expression "data->set" identifier -> field_identifier) )) . field_identifier) == false) )) (compound_statement "{\n    fmt = "CONNECT_ONLY is required!";\n  }" { (expression_statement "fmt = "CONNECT_ONLY is required!";" (assignment_expression "fmt = "CONNECT_ONLY is required!"" identifier = (string_literal ""CONNECT_ONLY is required!"" " string_content ")) ;) }) (else_clause "else {\n    cVar1 = Curl_getconnectinfo(data,connp);\n    *sfd = cVar1;\n    if (cVar1 != -1) {\n      return CURLE_OK;\n    }\n    fmt = "Failed to get recent socket";\n  }" else (compound_statement "{\n    cVar1 = Curl_getconnectinfo(data,connp);\n    *sfd = cVar1;\n    if (cVar1 != -1) {\n      return CURLE_OK;\n    }\n    fmt = "Failed to get recent socket";\n  }" { (expression_statement "cVar1 = Curl_getconnectinfo(data,connp);" (assignment_expression "cVar1 = Curl_getconnectinfo(data,connp)" identifier = (call_expression "Curl_getconnectinfo(data,connp)" identifier (argument_list "(data,connp)" ( identifier , identifier )))) ;) (expression_statement "*sfd = cVar1;" (assignment_expression "*sfd = cVar1" (pointer_expression "*sfd" * identifier) = identifier) ;) (if_statement "if (cVar1 != -1) {\n      return CURLE_OK;\n    }" if (parenthesized_expression "(cVar1 != -1)" ( (binary_expression "cVar1 != -1" identifier != number_literal) )) (compound_statement "{\n      return CURLE_OK;\n    }" { (return_statement "return CURLE_OK;" return identifier ;) })) (expression_statement "fmt = "Failed to get recent socket";" (assignment_expression "fmt = "Failed to get recent socket"" identifier = (string_literal ""Failed to get recent socket"" " string_content ")) ;) }))) (expression_statement "Curl_failf(data,fmt);" (call_expression "Curl_failf(data,fmt)" identifier (argument_list "(data,fmt)" ( identifier , identifier ))) ;) (return_statement "return CURLE_UNSUPPORTED_PROTOCOL;" return identifier ;) })))
(translation_unit "undefined4 __regparm3 FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int *param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (expression_statement "iVar2 = entry(param_2,0x3bbe8);" (assignment_expression "iVar2 = entry(param_2,0x3bbe8)" identifier = (call_expression "entry(param_2,0x3bbe8)" identifier (argument_list "(param_2,0x3bbe8)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n    return 0x2b;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0x2b;\n  }" { (return_statement "return 0x2b;" return number_literal ;) })) (if_statement "if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" if (parenthesized_expression "(*(char *)(iVar2 + 0x955) == '\0')" ( (binary_expression "*(char *)(iVar2 + 0x955) == '\0'" (pointer_expression "*(char *)(iVar2 + 0x955)" * (cast_expression "(char *)(iVar2 + 0x955)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x955)" ( (binary_expression "iVar2 + 0x955" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    puVar1 = &UNK_000453fb;\n  }" { (expression_statement "puVar1 = &UNK_000453fb;" (assignment_expression "puVar1 = &UNK_000453fb" identifier = (pointer_expression "&UNK_000453fb" & identifier)) ;) }) (else_clause "else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" else (compound_statement "{\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" { (expression_statement "iVar3 = FUN_0003ff80(iVar2,param_3);" (assignment_expression "iVar3 = FUN_0003ff80(iVar2,param_3)" identifier = (call_expression "FUN_0003ff80(iVar2,param_3)" identifier (argument_list "(iVar2,param_3)" ( identifier , identifier )))) ;) (expression_statement "*param_2 = iVar3;" (assignment_expression "*param_2 = iVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (iVar3 != -1) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 != -1)" ( (binary_expression "iVar3 != -1" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar1 = &UNK_00045415;" (assignment_expression "puVar1 = &UNK_00045415" identifier = (pointer_expression "&UNK_00045415" & identifier)) ;) }))) (expression_statement "FUN_00027240(iVar2,puVar1 + unaff_EBX);" (call_expression "FUN_00027240(iVar2,puVar1 + unaff_EBX)" identifier (argument_list "(iVar2,puVar1 + unaff_EBX)" ( identifier , (binary_expression "puVar1 + unaff_EBX" identifier + identifier) ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + IDENT) ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003bbe0(undefined4 param_1,int *param_2,undefined4 param_3)" (identifier "FUN_0003bbe0") (parameter_list "(undefined4 param_1,int *param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  \n  iVar2 = entry(param_2,0x3bbe8);\n  if (iVar2 == 0) {\n    return 0x2b;\n  }\n  if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }\n  FUN_00027240(iVar2,puVar1 + unaff_EBX);\n  return 1;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (expression_statement "iVar2 = entry(param_2,0x3bbe8);" (assignment_expression "iVar2 = entry(param_2,0x3bbe8)" (identifier "iVar2") (= "=") (call_expression "entry(param_2,0x3bbe8)" (identifier "entry") (argument_list "(param_2,0x3bbe8)" (( "(") (identifier "param_2") (, ",") (number_literal "0x3bbe8") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    return 0x2b;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0x2b;\n  }" ({ "{") (return_statement "return 0x2b;" (return "return") (number_literal "0x2b") (; ";")) (} "}"))) (if_statement "if (*(char *)(iVar2 + 0x955) == '\0') {\n    puVar1 = &UNK_000453fb;\n  }\n  else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar2 + 0x955) == '\0')" (( "(") (binary_expression "*(char *)(iVar2 + 0x955) == '\0'" (pointer_expression "*(char *)(iVar2 + 0x955)" (* "*") (cast_expression "(char *)(iVar2 + 0x955)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x955)" (( "(") (binary_expression "iVar2 + 0x955" (identifier "iVar2") (+ "+") (number_literal "0x955")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    puVar1 = &UNK_000453fb;\n  }" ({ "{") (expression_statement "puVar1 = &UNK_000453fb;" (assignment_expression "puVar1 = &UNK_000453fb" (identifier "puVar1") (= "=") (pointer_expression "&UNK_000453fb" (& "&") (identifier "UNK_000453fb"))) (; ";")) (} "}")) (else_clause "else {\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" (else "else") (compound_statement "{\n    iVar3 = FUN_0003ff80(iVar2,param_3);\n    *param_2 = iVar3;\n    if (iVar3 != -1) {\n      return 0;\n    }\n    puVar1 = &UNK_00045415;\n  }" ({ "{") (expression_statement "iVar3 = FUN_0003ff80(iVar2,param_3);" (assignment_expression "iVar3 = FUN_0003ff80(iVar2,param_3)" (identifier "iVar3") (= "=") (call_expression "FUN_0003ff80(iVar2,param_3)" (identifier "FUN_0003ff80") (argument_list "(iVar2,param_3)" (( "(") (identifier "iVar2") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "*param_2 = iVar3;" (assignment_expression "*param_2 = iVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar3")) (; ";")) (if_statement "if (iVar3 != -1) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar3 != -1)" (( "(") (binary_expression "iVar3 != -1" (identifier "iVar3") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "puVar1 = &UNK_00045415;" (assignment_expression "puVar1 = &UNK_00045415" (identifier "puVar1") (= "=") (pointer_expression "&UNK_00045415" (& "&") (identifier "UNK_00045415"))) (; ";")) (} "}")))) (expression_statement "FUN_00027240(iVar2,puVar1 + unaff_EBX);" (call_expression "FUN_00027240(iVar2,puVar1 + unaff_EBX)" (identifier "FUN_00027240") (argument_list "(iVar2,puVar1 + unaff_EBX)" (( "(") (identifier "iVar2") (, ",") (binary_expression "puVar1 + unaff_EBX" (identifier "puVar1") (+ "+") (identifier "unaff_EBX")) () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

type_1 __regparm3 function_1(type_2 *var_1,type_3 *sfd,type_4 **connp)

{
  type_3 var_3;
  char *fmt;
  
  if (var_1 == (type_2 *)0x0) {
    return CURLE_BAD_FUNCTION_ARGUMENT;
  }
  if ((var_1->set).connect_only == false) {
    fmt = "CONNECT_ONLY is required!";
  }
  else {
    var_3 = var_2(var_1,connp);
    *sfd = var_3;
    if (var_3 != -1) {
      return CURLE_OK;
    }
    fmt = "Failed to get recent socket";
  }
  var_4(var_1,fmt);
  return CURLE_UNSUPPORTED_PROTOCOL;
}


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

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

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  int unaff_EBX;
  
  iVar2 = entry(param_2,0x3bbe8);
  if (iVar2 == 0) {
    return 0x2b;
  }
  if (*(char *)(iVar2 + 0x955) == '\0') {
    puVar1 = &UNK_000453fb;
  }
  else {
    iVar3 = FUN_0003ff80(iVar2,param_3);
    *param_2 = iVar3;
    if (iVar3 != -1) {
      return 0;
    }
    puVar1 = &UNK_00045415;
  }
  FUN_00027240(iVar2,puVar1 + unaff_EBX);
  return 1;
}

