Function at 0x40ddd0
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xa8
mov dword [rsp + 0x78], 1
mov dword [rsp + 0x74], 0
mov dword [rsp + 0x40], 7
mov qword [rsp + 0x88], 0
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x50], 0x80
mov qword [rsp + 0x48], 0
mov eax, dword [rsp + 0xc0]
and eax, 2
test eax, eax
jne 0x40de54
mov eax, dword [rsp + 0xc0]
and eax, 4
test eax, eax
jne 0x40de54
mov eax, dword [rsp + 0xc0]
and eax, 0x10000
test eax, eax
je 0x40de8c
mov eax, dword [rsp + 0xc0]
and eax, 0x200000
test eax, eax
je 0x40de8c
mov r9, qword [rsp + 0xb8]
mov r8d, dword [rsp + 0xc0]
lea rdx, str._OpenFile__Option_Fail._Option___x__FilePath___s
xor ecx, ecx
call fcn.00410af0
mov eax, 0x57
jmp 0x40e370
mov ecx, 0x30
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
jne 0x40deb4
mov eax, 8
jmp 0x40e370
mov r8d, 0x30
xor edx, edx
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll_memset
mov eax, dword [rsp + 0xc0]
and eax, 1
test eax, eax
je 0x40dee5
mov eax, dword [rsp + 0xc0]
and eax, 2
test eax, eax
jne 0x40def3
mov eax, dword [rsp + 0xc0]
and eax, 4
test eax, eax
je 0x40df02
mov eax, dword [rsp + 0x74]
or eax, 0xc0000000
mov dword [rsp + 0x74], eax
jmp 0x40df2c
mov eax, dword [rsp + 0xc0]
and eax, 2
test eax, eax
je 0x40df1f
mov eax, dword [rsp + 0x74]
or eax, 0x40000000
mov dword [rsp + 0x74], eax
jmp 0x40df2c
mov eax, dword [rsp + 0x74]
or eax, 0x80000000
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0xc0]
and eax, 0x100
test eax, eax
je 0x40dfda
lea rax, str.D:_A_OICI_GA___BU__A_OICI_GA___SY__A_OICI_GA___BA_
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 0xc0]
and eax, 0x400
test eax, eax
je 0x40df69
mov dword [rsp + 0x70], 1
jmp 0x40df71
mov dword [rsp + 0x70], 2
mov r8d, 0x18
xor edx, edx
lea rcx, [rsp + 0x58]
call sub.msvcrt.dll_memset
mov dword [rsp + 0x58], 0x18
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x68], 0
xor r9d, r9d
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
jne 0x40dfcb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
jmp 0x40dfd8
lea rax, [rsp + 0x58]
mov qword [rsp + 0x88], rax
jmp 0x40dfe2
mov dword [rsp + 0x70], 3
mov eax, dword [rsp + 0xc0]
and eax, 0x10000
test eax, eax
je 0x40dffd
mov eax, dword [rsp + 0x40]
and eax, 0xfffffffe
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0xc0]
and eax, 0x20000
test eax, eax
je 0x40e018
mov eax, dword [rsp + 0x40]
and eax, 0xfffffffd
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x50], 0x80
mov eax, dword [rsp + 0xc0]
and eax, 0x100000
test eax, eax
je 0x40e03d
mov eax, dword [rsp + 0x50]
or eax, 0x100
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0xc0]
and eax, 0x200000
test eax, eax
je 0x40e259
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x98], eax
mov r8, qword [rsp + 0xb8]
lea rdx, str._FILEIO__Oplock___s
mov ecx, 1
call fcn.00410af0
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x40000000
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x88]
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0xb8]
call qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x80]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x80]
cmp qword [rax + 8], 0xffffffffffffffff
jne 0x40e0ea
mov rax, qword [rsp + 0x80]
mov qword [rax + 8], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
jmp 0x40e259
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rcx, qword [rsp + 0x80]
mov qword [rcx + 0x28], rax
mov rax, qword [rsp + 0x80]
cmp qword [rax + 0x28], 0
jne 0x40e146
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x80]
mov qword [rax + 8], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
jmp 0x40e259
mov rax, qword [rsp + 0x80]
add rax, 0x10
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x9c]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x9005c
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, 1
jne 0x40e1a4
mov dword [rsp + 0x78], 0
jmp 0x40e259
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 0x3e5
je 0x40e1bf
cmp dword [rsp + 0x78], 0
jne 0x40e1d4
mov dword [rsp + 0x74], 0x80000000
mov dword [rsp + 0x40], 1
jmp 0x40e259
mov r9, qword [rsp + 0xb8]
mov r8d, dword [rsp + 0x78]
lea rdx, str.Oplock_Error_Retry___u___s
mov ecx, 3
call fcn.00410af0
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x80]
mov qword [rax + 8], 0
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x80]
mov qword [rax + 0x28], 0
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x98]
cmp eax, 0x12c
jb 0x40e077
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x88]
mov r8d, dword [rsp + 0x40]
mov edx, dword [rsp + 0x74]
mov rcx, qword [rsp + 0xb8]
call qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x80]
mov qword [rcx], rax
mov rax, qword [rsp + 0x80]
cmp qword [rax], 0xffffffffffffffff
jne 0x40e33b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
mov rax, qword [rsp + 0x80]
cmp qword [rax + 8], 0
je 0x40e2fa
mov rax, qword [rsp + 0x80]
cmp qword [rax + 8], 0xffffffffffffffff
je 0x40e2fa
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x80]
mov qword [rax + 8], 0
mov rax, qword [rsp + 0x80]
cmp qword [rax + 0x28], 0
je 0x40e32b
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x80]
mov qword [rax + 0x28], 0
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.msvcrt.dll_free]
jmp 0x40e356
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x80]
mov qword [rax], rcx
mov dword [rsp + 0x78], 0
cmp qword [rsp + 0x88], 0
je 0x40e36c
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x78]
add rsp, 0xa8
ret