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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x5c0]
sub rsp, 0x6c0
mov rax, qword [0x14000a040]
xor rax, rsp
mov qword [rbp + 0x5b0], rax
lea rdx, [rsp + 0x40]
lea rcx, str..exe
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r12, rax
xor ecx, ecx
cmp rax, 0xffffffffffffffff
jne 0x140002383
xor r9d, r9d
lea r8, str.Error
lea rdx, str.Failed_to_find_loader_
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x1400026fd
mov r8d, 0x104
lea rdx, [rbp + 0x3a0]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1400023c3
xor r9d, r9d
lea r8, str.Error
lea rdx, str.Failed_to_get_own_executable_name_
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x1400026fd
xor r13d, r13d
movabs rdi, 0x7ffffffffffffffe
lea r14, [r13 - 1]
lea rdx, [rbp + 0x190]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea r8, [0x1400068f4]
mov edx, 0x104
lea rcx, [rbp + 0x190]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea r8, [rsp + 0x6c]
mov edx, 0x104
lea rcx, [rbp + 0x190]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea rdx, [rbp + 0x3a0]
lea rcx, [rbp + 0x190]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
lea r15, [0x14000a098]
test eax, eax
je 0x1400025b2
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x38], r13
lea rax, [rbp + 0x190]
mov rbx, r14
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140002455
cmp rbx, rdi
ja 0x14000272d
cmp rbx, 7
ja 0x14000249e
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], 7
add rbx, rbx
mov r8, rbx
lea rdx, [rbp + 0x190]
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_memcpy
mov word [rsp + rbx + 0x20], r13w
jmp 0x14000255e
mov rsi, rbx
or rsi, 7
cmp rsi, rdi
jbe 0x1400024bd
mov rsi, rdi
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x1400024ed
cmp rsi, 0xa
mov eax, 0xa
cmovb rsi, rax
lea rcx, [rsi + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140002733
add rcx, rcx
cmp rcx, 0x1000
jb 0x140002519
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002733
mov rcx, rax
call fcn.1400046a0
test rax, rax
je 0x1400026c9
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14000252b
test rcx, rcx
je 0x140002528
call fcn.1400046a0
mov rdi, rax
jmp 0x14000252b
mov rdi, r13
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rsi
add rbx, rbx
mov r8, rbx
lea rdx, [rbp + 0x190]
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov word [rbx + rdi], r13w
movabs rdi, 0x7ffffffffffffffe
lea rcx, [rsp + 0x20]
call fcn.140001de0
test al, al
jne 0x1400025f6
mov rdx, qword [rsp + 0x38]
cmp rdx, 7
jbe 0x1400025b2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400025ad
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400026c9
call fcn.140004698
lea rdx, [rsp + 0x40]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400023d4
cmp qword [0x14000a0b0], 7
cmova r15, qword [0x14000a098]
mov rdx, qword [0x14000a0a8]
test rdx, rdx
jne 0x1400026f8
lea rcx, [0x140006938]
xor eax, eax
jmp 0x1400026fd
lea rax, [rbp + 0x190]
nop dword [rax]
inc r14
cmp word [rax + r14*2], 0
jne 0x140002600
mov rax, qword [0x14000a0b0]
cmp r14, rax
ja 0x14000264a
mov rdi, r15
cmp rax, 7
cmova rdi, qword [0x14000a098]
mov qword [0x14000a0a8], r14
lea rbx, [r14 + r14]
mov r8, rbx
lea rdx, [rbp + 0x190]
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + rdi], r13w
jmp 0x140002659
lea r9, [rbp + 0x190]
mov rdx, r14
call fcn.140003b70
lea rdx, str.Found_loader:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140003840
mov rcx, rax
lea rdx, [rbp + 0x190]
call fcn.140003840
lea rdx, [0x140003a20]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 7
jbe 0x1400025c8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400026d0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400026d0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004698
jmp 0x1400025c8
mov eax, 1
mov rcx, qword [rbp + 0x5b0]
xor rcx, rsp
call fcn.140004430
lea r11, [rsp + 0x6c0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140001d00
int3
call fcn.140001760
int3