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

char * mfile_name_concat(char *dir,char *base,char **base_in_result)

{
  char *pcVar1;
  size_t sVar2;
  size_t __n;
  uint uVar3;
  char *__dest;
  undefined1 *puVar4;
  undefined1 local_1d;
  
  pcVar1 = last_component(dir);
  sVar2 = base_len(pcVar1);
  pcVar1 = pcVar1 + (sVar2 - (int)dir);
  __n = strlen(base);
  if (sVar2 == 0) {
    uVar3 = (uint)(*base == '/');
    local_1d = 0x2e;
    if (*base != '/') {
      local_1d = 0;
    }
  }
  else if (dir[(int)(pcVar1 + -1)] == '/') {
    uVar3 = 0;
    local_1d = 0;
  }
  else {
    uVar3 = (uint)(*base != '/');
    local_1d = 0x2f;
    if (*base == '/') {
      local_1d = 0;
    }
  }
  __dest = (char *)malloc((size_t)(pcVar1 + uVar3 + __n + 1));
  if (__dest != (char *)0x0) {
    puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1);
    *puVar4 = local_1d;
    if (base_in_result != (char **)0x0) {
      *base_in_result = puVar4 + uVar3;
    }
    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n);
    *puVar4 = 0;
  }
  return __dest;
}



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

void * FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)

{
  int iVar1;
  int iVar2;
  size_t __n;
  uint uVar3;
  void *__dest;
  undefined1 *puVar4;
  size_t __n_00;
  undefined1 local_1d;
  
  iVar1 = FUN_0001d250(param_1);
  iVar2 = FUN_0001d2a0(iVar1);
  __n_00 = (iVar1 - (int)param_1) + iVar2;
  __n = strlen(param_2);
  if (iVar2 == 0) {
    uVar3 = (uint)(*param_2 == '/');
    local_1d = 0x2e;
    if (*param_2 != '/') {
      local_1d = 0;
    }
  }
  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {
    uVar3 = 0;
    local_1d = 0;
  }
  else {
    uVar3 = (uint)(*param_2 != '/');
    local_1d = 0x2f;
    if (*param_2 == '/') {
      local_1d = 0;
    }
  }
  __dest = malloc(__n_00 + 1 + __n + uVar3);
  if (__dest != (void *)0x0) {
    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);
    *puVar4 = local_1d;
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = puVar4 + uVar3;
    }
    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);
    *puVar4 = 0;
  }
  return __dest;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000132d0
ADD EBX,0x1d8f7
SUB ESP,0x28
PUSH dword ptr [ESP + 0x3c]
CALL 0x0001d250
MOV dword ptr [ESP],EAX
MOV ESI,EAX
CALL 0x0001d2a0
POP ECX
SUB ESI,dword ptr [ESP + 0x3c]
PUSH dword ptr [ESP + 0x40]
MOV EDI,EAX
ADD ESI,EAX
CALL 0x000124c0
ADD ESP,0x10
MOV dword ptr [ESP + 0x8],EAX
TEST EDI,EDI
JZ 0x0001d7e0
MOV EAX,dword ptr [ESP + 0x30]
CMP byte ptr [EAX + ESI*0x1 + -0x1],0x2f
JZ 0x0001d808
MOV EAX,dword ptr [ESP + 0x34]
MOV EDX,0x0
CMP byte ptr [EAX],0x2f
SETNZ AL
MOVZX EAX,AL
MOV EDI,EAX
MOV EAX,0x2f
CMOVZ EAX,EDX
MOV byte ptr [ESP + 0xf],AL
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x14]
LEA EAX,[ESI + EAX*0x1 + 0x1]
ADD EAX,EDI
PUSH EAX
CALL 0x000123e0
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0001d7d0
SUB ESP,0x4
PUSH ESI
PUSH dword ptr [ESP + 0x38]
PUSH EAX
CALL 0x00012600
MOVZX ECX,byte ptr [ESP + 0x1f]
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x38]
MOV byte ptr [EAX],CL
ADD EAX,EDI
TEST EDX,EDX
JZ 0x0001d7b9
MOV EDX,dword ptr [ESP + 0x38]
MOV dword ptr [EDX],EAX
SUB ESP,0x4
PUSH dword ptr [ESP + 0xc]
PUSH dword ptr [ESP + 0x3c]
PUSH EAX
CALL 0x00012600
ADD ESP,0x10
MOV byte ptr [EAX],0x0
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x34]
MOV EDX,0x0
CMP byte ptr [EAX],0x2f
SETZ AL
MOVZX EAX,AL
MOV EDI,EAX
MOV EAX,0x2e
CMOVNZ EAX,EDX
MOV byte ptr [ESP + 0xf],AL
JMP 0x0001d775
XOR EDI,EDI
MOV byte ptr [ESP + 0xf],0x0
JMP 0x0001d775
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}\n\n" comment (function_definition "void * FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" primitive_type (pointer_declarator "* FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)" * (function_declarator "FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)" identifier (parameter_list "(void *param_1,char *param_2,undefined4 *param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "size_t __n_00;" primitive_type identifier ;) (declaration "undefined1 local_1d;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_0001d250(param_1);" (assignment_expression "iVar1 = FUN_0001d250(param_1)" identifier = (call_expression "FUN_0001d250(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar2 = FUN_0001d2a0(iVar1);" (assignment_expression "iVar2 = FUN_0001d2a0(iVar1)" identifier = (call_expression "FUN_0001d2a0(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "__n_00 = (iVar1 - (int)param_1) + iVar2;" (assignment_expression "__n_00 = (iVar1 - (int)param_1) + iVar2" identifier = (binary_expression "(iVar1 - (int)param_1) + iVar2" (parenthesized_expression "(iVar1 - (int)param_1)" ( (binary_expression "iVar1 - (int)param_1" identifier - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )) + identifier)) ;) (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }" { (expression_statement "uVar3 = (uint)(*param_2 == '/');" (assignment_expression "uVar3 = (uint)(*param_2 == '/')" identifier = (call_expression "(uint)(*param_2 == '/')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )))) ;) (expression_statement "local_1d = 0x2e;" (assignment_expression "local_1d = 0x2e" identifier = number_literal) ;) (if_statement "if (*param_2 != '/') {\n      local_1d = 0;\n    }" if (parenthesized_expression "(*param_2 != '/')" ( (binary_expression "*param_2 != '/'" (pointer_expression "*param_2" * identifier) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n      local_1d = 0;\n    }" { (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) })) }) (else_clause "else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" else (if_statement "if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" if (parenthesized_expression "(*(char *)((int)param_1 + (__n_00 - 1)) == '/')" ( (binary_expression "*(char *)((int)param_1 + (__n_00 - 1)) == '/'" (pointer_expression "*(char *)((int)param_1 + (__n_00 - 1))" * (cast_expression "(char *)((int)param_1 + (__n_00 - 1))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + (__n_00 - 1))" ( (binary_expression "(int)param_1 + (__n_00 - 1)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(__n_00 - 1)" ( (binary_expression "__n_00 - 1" identifier - number_literal) ))) )))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n    uVar3 = 0;\n    local_1d = 0;\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" else (compound_statement "{\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" { (expression_statement "uVar3 = (uint)(*param_2 != '/');" (assignment_expression "uVar3 = (uint)(*param_2 != '/')" identifier = (call_expression "(uint)(*param_2 != '/')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_2 != '/')" ( (binary_expression "*param_2 != '/'" (pointer_expression "*param_2" * identifier) != (char_literal "'/'" ' character ')) )))) ;) (expression_statement "local_1d = 0x2f;" (assignment_expression "local_1d = 0x2f" identifier = number_literal) ;) (if_statement "if (*param_2 == '/') {\n      local_1d = 0;\n    }" if (parenthesized_expression "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      local_1d = 0;\n    }" { (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) })) }))))) (expression_statement "__dest = malloc(__n_00 + 1 + __n + uVar3);" (assignment_expression "__dest = malloc(__n_00 + 1 + __n + uVar3)" identifier = (call_expression "malloc(__n_00 + 1 + __n + uVar3)" identifier (argument_list "(__n_00 + 1 + __n + uVar3)" ( (binary_expression "__n_00 + 1 + __n + uVar3" (binary_expression "__n_00 + 1 + __n" (binary_expression "__n_00 + 1" identifier + number_literal) + identifier) + identifier) )))) ;) (if_statement "if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }" { (expression_statement "puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00)" identifier = (cast_expression "(undefined1 *)mempcpy(__dest,param_1,__n_00)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "mempcpy(__dest,param_1,__n_00)" identifier (argument_list "(__dest,param_1,__n_00)" ( identifier , identifier , identifier ))))) ;) (expression_statement "*puVar4 = local_1d;" (assignment_expression "*puVar4 = local_1d" (pointer_expression "*puVar4" * identifier) = identifier) ;) (if_statement "if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_3 = puVar4 + uVar3;\n    }" { (expression_statement "*param_3 = puVar4 + uVar3;" (assignment_expression "*param_3 = puVar4 + uVar3" (pointer_expression "*param_3" * identifier) = (binary_expression "puVar4 + uVar3" identifier + identifier)) ;) })) (expression_statement "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n)" identifier = (cast_expression "(undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "mempcpy(puVar4 + uVar3,param_2,__n)" identifier (argument_list "(puVar4 + uVar3,param_2,__n)" ( (binary_expression "puVar4 + uVar3" identifier + identifier) , identifier , identifier ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) })) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * mfile_name_concat(char *dir,char *base,char **base_in_result)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  size_t __n;\n  uint uVar3;\n  char *__dest;\n  undefined1 *puVar4;\n  undefined1 local_1d;\n  \n  pcVar1 = last_component(dir);\n  sVar2 = base_len(pcVar1);\n  pcVar1 = pcVar1 + (sVar2 - (int)dir);\n  __n = strlen(base);\n  if (sVar2 == 0) {\n    uVar3 = (uint)(*base == '/');\n    local_1d = 0x2e;\n    if (*base != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (dir[(int)(pcVar1 + -1)] == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = (char *)malloc((size_t)(pcVar1 + uVar3 + __n + 1));\n  if (__dest != (char *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1);\n    *puVar4 = local_1d;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}\n\n" comment comment (function_definition "char * mfile_name_concat(char *dir,char *base,char **base_in_result)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  size_t __n;\n  uint uVar3;\n  char *__dest;\n  undefined1 *puVar4;\n  undefined1 local_1d;\n  \n  pcVar1 = last_component(dir);\n  sVar2 = base_len(pcVar1);\n  pcVar1 = pcVar1 + (sVar2 - (int)dir);\n  __n = strlen(base);\n  if (sVar2 == 0) {\n    uVar3 = (uint)(*base == '/');\n    local_1d = 0x2e;\n    if (*base != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (dir[(int)(pcVar1 + -1)] == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = (char *)malloc((size_t)(pcVar1 + uVar3 + __n + 1));\n  if (__dest != (char *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1);\n    *puVar4 = local_1d;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" primitive_type (pointer_declarator "* mfile_name_concat(char *dir,char *base,char **base_in_result)" * (function_declarator "mfile_name_concat(char *dir,char *base,char **base_in_result)" identifier (parameter_list "(char *dir,char *base,char **base_in_result)" ( (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) , (parameter_declaration "char *base" primitive_type (pointer_declarator "*base" * identifier)) , (parameter_declaration "char **base_in_result" primitive_type (pointer_declarator "**base_in_result" * (pointer_declarator "*base_in_result" * identifier))) )))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  size_t __n;\n  uint uVar3;\n  char *__dest;\n  undefined1 *puVar4;\n  undefined1 local_1d;\n  \n  pcVar1 = last_component(dir);\n  sVar2 = base_len(pcVar1);\n  pcVar1 = pcVar1 + (sVar2 - (int)dir);\n  __n = strlen(base);\n  if (sVar2 == 0) {\n    uVar3 = (uint)(*base == '/');\n    local_1d = 0x2e;\n    if (*base != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (dir[(int)(pcVar1 + -1)] == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = (char *)malloc((size_t)(pcVar1 + uVar3 + __n + 1));\n  if (__dest != (char *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1);\n    *puVar4 = local_1d;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined1 local_1d;" type_identifier identifier ;) (expression_statement "pcVar1 = last_component(dir);" (assignment_expression "pcVar1 = last_component(dir)" identifier = (call_expression "last_component(dir)" identifier (argument_list "(dir)" ( identifier )))) ;) (expression_statement "sVar2 = base_len(pcVar1);" (assignment_expression "sVar2 = base_len(pcVar1)" identifier = (call_expression "base_len(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "pcVar1 = pcVar1 + (sVar2 - (int)dir);" (assignment_expression "pcVar1 = pcVar1 + (sVar2 - (int)dir)" identifier = (binary_expression "pcVar1 + (sVar2 - (int)dir)" identifier + (parenthesized_expression "(sVar2 - (int)dir)" ( (binary_expression "sVar2 - (int)dir" identifier - (cast_expression "(int)dir" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "__n = strlen(base);" (assignment_expression "__n = strlen(base)" identifier = (call_expression "strlen(base)" identifier (argument_list "(base)" ( identifier )))) ;) (if_statement "if (sVar2 == 0) {\n    uVar3 = (uint)(*base == '/');\n    local_1d = 0x2e;\n    if (*base != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (dir[(int)(pcVar1 + -1)] == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = (uint)(*base == '/');\n    local_1d = 0x2e;\n    if (*base != '/') {\n      local_1d = 0;\n    }\n  }" { (expression_statement "uVar3 = (uint)(*base == '/');" (assignment_expression "uVar3 = (uint)(*base == '/')" identifier = (call_expression "(uint)(*base == '/')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*base == '/')" ( (binary_expression "*base == '/'" (pointer_expression "*base" * identifier) == (char_literal "'/'" ' character ')) )))) ;) (expression_statement "local_1d = 0x2e;" (assignment_expression "local_1d = 0x2e" identifier = number_literal) ;) (if_statement "if (*base != '/') {\n      local_1d = 0;\n    }" if (parenthesized_expression "(*base != '/')" ( (binary_expression "*base != '/'" (pointer_expression "*base" * identifier) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n      local_1d = 0;\n    }" { (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) })) }) (else_clause "else if (dir[(int)(pcVar1 + -1)] == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }" else (if_statement "if (dir[(int)(pcVar1 + -1)] == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }" if (parenthesized_expression "(dir[(int)(pcVar1 + -1)] == '/')" ( (binary_expression "dir[(int)(pcVar1 + -1)] == '/'" (subscript_expression "dir[(int)(pcVar1 + -1)]" identifier [ (cast_expression "(int)(pcVar1 + -1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pcVar1 + -1)" ( (binary_expression "pcVar1 + -1" identifier + number_literal) ))) ]) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n    uVar3 = 0;\n    local_1d = 0;\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }" else (compound_statement "{\n    uVar3 = (uint)(*base != '/');\n    local_1d = 0x2f;\n    if (*base == '/') {\n      local_1d = 0;\n    }\n  }" { (expression_statement "uVar3 = (uint)(*base != '/');" (assignment_expression "uVar3 = (uint)(*base != '/')" identifier = (call_expression "(uint)(*base != '/')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*base != '/')" ( (binary_expression "*base != '/'" (pointer_expression "*base" * identifier) != (char_literal "'/'" ' character ')) )))) ;) (expression_statement "local_1d = 0x2f;" (assignment_expression "local_1d = 0x2f" identifier = number_literal) ;) (if_statement "if (*base == '/') {\n      local_1d = 0;\n    }" if (parenthesized_expression "(*base == '/')" ( (binary_expression "*base == '/'" (pointer_expression "*base" * identifier) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      local_1d = 0;\n    }" { (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) })) }))))) (expression_statement "__dest = (char *)malloc((size_t)(pcVar1 + uVar3 + __n + 1));" (assignment_expression "__dest = (char *)malloc((size_t)(pcVar1 + uVar3 + __n + 1))" identifier = (cast_expression "(char *)malloc((size_t)(pcVar1 + uVar3 + __n + 1))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc((size_t)(pcVar1 + uVar3 + __n + 1))" identifier (argument_list "((size_t)(pcVar1 + uVar3 + __n + 1))" ( (cast_expression "(size_t)(pcVar1 + uVar3 + __n + 1)" ( (type_descriptor "size_t" primitive_type) ) (parenthesized_expression "(pcVar1 + uVar3 + __n + 1)" ( (binary_expression "pcVar1 + uVar3 + __n + 1" (binary_expression "pcVar1 + uVar3 + __n" (binary_expression "pcVar1 + uVar3" identifier + identifier) + identifier) + number_literal) ))) ))))) ;) (if_statement "if (__dest != (char *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1);\n    *puVar4 = local_1d;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n);\n    *puVar4 = 0;\n  }" if (parenthesized_expression "(__dest != (char *)0x0)" ( (binary_expression "__dest != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1);\n    *puVar4 = local_1d;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n);\n    *puVar4 = 0;\n  }" { (expression_statement "puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1)" identifier = (cast_expression "(undefined1 *)mempcpy(__dest,dir,(size_t)pcVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "mempcpy(__dest,dir,(size_t)pcVar1)" identifier (argument_list "(__dest,dir,(size_t)pcVar1)" ( identifier , identifier , (cast_expression "(size_t)pcVar1" ( (type_descriptor "size_t" primitive_type) ) identifier) ))))) ;) (expression_statement "*puVar4 = local_1d;" (assignment_expression "*puVar4 = local_1d" (pointer_expression "*puVar4" * identifier) = identifier) ;) (if_statement "if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar4 + uVar3;\n    }" if (parenthesized_expression "(base_in_result != (char **)0x0)" ( (binary_expression "base_in_result != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      *base_in_result = puVar4 + uVar3;\n    }" { (expression_statement "*base_in_result = puVar4 + uVar3;" (assignment_expression "*base_in_result = puVar4 + uVar3" (pointer_expression "*base_in_result" * identifier) = (binary_expression "puVar4 + uVar3" identifier + identifier)) ;) })) (expression_statement "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,base,__n)" identifier = (cast_expression "(undefined1 *)mempcpy(puVar4 + uVar3,base,__n)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "mempcpy(puVar4 + uVar3,base,__n)" identifier (argument_list "(puVar4 + uVar3,base,__n)" ( (binary_expression "puVar4 + uVar3" identifier + identifier) , identifier , identifier ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) })) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "void * FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}\n\n" (function_definition "void * FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" primitive_type (pointer_declarator "* FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)" * (function_declarator "FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)" identifier (parameter_list "(void *param_1,char *param_2,undefined4 *param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "size_t __n_00;" primitive_type identifier ;) (declaration "undefined1 local_1d;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_0001d250(param_1);" (assignment_expression "iVar1 = FUN_0001d250(param_1)" identifier = (call_expression "FUN_0001d250(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar2 = FUN_0001d2a0(iVar1);" (assignment_expression "iVar2 = FUN_0001d2a0(iVar1)" identifier = (call_expression "FUN_0001d2a0(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "__n_00 = (iVar1 - (int)param_1) + iVar2;" (assignment_expression "__n_00 = (iVar1 - (int)param_1) + iVar2" identifier = (binary_expression "(iVar1 - (int)param_1) + iVar2" (parenthesized_expression "(iVar1 - (int)param_1)" ( (binary_expression "iVar1 - (int)param_1" identifier - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )) + identifier)) ;) (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }" { (expression_statement "uVar3 = (uint)(*param_2 == '/');" (assignment_expression "uVar3 = (uint)(*param_2 == '/')" identifier = (call_expression "(uint)(*param_2 == '/')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )))) ;) (expression_statement "local_1d = 0x2e;" (assignment_expression "local_1d = 0x2e" identifier = number_literal) ;) (if_statement "if (*param_2 != '/') {\n      local_1d = 0;\n    }" if (parenthesized_expression "(*param_2 != '/')" ( (binary_expression "*param_2 != '/'" (pointer_expression "*param_2" * identifier) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n      local_1d = 0;\n    }" { (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) })) }) (else_clause "else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" else (if_statement "if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" if (parenthesized_expression "(*(char *)((int)param_1 + (__n_00 - 1)) == '/')" ( (binary_expression "*(char *)((int)param_1 + (__n_00 - 1)) == '/'" (pointer_expression "*(char *)((int)param_1 + (__n_00 - 1))" * (cast_expression "(char *)((int)param_1 + (__n_00 - 1))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + (__n_00 - 1))" ( (binary_expression "(int)param_1 + (__n_00 - 1)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(__n_00 - 1)" ( (binary_expression "__n_00 - 1" identifier - number_literal) ))) )))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n    uVar3 = 0;\n    local_1d = 0;\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" else (compound_statement "{\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" { (expression_statement "uVar3 = (uint)(*param_2 != '/');" (assignment_expression "uVar3 = (uint)(*param_2 != '/')" identifier = (call_expression "(uint)(*param_2 != '/')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_2 != '/')" ( (binary_expression "*param_2 != '/'" (pointer_expression "*param_2" * identifier) != (char_literal "'/'" ' character ')) )))) ;) (expression_statement "local_1d = 0x2f;" (assignment_expression "local_1d = 0x2f" identifier = number_literal) ;) (if_statement "if (*param_2 == '/') {\n      local_1d = 0;\n    }" if (parenthesized_expression "(*param_2 == '/')" ( (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" * identifier) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      local_1d = 0;\n    }" { (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" identifier = number_literal) ;) })) }))))) (expression_statement "__dest = malloc(__n_00 + 1 + __n + uVar3);" (assignment_expression "__dest = malloc(__n_00 + 1 + __n + uVar3)" identifier = (call_expression "malloc(__n_00 + 1 + __n + uVar3)" identifier (argument_list "(__n_00 + 1 + __n + uVar3)" ( (binary_expression "__n_00 + 1 + __n + uVar3" (binary_expression "__n_00 + 1 + __n" (binary_expression "__n_00 + 1" identifier + number_literal) + identifier) + identifier) )))) ;) (if_statement "if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }" { (expression_statement "puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00)" identifier = (cast_expression "(undefined1 *)mempcpy(__dest,param_1,__n_00)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "mempcpy(__dest,param_1,__n_00)" identifier (argument_list "(__dest,param_1,__n_00)" ( identifier , identifier , identifier ))))) ;) (expression_statement "*puVar4 = local_1d;" (assignment_expression "*puVar4 = local_1d" (pointer_expression "*puVar4" * identifier) = identifier) ;) (if_statement "if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_3 = puVar4 + uVar3;\n    }" { (expression_statement "*param_3 = puVar4 + uVar3;" (assignment_expression "*param_3 = puVar4 + uVar3" (pointer_expression "*param_3" * identifier) = (binary_expression "puVar4 + uVar3" identifier + identifier)) ;) })) (expression_statement "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n)" identifier = (cast_expression "(undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "mempcpy(puVar4 + uVar3,param_2,__n)" identifier (argument_list "(puVar4 + uVar3,param_2,__n)" ( (binary_expression "puVar4 + uVar3" identifier + identifier) , identifier , identifier ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) })) (return_statement "return __dest;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) )))) == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) != (char_literal ' character ')) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }))))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression (binary_expression (binary_expression IDENT + LIT) + IDENT) + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = 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) = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "void * FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" (primitive_type "void") (pointer_declarator "* FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)" (* "*") (function_declarator "FUN_0001d700(void *param_1,char *param_2,undefined4 *param_3)" (identifier "FUN_0001d700") (parameter_list "(void *param_1,char *param_2,undefined4 *param_3)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")")))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  size_t __n;\n  uint uVar3;\n  void *__dest;\n  undefined1 *puVar4;\n  size_t __n_00;\n  undefined1 local_1d;\n  \n  iVar1 = FUN_0001d250(param_1);\n  iVar2 = FUN_0001d2a0(iVar1);\n  __n_00 = (iVar1 - (int)param_1) + iVar2;\n  __n = strlen(param_2);\n  if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }\n  __dest = malloc(__n_00 + 1 + __n + uVar3);\n  if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }\n  return __dest;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "size_t __n_00;" (primitive_type "size_t") (identifier "__n_00") (; ";")) (declaration "undefined1 local_1d;" (type_identifier "undefined1") (identifier "local_1d") (; ";")) (expression_statement "iVar1 = FUN_0001d250(param_1);" (assignment_expression "iVar1 = FUN_0001d250(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_0001d250(param_1)" (identifier "FUN_0001d250") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar2 = FUN_0001d2a0(iVar1);" (assignment_expression "iVar2 = FUN_0001d2a0(iVar1)" (identifier "iVar2") (= "=") (call_expression "FUN_0001d2a0(iVar1)" (identifier "FUN_0001d2a0") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (expression_statement "__n_00 = (iVar1 - (int)param_1) + iVar2;" (assignment_expression "__n_00 = (iVar1 - (int)param_1) + iVar2" (identifier "__n_00") (= "=") (binary_expression "(iVar1 - (int)param_1) + iVar2" (parenthesized_expression "(iVar1 - (int)param_1)" (( "(") (binary_expression "iVar1 - (int)param_1" (identifier "iVar1") (- "-") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) () ")")) (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" (identifier "__n") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }\n  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = (uint)(*param_2 == '/');\n    local_1d = 0x2e;\n    if (*param_2 != '/') {\n      local_1d = 0;\n    }\n  }" ({ "{") (expression_statement "uVar3 = (uint)(*param_2 == '/');" (assignment_expression "uVar3 = (uint)(*param_2 == '/')" (identifier "uVar3") (= "=") (call_expression "(uint)(*param_2 == '/')" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*param_2 == '/')" (( "(") (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")))) (; ";")) (expression_statement "local_1d = 0x2e;" (assignment_expression "local_1d = 0x2e" (identifier "local_1d") (= "=") (number_literal "0x2e")) (; ";")) (if_statement "if (*param_2 != '/') {\n      local_1d = 0;\n    }" (if "if") (parenthesized_expression "(*param_2 != '/')" (( "(") (binary_expression "*param_2 != '/'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n      local_1d = 0;\n    }" ({ "{") (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" (identifier "local_1d") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")) (else_clause "else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" (else "else") (if_statement "if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {\n    uVar3 = 0;\n    local_1d = 0;\n  }\n  else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" (if "if") (parenthesized_expression "(*(char *)((int)param_1 + (__n_00 - 1)) == '/')" (( "(") (binary_expression "*(char *)((int)param_1 + (__n_00 - 1)) == '/'" (pointer_expression "*(char *)((int)param_1 + (__n_00 - 1))" (* "*") (cast_expression "(char *)((int)param_1 + (__n_00 - 1))" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + (__n_00 - 1))" (( "(") (binary_expression "(int)param_1 + (__n_00 - 1)" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (parenthesized_expression "(__n_00 - 1)" (( "(") (binary_expression "__n_00 - 1" (identifier "__n_00") (- "-") (number_literal "1")) () ")"))) () ")")))) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n    uVar3 = 0;\n    local_1d = 0;\n  }" ({ "{") (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" (identifier "local_1d") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" (else "else") (compound_statement "{\n    uVar3 = (uint)(*param_2 != '/');\n    local_1d = 0x2f;\n    if (*param_2 == '/') {\n      local_1d = 0;\n    }\n  }" ({ "{") (expression_statement "uVar3 = (uint)(*param_2 != '/');" (assignment_expression "uVar3 = (uint)(*param_2 != '/')" (identifier "uVar3") (= "=") (call_expression "(uint)(*param_2 != '/')" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*param_2 != '/')" (( "(") (binary_expression "*param_2 != '/'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")))) (; ";")) (expression_statement "local_1d = 0x2f;" (assignment_expression "local_1d = 0x2f" (identifier "local_1d") (= "=") (number_literal "0x2f")) (; ";")) (if_statement "if (*param_2 == '/') {\n      local_1d = 0;\n    }" (if "if") (parenthesized_expression "(*param_2 == '/')" (( "(") (binary_expression "*param_2 == '/'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n      local_1d = 0;\n    }" ({ "{") (expression_statement "local_1d = 0;" (assignment_expression "local_1d = 0" (identifier "local_1d") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")))))) (expression_statement "__dest = malloc(__n_00 + 1 + __n + uVar3);" (assignment_expression "__dest = malloc(__n_00 + 1 + __n + uVar3)" (identifier "__dest") (= "=") (call_expression "malloc(__n_00 + 1 + __n + uVar3)" (identifier "malloc") (argument_list "(__n_00 + 1 + __n + uVar3)" (( "(") (binary_expression "__n_00 + 1 + __n + uVar3" (binary_expression "__n_00 + 1 + __n" (binary_expression "__n_00 + 1" (identifier "__n_00") (+ "+") (number_literal "1")) (+ "+") (identifier "__n")) (+ "+") (identifier "uVar3")) () ")")))) (; ";")) (if_statement "if (__dest != (void *)0x0) {\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }" (if "if") (parenthesized_expression "(__dest != (void *)0x0)" (( "(") (binary_expression "__dest != (void *)0x0" (identifier "__dest") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);\n    *puVar4 = local_1d;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }\n    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);\n    *puVar4 = 0;\n  }" ({ "{") (expression_statement "puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)mempcpy(__dest,param_1,__n_00)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "mempcpy(__dest,param_1,__n_00)" (identifier "mempcpy") (argument_list "(__dest,param_1,__n_00)" (( "(") (identifier "__dest") (, ",") (identifier "param_1") (, ",") (identifier "__n_00") () ")"))))) (; ";")) (expression_statement "*puVar4 = local_1d;" (assignment_expression "*puVar4 = local_1d" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (identifier "local_1d")) (; ";")) (if_statement "if (param_3 != (undefined4 *)0x0) {\n      *param_3 = puVar4 + uVar3;\n    }" (if "if") (parenthesized_expression "(param_3 != (undefined4 *)0x0)" (( "(") (binary_expression "param_3 != (undefined4 *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *param_3 = puVar4 + uVar3;\n    }" ({ "{") (expression_statement "*param_3 = puVar4 + uVar3;" (assignment_expression "*param_3 = puVar4 + uVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "puVar4 + uVar3" (identifier "puVar4") (+ "+") (identifier "uVar3"))) (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);" (assignment_expression "puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "mempcpy(puVar4 + uVar3,param_2,__n)" (identifier "mempcpy") (argument_list "(puVar4 + uVar3,param_2,__n)" (( "(") (binary_expression "puVar4 + uVar3" (identifier "puVar4") (+ "+") (identifier "uVar3")) (, ",") (identifier "param_2") (, ",") (identifier "__n") () ")"))))) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return __dest;" (return "return") (identifier "__dest") (; ";")) (} "}")))

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

char * function_1(char *dir,char *base,char **var_11)

{
  char *var_3;
  size_t var_4;
  size_t var_8;
  type_1 var_7;
  char *var_9;
  type_2 *var_12;
  type_2 local_1d;
  
  var_3 = var_1(dir);
  var_4 = var_2(var_3);
  var_3 = var_3 + (var_4 - (int)dir);
  var_8 = var_5(base);
  if (var_4 == 0) {
    var_7 = (type_1)(*base == '/');
    local_1d = 0x2e;
    if (*base != '/') {
      local_1d = 0;
    }
  }
  else if (dir[(int)(var_3 + -1)] == '/') {
    var_7 = 0;
    local_1d = 0;
  }
  else {
    var_7 = (type_1)(*base != '/');
    local_1d = 0x2f;
    if (*base == '/') {
      local_1d = 0;
    }
  }
  var_9 = (char *)var_6((size_t)(var_3 + var_7 + var_8 + 1));
  if (var_9 != (char *)0x0) {
    var_12 = (type_2 *)var_10(var_9,dir,(size_t)var_3);
    *var_12 = local_1d;
    if (var_11 != (char **)0x0) {
      *var_11 = var_12 + var_7;
    }
    var_12 = (type_2 *)var_10(var_12 + var_7,base,var_8);
    *var_12 = 0;
  }
  return var_9;
}


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

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

void * MASKED(void *param_1,char *param_2,undefined4 *param_3)

{
  int iVar1;
  int iVar2;
  size_t __n;
  uint uVar3;
  void *__dest;
  undefined1 *puVar4;
  size_t __n_00;
  undefined1 local_1d;
  
  iVar1 = FUN_0001d250(param_1);
  iVar2 = FUN_0001d2a0(iVar1);
  __n_00 = (iVar1 - (int)param_1) + iVar2;
  __n = strlen(param_2);
  if (iVar2 == 0) {
    uVar3 = (uint)(*param_2 == '/');
    local_1d = 0x2e;
    if (*param_2 != '/') {
      local_1d = 0;
    }
  }
  else if (*(char *)((int)param_1 + (__n_00 - 1)) == '/') {
    uVar3 = 0;
    local_1d = 0;
  }
  else {
    uVar3 = (uint)(*param_2 != '/');
    local_1d = 0x2f;
    if (*param_2 == '/') {
      local_1d = 0;
    }
  }
  __dest = malloc(__n_00 + 1 + __n + uVar3);
  if (__dest != (void *)0x0) {
    puVar4 = (undefined1 *)mempcpy(__dest,param_1,__n_00);
    *puVar4 = local_1d;
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = puVar4 + uVar3;
    }
    puVar4 = (undefined1 *)mempcpy(puVar4 + uVar3,param_2,__n);
    *puVar4 = 0;
  }
  return __dest;
}

