Function at 0x403970
Capabilities:
Enumerate files on windows
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40fae2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x300
mov eax, dword [0x414110]
push ebx
push esi
push edi
push 0x410684
push 0x41037c
push 0x4150f8
mov dword [esp + 0x310], eax
call fcn.00401f40
xor ebx, ebx
add esp, 0xc
xor eax, eax
mov ecx, 0x4f
lea edi, [esp + 0xbc]
mov dword [esp + 0xb8], ebx
rep stosd dword es:[edi], eax
mov byte [esp + 0x1f8], bl
mov ecx, 0x40
lea edi, [esp + 0x1f9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, 0xf
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], bl
mov dword [esp + 0x314], ebx
mov dword [esp + 0x98], eax
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
mov esi, dword [ebp + 8]
mov dword [esp + 0x7c], eax
mov eax, esi
mov byte [esp + 0x314], 2
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], bl
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403a46
sub eax, edi
push eax
push esi
lea ecx, [esp + 0x6c]
call fcn.00401e40
push 4
push str..
lea ecx, [esp + 0x6c]
mov byte [esp + 0x31c], 3
call fcn.004030d0
push esi
lea eax, [esp + 0x1fc]
push str._s.tmp
push eax
call fcn.0040628e
lea eax, [esp + 0x204]
add esp, 0xc
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403aa2
sub eax, edi
push eax
lea ecx, [esp + 0x1fc]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401e40
push 0x410310
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x320], 4
call fcn.00403280
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x54]
mov byte [esp + 0x320], 5
call fcn.00401d50
mov eax, dword [esp + 0x44]
mov edi, 0x10
cmp eax, edi
jb 0x403b0b
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00406a56
add esp, 4
cmp dword [esp + 0x28], edi
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
mov byte [esp + 0x314], 3
jb 0x403b36
mov edx, dword [esp + 0x14]
push edx
call fcn.00406a56
add esp, 4
cmp dword [esp + 0x60], edi
mov eax, dword [esp + 0x4c]
jae 0x403b44
lea eax, [esp + 0x4c]
push eax
call fcn.00401640
mov eax, dword [esp + 0x64]
add esp, 4
cmp eax, edi
mov eax, dword [esp + 0x4c]
jae 0x403b5d
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp dword [esp + 0x60], edi
mov ecx, dword [esp + 0x4c]
jae 0x403b72
lea ecx, [esp + 0x4c]
or eax, 2
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp dword [esp + 0x7c], edi
mov eax, dword [esp + 0x68]
jae 0x403b8b
lea eax, [esp + 0x68]
lea ecx, [esp + 0xb8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x403be0
cmp dword [esp + 0x7c], edi
mov esi, dword [esp + 0x68]
jae 0x403bb1
lea esi, [esp + 0x68]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x41065c
push 0x41037c
push 0x4150f8
call fcn.00401fb0
add esp, 0x14
jmp 0x403caf
lea edx, [esp + 0xe4]
push 0x410260
push edx
call fcn.00405b73
add esp, 8
test eax, eax
je 0x403c89
lea eax, [esp + 0xe4]
push 0x41025c
push eax
call fcn.00405b73
add esp, 8
test eax, eax
je 0x403c89
test byte [esp + 0xb8], 0x10
jne 0x403c89
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403c25
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x88]
call fcn.00401e40
push 1
push 0x410310
lea ecx, [esp + 0x88]
call fcn.004030d0
lea eax, [esp + 0xe4]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403c60
sub eax, edx
push eax
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0x88]
call fcn.004030d0
push ebx
push ebx
push esi
call fcn.00401760
add esp, 0xc
mov eax, dword [esp + 0xc]
lea edx, [esp + 0xb8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x403be0
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0x7c], edi
jb 0x403cc2
mov edx, dword [esp + 0x68]
push edx
call fcn.00406a56
add esp, 4
cmp dword [esp + 0x60], edi
mov esi, 0xf
mov dword [esp + 0x7c], esi
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], bl
jb 0x403ce6
mov eax, dword [esp + 0x4c]
push eax
call fcn.00406a56
add esp, 4
cmp dword [esp + 0x98], edi
mov dword [esp + 0x60], esi
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
jb 0x403d0b
mov ecx, dword [esp + 0x84]
push ecx
call fcn.00406a56
add esp, 4
mov ecx, dword [esp + 0x30c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x304]
call fcn.00405500
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4