Function at 0x140005300
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x50
mov rax, qword [0x14001e018]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov ecx, 0x1f4
call qword [0x14001fdc8]
mov eax, dword [0x14001ea10]
lea r9, [rsp + 0x38]
mov rcx, qword [0x14001ea18]
xor r12d, r12d
mov edx, 0xffff
mov dword [rsp + 0x38], eax
mov r8d, 0x1006
mov dword [rsp + 0x3c], r12d
mov dword [rsp + 0x20], 8
call qword [0x14001fd30]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r13d, 0x400
lea edx, [r12 + 8]
mov rcx, rax
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, 0xfffffff5
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsp + 0x80], r14
mov qword [rsp + 0x88], r15
nop dword [rax]
test rsi, rsi
je 0x1400053dc
mov rcx, rsi
xorps xmm0, xmm0
mov eax, 8
movups xmmword [rcx], xmm0
movups xmmword [rcx + 0x10], xmm0
movups xmmword [rcx + 0x20], xmm0
movups xmmword [rcx + 0x30], xmm0
movups xmmword [rcx + 0x40], xmm0
movups xmmword [rcx + 0x50], xmm0
movups xmmword [rcx + 0x60], xmm0
lea rcx, [rcx + 0x80]
movups xmmword [rcx - 0x10], xmm0
sub rax, 1
jne 0x1400053b0
mov rcx, qword [0x14001fe00]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0x50
mov dword [rsp + 0x30], r12d
call qword [0x14001fdc8]
mov rcx, qword [0x14001fe00]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], r12
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [0x14001fde8]
cmp dword [rsp + 0x30], r12d
jbe 0x1400057f4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx - 4]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, qword [0x14001ea18]
mov edi, r12d
mov rbx, rax
mov dword [rax], 1
add byte [rax + 1], 0xfd
add byte [rax + 2], 0xfd
add byte [rax + 3], 0xfd
mov byte [rax], 0xfe
nop dword [rax]
nop dword [rax + rax]
mov r8d, 4
movsxd rdx, edi
sub r8d, edi
add rdx, rbx
xor r9d, r9d
mov rcx, rbp
call qword [0x14001fdb8]
cmp eax, 0xffffffff
je 0x1400058bb
add edi, eax
mov eax, dword [0x14001ffc4]
inc eax
mov dword [0x14001ffc4], eax
cmp eax, 0xa
je 0x1400058b4
cmp edi, 4
jl 0x140005470
add byte [rbx], 3
add byte [rbx + 1], 3
add byte [rbx + 2], 3
add byte [rbx + 3], 3
mov dword [0x14001ffc4], r12d
test rsi, rsi
je 0x14000550c
mov rax, rsi
xorps xmm0, xmm0
mov ecx, 8
nop dword [rax + rax]
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
movups xmmword [rax + 0x40], xmm0
movups xmmword [rax + 0x50], xmm0
movups xmmword [rax + 0x60], xmm0
lea rax, [rax + 0x80]
movups xmmword [rax - 0x10], xmm0
sub rcx, 1
jne 0x1400054e0
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x34]
mov rcx, qword [0x14001fe00]
mov rdx, rsi
mov qword [rsp + 0x20], r12
cmp r8d, r13d
jb 0x14000552d
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400058e8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r15d, dword [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
mov r8d, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, qword [0x14001ea18]
lea r14, [r15 + 0x3ff]
shr r14, 0xa
mov rdi, rax
mov ebx, r12d
mov qword [rax], r14
add byte [rax + 1], 0xfd
add byte [rax + 2], 0xfd
lea ecx, [r14 - 3]
add byte [rax + 3], 0xfd
add byte [rax + 4], 0xfd
add byte [rax + 5], 0xfd
add byte [rax + 6], 0xfd
add byte [rax + 7], 0xfd
mov byte [rax], cl
nop dword [rax + rax]
mov r8d, 8
movsxd rdx, ebx
sub r8d, ebx
add rdx, rdi
xor r9d, r9d
mov rcx, rbp
call qword [0x14001fdb8]
cmp eax, 0xffffffff
je 0x1400057e6
add ebx, eax
mov eax, dword [0x14001ffc4]
inc eax
mov dword [0x14001ffc4], eax
cmp eax, 0xa
je 0x1400057df
cmp ebx, 8
jl 0x1400055b0
add byte [rdi], 3
add byte [rdi + 1], 3
add byte [rdi + 2], 3
add byte [rdi + 3], 3
add byte [rdi + 4], 3
add byte [rdi + 5], 3
add byte [rdi + 6], 3
add byte [rdi + 7], 3
mov dword [0x14001ffc4], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
and r15d, 0x3ff
cmove r15, r13
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
mov r8d, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, qword [0x14001ea18]
lea ecx, [r15 - 3]
mov rbx, rax
mov edi, r12d
mov qword [rax], r15
add byte [rax + 1], 0xfd
add byte [rax + 2], 0xfd
add byte [rax + 3], 0xfd
add byte [rax + 4], 0xfd
add byte [rax + 5], 0xfd
add byte [rax + 6], 0xfd
add byte [rax + 7], 0xfd
mov byte [rax], cl
mov r8d, 8
movsxd rdx, edi
sub r8d, edi
add rdx, rbx
xor r9d, r9d
mov rcx, rbp
call qword [0x14001fdb8]
cmp eax, 0xffffffff
je 0x1400057b8
add edi, eax
mov eax, dword [0x14001ffc4]
inc eax
mov dword [0x14001ffc4], eax
cmp eax, 0xa
je 0x1400057b1
cmp edi, 8
jl 0x140005680
add byte [rbx], 3
add byte [rbx + 1], 3
add byte [rbx + 2], 3
add byte [rbx + 3], 3
add byte [rbx + 4], 3
add byte [rbx + 5], 3
add byte [rbx + 6], 3
add byte [rbx + 7], 3
mov dword [0x14001ffc4], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rbp, [r14 - 1]
mov edi, r12d
test rbp, rbp
je 0x14000573a
mov ebx, r12d
nop dword [rax + rax]
movsxd rdx, ebx
mov r8d, r13d
add rdx, rsi
call fcn.140001f20
mov dword [0x14001fe08], eax
cmp eax, 0xffffffff
je 0x1400058cf
inc edi
add ebx, r13d
movsxd rax, edi
cmp rax, rbp
jb 0x140005710
shl r14, 0xa
mov r8d, r15d
lea rdx, [r14 - 0x400]
add rdx, rsi
call fcn.140001f20
mov dword [0x14001fe08], eax
cmp eax, 0xffffffff
je 0x1400058cf
test rsi, rsi
je 0x1400053dc
mov rax, rsi
xorps xmm0, xmm0
mov ecx, 8
nop dword [rax]
nop word [rax + rax]
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
movups xmmword [rax + 0x40], xmm0
movups xmmword [rax + 0x50], xmm0
movups xmmword [rax + 0x60], xmm0
lea rax, [rax + 0x80]
movups xmmword [rax - 0x10], xmm0
sub rcx, 1
jne 0x140005780
jmp 0x1400053a0
mov dword [0x14001ffc4], r12d
test rsi, rsi
je 0x1400057d1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
jmp 0x1400058dd
mov dword [0x14001ffc4], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
jmp 0x1400058dd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx - 4]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, qword [0x14001ea18]
mov edi, r12d
mov rbx, rax
mov dword [rax], r12d
add byte [rax + 1], 0xfd
add byte [rax + 2], 0xfd
add byte [rax + 3], 0xfd
mov byte [rax], 0xfd
nop dword [rax + rax]
mov r8d, 4
movsxd rdx, edi
sub r8d, edi
add rdx, rbx
xor r9d, r9d
mov rcx, rbp
call qword [0x14001fdb8]
cmp eax, 0xffffffff
je 0x1400058bb
add edi, eax
mov eax, dword [0x14001ffc4]
inc eax
mov dword [0x14001ffc4], eax
cmp eax, 0xa
je 0x1400058b4
cmp edi, 4
jl 0x140005830
add byte [rbx], 3
add byte [rbx + 1], 3
add byte [rbx + 2], 3
add byte [rbx + 3], 3
mov dword [0x14001ffc4], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rsi, rsi
je 0x1400058ad
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, 1
jmp 0x1400058ea
mov dword [0x14001ffc4], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rsi, rsi
je 0x1400058e8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov r15, qword [rsp + 0x88]
mov r14, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140005ac0
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret