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

Disassembly:
sub esp, 0x59c
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x25c]
rep stosd dword es:[edi], eax
mov ecx, 0x24
lea edi, [esp + 0x3e0]
mov dword [esp + 0x3dc], 0x94
xor ebp, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x3dc]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x470]
push ecx
push edx
mov dword [esp + 0x1c], ebp
call fcn.004b3de0
mov eax, dword [esp + 0x1c]
add esp, 8
cmp eax, ebp
jne 0x4c48c2
lea eax, [esp + 0x35c]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0x35c]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x35f], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x470]
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 esi, esi
cmp eax, ebp
mov dword [esp + 0x18], esi
jle 0x4c5146
push ebx
lea eax, [esi + esi*2]
push 0x528bcc
shl eax, 2
lea ebx, [esp + eax + 0x478]
mov byte [esp + eax + 0x47b], 0
push ebx
mov dword [esp + 0x1c], ebx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c5134
push ebx
call fcn.004f2beb
push ebx
lea ecx, [esp + 0x268]
push str._s.com
push ecx
call fcn.004f175f
add esp, 0x10
lea edx, [esp + 0x20]
lea eax, [esp + 0x260]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4c4a3f
mov eax, dword [esp + 0x5b0]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x20], 0x10
jne 0x4c4a21
cmp byte [esp + 0x4c], 0x2e
je 0x4c4a21
lea ecx, [esp + 0x4c]
push str.NTDETECT.COM
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c4a21
lea edx, [esp + 0x4c]
push edx
call fcn.004fa6c0
push eax
push ebx
lea eax, [esp + 0x16c]
push 0x50e0ec
push eax
call fcn.004f175f
add esp, 0x14
lea ecx, [esp + 0x160]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x4c49d0
lea edx, [esp + 0x160]
push 0xff
push edx
push esi
call fcn.004f27c0
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x4c4a3f
mov al, byte [esp + 0x4c]
cmp al, 0x30
je 0x4c49fc
cmp al, 0x31
je 0x4c49fc
cmp al, 0x32
je 0x4c49fc
cmp al, 0x33
je 0x4c49fc
cmp al, 0x34
je 0x4c49fc
cmp al, 0x35
je 0x4c49fc
cmp al, 0x36
je 0x4c49fc
cmp al, 0x37
je 0x4c49fc
cmp al, 0x38
je 0x4c49fc
cmp al, 0x39
jne 0x4c4a21
lea eax, [esp + 0x160]
push 0xff
push eax
push esi
call fcn.004f27c0
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x4c4a3f
lea ecx, [esp + 0x20]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4c4948
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 + 0x264]
push str._s.exe
push edx
call fcn.004f175f
add esp, 0xc
lea eax, [esp + 0x20]
lea ecx, [esp + 0x260]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x4c4b9c
mov eax, dword [esp + 0x5b0]
mov ebx, ebp
shl ebx, 8
add ebx, eax
test byte [esp + 0x20], 0x10
jne 0x4c4b75
cmp byte [esp + 0x4c], 0x2e
je 0x4c4b75
lea edx, [esp + 0x4c]
push str.NTDETECT.COM
push edx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c4b75
lea eax, [esp + 0x4c]
push eax
call fcn.004fa6c0
mov ecx, dword [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x16c]
push 0x50e0ec
push edx
call fcn.004f175f
add esp, 0x14
lea eax, [esp + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x4c4b24
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
add ebx, 0x100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc ebp
cmp ebp, 0xf8
rep movsb byte es:[edi], byte [esi]
je 0x4c4b9c
mov al, byte [esp + 0x4c]
cmp al, 0x30
je 0x4c4b50
cmp al, 0x31
je 0x4c4b50
cmp al, 0x32
je 0x4c4b50
cmp al, 0x33
je 0x4c4b50
cmp al, 0x34
je 0x4c4b50
cmp al, 0x35
je 0x4c4b50
cmp al, 0x36
je 0x4c4b50
cmp al, 0x37
je 0x4c4b50
cmp al, 0x38
je 0x4c4b50
cmp al, 0x39
jne 0x4c4b75
lea eax, [esp + 0x160]
push 0xff
push eax
push ebx
call fcn.004f27c0
add esp, 0xc
inc ebp
add ebx, 0x100
cmp ebp, 0xf8
je 0x4c4b9c
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4c4a8a
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x260]
push eax
push str._s.pif
push ecx
call fcn.004f175f
add esp, 0xc
lea edx, [esp + 0x20]
lea eax, [esp + 0x260]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x4c4ce8
mov eax, dword [esp + 0x5b0]
mov ebx, ebp
shl ebx, 8
add ebx, eax
test byte [esp + 0x20], 0x10
jne 0x4c4cc1
mov al, byte [esp + 0x4c]
cmp al, 0x2e
je 0x4c4c74
lea ecx, [esp + 0x4c]
push str.NTDETECT.COM
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c4c70
lea edx, [esp + 0x4c]
push edx
call fcn.004fa6c0
push eax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x16c]
push 0x50e0ec
push ecx
call fcn.004f175f
lea edi, [esp + 0x174]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
add ebx, 0x100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc ebp
cmp ebp, 0xf8
rep movsb byte es:[edi], byte [esi]
je 0x4c4ce8
mov al, byte [esp + 0x4c]
cmp al, 0x30
je 0x4c4c9c
cmp al, 0x31
je 0x4c4c9c
cmp al, 0x32
je 0x4c4c9c
cmp al, 0x33
je 0x4c4c9c
cmp al, 0x34
je 0x4c4c9c
cmp al, 0x35
je 0x4c4c9c
cmp al, 0x36
je 0x4c4c9c
cmp al, 0x37
je 0x4c4c9c
cmp al, 0x38
je 0x4c4c9c
cmp al, 0x39
jne 0x4c4cc1
lea eax, [esp + 0x160]
push 0xff
push eax
push ebx
call fcn.004f27c0
add esp, 0xc
inc ebp
add ebx, 0x100
cmp ebp, 0xf8
je 0x4c4ce8
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4c4bef
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x260]
push eax
push str._s.dll
push ecx
call fcn.004f175f
add esp, 0xc
lea edx, [esp + 0x20]
lea eax, [esp + 0x260]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x4c4e34
mov eax, dword [esp + 0x5b0]
mov ebx, ebp
shl ebx, 8
add ebx, eax
test byte [esp + 0x20], 0x10
jne 0x4c4e0d
mov al, byte [esp + 0x4c]
cmp al, 0x2e
je 0x4c4dc0
lea ecx, [esp + 0x4c]
push str.NTDETECT.COM
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c4dbc
lea edx, [esp + 0x4c]
push edx
call fcn.004fa6c0
push eax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x16c]
push 0x50e0ec
push ecx
call fcn.004f175f
lea edi, [esp + 0x174]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
add ebx, 0x100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc ebp
cmp ebp, 0xf8
rep movsb byte es:[edi], byte [esi]
je 0x4c4e34
mov al, byte [esp + 0x4c]
cmp al, 0x30
je 0x4c4de8
cmp al, 0x31
je 0x4c4de8
cmp al, 0x32
je 0x4c4de8
cmp al, 0x33
je 0x4c4de8
cmp al, 0x34
je 0x4c4de8
cmp al, 0x35
je 0x4c4de8
cmp al, 0x36
je 0x4c4de8
cmp al, 0x37
je 0x4c4de8
cmp al, 0x38
je 0x4c4de8
cmp al, 0x39
jne 0x4c4e0d
lea eax, [esp + 0x160]
push 0xff
push eax
push ebx
call fcn.004f27c0
add esp, 0xc
inc ebp
add ebx, 0x100
cmp ebp, 0xf8
je 0x4c4e34
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4c4d3b
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x260]
push edi
push str._s.bat
push eax
call fcn.004f175f
add esp, 0xc
lea ecx, [esp + 0x20]
lea edx, [esp + 0x260]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4c4f7c
mov eax, dword [esp + 0x5b0]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x20], 0x10
jne 0x4c4f5e
cmp byte [esp + 0x4c], 0x2e
je 0x4c4f5e
lea eax, [esp + 0x4c]
push str.NTDETECT.COM
push eax
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c4f5e
lea ecx, [esp + 0x4c]
push ecx
call fcn.004fa6c0
push eax
push edi
lea edx, [esp + 0x16c]
push 0x50e0ec
push edx
call fcn.004f175f
add esp, 0x14
lea eax, [esp + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x4c4f0d
lea ecx, [esp + 0x160]
push 0xff
push ecx
push esi
call fcn.004f27c0
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x4c4f7c
mov al, byte [esp + 0x4c]
cmp al, 0x30
je 0x4c4f39
cmp al, 0x31
je 0x4c4f39
cmp al, 0x32
je 0x4c4f39
cmp al, 0x33
je 0x4c4f39
cmp al, 0x34
je 0x4c4f39
cmp al, 0x35
je 0x4c4f39
cmp al, 0x36
je 0x4c4f39
cmp al, 0x37
je 0x4c4f39
cmp al, 0x38
je 0x4c4f39
cmp al, 0x39
jne 0x4c4f5e
lea edx, [esp + 0x160]
push 0xff
push edx
push esi
call fcn.004f27c0
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x4c4f7c
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4c4e85
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
or ebx, 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
lea ecx, [esp + 0x264]
push str._sdesktop.ini
push ecx
call fcn.004f175f
add esp, 0xc
lea edx, [esp + 0x20]
lea eax, [esp + 0x260]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4c505f
mov eax, dword [esp + 0x5b0]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x20], 0x10
jne 0x4c5041
cmp byte [esp + 0x4c], 0x2e
je 0x4c5041
lea ecx, [esp + 0x4c]
push str.NTDETECT.COM
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c5041
lea edx, [esp + 0x4c]
push edx
call fcn.004fa6c0
push eax
push edi
lea eax, [esp + 0x16c]
push 0x50e0ec
push eax
call fcn.004f175f
add esp, 0x14
lea ecx, [esp + 0x160]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 2
je 0x4c5041
lea edx, [esp + 0x160]
push 0xff
push edx
push esi
call fcn.004f27c0
add esp, 0xc
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x4c505f
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4c4fc5
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
or ebx, 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
lea ecx, [esp + 0x264]
push str._s.lnk
push ecx
call fcn.004f175f
add esp, 0xc
lea edx, [esp + 0x20]
lea eax, [esp + 0x260]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4c5129
mov eax, dword [esp + 0x5b0]
mov esi, ebp
shl esi, 8
add esi, eax
test byte [esp + 0x20], 0x10
jne 0x4c510f
cmp byte [esp + 0x4c], 0x2e
je 0x4c510f
lea ecx, [esp + 0x4c]
push str.NTDETECT.COM
push ecx
call fcn.004f61e0
add esp, 8
test eax, eax
je 0x4c510f
lea edx, [esp + 0x4c]
push edx
call fcn.004fa6c0
push eax
push edi
lea eax, [esp + 0x16c]
push 0x50e0ec
push eax
call fcn.004f175f
lea ecx, [esp + 0x174]
push 0xff
push ecx
push esi
call fcn.004f27c0
add esp, 0x20
inc ebp
add esi, 0x100
cmp ebp, 0xf8
je 0x4c5129
lea edx, [esp + 0x20]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4c50a8
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
or ebx, 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
mov dword [esp + 0x1c], esi
jl 0x4c48d1
pop ebx
mov eax, dword [esp + 0x5b0]
push str.c:endpcache
mov dword [eax], ebp
call fcn.004f2beb
add esp, 4
mov ax, 1
pop edi
pop esi
pop ebp
add esp, 0x59c
ret