Function at 0x46c9cc
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get common file path
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xaa4
mov eax, dword [0x5475b0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x54dbe4], 0
mov eax, ecx
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xa7c], eax
mov dword [ebp - 0xaa0], ebx
mov dword [ebp - 0xa9c], ecx
mov dword [ebp - 0xa94], edi
jne 0x46ce85
test ebx, ebx
je 0x46ce85
push ebx
mov ecx, eax
call fcn.0046c637
mov ecx, dword [edi]
xor eax, eax
mov esi, eax
mov eax, dword [edi + 4]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x46ca56
push ebx
push dword [ecx + esi*4]
call fcn.004da5d4
pop ecx
pop ecx
test eax, eax
je 0x46ce85
mov eax, dword [edi + 4]
inc esi
mov ecx, dword [edi]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x46ca34
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0xa80], eax
cmp eax, 0xffffffff
je 0x46ce85
xor eax, eax
xor esi, esi
push 0x40e
mov word [ebp - 0x828], ax
lea eax, [ebp - 0x826]
push esi
push eax
call fcn.004deff0
lea edx, [ebp - 0x828]
add esp, 0xc
mov ecx, ebx
sub edx, ebx
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x46ca96
lea eax, [ebp - 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x46cae0
test byte [ebp - 0xa80], 0x10
je 0x46ce85
lea edi, [ebp - 0x828]
sub edi, 2
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, si
jne 0x46cacd
mov eax, dword [0x513338]
mov dword [edi], eax
xor eax, eax
push 0x206
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push esi
push eax
call fcn.004deff0
add esp, 0xc
mov ecx, esi
movzx eax, word [ebp + ecx - 0x828]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x212], ax
test ax, ax
jne 0x46cb00
lea edi, [ebp - 0x210]
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, si
jne 0x46cb21
mov esi, str..exe
lea eax, [ebp - 0xa78]
push eax
lea eax, [ebp - 0x210]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0xa88], eax
cmp eax, 0xffffffff
je 0x46ccfe
mov edi, dword [ebp - 0xa7c]
xor esi, esi
cmp dword [edi], esi
je 0x46cb90
lea esi, [edi + 0x420]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, edi
mov ecx, ebx
sub edx, ebx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx + 0xe], ax
test ax, ax
jne 0x46cb77
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor esi, esi
xor eax, eax
push 0x206
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x416]
push esi
push eax
call fcn.004deff0
add esp, 0xc
mov ecx, esi
movzx eax, word [ebp + ecx - 0x828]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x41a], ax
test ax, ax
jne 0x46cbb0
lea ecx, [ebp - 0x418]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x46cbd1
sub ecx, edx
lea eax, [ebp - 0x418]
sar ecx, 1
lea eax, [eax + ecx*2]
mov dword [ebp - 0xa90], eax
lea eax, [ebp - 0xa4c]
push eax
call fcn.004dd177
pop ecx
lea eax, [ebp - 0xa4c]
push eax
lea ecx, [ebp - 0xa84]
call fcn.00404fa0
mov esi, dword [edi + 0x480]
mov eax, esi
mov dword [ebp - 0xa80], eax
mov ebx, eax
mov edi, dword [eax + 4]
cmp byte [edi + 0xd], 0
jne 0x46cc4e
push dword [ebp - 0xa84]
lea ecx, [edi + 0x10]
call fcn.0040e612
test eax, eax
jns 0x46cc3e
mov edi, dword [edi + 8]
jmp 0x46cc42
mov ebx, edi
mov edi, dword [edi]
cmp byte [edi + 0xd], 0
je 0x46cc27
mov eax, dword [ebp - 0xa80]
cmp ebx, eax
je 0x46cc78
push dword [ebx + 0x10]
lea ecx, [ebp - 0xa84]
call fcn.0040e612
test eax, eax
js 0x46cc72
mov dword [ebp - 0xa98], ebx
lea edi, [ebp - 0xa98]
jmp 0x46cc84
mov eax, dword [ebp - 0xa80]
mov dword [ebp - 0xa8c], eax
lea edi, [ebp - 0xa8c]
lea ecx, [ebp - 0xa84]
call fcn.00403080
cmp dword [edi], esi
je 0x46cccf
mov edx, dword [ebp - 0xa90]
lea ecx, [ebp - 0xa4c]
mov eax, ecx
sub edx, eax
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x46cca3
mov edi, dword [ebp - 0xa7c]
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0xa4c]
mov ecx, edi
push eax
call fcn.0046c7fe
jmp 0x46ccd5
mov edi, dword [ebp - 0xa7c]
mov ebx, dword [ebp - 0xa88]
lea eax, [ebp - 0xa78]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x46cbef
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [ebp - 0xaa0]
push str.10001330
push ebx
call fcn.004dad64
pop ecx
pop ecx
xor esi, esi
mov ecx, esi
movzx eax, word [ebp + ecx - 0x828]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x212], ax
test ax, ax
jne 0x46cd0f
lea edi, [ebp - 0x210]
sub edi, 2
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, si
jne 0x46cd30
cmp dword [ebp + 0x14], 4
mov eax, dword [0x52a924]
mov dword [edi], eax
jg 0x46ce85
lea eax, [ebp - 0xa78]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x46ce85
test byte [ebp - 0xa78], 0x10
je 0x46ce68
lea eax, [ebp - 0xa4c]
push eax
push 0x522f54
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x46ce68
lea eax, [ebp - 0xa4c]
push eax
push 0x52a994
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x46ce68
mov ecx, esi
movzx eax, word [ebp + ecx - 0x828]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x212], ax
test ax, ax
jne 0x46cdaf
lea edx, [ebp - 0xa4c]
xor ecx, ecx
mov esi, edx
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x46cdd1
lea edi, [ebp - 0x210]
sub edx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x46cde7
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0xa9c]
xor edi, edi
cmp dword [esi], edi
je 0x46ce48
push edi
push 0x24
lea eax, [ebp - 0x418]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x210]
push eax
call fcn.004dd177
pop ecx
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.004dd177
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x46ce48
mov dword [esi], edi
jmp 0x46ce66
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0xa7c]
inc eax
push eax
push dword [ebp - 0xa94]
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.0046c9cc
xor esi, esi
lea eax, [ebp - 0xa78]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x46cd6c
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d9731
mov esp, ebp
pop ebp
ret 0x10