Function at 0x18001194c
Capabilities:
Enumerate files on windows
Enumerate files recursively
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x78
and dword [rsp + 0x30], 0
mov rbp, rcx
mov rcx, qword [0x180023a50]
mov edi, 0x104
xor edx, edx
mov r8d, 0x250
mov dword [rsp + 0x38], edi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x180011dbc
xor esi, esi
xor r8d, r8d
xor edx, edx
mov rcx, rbp
mov qword [rsp + 0x40], rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [rsp + 0x34], eax
test eax, eax
je 0x180011a18
mov rcx, qword [0x180023a50]
lea r8d, [rax + rax]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x180011a18
mov r8d, dword [rsp + 0x34]
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x180011a09
mov rcx, qword [0x180023a50]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
mov qword [rsp + 0x40], rsi
test rsi, rsi
cmovne rbp, rsi
mov qword [rsp + 0xa0], rbp
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0xa8]
mov ebp, eax
mov dword [rsp + 0x34], eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [rsp + 0xc0]
test ecx, ecx
cmove ecx, ebp
mov dword [rsp + 0xc0], ecx
lea ecx, [rax + rbp + 2]
cmp ecx, edi
jbe 0x180011a6f
add ecx, 0xfffffefb
mov eax, 0xfc0fc0fd
mul ecx
mov edi, edx
shr edi, 8
add edi, 2
imul edi, edi, 0x104
mov dword [rsp + 0x38], edi
mov rcx, qword [0x180023a50]
lea r8d, [rdi + rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
mov qword [rsp + 0x68], rax
test rax, rax
je 0x180011d93
xor edx, edx
mov r8d, 0x140
mov rcx, rbx
call sub.ntdll.dll_memset
mov rdx, qword [rsp + 0xa0]
mov rcx, rbp
call qword [sym.imp.ntdll.dll_wcscpy]
mov rdx, qword [rsp + 0xa8]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
je 0x180011c1e
mov rbp, qword [rsp + 0xa0]
mov esi, dword [rsp + 0x30]
mov rdi, rax
cmp dword [rbx + 0x1c], 0
jne 0x180011bd9
cmp dword [rbx + 0x20], 0x500000
ja 0x180011bd9
lea rax, [rbx + 0x2c]
mov qword [rsp + 0x58], rax
cmp word [rax], 0x2e
je 0x180011bd9
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [0x180023a50]
xor edx, edx
add eax, dword [rsp + 0x34]
lea eax, [rax + rax + 0x2a]
mov dword [rsp + 0x30], eax
lea r8d, [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x180011bd9
mov r8d, dword [rsp + 0x30]
xor edx, edx
mov rcx, rax
add r8, 0x28
mov rbx, rax
call sub.ntdll.dll_memset
lea rcx, [rbx + 0x28]
mov rdx, rbp
mov qword [rbx + 8], rbx
mov qword [rbx], rbx
call qword [sym.imp.ntdll.dll_wcscpy]
mov rdx, qword [rsp + 0x58]
lea rcx, [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov eax, dword [rsp + 0xc0]
mov rcx, qword [rsp + 0xb8]
mov dword [rbx + 0x24], eax
mov eax, dword [rsp + 0xc8]
mov dword [rbx + 0x18], eax
test rcx, rcx
je 0x180011bad
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
mov rax, qword [rdx + 8]
mov qword [rbx], rdx
mov qword [rbx + 8], rax
mov qword [rax], rbx
mov qword [rdx + 8], rbx
test rcx, rcx
je 0x180011bd2
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [rsp + 0x60]
inc esi
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x180011c03
mov rcx, qword [0x180023c48]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x180011aea
mov rcx, rdi
mov dword [rsp + 0x30], esi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x68]
mov rdx, qword [rsp + 0xa0]
mov rcx, rbp
call qword [sym.imp.ntdll.dll_wcscpy]
lea rdx, [0x18001e754]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov qword [rsp + 0x40], rax
cmp rax, 0xffffffffffffffff
je 0x180011d7c
lea rcx, [rbx + 0x2c]
cmp word [rcx], 0x2e
je 0x180011d3e
test byte [rbx], 0x10
je 0x180011d3e
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [rsp + 0x34]
mov dword [rsp + 0x38], eax
lea eax, [rax + rcx + 2]
cmp eax, edi
jbe 0x180011cd1
mov rcx, qword [0x180023a50]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r11d, dword [rsp + 0x38]
mov eax, dword [rsp + 0x34]
lea r11d, [r11 + rax + 2]
add edi, 0x104
cmp edi, r11d
jb 0x180011ca7
mov rcx, qword [0x180023a50]
lea r8d, [rdi + rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x180011d71
mov rdx, qword [rsp + 0xa0]
mov rcx, rbp
call qword [sym.imp.ntdll.dll_wcscpy]
lea rdx, [rbx + 0x2c]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, [0x18001e674]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov eax, dword [rsp + 0xc8]
mov r9, qword [rsp + 0xb8]
mov r8, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0xa8]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0xc0]
mov rcx, rbp
mov dword [rsp + 0x20], eax
call fcn.18001194c
add dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x40]
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x180011d71
mov rcx, qword [0x180023c48]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, [rbx + 0x2c]
cmp eax, 0x102
mov rax, qword [rsp + 0x40]
je 0x180011c5e
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_FindClose]
test rbp, rbp
je 0x180011d93
mov rcx, qword [0x180023a50]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rsi, rsi
je 0x180011daa
mov rcx, qword [0x180023a50]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x180023a50]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [rsp + 0x30]
add rsp, 0x78
pop rdi
pop rsi
pop rbp
pop rbx
ret