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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x22
push 0
push 0
dec ecx
jne 0x57af9c
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040712c
xor eax, eax
push ebp
push 0x57b910
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 4]
mov edx, 0x57b930
call fcn.00407c78
mov eax, dword [ebp - 0x38]
call fcn.00566378
mov byte [ebp - 0x21], 0
lea eax, [ebp - 0x10]
call fcn.00579220
lea eax, [ebp - 0x14]
call fcn.005793f4
lea eax, [ebp - 0x18]
call fcn.00579220
lea edx, [ebp - 0x3c]
mov eax, 0x57b964
call fcn.00426014
push dword [ebp - 0x3c]
push 0x57b990
push 0x57b9a0
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00407d00
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0041ed04
test al, al
jne 0x57b030
mov eax, dword [ebp - 0xc]
call fcn.0041edd0
lea eax, [ebp - 0xc]
mov edx, 0x57b990
call fcn.00407c20
lea eax, [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov edx, 0x57b9c8
call fcn.00407c78
mov eax, dword [ebp - 0x40]
call fcn.00566378
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
call fcn.004fc7bc
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
call dword [edx + 0x90]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov ebx, dword [eax + 8]
dec ebx
test ebx, ebx
jl 0x57b5ea
inc ebx
xor esi, esi
lea ecx, [ebp - 8]
mov edx, esi
mov eax, dword [ebp - 0x28]
call fcn.005038cc
mov edx, dword [ebp - 8]
mov eax, 0x57b990
call fcn.0044eebc
test al, al
jne 0x57b0ab
lea eax, [ebp - 8]
mov edx, 0x57b990
call fcn.00407c20
lea eax, [ebp - 0x44]
mov ecx, dword [ebp - 8]
mov edx, 0x57b9ec
call fcn.00407c78
mov eax, dword [ebp - 0x44]
call fcn.00566378
mov edx, 0x57ba08
mov eax, dword [ebp - 0x14]
call fcn.0041dcf8
test al, al
je 0x57b0d8
mov al, 1
jmp 0x57b0e5
mov edx, dword [ebp - 0x18]
mov eax, 0x57ba30
call fcn.0044ee68
test al, al
je 0x57b0fa
mov edx, dword [ebp - 0x18]
mov eax, 0x57ba44
call fcn.0044ee68
xor al, 1
jmp 0x57b0fc
xor eax, eax
test al, al
jne 0x57b153
lea eax, [ebp - 0x48]
mov ecx, 0x57ba5c
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x48]
mov dl, 1
call fcn.0041ec6c
test al, al
je 0x57b153
lea eax, [ebp - 0x4c]
mov ecx, 0x57ba5c
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x4c]
push eax
lea eax, [ebp - 0x50]
mov ecx, 0x57ba5c
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x50]
pop edx
call fcn.0057aa9c
test al, al
je 0x57b153
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0x54]
mov ecx, 0x57ba80
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x54]
mov dl, 1
call fcn.0041ec6c
test al, al
je 0x57b1a6
lea eax, [ebp - 0x58]
mov ecx, 0x57ba80
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x58]
push eax
lea eax, [ebp - 0x5c]
mov ecx, 0x57ba80
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x5c]
pop edx
call fcn.0057aa9c
test al, al
je 0x57b1a6
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0x60]
mov ecx, 0x57baa0
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x60]
mov dl, 1
call fcn.0041ec6c
test al, al
je 0x57b1f9
lea eax, [ebp - 0x64]
mov ecx, 0x57baa0
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x64]
push eax
lea eax, [ebp - 0x68]
mov ecx, 0x57baa0
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x68]
pop edx
call fcn.0057aa9c
test al, al
je 0x57b1f9
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0x6c]
mov ecx, 0x57bac4
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x6c]
push eax
lea eax, [ebp - 0x70]
mov ecx, 0x57bac4
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x70]
pop edx
call fcn.0057aa9c
test al, al
je 0x57b22e
mov byte [ebp - 0x21], 1
mov edx, 0x57bae8
mov eax, dword [ebp - 0x14]
call fcn.0041dcf8
test al, al
je 0x57b2ee
lea eax, [ebp - 0x74]
mov ecx, 0x57bb00
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x74]
push eax
lea eax, [ebp - 0x78]
mov ecx, 0x57bb00
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x78]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b278
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0x7c]
mov ecx, 0x57bb30
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x7c]
push eax
lea eax, [ebp - 0x80]
mov ecx, 0x57bb30
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x80]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b2ad
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0x84]
mov ecx, 0x57bb58
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x84]
push eax
lea eax, [ebp - 0x88]
mov ecx, 0x57bb58
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x88]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b2ee
mov byte [ebp - 0x21], 1
mov edx, 0x57bb80
mov eax, dword [ebp - 0x14]
call fcn.0041dcf8
test al, al
je 0x57b340
lea eax, [ebp - 0x8c]
mov ecx, 0x57bb98
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x8c]
push eax
lea eax, [ebp - 0x90]
mov ecx, 0x57bb98
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x90]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b340
mov byte [ebp - 0x21], 1
mov edx, 0x57ba08
mov eax, dword [ebp - 0x14]
call fcn.0041dcf8
test al, al
je 0x57b4db
lea eax, [ebp - 0x94]
mov ecx, 0x57bbc8
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x94]
push eax
lea eax, [ebp - 0x98]
mov ecx, 0x57bbc8
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0x98]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b396
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0x9c]
mov ecx, 0x57bbc8
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x9c]
push eax
lea eax, [ebp - 0xa0]
mov ecx, 0x57bbfc
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xa0]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b3d7
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0xa4]
mov ecx, 0x57bc38
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0xa4]
push eax
lea eax, [ebp - 0xa8]
mov ecx, 0x57bc38
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xa8]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b418
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0xac]
mov ecx, 0x57bc60
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0xac]
push eax
lea eax, [ebp - 0xb0]
mov ecx, 0x57bc60
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xb0]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b459
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0xb4]
mov ecx, 0x57bc94
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0xb4]
push eax
lea eax, [ebp - 0xb8]
mov ecx, 0x57bc94
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xb8]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b49a
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0xbc]
mov ecx, 0x57bcc4
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0xbc]
push eax
lea eax, [ebp - 0xc0]
mov ecx, 0x57bcc4
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xc0]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b4db
mov byte [ebp - 0x21], 1
mov edx, 0x57bd00
mov eax, dword [ebp - 0x14]
call fcn.0041dcf8
test al, al
je 0x57b52d
lea eax, [ebp - 0xc4]
mov ecx, 0x57bd28
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0xc4]
push eax
lea eax, [ebp - 0xc8]
mov ecx, 0x57bd28
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xc8]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b52d
mov byte [ebp - 0x21], 1
mov edx, dword [ebp - 0x18]
mov eax, 0x57bd58
call fcn.0044ee68
test al, al
je 0x57b5e2
lea eax, [ebp - 0xcc]
mov ecx, 0x57bd6c
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xcc]
call fcn.00566378
lea eax, [ebp - 0xd0]
mov ecx, 0x57bd6c
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0xd0]
push eax
lea eax, [ebp - 0xd4]
mov ecx, 0x57bd6c
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xd4]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b5a1
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0xd8]
mov ecx, 0x57bd9c
mov edx, dword [ebp - 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0xd8]
push eax
lea eax, [ebp - 0xdc]
mov ecx, 0x57bd9c
mov edx, dword [ebp - 8]
call fcn.00407c78
mov eax, dword [ebp - 0xdc]
pop edx
call fcn.0057ac7c
test al, al
je 0x57b5e2
mov byte [ebp - 0x21], 1
inc esi
dec ebx
jne 0x57b080
push 0
call sub.ole32.dll_CoInitialize
xor edx, edx
push ebp
push 0x57b7c3
push dword fs:[edx]
mov dword fs:[edx], esp
mov dl, 1
mov eax, dword [0x4376a8]
call fcn.00444474
mov dword [ebp - 0x2c], eax
xor edx, edx
push ebp
push 0x57b7a9
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0xe0]
mov ecx, dword [ebp - 0xc]
mov edx, 0x57bdcc
call fcn.00407c78
mov eax, dword [ebp - 0xe0]
call fcn.00566378
push 0
mov ecx, 0x57bdf0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
call fcn.0056f288
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
call dword [edx + 0x14]
lea edx, [ebp - 0xe8]
call fcn.0041e334
mov ecx, dword [ebp - 0xe8]
lea eax, [ebp - 0xe4]
mov edx, 0x57bdcc
call fcn.00407c78
mov eax, dword [ebp - 0xe4]
call fcn.00566378
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
call dword [edx + 0x14]
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x57b793
inc ebx
xor esi, esi
lea ecx, [ebp - 0xec]
mov edx, esi
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0xec]
lea edx, [ebp - 0x1c]
call fcn.0057ae24
mov dl, 1
mov eax, dword [ebp - 0x1c]
call fcn.0041ec6c
test al, al
jne 0x57b78b
lea ecx, [ebp - 0xf0]
mov edx, esi
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edi, dword [ebp - 0xf0]
mov dword [ebp - 0xf4], edi
mov eax, dword [ebp - 0xf4]
call fcn.00407a2c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x2e], al
cmp byte [ebp - 0x2e], 0
jne 0x57b75a
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x34], eax
mov dword [ebp - 0xf4], edi
mov eax, dword [ebp - 0xf4]
call fcn.00407a2c
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x57b751
test ah, 4
je 0x57b751
test al, 0x10
je 0x57b751
mov dword [ebp - 0xf4], edi
mov eax, dword [ebp - 0xf4]
call fcn.00407a2c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x2e], al
jmp 0x57b75a
mov eax, dword [ebp - 0x34]
push eax
call sub.kernel32.dll_SetLastError
lea ecx, [ebp - 0xfc]
mov edx, esi
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax]
call dword [edi + 0xc]
mov ecx, dword [ebp - 0xfc]
lea eax, [ebp - 0xf8]
mov edx, 0x57be08
call fcn.00407c78
mov eax, dword [ebp - 0xf8]
call fcn.00566378
inc esi
dec ebx
jne 0x57b696
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x57b7b0
mov eax, dword [ebp - 0x2c]
call fcn.00405628
ret