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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b80f9
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x4f5038]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x44]
xorps xmm0, xmm0
mov dword [ebp - 0xa8], 0
push eax
movlpd qword [ebp - 0xc4], xmm0
call fcn.00403500
mov dword [ebp - 4], 0
lea eax, [ebp - 0x44]
push 0x10
push eax
call fcn.00408990
add esp, 8
mov dword [ebp - 0x7c], 0
xorps xmm0, xmm0
mov dword [ebp - 0x78], 0
lea ecx, [ebp - 0x5c]
movlpd qword [ebp - 0x84], xmm0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
movlpd qword [ebp - 0x64], xmm0
call fcn.004034e0
mov byte [ebp - 4], 2
push 4
mov dword [ebp - 0xbc], 0
call fcn.00494810
add esp, 4
mov dword [ebp - 0xc8], eax
mov byte [ebp - 4], 3
mov dword [eax], 0
mov dword [eax], 0xffffffff
mov byte [ebp - 4], 2
mov dword [ebp - 0xbc], eax
mov byte [ebp - 4], 4
lea eax, [ebp - 0x44]
push 0x4d6bd4
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00406c60
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x84]
push ecx
push eax
lea ecx, [ebp - 0xbc]
call fcn.0040b5f0
mov bl, al
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov esi, dword [ebp - 0xbc]
test bl, bl
je 0x4065d7
lea ecx, [ebp - 0x84]
call fcn.0040b270
test al, al
jne 0x406003
mov eax, dword [ebp - 0x64]
and eax, 0x10
or eax, 0
je 0x405f8c
mov al, 1
jmp 0x405f8e
xor al, al
test al, al
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
je 0x405fcf
call fcn.00406d10
add esp, 0xc
mov byte [ebp - 4], 6
push eax
call fcn.00405e40
mov edi, eax
mov dword [ebp - 0xb0], edx
add esp, 4
mov dword [ebp - 0xac], edi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
jmp 0x40601b
call fcn.00406d10
add esp, 0xc
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2c]
call fcn.0040faf0
movzx eax, al
cdq
mov edi, eax
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xb0], edx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
jmp 0x40601b
mov edx, dword [ebp - 0xc0]
mov edi, dword [ebp - 0xc4]
mov dword [ebp - 0xb0], edx
mov dword [ebp - 0xac], edi
lea eax, [ebp - 0x84]
mov ecx, esi
push eax
call fcn.0040b330
test al, al
je 0x406457
lea ecx, [ebp - 0x5c]
call fcn.00403630
mov ebx, eax
nop dword [eax + eax]
mov edi, dword [ebp - 0x64]
and edi, 0x10
mov ecx, edi
or ecx, 0
je 0x406051
mov al, 1
jmp 0x406053
xor al, al
test al, al
je 0x4060a6
lea ecx, [ebp - 0x5c]
call fcn.00403350
test al, al
jne 0x4060a6
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x40606d
mov eax, dword [ebx]
cmp word [eax], 0x2e
jne 0x4060a6
lea ecx, [ebp - 0x5c]
call fcn.004036c0
cmp eax, 1
je 0x40643b
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x40608e
mov eax, dword [ebx]
cmp word [eax + 2], 0x2e
jne 0x4060a6
lea ecx, [ebp - 0x5c]
call fcn.004036c0
cmp eax, 2
je 0x40643b
or edi, 0
je 0x4060af
mov al, 1
jmp 0x4060b1
xor al, al
test al, al
je 0x406275
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x2c]
call fcn.004034e0
or dword [ebp - 0xa8], 1
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0xb8], eax
call fcn.004036c0
lea ecx, [ebp - 0x44]
mov edi, eax
call fcn.004036c0
add edi, eax
lea ecx, [ebp - 0x2c]
push edi
call fcn.00407170
lea ecx, [ebp - 0x44]
call fcn.00403630
mov dword [ebp - 0xa4], eax
cmp dword [eax + 0x14], 8
jb 0x40610b
mov ecx, dword [eax]
mov dword [ebp - 0xa4], ecx
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0xa0], eax
call fcn.00403630
mov edi, eax
mov eax, dword [ebp - 0xa0]
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
sub ecx, edx
cmp eax, ecx
ja 0x406190
cmp dword [edi + 0x14], 8
lea ecx, [edx + eax]
mov dword [ebp - 0xb4], ecx
mov dword [edi + 0x10], ecx
mov ecx, edi
mov dword [ebp - 0xa0], edi
jb 0x406152
mov ecx, dword [edi]
mov dword [ebp - 0xa0], ecx
push eax
push dword [ebp - 0xa4]
lea eax, [ecx + edx*2]
push eax
call fcn.00403a60
mov ecx, dword [ebp - 0xb4]
lea eax, [ebp - 0xa4]
add esp, 0xc
mov dword [ebp - 0xa4], 0
push eax
mov eax, dword [ebp - 0xa0]
lea eax, [eax + ecx*2]
push eax
call fcn.00403a50
add esp, 8
jmp 0x4061ad
push eax
push dword [ebp - 0xa4]
mov byte [ebp - 0xcc], 0
lea ecx, [ebp - 0x2c]
push dword [ebp - 0xcc]
push eax
call fcn.00403e10
cmp dword [ebx + 0x14], 8
mov edx, ebx
jb 0x4061b7
mov edx, dword [ebx]
mov eax, dword [edi + 0x10]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0xa0], eax
mov eax, dword [edi + 0x14]
sub eax, dword [ebp - 0xa0]
cmp ecx, eax
ja 0x406223
cmp dword [edi + 0x14], 8
mov eax, dword [ebp - 0xa0]
lea esi, [eax + ecx]
mov dword [ebp - 0xa0], esi
mov dword [edi + 0x10], esi
mov esi, dword [ebp - 0xbc]
jb 0x4061f0
mov edi, dword [edi]
push ecx
push edx
lea eax, [edi + eax*2]
push eax
call fcn.00403a60
add esp, 0xc
mov dword [ebp - 0xb4], 0
lea eax, [ebp - 0xb4]
push eax
mov eax, dword [ebp - 0xa0]
lea eax, [edi + eax*2]
push eax
call fcn.00403a50
add esp, 8
jmp 0x40623b
push ecx
push edx
mov byte [ebp - 0xd0], 0
push dword [ebp - 0xd0]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00403e10
push dword [ebp - 0xb8]
call fcn.00405e40
mov edi, dword [ebp - 0xac]
add esp, 4
add edi, eax
mov dword [ebp - 0xac], edi
adc dword [ebp - 0xb0], edx
and dword [ebp - 0xa8], 0xfffffffe
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
jmp 0x406441
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x9c]
call fcn.004034e0
or dword [ebp - 0xa8], 2
lea ecx, [ebp - 0x5c]
call fcn.004036c0
lea ecx, [ebp - 0x44]
mov edi, eax
call fcn.004036c0
add edi, eax
lea ecx, [ebp - 0x9c]
push edi
call fcn.00407170
lea ecx, [ebp - 0x44]
call fcn.00403630
mov dword [ebp - 0xa4], eax
cmp dword [eax + 0x14], 8
jb 0x4062c7
mov ecx, dword [eax]
mov dword [ebp - 0xa4], ecx
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0xb8], eax
call fcn.00403630
mov edi, eax
mov eax, dword [ebp - 0xb8]
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
sub ecx, edx
cmp eax, ecx
ja 0x40634f
cmp dword [edi + 0x14], 8
lea ecx, [edx + eax]
mov dword [ebp - 0xb4], ecx
mov dword [edi + 0x10], ecx
mov ecx, edi
mov dword [ebp - 0xa0], edi
jb 0x406311
mov ecx, dword [edi]
mov dword [ebp - 0xa0], ecx
push eax
push dword [ebp - 0xa4]
lea eax, [ecx + edx*2]
push eax
call fcn.00403a60
mov ecx, dword [ebp - 0xb4]
lea eax, [ebp - 0xb8]
add esp, 0xc
mov dword [ebp - 0xb8], 0
push eax
mov eax, dword [ebp - 0xa0]
lea eax, [eax + ecx*2]
push eax
call fcn.00403a50
add esp, 8
jmp 0x40636f
push eax
push dword [ebp - 0xa4]
mov byte [ebp - 0xc0], 0
lea ecx, [ebp - 0x9c]
push dword [ebp - 0xc0]
push eax
call fcn.00403e10
cmp dword [ebx + 0x14], 8
mov edx, ebx
jb 0x406379
mov edx, dword [ebx]
mov eax, dword [edi + 0x10]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0xa0], eax
mov eax, dword [edi + 0x14]
sub eax, dword [ebp - 0xa0]
cmp ecx, eax
ja 0x4063e5
cmp dword [edi + 0x14], 8
mov eax, dword [ebp - 0xa0]
lea esi, [eax + ecx]
mov dword [ebp - 0xb4], esi
mov dword [edi + 0x10], esi
mov esi, dword [ebp - 0xbc]
jb 0x4063b2
mov edi, dword [edi]
push ecx
push edx
lea eax, [edi + eax*2]
push eax
call fcn.00403a60
add esp, 0xc
mov dword [ebp - 0xb8], 0
lea eax, [ebp - 0xb8]
push eax
mov eax, dword [ebp - 0xb4]
lea eax, [edi + eax*2]
push eax
call fcn.00403a50
add esp, 8
jmp 0x406400
push ecx
push edx
mov byte [ebp - 0xc8], 0
push dword [ebp - 0xc8]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.00403e10
lea ecx, [ebp - 0x9c]
call fcn.0040faf0
mov edi, dword [ebp - 0xac]
movzx eax, al
cdq
add edi, eax
mov dword [ebp - 0xac], edi
adc dword [ebp - 0xb0], edx
and dword [ebp - 0xa8], 0xfffffffd
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x9c]
call fcn.00403400
jmp 0x406441
mov edi, dword [ebp - 0xac]
lea eax, [ebp - 0x84]
mov ecx, esi
push eax
call fcn.0040b330
test al, al
jne 0x406040
mov ebx, dword [ebp - 0xb0]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x406475
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x406475
mov dword [esi], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4065f4
lea ecx, [ebp - 0x2c]
call fcn.004034e0
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.0040fd60
test al, al
je 0x4064be
lea ecx, [ebp - 0x2c]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4065e8
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
lea ecx, [ebp - 0x44]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0xa4], eax
cmp eax, 0xffffffff
jne 0x40652d
lea ecx, [ebp - 0x2c]
call fcn.004034e0
mov byte [ebp - 4], 0xb
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.0040fd60
test al, al
je 0x406514
lea ecx, [ebp - 0x2c]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0xa4], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
cmp dword [ebp - 0xa4], 0xffffffff
je 0x4065fa
push 0
lea ecx, [ebp - 0x44]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40657a
lea ecx, [ebp - 0x2c]
call fcn.004034e0
mov byte [ebp - 4], 0xc
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.0040fd60
test al, al
je 0x40656e
push 0
lea ecx, [ebp - 0x2c]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
lea ecx, [ebp - 0x44]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4065f4
lea ecx, [ebp - 0x2c]
call fcn.004034e0
mov byte [ebp - 4], 0xd
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.0040fd60
test al, al
je 0x4065bb
lea ecx, [ebp - 0x2c]
call fcn.00403360
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4065e8
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov edx, dword [ebp - 0xa4]
lea ecx, [ebp - 0x44]
call fcn.0040f9a0
jmp 0x4065fa
mov ebx, dword [ebp - 0xc0]
mov edi, dword [ebp - 0xc4]
jmp 0x40645d
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00403400
add edi, 1
adc ebx, 0
mov byte [ebp - 4], 2
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x406616
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x406616
mov dword [esi], 0xffffffff
push 4
push esi
call fcn.00494840
add esp, 8
mov dword [ebp - 0xbc], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x5c]
call fcn.00403400
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00403400
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 - 0x14]
xor ecx, ebp
call fcn.004947ff
mov esp, ebp
pop ebp
ret