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

void update_ERRNO_int(int errcode)

{
  wchar_t wVar1;
  size_t len;
  NODE *pNVar2;
  char *pcVar3;
  NODE *pNVar4;
  
  pcVar3 = "";
  update_PROCINFO_num("errno",(double)errcode);
  if (errcode != 0) {
    pcVar3 = strerror(errcode);
    pcVar3 = (char *)dcgettext(0,pcVar3);
  }
  pNVar4 = ERRNO_node;
  pNVar2 = *(NODE **)&ERRNO_node->sub;
  if ((pNVar2 != (NODE *)0x0) &&
     (wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,
     wVar1 < L'\x01')) {
    r_unref(pNVar2);
    pNVar4 = ERRNO_node;
  }
  len = strlen(pcVar3);
  pNVar2 = make_str_node(pcVar3,len,0);
  (pNVar4->sub).nodep.l.lptr = pNVar2;
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_00049020(int param_1)

{
  int iVar1;
  size_t sVar2;
  int iVar3;
  char *pcVar4;
  int *piVar5;
  
  pcVar4 = "";
  FUN_00058870("errno",(double)param_1);
  if (param_1 != 0) {
    pcVar4 = strerror(param_1);
    pcVar4 = (char *)dcgettext(0,pcVar4,5);
  }
  piVar5 = DAT_000c49d8;
  iVar3 = *DAT_000c49d8;
  if ((iVar3 != 0) &&
     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {
    FUN_000668b0(iVar3);
    piVar5 = DAT_000c49d8;
  }
  sVar2 = strlen(pcVar4);
  iVar3 = FUN_00067f10(pcVar4,sVar2,0);
  *piVar5 = iVar3;
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00016f50
ADD EBX,0x75cbb
SUB ESP,0x18
FILD dword ptr [ESP + 0x2c]
LEA EAX,[EBX + 0xfffd1819]
LEA ESI,[EBX + 0xfffd67ec]
FSTP qword ptr [ESP]
PUSH EAX
CALL 0x00058870
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x20]
TEST EAX,EAX
JNZ 0x00049098
LEA EBP,[EBX + 0x5cf4]
MOV EDI,dword ptr [EBP]
MOV EDX,dword ptr [EDI]
TEST EDX,EDX
JZ 0x00049072
MOV EAX,dword ptr [EDX + 0x10]
SUB EAX,0x1
TEST EAX,EAX
MOV dword ptr [EDX + 0x10],EAX
JLE 0x000490c0
SUB ESP,0xc
PUSH ESI
CALL 0x00014230
ADD ESP,0xc
PUSH 0x0
PUSH EAX
PUSH ESI
CALL 0x00067f10
MOV dword ptr [EDI],EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x2c]
CALL 0x00014180
ADD ESP,0xc
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x00013f40
ADD ESP,0x10
MOV ESI,EAX
JMP 0x00049056
SUB ESP,0xc
PUSH EDX
CALL 0x000668b0
MOV EDI,dword ptr [EBP]
ADD ESP,0x10
JMP 0x00049072
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00049020(int param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}\n\n" comment (function_definition "void FUN_00049020(int param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}" primitive_type (function_declarator "FUN_00049020(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ identifier = (string_literal """" " ")) ;) (expression_statement "FUN_00058870("errno",(double)param_1);" (call_expression "FUN_00058870("errno",(double)param_1)" identifier (argument_list "("errno",(double)param_1)" ( (string_literal ""errno"" " string_content ") , (cast_expression "(double)param_1" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (if_statement "if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }" { (expression_statement "pcVar4 = strerror(param_1);" (assignment_expression "pcVar4 = strerror(param_1)" identifier = (call_expression "strerror(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)dcgettext(0,pcVar4,5);" (assignment_expression "pcVar4 = (char *)dcgettext(0,pcVar4,5)" identifier = (cast_expression "(char *)dcgettext(0,pcVar4,5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,pcVar4,5)" identifier (argument_list "(0,pcVar4,5)" ( number_literal , identifier , number_literal ))))) ;) })) (expression_statement "piVar5 = DAT_000c49d8;" (assignment_expression "piVar5 = DAT_000c49d8" identifier = identifier) ;) (expression_statement "iVar3 = *DAT_000c49d8;" (assignment_expression "iVar3 = *DAT_000c49d8" identifier = (pointer_expression "*DAT_000c49d8" * identifier)) ;) (if_statement "if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }" if (parenthesized_expression "((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1))" ( (binary_expression "(iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)" ( (comma_expression "iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1" (assignment_expression "iVar1 = *(int *)(iVar3 + 0x10) + -1" identifier = (binary_expression "*(int *)(iVar3 + 0x10) + -1" (pointer_expression "*(int *)(iVar3 + 0x10)" * (cast_expression "(int *)(iVar3 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x10)" ( (binary_expression "iVar3 + 0x10" identifier + number_literal) )))) + number_literal)) , (comma_expression "*(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1" (assignment_expression "*(int *)(iVar3 + 0x10) = iVar1" (pointer_expression "*(int *)(iVar3 + 0x10)" * (cast_expression "(int *)(iVar3 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x10)" ( (binary_expression "iVar3 + 0x10" identifier + number_literal) )))) = identifier) , (binary_expression "iVar1 < 1" identifier < number_literal))) ))) )) (compound_statement "{\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }" { (expression_statement "FUN_000668b0(iVar3);" (call_expression "FUN_000668b0(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "piVar5 = DAT_000c49d8;" (assignment_expression "piVar5 = DAT_000c49d8" identifier = identifier) ;) })) (expression_statement "sVar2 = strlen(pcVar4);" (assignment_expression "sVar2 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "iVar3 = FUN_00067f10(pcVar4,sVar2,0);" (assignment_expression "iVar3 = FUN_00067f10(pcVar4,sVar2,0)" identifier = (call_expression "FUN_00067f10(pcVar4,sVar2,0)" identifier (argument_list "(pcVar4,sVar2,0)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*piVar5 = iVar3;" (assignment_expression "*piVar5 = iVar3" (pointer_expression "*piVar5" * identifier) = 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 update_ERRNO_int(int errcode)\n\n{\n  wchar_t wVar1;\n  size_t len;\n  NODE *pNVar2;\n  char *pcVar3;\n  NODE *pNVar4;\n  \n  pcVar3 = "";\n  update_PROCINFO_num("errno",(double)errcode);\n  if (errcode != 0) {\n    pcVar3 = strerror(errcode);\n    pcVar3 = (char *)dcgettext(0,pcVar3);\n  }\n  pNVar4 = ERRNO_node;\n  pNVar2 = *(NODE **)&ERRNO_node->sub;\n  if ((pNVar2 != (NODE *)0x0) &&\n     (wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01')) {\n    r_unref(pNVar2);\n    pNVar4 = ERRNO_node;\n  }\n  len = strlen(pcVar3);\n  pNVar2 = make_str_node(pcVar3,len,0);\n  (pNVar4->sub).nodep.l.lptr = pNVar2;\n  return;\n}\n\n" comment comment (function_definition "void update_ERRNO_int(int errcode)\n\n{\n  wchar_t wVar1;\n  size_t len;\n  NODE *pNVar2;\n  char *pcVar3;\n  NODE *pNVar4;\n  \n  pcVar3 = "";\n  update_PROCINFO_num("errno",(double)errcode);\n  if (errcode != 0) {\n    pcVar3 = strerror(errcode);\n    pcVar3 = (char *)dcgettext(0,pcVar3);\n  }\n  pNVar4 = ERRNO_node;\n  pNVar2 = *(NODE **)&ERRNO_node->sub;\n  if ((pNVar2 != (NODE *)0x0) &&\n     (wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01')) {\n    r_unref(pNVar2);\n    pNVar4 = ERRNO_node;\n  }\n  len = strlen(pcVar3);\n  pNVar2 = make_str_node(pcVar3,len,0);\n  (pNVar4->sub).nodep.l.lptr = pNVar2;\n  return;\n}" primitive_type (function_declarator "update_ERRNO_int(int errcode)" identifier (parameter_list "(int errcode)" ( (parameter_declaration "int errcode" primitive_type identifier) ))) (compound_statement "{\n  wchar_t wVar1;\n  size_t len;\n  NODE *pNVar2;\n  char *pcVar3;\n  NODE *pNVar4;\n  \n  pcVar3 = "";\n  update_PROCINFO_num("errno",(double)errcode);\n  if (errcode != 0) {\n    pcVar3 = strerror(errcode);\n    pcVar3 = (char *)dcgettext(0,pcVar3);\n  }\n  pNVar4 = ERRNO_node;\n  pNVar2 = *(NODE **)&ERRNO_node->sub;\n  if ((pNVar2 != (NODE *)0x0) &&\n     (wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01')) {\n    r_unref(pNVar2);\n    pNVar4 = ERRNO_node;\n  }\n  len = strlen(pcVar3);\n  pNVar2 = make_str_node(pcVar3,len,0);\n  (pNVar4->sub).nodep.l.lptr = pNVar2;\n  return;\n}" { (declaration "wchar_t wVar1;" type_identifier identifier ;) (declaration "size_t len;" primitive_type identifier ;) (declaration "NODE *pNVar2;" type_identifier (pointer_declarator "*pNVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "NODE *pNVar4;" type_identifier (pointer_declarator "*pNVar4" * identifier) ;) (expression_statement "pcVar3 = "";" (assignment_expression "pcVar3 = """ identifier = (string_literal """" " ")) ;) (expression_statement "update_PROCINFO_num("errno",(double)errcode);" (call_expression "update_PROCINFO_num("errno",(double)errcode)" identifier (argument_list "("errno",(double)errcode)" ( (string_literal ""errno"" " string_content ") , (cast_expression "(double)errcode" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (if_statement "if (errcode != 0) {\n    pcVar3 = strerror(errcode);\n    pcVar3 = (char *)dcgettext(0,pcVar3);\n  }" if (parenthesized_expression "(errcode != 0)" ( (binary_expression "errcode != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar3 = strerror(errcode);\n    pcVar3 = (char *)dcgettext(0,pcVar3);\n  }" { (expression_statement "pcVar3 = strerror(errcode);" (assignment_expression "pcVar3 = strerror(errcode)" identifier = (call_expression "strerror(errcode)" identifier (argument_list "(errcode)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)dcgettext(0,pcVar3);" (assignment_expression "pcVar3 = (char *)dcgettext(0,pcVar3)" identifier = (cast_expression "(char *)dcgettext(0,pcVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,pcVar3)" identifier (argument_list "(0,pcVar3)" ( number_literal , identifier ))))) ;) })) (expression_statement "pNVar4 = ERRNO_node;" (assignment_expression "pNVar4 = ERRNO_node" identifier = identifier) ;) (expression_statement "pNVar2 = *(NODE **)&ERRNO_node->sub;" (assignment_expression "pNVar2 = *(NODE **)&ERRNO_node->sub" identifier = (pointer_expression "*(NODE **)&ERRNO_node->sub" * (cast_expression "(NODE **)&ERRNO_node->sub" ( (type_descriptor "NODE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (pointer_expression "&ERRNO_node->sub" & (field_expression "ERRNO_node->sub" identifier -> field_identifier))))) ;) (if_statement "if ((pNVar2 != (NODE *)0x0) &&\n     (wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01')) {\n    r_unref(pNVar2);\n    pNVar4 = ERRNO_node;\n  }" if (parenthesized_expression "((pNVar2 != (NODE *)0x0) &&\n     (wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01'))" ( (binary_expression "(pNVar2 != (NODE *)0x0) &&\n     (wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01')" (parenthesized_expression "(pNVar2 != (NODE *)0x0)" ( (binary_expression "pNVar2 != (NODE *)0x0" identifier != (cast_expression "(NODE *)0x0" ( (type_descriptor "NODE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01')" ( (comma_expression "wVar1 = (pNVar2->sub).val.sref + L'\xffffffff', (pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01'" (assignment_expression "wVar1 = (pNVar2->sub).val.sref + L'\xffffffff'" identifier = (binary_expression "(pNVar2->sub).val.sref + L'\xffffffff'" (field_expression "(pNVar2->sub).val.sref" (field_expression "(pNVar2->sub).val" (parenthesized_expression "(pNVar2->sub)" ( (field_expression "pNVar2->sub" identifier -> field_identifier) )) . field_identifier) . field_identifier) + (char_literal "L'\xffffffff'" L' escape_sequence character character character character '))) , (comma_expression "(pNVar2->sub).val.sref = wVar1,\n     wVar1 < L'\x01'" (assignment_expression "(pNVar2->sub).val.sref = wVar1" (field_expression "(pNVar2->sub).val.sref" (field_expression "(pNVar2->sub).val" (parenthesized_expression "(pNVar2->sub)" ( (field_expression "pNVar2->sub" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) , (binary_expression "wVar1 < L'\x01'" identifier < (char_literal "L'\x01'" L' escape_sequence ')))) ))) )) (compound_statement "{\n    r_unref(pNVar2);\n    pNVar4 = ERRNO_node;\n  }" { (expression_statement "r_unref(pNVar2);" (call_expression "r_unref(pNVar2)" identifier (argument_list "(pNVar2)" ( identifier ))) ;) (expression_statement "pNVar4 = ERRNO_node;" (assignment_expression "pNVar4 = ERRNO_node" identifier = identifier) ;) })) (expression_statement "len = strlen(pcVar3);" (assignment_expression "len = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "pNVar2 = make_str_node(pcVar3,len,0);" (assignment_expression "pNVar2 = make_str_node(pcVar3,len,0)" identifier = (call_expression "make_str_node(pcVar3,len,0)" identifier (argument_list "(pcVar3,len,0)" ( identifier , identifier , number_literal )))) ;) (expression_statement "(pNVar4->sub).nodep.l.lptr = pNVar2;" (assignment_expression "(pNVar4->sub).nodep.l.lptr = pNVar2" (field_expression "(pNVar4->sub).nodep.l.lptr" (field_expression "(pNVar4->sub).nodep.l" (field_expression "(pNVar4->sub).nodep" (parenthesized_expression "(pNVar4->sub)" ( (field_expression "pNVar4->sub" identifier -> field_identifier) )) . field_identifier) . field_identifier) . field_identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00049020(int param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}\n\n" (function_definition "void FUN_00049020(int param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}" primitive_type (function_declarator "FUN_00049020(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ identifier = (string_literal """" " ")) ;) (expression_statement "FUN_00058870("errno",(double)param_1);" (call_expression "FUN_00058870("errno",(double)param_1)" identifier (argument_list "("errno",(double)param_1)" ( (string_literal ""errno"" " string_content ") , (cast_expression "(double)param_1" ( (type_descriptor "double" primitive_type) ) identifier) ))) ;) (if_statement "if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }" { (expression_statement "pcVar4 = strerror(param_1);" (assignment_expression "pcVar4 = strerror(param_1)" identifier = (call_expression "strerror(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)dcgettext(0,pcVar4,5);" (assignment_expression "pcVar4 = (char *)dcgettext(0,pcVar4,5)" identifier = (cast_expression "(char *)dcgettext(0,pcVar4,5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,pcVar4,5)" identifier (argument_list "(0,pcVar4,5)" ( number_literal , identifier , number_literal ))))) ;) })) (expression_statement "piVar5 = DAT_000c49d8;" (assignment_expression "piVar5 = DAT_000c49d8" identifier = identifier) ;) (expression_statement "iVar3 = *DAT_000c49d8;" (assignment_expression "iVar3 = *DAT_000c49d8" identifier = (pointer_expression "*DAT_000c49d8" * identifier)) ;) (if_statement "if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }" if (parenthesized_expression "((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1))" ( (binary_expression "(iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)" ( (comma_expression "iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1" (assignment_expression "iVar1 = *(int *)(iVar3 + 0x10) + -1" identifier = (binary_expression "*(int *)(iVar3 + 0x10) + -1" (pointer_expression "*(int *)(iVar3 + 0x10)" * (cast_expression "(int *)(iVar3 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x10)" ( (binary_expression "iVar3 + 0x10" identifier + number_literal) )))) + number_literal)) , (comma_expression "*(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1" (assignment_expression "*(int *)(iVar3 + 0x10) = iVar1" (pointer_expression "*(int *)(iVar3 + 0x10)" * (cast_expression "(int *)(iVar3 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x10)" ( (binary_expression "iVar3 + 0x10" identifier + number_literal) )))) = identifier) , (binary_expression "iVar1 < 1" identifier < number_literal))) ))) )) (compound_statement "{\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }" { (expression_statement "FUN_000668b0(iVar3);" (call_expression "FUN_000668b0(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "piVar5 = DAT_000c49d8;" (assignment_expression "piVar5 = DAT_000c49d8" identifier = identifier) ;) })) (expression_statement "sVar2 = strlen(pcVar4);" (assignment_expression "sVar2 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "iVar3 = FUN_00067f10(pcVar4,sVar2,0);" (assignment_expression "iVar3 = FUN_00067f10(pcVar4,sVar2,0)" identifier = (call_expression "FUN_00067f10(pcVar4,sVar2,0)" identifier (argument_list "(pcVar4,sVar2,0)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*piVar5 = iVar3;" (assignment_expression "*piVar5 = iVar3" (pointer_expression "*piVar5" * identifier) = identifier) ;) (return_statement "return;" return ;) })))
(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 (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (string_literal " ")) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , IDENT , LIT ))))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) , (comma_expression (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) , (binary_expression IDENT < LIT))) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return ;) })))
(function_definition "void FUN_00049020(int param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00049020(int param_1)" (identifier "FUN_00049020") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  int iVar3;\n  char *pcVar4;\n  int *piVar5;\n  \n  pcVar4 = "";\n  FUN_00058870("errno",(double)param_1);\n  if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }\n  piVar5 = DAT_000c49d8;\n  iVar3 = *DAT_000c49d8;\n  if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }\n  sVar2 = strlen(pcVar4);\n  iVar3 = FUN_00067f10(pcVar4,sVar2,0);\n  *piVar5 = iVar3;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ (identifier "pcVar4") (= "=") (string_literal """" (" """) (" """))) (; ";")) (expression_statement "FUN_00058870("errno",(double)param_1);" (call_expression "FUN_00058870("errno",(double)param_1)" (identifier "FUN_00058870") (argument_list "("errno",(double)param_1)" (( "(") (string_literal ""errno"" (" """) (string_content "errno") (" """)) (, ",") (cast_expression "(double)param_1" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "param_1")) () ")"))) (; ";")) (if_statement "if (param_1 != 0) {\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pcVar4 = strerror(param_1);\n    pcVar4 = (char *)dcgettext(0,pcVar4,5);\n  }" ({ "{") (expression_statement "pcVar4 = strerror(param_1);" (assignment_expression "pcVar4 = strerror(param_1)" (identifier "pcVar4") (= "=") (call_expression "strerror(param_1)" (identifier "strerror") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "pcVar4 = (char *)dcgettext(0,pcVar4,5);" (assignment_expression "pcVar4 = (char *)dcgettext(0,pcVar4,5)" (identifier "pcVar4") (= "=") (cast_expression "(char *)dcgettext(0,pcVar4,5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "dcgettext(0,pcVar4,5)" (identifier "dcgettext") (argument_list "(0,pcVar4,5)" (( "(") (number_literal "0") (, ",") (identifier "pcVar4") (, ",") (number_literal "5") () ")"))))) (; ";")) (} "}"))) (expression_statement "piVar5 = DAT_000c49d8;" (assignment_expression "piVar5 = DAT_000c49d8" (identifier "piVar5") (= "=") (identifier "DAT_000c49d8")) (; ";")) (expression_statement "iVar3 = *DAT_000c49d8;" (assignment_expression "iVar3 = *DAT_000c49d8" (identifier "iVar3") (= "=") (pointer_expression "*DAT_000c49d8" (* "*") (identifier "DAT_000c49d8"))) (; ";")) (if_statement "if ((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }" (if "if") (parenthesized_expression "((iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1))" (( "(") (binary_expression "(iVar3 != 0) &&\n     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)" (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)" (( "(") (comma_expression "iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1" (assignment_expression "iVar1 = *(int *)(iVar3 + 0x10) + -1" (identifier "iVar1") (= "=") (binary_expression "*(int *)(iVar3 + 0x10) + -1" (pointer_expression "*(int *)(iVar3 + 0x10)" (* "*") (cast_expression "(int *)(iVar3 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x10)" (( "(") (binary_expression "iVar3 + 0x10" (identifier "iVar3") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (number_literal "-1"))) (, ",") (comma_expression "*(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1" (assignment_expression "*(int *)(iVar3 + 0x10) = iVar1" (pointer_expression "*(int *)(iVar3 + 0x10)" (* "*") (cast_expression "(int *)(iVar3 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x10)" (( "(") (binary_expression "iVar3 + 0x10" (identifier "iVar3") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "iVar1")) (, ",") (binary_expression "iVar1 < 1" (identifier "iVar1") (< "<") (number_literal "1")))) () ")"))) () ")")) (compound_statement "{\n    FUN_000668b0(iVar3);\n    piVar5 = DAT_000c49d8;\n  }" ({ "{") (expression_statement "FUN_000668b0(iVar3);" (call_expression "FUN_000668b0(iVar3)" (identifier "FUN_000668b0") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "piVar5 = DAT_000c49d8;" (assignment_expression "piVar5 = DAT_000c49d8" (identifier "piVar5") (= "=") (identifier "DAT_000c49d8")) (; ";")) (} "}"))) (expression_statement "sVar2 = strlen(pcVar4);" (assignment_expression "sVar2 = strlen(pcVar4)" (identifier "sVar2") (= "=") (call_expression "strlen(pcVar4)" (identifier "strlen") (argument_list "(pcVar4)" (( "(") (identifier "pcVar4") () ")")))) (; ";")) (expression_statement "iVar3 = FUN_00067f10(pcVar4,sVar2,0);" (assignment_expression "iVar3 = FUN_00067f10(pcVar4,sVar2,0)" (identifier "iVar3") (= "=") (call_expression "FUN_00067f10(pcVar4,sVar2,0)" (identifier "FUN_00067f10") (argument_list "(pcVar4,sVar2,0)" (( "(") (identifier "pcVar4") (, ",") (identifier "sVar2") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "*piVar5 = iVar3;" (assignment_expression "*piVar5 = iVar3" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (= "=") (identifier "iVar3")) (; ";")) (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(int var_2)

{
  type_1 var_6;
  size_t len;
  type_2 *var_5;
  char *pcVar3;
  type_2 *pNVar4;
  
  pcVar3 = "";
  var_1("errno",(double)var_2);
  if (var_2 != 0) {
    pcVar3 = var_3(var_2);
    pcVar3 = (char *)var_4(0,pcVar3);
  }
  pNVar4 = ERRNO_node;
  var_5 = *(type_2 **)&ERRNO_node->sub;
  if ((var_5 != (type_2 *)0x0) &&
     (var_6 = (var_5->sub).val.sref + L'\xffffffff', (var_5->sub).val.sref = var_6,
     var_6 < L'\x01')) {
    var_7(var_5);
    pNVar4 = ERRNO_node;
  }
  len = var_8(pcVar3);
  var_5 = var_9(pcVar3,len,0);
  (pNVar4->sub).nodep.l.lptr = var_5;
  return;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(int param_1)

{
  int iVar1;
  size_t sVar2;
  int iVar3;
  char *pcVar4;
  int *piVar5;
  
  pcVar4 = "";
  FUN_00058870("errno",(double)param_1);
  if (param_1 != 0) {
    pcVar4 = strerror(param_1);
    pcVar4 = (char *)dcgettext(0,pcVar4,5);
  }
  piVar5 = DAT_000c49d8;
  iVar3 = *DAT_000c49d8;
  if ((iVar3 != 0) &&
     (iVar1 = *(int *)(iVar3 + 0x10) + -1, *(int *)(iVar3 + 0x10) = iVar1, iVar1 < 1)) {
    FUN_000668b0(iVar3);
    piVar5 = DAT_000c49d8;
  }
  sVar2 = strlen(pcVar4);
  iVar3 = FUN_00067f10(pcVar4,sVar2,0);
  *piVar5 = iVar3;
  return;
}

