Function at 0x40d840
Capabilities:
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 0x4455b2
mov eax, dword fs:[0]
push eax
sub esp, 0x2f0
mov eax, dword [0x458210]
xor eax, esp
mov dword [esp + 0x2e8], eax
push ebx
push esi
push edi
mov eax, dword [0x458210]
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.00401322
xor edi, edi
push 0x10
lea ecx, [esp + 0x44]
mov dword [esp + 0x30c], edi
call fcn.0040cf50
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.00434ec3
add esp, 4
cmp eax, edi
je 0x40d929
mov esi, eax
mov dword [eax], 0xffffffff
mov dword [esp + 0x1c], esi
jmp 0x40d92f
mov dword [esp + 0x1c], edi
mov esi, edi
mov dword [esp + 0x20], esi
push 0x4494a0
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x314], 2
call fcn.004043af
add esp, 0xc
lea edx, [esp + 0x5c]
mov ecx, eax
mov byte [esp + 0x308], 3
call fcn.0040e510
mov byte [esp + 0x308], 2
cmp dword [esp + 0x3c], 8
mov bl, al
jb 0x40d983
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00434f88
add esp, 4
test bl, bl
je 0x40dbda
lea esi, [esp + 0x5c]
call fcn.0040e860
test al, al
jne 0x40da45
mov eax, dword [esp + 0x7c]
and eax, 0x10
xor ecx, ecx
or eax, ecx
je 0x40da00
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.0040835d
add esp, 0xc
push eax
mov byte [esp + 0x30c], 4
call fcn.0040d840
add esp, 4
mov byte [esp + 0x308], 2
cmp dword [esp + 0x3c], 8
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
jb 0x40da45
mov edx, dword [esp + 0x28]
push edx
call fcn.00434f88
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 4
jmp 0x40da57
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.0040835d
add esp, 0xc
lea edi, [esp + 0x24]
call fcn.0040d7f0
cmp dword [esp + 0x3c], 8
movzx eax, al
cdq
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
jb 0x40da43
mov eax, dword [esp + 0x28]
push eax
call fcn.00434f88
add esp, 4
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40da57
call fcn.00434f88
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 0x40dbde
lea edi, [esp + 0x5c]
lea ecx, [esp + 0xa4]
call fcn.0040e5a0
mov edx, dword [esp + 0x7c]
mov eax, edx
xor ecx, ecx
and eax, 0x10
or eax, ecx
lea esi, [ecx + 8]
je 0x40db01
mov ecx, dword [esp + 0x98]
test ecx, ecx
je 0x40db01
cmp dword [esp + 0x9c], esi
mov eax, dword [esp + 0x88]
jae 0x40dabd
lea eax, [esp + 0x88]
cmp word [eax], 0x2e
jne 0x40db01
cmp ecx, 1
je 0x40da55
jae 0x40dada
call fcn.004352f5
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x7c]
cmp dword [esp + 0x9c], esi
mov eax, dword [esp + 0x88]
jae 0x40daf1
lea eax, [esp + 0x88]
cmp word [eax + 2], 0x2e
jne 0x40db01
cmp ecx, 2
je 0x40da55
and edx, 0x10
mov eax, edx
xor ecx, ecx
or eax, ecx
je 0x40db5b
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.0040835d
add esp, 0xc
push eax
mov byte [esp + 0x30c], 5
call fcn.0040d840
add esp, 4
add dword [esp + 0x14], eax
mov byte [esp + 0x308], 2
adc dword [esp + 0x18], edx
cmp dword [esp + 0x3c], esi
jb 0x40da55
mov eax, dword [esp + 0x28]
push eax
jmp 0x40da4d
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0040835d
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp dword [esp + 0x3c], esi
jae 0x40db83
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, dword [esp + 0x28]
and eax, 0xfffffffe
cmp dword [esp + 0x3c], esi
jae 0x40db9b
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 0x40dbb1
lea eax, [esp + 0x28]
push eax
call ebx
cmp eax, 1
sete cl
movzx eax, cl
cdq
add dword [esp + 0x14], eax
adc dword [esp + 0x18], edx
cmp dword [esp + 0x3c], esi
jb 0x40da55
mov edx, dword [esp + 0x28]
push edx
jmp 0x40da4d
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40dbf6
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40dbf6
mov dword [esi], 0xffffffff
push 0x20
lea ecx, [esp + 0x44]
call fcn.0040cf50
mov eax, dword [esp + 0x48]
mov ebx, 8
add esp, 4
cmp dword [esp + 0x58], ebx
jae 0x40dc17
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, dword [esp + 0x44]
and eax, 0xfffffffe
cmp dword [esp + 0x58], ebx
jae 0x40dc2f
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 0x40dc45
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
mov ebx, dword [esp + 0x14]
je 0x40dc5b
add ebx, 1
adc dword [esp + 0x18], edi
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40dc73
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40dc73
mov dword [esi], 0xffffffff
push esi
call fcn.00434f88
mov esi, 8
add esp, 4
cmp dword [esp + 0x9c], esi
jb 0x40dc9a
mov eax, dword [esp + 0x88]
push eax
call fcn.00434f88
add esp, 4
cmp dword [esp + 0x58], esi
mov dword [esp + 0x9c], 7
mov dword [esp + 0x98], edi
mov word [esp + 0x88], di
jb 0x40dcc7
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00434f88
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.00434bcb
mov esp, ebp
pop ebp
ret