Function at 0x14004fb70
Capabilities:
Enumerate files on windows
Get common file path
Set current directory

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x520
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov rax, qword [0x14027bbd0]
xor rax, rsp
mov qword [rsp + 0x510], rax
mov r14d, r9d
mov r15, r8
mov r12, rdx
mov rbx, rcx
lea rcx, [rsp + 0x40]
call fcn.1400020c0
nop
call fcn.140051e58
mov rcx, rax
xor edi, edi
mov edx, edi
test rax, rax
setne dl
test edx, edx
jne 0x14004fbd9
mov ecx, 0x80004005
call fcn.140001010
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
call fcn.140051e58
mov rdx, rax
mov ecx, edi
test rax, rax
setne cl
test ecx, ecx
jne 0x14004fc07
mov ecx, 0x80004005
call fcn.140001010
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x300]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov r8d, 1
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x40]
call fcn.140017e80
xor edx, edx
lea rdi, [0x1401c7444]
mov rsi, qword [rax]
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
je 0x14004fc5c
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
setne dil
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
or r13, 0xffffffffffffffff
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004fc86
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test dil, dil
je 0x14004fca2
mov r8d, 1
lea rdx, [0x1401c7444]
lea rcx, [rsp + 0x40]
call fcn.140006c60
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x14004fd19
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004fcd0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004fcf1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov ecx, r13d
lock xadd dword [rdx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x14004fd11
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r13d
jmp 0x1400500d2
xor r12d, r12d
mov qword [rsp + 0xb0], 0x927
mov qword [rsp + 0xb8], r12
mov qword [rsp + 0xc0], r12
mov dword [rsp + 0xc8], r12d
mov dword [rsp + 0xcc], 0xffffffff
mov qword [rsp + 0xd0], r12
mov dword [rsp + 0xd8], r12d
lea rdx, [rsp + 0xb0]
test r14d, r14d
lea rcx, str.oem.inf
jne 0x14004fd76
lea rcx, str..inf
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
mov qword [rsp + 0x48], rax
mov esi, r12d
cmp rax, 0xffffffffffffffff
setne sil
lea rcx, [rbx + 0x58]
mov r8, r13
xor edx, edx
call fcn.1400539cc
lea rcx, [rbx + 0x30]
mov r8, r13
xor edx, edx
call fcn.140068b70
mov rdi, qword [rsp + 0x38]
test esi, esi
je 0x140050041
lea r8, [rsp + 0xdc]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140007ed0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x14004fe2a
cmp dword [rdi + 0x10], 0
jl 0x14004fe1b
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x14004fe1b
call fcn.140001950
mov rsi, rax
mov ecx, r13d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x14004fe10
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rsi + 0x18]
mov qword [rsp + 0x38], rax
jmp 0x14004fe2a
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x38]
call fcn.140001c20
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004fe4a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, r13
lea rdi, [rsp + 0xdc]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x14004fed0
mov rax, qword [rsp + 0x30]
lea rdx, [rax - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], ecx
je 0x14004ff65
cmp dword [rdx + 0x10], ecx
jge 0x14004fea2
cmp dword [rax - 0xc], ecx
jge 0x14004fe90
mov ecx, 0x80070057
call fcn.140001010
mov dword [rax - 0x10], r12d
mov rax, qword [rsp + 0x30]
mov word [rax], r12w
jmp 0x14004ff65
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004feb9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
jmp 0x14004ff65
mov rcx, qword [rsp + 0x30]
mov r12d, dword [rcx - 0x10]
lea rsi, [rsp + 0xdc]
sub rsi, rcx
sar rsi, 1
test edi, edi
jns 0x14004fef5
mov ecx, 0x80070057
call fcn.140001010
mov edx, 1
sub edx, dword [rcx - 8]
mov eax, dword [rcx - 0xc]
sub eax, edi
or eax, edx
jge 0x14004ff17
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.1400018f0
mov rcx, qword [rsp + 0x30]
movsxd rax, edi
movsxd rdx, dword [rcx - 0xc]
add rdx, rdx
cmp rsi, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x14004ff38
lea r8, [rcx + rsi*2]
call fcn.140192c44
jmp 0x14004ff45
lea r8, [rsp + 0xdc]
call fcn.140192bbc
mov rax, qword [rsp + 0x30]
cmp edi, dword [rax - 0xc]
jg 0x140050036
mov dword [rax - 0x10], edi
mov rax, qword [rsp + 0x30]
xor edi, edi
mov word [r12 + rax], di
xor r12d, r12d
mov r8, r15
mov rdi, qword [rsp + 0x38]
mov rdx, rdi
mov rcx, rbx
call fcn.14004db70
test eax, eax
je 0x14005001e
mov ecx, 0x328
call fcn.140050e2c
mov qword [rsp + 0x70], rax
test rax, rax
je 0x14004ffc0
lea rcx, [rbx + 0x28]
lea rdx, [rbx + 0x20]
lea r9, [rbx + 0x18]
lea r8, [rbx + 0x10]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.14004c6b0
mov rsi, rax
jmp 0x14004ffc3
mov rsi, r12
lea rax, [rbx + 0x380]
lea rcx, [rbx + 0x358]
lea r9, [rbx + 0x330]
lea r8, [rbx + 0x308]
lea rdx, [rbx + 0x2e0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, rsi
call fcn.14004c420
lea rcx, [rbx + 0x30]
mov r8, rsi
mov rdx, qword [rcx + 0x10]
call fcn.140068da0
lea rcx, [rbx + 0x58]
lea r8, [rsp + 0xdc]
mov rdx, qword [rcx + 0x10]
call fcn.140053fa4
nop
lea rdx, [rsp + 0xb0]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
jmp 0x14004fdb0
mov ecx, 0x80070057
call fcn.140001010
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [rsp + 0x300]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x14005006a
lea rcx, [rsp + 0x300]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rdi, qword [rbx + 0x68]
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14005008f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400500b0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r13d
dec r13d
test r13d, r13d
jg 0x1400500d0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
mov rcx, qword [rsp + 0x510]
xor rcx, rsp
call fcn.1401945b0
add rsp, 0x520
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret