Function at 0x471140
Capabilities:
Enumerate files on windows
Get common file path
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x6a0
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x260]
rep stosd dword es:[edi], eax
mov ecx, 0x24
lea edi, [esp + 0x3e4]
mov dword [esp + 0x3e0], 0x94
xor ebp, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x3e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x474]
push ecx
push edx
mov dword [esp + 0x1c], ebp
call fcn.004499a0
mov eax, dword [esp + 0x1c]
add esp, 8
cmp eax, ebp
jne 0x4711f2
lea eax, [esp + 0x360]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0x360]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x363], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x474]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
mov dword [esp + 0x14], eax
rep movsb byte es:[edi], byte [esi]
xor edi, edi
cmp eax, ebp
mov dword [esp + 0x18], edi
jle 0x471c39
push ebx
lea eax, [edi + edi*2]
push 0x49f314
shl eax, 2
lea esi, [esp + eax + 0x47c]
mov byte [esp + eax + 0x47f], 0
push esi
mov dword [esp + 0x1c], esi
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471c27
push esi
call fcn.0047c0d3
push esi
lea ecx, [esp + 0x26c]
push str._s.exe
push ecx
call fcn.0047a8f8
add esp, 0x10
lea edx, [esp + 0x24]
lea eax, [esp + 0x264]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x47138c
mov eax, dword [esp + 0x6b4]
mov ebx, ebp
shl ebx, 8
add ebx, eax
test byte [esp + 0x24], 0x10
jne 0x471365
cmp byte [esp + 0x50], 0x2e
je 0x471365
lea ecx, [esp + 0x50]
push str.NTDETECT.COM
push ecx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471365
lea edx, [esp + 0x50]
push edx
call fcn.00483565
push eax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x170]
push str._s_s
push ecx
call fcn.0047a8f8
add esp, 0x14
lea edx, [esp + 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x471314
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
add ebx, 0x100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebp
cmp ebp, 0xf8
rep movsb byte es:[edi], byte [esi]
je 0x47138c
mov al, byte [esp + 0x50]
cmp al, 0x30
je 0x471340
cmp al, 0x31
je 0x471340
cmp al, 0x32
je 0x471340
cmp al, 0x33
je 0x471340
cmp al, 0x34
je 0x471340
cmp al, 0x35
je 0x471340
cmp al, 0x36
je 0x471340
cmp al, 0x37
je 0x471340
cmp al, 0x38
je 0x471340
cmp al, 0x39
jne 0x471365
lea ecx, [esp + 0x164]
push 0xff
push ecx
push ebx
call fcn.0047b120
add esp, 0xc
inc ebp
add ebx, 0x100
cmp ebp, 0xf8
je 0x47138c
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x47127a
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x264]
push ecx
push str._s.pif
push edx
call fcn.0047a8f8
add esp, 0xc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x264]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x4714d8
mov eax, dword [esp + 0x6b4]
mov ebx, ebp
shl ebx, 8
add ebx, eax
test byte [esp + 0x24], 0x10
jne 0x4714b1
mov al, byte [esp + 0x50]
cmp al, 0x2e
je 0x471464
lea edx, [esp + 0x50]
push str.NTDETECT.COM
push edx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471460
lea eax, [esp + 0x50]
push eax
call fcn.00483565
mov ecx, dword [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x170]
push str._s_s
push edx
call fcn.0047a8f8
lea edi, [esp + 0x178]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
add ebx, 0x100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebp
cmp ebp, 0xf8
rep movsb byte es:[edi], byte [esi]
je 0x4714d8
mov al, byte [esp + 0x50]
cmp al, 0x30
je 0x47148c
cmp al, 0x31
je 0x47148c
cmp al, 0x32
je 0x47148c
cmp al, 0x33
je 0x47148c
cmp al, 0x34
je 0x47148c
cmp al, 0x35
je 0x47148c
cmp al, 0x36
je 0x47148c
cmp al, 0x37
je 0x47148c
cmp al, 0x38
je 0x47148c
cmp al, 0x39
jne 0x4714b1
lea ecx, [esp + 0x164]
push 0xff
push ecx
push ebx
call fcn.0047b120
add esp, 0xc
inc ebp
add ebx, 0x100
cmp ebp, 0xf8
je 0x4714d8
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4713df
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x264]
push ecx
push str._s.dll
push edx
call fcn.0047a8f8
add esp, 0xc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x264]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x471624
mov eax, dword [esp + 0x6b4]
mov ebx, ebp
shl ebx, 8
add ebx, eax
test byte [esp + 0x24], 0x10
jne 0x4715fd
mov al, byte [esp + 0x50]
cmp al, 0x2e
je 0x4715b0
lea edx, [esp + 0x50]
push str.NTDETECT.COM
push edx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x4715ac
lea eax, [esp + 0x50]
push eax
call fcn.00483565
mov ecx, dword [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x170]
push str._s_s
push edx
call fcn.0047a8f8
lea edi, [esp + 0x178]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
add ebx, 0x100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebp
cmp ebp, 0xf8
rep movsb byte es:[edi], byte [esi]
je 0x471624
mov al, byte [esp + 0x50]
cmp al, 0x30
je 0x4715d8
cmp al, 0x31
je 0x4715d8
cmp al, 0x32
je 0x4715d8
cmp al, 0x33
je 0x4715d8
cmp al, 0x34
je 0x4715d8
cmp al, 0x35
je 0x4715d8
cmp al, 0x36
je 0x4715d8
cmp al, 0x37
je 0x4715d8
cmp al, 0x38
je 0x4715d8
cmp al, 0x39
jne 0x4715fd
lea ecx, [esp + 0x164]
push 0xff
push ecx
push ebx
call fcn.0047b120
add esp, 0xc
inc ebp
add ebx, 0x100
cmp ebp, 0xf8
je 0x471624
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x47152b
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0x264]
push ebx
push str._s.bat
push ecx
call fcn.0047a8f8
add esp, 0xc
lea edx, [esp + 0x24]
lea eax, [esp + 0x264]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x47176c
mov eax, dword [esp + 0x6b4]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x24], 0x10
jne 0x47174e
cmp byte [esp + 0x50], 0x2e
je 0x47174e
lea ecx, [esp + 0x50]
push str.NTDETECT.COM
push ecx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x47174e
lea edx, [esp + 0x50]
push edx
call fcn.00483565
push eax
push ebx
lea eax, [esp + 0x170]
push str._s_s
push eax
call fcn.0047a8f8
add esp, 0x14
lea ecx, [esp + 0x164]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x4716fd
lea edx, [esp + 0x164]
push 0xff
push edx
push esi
call fcn.0047b120
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x47176c
mov al, byte [esp + 0x50]
cmp al, 0x30
je 0x471729
cmp al, 0x31
je 0x471729
cmp al, 0x32
je 0x471729
cmp al, 0x33
je 0x471729
cmp al, 0x34
je 0x471729
cmp al, 0x35
je 0x471729
cmp al, 0x36
je 0x471729
cmp al, 0x37
je 0x471729
cmp al, 0x38
je 0x471729
cmp al, 0x39
jne 0x47174e
lea eax, [esp + 0x164]
push 0xff
push eax
push esi
call fcn.0047b120
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x47176c
lea ecx, [esp + 0x24]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x471675
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
or edi, 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
lea edx, [esp + 0x268]
push str._sdesktop.ini
push edx
call fcn.0047a8f8
add esp, 0xc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x264]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x47184f
mov eax, dword [esp + 0x6b4]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x24], 0x10
jne 0x471831
cmp byte [esp + 0x50], 0x2e
je 0x471831
lea edx, [esp + 0x50]
push str.NTDETECT.COM
push edx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471831
lea eax, [esp + 0x50]
push eax
call fcn.00483565
push eax
push ebx
lea ecx, [esp + 0x170]
push str._s_s
push ecx
call fcn.0047a8f8
add esp, 0x14
lea edx, [esp + 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x471831
lea eax, [esp + 0x164]
push 0xff
push eax
push esi
call fcn.0047b120
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x47184f
lea ecx, [esp + 0x24]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4717b5
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
or edi, 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
lea edx, [esp + 0x268]
push str._s.lnk
push edx
call fcn.0047a8f8
add esp, 0xc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x264]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x47199d
mov eax, dword [esp + 0x6b4]
mov ebx, ebp
shl ebx, 8
add ebx, eax
test byte [esp + 0x24], 0x10
jne 0x471976
cmp byte [esp + 0x50], 0x2e
je 0x471976
lea edx, [esp + 0x50]
push str.NTDETECT.COM
push edx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471976
lea eax, [esp + 0x50]
push eax
call fcn.00483565
mov ecx, dword [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x170]
push str._s_s
push edx
call fcn.0047a8f8
lea edi, [esp + 0x178]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edx, ecx
cmp edx, 4
jle 0x471951
lea edi, [esp + 0x164]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + 0x5b0]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x20], esi
mov esi, edi
mov edi, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x80
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x5b4]
mov byte [esp + edx + 0x5b0], 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x164]
push 0xff
push edx
push ebx
call fcn.0047b120
add esp, 0xc
inc ebp
add ebx, 0x100
cmp ebp, 0xf8
je 0x47199d
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x47189a
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], 0xffffffff
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0x264]
push ebx
push str._s.inf
push edx
call fcn.0047a8f8
add esp, 0xc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x264]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x471a88
mov eax, dword [esp + 0x6b4]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x24], 0x10
jne 0x471a6a
cmp byte [esp + 0x50], 0x2e
je 0x471a6a
lea edx, [esp + 0x50]
push str.NTDETECT.COM
push edx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471a6a
lea eax, [esp + 0x50]
push eax
call fcn.00483565
push eax
push ebx
lea ecx, [esp + 0x170]
push str._s_s
push ecx
call fcn.0047a8f8
add esp, 0x14
lea edx, [esp + 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x471a6a
lea eax, [esp + 0x164]
push 0xff
push eax
push esi
call fcn.0047b120
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x471a88
lea ecx, [esp + 0x24]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4719ee
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
or edi, 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
lea edx, [esp + 0x268]
push str._s.vbs
push edx
call fcn.0047a8f8
add esp, 0xc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x264]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x471b52
mov eax, dword [esp + 0x6b4]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x24], 0x10
jne 0x471b38
cmp byte [esp + 0x50], 0x2e
je 0x471b38
lea edx, [esp + 0x50]
push str.NTDETECT.COM
push edx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471b38
lea eax, [esp + 0x50]
push eax
call fcn.00483565
push eax
push ebx
lea ecx, [esp + 0x170]
push str._s_s
push ecx
call fcn.0047a8f8
lea edx, [esp + 0x178]
push 0xff
push edx
push esi
call fcn.0047b120
add esp, 0x20
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x471b52
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x471ad1
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
or edi, 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
lea ecx, [esp + 0x268]
push str._s.js
push ecx
call fcn.0047a8f8
add esp, 0xc
lea edx, [esp + 0x24]
lea eax, [esp + 0x264]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x471c1c
mov eax, dword [esp + 0x6b4]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x24], 0x10
jne 0x471c02
cmp byte [esp + 0x50], 0x2e
je 0x471c02
lea ecx, [esp + 0x50]
push str.NTDETECT.COM
push ecx
call fcn.0047fde0
add esp, 8
test eax, eax
je 0x471c02
lea edx, [esp + 0x50]
push edx
call fcn.00483565
push eax
push ebx
lea eax, [esp + 0x170]
push str._s_s
push eax
call fcn.0047a8f8
lea ecx, [esp + 0x178]
push 0xff
push ecx
push esi
call fcn.0047b120
add esp, 0x20
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x471c1c
lea edx, [esp + 0x24]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x471b9b
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
or edi, 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc edi
cmp edi, eax
mov dword [esp + 0x1c], edi
jl 0x471201
pop ebx
mov eax, dword [esp + 0x6b4]
push str.c:endpcache
mov dword [eax], ebp
call fcn.0047c0d3
add esp, 4
mov ax, 1
pop edi
pop esi
pop ebp
add esp, 0x6a0
ret