
char * tsafe_strerror(int code,char *ebp)

{
  char *__src;
  
  pthread_mutex_lock((pthread_mutex_t *)&strerr_mut);
  __src = (char *)safe_strerror(code);
  strncpy(ebp,__src,0x80);
  pthread_mutex_unlock((pthread_mutex_t *)&strerr_mut);
  ebp[0x7f] = '\0';
  return ebp;
}



char * FUN_001030bc(undefined4 param_1,char *param_2)

{
  char *__src;
  
  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);
  __src = (char *)safe_strerror(param_1);
  strncpy(param_2,__src,0x80);
  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);
  param_2[0x7f] = '\0';
  return param_2;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBP,EDI
MOV RBX,RSI
LEA RDI,[0x10a1c0]
CALL 0x00102360
MOV EDI,EBP
CALL 0x00102290
MOV EDX,0x80
MOV RSI,RAX
MOV RDI,RBX
CALL 0x001020b0
LEA RDI,[0x10a1c0]
CALL 0x00102240
MOV byte ptr [RBX + 0x7f],0x0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
(translation_unit "char * FUN_001030bc(undefined4 param_1,char *param_2)\n\n{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}\n\n" (function_definition "char * FUN_001030bc(undefined4 param_1,char *param_2)\n\n{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}" primitive_type (pointer_declarator "* FUN_001030bc(undefined4 param_1,char *param_2)" * (function_declarator "FUN_001030bc(undefined4 param_1,char *param_2)" identifier (parameter_list "(undefined4 param_1,char *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}" { (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0)" identifier (argument_list "((pthread_mutex_t *)&DAT_0010a1c0)" ( (cast_expression "(pthread_mutex_t *)&DAT_0010a1c0" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0010a1c0" & identifier)) ))) ;) (expression_statement "__src = (char *)safe_strerror(param_1);" (assignment_expression "__src = (char *)safe_strerror(param_1)" identifier = (cast_expression "(char *)safe_strerror(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safe_strerror(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "strncpy(param_2,__src,0x80);" (call_expression "strncpy(param_2,__src,0x80)" identifier (argument_list "(param_2,__src,0x80)" ( identifier , identifier , number_literal ))) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0)" identifier (argument_list "((pthread_mutex_t *)&DAT_0010a1c0)" ( (cast_expression "(pthread_mutex_t *)&DAT_0010a1c0" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0010a1c0" & identifier)) ))) ;) (expression_statement "param_2[0x7f] = '\0';" (assignment_expression "param_2[0x7f] = '\0'" (subscript_expression "param_2[0x7f]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "char * tsafe_strerror(int code,char *ebp)\n\n{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&strerr_mut);\n  __src = (char *)safe_strerror(code);\n  strncpy(ebp,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&strerr_mut);\n  ebp[0x7f] = '\0';\n  return ebp;\n}\n\n" (function_definition "char * tsafe_strerror(int code,char *ebp)\n\n{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&strerr_mut);\n  __src = (char *)safe_strerror(code);\n  strncpy(ebp,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&strerr_mut);\n  ebp[0x7f] = '\0';\n  return ebp;\n}" primitive_type (pointer_declarator "* tsafe_strerror(int code,char *ebp)" * (function_declarator "tsafe_strerror(int code,char *ebp)" identifier (parameter_list "(int code,char *ebp)" ( (parameter_declaration "int code" primitive_type identifier) , (parameter_declaration "char *ebp" primitive_type (pointer_declarator "*ebp" * identifier)) )))) (compound_statement "{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&strerr_mut);\n  __src = (char *)safe_strerror(code);\n  strncpy(ebp,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&strerr_mut);\n  ebp[0x7f] = '\0';\n  return ebp;\n}" { (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&strerr_mut);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&strerr_mut)" identifier (argument_list "((pthread_mutex_t *)&strerr_mut)" ( (cast_expression "(pthread_mutex_t *)&strerr_mut" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&strerr_mut" & identifier)) ))) ;) (expression_statement "__src = (char *)safe_strerror(code);" (assignment_expression "__src = (char *)safe_strerror(code)" identifier = (cast_expression "(char *)safe_strerror(code)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safe_strerror(code)" identifier (argument_list "(code)" ( identifier ))))) ;) (expression_statement "strncpy(ebp,__src,0x80);" (call_expression "strncpy(ebp,__src,0x80)" identifier (argument_list "(ebp,__src,0x80)" ( identifier , identifier , number_literal ))) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&strerr_mut);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&strerr_mut)" identifier (argument_list "((pthread_mutex_t *)&strerr_mut)" ( (cast_expression "(pthread_mutex_t *)&strerr_mut" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&strerr_mut" & identifier)) ))) ;) (expression_statement "ebp[0x7f] = '\0';" (assignment_expression "ebp[0x7f] = '\0'" (subscript_expression "ebp[0x7f]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return ebp;" return identifier ;) })))
(translation_unit "char * FUN_001030bc(undefined4 param_1,char *param_2)\n\n{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}\n\n" (function_definition "char * FUN_001030bc(undefined4 param_1,char *param_2)\n\n{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}" primitive_type (pointer_declarator "* FUN_001030bc(undefined4 param_1,char *param_2)" * (function_declarator "FUN_001030bc(undefined4 param_1,char *param_2)" identifier (parameter_list "(undefined4 param_1,char *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}" { (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0)" identifier (argument_list "((pthread_mutex_t *)&DAT_0010a1c0)" ( (cast_expression "(pthread_mutex_t *)&DAT_0010a1c0" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0010a1c0" & identifier)) ))) ;) (expression_statement "__src = (char *)safe_strerror(param_1);" (assignment_expression "__src = (char *)safe_strerror(param_1)" identifier = (cast_expression "(char *)safe_strerror(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safe_strerror(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "strncpy(param_2,__src,0x80);" (call_expression "strncpy(param_2,__src,0x80)" identifier (argument_list "(param_2,__src,0x80)" ( identifier , identifier , number_literal ))) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0)" identifier (argument_list "((pthread_mutex_t *)&DAT_0010a1c0)" ( (cast_expression "(pthread_mutex_t *)&DAT_0010a1c0" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0010a1c0" & identifier)) ))) ;) (expression_statement "param_2[0x7f] = '\0';" (assignment_expression "param_2[0x7f] = '\0'" (subscript_expression "param_2[0x7f]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' escape_sequence ')) ;) (return_statement return IDENT ;) })))
(function_definition "char * FUN_001030bc(undefined4 param_1,char *param_2)\n\n{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}" (primitive_type "char") (pointer_declarator "* FUN_001030bc(undefined4 param_1,char *param_2)" (* "*") (function_declarator "FUN_001030bc(undefined4 param_1,char *param_2)" (identifier "FUN_001030bc") (parameter_list "(undefined4 param_1,char *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  char *__src;\n  \n  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);\n  __src = (char *)safe_strerror(param_1);\n  strncpy(param_2,__src,0x80);\n  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);\n  param_2[0x7f] = '\0';\n  return param_2;\n}" ({ "{") (declaration "char *__src;" (primitive_type "char") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0)" (identifier "pthread_mutex_lock") (argument_list "((pthread_mutex_t *)&DAT_0010a1c0)" (( "(") (cast_expression "(pthread_mutex_t *)&DAT_0010a1c0" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_0010a1c0" (& "&") (identifier "DAT_0010a1c0"))) () ")"))) (; ";")) (expression_statement "__src = (char *)safe_strerror(param_1);" (assignment_expression "__src = (char *)safe_strerror(param_1)" (identifier "__src") (= "=") (cast_expression "(char *)safe_strerror(param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safe_strerror(param_1)" (identifier "safe_strerror") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "strncpy(param_2,__src,0x80);" (call_expression "strncpy(param_2,__src,0x80)" (identifier "strncpy") (argument_list "(param_2,__src,0x80)" (( "(") (identifier "param_2") (, ",") (identifier "__src") (, ",") (number_literal "0x80") () ")"))) (; ";")) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0)" (identifier "pthread_mutex_unlock") (argument_list "((pthread_mutex_t *)&DAT_0010a1c0)" (( "(") (cast_expression "(pthread_mutex_t *)&DAT_0010a1c0" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_0010a1c0" (& "&") (identifier "DAT_0010a1c0"))) () ")"))) (; ";")) (expression_statement "param_2[0x7f] = '\0';" (assignment_expression "param_2[0x7f] = '\0'" (subscript_expression "param_2[0x7f]" (identifier "param_2") ([ "[") (number_literal "0x7f") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

char * function_1(int code,char *ebp)

{
  char *__src;
  
  var_1((type_1 *)&strerr_mut);
  __src = (char *)var_2(code);
  var_3(ebp,__src,0x80);
  var_4((type_1 *)&strerr_mut);
  ebp[0x7f] = '\0';
  return ebp;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) (return_statement (identifier)))))

char * MASKED(undefined4 param_1,char *param_2)

{
  char *__src;
  
  pthread_mutex_lock((pthread_mutex_t *)&DAT_0010a1c0);
  __src = (char *)safe_strerror(param_1);
  strncpy(param_2,__src,0x80);
  pthread_mutex_unlock((pthread_mutex_t *)&DAT_0010a1c0);
  param_2[0x7f] = '\0';
  return param_2;
}

