Function at 0x1016a91
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
xor ecx, ecx
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], ecx
mov dword [ebp - 8], ecx
cmp eax, ecx
je 0x1016dbb
cmp dword [edi], ecx
je 0x1016dbb
cmp dword [ebp + 8], ecx
je 0x1016d90
cmp dword [ebp + 0xc], ecx
je 0x1016d90
mov ebx, dword [eax]
mov ecx, dword [edi + 8]
imul ebx, ebx, 0x250
lea eax, [ebx + 0x254]
cmp ecx, eax
jae 0x1016b2a
add ecx, eax
push ecx
mov ecx, edi
call fcn.01016716
mov esi, eax
test esi, esi
jge 0x1016b2a
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016df3
test byte [eax + 0x1c], 4
je 0x1016df3
push esi
push 0x1003da4
push 0x1003d30
push 0x1e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a697
jmp 0x1016df3
mov eax, dword [ebp + 0x10]
xor ecx, ecx
cmp eax, ecx
je 0x1016b66
mov edx, dword [eax]
mov ecx, dword [edi + 4]
mov dword [ebx + ecx + 0x28], edx
mov edx, dword [eax + 0x14]
mov ecx, dword [edi + 4]
mov dword [ebx + ecx + 0x3c], edx
mov edx, dword [eax + 0x18]
mov dword [ebx + ecx + 0x40], edx
mov ecx, dword [edi + 4]
mov edx, dword [eax + 0x20]
mov dword [ebx + ecx + 0x48], edx
mov ecx, dword [edi + 4]
mov eax, dword [eax + 0x1c]
mov dword [ebx + ecx + 0x44], eax
jmp 0x1016cc8
cmp dword [ebp + 0x14], ecx
je 0x1016bdb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, dword [edi + 4]
mov dword [ebx + ecx + 0x28], eax
mov eax, dword [edi + 4]
cmp dword [ebx + eax + 0x28], 0xffffffff
jne 0x1016bc9
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016bac
test byte [eax + 0x1c], 4
je 0x1016bac
push dword [ebp + 8]
push 0x1003d30
push 0x1f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100bfba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x1016bbd
mov esi, eax
jmp 0x1016df3
and eax, 0xffff
or eax, 0x80070000
jmp 0x1016bb6
and dword [ebx + eax + 0x48], 0
mov eax, dword [edi + 4]
and dword [ebx + eax + 0x44], 0
jmp 0x1016ccf
push ecx
push ecx
push 3
push ecx
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x1016c39
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016c1c
test byte [eax + 0x1c], 4
je 0x1016c1c
push 0x1003d30
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x1016c2d
mov esi, eax
jmp 0x1016dea
and eax, 0xffff
or eax, 0x80070000
jmp 0x1016c26
push 0x34
lea eax, [ebp - 0x40]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x1016c99
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016c7e
test byte [eax + 0x1c], 4
je 0x1016c7e
push 0x1003d30
push 0x21
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1016c92
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x1016de4
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x40]
mov dword [ebx + eax + 0x28], ecx
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x2c]
mov dword [ebx + eax + 0x3c], ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebx + eax + 0x40], ecx
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x1c]
mov dword [ebx + eax + 0x48], ecx
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x20]
mov dword [ebx + eax + 0x44], ecx
mov dword [ebp - 8], 0x20
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 8]
push dword [ebp + 8]
or eax, 0x4044
mov dword [ebx + ecx + 4], eax
mov eax, dword [edi + 4]
lea esi, [ebx + eax + 4]
mov eax, dword [edi]
lea edi, [ebx + eax + 4]
mov ecx, 0x94
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0xc]
mov eax, dword [edi + 4]
push 0x208
lea eax, [ebx + eax + 0x4c]
push eax
call fcn.01009521
mov esi, eax
test esi, esi
jge 0x1016d39
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016de4
test byte [eax + 0x1c], 4
je 0x1016de4
push esi
push 0x1003d74
push 0x1003d30
push 0x22
jmp 0x1016d76
push dword [ebp + 0xc]
mov eax, dword [edi]
push 0x208
lea eax, [ebx + eax + 0x4c]
push eax
call fcn.01009521
mov esi, eax
test esi, esi
jge 0x1016d83
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016de4
test byte [eax + 0x1c], 4
je 0x1016de4
push esi
push 0x1003d74
push 0x1003d30
push 0x23
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a697
jmp 0x1016de4
mov eax, dword [edi]
inc dword [eax]
mov edi, dword [edi + 4]
inc dword [edi]
xor esi, esi
jmp 0x1016de4
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016db4
test byte [eax + 0x1c], 4
je 0x1016db4
push 0x1003d30
push 0x1d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a63f
mov esi, 0x80004005
jmp 0x1016df3
mov eax, dword [0x1028018]
cmp eax, 0x1028018
je 0x1016ddf
test byte [eax + 0x1c], 4
je 0x1016ddf
push 0x1003d30
push 0x1c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a63f
mov esi, 0x8000ffff
cmp dword [ebp - 4], 0
je 0x1016df3
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10