- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
longlong ** FUN_14000e5a0(longlong **param_1,LPCWSTR param_2,int param_3,uint param_4)
{
uint uVar1;
longlong **pplVar2;
longlong **hFile;
longlong *plVar3;
longlong **pplVar4;
DWORD DVar5;
LONG local_38;
undefined4 uStack_34;
pplVar4 = (longlong **)0x0;
uVar1 = param_4 & 0x1f;
if ((param_4 & 0x1f) == 0) {
uVar1 = 2;
}
pplVar2 = FUN_1400119f8(DAT_1400213a0,(longlong)param_1);
if (pplVar2 == (longlong **)0x0) {
return (longlong **)0x0;
}
if (param_3 == 1) {
DVar5 = (DWORD)((param_4 >> 0x11 & 1) != 0);
if ((param_4 >> 0x12 & 1) != 0) {
DVar5 = 7;
}
hFile = (longlong **)
CreateFileW(param_2,0x80000000,DVar5,(LPSECURITY_ATTRIBUTES)0x0,3,0x80,(HANDLE)0x0);
LAB_14000e70c:
if (hFile == (longlong **)0xffffffffffffffff) goto LAB_14000e7ad;
}
else {
if (param_3 == 2) {
DVar5 = (DWORD)((param_4 >> 0x11 & 1) != 0);
if ((param_4 >> 0x12 & 1) != 0) {
DVar5 = 7;
}
hFile = (longlong **)
CreateFileW(param_2,0xc0000000,DVar5,(LPSECURITY_ATTRIBUTES)0x0,4,0x80,(HANDLE)0x0);
goto LAB_14000e70c;
}
if (param_3 != 3) {
hFile = (longlong **)CONCAT44(uStack_34,local_38);
goto LAB_14000e70c;
}
DVar5 = (DWORD)((param_4 >> 0x11 & 1) != 0);
if ((param_4 >> 0x12 & 1) != 0) {
DVar5 = 7;
}
hFile = (longlong **)
CreateFileW(param_2,0xc0000000,DVar5,(LPSECURITY_ATTRIBUTES)0x0,2,0x80,(HANDLE)0x0);
if (hFile == (longlong **)0xffffffffffffffff) {
hFile = (longlong **)
CreateFileW(param_2,0x40000000,DVar5,(LPSECURITY_ATTRIBUTES)0x0,5,0,(HANDLE)0x0);
goto LAB_14000e70c;
}
}
if (hFile != (longlong **)0x0) {
if ((DAT_14001f140 == 0) || ((param_4 >> 0x13 & 1) != 0)) {
pplVar2[1] = (longlong *)0x0;
}
else {
plVar3 = (longlong *)HeapAlloc(DAT_1400204cc,0,(longlong)DAT_14001f140);
pplVar2[1] = plVar3;
}
*pplVar2 = (longlong *)hFile;
*(int *)(pplVar2 + 2) = DAT_14001f140;
*(undefined4 *)((longlong)pplVar2 + 0x14) = 0;
*(uint *)(pplVar2 + 4) = uVar1;
*(uint *)((longlong)pplVar2 + 0x24) = (uint)(param_3 == 1);
*(undefined4 *)((longlong)pplVar2 + 0x1c) = 1;
if ((param_3 == 2) && ((param_4 >> 0x14 & 1) != 0)) {
local_38 = 0;
SetFilePointer(hFile,0,&local_38,2);
}
pplVar4 = hFile;
if (param_1 == (longlong **)0xffffffffffffffff) {
pplVar4 = pplVar2;
}
if (pplVar4 != (longlong **)0x0) {
return pplVar4;
}
}
LAB_14000e7ad:
if (param_1 == (longlong **)0xffffffffffffffff) {
param_1 = pplVar2;
}
FUN_14001192c(DAT_1400213a0,(longlong)param_1);
return pplVar4;
}