Function at 0x1400047f0
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x6b0]
sub rsp, 0x7b0
mov rax, qword [0x14002b010]
xor rax, rsp
mov qword [rbp + 0x6a0], rax
mov r12, rdx
lea rcx, [rbp + 0x2a0]
xor edx, edx
mov r8d, 0x200
call fcn.1400069a0
mov edx, 0x100
mov dword [r12], 0xff
lea rcx, [rbp + 0x4a0]
xor sil, sil
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea r14, str.samsfpa.dat
mov edx, 0x200
lea r9, [rbp + 0x4a0]
mov qword [rsp + 0x20], r14
lea r8, str._sdrivers_s
lea rcx, [rbp + 0x2a0]
call fcn.140002560
lea rdx, str..dat
lea rcx, [rbp + 0x2a0]
call qword [sym.imp.SHLWAPI.dll_StrStrIW]
mov rbx, rax
test rax, rax
je 0x140004a43
xor edx, edx
lea rcx, [rbp + 0x220]
mov r8d, 0x80
call fcn.1400069a0
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x250
call fcn.1400069a0
xor edx, edx
lea rcx, [rbp + 0x1a0]
mov r8d, 0x80
call fcn.1400069a0
lea rcx, [rbp + 0x220]
call fcn.140004490
lea r9, [rbp + 0x220]
mov edx, 0x80
lea r8, str.__s.dat
lea rcx, [rbp + 0x1a0]
call fcn.140002560
movaps xmm0, xmmword [rbp + 0x1a0]
lea rdx, [rsp + 0x50]
mov eax, dword [rbp + 0x1c8]
lea rcx, [rbp + 0x2a0]
movaps xmm1, xmmword [rbp + 0x1b0]
movups xmmword [rbx], xmm0
movsd xmm0, qword [rbp + 0x1c0]
movups xmmword [rbx + 0x10], xmm1
movsd qword [rbx + 0x20], xmm0
mov dword [rbx + 0x28], eax
movzx eax, word [rbp + 0x1cc]
mov word [rbx + 0x2c], ax
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14000498e
lea rax, [rsp + 0x7c]
mov edx, 0x200
lea r9, [rbp + 0x4a0]
mov qword [rsp + 0x20], rax
lea r8, str._sdrivers_s
lea rcx, [rbp + 0x2a0]
call fcn.140002560
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x140004a43
xor eax, eax
lea r9, [rbp + 0x220]
lea r8, str.__s.dat
mov qword [rbp + 0x230], rax
mov edx, 0x80
mov qword [rbp + 0x238], rax
lea rcx, [rbp + 0x1a0]
call fcn.140002560
movaps xmm2, xmmword [rbp + 0x1b0]
lea rdx, [rsp + 0x50]
movaps xmm0, xmmword [rbp + 0x1a0]
lea rcx, [rbp + 0x2a0]
movups xmmword [rbx], xmm0
movsd qword [rbx + 0x10], xmm2
movdqa xmm0, xmm2
pextrw eax, xmm2, 6
psrldq xmm0, 8
movd dword [rbx + 0x18], xmm0
mov word [rbx + 0x1c], ax
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea r9, [rbp + 0x4a0]
mov edx, 0x200
lea r8, str._sdrivers_s
mov rbx, rax
lea rcx, [rbp + 0x2a0]
cmp rax, 0xffffffffffffffff
je 0x140004a39
lea rax, [rsp + 0x7c]
mov qword [rsp + 0x20], rax
call fcn.140002560
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x140004a43
mov qword [rsp + 0x20], r14
call fcn.140002560
xor r13d, r13d
mov qword [rsp + 0x7e0], r15
mov qword [rsp + 0x30], r13
lea rcx, [rbp + 0x2a0]
mov dword [rsp + 0x28], r13d
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r13 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140004bbf
xor edx, edx
mov dword [rsp + 0x40], r13d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
lea ecx, [r13 + 0x40]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r15, rax
mov rcx, rdi
test rax, rax
je 0x140004c02
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r13
mov r8d, ebx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x40], ebx
jne 0x140004bf6
mov eax, dword [r15]
add rbx, r15
cmp eax, 0x99833642
jne 0x140004ae6
lea r14d, [r13 + 0xc]
jmp 0x140004af7
cmp eax, 0x9182da6c
jne 0x140004bf6
mov r14d, 0x1c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [r15 + 4]
cmp rax, rbx
jae 0x140004bb6
nop dword [rax]
cmp word [rax], r13w
jne 0x140004b1d
cmp word [rax + 2], r13w
je 0x140004b3e
mov rdx, r14
mov ecx, dword [rax + 4]
lea rax, [rax + 4]
add ecx, ecx
lea rax, [rax + rcx*2]
sub rdx, 1
jne 0x140004b20
add rax, 4
cmp rax, rbx
jb 0x140004b10
jmp 0x140004bb6
mov ecx, dword [rax + 4]
add rax, 4
add ecx, ecx
lea rdx, [rax + rcx*2]
cmp rdx, rbx
ja 0x140004bb6
mov r8d, dword [rdx + 4]
add rdx, 4
movzx ecx, r13w
test r8d, r8d
je 0x140004bb6
mov r10d, 0x150
lea r9d, [r10 - 0x10]
nop dword [rax + rax]
add rdx, 4
cmp rdx, rbx
ja 0x140004bb6
movzx eax, word [rdx]
cmp ax, r10w
jne 0x140004b90
movzx eax, word [rdx + 2]
mov sil, 1
mov dword [r12], eax
movzx eax, word [rdx]
cmp ax, r9w
jne 0x140004ba6
mov eax, r13d
cmp word [rdx + 2], ax
setne al
mov dword [0x14002cf2c], eax
test sil, sil
jne 0x140004bb6
inc cx
movzx eax, cx
cmp eax, r8d
jb 0x140004b70
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalFree]
movzx eax, sil
mov r15, qword [rsp + 0x7e0]
mov rcx, qword [rbp + 0x6a0]
xor rcx, rsp
call fcn.140004d00
lea r11, [rsp + 0x7b0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140004bc3