Function at 0x4004650
Capabilities:
Enumerate files on windows
Enumerate files recursively
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x7f0]
sub rsp, 0x8f0
mov rbx, rdx
mov rsi, rcx
lea rdx, [rbp + 0x5a0]
mov ecx, 0x104
mov rdi, r8
mov dword [rbp + 0x810], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edx, 0x9c5c
mov rcx, rsi
call fcn.04002460
lea rcx, [rsp + 0x30]
mov edx, 0x104
mov r8, rax
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rcx, [rsp + 0x30]
mov r8, rbx
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
mov rcx, qword [rsi + 0x60]
xor r8d, r8d
lea edx, [r8 + 0xc]
lea r9, [rsp + 0x30]
call qword [sym.imp.USER32.dll_SendMessageW]
lea rcx, [rbp + 0x390]
mov r8, rdi
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rdx, [0x04009d00]
lea rcx, [rbp + 0x390]
lea rdi, [rbp + 0x390]
call qword [sym.imp.MSVCR110.dll_wcstok]
test rax, rax
je 0x40048d4
nop dword [rax + rax]
lea rdx, [0x04009d00]
mov rcx, rdi
call qword [sym.imp.MSVCR110.dll_wcstok]
lea rcx, [rsp + 0x30]
mov r8, rbx
mov edx, 0x104
mov qword [rsp + 0x20], 0
mov rdi, rax
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
or rax, 0xffffffffffffffff
cmp word [rbx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x4004753
cmp word [rbx + rax*2 - 2], 0x5c
je 0x400477e
lea r8, [0x04009d08]
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea rcx, [rsp + 0x30]
mov r8, rdi
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea rdx, [rbp + 0x140]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x40048a1
mov rcx, qword [rsi + 0xe8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4004897
mov eax, dword [rbp + 0x140]
test al, 0x10
jne 0x400487d
test al, 2
jne 0x400487d
test al, 4
jne 0x400487d
bt eax, 8
jb 0x400487d
lea rcx, [rsp + 0x30]
mov r8, rbx
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
or rax, 0xffffffffffffffff
nop word [rax + rax]
cmp word [rbx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x4004810
cmp word [rbx + rax*2 - 2], 0x5c
je 0x400483b
lea r8, [0x04009d08]
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea r8, [rbp + 0x16c]
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea rdx, [rsp + 0x30]
mov rcx, rsi
call fcn.04003a30
test eax, eax
je 0x400487d
mov rcx, qword [rbp + 0x828]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov edx, 0x180
call qword [sym.imp.USER32.dll_SendMessageW]
lea rdx, [rbp + 0x140]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40047b0
jmp 0x40048a1
mov dword [rbp + 0x810], 1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [rbp + 0x810], 0
jne 0x4004975
lea rdx, [0x04009d00]
xor ecx, ecx
call qword [sym.imp.MSVCR110.dll_wcstok]
mov rdi, qword [rsp + 0x20]
test rax, rax
jne 0x4004720
mov rcx, qword [rsi + 0x90]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xf0
call qword [sym.imp.USER32.dll_SendMessageW]
cmp rax, 1
jne 0x4004aaa
lea rcx, [rsp + 0x30]
mov r8, rbx
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
or rax, 0xffffffffffffffff
nop dword [rax]
cmp word [rbx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x4004910
cmp word [rbx + rax*2 - 2], 0x5c
je 0x400493b
lea r8, [0x04009d08]
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea r8, [0x04009cf8]
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea rdx, [rbp + 0x140]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x4004980
lea eax, [rdi + 2]
jmp 0x4004aba
xor eax, eax
jmp 0x4004aba
mov rcx, qword [rsi + 0xe8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4004a9a
test byte [rbp + 0x140], 0x10
je 0x4004a71
movzx ecx, word [rbp + 0x16c]
movzx eax, word [rbp + 0x16e]
cmp cx, word [0x04009d0c]
jne 0x40049c8
cmp ax, word [0x04009d0e]
je 0x4004a71
cmp cx, word [0x04009d10]
jne 0x40049ee
cmp ax, word [0x04009d12]
jne 0x40049ee
movzx eax, word [rbp + 0x170]
cmp ax, word [0x04009d14]
je 0x4004a71
lea rcx, [rsp + 0x30]
mov r8, rbx
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
or rax, 0xffffffffffffffff
nop word [rax + rax]
cmp word [rbx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x4004a10
cmp word [rbx + rax*2 - 2], 0x5c
je 0x4004a3b
lea r8, [0x04009d08]
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea r8, [rbp + 0x16c]
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
mov r9, qword [rbp + 0x828]
mov r8, qword [rbp + 0x820]
lea rdx, [rsp + 0x30]
mov rcx, rsi
call fcn.04004650
test eax, eax
je 0x4004a9a
lea rdx, [rbp + 0x140]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4004980
mov ebx, dword [rbp + 0x810]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x4004ab0
mov rcx, rdi
mov ebx, 1
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x4004ab0
mov ebx, dword [rbp + 0x810]
test ebx, ebx
mov eax, 0
sete al
mov rbx, qword [rsp + 0x918]
add rsp, 0x8f0
pop rdi
pop rsi
pop rbp
ret