Function at 0x10016940
Capabilities:
Check if file exists

Disassembly:
push ebp
lea ebp, [esp - 0x7c]
sub esp, 0x7c
push 0xffffffffffffffff
push 0x1003cd95
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x10047810]
xor eax, ebp
mov dword [ebp + 0x78], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x2c], 0
mov edx, dword [ebp + 0x84]
mov ebx, dword [ebp + 0x88]
mov dword [ebp - 0x14], edx
mov dword [esi + 0x48], 0
jne 0x10016997
test bl, 4
jne 0x10016997
xor cl, cl
jmp 0x10016999
mov cl, 1
mov edi, ebx
shr edi, 1
not edi
and edi, 1
inc edi
shl edi, 0x1e
test bl, 1
je 0x100169b1
or edi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test cl, cl
je 0x100169c0
or ebx, 2
xor eax, eax
mov dword [ebp], 0
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x14], 7
mov word [ebp], ax
mov dword [ebp + 0x28], eax
mov dword [ebp + 0x2c], eax
mov dword [ebp + 0x30], eax
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x38], eax
mov dword [ebp + 0x3c], eax
mov dword [ebp - 4], eax
cmp byte [esi + 0x20], al
je 0x100169fb
or edi, 0x100
cmp dword [edx + 0x14], 8
mov eax, edx
jb 0x10016a05
mov eax, dword [edx]
push 0
push 0x8000000
push 3
push 0
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x10016aed
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp + 0x60], 0
mov dword [ebp + 0x70], 0
mov dword [ebp + 0x74], 7
mov word [ebp + 0x60], ax
lea eax, [ebp + 0x60]
mov byte [ebp - 4], 1
push eax
push dword [ebp - 0x14]
call fcn.1001b280
add esp, 8
test al, al
je 0x10016a93
cmp dword [ebp + 0x74], 8
lea eax, [ebp + 0x60]
jb 0x10016a6c
mov eax, dword [ebp + 0x60]
push 0
push 0x8000000
push 3
push 0
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, 2
cmp eax, 2
je 0x10016a96
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x74]
mov byte [ebp - 4], 0
cmp ecx, 8
jb 0x10016ad4
mov edx, dword [ebp + 0x60]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10016aca
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016b89
push ecx
push edx
call fcn.100308ca
add esp, 8
xor eax, eax
mov dword [ebp + 0x70], 0
mov word [ebp + 0x60], ax
mov eax, dword [ebp - 0x10]
mov dword [ebp + 0x74], 7
jmp 0x10016af0
mov ebx, dword [ebp - 0x14]
cmp eax, 0xffffffff
jne 0x10016b01
cmp ebx, 2
jne 0x10016b01
mov dword [esi + 0x48], 1
cmp byte [esi + 0x20], 0
je 0x10016b3f
cmp eax, 0xffffffff
je 0x10016b3f
push 0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0xffffffff
push ecx
push 0
push eax
mov dword [ebp - 0x18], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x10]
mov bl, 1
mov byte [esi + 0x18], 0
mov dword [esi + 0xc], 0
mov byte [esi + 0x11], 0
jmp 0x10016b56
cmp eax, 0xffffffff
mov byte [esi + 0x18], 0
mov dword [esi + 0xc], 0
mov byte [esi + 0x11], 0
setne bl
je 0x10016b68
push dword [ebp - 0x14]
lea ecx, [esi + 0x30]
mov dword [esi + 4], eax
call fcn.1000ecf0
mov byte [esi + 0x21], 0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x78]
xor ecx, ebp
call fcn.100308d8
lea esp, [ebp + 0x7c]
pop ebp
ret 8
call fcn.1003442e
int3