Function at 0x40d940
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x446262
mov eax, dword fs:[0]
push eax
sub esp, 0x2f0
mov eax, dword [0x45a210]
xor eax, esp
mov dword [esp + 0x2e8], eax
push ebx
push esi
push edi
mov eax, dword [0x45a210]
xor eax, esp
push eax
lea eax, [esp + 0x300]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x54], ecx
mov word [esp + 0x44], cx
push 0xffffffffffffffff
lea ecx, [esp + 0x44]
mov esi, 7
push ecx
xor ebx, ebx
mov dword [esp + 0x60], esi
call fcn.00401318
xor edi, edi
push 0x10
lea ecx, [esp + 0x44]
mov dword [esp + 0x30c], edi
call fcn.0040d040
add esp, 4
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edi
mov dword [esp + 0x9c], esi
mov dword [esp + 0x98], edi
mov word [esp + 0x88], di
push 4
mov byte [esp + 0x30c], 1
call fcn.00435aa3
add esp, 4
cmp eax, edi
je 0x40da29
mov esi, eax
mov dword [eax], 0xffffffff
mov dword [esp + 0x1c], esi
jmp 0x40da2f
mov dword [esp + 0x1c], edi
mov esi, edi
mov dword [esp + 0x20], esi
push 0x44a5ac
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x314], 2
call fcn.00404449
add esp, 0xc
lea edx, [esp + 0x5c]
mov ecx, eax
mov byte [esp + 0x308], 3
call fcn.0040e620
mov byte [esp + 0x308], 2
cmp dword [esp + 0x3c], 8
mov bl, al
jb 0x40da83
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00435b68
add esp, 4
test bl, bl
je 0x40dce8
lea esi, [esp + 0x5c]
call fcn.0040e970
test al, al
jne 0x40db45
mov eax, dword [esp + 0x7c]
and eax, 0x10
xor ecx, ecx
or eax, ecx
je 0x40db00
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00408415
add esp, 0xc
push eax
mov byte [esp + 0x30c], 4
call fcn.0040d940
add esp, 4
mov byte [esp + 0x308], 2
cmp dword [esp + 0x3c], 8
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
jb 0x40db45
mov edx, dword [esp + 0x28]
push edx
call fcn.00435b68
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 4
jmp 0x40db57
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00408415
add esp, 0xc
lea edi, [esp + 0x24]
call fcn.0040d8e0
cmp dword [esp + 0x3c], 8
movzx eax, al
cdq
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
jb 0x40db43
mov eax, dword [esp + 0x28]
push eax
call fcn.00435b68
add esp, 4
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40db57
call fcn.00435b68
add esp, 4
xor edi, edi
mov esi, dword [esp + 0x1c]
mov edx, dword [esi]
lea ecx, [esp + 0xa4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
setne al
test al, al
je 0x40dcec
lea edi, [esp + 0x5c]
lea ecx, [esp + 0xa4]
call fcn.0040e6b0
mov edx, dword [esp + 0x7c]
mov eax, edx
xor ecx, ecx
and eax, 0x10
or eax, ecx
lea esi, [ecx + 8]
je 0x40dc01
mov ecx, dword [esp + 0x98]
test ecx, ecx
je 0x40dc01
cmp dword [esp + 0x9c], esi
mov eax, dword [esp + 0x88]
jae 0x40dbbd
lea eax, [esp + 0x88]
cmp word [eax], 0x2e
jne 0x40dc01
cmp ecx, 1
je 0x40db55
jae 0x40dbda
call fcn.00435ed5
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x7c]
cmp dword [esp + 0x9c], esi
mov eax, dword [esp + 0x88]
jae 0x40dbf1
lea eax, [esp + 0x88]
cmp word [eax + 2], 0x2e
jne 0x40dc01
cmp ecx, 2
je 0x40db55
and edx, 0x10
mov eax, edx
xor ecx, ecx
or eax, ecx
je 0x40dc5b
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00408415
add esp, 0xc
push eax
mov byte [esp + 0x30c], 5
call fcn.0040d940
add esp, 4
add dword [esp + 0x14], eax
mov byte [esp + 0x308], 2
adc dword [esp + 0x18], edx
cmp dword [esp + 0x3c], esi
jb 0x40db55
mov eax, dword [esp + 0x28]
push eax
jmp 0x40db4d
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.00408415
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp dword [esp + 0x3c], esi
jae 0x40dc83
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40dcb2
and eax, 0xfffffffe
cmp eax, 0xffffffff
je 0x40dcb2
mov ecx, dword [esp + 0x28]
and eax, 0xffffb1af
cmp dword [esp + 0x3c], esi
jae 0x40dcaa
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x3c], esi
mov eax, dword [esp + 0x28]
jae 0x40dcc0
lea eax, [esp + 0x28]
push eax
call ebx
test eax, eax
setne cl
movzx eax, cl
cdq
add dword [esp + 0x14], eax
adc dword [esp + 0x18], edx
cmp dword [esp + 0x3c], esi
jb 0x40db55
mov edx, dword [esp + 0x28]
push edx
jmp 0x40db4d
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40dd04
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40dd04
mov dword [esi], 0xffffffff
push 0x20
lea ecx, [esp + 0x44]
call fcn.0040d040
mov eax, dword [esp + 0x48]
mov ebx, 8
add esp, 4
cmp dword [esp + 0x58], ebx
jae 0x40dd25
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40dd54
and eax, 0xfffffffe
cmp eax, 0xffffffff
je 0x40dd54
mov ecx, dword [esp + 0x44]
and eax, 0xffffb1af
cmp dword [esp + 0x58], ebx
jae 0x40dd4c
lea ecx, [esp + 0x44]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x58], ebx
mov eax, dword [esp + 0x44]
jae 0x40dd62
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
mov ebx, dword [esp + 0x14]
je 0x40dd78
add ebx, 1
adc dword [esp + 0x18], edi
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40dd90
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40dd90
mov dword [esi], 0xffffffff
push esi
call fcn.00435b68
mov esi, 8
add esp, 4
cmp dword [esp + 0x9c], esi
jb 0x40ddb7
mov eax, dword [esp + 0x88]
push eax
call fcn.00435b68
add esp, 4
cmp dword [esp + 0x58], esi
mov dword [esp + 0x9c], 7
mov dword [esp + 0x98], edi
mov word [esp + 0x88], di
jb 0x40dde4
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00435b68
add esp, 4
mov edx, dword [esp + 0x18]
mov eax, ebx
mov ecx, dword [esp + 0x300]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e8]
xor ecx, esp
call fcn.0043579e
mov esp, ebp
pop ebp
ret