
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void kbd_callback(char *name,int name_len,char *instruction,int instruction_len,int num_prompts,
                 LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses
                 ,void **abstract)

{
  void *pvVar1;
  char *pcVar2;
  size_t uznum;
  uint uVar3;
  
  if (num_prompts == 1) {
    pvVar1 = *abstract;
    pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));
    responses->text = pcVar2;
    uznum = strlen(*(char **)((int)pvVar1 + 0x16c));
    uVar3 = curlx_uztoui(uznum);
    responses->length = uVar3;
  }
  return;
}



void __regparm2 FUN_0004c940(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  size_t sVar3;
  int unaff_EBX;
  int in_stack_00000010;
  undefined4 *in_stack_00000018;
  int *in_stack_0000001c;
  
  entry(param_2,0x4c947);
  if (in_stack_00000010 == 1) {
    iVar1 = *in_stack_0000001c;
    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));
    *in_stack_00000018 = uVar2;
    sVar3 = strlen(*(char **)(iVar1 + 0x16c));
    uVar2 = FUN_0005a1f0(sVar3);
    in_stack_00000018[1] = uVar2;
  }
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x63e99
SUB ESP,0x4
CMP dword ptr [ESP + 0x20],0x1
JNZ 0x0004c992
MOV EAX,dword ptr [ESP + 0x2c]
SUB ESP,0xc
MOV ESI,dword ptr [EAX]
LEA EAX,[EBX + 0x884]
PUSH dword ptr [ESI + 0x16c]
CALL dword ptr [EAX]
MOV EDX,dword ptr [ESP + 0x38]
MOV dword ptr [EDX],EAX
POP EAX
PUSH dword ptr [ESI + 0x16c]
CALL 0x00018850
MOV dword ptr [ESP],EAX
CALL 0x0005a1f0
MOV ECX,dword ptr [ESP + 0x38]
ADD ESP,0x10
MOV dword ptr [ECX + 0x4],EAX
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "void __regparm2 FUN_0004c940(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}\n\n" (function_definition "void __regparm2 FUN_0004c940(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0004c940(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_stack_00000010;" primitive_type identifier ;) (declaration "undefined4 *in_stack_00000018;" type_identifier (pointer_declarator "*in_stack_00000018" * identifier) ;) (declaration "int *in_stack_0000001c;" primitive_type (pointer_declarator "*in_stack_0000001c" * identifier) ;) (expression_statement "entry(param_2,0x4c947);" (call_expression "entry(param_2,0x4c947)" identifier (argument_list "(param_2,0x4c947)" ( identifier , number_literal ))) ;) (if_statement "if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }" if (parenthesized_expression "(in_stack_00000010 == 1)" ( (binary_expression "in_stack_00000010 == 1" identifier == number_literal) )) (compound_statement "{\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }" { (expression_statement "iVar1 = *in_stack_0000001c;" (assignment_expression "iVar1 = *in_stack_0000001c" identifier = (pointer_expression "*in_stack_0000001c" * identifier)) ;) (expression_statement "uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));" (assignment_expression "uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c))" identifier = (call_expression "(**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c))" (parenthesized_expression "(**(code **)(unaff_EBX + 0x6471d))" ( (pointer_expression "**(code **)(unaff_EBX + 0x6471d)" * (pointer_expression "*(code **)(unaff_EBX + 0x6471d)" * (cast_expression "(code **)(unaff_EBX + 0x6471d)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x6471d)" ( (binary_expression "unaff_EBX + 0x6471d" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(iVar1 + 0x16c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x16c)" * (cast_expression "(undefined4 *)(iVar1 + 0x16c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x16c)" ( (binary_expression "iVar1 + 0x16c" identifier + number_literal) )))) )))) ;) (expression_statement "*in_stack_00000018 = uVar2;" (assignment_expression "*in_stack_00000018 = uVar2" (pointer_expression "*in_stack_00000018" * identifier) = identifier) ;) (expression_statement "sVar3 = strlen(*(char **)(iVar1 + 0x16c));" (assignment_expression "sVar3 = strlen(*(char **)(iVar1 + 0x16c))" identifier = (call_expression "strlen(*(char **)(iVar1 + 0x16c))" identifier (argument_list "(*(char **)(iVar1 + 0x16c))" ( (pointer_expression "*(char **)(iVar1 + 0x16c)" * (cast_expression "(char **)(iVar1 + 0x16c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x16c)" ( (binary_expression "iVar1 + 0x16c" identifier + number_literal) )))) )))) ;) (expression_statement "uVar2 = FUN_0005a1f0(sVar3);" (assignment_expression "uVar2 = FUN_0005a1f0(sVar3)" identifier = (call_expression "FUN_0005a1f0(sVar3)" identifier (argument_list "(sVar3)" ( identifier )))) ;) (expression_statement "in_stack_00000018[1] = uVar2;" (assignment_expression "in_stack_00000018[1] = uVar2" (subscript_expression "in_stack_00000018[1]" identifier [ number_literal ]) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid kbd_callback(char *name,int name_len,char *instruction,int instruction_len,int num_prompts,\n                 LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses\n                 ,void **abstract)\n\n{\n  void *pvVar1;\n  char *pcVar2;\n  size_t uznum;\n  uint uVar3;\n  \n  if (num_prompts == 1) {\n    pvVar1 = *abstract;\n    pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));\n    responses->text = pcVar2;\n    uznum = strlen(*(char **)((int)pvVar1 + 0x16c));\n    uVar3 = curlx_uztoui(uznum);\n    responses->length = uVar3;\n  }\n  return;\n}\n\n" comment comment (function_definition "void kbd_callback(char *name,int name_len,char *instruction,int instruction_len,int num_prompts,\n                 LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses\n                 ,void **abstract)\n\n{\n  void *pvVar1;\n  char *pcVar2;\n  size_t uznum;\n  uint uVar3;\n  \n  if (num_prompts == 1) {\n    pvVar1 = *abstract;\n    pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));\n    responses->text = pcVar2;\n    uznum = strlen(*(char **)((int)pvVar1 + 0x16c));\n    uVar3 = curlx_uztoui(uznum);\n    responses->length = uVar3;\n  }\n  return;\n}" primitive_type (function_declarator "kbd_callback(char *name,int name_len,char *instruction,int instruction_len,int num_prompts,\n                 LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses\n                 ,void **abstract)" identifier (parameter_list "(char *name,int name_len,char *instruction,int instruction_len,int num_prompts,\n                 LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses\n                 ,void **abstract)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "int name_len" primitive_type identifier) , (parameter_declaration "char *instruction" primitive_type (pointer_declarator "*instruction" * identifier)) , (parameter_declaration "int instruction_len" primitive_type identifier) , (parameter_declaration "int num_prompts" primitive_type identifier) , (parameter_declaration "LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts" type_identifier (pointer_declarator "*prompts" * identifier)) , (parameter_declaration "LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses" type_identifier (pointer_declarator "*responses" * identifier)) , (parameter_declaration "void **abstract" primitive_type (pointer_declarator "**abstract" * (pointer_declarator "*abstract" * identifier))) ))) (compound_statement "{\n  void *pvVar1;\n  char *pcVar2;\n  size_t uznum;\n  uint uVar3;\n  \n  if (num_prompts == 1) {\n    pvVar1 = *abstract;\n    pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));\n    responses->text = pcVar2;\n    uznum = strlen(*(char **)((int)pvVar1 + 0x16c));\n    uVar3 = curlx_uztoui(uznum);\n    responses->length = uVar3;\n  }\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t uznum;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (num_prompts == 1) {\n    pvVar1 = *abstract;\n    pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));\n    responses->text = pcVar2;\n    uznum = strlen(*(char **)((int)pvVar1 + 0x16c));\n    uVar3 = curlx_uztoui(uznum);\n    responses->length = uVar3;\n  }" if (parenthesized_expression "(num_prompts == 1)" ( (binary_expression "num_prompts == 1" identifier == number_literal) )) (compound_statement "{\n    pvVar1 = *abstract;\n    pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));\n    responses->text = pcVar2;\n    uznum = strlen(*(char **)((int)pvVar1 + 0x16c));\n    uVar3 = curlx_uztoui(uznum);\n    responses->length = uVar3;\n  }" { (expression_statement "pvVar1 = *abstract;" (assignment_expression "pvVar1 = *abstract" identifier = (pointer_expression "*abstract" * identifier)) ;) (expression_statement "pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));" (assignment_expression "pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c))" identifier = (call_expression "(*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c))" (parenthesized_expression "(*Curl_cstrdup)" ( (pointer_expression "*Curl_cstrdup" * identifier) )) (argument_list "(*(char **)((int)pvVar1 + 0x16c))" ( (pointer_expression "*(char **)((int)pvVar1 + 0x16c)" * (cast_expression "(char **)((int)pvVar1 + 0x16c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)pvVar1 + 0x16c)" ( (binary_expression "(int)pvVar1 + 0x16c" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) )))) ;) (expression_statement "responses->text = pcVar2;" (assignment_expression "responses->text = pcVar2" (field_expression "responses->text" identifier -> field_identifier) = identifier) ;) (expression_statement "uznum = strlen(*(char **)((int)pvVar1 + 0x16c));" (assignment_expression "uznum = strlen(*(char **)((int)pvVar1 + 0x16c))" identifier = (call_expression "strlen(*(char **)((int)pvVar1 + 0x16c))" identifier (argument_list "(*(char **)((int)pvVar1 + 0x16c))" ( (pointer_expression "*(char **)((int)pvVar1 + 0x16c)" * (cast_expression "(char **)((int)pvVar1 + 0x16c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)pvVar1 + 0x16c)" ( (binary_expression "(int)pvVar1 + 0x16c" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) )))) ;) (expression_statement "uVar3 = curlx_uztoui(uznum);" (assignment_expression "uVar3 = curlx_uztoui(uznum)" identifier = (call_expression "curlx_uztoui(uznum)" identifier (argument_list "(uznum)" ( identifier )))) ;) (expression_statement "responses->length = uVar3;" (assignment_expression "responses->length = uVar3" (field_expression "responses->length" identifier -> field_identifier) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm2 FUN_0004c940(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}\n\n" (function_definition "void __regparm2 FUN_0004c940(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0004c940(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_stack_00000010;" primitive_type identifier ;) (declaration "undefined4 *in_stack_00000018;" type_identifier (pointer_declarator "*in_stack_00000018" * identifier) ;) (declaration "int *in_stack_0000001c;" primitive_type (pointer_declarator "*in_stack_0000001c" * identifier) ;) (expression_statement "entry(param_2,0x4c947);" (call_expression "entry(param_2,0x4c947)" identifier (argument_list "(param_2,0x4c947)" ( identifier , number_literal ))) ;) (if_statement "if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }" if (parenthesized_expression "(in_stack_00000010 == 1)" ( (binary_expression "in_stack_00000010 == 1" identifier == number_literal) )) (compound_statement "{\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }" { (expression_statement "iVar1 = *in_stack_0000001c;" (assignment_expression "iVar1 = *in_stack_0000001c" identifier = (pointer_expression "*in_stack_0000001c" * identifier)) ;) (expression_statement "uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));" (assignment_expression "uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c))" identifier = (call_expression "(**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c))" (parenthesized_expression "(**(code **)(unaff_EBX + 0x6471d))" ( (pointer_expression "**(code **)(unaff_EBX + 0x6471d)" * (pointer_expression "*(code **)(unaff_EBX + 0x6471d)" * (cast_expression "(code **)(unaff_EBX + 0x6471d)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x6471d)" ( (binary_expression "unaff_EBX + 0x6471d" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(iVar1 + 0x16c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x16c)" * (cast_expression "(undefined4 *)(iVar1 + 0x16c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x16c)" ( (binary_expression "iVar1 + 0x16c" identifier + number_literal) )))) )))) ;) (expression_statement "*in_stack_00000018 = uVar2;" (assignment_expression "*in_stack_00000018 = uVar2" (pointer_expression "*in_stack_00000018" * identifier) = identifier) ;) (expression_statement "sVar3 = strlen(*(char **)(iVar1 + 0x16c));" (assignment_expression "sVar3 = strlen(*(char **)(iVar1 + 0x16c))" identifier = (call_expression "strlen(*(char **)(iVar1 + 0x16c))" identifier (argument_list "(*(char **)(iVar1 + 0x16c))" ( (pointer_expression "*(char **)(iVar1 + 0x16c)" * (cast_expression "(char **)(iVar1 + 0x16c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x16c)" ( (binary_expression "iVar1 + 0x16c" identifier + number_literal) )))) )))) ;) (expression_statement "uVar2 = FUN_0005a1f0(sVar3);" (assignment_expression "uVar2 = FUN_0005a1f0(sVar3)" identifier = (call_expression "FUN_0005a1f0(sVar3)" identifier (argument_list "(sVar3)" ( identifier )))) ;) (expression_statement "in_stack_00000018[1] = uVar2;" (assignment_expression "in_stack_00000018[1] = uVar2" (subscript_expression "in_stack_00000018[1]" identifier [ number_literal ]) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (return_statement return ;) })))
(function_definition "void __regparm2 FUN_0004c940(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_0004c940(undefined4 param_1,undefined4 param_2)" (identifier "FUN_0004c940") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int unaff_EBX;\n  int in_stack_00000010;\n  undefined4 *in_stack_00000018;\n  int *in_stack_0000001c;\n  \n  entry(param_2,0x4c947);\n  if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int in_stack_00000010;" (primitive_type "int") (identifier "in_stack_00000010") (; ";")) (declaration "undefined4 *in_stack_00000018;" (type_identifier "undefined4") (pointer_declarator "*in_stack_00000018" (* "*") (identifier "in_stack_00000018")) (; ";")) (declaration "int *in_stack_0000001c;" (primitive_type "int") (pointer_declarator "*in_stack_0000001c" (* "*") (identifier "in_stack_0000001c")) (; ";")) (expression_statement "entry(param_2,0x4c947);" (call_expression "entry(param_2,0x4c947)" (identifier "entry") (argument_list "(param_2,0x4c947)" (( "(") (identifier "param_2") (, ",") (number_literal "0x4c947") () ")"))) (; ";")) (if_statement "if (in_stack_00000010 == 1) {\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }" (if "if") (parenthesized_expression "(in_stack_00000010 == 1)" (( "(") (binary_expression "in_stack_00000010 == 1" (identifier "in_stack_00000010") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    iVar1 = *in_stack_0000001c;\n    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));\n    *in_stack_00000018 = uVar2;\n    sVar3 = strlen(*(char **)(iVar1 + 0x16c));\n    uVar2 = FUN_0005a1f0(sVar3);\n    in_stack_00000018[1] = uVar2;\n  }" ({ "{") (expression_statement "iVar1 = *in_stack_0000001c;" (assignment_expression "iVar1 = *in_stack_0000001c" (identifier "iVar1") (= "=") (pointer_expression "*in_stack_0000001c" (* "*") (identifier "in_stack_0000001c"))) (; ";")) (expression_statement "uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));" (assignment_expression "uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c))" (identifier "uVar2") (= "=") (call_expression "(**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c))" (parenthesized_expression "(**(code **)(unaff_EBX + 0x6471d))" (( "(") (pointer_expression "**(code **)(unaff_EBX + 0x6471d)" (* "*") (pointer_expression "*(code **)(unaff_EBX + 0x6471d)" (* "*") (cast_expression "(code **)(unaff_EBX + 0x6471d)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBX + 0x6471d)" (( "(") (binary_expression "unaff_EBX + 0x6471d" (identifier "unaff_EBX") (+ "+") (number_literal "0x6471d")) () ")"))))) () ")")) (argument_list "(*(undefined4 *)(iVar1 + 0x16c))" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x16c)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x16c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x16c)" (( "(") (binary_expression "iVar1 + 0x16c" (identifier "iVar1") (+ "+") (number_literal "0x16c")) () ")")))) () ")")))) (; ";")) (expression_statement "*in_stack_00000018 = uVar2;" (assignment_expression "*in_stack_00000018 = uVar2" (pointer_expression "*in_stack_00000018" (* "*") (identifier "in_stack_00000018")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "sVar3 = strlen(*(char **)(iVar1 + 0x16c));" (assignment_expression "sVar3 = strlen(*(char **)(iVar1 + 0x16c))" (identifier "sVar3") (= "=") (call_expression "strlen(*(char **)(iVar1 + 0x16c))" (identifier "strlen") (argument_list "(*(char **)(iVar1 + 0x16c))" (( "(") (pointer_expression "*(char **)(iVar1 + 0x16c)" (* "*") (cast_expression "(char **)(iVar1 + 0x16c)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + 0x16c)" (( "(") (binary_expression "iVar1 + 0x16c" (identifier "iVar1") (+ "+") (number_literal "0x16c")) () ")")))) () ")")))) (; ";")) (expression_statement "uVar2 = FUN_0005a1f0(sVar3);" (assignment_expression "uVar2 = FUN_0005a1f0(sVar3)" (identifier "uVar2") (= "=") (call_expression "FUN_0005a1f0(sVar3)" (identifier "FUN_0005a1f0") (argument_list "(sVar3)" (( "(") (identifier "sVar3") () ")")))) (; ";")) (expression_statement "in_stack_00000018[1] = uVar2;" (assignment_expression "in_stack_00000018[1] = uVar2" (subscript_expression "in_stack_00000018[1]" (identifier "in_stack_00000018") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void function_1(char *name,int name_len,char *instruction,int instruction_len,int var_1,
                 type_1 *prompts,type_2 *responses
                 ,void **abstract)

{
  void *pvVar1;
  char *pcVar2;
  size_t uznum;
  type_3 uVar3;
  
  if (var_1 == 1) {
    pvVar1 = *abstract;
    pcVar2 = (*Curl_cstrdup)(*(char **)((int)pvVar1 + 0x16c));
    responses->text = pcVar2;
    uznum = var_2(*(char **)((int)pvVar1 + 0x16c));
    uVar3 = var_3(uznum);
    responses->length = uVar3;
  }
  return;
}


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

void __regparm2 MASKED(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  size_t sVar3;
  int unaff_EBX;
  int in_stack_00000010;
  undefined4 *in_stack_00000018;
  int *in_stack_0000001c;
  
  entry(param_2,0x4c947);
  if (in_stack_00000010 == 1) {
    iVar1 = *in_stack_0000001c;
    uVar2 = (**(code **)(unaff_EBX + 0x6471d))(*(undefined4 *)(iVar1 + 0x16c));
    *in_stack_00000018 = uVar2;
    sVar3 = strlen(*(char **)(iVar1 + 0x16c));
    uVar2 = FUN_0005a1f0(sVar3);
    in_stack_00000018[1] = uVar2;
  }
  return;
}

