Function at 0x1016bb3
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 0x1016edd
cmp dword [edi], ecx
je 0x1016edd
cmp dword [ebp + 8], ecx
je 0x1016eb2
cmp dword [ebp + 0xc], ecx
je 0x1016eb2
mov ebx, dword [eax]
mov ecx, dword [edi + 8]
imul ebx, ebx, 0x250
lea eax, [ebx + 0x254]
cmp ecx, eax
jae 0x1016c4c
add ecx, eax
push ecx
mov ecx, edi
call fcn.01016838
mov esi, eax
test esi, esi
jge 0x1016c4c
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016f15
test byte [eax + 0x1c], 4
je 0x1016f15
push esi
push 0x1003dcc
push 0x1003d58
push 0x1e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a721
jmp 0x1016f15
mov eax, dword [ebp + 0x10]
xor ecx, ecx
cmp eax, ecx
je 0x1016c88
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 0x1016dea
cmp dword [ebp + 0x14], ecx
je 0x1016cfd
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 0x1016ceb
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016cce
test byte [eax + 0x1c], 4
je 0x1016cce
push dword [ebp + 8]
push 0x1003d58
push 0x1f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100c249
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x1016cdf
mov esi, eax
jmp 0x1016f15
and eax, 0xffff
or eax, 0x80070000
jmp 0x1016cd8
and dword [ebx + eax + 0x48], 0
mov eax, dword [edi + 4]
and dword [ebx + eax + 0x44], 0
jmp 0x1016df1
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 0x1016d5b
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016d3e
test byte [eax + 0x1c], 4
je 0x1016d3e
push 0x1003d58
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a6cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x1016d4f
mov esi, eax
jmp 0x1016f0c
and eax, 0xffff
or eax, 0x80070000
jmp 0x1016d48
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 0x1016dbb
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016da0
test byte [eax + 0x1c], 4
je 0x1016da0
push 0x1003d58
push 0x21
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a6cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1016db4
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x1016f06
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.0100961d
mov esi, eax
test esi, esi
jge 0x1016e5b
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016f06
test byte [eax + 0x1c], 4
je 0x1016f06
push esi
push 0x1003d9c
push 0x1003d58
push 0x22
jmp 0x1016e98
push dword [ebp + 0xc]
mov eax, dword [edi]
push 0x208
lea eax, [ebx + eax + 0x4c]
push eax
call fcn.0100961d
mov esi, eax
test esi, esi
jge 0x1016ea5
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016f06
test byte [eax + 0x1c], 4
je 0x1016f06
push esi
push 0x1003d9c
push 0x1003d58
push 0x23
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a721
jmp 0x1016f06
mov eax, dword [edi]
inc dword [eax]
mov edi, dword [edi + 4]
inc dword [edi]
xor esi, esi
jmp 0x1016f06
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016ed6
test byte [eax + 0x1c], 4
je 0x1016ed6
push 0x1003d58
push 0x1d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a6cf
mov esi, 0x80004005
jmp 0x1016f15
mov eax, dword [0x1029018]
cmp eax, 0x1029018
je 0x1016f01
test byte [eax + 0x1c], 4
je 0x1016f01
push 0x1003d58
push 0x1c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100a6cf
mov esi, 0x8000ffff
cmp dword [ebp - 4], 0
je 0x1016f15
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10