
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Removing unreachable block (ram,0x00279e61) */
/* WARNING: Removing unreachable block (ram,0x00279f78) */
/* WARNING: Removing unreachable block (ram,0x00279f84) */
/* WARNING: Removing unreachable block (ram,0x00279ee0) */

char * __cxa_demangle(int param_1,char *param_2,uint *param_3,undefined4 *param_4)

{
  int iVar1;
  size_t sVar2;
  char *__s;
  
  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {
    if (param_4 != (undefined4 *)0x0) {
      *param_4 = 0xfffffffd;
    }
  }
  else {
    __s = (char *)0x0;
    iVar1 = d_demangle_callback_constprop_21(0,0);
    if (iVar1 == 0) {
      free(__s);
    }
    else if (__s != (char *)0x0) {
      if (param_2 == (char *)0x0) {
        if (param_3 != (uint *)0x0) {
          *param_3 = 0;
        }
      }
      else {
        sVar2 = strlen(__s);
        if (sVar2 < *param_3) {
          memcpy(param_2,__s,sVar2 + 1);
          free(__s);
          __s = param_2;
        }
        else {
          free(param_2);
          *param_3 = 0;
        }
      }
      if (param_4 == (undefined4 *)0x0) {
        return __s;
      }
      *param_4 = 0;
      return __s;
    }
    if (param_4 != (undefined4 *)0x0) {
      *param_4 = 0xfffffffe;
      return (char *)0x0;
    }
  }
  return (char *)0x0;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Removing unreachable block (ram,0x00279e61) */
/* WARNING: Removing unreachable block (ram,0x00279f78) */
/* WARNING: Removing unreachable block (ram,0x00279f84) */
/* WARNING: Removing unreachable block (ram,0x00279ee0) */

char * FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)

{
  int iVar1;
  size_t sVar2;
  char *__s;
  
  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {
    if (param_4 != (undefined4 *)0x0) {
      *param_4 = 0xfffffffd;
    }
  }
  else {
    __s = (char *)0x0;
    iVar1 = FUN_00279830(0,0);
    if (iVar1 == 0) {
      free(__s);
    }
    else if (__s != (char *)0x0) {
      if (param_2 == (char *)0x0) {
        if (param_3 != (uint *)0x0) {
          *param_3 = 0;
        }
      }
      else {
        sVar2 = strlen(__s);
        if (sVar2 < *param_3) {
          memcpy(param_2,__s,sVar2 + 1);
          free(__s);
          __s = param_2;
        }
        else {
          free(param_2);
          *param_3 = 0;
        }
      }
      if (param_4 == (undefined4 *)0x0) {
        return __s;
      }
      *param_4 = 0;
      return __s;
    }
    if (param_4 != (undefined4 *)0x0) {
      *param_4 = 0xfffffffe;
      return (char *)0x0;
    }
  }
  return (char *)0x0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x115207
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
MOV ESI,dword ptr [ESP + 0x34]
TEST EAX,EAX
JZ 0x00279ef0
TEST ESI,ESI
JZ 0x00279e22
MOV EDX,dword ptr [ESP + 0x38]
TEST EDX,EDX
JZ 0x00279ef0
MOV ECX,ESP
LEA EDX,[EBX + 0xffee1590]
MOV dword ptr [ESP],0x0
MOV dword ptr [ESP + 0x4],0x0
MOV dword ptr [ESP + 0x8],0x0
MOV dword ptr [ESP + 0xc],0x0
CALL 0x00279830
TEST EAX,EAX
JZ 0x00279f50
MOV EBP,dword ptr [ESP + 0xc]
MOV EDI,dword ptr [ESP]
TEST EBP,EBP
JZ 0x00279ec8
MOV EBP,0x1
TEST EDI,EDI
JZ 0x00279f78
TEST ESI,ESI
JZ 0x00279f30
SUB ESP,0xc
PUSH EDI
CALL 0x000295f0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x38]
CMP EAX,dword ptr [EDX]
JNC 0x00279f10
SUB ESP,0x4
ADD EAX,0x1
PUSH EAX
PUSH EDI
PUSH ESI
CALL 0x000295c0
MOV dword ptr [ESP],EDI
MOV EDI,ESI
CALL 0x00029410
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x3c]
TEST EAX,EAX
JZ 0x00279ebb
MOV EAX,dword ptr [ESP + 0x3c]
MOV dword ptr [EAX],0x0
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBP,dword ptr [ESP + 0x8]
TEST EDI,EDI
JNZ 0x00279e6e
CMP dword ptr [ESP + 0x3c],0x0
JZ 0x00279f02
CMP EBP,0x1
JNZ 0x00279f67
MOV EAX,dword ptr [ESP + 0x3c]
XOR EDI,EDI
MOV dword ptr [EAX],0xffffffff
JMP 0x00279ebb
MOV ECX,dword ptr [ESP + 0x3c]
TEST ECX,ECX
JZ 0x00279f02
MOV EAX,dword ptr [ESP + 0x3c]
MOV dword ptr [EAX],0xfffffffd
XOR EDI,EDI
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH ESI
CALL 0x00029410
MOV EAX,dword ptr [ESP + 0x48]
ADD ESP,0x10
MOV dword ptr [EAX],EBP
JMP 0x00279ea9
MOV EDX,dword ptr [ESP + 0x38]
TEST EDX,EDX
JZ 0x00279ea9
MOV EAX,dword ptr [ESP + 0x38]
MOV dword ptr [EAX],EBP
JMP 0x00279ea9
SUB ESP,0xc
PUSH dword ptr [ESP + 0xc]
CALL 0x00029410
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x3c]
TEST EAX,EAX
JZ 0x00279f02
MOV EAX,dword ptr [ESP + 0x3c]
XOR EDI,EDI
MOV dword ptr [EAX],0xfffffffe
JMP 0x00279ebb
MOV ECX,dword ptr [ESP + 0x3c]
TEST ECX,ECX
JNZ 0x00279ee0
XOR EDI,EDI
JMP 0x00279f04
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Removing unreachable block (ram,0x00279e61) */\n/* WARNING: Removing unreachable block (ram,0x00279f78) */\n/* WARNING: Removing unreachable block (ram,0x00279f84) */\n/* WARNING: Removing unreachable block (ram,0x00279ee0) */\n\nchar * FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}\n\n" comment comment comment comment comment (function_definition "char * FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" * (function_declarator "FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (if_statement "if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" if (parenthesized_expression "((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0))))" ( (binary_expression "(param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) || (parenthesized_expression "((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" ( (parenthesized_expression "(param_2 != (char *)0x0 && (param_3 == (uint *)0x0))" ( (binary_expression "param_2 != (char *)0x0 && (param_3 == (uint *)0x0)" (binary_expression "param_2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) && (parenthesized_expression "(param_3 == (uint *)0x0)" ( (binary_expression "param_3 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (compound_statement "{\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }" { (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_4 = 0xfffffffd;\n    }" { (expression_statement "*param_4 = 0xfffffffd;" (assignment_expression "*param_4 = 0xfffffffd" (pointer_expression "*param_4" * identifier) = number_literal) ;) })) }) (else_clause "else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" else (compound_statement "{\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" { (expression_statement "__s = (char *)0x0;" (assignment_expression "__s = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar1 = FUN_00279830(0,0);" (assignment_expression "iVar1 = FUN_00279830(0,0)" identifier = (call_expression "FUN_00279830(0,0)" identifier (argument_list "(0,0)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      free(__s);\n    }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) }) (else_clause "else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" else (if_statement "if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" if (parenthesized_expression "(__s != (char *)0x0)" ( (binary_expression "__s != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" { (if_statement "if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }" { (if_statement "if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }" if (parenthesized_expression "(param_3 != (uint *)0x0)" ( (binary_expression "param_3 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *param_3 = 0;\n        }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) })) }) (else_clause "else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" else (compound_statement "{\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" { (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }" if (parenthesized_expression "(sVar2 < *param_3)" ( (binary_expression "sVar2 < *param_3" identifier < (pointer_expression "*param_3" * identifier)) )) (compound_statement "{\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }" { (expression_statement "memcpy(param_2,__s,sVar2 + 1);" (call_expression "memcpy(param_2,__s,sVar2 + 1)" identifier (argument_list "(param_2,__s,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "__s = param_2;" (assignment_expression "__s = param_2" identifier = identifier) ;) }) (else_clause "else {\n          free(param_2);\n          *param_3 = 0;\n        }" else (compound_statement "{\n          free(param_2);\n          *param_3 = 0;\n        }" { (expression_statement "free(param_2);" (call_expression "free(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) }))) }))) (if_statement "if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }" if (parenthesized_expression "(param_4 == (undefined4 *)0x0)" ( (binary_expression "param_4 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return __s;\n      }" { (return_statement "return __s;" return identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return __s;" return identifier ;) })))) (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" { (expression_statement "*param_4 = 0xfffffffe;" (assignment_expression "*param_4 = 0xfffffffe" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) }))) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Removing unreachable block (ram,0x00279e61) */\n/* WARNING: Removing unreachable block (ram,0x00279f78) */\n/* WARNING: Removing unreachable block (ram,0x00279f84) */\n/* WARNING: Removing unreachable block (ram,0x00279ee0) */\n\nchar * __cxa_demangle(int param_1,char *param_2,uint *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = d_demangle_callback_constprop_21(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}\n\n" comment comment comment comment comment (function_definition "char * __cxa_demangle(int param_1,char *param_2,uint *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = d_demangle_callback_constprop_21(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* __cxa_demangle(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" * (function_declarator "__cxa_demangle(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = d_demangle_callback_constprop_21(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (if_statement "if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = d_demangle_callback_constprop_21(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" if (parenthesized_expression "((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0))))" ( (binary_expression "(param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) || (parenthesized_expression "((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" ( (parenthesized_expression "(param_2 != (char *)0x0 && (param_3 == (uint *)0x0))" ( (binary_expression "param_2 != (char *)0x0 && (param_3 == (uint *)0x0)" (binary_expression "param_2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) && (parenthesized_expression "(param_3 == (uint *)0x0)" ( (binary_expression "param_3 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (compound_statement "{\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }" { (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_4 = 0xfffffffd;\n    }" { (expression_statement "*param_4 = 0xfffffffd;" (assignment_expression "*param_4 = 0xfffffffd" (pointer_expression "*param_4" * identifier) = number_literal) ;) })) }) (else_clause "else {\n    __s = (char *)0x0;\n    iVar1 = d_demangle_callback_constprop_21(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" else (compound_statement "{\n    __s = (char *)0x0;\n    iVar1 = d_demangle_callback_constprop_21(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" { (expression_statement "__s = (char *)0x0;" (assignment_expression "__s = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar1 = d_demangle_callback_constprop_21(0,0);" (assignment_expression "iVar1 = d_demangle_callback_constprop_21(0,0)" identifier = (call_expression "d_demangle_callback_constprop_21(0,0)" identifier (argument_list "(0,0)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      free(__s);\n    }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) }) (else_clause "else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" else (if_statement "if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" if (parenthesized_expression "(__s != (char *)0x0)" ( (binary_expression "__s != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" { (if_statement "if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }" { (if_statement "if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }" if (parenthesized_expression "(param_3 != (uint *)0x0)" ( (binary_expression "param_3 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *param_3 = 0;\n        }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) })) }) (else_clause "else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" else (compound_statement "{\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" { (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }" if (parenthesized_expression "(sVar2 < *param_3)" ( (binary_expression "sVar2 < *param_3" identifier < (pointer_expression "*param_3" * identifier)) )) (compound_statement "{\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }" { (expression_statement "memcpy(param_2,__s,sVar2 + 1);" (call_expression "memcpy(param_2,__s,sVar2 + 1)" identifier (argument_list "(param_2,__s,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "__s = param_2;" (assignment_expression "__s = param_2" identifier = identifier) ;) }) (else_clause "else {\n          free(param_2);\n          *param_3 = 0;\n        }" else (compound_statement "{\n          free(param_2);\n          *param_3 = 0;\n        }" { (expression_statement "free(param_2);" (call_expression "free(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) }))) }))) (if_statement "if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }" if (parenthesized_expression "(param_4 == (undefined4 *)0x0)" ( (binary_expression "param_4 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return __s;\n      }" { (return_statement "return __s;" return identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return __s;" return identifier ;) })))) (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" { (expression_statement "*param_4 = 0xfffffffe;" (assignment_expression "*param_4 = 0xfffffffe" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) }))) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "char * FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}\n\n" (function_definition "char * FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" * (function_declarator "FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (if_statement "if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" if (parenthesized_expression "((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0))))" ( (binary_expression "(param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) || (parenthesized_expression "((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" ( (parenthesized_expression "(param_2 != (char *)0x0 && (param_3 == (uint *)0x0))" ( (binary_expression "param_2 != (char *)0x0 && (param_3 == (uint *)0x0)" (binary_expression "param_2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) && (parenthesized_expression "(param_3 == (uint *)0x0)" ( (binary_expression "param_3 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (compound_statement "{\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }" { (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_4 = 0xfffffffd;\n    }" { (expression_statement "*param_4 = 0xfffffffd;" (assignment_expression "*param_4 = 0xfffffffd" (pointer_expression "*param_4" * identifier) = number_literal) ;) })) }) (else_clause "else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" else (compound_statement "{\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" { (expression_statement "__s = (char *)0x0;" (assignment_expression "__s = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar1 = FUN_00279830(0,0);" (assignment_expression "iVar1 = FUN_00279830(0,0)" identifier = (call_expression "FUN_00279830(0,0)" identifier (argument_list "(0,0)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      free(__s);\n    }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) }) (else_clause "else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" else (if_statement "if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" if (parenthesized_expression "(__s != (char *)0x0)" ( (binary_expression "__s != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" { (if_statement "if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }" { (if_statement "if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }" if (parenthesized_expression "(param_3 != (uint *)0x0)" ( (binary_expression "param_3 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *param_3 = 0;\n        }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) })) }) (else_clause "else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" else (compound_statement "{\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" { (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }" if (parenthesized_expression "(sVar2 < *param_3)" ( (binary_expression "sVar2 < *param_3" identifier < (pointer_expression "*param_3" * identifier)) )) (compound_statement "{\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }" { (expression_statement "memcpy(param_2,__s,sVar2 + 1);" (call_expression "memcpy(param_2,__s,sVar2 + 1)" identifier (argument_list "(param_2,__s,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "__s = param_2;" (assignment_expression "__s = param_2" identifier = identifier) ;) }) (else_clause "else {\n          free(param_2);\n          *param_3 = 0;\n        }" else (compound_statement "{\n          free(param_2);\n          *param_3 = 0;\n        }" { (expression_statement "free(param_2);" (call_expression "free(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) }))) }))) (if_statement "if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }" if (parenthesized_expression "(param_4 == (undefined4 *)0x0)" ( (binary_expression "param_4 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return __s;\n      }" { (return_statement "return __s;" return identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return __s;" return identifier ;) })))) (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" { (expression_statement "*param_4 = 0xfffffffe;" (assignment_expression "*param_4 = 0xfffffffe" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) }))) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) && (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }))) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return IDENT ;) })))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) }))) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "char * FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" (primitive_type "char") (pointer_declarator "* FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" (* "*") (function_declarator "FUN_00279df0(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" (identifier "FUN_00279df0") (parameter_list "(int param_1,char *param_2,uint *param_3,undefined4 *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")")))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__s;\n  \n  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }\n  return (char *)0x0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (if_statement "if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }\n  else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" (if "if") (parenthesized_expression "((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0))))" (( "(") (binary_expression "(param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))" (( "(") (parenthesized_expression "(param_2 != (char *)0x0 && (param_3 == (uint *)0x0))" (( "(") (binary_expression "param_2 != (char *)0x0 && (param_3 == (uint *)0x0)" (binary_expression "param_2 != (char *)0x0" (identifier "param_2") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (&& "&&") (parenthesized_expression "(param_3 == (uint *)0x0)" (( "(") (binary_expression "param_3 == (uint *)0x0" (identifier "param_3") (== "==") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }\n  }" ({ "{") (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffd;\n    }" (if "if") (parenthesized_expression "(param_4 != (undefined4 *)0x0)" (( "(") (binary_expression "param_4 != (undefined4 *)0x0" (identifier "param_4") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *param_4 = 0xfffffffd;\n    }" ({ "{") (expression_statement "*param_4 = 0xfffffffd;" (assignment_expression "*param_4 = 0xfffffffd" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0xfffffffd")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" (else "else") (compound_statement "{\n    __s = (char *)0x0;\n    iVar1 = FUN_00279830(0,0);\n    if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }\n    if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }\n  }" ({ "{") (expression_statement "__s = (char *)0x0;" (assignment_expression "__s = (char *)0x0" (identifier "__s") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "iVar1 = FUN_00279830(0,0);" (assignment_expression "iVar1 = FUN_00279830(0,0)" (identifier "iVar1") (= "=") (call_expression "FUN_00279830(0,0)" (identifier "FUN_00279830") (argument_list "(0,0)" (( "(") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      free(__s);\n    }\n    else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      free(__s);\n    }" ({ "{") (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (} "}")) (else_clause "else if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" (else "else") (if_statement "if (__s != (char *)0x0) {\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" (if "if") (parenthesized_expression "(__s != (char *)0x0)" (( "(") (binary_expression "__s != (char *)0x0" (identifier "__s") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }\n      if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }\n      *param_4 = 0;\n      return __s;\n    }" ({ "{") (if_statement "if (param_2 == (char *)0x0) {\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }\n      else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" (if "if") (parenthesized_expression "(param_2 == (char *)0x0)" (( "(") (binary_expression "param_2 == (char *)0x0" (identifier "param_2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }\n      }" ({ "{") (if_statement "if (param_3 != (uint *)0x0) {\n          *param_3 = 0;\n        }" (if "if") (parenthesized_expression "(param_3 != (uint *)0x0)" (( "(") (binary_expression "param_3 != (uint *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          *param_3 = 0;\n        }" ({ "{") (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" (else "else") (compound_statement "{\n        sVar2 = strlen(__s);\n        if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }\n      }" ({ "{") (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" (identifier "sVar2") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (if_statement "if (sVar2 < *param_3) {\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }\n        else {\n          free(param_2);\n          *param_3 = 0;\n        }" (if "if") (parenthesized_expression "(sVar2 < *param_3)" (( "(") (binary_expression "sVar2 < *param_3" (identifier "sVar2") (< "<") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) () ")")) (compound_statement "{\n          memcpy(param_2,__s,sVar2 + 1);\n          free(__s);\n          __s = param_2;\n        }" ({ "{") (expression_statement "memcpy(param_2,__s,sVar2 + 1);" (call_expression "memcpy(param_2,__s,sVar2 + 1)" (identifier "memcpy") (argument_list "(param_2,__s,sVar2 + 1)" (( "(") (identifier "param_2") (, ",") (identifier "__s") (, ",") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))) (; ";")) (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "__s = param_2;" (assignment_expression "__s = param_2" (identifier "__s") (= "=") (identifier "param_2")) (; ";")) (} "}")) (else_clause "else {\n          free(param_2);\n          *param_3 = 0;\n        }" (else "else") (compound_statement "{\n          free(param_2);\n          *param_3 = 0;\n        }" ({ "{") (expression_statement "free(param_2);" (call_expression "free(param_2)" (identifier "free") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}")))) (if_statement "if (param_4 == (undefined4 *)0x0) {\n        return __s;\n      }" (if "if") (parenthesized_expression "(param_4 == (undefined4 *)0x0)" (( "(") (binary_expression "param_4 == (undefined4 *)0x0" (identifier "param_4") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return __s;\n      }" ({ "{") (return_statement "return __s;" (return "return") (identifier "__s") (; ";")) (} "}"))) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (return_statement "return __s;" (return "return") (identifier "__s") (; ";")) (} "}"))))) (if_statement "if (param_4 != (undefined4 *)0x0) {\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" (if "if") (parenthesized_expression "(param_4 != (undefined4 *)0x0)" (( "(") (binary_expression "param_4 != (undefined4 *)0x0" (identifier "param_4") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *param_4 = 0xfffffffe;\n      return (char *)0x0;\n    }" ({ "{") (expression_statement "*param_4 = 0xfffffffe;" (assignment_expression "*param_4 = 0xfffffffe" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0xfffffffe")) (; ";")) (return_statement "return (char *)0x0;" (return "return") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (} "}")))) (return_statement "return (char *)0x0;" (return "return") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Removing unreachable block (ram,0x00279e61) */
/* WARNING: Removing unreachable block (ram,0x00279f78) */
/* WARNING: Removing unreachable block (ram,0x00279f84) */
/* WARNING: Removing unreachable block (ram,0x00279ee0) */

char * function_1(int var_1,char *var_2,type_1 *var_3,type_2 *var_4)

{
  int var_6;
  size_t var_10;
  char *var_8;
  
  if ((var_1 == 0) || ((var_2 != (char *)0x0 && (var_3 == (type_1 *)0x0)))) {
    if (var_4 != (type_2 *)0x0) {
      *var_4 = 0xfffffffd;
    }
  }
  else {
    var_8 = (char *)0x0;
    var_6 = var_5(0,0);
    if (var_6 == 0) {
      var_7(var_8);
    }
    else if (var_8 != (char *)0x0) {
      if (var_2 == (char *)0x0) {
        if (var_3 != (type_1 *)0x0) {
          *var_3 = 0;
        }
      }
      else {
        var_10 = var_9(var_8);
        if (var_10 < *var_3) {
          var_11(var_2,var_8,var_10 + 1);
          var_7(var_8);
          var_8 = var_2;
        }
        else {
          var_7(var_2);
          *var_3 = 0;
        }
      }
      if (var_4 == (type_2 *)0x0) {
        return var_8;
      }
      *var_4 = 0;
      return var_8;
    }
    if (var_4 != (type_2 *)0x0) {
      *var_4 = 0xfffffffe;
      return (char *)0x0;
    }
  }
  return (char *)0x0;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Removing unreachable block (ram,0x00279e61) */
/* WARNING: Removing unreachable block (ram,0x00279f78) */
/* WARNING: Removing unreachable block (ram,0x00279f84) */
/* WARNING: Removing unreachable block (ram,0x00279ee0) */

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

{
  int iVar1;
  size_t sVar2;
  char *__s;
  
  if ((param_1 == 0) || ((param_2 != (char *)0x0 && (param_3 == (uint *)0x0)))) {
    if (param_4 != (undefined4 *)0x0) {
      *param_4 = 0xfffffffd;
    }
  }
  else {
    __s = (char *)0x0;
    iVar1 = FUN_00279830(0,0);
    if (iVar1 == 0) {
      free(__s);
    }
    else if (__s != (char *)0x0) {
      if (param_2 == (char *)0x0) {
        if (param_3 != (uint *)0x0) {
          *param_3 = 0;
        }
      }
      else {
        sVar2 = strlen(__s);
        if (sVar2 < *param_3) {
          memcpy(param_2,__s,sVar2 + 1);
          free(__s);
          __s = param_2;
        }
        else {
          free(param_2);
          *param_3 = 0;
        }
      }
      if (param_4 == (undefined4 *)0x0) {
        return __s;
      }
      *param_4 = 0;
      return __s;
    }
    if (param_4 != (undefined4 *)0x0) {
      *param_4 = 0xfffffffe;
      return (char *)0x0;
    }
  }
  return (char *)0x0;
}

