Function at 0x140050f70
Capabilities:
Enumerate files on windows
Get common file path
Get file size
Read file on windows
Read file via mapping

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x598]
sub rsp, 0x698
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov rax, qword [0x1401385c0]
xor rax, rsp
mov qword [rbp + 0x580], rax
mov qword [rsp + 0x50], r9
mov rsi, r8
mov r13, rdx
mov qword [rsp + 0x78], rdx
mov r12, rcx
mov qword [rbp - 0x80], rcx
mov rax, qword [rbp + 0x600]
mov qword [rsp + 0x60], rax
mov rax, qword [rbp + 0x608]
mov qword [rsp + 0x48], rax
xor edx, edx
lea rcx, [rbp - 0x68]
call fcn.140040cc0
nop
mov edx, 1
mov rcx, r12
call fcn.140041190
mov edx, 0x104
lea rcx, [rbp + 0x360]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rcx, [rbp + 0x360]
call fcn.140048e80
xor r14d, r14d
mov ecx, r14d
movzx eax, byte [rbp + rcx + 0x360]
mov byte [rbp + rcx + 0x250], al
lea rcx, [rcx + 1]
test al, al
jne 0x140051011
lea rcx, [rbp + 0x250]
dec rcx
lea rcx, [rcx + 1]
cmp byte [rcx], r14b
jne 0x140051032
mov eax, dword [0x1400bc92c]
mov dword [rcx], eax
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x250]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14005129f
test byte [rbp - 0x30], 0x10
je 0x140051270
movzx ecx, byte [rbp - 4]
movzx eax, byte [rbp - 3]
cmp cl, byte [0x1401054b4]
jne 0x140051087
cmp al, byte [0x1401054b5]
je 0x140051270
cmp cl, byte [0x1400bff80]
jne 0x1400510a7
cmp al, byte [0x1400bff81]
jne 0x1400510a7
movzx eax, byte [rbp - 2]
cmp al, byte [0x1400bff82]
je 0x140051270
mov edx, 0x104
lea rcx, [rbp + 0x360]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rcx, [rbp + 0x360]
call fcn.140048e80
lea rcx, [rbp + 0x360]
dec rcx
nop
lea rcx, [rcx + 1]
cmp byte [rcx], r14b
jne 0x1400510d0
lea r8, [rbp - 4]
xor edx, edx
nop
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400510e0
lea rcx, [rbp + 0x360]
call fcn.140048e80
mov rcx, r14
nop
movzx eax, byte [rbp + rcx + 0x360]
mov byte [rbp + rcx + 0x250], al
lea rcx, [rcx + 1]
test al, al
jne 0x140051100
lea rcx, [rbp + 0x250]
dec rcx
lea rcx, [rcx + 1]
cmp byte [rcx], r14b
jne 0x140051121
movups xmm0, xmmword [str.microsoft..32.dll]
movups xmmword [rcx], xmm0
mov eax, dword [0x1400ed2b8]
mov dword [rcx + 0x10], eax
movzx eax, byte [0x1400ed2bc]
mov byte [rcx + 0x14], al
lea rdx, [rbp + 0x110]
lea rcx, [rbp + 0x250]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140051270
nop dword [rax + rax]
test byte [rbp + 0x110], 0x10
jne 0x14005123b
cmp byte [rbp + 0x13c], 0x2e
je 0x14005123b
mov rcx, r14
nop dword [rax]
movzx eax, byte [rbp + rcx + 0x360]
mov byte [rbp + rcx + 0x250], al
lea rcx, [rcx + 1]
test al, al
jne 0x140051190
lea rax, [rbp + 0x250]
dec rax
lea rax, [rax + 1]
cmp byte [rax], r14b
jne 0x1400511b1
lea r8, [rbp + 0x13c]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8 + rdx]
mov byte [rax + rdx], cl
lea rdx, [rdx + 1]
test cl, cl
jne 0x1400511d0
lea rax, [rbp + 0x250]
or rcx, 0xffffffffffffffff
nop dword [rax + rax]
inc rcx
cmp byte [rax + rcx], r14b
jne 0x1400511f0
inc rcx
call fcn.14005f15c
lea rdx, [rbp + 0x250]
lea rcx, [rbp + 0x250]
mov r8, rax
sub r8, rcx
nop word [rax + rax]
movzx ecx, byte [rdx]
mov byte [r8 + rdx], cl
lea rdx, [rdx + 1]
test cl, cl
jne 0x140051220
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.140040f20
xor edx, edx
mov r8d, 0x140
lea rcx, [rbp + 0x110]
call fcn.140060ef0
lea rdx, [rbp + 0x110]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140051170
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
xor edx, edx
mov r8d, 0x140
lea rcx, [rbp - 0x30]
call fcn.140060ef0
lea rdx, [rbp - 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140051061
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov edx, 0x104
lea rcx, [rbp + 0x360]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea rcx, [rbp + 0x360]
call fcn.140048e80
test rsi, rsi
je 0x14005138b
mov r8, qword [rsi]
test r8, r8
je 0x14005138b
mov rcx, r14
nop word [rax + rax]
movzx eax, byte [rbp + rcx + 0x360]
mov byte [rbp + rcx + 0x250], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400512e0
lea rcx, [rbp + 0x250]
dec rcx
lea rcx, [rcx + 1]
cmp byte [rcx], r14b
jne 0x140051301
xor edx, edx
nop dword [rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140051310
lea rax, [rbp + 0x250]
or rcx, 0xffffffffffffffff
nop dword [rax + rax]
inc rcx
cmp byte [rax + rcx], r14b
jne 0x140051330
inc rcx
call fcn.14005f15c
lea rdx, [rbp + 0x250]
lea rcx, [rbp + 0x250]
mov r8, rax
sub r8, rcx
nop word [rax + rax]
movzx ecx, byte [rdx]
mov byte [r8 + rdx], cl
lea rdx, [rdx + 1]
test cl, cl
jne 0x140051360
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.140040f20
add rsi, 8
mov r8, qword [rsi]
test r8, r8
jne 0x1400512d2
mov r15d, r14d
nop
lea rcx, [rbp - 0x68]
call fcn.140041340
test eax, eax
je 0x1400514c4
test r15d, r15d
jle 0x1400513b1
mov ecx, 0x14
call qword [sym.imp.KERNEL32.dll_Sleep]
inc r15d
mov dword [rsp + 0x40], r15d
lea rcx, [rbp - 0x68]
call fcn.1400413a0
mov rbx, rax
test rax, rax
je 0x1400514ba
xor r15d, r15d
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.140041400
mov r14, rax
mov rcx, rbx
call fcn.140041390
mov rdi, rax
test rax, rax
je 0x14005149a
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400514a9
mov byte [rbp + 0x250], r15b
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x58]
mov r8d, 0x104
lea rdx, [rbp + 0x250]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [rbp + 0x250], 0x4d
jne 0x14005146a
cmp byte [rbp + 0x251], 0x5a
je 0x140051492
mov byte [rbp + 0x353], r15b
mov rdx, r13
lea rcx, [rbp + 0x250]
call fcn.14006138c
test rax, rax
je 0x140051492
mov rdx, rdi
mov rcx, r12
call fcn.140040f20
jmp 0x14005149a
mov rcx, rdi
call fcn.14005f164
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.140041500
mov rbx, r14
test r14, r14
jne 0x1400513d1
mov r15d, dword [rsp + 0x40]
cmp r15d, 0x32
jl 0x140051390
mov edx, 1
lea rcx, [rbp - 0x68]
call fcn.140041190
mov r15, qword [rsp + 0x50]
test r15, r15
je 0x140051823
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x140051823
mov rcx, r12
call fcn.140041340
cmp eax, 1
jbe 0x140051823
mov rcx, r12
call fcn.1400413a0
mov rdi, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140051823
nop dword [rax + rax]
mov rdx, rdi
mov rcx, r12
call fcn.140041400
mov r14, rax
mov qword [rsp + 0x70], rax
mov rcx, rdi
call fcn.140041390
mov rsi, rax
mov qword [rsp + 0x68], rax
test rax, rax
je 0x14005180d
mov byte [rbp + 0x470], 0
mov ecx, 0x148
call fcn.14005f120
mov qword [rbp - 0x38], rax
test rax, rax
je 0x140051580
mov r9, rbx
mov r8, rsi
mov edx, 1
mov rcx, rax
call fcn.1400942e0
mov rbx, rax
xor ecx, ecx
jmp 0x140051584
xor ecx, ecx
mov ebx, ecx
test rbx, rbx
je 0x140051613
mov rax, qword [rbx]
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0x104
lea rcx, [rbp + 0x470]
mov qword [rsp + 0x20], rcx
mov r9d, 1
mov r8, r15
mov rdx, r13
mov rcx, rbx
call qword [rax + 0x10]
cmp byte [rbp + 0x470], 0
jne 0x140051606
mov rax, qword [rbx]
xor ecx, ecx
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0x104
lea rcx, [rbp + 0x470]
mov qword [rsp + 0x20], rcx
mov r9d, 1
mov r8, qword [rsp + 0x60]
mov rdx, r13
mov rcx, rbx
call qword [rax + 0x10]
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax]
cmp byte [rbp + 0x470], 0
je 0x1400517f2
lea rcx, [0x1400c5ab8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.Wow64DisableWow64FsRedirection
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp - 0x78], rax
test rax, rax
je 0x14005164d
lea rcx, [rbp - 0x70]
call rax
nop
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rbx + 1]
lea rcx, [rbp + 0x470]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x1400517b4
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor edx, edx
mov r8d, 0x8000002
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov r12, rax
test rax, rax
je 0x14005179f
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [rbx + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r13, rax
test rax, rax
je 0x140051789
lea edx, [rbx + 0x5c]
mov rcx, rsi
call fcn.140061090
lea rcx, [rax + 1]
mov r14, rsi
test rax, rax
cmovne r14, rcx
or rsi, 0xffffffffffffffff
nop
inc rsi
cmp byte [r14 + rsi], bl
jne 0x1400516f0
inc rsi
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
sub rdi, rsi
mov rbx, r13
je 0x140051757
mov r8, rsi
mov rdx, r14
mov rcx, rbx
call fcn.1400611e0
test eax, eax
jne 0x14005174e
cmp rdi, 0x104
jbe 0x14005174e
add rbx, 0x20
sub rdi, 0x20
cmp byte [rbx], al
jne 0x14005174e
lea rdx, [rbx + 1]
mov r8d, 0x80
mov rcx, rbx
call fcn.1400611e0
test eax, eax
je 0x140051757
inc rbx
sub rdi, 1
jne 0x140051711
movzx eax, byte [rbp + 0x470]
test rdi, rdi
mov ecx, 0
cmove eax, ecx
mov byte [rbp + 0x470], al
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x68]
mov r14, qword [rsp + 0x70]
jmp 0x14005178f
mov byte [rbp + 0x470], bl
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x78]
jmp 0x1400517a5
mov byte [rbp + 0x470], bl
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rbp - 0x80]
jmp 0x1400517ba
mov byte [rbp + 0x470], bl
cmp qword [rbp - 0x78], 0
je 0x1400517e9
lea rcx, [0x1400c5ab8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.Wow64RevertWow64FsRedirection
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400517e9
mov rcx, qword [rbp - 0x70]
call rax
cmp byte [rbp + 0x470], 0
jne 0x140051808
xor r8d, r8d
mov rdx, rdi
mov rcx, r12
call fcn.140041500
mov rcx, rsi
call fcn.14005f164
mov rbx, qword [rsp + 0x48]
mov rdi, r14
mov qword [rsp + 0x40], r14
test r14, r14
mov r15, qword [rsp + 0x50]
jne 0x140051520
mov rcx, r12
call fcn.140041340
mov ebx, eax
lea rcx, [rbp - 0x68]
call fcn.140040d10
mov eax, ebx
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.14005f0d0
add rsp, 0x698
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret