Function at 0x10151820
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
sub esp, 0x810
mov eax, dword [0x10291440]
xor eax, esp
mov dword [esp + 0x80c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x820]
push esi
push edi
mov edi, dword [esp + 0x824]
test edi, edi
je 0x10151888
mov esi, dword [edi]
test esi, esi
je 0x10151888
test byte [esi + 0x80], 6
je 0x10151868
push ebp
push str.fileops:_unlink__s
push edi
call fcn.100d0b10
add esp, 0xc
cmp dword [esp + 0x82c], 0
je 0x10151888
test dword [esi + 0x114], 0x200
je 0x10151888
push ebp
push edi
call fcn.10180e10
add esp, 8
mov ecx, ebp
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10151890
sub ecx, edx
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
lea ebx, [ecx + 1]
lea eax, [ebx + ebx]
push eax
push edi
call fcn.100dc800
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10151a4f
push ebx
push dword [esp + 0x14]
push 0xffffffffffffffff
push ebp
push eax
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x101518f0
call fcn.100f3810
push eax
call fcn.100f3830
mov esi, eax
add esp, 4
test esi, esi
jne 0x10151a4f
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
test edi, edi
je 0x1015192b
mov eax, dword [edi + 0x8c]
test eax, eax
je 0x1015192b
mov eax, dword [eax + 0x18]
cmp dword [eax + 4], 0
je 0x1015192b
mov eax, dword [edi]
test dword [eax + 0x114], 0x100
jne 0x1015192b
push edi
call fcn.100d1120
add esp, 4
jmp 0x10151a51
call fcn.1011b6d0
test eax, eax
je 0x101519d8
lea eax, [esp + 0x14]
push eax
push edi
call fcn.1015c280
push dword [esp + 0x1c]
lea eax, [esp + 0x28]
push dword [esp + 0x1c]
push str._s.del._010u
push 0x400
push eax
call fcn.100fb290
add esp, 0x1c
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x1015197f
lea eax, [esp + 0x1c]
mov dword [esp + 0x10], eax
jmp 0x101519a4
call fcn.100f3810
mov esi, eax
push esi
call fcn.100f3830
add esp, 4
cmp eax, 2
je 0x101519a4
push ebp
push str.MoveFile:_rename__s_to_temporary_file
push esi
push edi
call fcn.100d0600
add esp, 0x10
push 0
push 0x4000000
push 3
push 0
push 7
push 0
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x101519d8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10151a1b
xor esi, esi
lea ebx, [esi + 0x64]
nop dword [eax]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10151a17
call fcn.100f3810
mov esi, eax
push esi
call fcn.100f3830
add esp, 4
cmp eax, 0xb
je 0x10151a12
cmp eax, 0x10
je 0x10151a12
cmp eax, 4
je 0x10151a12
cmp eax, 5
jne 0x10151a17
dec ebx
test ebx, ebx
jg 0x101519e0
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x10151a29
push ebx
push edi
call fcn.100dc7e0
add esp, 8
test esi, esi
je 0x10151a4f
push esi
call fcn.100f3830
mov ebx, eax
add esp, 4
cmp ebx, 2
je 0x10151a4d
push ebp
push str.DeleteFile:__s
push esi
push edi
call fcn.100d0ec0
add esp, 0x10
mov esi, ebx
mov eax, esi
mov ecx, dword [esp + 0x81c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1021eb98
add esp, 0x810
ret