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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f150
mov eax, dword fs:[0]
push eax
sub esp, 0x2f4
mov eax, dword [0x42a008]
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
push ecx
lea ecx, [ebp - 0x44]
movlpd qword [ebp - 0x2e8], xmm0
call fcn.004051ca
mov dword [ebp - 4], 0
mov edx, 0x10
lea ecx, [ebp - 0x44]
call fcn.0040a250
xorps xmm0, xmm0
mov dword [ebp - 0x80], 0
lea ecx, [ebp - 0x60]
movlpd qword [ebp - 0x88], xmm0
mov dword [ebp - 0x7c], 0
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.004021ec
mov byte [ebp - 4], 2
push 4
mov dword [ebp - 0x14], 0
call fcn.0040c4bd
mov dword [ebp - 0x2dc], 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 edx, [ebp - 0x44]
lea ecx, [ebp - 0x2c]
call fcn.00409780
add esp, 4
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x88]
push ecx
push eax
lea ecx, [ebp - 0x14]
call fcn.00408890
mov bl, al
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401913
mov esi, dword [ebp - 0x14]
test bl, bl
je 0x40937d
mov edx, dword [ebp - 0x68]
and edx, 0x10
mov eax, edx
or eax, 0
je 0x409167
mov al, 1
jmp 0x409169
xor al, al
test al, al
je 0x4091cc
lea ecx, [ebp - 0x60]
call fcn.004021e4
test al, al
jne 0x4091cc
call fcn.0040192d
mov edi, eax
mov ebx, dword [edi + 0x14]
cmp ebx, 8
jb 0x40918a
mov eax, dword [edi]
cmp word [eax], 0x2e
jne 0x4091cc
lea ecx, [ebp - 0x60]
call fcn.004018b9
cmp eax, 1
je 0x4091b8
cmp ebx, 8
jb 0x4091a4
mov edi, dword [edi]
cmp word [edi + 2], 0x2e
jne 0x4091cc
lea ecx, [ebp - 0x60]
call fcn.004018b9
cmp eax, 2
jne 0x4091cc
mov eax, dword [ebp - 0x2e8]
mov ebx, dword [ebp - 0x2e4]
mov dword [ebp - 0x2dc], eax
jmp 0x409230
or edx, 0
je 0x4091d5
mov al, 1
jmp 0x4091d7
xor al, al
test al, al
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x60]
lea ecx, [ebp - 0x2c]
push eax
je 0x4091fa
call fcn.00409bd0
add esp, 4
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.00409050
jmp 0x409212
call fcn.00409bd0
add esp, 4
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2c]
call fcn.0040aa20
movzx eax, al
cdq
mov ebx, edx
mov dword [ebp - 0x2dc], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401913
nop word [eax + eax]
mov edi, dword [ebp - 0x2dc]
cmp dword [esi], 0xffffffff
je 0x409389
push 0x250
lea eax, [ebp - 0x2d8]
push 0
push eax
call fcn.0040e2f0
add esp, 0xc
lea eax, [ebp - 0x2d8]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x409389
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x2d8]
push eax
call fcn.00408770
mov edx, dword [ebp - 0x68]
and edx, 0x10
mov eax, edx
or eax, 0
je 0x409290
mov al, 1
jmp 0x409292
xor al, al
test al, al
je 0x4092ee
lea ecx, [ebp - 0x60]
call fcn.004021e4
test al, al
jne 0x4092ee
call fcn.0040192d
mov edi, eax
cmp dword [edi + 0x14], 8
jb 0x4092b1
mov eax, dword [edi]
cmp word [eax], 0x2e
jne 0x4092ee
lea ecx, [ebp - 0x60]
call fcn.004018b9
cmp eax, 1
je 0x409230
cmp dword [edi + 0x14], 8
jb 0x4092d0
mov edi, dword [edi]
cmp word [edi + 2], 0x2e
jne 0x4092ee
lea ecx, [ebp - 0x60]
call fcn.004018b9
mov edi, dword [ebp - 0x2dc]
cmp eax, 2
je 0x409236
or edx, 0
je 0x4092f7
mov al, 1
jmp 0x4092f9
xor al, al
test al, al
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x60]
push eax
je 0x409341
lea ecx, [ebp - 0x300]
call fcn.00409bd0
add esp, 4
mov byte [ebp - 4], 8
mov ecx, eax
call fcn.00409050
mov edi, dword [ebp - 0x2dc]
add edi, eax
mov dword [ebp - 0x2dc], edi
adc ebx, edx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x300]
call fcn.00401913
jmp 0x409236
lea ecx, [ebp - 0x2c]
call fcn.00409bd0
add esp, 4
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x2c]
call fcn.0040aa20
mov edi, dword [ebp - 0x2dc]
movzx eax, al
cdq
add edi, eax
mov dword [ebp - 0x2dc], edi
adc ebx, edx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401913
jmp 0x409236
mov ebx, dword [ebp - 0x2e4]
mov edi, dword [ebp - 0x2e8]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4093a1
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x4093a1
mov dword [esi], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.0040512e
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4094c5
lea ecx, [ebp - 0x2c]
call fcn.004021ec
mov byte [ebp - 4], 0xa
mov edx, ecx
lea ecx, [ebp - 0x44]
call fcn.0040b4d0
test al, al
je 0x4093e9
lea ecx, [ebp - 0x2c]
call fcn.0040512e
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4094b9
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401913
lea ecx, [ebp - 0x44]
call fcn.0040512e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x2dc], eax
cmp eax, 0xffffffff
jne 0x409453
lea ecx, [ebp - 0x2c]
call fcn.004021ec
mov byte [ebp - 4], 0xb
mov edx, ecx
lea ecx, [ebp - 0x44]
call fcn.0040b4d0
test al, al
je 0x40943e
lea ecx, [ebp - 0x2c]
call fcn.0040512e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x2dc], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401913
cmp dword [ebp - 0x2dc], 0xffffffff
je 0x4094cb
xor edx, edx
lea ecx, [ebp - 0x44]
call fcn.0040a850
lea ecx, [ebp - 0x44]
call fcn.0040512e
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4094c5
lea ecx, [ebp - 0x2c]
call fcn.004021ec
mov byte [ebp - 4], 0xc
mov edx, ecx
lea ecx, [ebp - 0x44]
call fcn.0040b4d0
test al, al
je 0x40949d
lea ecx, [ebp - 0x2c]
call fcn.0040512e
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4094b9
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401913
mov edx, dword [ebp - 0x2dc]
lea ecx, [ebp - 0x44]
call fcn.0040a850
jmp 0x4094cb
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401913
add edi, 1
adc ebx, 0
mov byte [ebp - 4], 2
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4094e7
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x4094e7
mov dword [esi], 0xffffffff
push 4
push esi
call fcn.0040c4ed
add esp, 8
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x60]
call fcn.00401913
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00401913
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.0040c4a7
mov esp, ebp
pop ebp
ret