Function at 0x140002300
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 0x140002373
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 0x1400026ed
mov r8d, 0x104
lea rdx, [rbp + 0x3a0]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1400023b3
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 0x1400026ed
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 0x1400025a2
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 0x140002445
cmp rbx, rdi
ja 0x14000271d
cmp rbx, 7
ja 0x14000248e
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 0x14000254e
mov rsi, rbx
or rsi, 7
cmp rsi, rdi
jbe 0x1400024ad
mov rsi, rdi
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x1400024dd
cmp rsi, 0xa
mov eax, 0xa
cmovb rsi, rax
lea rcx, [rsi + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140002723
add rcx, rcx
cmp rcx, 0x1000
jb 0x140002509
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002723
mov rcx, rax
call fcn.140004690
test rax, rax
je 0x1400026b9
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14000251b
test rcx, rcx
je 0x140002518
call fcn.140004690
mov rdi, rax
jmp 0x14000251b
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.140001dd0
test al, al
jne 0x1400025e6
mov rdx, qword [rsp + 0x38]
cmp rdx, 7
jbe 0x1400025a2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000259d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400026b9
call fcn.140004688
lea rdx, [rsp + 0x40]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400023c4
cmp qword [0x14000a0b0], 7
cmova r15, qword [0x14000a098]
mov rdx, qword [0x14000a0a8]
test rdx, rdx
jne 0x1400026e8
lea rcx, [0x140006938]
xor eax, eax
jmp 0x1400026ed
lea rax, [rbp + 0x190]
nop dword [rax]
inc r14
cmp word [rax + r14*2], 0
jne 0x1400025f0
mov rax, qword [0x14000a0b0]
cmp r14, rax
ja 0x14000263a
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 0x140002649
lea r9, [rbp + 0x190]
mov rdx, r14
call fcn.140003b60
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.140003830
mov rcx, rax
lea rdx, [rbp + 0x190]
call fcn.140003830
lea rdx, [0x140003a10]
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 0x1400025b8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400026c0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400026c0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004688
jmp 0x1400025b8
mov eax, 1
mov rcx, qword [rbp + 0x5b0]
xor rcx, rsp
call fcn.140004420
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.140001cf0
int3
call fcn.140001760
int3