
/* 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 */

int ftp_send_command(connectdata *conn,char *message,...)

{
  int iVar1;
  CURLcode CVar2;
  int in_GS_OFFSET;
  int local_4c;
  ssize_t nread;
  char print_buffer [50];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  nread = 0;
  curl_mvsnprintf(print_buffer,0x32,message,&stack0x0000000c);
  CVar2 = Curl_ftpsend(conn,print_buffer);
  if ((CVar2 != CURLE_OK) || (CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)
     ) {
    local_4c = -1;
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return local_4c;
}



undefined4 FUN_0003f210(undefined4 param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  undefined4 local_50;
  undefined4 local_4c;
  undefined1 local_46 [50];
  int local_14;
  undefined4 uStack_10;
  
  uStack_10 = 0x3f218;
  entry();
  local_14 = *(int *)(in_GS_OFFSET + 0x14);
  local_4c = 0;
  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);
  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);
  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {
    local_50 = 0xffffffff;
  }
  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00082f60();
  }
  return local_50;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x775c8
SUB ESP,0x40
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x3c],EAX
XOR EAX,EAX
LEA EAX,[ESP + 0x58]
MOV EDI,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0x4],0x0
PUSH EAX
PUSH dword ptr [ESP + 0x58]
PUSH 0x32
LEA ESI,[ESP + 0x16]
PUSH ESI
CALL 0x00018a70
POP EAX
POP EDX
PUSH ESI
PUSH EDI
CALL 0x0002e9e0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003f280
MOV EAX,0xffffffff
MOV EDX,dword ptr [ESP + 0x3c]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x0003f29f
ADD ESP,0x40
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
LEA EAX,[ESP + 0x4]
PUSH EAX
PUSH EDI
LEA EAX,[ESP + 0x10]
PUSH EAX
CALL 0x0002b4e0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0003f25e
MOV EAX,dword ptr [ESP]
JMP 0x0003f263
CALL 0x00082f60
(translation_unit "undefined4 FUN_0003f210(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00082f60();\n  }\n  return local_50;\n}\n\n" (function_definition "undefined4 FUN_0003f210(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00082f60();\n  }\n  return local_50;\n}" type_identifier (function_declarator "FUN_0003f210(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00082f60();\n  }\n  return local_50;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "undefined4 local_50;" type_identifier identifier ;) (declaration "undefined4 local_4c;" type_identifier identifier ;) (declaration "undefined1 local_46 [50];" type_identifier (array_declarator "local_46 [50]" identifier [ number_literal ]) ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "undefined4 uStack_10;" type_identifier identifier ;) (expression_statement "uStack_10 = 0x3f218;" (assignment_expression "uStack_10 = 0x3f218" 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 "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);" (call_expression "curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008)" identifier (argument_list "(local_46,0x32,param_1,&stack0x00000008)" ( identifier , number_literal , identifier , (pointer_expression "&stack0x00000008" & identifier) ))) ;) (expression_statement "iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);" (assignment_expression "iVar1 = FUN_0002e9e0(unaff_retaddr,local_46)" identifier = (call_expression "FUN_0002e9e0(unaff_retaddr,local_46)" identifier (argument_list "(unaff_retaddr,local_46)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }" if (parenthesized_expression "((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0))" ( (binary_expression "(iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "(iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)" ( (comma_expression "iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0" (assignment_expression "iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50)" identifier = (call_expression "FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50)" identifier (argument_list "(&local_4c,unaff_retaddr,&local_50)" ( (pointer_expression "&local_4c" & identifier) , identifier , (pointer_expression "&local_50" & identifier) )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    local_50 = 0xffffffff;\n  }" { (expression_statement "local_50 = 0xffffffff;" (assignment_expression "local_50 = 0xffffffff" identifier = number_literal) ;) })) (if_statement "if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00082f60();\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                    /* WARNING: Subroutine does not return */\n    FUN_00082f60();\n  }" { comment (expression_statement "FUN_00082f60();" (call_expression "FUN_00082f60()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return local_50;" return identifier ;) })))
(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\nint ftp_send_command(connectdata *conn,char *message,...)\n\n{\n  int iVar1;\n  CURLcode CVar2;\n  int in_GS_OFFSET;\n  int local_4c;\n  ssize_t nread;\n  char print_buffer [50];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  nread = 0;\n  curl_mvsnprintf(print_buffer,0x32,message,&stack0x0000000c);\n  CVar2 = Curl_ftpsend(conn,print_buffer);\n  if ((CVar2 != CURLE_OK) || (CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)\n     ) {\n    local_4c = -1;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_4c;\n}\n\n" comment comment comment (function_definition "int ftp_send_command(connectdata *conn,char *message,...)\n\n{\n  int iVar1;\n  CURLcode CVar2;\n  int in_GS_OFFSET;\n  int local_4c;\n  ssize_t nread;\n  char print_buffer [50];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  nread = 0;\n  curl_mvsnprintf(print_buffer,0x32,message,&stack0x0000000c);\n  CVar2 = Curl_ftpsend(conn,print_buffer);\n  if ((CVar2 != CURLE_OK) || (CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)\n     ) {\n    local_4c = -1;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_4c;\n}" primitive_type (function_declarator "ftp_send_command(connectdata *conn,char *message,...)" identifier (parameter_list "(connectdata *conn,char *message,...)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "char *message" primitive_type (pointer_declarator "*message" * identifier)) , (variadic_parameter "..." ...) ))) (compound_statement "{\n  int iVar1;\n  CURLcode CVar2;\n  int in_GS_OFFSET;\n  int local_4c;\n  ssize_t nread;\n  char print_buffer [50];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  nread = 0;\n  curl_mvsnprintf(print_buffer,0x32,message,&stack0x0000000c);\n  CVar2 = Curl_ftpsend(conn,print_buffer);\n  if ((CVar2 != CURLE_OK) || (CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)\n     ) {\n    local_4c = -1;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_4c;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "CURLcode CVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_4c;" primitive_type identifier ;) (declaration "ssize_t nread;" primitive_type identifier ;) (declaration "char print_buffer [50];" primitive_type (array_declarator "print_buffer [50]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(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 "nread = 0;" (assignment_expression "nread = 0" identifier = number_literal) ;) (expression_statement "curl_mvsnprintf(print_buffer,0x32,message,&stack0x0000000c);" (call_expression "curl_mvsnprintf(print_buffer,0x32,message,&stack0x0000000c)" identifier (argument_list "(print_buffer,0x32,message,&stack0x0000000c)" ( identifier , number_literal , identifier , (pointer_expression "&stack0x0000000c" & identifier) ))) ;) (expression_statement "CVar2 = Curl_ftpsend(conn,print_buffer);" (assignment_expression "CVar2 = Curl_ftpsend(conn,print_buffer)" identifier = (call_expression "Curl_ftpsend(conn,print_buffer)" identifier (argument_list "(conn,print_buffer)" ( identifier , identifier )))) ;) (if_statement "if ((CVar2 != CURLE_OK) || (CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)\n     ) {\n    local_4c = -1;\n  }" if (parenthesized_expression "((CVar2 != CURLE_OK) || (CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)\n     )" ( (binary_expression "(CVar2 != CURLE_OK) || (CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)" (parenthesized_expression "(CVar2 != CURLE_OK)" ( (binary_expression "CVar2 != CURLE_OK" identifier != identifier) )) || (parenthesized_expression "(CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK)" ( (comma_expression "CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c), CVar2 != CURLE_OK" (assignment_expression "CVar2 = Curl_GetFTPResponse(&nread,conn,&local_4c)" identifier = (call_expression "Curl_GetFTPResponse(&nread,conn,&local_4c)" identifier (argument_list "(&nread,conn,&local_4c)" ( (pointer_expression "&nread" & identifier) , identifier , (pointer_expression "&local_4c" & identifier) )))) , (binary_expression "CVar2 != CURLE_OK" identifier != identifier)) ))) )) (compound_statement "{\n    local_4c = -1;\n  }" { (expression_statement "local_4c = -1;" (assignment_expression "local_4c = -1" identifier = number_literal) ;) })) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return local_4c;" return identifier ;) })))
(translation_unit "undefined4 FUN_0003f210(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00082f60();\n  }\n  return local_50;\n}\n\n" (function_definition "undefined4 FUN_0003f210(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00082f60();\n  }\n  return local_50;\n}" type_identifier (function_declarator "FUN_0003f210(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00082f60();\n  }\n  return local_50;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 unaff_retaddr;" type_identifier identifier ;) (declaration "undefined4 local_50;" type_identifier identifier ;) (declaration "undefined4 local_4c;" type_identifier identifier ;) (declaration "undefined1 local_46 [50];" type_identifier (array_declarator "local_46 [50]" identifier [ number_literal ]) ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "undefined4 uStack_10;" type_identifier identifier ;) (expression_statement "uStack_10 = 0x3f218;" (assignment_expression "uStack_10 = 0x3f218" 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 "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);" (call_expression "curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008)" identifier (argument_list "(local_46,0x32,param_1,&stack0x00000008)" ( identifier , number_literal , identifier , (pointer_expression "&stack0x00000008" & identifier) ))) ;) (expression_statement "iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);" (assignment_expression "iVar1 = FUN_0002e9e0(unaff_retaddr,local_46)" identifier = (call_expression "FUN_0002e9e0(unaff_retaddr,local_46)" identifier (argument_list "(unaff_retaddr,local_46)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }" if (parenthesized_expression "((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0))" ( (binary_expression "(iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "(iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)" ( (comma_expression "iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0" (assignment_expression "iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50)" identifier = (call_expression "FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50)" identifier (argument_list "(&local_4c,unaff_retaddr,&local_50)" ( (pointer_expression "&local_4c" & identifier) , identifier , (pointer_expression "&local_50" & identifier) )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    local_50 = 0xffffffff;\n  }" { (expression_statement "local_50 = 0xffffffff;" (assignment_expression "local_50 = 0xffffffff" identifier = number_literal) ;) })) (if_statement "if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00082f60();\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                    \n    FUN_00082f60();\n  }" { (expression_statement "FUN_00082f60();" (call_expression "FUN_00082f60()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return local_50;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (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 = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , (pointer_expression & IDENT) )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0003f210(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00082f60();\n  }\n  return local_50;\n}" (type_identifier "undefined4") (function_declarator "FUN_0003f210(undefined4 param_1)" (identifier "FUN_0003f210") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 unaff_retaddr;\n  undefined4 local_50;\n  undefined4 local_4c;\n  undefined1 local_46 [50];\n  int local_14;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x3f218;\n  entry();\n  local_14 = *(int *)(in_GS_OFFSET + 0x14);\n  local_4c = 0;\n  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);\n  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);\n  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }\n  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00082f60();\n  }\n  return local_50;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 unaff_retaddr;" (type_identifier "undefined4") (identifier "unaff_retaddr") (; ";")) (declaration "undefined4 local_50;" (type_identifier "undefined4") (identifier "local_50") (; ";")) (declaration "undefined4 local_4c;" (type_identifier "undefined4") (identifier "local_4c") (; ";")) (declaration "undefined1 local_46 [50];" (type_identifier "undefined1") (array_declarator "local_46 [50]" (identifier "local_46") ([ "[") (number_literal "50") (] "]")) (; ";")) (declaration "int local_14;" (primitive_type "int") (identifier "local_14") (; ";")) (declaration "undefined4 uStack_10;" (type_identifier "undefined4") (identifier "uStack_10") (; ";")) (expression_statement "uStack_10 = 0x3f218;" (assignment_expression "uStack_10 = 0x3f218" (identifier "uStack_10") (= "=") (number_literal "0x3f218")) (; ";")) (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 "local_4c = 0;" (assignment_expression "local_4c = 0" (identifier "local_4c") (= "=") (number_literal "0")) (; ";")) (expression_statement "curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);" (call_expression "curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008)" (identifier "curl_mvsnprintf") (argument_list "(local_46,0x32,param_1,&stack0x00000008)" (( "(") (identifier "local_46") (, ",") (number_literal "0x32") (, ",") (identifier "param_1") (, ",") (pointer_expression "&stack0x00000008" (& "&") (identifier "stack0x00000008")) () ")"))) (; ";")) (expression_statement "iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);" (assignment_expression "iVar1 = FUN_0002e9e0(unaff_retaddr,local_46)" (identifier "iVar1") (= "=") (call_expression "FUN_0002e9e0(unaff_retaddr,local_46)" (identifier "FUN_0002e9e0") (argument_list "(unaff_retaddr,local_46)" (( "(") (identifier "unaff_retaddr") (, ",") (identifier "local_46") () ")")))) (; ";")) (if_statement "if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {\n    local_50 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0))" (( "(") (binary_expression "(iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)" (( "(") (comma_expression "iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0" (assignment_expression "iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50)" (identifier "iVar1") (= "=") (call_expression "FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50)" (identifier "FUN_0002b4e0") (argument_list "(&local_4c,unaff_retaddr,&local_50)" (( "(") (pointer_expression "&local_4c" (& "&") (identifier "local_4c")) (, ",") (identifier "unaff_retaddr") (, ",") (pointer_expression "&local_50" (& "&") (identifier "local_50")) () ")")))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    local_50 = 0xffffffff;\n  }" ({ "{") (expression_statement "local_50 = 0xffffffff;" (assignment_expression "local_50 = 0xffffffff" (identifier "local_50") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}"))) (if_statement "if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00082f60();\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                    \n    FUN_00082f60();\n  }" ({ "{") (expression_statement "FUN_00082f60();" (call_expression "FUN_00082f60()" (identifier "FUN_00082f60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return local_50;" (return "return") (identifier "local_50") (; ";")) (} "}")))

/* 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 */

int function_1(type_1 *conn,char *message,...)

{
  int var_7;
  type_2 var_4;
  int var_1;
  int local_4c;
  ssize_t nread;
  char print_buffer [50];
  
  var_7 = *(int *)(var_1 + 0x14);
  nread = 0;
  var_2(print_buffer,0x32,message,&stack0x0000000c);
  var_4 = var_3(conn,print_buffer);
  if ((var_4 != var_5) || (var_4 = var_6(&nread,conn,&local_4c), var_4 != var_5)
     ) {
    local_4c = -1;
  }
  if (var_7 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_8();
  }
  return local_4c;
}


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

undefined4 MASKED(undefined4 param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined4 unaff_retaddr;
  undefined4 local_50;
  undefined4 local_4c;
  undefined1 local_46 [50];
  int local_14;
  undefined4 uStack_10;
  
  uStack_10 = 0x3f218;
  entry();
  local_14 = *(int *)(in_GS_OFFSET + 0x14);
  local_4c = 0;
  curl_mvsnprintf(local_46,0x32,param_1,&stack0x00000008);
  iVar1 = FUN_0002e9e0(unaff_retaddr,local_46);
  if ((iVar1 != 0) || (iVar1 = FUN_0002b4e0(&local_4c,unaff_retaddr,&local_50), iVar1 != 0)) {
    local_50 = 0xffffffff;
  }
  if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00082f60();
  }
  return local_50;
}

