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

CURLcode Curl_write_plain(connectdata *conn,curl_socket_t sockfd,void *mem,size_t len,
                         ssize_t *written)

{
  ssize_t sVar1;
  int in_GS_OFFSET;
  CURLcode result;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x27457;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  sVar1 = Curl_send_plain(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result);
  *written = sVar1;
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return result;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



undefined4 FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)

{
  undefined4 uVar1;
  int in_GS_OFFSET;
  int unaff_retaddr;
  undefined4 local_18;
  int local_14;
  undefined4 uStack_c;
  
  uStack_c = 0x27457;
  entry();
  local_14 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,
                       &local_18);
  *param_4 = uVar1;
  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_18;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0007c1a0();
}


PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x89389
SUB ESP,0x20
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x18],ECX
XOR ECX,ECX
MOV EAX,dword ptr [ESP + 0x2c]
LEA EDX,[ESP + 0x14]
MOV ESI,dword ptr [ESP + 0x3c]
PUSH EDX
XOR EDX,EDX
PUSH dword ptr [ESP + 0x3c]
PUSH dword ptr [ESP + 0x3c]
MOV ECX,dword ptr [ESP + 0x3c]
CMP dword ptr [EAX + 0x194],ECX
SETZ DL
PUSH EDX
PUSH EAX
CALL 0x00027390
ADD ESP,0x20
MOV dword ptr [ESI],EAX
MOV EAX,dword ptr [ESP + 0x8]
MOV ESI,dword ptr [ESP + 0xc]
XOR ESI,dword ptr GS:[0x14]
JNZ 0x000274b4
ADD ESP,0x14
POP EBX
POP ESI
RET
CALL 0x0007c1a0
(translation_unit "undefined4 FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0007c1a0();\n}\n\n" (function_definition "undefined4 FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0007c1a0();\n}" type_identifier (function_declarator "FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0007c1a0();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x27457;" (assignment_expression "uStack_c = 0x27457" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_14 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_14 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);" (assignment_expression "uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" identifier = (call_expression "FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" identifier (argument_list "(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" ( identifier , (binary_expression "*(int *)(unaff_retaddr + 0x194) == param_1" (pointer_expression "*(int *)(unaff_retaddr + 0x194)" * (cast_expression "(int *)(unaff_retaddr + 0x194)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x194)" ( (binary_expression "unaff_retaddr + 0x194" identifier + number_literal) )))) == identifier) , identifier , identifier , (pointer_expression "&local_18" & identifier) )))) ;) (expression_statement "*param_4 = uVar1;" (assignment_expression "*param_4 = uVar1" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }" if (parenthesized_expression "(local_14 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_14 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_18;\n  }" { (return_statement "return local_18;" return identifier ;) })) comment (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode Curl_write_plain(connectdata *conn,curl_socket_t sockfd,void *mem,size_t len,\n                         ssize_t *written)\n\n{\n  ssize_t sVar1;\n  int in_GS_OFFSET;\n  CURLcode result;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar1 = Curl_send_plain(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result);\n  *written = sVar1;\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return result;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "CURLcode Curl_write_plain(connectdata *conn,curl_socket_t sockfd,void *mem,size_t len,\n                         ssize_t *written)\n\n{\n  ssize_t sVar1;\n  int in_GS_OFFSET;\n  CURLcode result;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar1 = Curl_send_plain(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result);\n  *written = sVar1;\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return result;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "Curl_write_plain(connectdata *conn,curl_socket_t sockfd,void *mem,size_t len,\n                         ssize_t *written)" identifier (parameter_list "(connectdata *conn,curl_socket_t sockfd,void *mem,size_t len,\n                         ssize_t *written)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "curl_socket_t sockfd" type_identifier identifier) , (parameter_declaration "void *mem" primitive_type (pointer_declarator "*mem" * identifier)) , (parameter_declaration "size_t len" primitive_type identifier) , (parameter_declaration "ssize_t *written" primitive_type (pointer_declarator "*written" * identifier)) ))) (compound_statement "{\n  ssize_t sVar1;\n  int in_GS_OFFSET;\n  CURLcode result;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar1 = Curl_send_plain(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result);\n  *written = sVar1;\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return result;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "ssize_t sVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "CURLcode result;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x27457;" (assignment_expression "uStack_c = 0x27457" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "sVar1 = Curl_send_plain(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result);" (assignment_expression "sVar1 = Curl_send_plain(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result)" identifier = (call_expression "Curl_send_plain(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result)" identifier (argument_list "(conn,(uint)(conn->sock[1] == sockfd),mem,len,&result)" ( identifier , (call_expression "(uint)(conn->sock[1] == sockfd)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(conn->sock[1] == sockfd)" ( (binary_expression "conn->sock[1] == sockfd" (subscript_expression "conn->sock[1]" (field_expression "conn->sock" identifier -> field_identifier) [ number_literal ]) == identifier) ))) , identifier , identifier , (pointer_expression "&result" & identifier) )))) ;) (expression_statement "*written = sVar1;" (assignment_expression "*written = sVar1" (pointer_expression "*written" * identifier) = identifier) ;) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return result;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return result;\n  }" { (return_statement "return result;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    \n  FUN_0007c1a0();\n}\n\n" (function_definition "undefined4 FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    \n  FUN_0007c1a0();\n}" type_identifier (function_declarator "FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    \n  FUN_0007c1a0();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x27457;" (assignment_expression "uStack_c = 0x27457" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_14 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_14 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);" (assignment_expression "uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" identifier = (call_expression "FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" identifier (argument_list "(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" ( identifier , (binary_expression "*(int *)(unaff_retaddr + 0x194) == param_1" (pointer_expression "*(int *)(unaff_retaddr + 0x194)" * (cast_expression "(int *)(unaff_retaddr + 0x194)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x194)" ( (binary_expression "unaff_retaddr + 0x194" identifier + number_literal) )))) == identifier) , identifier , identifier , (pointer_expression "&local_18" & identifier) )))) ;) (expression_statement "*param_4 = uVar1;" (assignment_expression "*param_4 = uVar1" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }" if (parenthesized_expression "(local_14 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_14 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_18;\n  }" { (return_statement "return local_18;" return identifier ;) })) (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    \n  FUN_0007c1a0();\n}" (type_identifier "undefined4") (function_declarator "FUN_00027450(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" (identifier "FUN_00027450") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  undefined4 local_18;\n  int local_14;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x27457;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);\n  *param_4 = uVar1;\n  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }\n                    \n  FUN_0007c1a0();\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int unaff_retaddr;" (primitive_type "int") (identifier "unaff_retaddr") (; ";")) (declaration "undefined4 local_18;" (type_identifier "undefined4") (identifier "local_18") (; ";")) (declaration "int local_14;" (primitive_type "int") (identifier "local_14") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x27457;" (assignment_expression "uStack_c = 0x27457" (identifier "uStack_c") (= "=") (number_literal "0x27457")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_14 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_14 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_14") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18);" (assignment_expression "uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" (identifier "uVar1") (= "=") (call_expression "FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" (identifier "FUN_00027390") (argument_list "(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,\n                       &local_18)" (( "(") (identifier "unaff_retaddr") (, ",") (binary_expression "*(int *)(unaff_retaddr + 0x194) == param_1" (pointer_expression "*(int *)(unaff_retaddr + 0x194)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x194)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x194)" (( "(") (binary_expression "unaff_retaddr + 0x194" (identifier "unaff_retaddr") (+ "+") (number_literal "0x194")) () ")")))) (== "==") (identifier "param_1")) (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (pointer_expression "&local_18" (& "&") (identifier "local_18")) () ")")))) (; ";")) (expression_statement "*param_4 = uVar1;" (assignment_expression "*param_4 = uVar1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "uVar1")) (; ";")) (if_statement "if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_18;\n  }" (if "if") (parenthesized_expression "(local_14 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_14 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_14") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return local_18;\n  }" ({ "{") (return_statement "return local_18;" (return "return") (identifier "local_18") (; ";")) (} "}"))) (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" (identifier "FUN_0007c1a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 function_1(type_2 *conn,type_3 var_3,void *mem,size_t len,
                         ssize_t *written)

{
  ssize_t sVar1;
  int var_1;
  type_1 result;
  int var_4;
  type_4 uStack_c;
  
  uStack_c = 0x27457;
  var_4 = *(int *)(var_1 + 0x14);
  sVar1 = var_2(conn,(uint)(conn->sock[1] == var_3),mem,len,&result);
  *written = sVar1;
  if (var_4 == *(int *)(var_1 + 0x14)) {
    return result;
  }
                    /* WARNING: Subroutine does not return */
  var_5();
}


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

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

{
  undefined4 uVar1;
  int in_GS_OFFSET;
  int unaff_retaddr;
  undefined4 local_18;
  int local_14;
  undefined4 uStack_c;
  
  uStack_c = 0x27457;
  entry();
  local_14 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = FUN_00027390(unaff_retaddr,*(int *)(unaff_retaddr + 0x194) == param_1,param_2,param_3,
                       &local_18);
  *param_4 = uVar1;
  if (local_14 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_18;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0007c1a0();
}

