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

int file_read(char *buf,uint size)

{
  uint n;
  bool bVar1;
  
  n = read_buffer(ifd,buf,size);
  if (n != 0) {
    if (n == 0xffffffff) {
                    /* WARNING: Subroutine does not return */
      read_error();
    }
    crc = updcrc((uch *)buf,n);
    bVar1 = CARRY4((uint)bytes_in,n);
    bytes_in._0_4_ = (uint)bytes_in + n;
    bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1;
  }
  return n;
}



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

uint FUN_0001d340(undefined4 param_1,undefined4 param_2)

{
  uint uVar1;
  bool bVar2;
  
  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);
  if (uVar1 != 0) {
    if (uVar1 == 0xffffffff) {
                    /* WARNING: Subroutine does not return */
      FUN_0001c870();
    }
    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);
    bVar2 = CARRY4(DAT_0002d300,uVar1);
    DAT_0002d300 = DAT_0002d300 + uVar1;
    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;
  }
  return uVar1;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x00012e10
ADD EBX,0xbcb4
SUB ESP,0x4
PUSH dword ptr [ESP + 0x18]
PUSH EDI
LEA EAX,[EBX + 0x38b40]
PUSH dword ptr [EAX]
CALL 0x0001c460
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0001d395
CMP EAX,-0x1
JZ 0x0001d39b
SUB ESP,0x8
PUSH EAX
PUSH EDI
CALL 0x0001c390
MOV dword ptr [EBX + 0x3ed4],EAX
LEA EAX,[EBX + 0x4300]
XOR EBX,EBX
ADD dword ptr [EAX],ESI
ADC dword ptr [EAX + 0x4],EBX
ADD ESP,0x10
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
CALL 0x0001c870
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_0001d340(undefined4 param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}\n\n" comment (function_definition "uint FUN_0001d340(undefined4 param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_0001d340(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  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (expression_statement "uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);" (assignment_expression "uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2)" identifier = (call_expression "FUN_0001c460(DAT_00061b40,param_1,param_2)" identifier (argument_list "(DAT_00061b40,param_1,param_2)" ( identifier , identifier , identifier )))) ;) (if_statement "if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (uVar1 == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }" { (if_statement "if (uVar1 == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0001c870();\n    }" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_0001c870();\n    }" { comment (expression_statement "FUN_0001c870();" (call_expression "FUN_0001c870()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "DAT_0002ced4 = FUN_0001c390(param_1,uVar1);" (assignment_expression "DAT_0002ced4 = FUN_0001c390(param_1,uVar1)" identifier = (call_expression "FUN_0001c390(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , identifier )))) ;) (expression_statement "bVar2 = CARRY4(DAT_0002d300,uVar1);" (assignment_expression "bVar2 = CARRY4(DAT_0002d300,uVar1)" identifier = (call_expression "CARRY4(DAT_0002d300,uVar1)" identifier (argument_list "(DAT_0002d300,uVar1)" ( identifier , identifier )))) ;) (expression_statement "DAT_0002d300 = DAT_0002d300 + uVar1;" (assignment_expression "DAT_0002d300 = DAT_0002d300 + uVar1" identifier = (binary_expression "DAT_0002d300 + uVar1" identifier + identifier)) ;) (expression_statement "DAT_0002d304 = DAT_0002d304 + (uint)bVar2;" (assignment_expression "DAT_0002d304 = DAT_0002d304 + (uint)bVar2" identifier = (binary_expression "DAT_0002d304 + (uint)bVar2" identifier + (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint file_read(char *buf,uint size)\n\n{\n  uint n;\n  bool bVar1;\n  \n  n = read_buffer(ifd,buf,size);\n  if (n != 0) {\n    if (n == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      read_error();\n    }\n    crc = updcrc((uch *)buf,n);\n    bVar1 = CARRY4((uint)bytes_in,n);\n    bytes_in._0_4_ = (uint)bytes_in + n;\n    bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1;\n  }\n  return n;\n}\n\n" comment comment (function_definition "int file_read(char *buf,uint size)\n\n{\n  uint n;\n  bool bVar1;\n  \n  n = read_buffer(ifd,buf,size);\n  if (n != 0) {\n    if (n == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      read_error();\n    }\n    crc = updcrc((uch *)buf,n);\n    bVar1 = CARRY4((uint)bytes_in,n);\n    bytes_in._0_4_ = (uint)bytes_in + n;\n    bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1;\n  }\n  return n;\n}" primitive_type (function_declarator "file_read(char *buf,uint size)" identifier (parameter_list "(char *buf,uint size)" ( (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "uint size" type_identifier identifier) ))) (compound_statement "{\n  uint n;\n  bool bVar1;\n  \n  n = read_buffer(ifd,buf,size);\n  if (n != 0) {\n    if (n == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      read_error();\n    }\n    crc = updcrc((uch *)buf,n);\n    bVar1 = CARRY4((uint)bytes_in,n);\n    bytes_in._0_4_ = (uint)bytes_in + n;\n    bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1;\n  }\n  return n;\n}" { (declaration "uint n;" type_identifier identifier ;) (declaration "bool bVar1;" primitive_type identifier ;) (expression_statement "n = read_buffer(ifd,buf,size);" (assignment_expression "n = read_buffer(ifd,buf,size)" identifier = (call_expression "read_buffer(ifd,buf,size)" identifier (argument_list "(ifd,buf,size)" ( identifier , identifier , identifier )))) ;) (if_statement "if (n != 0) {\n    if (n == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      read_error();\n    }\n    crc = updcrc((uch *)buf,n);\n    bVar1 = CARRY4((uint)bytes_in,n);\n    bytes_in._0_4_ = (uint)bytes_in + n;\n    bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1;\n  }" if (parenthesized_expression "(n != 0)" ( (binary_expression "n != 0" identifier != number_literal) )) (compound_statement "{\n    if (n == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      read_error();\n    }\n    crc = updcrc((uch *)buf,n);\n    bVar1 = CARRY4((uint)bytes_in,n);\n    bytes_in._0_4_ = (uint)bytes_in + n;\n    bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1;\n  }" { (if_statement "if (n == 0xffffffff) {\n                    /* WARNING: Subroutine does not return */\n      read_error();\n    }" if (parenthesized_expression "(n == 0xffffffff)" ( (binary_expression "n == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      read_error();\n    }" { comment (expression_statement "read_error();" (call_expression "read_error()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "crc = updcrc((uch *)buf,n);" (assignment_expression "crc = updcrc((uch *)buf,n)" identifier = (call_expression "updcrc((uch *)buf,n)" identifier (argument_list "((uch *)buf,n)" ( (cast_expression "(uch *)buf" ( (type_descriptor "uch *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) ;) (expression_statement "bVar1 = CARRY4((uint)bytes_in,n);" (assignment_expression "bVar1 = CARRY4((uint)bytes_in,n)" identifier = (call_expression "CARRY4((uint)bytes_in,n)" identifier (argument_list "((uint)bytes_in,n)" ( (cast_expression "(uint)bytes_in" ( (type_descriptor "uint" type_identifier) ) identifier) , identifier )))) ;) (expression_statement "bytes_in._0_4_ = (uint)bytes_in + n;" (assignment_expression "bytes_in._0_4_ = (uint)bytes_in + n" (field_expression "bytes_in._0_4_" identifier . field_identifier) = (binary_expression "(uint)bytes_in + n" (cast_expression "(uint)bytes_in" ( (type_descriptor "uint" type_identifier) ) identifier) + identifier)) ;) (expression_statement "bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1;" (assignment_expression "bytes_in._4_4_ = bytes_in._4_4_ + (uint)bVar1" (field_expression "bytes_in._4_4_" identifier . field_identifier) = (binary_expression "bytes_in._4_4_ + (uint)bVar1" (field_expression "bytes_in._4_4_" identifier . field_identifier) + (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) })) (return_statement "return n;" return identifier ;) })))
(translation_unit "uint FUN_0001d340(undefined4 param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}\n\n" (function_definition "uint FUN_0001d340(undefined4 param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_0001d340(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  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (expression_statement "uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);" (assignment_expression "uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2)" identifier = (call_expression "FUN_0001c460(DAT_00061b40,param_1,param_2)" identifier (argument_list "(DAT_00061b40,param_1,param_2)" ( identifier , identifier , identifier )))) ;) (if_statement "if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }" { (if_statement "if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n                    \n      FUN_0001c870();\n    }" { (expression_statement "FUN_0001c870();" (call_expression "FUN_0001c870()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "DAT_0002ced4 = FUN_0001c390(param_1,uVar1);" (assignment_expression "DAT_0002ced4 = FUN_0001c390(param_1,uVar1)" identifier = (call_expression "FUN_0001c390(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , identifier )))) ;) (expression_statement "bVar2 = CARRY4(DAT_0002d300,uVar1);" (assignment_expression "bVar2 = CARRY4(DAT_0002d300,uVar1)" identifier = (call_expression "CARRY4(DAT_0002d300,uVar1)" identifier (argument_list "(DAT_0002d300,uVar1)" ( identifier , identifier )))) ;) (expression_statement "DAT_0002d300 = DAT_0002d300 + uVar1;" (assignment_expression "DAT_0002d300 = DAT_0002d300 + uVar1" identifier = (binary_expression "DAT_0002d300 + uVar1" identifier + identifier)) ;) (expression_statement "DAT_0002d304 = DAT_0002d304 + (uint)bVar2;" (assignment_expression "DAT_0002d304 = DAT_0002d304 + (uint)bVar2" identifier = (binary_expression "DAT_0002d304 + (uint)bVar2" identifier + (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(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 ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , 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 (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_0001d340(undefined4 param_1,undefined4 param_2)\n\n{\n  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "FUN_0001d340(undefined4 param_1,undefined4 param_2)" (identifier "FUN_0001d340") (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  uint uVar1;\n  bool bVar2;\n  \n  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);\n  if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (expression_statement "uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);" (assignment_expression "uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2)" (identifier "uVar1") (= "=") (call_expression "FUN_0001c460(DAT_00061b40,param_1,param_2)" (identifier "FUN_0001c460") (argument_list "(DAT_00061b40,param_1,param_2)" (( "(") (identifier "DAT_00061b40") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (uVar1 != 0) {\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }" (if "if") (parenthesized_expression "(uVar1 != 0)" (( "(") (binary_expression "uVar1 != 0" (identifier "uVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }\n    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);\n    bVar2 = CARRY4(DAT_0002d300,uVar1);\n    DAT_0002d300 = DAT_0002d300 + uVar1;\n    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;\n  }" ({ "{") (if_statement "if (uVar1 == 0xffffffff) {\n                    \n      FUN_0001c870();\n    }" (if "if") (parenthesized_expression "(uVar1 == 0xffffffff)" (( "(") (binary_expression "uVar1 == 0xffffffff" (identifier "uVar1") (== "==") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n                    \n      FUN_0001c870();\n    }" ({ "{") (expression_statement "FUN_0001c870();" (call_expression "FUN_0001c870()" (identifier "FUN_0001c870") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "DAT_0002ced4 = FUN_0001c390(param_1,uVar1);" (assignment_expression "DAT_0002ced4 = FUN_0001c390(param_1,uVar1)" (identifier "DAT_0002ced4") (= "=") (call_expression "FUN_0001c390(param_1,uVar1)" (identifier "FUN_0001c390") (argument_list "(param_1,uVar1)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "bVar2 = CARRY4(DAT_0002d300,uVar1);" (assignment_expression "bVar2 = CARRY4(DAT_0002d300,uVar1)" (identifier "bVar2") (= "=") (call_expression "CARRY4(DAT_0002d300,uVar1)" (identifier "CARRY4") (argument_list "(DAT_0002d300,uVar1)" (( "(") (identifier "DAT_0002d300") (, ",") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "DAT_0002d300 = DAT_0002d300 + uVar1;" (assignment_expression "DAT_0002d300 = DAT_0002d300 + uVar1" (identifier "DAT_0002d300") (= "=") (binary_expression "DAT_0002d300 + uVar1" (identifier "DAT_0002d300") (+ "+") (identifier "uVar1"))) (; ";")) (expression_statement "DAT_0002d304 = DAT_0002d304 + (uint)bVar2;" (assignment_expression "DAT_0002d304 = DAT_0002d304 + (uint)bVar2" (identifier "DAT_0002d304") (= "=") (binary_expression "DAT_0002d304 + (uint)bVar2" (identifier "DAT_0002d304") (+ "+") (cast_expression "(uint)bVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar2")))) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

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

int function_1(char *buf,type_1 size)

{
  type_1 var_2;
  bool bVar1;
  
  var_2 = var_1(ifd,buf,size);
  if (var_2 != 0) {
    if (var_2 == 0xffffffff) {
                    /* WARNING: Subroutine does not return */
      var_3();
    }
    crc = var_4((type_2 *)buf,var_2);
    bVar1 = var_5((type_1)bytes_in,var_2);
    bytes_in._0_4_ = (type_1)bytes_in + var_2;
    bytes_in._4_4_ = bytes_in._4_4_ + (type_1)bVar1;
  }
  return var_2;
}


(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)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (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 (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))))) (return_statement (identifier)))))

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

uint MASKED(undefined4 param_1,undefined4 param_2)

{
  uint uVar1;
  bool bVar2;
  
  uVar1 = FUN_0001c460(DAT_00061b40,param_1,param_2);
  if (uVar1 != 0) {
    if (uVar1 == 0xffffffff) {
                    /* WARNING: Subroutine does not return */
      FUN_0001c870();
    }
    DAT_0002ced4 = FUN_0001c390(param_1,uVar1);
    bVar2 = CARRY4(DAT_0002d300,uVar1);
    DAT_0002d300 = DAT_0002d300 + uVar1;
    DAT_0002d304 = DAT_0002d304 + (uint)bVar2;
  }
  return uVar1;
}

