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

FontSpec * read_setting_fontspec(void *handle,char *name)

{
  char *pcVar1;
  char *pcVar2;
  FontSpec *pFVar3;
  
  pcVar1 = dupcat(name,"Name",0);
  pcVar2 = read_setting_s(handle,pcVar1);
  if (pcVar2 != (char *)0x0) {
    pFVar3 = fontspec_new(pcVar2);
    safefree(pcVar1);
    safefree(pcVar2);
    return pFVar3;
  }
  safefree(pcVar1);
  pcVar1 = read_setting_s(handle,name);
  if ((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) {
    pcVar2 = dupcat("server:",pcVar1,0);
    pFVar3 = fontspec_new(pcVar2);
    safefree(pcVar2);
    safefree(pcVar1);
    return pFVar3;
  }
  safefree(pcVar1);
  return (FontSpec *)0x0;
}



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

undefined4 FUN_0006c480(undefined4 param_1,undefined4 param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  
  uVar1 = FUN_0001ab20(param_2,"Name",0);
  iVar2 = FUN_0006c310(param_1,uVar1);
  if (iVar2 != 0) {
    uVar3 = FUN_00065e00(iVar2);
    FUN_0001b250(uVar1);
    FUN_0001b250(iVar2);
    return uVar3;
  }
  FUN_0001b250(uVar1);
  pcVar4 = (char *)FUN_0006c310(param_1,param_2);
  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
    uVar1 = FUN_0001ab20("server:",pcVar4,0);
    uVar3 = FUN_00065e00(uVar1);
    FUN_0001b250(uVar1);
    FUN_0001b250(pcVar4);
    return uVar3;
  }
  FUN_0001b250(pcVar4);
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014980
ADD EBX,0x3c8e7
SUB ESP,0x10
MOV EDI,dword ptr [ESP + 0x24]
PUSH 0x0
LEA EAX,[EBX + 0xfffc9cf2]
PUSH EAX
PUSH dword ptr [ESP + 0x30]
CALL 0x0001ab20
POP ECX
POP EBP
PUSH EAX
MOV ESI,EAX
PUSH EDI
CALL 0x0006c310
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006c4e8
SUB ESP,0xc
MOV EBP,EAX
PUSH EAX
CALL 0x00065e00
MOV dword ptr [ESP],ESI
MOV EDI,EAX
CALL 0x0001b250
MOV dword ptr [ESP],EBP
CALL 0x0001b250
ADD ESP,0x10
MOV EAX,EDI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH ESI
CALL 0x0001b250
POP EAX
POP EDX
PUSH dword ptr [ESP + 0x2c]
PUSH EDI
CALL 0x0006c310
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0006c550
CMP byte ptr [EAX],0x0
JZ 0x0006c550
SUB ESP,0x4
PUSH 0x0
PUSH EAX
LEA EAX,[EBX + 0xfffd7964]
PUSH EAX
CALL 0x0001ab20
MOV EBP,EAX
MOV dword ptr [ESP],EAX
CALL 0x00065e00
MOV dword ptr [ESP],EBP
MOV EDI,EAX
CALL 0x0001b250
MOV dword ptr [ESP],ESI
CALL 0x0001b250
ADD ESP,0x10
MOV EAX,EDI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
XOR EDI,EDI
PUSH ESI
CALL 0x0001b250
ADD ESP,0x10
MOV EAX,EDI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0006c480(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_0006c480(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}" type_identifier (function_declarator "FUN_0006c480(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (expression_statement "uVar1 = FUN_0001ab20(param_2,"Name",0);" (assignment_expression "uVar1 = FUN_0001ab20(param_2,"Name",0)" identifier = (call_expression "FUN_0001ab20(param_2,"Name",0)" identifier (argument_list "(param_2,"Name",0)" ( identifier , (string_literal ""Name"" " string_content ") , number_literal )))) ;) (expression_statement "iVar2 = FUN_0006c310(param_1,uVar1);" (assignment_expression "iVar2 = FUN_0006c310(param_1,uVar1)" identifier = (call_expression "FUN_0006c310(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }" { (expression_statement "uVar3 = FUN_00065e00(iVar2);" (assignment_expression "uVar3 = FUN_00065e00(iVar2)" identifier = (call_expression "FUN_00065e00(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b250(iVar2);" (call_expression "FUN_0001b250(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "pcVar4 = (char *)FUN_0006c310(param_1,param_2);" (assignment_expression "pcVar4 = (char *)FUN_0006c310(param_1,param_2)" identifier = (cast_expression "(char *)FUN_0006c310(param_1,param_2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006c310(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))))) ;) (if_statement "if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }" if (parenthesized_expression "((pcVar4 != (char *)0x0) && (*pcVar4 != '\0'))" ( (binary_expression "(pcVar4 != (char *)0x0) && (*pcVar4 != '\0')" (parenthesized_expression "(pcVar4 != (char *)0x0)" ( (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*pcVar4 != '\0')" ( (binary_expression "*pcVar4 != '\0'" (pointer_expression "*pcVar4" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }" { (expression_statement "uVar1 = FUN_0001ab20("server:",pcVar4,0);" (assignment_expression "uVar1 = FUN_0001ab20("server:",pcVar4,0)" identifier = (call_expression "FUN_0001ab20("server:",pcVar4,0)" identifier (argument_list "("server:",pcVar4,0)" ( (string_literal ""server:"" " string_content ") , identifier , number_literal )))) ;) (expression_statement "uVar3 = FUN_00065e00(uVar1);" (assignment_expression "uVar3 = FUN_00065e00(uVar1)" identifier = (call_expression "FUN_00065e00(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b250(pcVar4);" (call_expression "FUN_0001b250(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "FUN_0001b250(pcVar4);" (call_expression "FUN_0001b250(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nFontSpec * read_setting_fontspec(void *handle,char *name)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  FontSpec *pFVar3;\n  \n  pcVar1 = dupcat(name,"Name",0);\n  pcVar2 = read_setting_s(handle,pcVar1);\n  if (pcVar2 != (char *)0x0) {\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return pFVar3;\n  }\n  safefree(pcVar1);\n  pcVar1 = read_setting_s(handle,name);\n  if ((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) {\n    pcVar2 = dupcat("server:",pcVar1,0);\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar2);\n    safefree(pcVar1);\n    return pFVar3;\n  }\n  safefree(pcVar1);\n  return (FontSpec *)0x0;\n}\n\n" comment comment (function_definition "FontSpec * read_setting_fontspec(void *handle,char *name)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  FontSpec *pFVar3;\n  \n  pcVar1 = dupcat(name,"Name",0);\n  pcVar2 = read_setting_s(handle,pcVar1);\n  if (pcVar2 != (char *)0x0) {\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return pFVar3;\n  }\n  safefree(pcVar1);\n  pcVar1 = read_setting_s(handle,name);\n  if ((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) {\n    pcVar2 = dupcat("server:",pcVar1,0);\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar2);\n    safefree(pcVar1);\n    return pFVar3;\n  }\n  safefree(pcVar1);\n  return (FontSpec *)0x0;\n}" type_identifier (pointer_declarator "* read_setting_fontspec(void *handle,char *name)" * (function_declarator "read_setting_fontspec(void *handle,char *name)" identifier (parameter_list "(void *handle,char *name)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  FontSpec *pFVar3;\n  \n  pcVar1 = dupcat(name,"Name",0);\n  pcVar2 = read_setting_s(handle,pcVar1);\n  if (pcVar2 != (char *)0x0) {\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return pFVar3;\n  }\n  safefree(pcVar1);\n  pcVar1 = read_setting_s(handle,name);\n  if ((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) {\n    pcVar2 = dupcat("server:",pcVar1,0);\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar2);\n    safefree(pcVar1);\n    return pFVar3;\n  }\n  safefree(pcVar1);\n  return (FontSpec *)0x0;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "FontSpec *pFVar3;" type_identifier (pointer_declarator "*pFVar3" * identifier) ;) (expression_statement "pcVar1 = dupcat(name,"Name",0);" (assignment_expression "pcVar1 = dupcat(name,"Name",0)" identifier = (call_expression "dupcat(name,"Name",0)" identifier (argument_list "(name,"Name",0)" ( identifier , (string_literal ""Name"" " string_content ") , number_literal )))) ;) (expression_statement "pcVar2 = read_setting_s(handle,pcVar1);" (assignment_expression "pcVar2 = read_setting_s(handle,pcVar1)" identifier = (call_expression "read_setting_s(handle,pcVar1)" identifier (argument_list "(handle,pcVar1)" ( identifier , identifier )))) ;) (if_statement "if (pcVar2 != (char *)0x0) {\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return pFVar3;\n  }" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return pFVar3;\n  }" { (expression_statement "pFVar3 = fontspec_new(pcVar2);" (assignment_expression "pFVar3 = fontspec_new(pcVar2)" identifier = (call_expression "fontspec_new(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "safefree(pcVar2);" (call_expression "safefree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (return_statement "return pFVar3;" return identifier ;) })) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "pcVar1 = read_setting_s(handle,name);" (assignment_expression "pcVar1 = read_setting_s(handle,name)" identifier = (call_expression "read_setting_s(handle,name)" identifier (argument_list "(handle,name)" ( identifier , identifier )))) ;) (if_statement "if ((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) {\n    pcVar2 = dupcat("server:",pcVar1,0);\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar2);\n    safefree(pcVar1);\n    return pFVar3;\n  }" if (parenthesized_expression "((pcVar1 != (char *)0x0) && (*pcVar1 != '\0'))" ( (binary_expression "(pcVar1 != (char *)0x0) && (*pcVar1 != '\0')" (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*pcVar1 != '\0')" ( (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    pcVar2 = dupcat("server:",pcVar1,0);\n    pFVar3 = fontspec_new(pcVar2);\n    safefree(pcVar2);\n    safefree(pcVar1);\n    return pFVar3;\n  }" { (expression_statement "pcVar2 = dupcat("server:",pcVar1,0);" (assignment_expression "pcVar2 = dupcat("server:",pcVar1,0)" identifier = (call_expression "dupcat("server:",pcVar1,0)" identifier (argument_list "("server:",pcVar1,0)" ( (string_literal ""server:"" " string_content ") , identifier , number_literal )))) ;) (expression_statement "pFVar3 = fontspec_new(pcVar2);" (assignment_expression "pFVar3 = fontspec_new(pcVar2)" identifier = (call_expression "fontspec_new(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "safefree(pcVar2);" (call_expression "safefree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (return_statement "return pFVar3;" return identifier ;) })) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (return_statement "return (FontSpec *)0x0;" return (cast_expression "(FontSpec *)0x0" ( (type_descriptor "FontSpec *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "undefined4 FUN_0006c480(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0006c480(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}" type_identifier (function_declarator "FUN_0006c480(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (expression_statement "uVar1 = FUN_0001ab20(param_2,"Name",0);" (assignment_expression "uVar1 = FUN_0001ab20(param_2,"Name",0)" identifier = (call_expression "FUN_0001ab20(param_2,"Name",0)" identifier (argument_list "(param_2,"Name",0)" ( identifier , (string_literal ""Name"" " string_content ") , number_literal )))) ;) (expression_statement "iVar2 = FUN_0006c310(param_1,uVar1);" (assignment_expression "iVar2 = FUN_0006c310(param_1,uVar1)" identifier = (call_expression "FUN_0006c310(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }" { (expression_statement "uVar3 = FUN_00065e00(iVar2);" (assignment_expression "uVar3 = FUN_00065e00(iVar2)" identifier = (call_expression "FUN_00065e00(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b250(iVar2);" (call_expression "FUN_0001b250(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "pcVar4 = (char *)FUN_0006c310(param_1,param_2);" (assignment_expression "pcVar4 = (char *)FUN_0006c310(param_1,param_2)" identifier = (cast_expression "(char *)FUN_0006c310(param_1,param_2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006c310(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))))) ;) (if_statement "if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }" if (parenthesized_expression "((pcVar4 != (char *)0x0) && (*pcVar4 != '\0'))" ( (binary_expression "(pcVar4 != (char *)0x0) && (*pcVar4 != '\0')" (parenthesized_expression "(pcVar4 != (char *)0x0)" ( (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*pcVar4 != '\0')" ( (binary_expression "*pcVar4 != '\0'" (pointer_expression "*pcVar4" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }" { (expression_statement "uVar1 = FUN_0001ab20("server:",pcVar4,0);" (assignment_expression "uVar1 = FUN_0001ab20("server:",pcVar4,0)" identifier = (call_expression "FUN_0001ab20("server:",pcVar4,0)" identifier (argument_list "("server:",pcVar4,0)" ( (string_literal ""server:"" " string_content ") , identifier , number_literal )))) ;) (expression_statement "uVar3 = FUN_00065e00(uVar1);" (assignment_expression "uVar3 = FUN_00065e00(uVar1)" identifier = (call_expression "FUN_00065e00(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b250(pcVar4);" (call_expression "FUN_0001b250(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "FUN_0001b250(pcVar4);" (call_expression "FUN_0001b250(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0006c480(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0006c480(undefined4 param_1,undefined4 param_2)" (identifier "FUN_0006c480") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  \n  uVar1 = FUN_0001ab20(param_2,"Name",0);\n  iVar2 = FUN_0006c310(param_1,uVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }\n  FUN_0001b250(uVar1);\n  pcVar4 = (char *)FUN_0006c310(param_1,param_2);\n  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }\n  FUN_0001b250(pcVar4);\n  return 0;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (expression_statement "uVar1 = FUN_0001ab20(param_2,"Name",0);" (assignment_expression "uVar1 = FUN_0001ab20(param_2,"Name",0)" (identifier "uVar1") (= "=") (call_expression "FUN_0001ab20(param_2,"Name",0)" (identifier "FUN_0001ab20") (argument_list "(param_2,"Name",0)" (( "(") (identifier "param_2") (, ",") (string_literal ""Name"" (" """) (string_content "Name") (" """)) (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "iVar2 = FUN_0006c310(param_1,uVar1);" (assignment_expression "iVar2 = FUN_0006c310(param_1,uVar1)" (identifier "iVar2") (= "=") (call_expression "FUN_0006c310(param_1,uVar1)" (identifier "FUN_0006c310") (argument_list "(param_1,uVar1)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = FUN_00065e00(iVar2);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(iVar2);\n    return uVar3;\n  }" ({ "{") (expression_statement "uVar3 = FUN_00065e00(iVar2);" (assignment_expression "uVar3 = FUN_00065e00(iVar2)" (identifier "uVar3") (= "=") (call_expression "FUN_00065e00(iVar2)" (identifier "FUN_00065e00") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" (identifier "FUN_0001b250") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b250(iVar2);" (call_expression "FUN_0001b250(iVar2)" (identifier "FUN_0001b250") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" (identifier "FUN_0001b250") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "pcVar4 = (char *)FUN_0006c310(param_1,param_2);" (assignment_expression "pcVar4 = (char *)FUN_0006c310(param_1,param_2)" (identifier "pcVar4") (= "=") (cast_expression "(char *)FUN_0006c310(param_1,param_2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0006c310(param_1,param_2)" (identifier "FUN_0006c310") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))))) (; ";")) (if_statement "if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }" (if "if") (parenthesized_expression "((pcVar4 != (char *)0x0) && (*pcVar4 != '\0'))" (( "(") (binary_expression "(pcVar4 != (char *)0x0) && (*pcVar4 != '\0')" (parenthesized_expression "(pcVar4 != (char *)0x0)" (( "(") (binary_expression "pcVar4 != (char *)0x0" (identifier "pcVar4") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(*pcVar4 != '\0')" (( "(") (binary_expression "*pcVar4 != '\0'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    uVar1 = FUN_0001ab20("server:",pcVar4,0);\n    uVar3 = FUN_00065e00(uVar1);\n    FUN_0001b250(uVar1);\n    FUN_0001b250(pcVar4);\n    return uVar3;\n  }" ({ "{") (expression_statement "uVar1 = FUN_0001ab20("server:",pcVar4,0);" (assignment_expression "uVar1 = FUN_0001ab20("server:",pcVar4,0)" (identifier "uVar1") (= "=") (call_expression "FUN_0001ab20("server:",pcVar4,0)" (identifier "FUN_0001ab20") (argument_list "("server:",pcVar4,0)" (( "(") (string_literal ""server:"" (" """) (string_content "server:") (" """)) (, ",") (identifier "pcVar4") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "uVar3 = FUN_00065e00(uVar1);" (assignment_expression "uVar3 = FUN_00065e00(uVar1)" (identifier "uVar3") (= "=") (call_expression "FUN_00065e00(uVar1)" (identifier "FUN_00065e00") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "FUN_0001b250(uVar1);" (call_expression "FUN_0001b250(uVar1)" (identifier "FUN_0001b250") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b250(pcVar4);" (call_expression "FUN_0001b250(pcVar4)" (identifier "FUN_0001b250") (argument_list "(pcVar4)" (( "(") (identifier "pcVar4") () ")"))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "FUN_0001b250(pcVar4);" (call_expression "FUN_0001b250(pcVar4)" (identifier "FUN_0001b250") (argument_list "(pcVar4)" (( "(") (identifier "pcVar4") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

type_1 * function_1(void *handle,char *name)

{
  char *var_6;
  char *var_3;
  type_1 *pFVar3;
  
  var_6 = var_1(name,"Name",0);
  var_3 = var_2(handle,var_6);
  if (var_3 != (char *)0x0) {
    pFVar3 = var_4(var_3);
    var_5(var_6);
    var_5(var_3);
    return pFVar3;
  }
  var_5(var_6);
  var_6 = var_2(handle,name);
  if ((var_6 != (char *)0x0) && (*var_6 != '\0')) {
    var_3 = var_1("server:",var_6,0);
    pFVar3 = var_4(var_3);
    var_5(var_3);
    var_5(var_6);
    return pFVar3;
  }
  var_5(var_6);
  return (type_1 *)0x0;
}


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

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

undefined4 MASKED(undefined4 param_1,undefined4 param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  
  uVar1 = FUN_0001ab20(param_2,"Name",0);
  iVar2 = FUN_0006c310(param_1,uVar1);
  if (iVar2 != 0) {
    uVar3 = FUN_00065e00(iVar2);
    FUN_0001b250(uVar1);
    FUN_0001b250(iVar2);
    return uVar3;
  }
  FUN_0001b250(uVar1);
  pcVar4 = (char *)FUN_0006c310(param_1,param_2);
  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
    uVar1 = FUN_0001ab20("server:",pcVar4,0);
    uVar3 = FUN_00065e00(uVar1);
    FUN_0001b250(uVar1);
    FUN_0001b250(pcVar4);
    return uVar3;
  }
  FUN_0001b250(pcVar4);
  return 0;
}

