Function at 0x4140a0
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57dd48
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x5eb6e0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov ecx, dword [eax - 0xc]
xor esi, esi
mov dword [ebp - 0x1c], esi
cmp ecx, esi
jne 0x4140f0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x414100
test al, 0x10
jne 0x414117
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], esi
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00403760
lea ecx, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x18], ecx
mov byte [ebp - 4], 1
mov edx, dword [ecx - 0xc]
lea eax, [edx - 1]
cmp eax, esi
jl 0x4142fa
cmp eax, edx
jg 0x4142fa
movzx eax, word [ecx + eax*2]
cmp ax, 0x5c
je 0x41415f
push 0x5b23c8
lea ecx, [ebp - 0x18]
call fcn.00405a10
push 0x5b4888
lea ecx, [ebp - 0x18]
call fcn.00405a10
lea ecx, [ebp - 0x40]
call fcn.0045f386
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
push esi
push eax
lea ecx, [ebp - 0x40]
call fcn.0045f41e
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, eax
lea ecx, [ecx]
cmp edi, 1
jne 0x414274
lea ecx, [ebp - 0x40]
call fcn.0045f068
lea ecx, [ebp - 0x40]
mov edi, eax
call fcn.0045f347
cmp eax, 1
je 0x414190
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [ebp - 0x40]
call eax
test eax, eax
jne 0x41422b
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x40]
call fcn.0045f61d
mov esi, eax
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x4141f4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4141f4
test al, 1
je 0x4141f4
mov ecx, dword [esi]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x414213
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x40]
call fcn.0045f61d
mov eax, dword [eax]
push eax
call ebx
mov esi, eax
mov eax, dword [ebp - 0x24]
jmp 0x41424d
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x40]
call fcn.0045f61d
push eax
mov byte [ebp - 4], 3
call fcn.004140a0
mov esi, eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x28]
add esp, 4
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
mov dword [ebp - 0x1c], esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41426c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x414190
lea ecx, [ebp - 0x40]
call fcn.0045ef82
mov edi, dword [ebp + 8]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
je 0x4142a4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4142a4
test al, 1
je 0x4142a4
mov ecx, dword [edi]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp esi, 1
jne 0x4142b7
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, eax
mov dword [ebp - 0x1c], esi
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.0045f3af
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41430d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004038e0
mov eax, 0x41430a
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret