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

int __regparm3 unixShmSystemLock(unixFile *pFile,int lockType,int ofst,int n)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  flock f;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (-1 < *(int *)(pFile->szChunk + 0xc)) {
    f.l_type = (short)lockType;
    f.l_whence = 0;
    f.l_start._4_4_ = ofst >> 0x1f;
    f.l_len._0_4_ = n;
    f.l_len._4_4_ = n >> 0x1f;
    f.l_start._0_4_ = ofst;
    iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f);
    if (iVar2 == -1) {
      iVar2 = 5;
      goto LAB_0002968a;
    }
  }
  iVar2 = 0;
LAB_0002968a:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined4 __regparm3 FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined2 local_28;
  undefined2 local_26;
  int local_24;
  int local_20;
  int local_1c;
  int local_18;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x29627;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {
    local_26 = 0;
    local_20 = param_3 >> 0x1f;
    local_1c = param_4;
    local_18 = param_4 >> 0x1f;
    local_28 = param_2;
    local_24 = param_3;
    iVar1 = (*(code *)PTR_fcntl64_0014a418)
                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);
    if (iVar1 == -1) {
      uVar2 = 5;
      goto LAB_0002968a;
    }
  }
  uVar2 = 0;
LAB_0002968a:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f4bf0();
}


PUSH ESI
PUSH EBX
CALL 0x00014cf0
ADD EBX,0x11f8ad
SUB ESP,0x24
MOV EAX,dword ptr [EAX + 0x28]
MOV ESI,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x1c],ESI
XOR ESI,ESI
MOV ESI,dword ptr [EAX + 0xc]
TEST ESI,ESI
JS 0x00029688
MOV word ptr [ESP + 0x4],DX
XOR EDX,EDX
SUB ESP,0x4
MOV word ptr [ESP + 0xa],DX
MOV EDX,dword ptr [ESP + 0x34]
MOV dword ptr [ESP + 0xc],ECX
SAR ECX,0x1f
MOV dword ptr [ESP + 0x14],EDX
SAR EDX,0x1f
MOV dword ptr [ESP + 0x10],ECX
MOV dword ptr [ESP + 0x18],EDX
LEA EDX,[ESP + 0x8]
PUSH EDX
PUSH 0xd
PUSH dword ptr [EAX + 0xc]
CALL dword ptr [EBX + 0x1544]
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x000296a0
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x1c]
XOR ESI,dword ptr GS:[0x14]
JNZ 0x000296a7
ADD ESP,0x24
POP EBX
POP ESI
RET
MOV EAX,0x5
JMP 0x0002968a
CALL 0x000f4bf0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f4bf0();\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f4bf0();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,undefined2 param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined2 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f4bf0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined2 local_28;" type_identifier identifier ;) (declaration "undefined2 local_26;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (declaration "int local_18;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x29627;" (assignment_expression "uStack_c = 0x29627" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" if (parenthesized_expression "(-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc))" ( (binary_expression "-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)" number_literal < (pointer_expression "*(int *)(*(int *)(param_1 + 0x28) + 0xc)" * (cast_expression "(int *)(*(int *)(param_1 + 0x28) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x28) + 0xc)" ( (binary_expression "*(int *)(param_1 + 0x28) + 0xc" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + number_literal) ))))) )) (compound_statement "{\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" { (expression_statement "local_26 = 0;" (assignment_expression "local_26 = 0" identifier = number_literal) ;) (expression_statement "local_20 = param_3 >> 0x1f;" (assignment_expression "local_20 = param_3 >> 0x1f" identifier = (binary_expression "param_3 >> 0x1f" identifier >> number_literal)) ;) (expression_statement "local_1c = param_4;" (assignment_expression "local_1c = param_4" identifier = identifier) ;) (expression_statement "local_18 = param_4 >> 0x1f;" (assignment_expression "local_18 = param_4 >> 0x1f" identifier = (binary_expression "param_4 >> 0x1f" identifier >> number_literal)) ;) (expression_statement "local_28 = param_2;" (assignment_expression "local_28 = param_2" identifier = identifier) ;) (expression_statement "local_24 = param_3;" (assignment_expression "local_24 = param_3" identifier = identifier) ;) (expression_statement "iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);" (assignment_expression "iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" identifier = (call_expression "(*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" (parenthesized_expression "(*(code *)PTR_fcntl64_0014a418)" ( (pointer_expression "*(code *)PTR_fcntl64_0014a418" * (cast_expression "(code *)PTR_fcntl64_0014a418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" ( (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x28) + 0xc)" ( (binary_expression "*(int *)(param_1 + 0x28) + 0xc" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + number_literal) )))) , number_literal , (pointer_expression "&local_28" & identifier) )))) ;) (if_statement "if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }" { (expression_statement "uVar2 = 5;" (assignment_expression "uVar2 = 5" identifier = number_literal) ;) (goto_statement "goto LAB_0002968a;" goto statement_identifier ;) })) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) comment (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 unixShmSystemLock(unixFile *pFile,int lockType,int ofst,int n)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  flock f;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(pFile->szChunk + 0xc)) {\n    f.l_type = (short)lockType;\n    f.l_whence = 0;\n    f.l_start._4_4_ = ofst >> 0x1f;\n    f.l_len._0_4_ = n;\n    f.l_len._4_4_ = n >> 0x1f;\n    f.l_start._0_4_ = ofst;\n    iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f);\n    if (iVar2 == -1) {\n      iVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  iVar2 = 0;\nLAB_0002968a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "int __regparm3 unixShmSystemLock(unixFile *pFile,int lockType,int ofst,int n)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  flock f;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(pFile->szChunk + 0xc)) {\n    f.l_type = (short)lockType;\n    f.l_whence = 0;\n    f.l_start._4_4_ = ofst >> 0x1f;\n    f.l_len._0_4_ = n;\n    f.l_len._4_4_ = n >> 0x1f;\n    f.l_start._0_4_ = ofst;\n    iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f);\n    if (iVar2 == -1) {\n      iVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  iVar2 = 0;\nLAB_0002968a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "unixShmSystemLock(unixFile *pFile,int lockType,int ofst,int n)" identifier (parameter_list "(unixFile *pFile,int lockType,int ofst,int n)" ( (parameter_declaration "unixFile *pFile" type_identifier (pointer_declarator "*pFile" * identifier)) , (parameter_declaration "int lockType" primitive_type identifier) , (parameter_declaration "int ofst" primitive_type identifier) , (parameter_declaration "int n" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  flock f;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(pFile->szChunk + 0xc)) {\n    f.l_type = (short)lockType;\n    f.l_whence = 0;\n    f.l_start._4_4_ = ofst >> 0x1f;\n    f.l_len._0_4_ = n;\n    f.l_len._4_4_ = n >> 0x1f;\n    f.l_start._0_4_ = ofst;\n    iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f);\n    if (iVar2 == -1) {\n      iVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  iVar2 = 0;\nLAB_0002968a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "flock f;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (-1 < *(int *)(pFile->szChunk + 0xc)) {\n    f.l_type = (short)lockType;\n    f.l_whence = 0;\n    f.l_start._4_4_ = ofst >> 0x1f;\n    f.l_len._0_4_ = n;\n    f.l_len._4_4_ = n >> 0x1f;\n    f.l_start._0_4_ = ofst;\n    iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f);\n    if (iVar2 == -1) {\n      iVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" if (parenthesized_expression "(-1 < *(int *)(pFile->szChunk + 0xc))" ( (binary_expression "-1 < *(int *)(pFile->szChunk + 0xc)" number_literal < (pointer_expression "*(int *)(pFile->szChunk + 0xc)" * (cast_expression "(int *)(pFile->szChunk + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pFile->szChunk + 0xc)" ( (binary_expression "pFile->szChunk + 0xc" (field_expression "pFile->szChunk" identifier -> field_identifier) + number_literal) ))))) )) (compound_statement "{\n    f.l_type = (short)lockType;\n    f.l_whence = 0;\n    f.l_start._4_4_ = ofst >> 0x1f;\n    f.l_len._0_4_ = n;\n    f.l_len._4_4_ = n >> 0x1f;\n    f.l_start._0_4_ = ofst;\n    iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f);\n    if (iVar2 == -1) {\n      iVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" { (expression_statement "f.l_type = (short)lockType;" (assignment_expression "f.l_type = (short)lockType" (field_expression "f.l_type" identifier . field_identifier) = (cast_expression "(short)lockType" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "f.l_whence = 0;" (assignment_expression "f.l_whence = 0" (field_expression "f.l_whence" identifier . field_identifier) = number_literal) ;) (expression_statement "f.l_start._4_4_ = ofst >> 0x1f;" (assignment_expression "f.l_start._4_4_ = ofst >> 0x1f" (field_expression "f.l_start._4_4_" (field_expression "f.l_start" identifier . field_identifier) . field_identifier) = (binary_expression "ofst >> 0x1f" identifier >> number_literal)) ;) (expression_statement "f.l_len._0_4_ = n;" (assignment_expression "f.l_len._0_4_ = n" (field_expression "f.l_len._0_4_" (field_expression "f.l_len" identifier . field_identifier) . field_identifier) = identifier) ;) (expression_statement "f.l_len._4_4_ = n >> 0x1f;" (assignment_expression "f.l_len._4_4_ = n >> 0x1f" (field_expression "f.l_len._4_4_" (field_expression "f.l_len" identifier . field_identifier) . field_identifier) = (binary_expression "n >> 0x1f" identifier >> number_literal)) ;) (expression_statement "f.l_start._0_4_ = ofst;" (assignment_expression "f.l_start._0_4_ = ofst" (field_expression "f.l_start._0_4_" (field_expression "f.l_start" identifier . field_identifier) . field_identifier) = identifier) ;) (expression_statement "iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f);" (assignment_expression "iVar2 = (*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f)" identifier = (call_expression "(*aSyscall[7].pCurrent)(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f)" (parenthesized_expression "(*aSyscall[7].pCurrent)" ( (pointer_expression "*aSyscall[7].pCurrent" * (field_expression "aSyscall[7].pCurrent" (subscript_expression "aSyscall[7]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(*(undefined4 *)(pFile->szChunk + 0xc),0xd,&f)" ( (pointer_expression "*(undefined4 *)(pFile->szChunk + 0xc)" * (cast_expression "(undefined4 *)(pFile->szChunk + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pFile->szChunk + 0xc)" ( (binary_expression "pFile->szChunk + 0xc" (field_expression "pFile->szChunk" identifier -> field_identifier) + number_literal) )))) , number_literal , (pointer_expression "&f" & identifier) )))) ;) (if_statement "if (iVar2 == -1) {\n      iVar2 = 5;\n      goto LAB_0002968a;\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      iVar2 = 5;\n      goto LAB_0002968a;\n    }" { (expression_statement "iVar2 = 5;" (assignment_expression "iVar2 = 5" identifier = number_literal) ;) (goto_statement "goto LAB_0002968a;" goto statement_identifier ;) })) })) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0002968a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 __regparm3 FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000f4bf0();\n}\n\n" (function_definition "undefined4 __regparm3 FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000f4bf0();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,undefined2 param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined2 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000f4bf0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined2 local_28;" type_identifier identifier ;) (declaration "undefined2 local_26;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (declaration "int local_18;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x29627;" (assignment_expression "uStack_c = 0x29627" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" if (parenthesized_expression "(-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc))" ( (binary_expression "-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)" number_literal < (pointer_expression "*(int *)(*(int *)(param_1 + 0x28) + 0xc)" * (cast_expression "(int *)(*(int *)(param_1 + 0x28) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x28) + 0xc)" ( (binary_expression "*(int *)(param_1 + 0x28) + 0xc" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + number_literal) ))))) )) (compound_statement "{\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" { (expression_statement "local_26 = 0;" (assignment_expression "local_26 = 0" identifier = number_literal) ;) (expression_statement "local_20 = param_3 >> 0x1f;" (assignment_expression "local_20 = param_3 >> 0x1f" identifier = (binary_expression "param_3 >> 0x1f" identifier >> number_literal)) ;) (expression_statement "local_1c = param_4;" (assignment_expression "local_1c = param_4" identifier = identifier) ;) (expression_statement "local_18 = param_4 >> 0x1f;" (assignment_expression "local_18 = param_4 >> 0x1f" identifier = (binary_expression "param_4 >> 0x1f" identifier >> number_literal)) ;) (expression_statement "local_28 = param_2;" (assignment_expression "local_28 = param_2" identifier = identifier) ;) (expression_statement "local_24 = param_3;" (assignment_expression "local_24 = param_3" identifier = identifier) ;) (expression_statement "iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);" (assignment_expression "iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" identifier = (call_expression "(*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" (parenthesized_expression "(*(code *)PTR_fcntl64_0014a418)" ( (pointer_expression "*(code *)PTR_fcntl64_0014a418" * (cast_expression "(code *)PTR_fcntl64_0014a418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" ( (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x28) + 0xc)" ( (binary_expression "*(int *)(param_1 + 0x28) + 0xc" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + number_literal) )))) , number_literal , (pointer_expression "&local_28" & identifier) )))) ;) (if_statement "if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }" { (expression_statement "uVar2 = 5;" (assignment_expression "uVar2 = 5" identifier = number_literal) ;) (goto_statement "goto LAB_0002968a;" goto statement_identifier ;) })) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) , LIT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 __regparm3 FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000f4bf0();\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00029620(int param_1,undefined2 param_2,int param_3,int param_4)" (identifier "FUN_00029620") (parameter_list "(int param_1,undefined2 param_2,int param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined2 param_2" (type_identifier "undefined2") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined2 local_28;\n  undefined2 local_26;\n  int local_24;\n  int local_20;\n  int local_1c;\n  int local_18;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x29627;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }\n  uVar2 = 0;\nLAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000f4bf0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined2 local_28;" (type_identifier "undefined2") (identifier "local_28") (; ";")) (declaration "undefined2 local_26;" (type_identifier "undefined2") (identifier "local_26") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "int local_1c;" (primitive_type "int") (identifier "local_1c") (; ";")) (declaration "int local_18;" (primitive_type "int") (identifier "local_18") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x29627;" (assignment_expression "uStack_c = 0x29627" (identifier "uStack_c") (= "=") (number_literal "0x29627")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" (if "if") (parenthesized_expression "(-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc))" (( "(") (binary_expression "-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)" (number_literal "-1") (< "<") (pointer_expression "*(int *)(*(int *)(param_1 + 0x28) + 0xc)" (* "*") (cast_expression "(int *)(*(int *)(param_1 + 0x28) + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x28) + 0xc)" (( "(") (binary_expression "*(int *)(param_1 + 0x28) + 0xc" (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (number_literal "0xc")) () ")"))))) () ")")) (compound_statement "{\n    local_26 = 0;\n    local_20 = param_3 >> 0x1f;\n    local_1c = param_4;\n    local_18 = param_4 >> 0x1f;\n    local_28 = param_2;\n    local_24 = param_3;\n    iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);\n    if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }\n  }" ({ "{") (expression_statement "local_26 = 0;" (assignment_expression "local_26 = 0" (identifier "local_26") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_20 = param_3 >> 0x1f;" (assignment_expression "local_20 = param_3 >> 0x1f" (identifier "local_20") (= "=") (binary_expression "param_3 >> 0x1f" (identifier "param_3") (>> ">>") (number_literal "0x1f"))) (; ";")) (expression_statement "local_1c = param_4;" (assignment_expression "local_1c = param_4" (identifier "local_1c") (= "=") (identifier "param_4")) (; ";")) (expression_statement "local_18 = param_4 >> 0x1f;" (assignment_expression "local_18 = param_4 >> 0x1f" (identifier "local_18") (= "=") (binary_expression "param_4 >> 0x1f" (identifier "param_4") (>> ">>") (number_literal "0x1f"))) (; ";")) (expression_statement "local_28 = param_2;" (assignment_expression "local_28 = param_2" (identifier "local_28") (= "=") (identifier "param_2")) (; ";")) (expression_statement "local_24 = param_3;" (assignment_expression "local_24 = param_3" (identifier "local_24") (= "=") (identifier "param_3")) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);" (assignment_expression "iVar1 = (*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_fcntl64_0014a418)\n                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" (parenthesized_expression "(*(code *)PTR_fcntl64_0014a418)" (( "(") (pointer_expression "*(code *)PTR_fcntl64_0014a418" (* "*") (cast_expression "(code *)PTR_fcntl64_0014a418" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fcntl64_0014a418"))) () ")")) (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28)" (( "(") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x28) + 0xc)" (( "(") (binary_expression "*(int *)(param_1 + 0x28) + 0xc" (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (number_literal "0xc")) () ")")))) (, ",") (number_literal "0xd") (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")")))) (; ";")) (if_statement "if (iVar1 == -1) {\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }" (if "if") (parenthesized_expression "(iVar1 == -1)" (( "(") (binary_expression "iVar1 == -1" (identifier "iVar1") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      uVar2 = 5;\n      goto LAB_0002968a;\n    }" ({ "{") (expression_statement "uVar2 = 5;" (assignment_expression "uVar2 = 5" (identifier "uVar2") (= "=") (number_literal "5")) (; ";")) (goto_statement "goto LAB_0002968a;" (goto "goto") (statement_identifier "LAB_0002968a") (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0002968a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (statement_identifier "LAB_0002968a") (: ":") (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))) (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" (identifier "FUN_000f4bf0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *pFile,int lockType,int var_2,int var_3)

{
  int var_5;
  int var_4;
  int var_1;
  type_2 f;
  
  var_5 = *(int *)(var_1 + 0x14);
  if (-1 < *(int *)(pFile->szChunk + 0xc)) {
    f.l_type = (short)lockType;
    f.l_whence = 0;
    f.l_start._4_4_ = var_2 >> 0x1f;
    f.l_len._0_4_ = var_3;
    f.l_len._4_4_ = var_3 >> 0x1f;
    f.l_start._0_4_ = var_2;
    var_4 = (*aSyscall[7].pCurrent)(*(type_3 *)(pFile->szChunk + 0xc),0xd,&f);
    if (var_4 == -1) {
      var_4 = 5;
      goto LAB_0002968a;
    }
  }
  var_4 = 0;
LAB_0002968a:
  if (var_5 == *(int *)(var_1 + 0x14)) {
    return var_4;
  }
                    /* WARNING: Subroutine does not return */
  var_6();
}


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

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

undefined4 __regparm3 MASKED(int param_1,undefined2 param_2,int param_3,int param_4)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined2 local_28;
  undefined2 local_26;
  int local_24;
  int local_20;
  int local_1c;
  int local_18;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x29627;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (-1 < *(int *)(*(int *)(param_1 + 0x28) + 0xc)) {
    local_26 = 0;
    local_20 = param_3 >> 0x1f;
    local_1c = param_4;
    local_18 = param_4 >> 0x1f;
    local_28 = param_2;
    local_24 = param_3;
    iVar1 = (*(code *)PTR_fcntl64_0014a418)
                      (*(undefined4 *)(*(int *)(param_1 + 0x28) + 0xc),0xd,&local_28);
    if (iVar1 == -1) {
      uVar2 = 5;
      goto LAB_0002968a;
    }
  }
  uVar2 = 0;
LAB_0002968a:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f4bf0();
}

