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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47d576
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x4a8068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
mov dword [ebp - 0xac], 0
push ecx
lea ecx, [ebp - 0x44]
movlpd qword [ebp - 0xc8], xmm0
call fcn.00405400
mov dword [ebp - 4], 0
lea eax, [ebp - 0x44]
push 0x10
push eax
call fcn.0040f610
add esp, 8
mov dword [ebp - 0x80], 0
xorps xmm0, xmm0
mov dword [ebp - 0x7c], 0
lea ecx, [ebp - 0x60]
movlpd qword [ebp - 0x88], xmm0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
movlpd qword [ebp - 0x68], xmm0
call fcn.004053e0
mov byte [ebp - 4], 2
push 4
mov dword [ebp - 0x14], 0
call fcn.0045522d
add esp, 4
mov dword [ebp - 0xcc], eax
mov byte [ebp - 4], 3
mov dword [eax], 0
mov dword [eax], 0xffffffff
mov byte [ebp - 4], 2
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 4
lea eax, [ebp - 0x44]
push 0x491f78
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004078c0
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x88]
push ecx
push eax
lea ecx, [ebp - 0x14]
call fcn.0040c5d0
mov bl, al
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
mov esi, dword [ebp - 0x14]
test bl, bl
je 0x40db8e
lea ecx, [ebp - 0x88]
call fcn.0040c310
test al, al
jne 0x40d5c2
mov eax, dword [ebp - 0x68]
and eax, 0x10
or eax, 0
je 0x40d54d
mov al, 1
jmp 0x40d54f
xor al, al
test al, al
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
je 0x40d58e
call fcn.0040e6c0
add esp, 0xc
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.0040d410
mov edi, eax
mov dword [ebp - 0xb4], edx
mov dword [ebp - 0xb0], edi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
jmp 0x40d5da
call fcn.0040e6c0
add esp, 0xc
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2c]
call fcn.00418d50
movzx eax, al
cdq
mov edi, eax
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xb4], edx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
jmp 0x40d5da
mov edx, dword [ebp - 0xc4]
mov edi, dword [ebp - 0xc8]
mov dword [ebp - 0xb4], edx
mov dword [ebp - 0xb0], edi
lea eax, [ebp - 0x88]
mov ecx, esi
push eax
call fcn.0040c380
test al, al
je 0x40da0e
lea ecx, [ebp - 0x60]
call fcn.00406710
mov ebx, eax
nop word [eax + eax]
mov edi, dword [ebp - 0x68]
and edi, 0x10
mov ecx, edi
or ecx, 0
je 0x40d611
mov al, 1
jmp 0x40d613
xor al, al
test al, al
je 0x40d666
lea ecx, [ebp - 0x60]
call fcn.00405270
test al, al
jne 0x40d666
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x40d62d
mov eax, dword [ebx]
cmp word [eax], 0x2e
jne 0x40d666
lea ecx, [ebp - 0x60]
call fcn.004069c0
cmp eax, 1
je 0x40d9f2
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x40d64e
mov eax, dword [ebx]
cmp word [eax + 2], 0x2e
jne 0x40d666
lea ecx, [ebp - 0x60]
call fcn.004069c0
cmp eax, 2
je 0x40d9f2
or edi, 0
je 0x40d66f
mov al, 1
jmp 0x40d671
xor al, al
test al, al
je 0x40d82f
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x2c]
call fcn.004053e0
or dword [ebp - 0xac], 1
lea ecx, [ebp - 0x60]
mov dword [ebp - 0xbc], eax
call fcn.004069c0
lea ecx, [ebp - 0x44]
mov edi, eax
call fcn.004069c0
add edi, eax
lea ecx, [ebp - 0x2c]
push edi
call fcn.00408090
lea ecx, [ebp - 0x44]
call fcn.00406710
mov dword [ebp - 0xa8], eax
cmp dword [eax + 0x14], 8
jb 0x40d6cb
mov ecx, dword [eax]
mov dword [ebp - 0xa8], ecx
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0xa4], eax
call fcn.00406710
mov edi, eax
mov eax, dword [ebp - 0xa4]
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
sub ecx, edx
cmp eax, ecx
ja 0x40d750
cmp dword [edi + 0x14], 8
lea ecx, [edx + eax]
mov dword [ebp - 0xb8], ecx
mov dword [edi + 0x10], ecx
mov ecx, edi
mov dword [ebp - 0xa4], edi
jb 0x40d712
mov ecx, dword [edi]
mov dword [ebp - 0xa4], ecx
push eax
push dword [ebp - 0xa8]
lea eax, [ecx + edx*2]
push eax
call fcn.004076d0
mov ecx, dword [ebp - 0xb8]
lea eax, [ebp - 0xa8]
add esp, 0xc
mov dword [ebp - 0xa8], 0
push eax
mov eax, dword [ebp - 0xa4]
lea eax, [eax + ecx*2]
push eax
call fcn.004076c0
add esp, 8
jmp 0x40d76d
push eax
push dword [ebp - 0xa8]
mov byte [ebp - 0xd0], 0
lea ecx, [ebp - 0x2c]
push dword [ebp - 0xd0]
push eax
call fcn.00408890
cmp dword [ebx + 0x14], 8
mov edx, ebx
jb 0x40d777
mov edx, dword [ebx]
mov eax, dword [edi + 0x10]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0xa4], eax
mov eax, dword [edi + 0x14]
sub eax, dword [ebp - 0xa4]
cmp ecx, eax
ja 0x40d7e0
cmp dword [edi + 0x14], 8
mov eax, dword [ebp - 0xa4]
lea esi, [eax + ecx]
mov dword [ebp - 0xa4], esi
mov dword [edi + 0x10], esi
mov esi, dword [ebp - 0x14]
jb 0x40d7ad
mov edi, dword [edi]
push ecx
push edx
lea eax, [edi + eax*2]
push eax
call fcn.004076d0
add esp, 0xc
mov dword [ebp - 0xb8], 0
lea eax, [ebp - 0xb8]
push eax
mov eax, dword [ebp - 0xa4]
lea eax, [edi + eax*2]
push eax
call fcn.004076c0
add esp, 8
jmp 0x40d7f8
push ecx
push edx
mov byte [ebp - 0xd4], 0
push dword [ebp - 0xd4]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00408890
mov ecx, dword [ebp - 0xbc]
call fcn.0040d410
mov edi, dword [ebp - 0xb0]
add edi, eax
mov dword [ebp - 0xb0], edi
adc dword [ebp - 0xb4], edx
and dword [ebp - 0xac], 0xfffffffe
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
jmp 0x40d9f8
mov byte [ebp - 4], 9
lea ecx, [ebp - 0xa0]
call fcn.004053e0
or dword [ebp - 0xac], 2
lea ecx, [ebp - 0x60]
call fcn.004069c0
lea ecx, [ebp - 0x44]
mov edi, eax
call fcn.004069c0
add edi, eax
lea ecx, [ebp - 0xa0]
push edi
call fcn.00408090
lea ecx, [ebp - 0x44]
call fcn.00406710
mov dword [ebp - 0xa8], eax
cmp dword [eax + 0x14], 8
jb 0x40d881
mov ecx, dword [eax]
mov dword [ebp - 0xa8], ecx
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0xbc], eax
call fcn.00406710
mov edi, eax
mov eax, dword [ebp - 0xbc]
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
sub ecx, edx
cmp eax, ecx
ja 0x40d909
cmp dword [edi + 0x14], 8
lea ecx, [edx + eax]
mov dword [ebp - 0xb8], ecx
mov dword [edi + 0x10], ecx
mov ecx, edi
mov dword [ebp - 0xa4], edi
jb 0x40d8cb
mov ecx, dword [edi]
mov dword [ebp - 0xa4], ecx
push eax
push dword [ebp - 0xa8]
lea eax, [ecx + edx*2]
push eax
call fcn.004076d0
mov ecx, dword [ebp - 0xb8]
lea eax, [ebp - 0xbc]
add esp, 0xc
mov dword [ebp - 0xbc], 0
push eax
mov eax, dword [ebp - 0xa4]
lea eax, [eax + ecx*2]
push eax
call fcn.004076c0
add esp, 8
jmp 0x40d929
push eax
push dword [ebp - 0xa8]
mov byte [ebp - 0xc4], 0
lea ecx, [ebp - 0xa0]
push dword [ebp - 0xc4]
push eax
call fcn.00408890
cmp dword [ebx + 0x14], 8
mov edx, ebx
jb 0x40d933
mov edx, dword [ebx]
mov eax, dword [edi + 0x10]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0xa4], eax
mov eax, dword [edi + 0x14]
sub eax, dword [ebp - 0xa4]
cmp ecx, eax
ja 0x40d99c
cmp dword [edi + 0x14], 8
mov eax, dword [ebp - 0xa4]
lea esi, [eax + ecx]
mov dword [ebp - 0xb8], esi
mov dword [edi + 0x10], esi
mov esi, dword [ebp - 0x14]
jb 0x40d969
mov edi, dword [edi]
push ecx
push edx
lea eax, [edi + eax*2]
push eax
call fcn.004076d0
add esp, 0xc
mov dword [ebp - 0xbc], 0
lea eax, [ebp - 0xbc]
push eax
mov eax, dword [ebp - 0xb8]
lea eax, [edi + eax*2]
push eax
call fcn.004076c0
add esp, 8
jmp 0x40d9b7
push ecx
push edx
mov byte [ebp - 0xcc], 0
push dword [ebp - 0xcc]
push ecx
lea ecx, [ebp - 0xa0]
call fcn.00408890
lea ecx, [ebp - 0xa0]
call fcn.00418d50
mov edi, dword [ebp - 0xb0]
movzx eax, al
cdq
add edi, eax
mov dword [ebp - 0xb0], edi
adc dword [ebp - 0xb4], edx
and dword [ebp - 0xac], 0xfffffffd
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa0]
call fcn.004052c0
jmp 0x40d9f8
mov edi, dword [ebp - 0xb0]
lea eax, [ebp - 0x88]
mov ecx, esi
push eax
call fcn.0040c380
test al, al
jne 0x40d600
mov ebx, dword [ebp - 0xb4]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40da2c
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40da2c
mov dword [esi], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40dbab
lea ecx, [ebp - 0x2c]
call fcn.004053e0
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.004193a0
test al, al
je 0x40da75
lea ecx, [ebp - 0x2c]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40db9f
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0xa8], eax
cmp eax, 0xffffffff
jne 0x40dae4
lea ecx, [ebp - 0x2c]
call fcn.004053e0
mov byte [ebp - 4], 0xb
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.004193a0
test al, al
je 0x40dacb
lea ecx, [ebp - 0x2c]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
cmp dword [ebp - 0xa8], 0xffffffff
je 0x40dbb1
push 0
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40db31
lea ecx, [ebp - 0x2c]
call fcn.004053e0
mov byte [ebp - 4], 0xc
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.004193a0
test al, al
je 0x40db25
push 0
lea ecx, [ebp - 0x2c]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
lea ecx, [ebp - 0x44]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40dbab
lea ecx, [ebp - 0x2c]
call fcn.004053e0
mov byte [ebp - 4], 0xd
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.004193a0
test al, al
je 0x40db72
lea ecx, [ebp - 0x2c]
call fcn.00405280
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40db9f
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
mov edx, dword [ebp - 0xa8]
lea ecx, [ebp - 0x44]
call fcn.00418990
jmp 0x40dbb1
mov ebx, dword [ebp - 0xc4]
mov edi, dword [ebp - 0xc8]
jmp 0x40da14
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.004052c0
add edi, 1
adc ebx, 0
mov byte [ebp - 4], 2
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40dbcd
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40dbcd
mov dword [esi], 0xffffffff
push 4
push esi
call fcn.0045525d
add esp, 8
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x60]
call fcn.004052c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.004052c0
mov eax, edi
mov edx, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00455217
mov esp, ebp
pop ebp
ret