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

downloaded_file_t downloaded_file(downloaded_file_t mode,char *file)

{
  downloaded_file_t *pdVar1;
  char *key;
  undefined4 *value;
  
  if (mode == CHECK_FOR_FILE) {
    if (downloaded_files_hash != (hash_table *)0x0) {
      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);
      if (pdVar1 != (downloaded_file_t *)0x0) {
        return *pdVar1;
      }
    }
  }
  else {
    if (downloaded_files_hash == (hash_table *)0x0) {
      downloaded_files_hash = make_string_hash_table(0);
    }
    pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);
    if (pdVar1 != (downloaded_file_t *)0x0) {
      return *pdVar1;
    }
    if (mode == FILE_DOWNLOADED_NORMALLY) {
      value = &v2_7005;
    }
    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {
      value = &v1_7004;
    }
    else {
      value = (undefined4 *)0x0;
      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {
        value = &v3_7006;
      }
    }
    key = xstrdup(file);
    hash_table_put(downloaded_files_hash,key,value);
  }
  return FILE_NOT_ALREADY_DOWNLOADED;
}



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

undefined4 FUN_0001b510(int param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  undefined *puVar3;
  
  if (param_1 == 3) {
    if (DAT_000b1448 != 0) {
      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);
      if (puVar1 != (undefined4 *)0x0) {
        return *puVar1;
      }
    }
  }
  else {
    if (DAT_000b1448 == 0) {
      DAT_000b1448 = FUN_0002af10(0);
    }
    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);
    if (puVar1 != (undefined4 *)0x0) {
      return *puVar1;
    }
    if (param_1 == 1) {
      puVar3 = &DAT_000af018;
    }
    else if (param_1 == 0) {
      puVar3 = &DAT_000b1444;
    }
    else {
      puVar3 = (undefined *)0x0;
      if (param_1 == 2) {
        puVar3 = &DAT_000af014;
      }
    }
    uVar2 = FUN_00063020(param_2);
    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000190b0
ADD EBX,0x936b7
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [ESP + 0x24]
MOV EAX,dword ptr [EBX + 0x2878]
CMP ESI,0x3
JZ 0x0001b5a0
TEST EAX,EAX
JZ 0x0001b5d0
SUB ESP,0x8
PUSH EDI
PUSH EAX
CALL 0x0002a8d0
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0001b560
MOV EAX,dword ptr [EAX]
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP ESI,0x1
JZ 0x0001b5f0
TEST ESI,ESI
JZ 0x0001b5c0
CMP ESI,0x2
LEA EAX,[EBX + 0x444]
CMOVZ EBP,EAX
SUB ESP,0xc
PUSH EDI
CALL 0x00063020
ADD ESP,0xc
PUSH EBP
PUSH EAX
PUSH dword ptr [EBX + 0x2878]
CALL 0x0002aa50
ADD ESP,0x10
ADD ESP,0xc
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST EAX,EAX
JZ 0x0001b595
SUB ESP,0x8
PUSH EDI
PUSH EAX
CALL 0x0002a8d0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001b595
MOV EAX,dword ptr [EAX]
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EBP,[EBX + 0x2874]
JMP 0x0001b579
SUB ESP,0xc
PUSH 0x0
CALL 0x0002af10
ADD ESP,0x10
MOV dword ptr [EBX + 0x2878],EAX
JMP 0x0001b53d
LEA EBP,[EBX + 0x448]
JMP 0x0001b579
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0001b510(int param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_0001b510(int param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0001b510(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (if_statement "if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" if (parenthesized_expression "(param_1 == 3)" ( (binary_expression "param_1 == 3" identifier == number_literal) )) (compound_statement "{\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }" { (if_statement "if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }" if (parenthesized_expression "(DAT_000b1448 != 0)" ( (binary_expression "DAT_000b1448 != 0" identifier != number_literal) )) (compound_statement "{\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }" { (expression_statement "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);" (assignment_expression "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" identifier = (cast_expression "(undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002a8d0(DAT_000b1448,param_2)" identifier (argument_list "(DAT_000b1448,param_2)" ( identifier , identifier ))))) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return *puVar1;\n      }" { (return_statement "return *puVar1;" return (pointer_expression "*puVar1" * identifier) ;) })) })) }) (else_clause "else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" else (compound_statement "{\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" { (if_statement "if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }" if (parenthesized_expression "(DAT_000b1448 == 0)" ( (binary_expression "DAT_000b1448 == 0" identifier == number_literal) )) (compound_statement "{\n      DAT_000b1448 = FUN_0002af10(0);\n    }" { (expression_statement "DAT_000b1448 = FUN_0002af10(0);" (assignment_expression "DAT_000b1448 = FUN_0002af10(0)" identifier = (call_expression "FUN_0002af10(0)" identifier (argument_list "(0)" ( number_literal )))) ;) })) (expression_statement "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);" (assignment_expression "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" identifier = (cast_expression "(undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002a8d0(DAT_000b1448,param_2)" identifier (argument_list "(DAT_000b1448,param_2)" ( identifier , identifier ))))) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return *puVar1;\n    }" { (return_statement "return *puVar1;" return (pointer_expression "*puVar1" * identifier) ;) })) (if_statement "if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      puVar3 = &DAT_000af018;\n    }" { (expression_statement "puVar3 = &DAT_000af018;" (assignment_expression "puVar3 = &DAT_000af018" identifier = (pointer_expression "&DAT_000af018" & identifier)) ;) }) (else_clause "else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" else (if_statement "if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar3 = &DAT_000b1444;\n    }" { (expression_statement "puVar3 = &DAT_000b1444;" (assignment_expression "puVar3 = &DAT_000b1444" identifier = (pointer_expression "&DAT_000b1444" & identifier)) ;) }) (else_clause "else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" else (compound_statement "{\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" { (expression_statement "puVar3 = (undefined *)0x0;" (assignment_expression "puVar3 = (undefined *)0x0" identifier = (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }" if (parenthesized_expression "(param_1 == 2)" ( (binary_expression "param_1 == 2" identifier == number_literal) )) (compound_statement "{\n        puVar3 = &DAT_000af014;\n      }" { (expression_statement "puVar3 = &DAT_000af014;" (assignment_expression "puVar3 = &DAT_000af014" identifier = (pointer_expression "&DAT_000af014" & identifier)) ;) })) }))))) (expression_statement "uVar2 = FUN_00063020(param_2);" (assignment_expression "uVar2 = FUN_00063020(param_2)" identifier = (call_expression "FUN_00063020(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "FUN_0002aa50(DAT_000b1448,uVar2,puVar3);" (call_expression "FUN_0002aa50(DAT_000b1448,uVar2,puVar3)" identifier (argument_list "(DAT_000b1448,uVar2,puVar3)" ( identifier , identifier , 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\ndownloaded_file_t downloaded_file(downloaded_file_t mode,char *file)\n\n{\n  downloaded_file_t *pdVar1;\n  char *key;\n  undefined4 *value;\n  \n  if (mode == CHECK_FOR_FILE) {\n    if (downloaded_files_hash != (hash_table *)0x0) {\n      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n      if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }\n    }\n  }\n  else {\n    if (downloaded_files_hash == (hash_table *)0x0) {\n      downloaded_files_hash = make_string_hash_table(0);\n    }\n    pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n    if (pdVar1 != (downloaded_file_t *)0x0) {\n      return *pdVar1;\n    }\n    if (mode == FILE_DOWNLOADED_NORMALLY) {\n      value = &v2_7005;\n    }\n    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }\n    key = xstrdup(file);\n    hash_table_put(downloaded_files_hash,key,value);\n  }\n  return FILE_NOT_ALREADY_DOWNLOADED;\n}\n\n" comment comment (function_definition "downloaded_file_t downloaded_file(downloaded_file_t mode,char *file)\n\n{\n  downloaded_file_t *pdVar1;\n  char *key;\n  undefined4 *value;\n  \n  if (mode == CHECK_FOR_FILE) {\n    if (downloaded_files_hash != (hash_table *)0x0) {\n      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n      if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }\n    }\n  }\n  else {\n    if (downloaded_files_hash == (hash_table *)0x0) {\n      downloaded_files_hash = make_string_hash_table(0);\n    }\n    pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n    if (pdVar1 != (downloaded_file_t *)0x0) {\n      return *pdVar1;\n    }\n    if (mode == FILE_DOWNLOADED_NORMALLY) {\n      value = &v2_7005;\n    }\n    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }\n    key = xstrdup(file);\n    hash_table_put(downloaded_files_hash,key,value);\n  }\n  return FILE_NOT_ALREADY_DOWNLOADED;\n}" type_identifier (function_declarator "downloaded_file(downloaded_file_t mode,char *file)" identifier (parameter_list "(downloaded_file_t mode,char *file)" ( (parameter_declaration "downloaded_file_t mode" type_identifier identifier) , (parameter_declaration "char *file" primitive_type (pointer_declarator "*file" * identifier)) ))) (compound_statement "{\n  downloaded_file_t *pdVar1;\n  char *key;\n  undefined4 *value;\n  \n  if (mode == CHECK_FOR_FILE) {\n    if (downloaded_files_hash != (hash_table *)0x0) {\n      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n      if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }\n    }\n  }\n  else {\n    if (downloaded_files_hash == (hash_table *)0x0) {\n      downloaded_files_hash = make_string_hash_table(0);\n    }\n    pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n    if (pdVar1 != (downloaded_file_t *)0x0) {\n      return *pdVar1;\n    }\n    if (mode == FILE_DOWNLOADED_NORMALLY) {\n      value = &v2_7005;\n    }\n    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }\n    key = xstrdup(file);\n    hash_table_put(downloaded_files_hash,key,value);\n  }\n  return FILE_NOT_ALREADY_DOWNLOADED;\n}" { (declaration "downloaded_file_t *pdVar1;" type_identifier (pointer_declarator "*pdVar1" * identifier) ;) (declaration "char *key;" primitive_type (pointer_declarator "*key" * identifier) ;) (declaration "undefined4 *value;" type_identifier (pointer_declarator "*value" * identifier) ;) (if_statement "if (mode == CHECK_FOR_FILE) {\n    if (downloaded_files_hash != (hash_table *)0x0) {\n      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n      if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }\n    }\n  }\n  else {\n    if (downloaded_files_hash == (hash_table *)0x0) {\n      downloaded_files_hash = make_string_hash_table(0);\n    }\n    pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n    if (pdVar1 != (downloaded_file_t *)0x0) {\n      return *pdVar1;\n    }\n    if (mode == FILE_DOWNLOADED_NORMALLY) {\n      value = &v2_7005;\n    }\n    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }\n    key = xstrdup(file);\n    hash_table_put(downloaded_files_hash,key,value);\n  }" if (parenthesized_expression "(mode == CHECK_FOR_FILE)" ( (binary_expression "mode == CHECK_FOR_FILE" identifier == identifier) )) (compound_statement "{\n    if (downloaded_files_hash != (hash_table *)0x0) {\n      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n      if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }\n    }\n  }" { (if_statement "if (downloaded_files_hash != (hash_table *)0x0) {\n      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n      if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }\n    }" if (parenthesized_expression "(downloaded_files_hash != (hash_table *)0x0)" ( (binary_expression "downloaded_files_hash != (hash_table *)0x0" identifier != (cast_expression "(hash_table *)0x0" ( (type_descriptor "hash_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n      if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }\n    }" { (expression_statement "pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);" (assignment_expression "pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file)" identifier = (cast_expression "(downloaded_file_t *)hash_table_get(downloaded_files_hash,file)" ( (type_descriptor "downloaded_file_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "hash_table_get(downloaded_files_hash,file)" identifier (argument_list "(downloaded_files_hash,file)" ( identifier , identifier ))))) ;) (if_statement "if (pdVar1 != (downloaded_file_t *)0x0) {\n        return *pdVar1;\n      }" if (parenthesized_expression "(pdVar1 != (downloaded_file_t *)0x0)" ( (binary_expression "pdVar1 != (downloaded_file_t *)0x0" identifier != (cast_expression "(downloaded_file_t *)0x0" ( (type_descriptor "downloaded_file_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return *pdVar1;\n      }" { (return_statement "return *pdVar1;" return (pointer_expression "*pdVar1" * identifier) ;) })) })) }) (else_clause "else {\n    if (downloaded_files_hash == (hash_table *)0x0) {\n      downloaded_files_hash = make_string_hash_table(0);\n    }\n    pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n    if (pdVar1 != (downloaded_file_t *)0x0) {\n      return *pdVar1;\n    }\n    if (mode == FILE_DOWNLOADED_NORMALLY) {\n      value = &v2_7005;\n    }\n    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }\n    key = xstrdup(file);\n    hash_table_put(downloaded_files_hash,key,value);\n  }" else (compound_statement "{\n    if (downloaded_files_hash == (hash_table *)0x0) {\n      downloaded_files_hash = make_string_hash_table(0);\n    }\n    pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);\n    if (pdVar1 != (downloaded_file_t *)0x0) {\n      return *pdVar1;\n    }\n    if (mode == FILE_DOWNLOADED_NORMALLY) {\n      value = &v2_7005;\n    }\n    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }\n    key = xstrdup(file);\n    hash_table_put(downloaded_files_hash,key,value);\n  }" { (if_statement "if (downloaded_files_hash == (hash_table *)0x0) {\n      downloaded_files_hash = make_string_hash_table(0);\n    }" if (parenthesized_expression "(downloaded_files_hash == (hash_table *)0x0)" ( (binary_expression "downloaded_files_hash == (hash_table *)0x0" identifier == (cast_expression "(hash_table *)0x0" ( (type_descriptor "hash_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      downloaded_files_hash = make_string_hash_table(0);\n    }" { (expression_statement "downloaded_files_hash = make_string_hash_table(0);" (assignment_expression "downloaded_files_hash = make_string_hash_table(0)" identifier = (call_expression "make_string_hash_table(0)" identifier (argument_list "(0)" ( number_literal )))) ;) })) (expression_statement "pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file);" (assignment_expression "pdVar1 = (downloaded_file_t *)hash_table_get(downloaded_files_hash,file)" identifier = (cast_expression "(downloaded_file_t *)hash_table_get(downloaded_files_hash,file)" ( (type_descriptor "downloaded_file_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "hash_table_get(downloaded_files_hash,file)" identifier (argument_list "(downloaded_files_hash,file)" ( identifier , identifier ))))) ;) (if_statement "if (pdVar1 != (downloaded_file_t *)0x0) {\n      return *pdVar1;\n    }" if (parenthesized_expression "(pdVar1 != (downloaded_file_t *)0x0)" ( (binary_expression "pdVar1 != (downloaded_file_t *)0x0" identifier != (cast_expression "(downloaded_file_t *)0x0" ( (type_descriptor "downloaded_file_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return *pdVar1;\n    }" { (return_statement "return *pdVar1;" return (pointer_expression "*pdVar1" * identifier) ;) })) (if_statement "if (mode == FILE_DOWNLOADED_NORMALLY) {\n      value = &v2_7005;\n    }\n    else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }" if (parenthesized_expression "(mode == FILE_DOWNLOADED_NORMALLY)" ( (binary_expression "mode == FILE_DOWNLOADED_NORMALLY" identifier == identifier) )) (compound_statement "{\n      value = &v2_7005;\n    }" { (expression_statement "value = &v2_7005;" (assignment_expression "value = &v2_7005" identifier = (pointer_expression "&v2_7005" & identifier)) ;) }) (else_clause "else if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }" else (if_statement "if (mode == FILE_NOT_ALREADY_DOWNLOADED) {\n      value = &v1_7004;\n    }\n    else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }" if (parenthesized_expression "(mode == FILE_NOT_ALREADY_DOWNLOADED)" ( (binary_expression "mode == FILE_NOT_ALREADY_DOWNLOADED" identifier == identifier) )) (compound_statement "{\n      value = &v1_7004;\n    }" { (expression_statement "value = &v1_7004;" (assignment_expression "value = &v1_7004" identifier = (pointer_expression "&v1_7004" & identifier)) ;) }) (else_clause "else {\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }" else (compound_statement "{\n      value = (undefined4 *)0x0;\n      if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }\n    }" { (expression_statement "value = (undefined4 *)0x0;" (assignment_expression "value = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) {\n        value = &v3_7006;\n      }" if (parenthesized_expression "(mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED)" ( (binary_expression "mode == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED" identifier == identifier) )) (compound_statement "{\n        value = &v3_7006;\n      }" { (expression_statement "value = &v3_7006;" (assignment_expression "value = &v3_7006" identifier = (pointer_expression "&v3_7006" & identifier)) ;) })) }))))) (expression_statement "key = xstrdup(file);" (assignment_expression "key = xstrdup(file)" identifier = (call_expression "xstrdup(file)" identifier (argument_list "(file)" ( identifier )))) ;) (expression_statement "hash_table_put(downloaded_files_hash,key,value);" (call_expression "hash_table_put(downloaded_files_hash,key,value)" identifier (argument_list "(downloaded_files_hash,key,value)" ( identifier , identifier , identifier ))) ;) }))) (return_statement "return FILE_NOT_ALREADY_DOWNLOADED;" return identifier ;) })))
(translation_unit "undefined4 FUN_0001b510(int param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0001b510(int param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0001b510(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (if_statement "if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" if (parenthesized_expression "(param_1 == 3)" ( (binary_expression "param_1 == 3" identifier == number_literal) )) (compound_statement "{\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }" { (if_statement "if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }" if (parenthesized_expression "(DAT_000b1448 != 0)" ( (binary_expression "DAT_000b1448 != 0" identifier != number_literal) )) (compound_statement "{\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }" { (expression_statement "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);" (assignment_expression "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" identifier = (cast_expression "(undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002a8d0(DAT_000b1448,param_2)" identifier (argument_list "(DAT_000b1448,param_2)" ( identifier , identifier ))))) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return *puVar1;\n      }" { (return_statement "return *puVar1;" return (pointer_expression "*puVar1" * identifier) ;) })) })) }) (else_clause "else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" else (compound_statement "{\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" { (if_statement "if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }" if (parenthesized_expression "(DAT_000b1448 == 0)" ( (binary_expression "DAT_000b1448 == 0" identifier == number_literal) )) (compound_statement "{\n      DAT_000b1448 = FUN_0002af10(0);\n    }" { (expression_statement "DAT_000b1448 = FUN_0002af10(0);" (assignment_expression "DAT_000b1448 = FUN_0002af10(0)" identifier = (call_expression "FUN_0002af10(0)" identifier (argument_list "(0)" ( number_literal )))) ;) })) (expression_statement "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);" (assignment_expression "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" identifier = (cast_expression "(undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002a8d0(DAT_000b1448,param_2)" identifier (argument_list "(DAT_000b1448,param_2)" ( identifier , identifier ))))) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return *puVar1;\n    }" { (return_statement "return *puVar1;" return (pointer_expression "*puVar1" * identifier) ;) })) (if_statement "if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      puVar3 = &DAT_000af018;\n    }" { (expression_statement "puVar3 = &DAT_000af018;" (assignment_expression "puVar3 = &DAT_000af018" identifier = (pointer_expression "&DAT_000af018" & identifier)) ;) }) (else_clause "else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" else (if_statement "if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar3 = &DAT_000b1444;\n    }" { (expression_statement "puVar3 = &DAT_000b1444;" (assignment_expression "puVar3 = &DAT_000b1444" identifier = (pointer_expression "&DAT_000b1444" & identifier)) ;) }) (else_clause "else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" else (compound_statement "{\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" { (expression_statement "puVar3 = (undefined *)0x0;" (assignment_expression "puVar3 = (undefined *)0x0" identifier = (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }" if (parenthesized_expression "(param_1 == 2)" ( (binary_expression "param_1 == 2" identifier == number_literal) )) (compound_statement "{\n        puVar3 = &DAT_000af014;\n      }" { (expression_statement "puVar3 = &DAT_000af014;" (assignment_expression "puVar3 = &DAT_000af014" identifier = (pointer_expression "&DAT_000af014" & identifier)) ;) })) }))))) (expression_statement "uVar2 = FUN_00063020(param_2);" (assignment_expression "uVar2 = FUN_00063020(param_2)" identifier = (call_expression "FUN_00063020(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "FUN_0002aa50(DAT_000b1448,uVar2,puVar3);" (call_expression "FUN_0002aa50(DAT_000b1448,uVar2,puVar3)" identifier (argument_list "(DAT_000b1448,uVar2,puVar3)" ( identifier , identifier , 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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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 IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return (pointer_expression * IDENT) ;) })) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) })) (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 IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return (pointer_expression * IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) })) }))))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) }))) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0001b510(int param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001b510(int param_1,undefined4 param_2)" (identifier "FUN_0001b510") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  \n  if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }\n  return 0;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (if_statement "if (param_1 == 3) {\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }\n  else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" (if "if") (parenthesized_expression "(param_1 == 3)" (( "(") (binary_expression "param_1 == 3" (identifier "param_1") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n    if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }\n  }" ({ "{") (if_statement "if (DAT_000b1448 != 0) {\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }" (if "if") (parenthesized_expression "(DAT_000b1448 != 0)" (( "(") (binary_expression "DAT_000b1448 != 0" (identifier "DAT_000b1448") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n      if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }\n    }" ({ "{") (expression_statement "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);" (assignment_expression "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002a8d0(DAT_000b1448,param_2)" (identifier "FUN_0002a8d0") (argument_list "(DAT_000b1448,param_2)" (( "(") (identifier "DAT_000b1448") (, ",") (identifier "param_2") () ")"))))) (; ";")) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n        return *puVar1;\n      }" (if "if") (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 != (undefined4 *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return *puVar1;\n      }" ({ "{") (return_statement "return *puVar1;" (return "return") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" (else "else") (compound_statement "{\n    if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }\n    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);\n    if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }\n    if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }\n    uVar2 = FUN_00063020(param_2);\n    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);\n  }" ({ "{") (if_statement "if (DAT_000b1448 == 0) {\n      DAT_000b1448 = FUN_0002af10(0);\n    }" (if "if") (parenthesized_expression "(DAT_000b1448 == 0)" (( "(") (binary_expression "DAT_000b1448 == 0" (identifier "DAT_000b1448") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      DAT_000b1448 = FUN_0002af10(0);\n    }" ({ "{") (expression_statement "DAT_000b1448 = FUN_0002af10(0);" (assignment_expression "DAT_000b1448 = FUN_0002af10(0)" (identifier "DAT_000b1448") (= "=") (call_expression "FUN_0002af10(0)" (identifier "FUN_0002af10") (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (; ";")) (} "}"))) (expression_statement "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);" (assignment_expression "puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002a8d0(DAT_000b1448,param_2)" (identifier "FUN_0002a8d0") (argument_list "(DAT_000b1448,param_2)" (( "(") (identifier "DAT_000b1448") (, ",") (identifier "param_2") () ")"))))) (; ";")) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n      return *puVar1;\n    }" (if "if") (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 != (undefined4 *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return *puVar1;\n    }" ({ "{") (return_statement "return *puVar1;" (return "return") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (} "}"))) (if_statement "if (param_1 == 1) {\n      puVar3 = &DAT_000af018;\n    }\n    else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" (if "if") (parenthesized_expression "(param_1 == 1)" (( "(") (binary_expression "param_1 == 1" (identifier "param_1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      puVar3 = &DAT_000af018;\n    }" ({ "{") (expression_statement "puVar3 = &DAT_000af018;" (assignment_expression "puVar3 = &DAT_000af018" (identifier "puVar3") (= "=") (pointer_expression "&DAT_000af018" (& "&") (identifier "DAT_000af018"))) (; ";")) (} "}")) (else_clause "else if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" (else "else") (if_statement "if (param_1 == 0) {\n      puVar3 = &DAT_000b1444;\n    }\n    else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      puVar3 = &DAT_000b1444;\n    }" ({ "{") (expression_statement "puVar3 = &DAT_000b1444;" (assignment_expression "puVar3 = &DAT_000b1444" (identifier "puVar3") (= "=") (pointer_expression "&DAT_000b1444" (& "&") (identifier "DAT_000b1444"))) (; ";")) (} "}")) (else_clause "else {\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" (else "else") (compound_statement "{\n      puVar3 = (undefined *)0x0;\n      if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }\n    }" ({ "{") (expression_statement "puVar3 = (undefined *)0x0;" (assignment_expression "puVar3 = (undefined *)0x0" (identifier "puVar3") (= "=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (if_statement "if (param_1 == 2) {\n        puVar3 = &DAT_000af014;\n      }" (if "if") (parenthesized_expression "(param_1 == 2)" (( "(") (binary_expression "param_1 == 2" (identifier "param_1") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        puVar3 = &DAT_000af014;\n      }" ({ "{") (expression_statement "puVar3 = &DAT_000af014;" (assignment_expression "puVar3 = &DAT_000af014" (identifier "puVar3") (= "=") (pointer_expression "&DAT_000af014" (& "&") (identifier "DAT_000af014"))) (; ";")) (} "}"))) (} "}")))))) (expression_statement "uVar2 = FUN_00063020(param_2);" (assignment_expression "uVar2 = FUN_00063020(param_2)" (identifier "uVar2") (= "=") (call_expression "FUN_00063020(param_2)" (identifier "FUN_00063020") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "FUN_0002aa50(DAT_000b1448,uVar2,puVar3);" (call_expression "FUN_0002aa50(DAT_000b1448,uVar2,puVar3)" (identifier "FUN_0002aa50") (argument_list "(DAT_000b1448,uVar2,puVar3)" (( "(") (identifier "DAT_000b1448") (, ",") (identifier "uVar2") (, ",") (identifier "puVar3") () ")"))) (; ";")) (} "}")))) (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(type_1 var_1,char *file)

{
  type_1 *var_5;
  char *key;
  type_2 *value;
  
  if (var_1 == var_2) {
    if (var_3 != (type_3 *)0x0) {
      var_5 = (type_1 *)var_4(var_3,file);
      if (var_5 != (type_1 *)0x0) {
        return *var_5;
      }
    }
  }
  else {
    if (var_3 == (type_3 *)0x0) {
      var_3 = var_6(0);
    }
    var_5 = (type_1 *)var_4(var_3,file);
    if (var_5 != (type_1 *)0x0) {
      return *var_5;
    }
    if (var_1 == var_7) {
      value = &v2_7005;
    }
    else if (var_1 == var_8) {
      value = &v1_7004;
    }
    else {
      value = (type_2 *)0x0;
      if (var_1 == var_9) {
        value = &v3_7006;
      }
    }
    key = var_10(file);
    var_11(var_3,key,value);
  }
  return var_8;
}


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

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

undefined4 MASKED(int param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  undefined *puVar3;
  
  if (param_1 == 3) {
    if (DAT_000b1448 != 0) {
      puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);
      if (puVar1 != (undefined4 *)0x0) {
        return *puVar1;
      }
    }
  }
  else {
    if (DAT_000b1448 == 0) {
      DAT_000b1448 = FUN_0002af10(0);
    }
    puVar1 = (undefined4 *)FUN_0002a8d0(DAT_000b1448,param_2);
    if (puVar1 != (undefined4 *)0x0) {
      return *puVar1;
    }
    if (param_1 == 1) {
      puVar3 = &DAT_000af018;
    }
    else if (param_1 == 0) {
      puVar3 = &DAT_000b1444;
    }
    else {
      puVar3 = (undefined *)0x0;
      if (param_1 == 2) {
        puVar3 = &DAT_000af014;
      }
    }
    uVar2 = FUN_00063020(param_2);
    FUN_0002aa50(DAT_000b1448,uVar2,puVar3);
  }
  return 0;
}

