Function at 0x40f770
Capabilities:
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5d816b
push eax
mov dword fs:[0], esp
sub esp, 0x350
push ebx
push ebp
mov ebp, dword [esp + 0x368]
push esi
test ebp, ebp
push edi
je 0x40fad2
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40fad2
push eax
push eax
push eax
push eax
mov dword [esp + 0x24], eax
push eax
lea eax, [esp + 0x28]
push eax
push ebp
call fcn.0040a620
mov eax, dword [esp + 0x30]
add esp, 0x1c
cmp eax, 0xffffffff
je 0x40f7e2
test al, 1
je 0x40f7e2
and al, 0xfe
push eax
push ebp
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [esp + 0x378]
mov edx, dword [esp + 0x374]
push ecx
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x10], ebx
jne 0x40f832
mov eax, dword [0x6646f8]
test eax, eax
je 0x40face
push ebp
push ebx
push str.SetFolderSecurity____d____S_
push str.FileSecurity
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x18
mov eax, ebx
jmp 0x40fad4
mov eax, dword [esp + 0x14]
and eax, 0x10
cmp al, 0x10
je 0x40f844
mov eax, ebx
jmp 0x40fad4
push 0x5c
push ebp
call fcn.0044148e
mov esi, eax
add esp, 8
test esi, esi
je 0x40f9ab
inc esi
push str.mails
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push str.MailsTemp
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push str.MailsLeave
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push str.files
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push 0x62e918
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push str.tsdocbak
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push 0x62e908
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push str.Temp
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push str.SCDT
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
mov edi, str.Temp_Docerr_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Temp_Docerr_
push esi
call fcn.00442254
add esp, 0xc
test eax, eax
je 0x40f956
push str.tsdlogonsetting
push esi
call fcn.004420bf
add esp, 8
test eax, eax
je 0x40f956
push str.tsduserolwarrant
push esi
call fcn.004420bf
add esp, 8
test eax, eax
jne 0x40f9ab
mov eax, dword [0x6646f8]
test eax, eax
je 0x40f9a4
push esi
lea ecx, [esp + 0x14]
call fcn.0045a720
mov ecx, dword [eax]
mov dword [esp + 0x368], 0
push ecx
push str.filterspecialdoc__s
push str.Agent
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x14
lea ecx, [esp + 0x10]
mov dword [esp + 0x368], 0xffffffff
call fcn.0045b0a0
mov eax, ebx
jmp 0x40fad4
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x159]
mov byte [esp + 0x158], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
push 0x62e888
lea edx, [esp + 0x160]
push 0x103
push edx
stosb byte es:[edi], al
call fcn.00442748
add esp, 0x10
test eax, eax
jl 0x40fad2
mov ecx, 0x4e
xor eax, eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x158]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40faca
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea edx, [esp + 0x44]
push 0x62e448
push edx
call esi
test eax, eax
je 0x40faa7
lea eax, [esp + 0x44]
push 0x62e444
push eax
call esi
test eax, eax
je 0x40faa7
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x25d]
mov byte [esp + 0x25c], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x44]
lea edx, [esp + 0x25c]
push ecx
push ebp
stosw word es:[edi], ax
push 0x628274
push 0x103
push edx
stosb byte es:[edi], al
call fcn.00442748
add esp, 0x14
test eax, eax
jl 0x40faa7
mov eax, dword [esp + 0x378]
mov ecx, dword [esp + 0x374]
push eax
lea edx, [esp + 0x260]
push ecx
push edx
call fcn.0040f770
add esp, 0xc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40fac3
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40fa24
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x10]
mov eax, ebx
jmp 0x40fad4
xor eax, eax
mov ecx, dword [esp + 0x360]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x35c
ret