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

Disassembly:
mov r11, rsp
sub rsp, 0xa8
mov rax, qword [0x10000e360]
mov qword [rsp + 0x60], rax
movzx eax, word [0x1000037e0]
mov qword [r11 - 8], rbp
mov qword [r11 - 0x10], rsi
mov qword [r11 - 0x18], rdi
mov word [r11 - 0x60], ax
movzx eax, byte [0x1000037e2]
mov qword [r11 - 0x20], r12
lea rcx, [r11 - 0x60]
mov qword [r11 - 0x28], r13
mov byte [rcx + 2], al
xor eax, eax
mov r10, rdx
mov qword [r11 - 0x78], rax
mov qword [r11 - 0x30], r14
mov rsi, r8
mov dword [rsp + 0x28], eax
lea r8d, [rax + 1]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, r10
mov qword [r11 - 0x38], r15
mov word [rsp + 0x44], 0x75
mov r13d, 0x5000
mov r14d, 0x70000
mov edi, eax
mov ebp, eax
mov dword [rsp + 0x40], eax
mov r12d, eax
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov r15, rax
je 0x100008117
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, r14d
cmovb r14d, eax
cmp dword [0x10000e4f0], r12d
je 0x100008109
mov r13d, 0x200
lea r14d, [rax - 0x40]
cmp r14d, r13d
jae 0x10000811e
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x100008311
sub r14d, r13d
mov qword [rsp + 0xc8], rbx
mov ecx, r14d
call qword [sym.imp.msvcrt.dll_malloc]
mov r8d, r14d
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x50], rax
call sub.msvcrt.dll_memset
xor r9d, r9d
xor r8d, r8d
mov edx, r13d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rdx, qword [rsp + 0x50]
lea r9, [rsp + 0x58]
mov r8d, r14d
mov rcx, r15
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x100008192
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.msvcrt.dll_free]
xor eax, eax
jmp 0x100008309
xor ebx, ebx
add r14d, 0xffffffd8
mov ecx, ebx
je 0x1000082ad
mov r8, qword [rsp + 0x50]
lea rax, [r8 + 0xc]
nop
nop
cmp byte [rax - 0xc], 0x56
jne 0x100008202
cmp byte [rax + 0xd], 0x3b
jne 0x100008202
cmp byte [rax], bl
jne 0x100008202
cmp byte [rax - 0xb], 0x8b
jne 0x100008202
cmp byte [rax - 0xa], 0x30
jne 0x100008202
cmp byte [rax - 9], 0x8b
jne 0x100008202
cmp byte [rax + 3], 0x33
jne 0x100008202
movzx edx, byte [rax + 1]
cmp dl, 0x75
jne 0x1000081f0
mov r12d, 1
lea ebp, [rcx + r13 + 0xd]
inc edi
jmp 0x100008202
cmp dl, 0x74
jne 0x100008202
mov r12d, 2
lea ebp, [rcx + r13 + 0xd]
inc edi
inc ecx
inc rax
cmp ecx, r14d
jb 0x1000081b0
cmp edi, 1
jne 0x1000082b2
test ebp, ebp
je 0x1000082b2
mov ecx, ebp
mov edi, ebx
mov eax, ebx
sub ecx, r13d
lea rcx, [r8 + rcx + 0xc]
nop
nop
cmp byte [rcx - 0xc], 0x8b
jne 0x10000829f
cmp byte [rcx + 8], 0x8b
jne 0x10000829f
cmp byte [rcx], 0x3b
jne 0x10000829f
cmp byte [rcx - 0xb], 0xf1
jne 0x10000829f
cmp byte [rcx - 0xa], 0x8d
jne 0x10000829f
cmp byte [rcx - 7], 0x57
jne 0x10000829f
cmp byte [rcx + 5], 0x8b
jne 0x10000829f
cmp byte [rcx + 0x18], 0xc0
jne 0x10000829f
movzx edx, byte [rcx + 3]
cmp dl, 0x90
jne 0x100008281
lea edx, [rax + rbp + 0xf]
mov r12d, 1
mov dword [rsi + 0xc], 0xffffffff
mov dword [rsp + 0x40], edx
inc edi
jmp 0x10000829f
cmp dl, 0x7f
jne 0x10000829f
cmp byte [rcx + 4], 0x16
jne 0x10000829f
lea edx, [rax + rbp + 0xf]
mov r12d, 2
mov dword [rsi + 0xc], ebx
mov dword [rsp + 0x40], edx
inc edi
inc eax
inc rcx
cmp eax, 0x180
jb 0x100008230
jmp 0x1000082b2
mov r8, qword [rsp + 0x50]
mov rcx, r8
call qword [sym.imp.msvcrt.dll_free]
cmp edi, 1
mov dword [rsi + 0x1dc], edi
jne 0x1000082f3
mov eax, dword [rsp + 0x40]
mov dword [rsi + 4], ebp
mov dword [rsi + 0xc], ebx
mov dword [rsi + 8], eax
movzx eax, byte [rsp + 0x44]
mov dword [rsi], r12d
mov dword [rsi + 0x10], edi
mov byte [rsi + 0x18], al
movzx eax, word [rsp + 0x48]
mov dword [rsi + 0x14], 2
mov word [rsi + 0x38], ax
jmp 0x100008304
mov dword [rsi + 4], ebx
mov dword [rsi + 8], ebx
mov dword [rsi + 0xc], ebx
mov dword [rsi], ebx
mov dword [rsi + 0x10], ebx
mov dword [rsi + 0x14], ebx
mov eax, 1
mov rbx, qword [rsp + 0xc8]
mov r15, qword [rsp + 0x70]
mov r14, qword [rsp + 0x78]
mov r13, qword [rsp + 0x80]
mov r12, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x60]
call fcn.10000afa0
add rsp, 0xa8
ret