Function at 0x100030680
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov qword [rsp + 0x90], 0xfffffffffffffffe
xor edi, edi
mov dword [rsp + 0x40], edi
or r12, 0xffffffffffffffff
mov qword [rax - 0x80], r12
or qword [rax - 0x68], r12
xor r13d, r13d
mov qword [rax - 0x78], r13
xor r15d, r15d
mov qword [rax - 0x60], r15
xor esi, esi
mov qword [rsp + 0x50], rsi
xor r14d, r14d
mov qword [rsp + 0x48], r14
and qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rdi + 7]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x70], rax
cmp rax, r12
je 0x100030940
and qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rdi + 7]
mov rcx, qword [rsp + 0xe8]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
je 0x100030940
lea rdx, [rsp + 0xf4]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0xf0], eax
cmp eax, 0xffffffff
jne 0x10003077e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100030940
lea rdx, [rsp + 0x84]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x80], eax
cmp eax, 0xffffffff
jne 0x1000307a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100030940
mov rax, qword [rsp + 0xf0]
cmp rax, qword [rsp + 0x80]
jne 0x100030940
test rax, rax
jne 0x1000307d0
lea edi, [rax + 1]
mov dword [rsp + 0x40], edi
jmp 0x100030940
and qword [rsp + 0x28], 0
mov eax, dword [rsp + 0xf0]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0xf4]
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r15, rax
mov qword [rsp + 0x78], rax
test rax, rax
je 0x100030940
and qword [rsp + 0x28], 0
mov eax, dword [rsp + 0xf0]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0xf4]
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r13, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x100030940
mov rax, qword [rsp + 0xf0]
mov rcx, rax
mov edx, 0x1000000
cmp rax, rdx
cmova rcx, rdx
mov qword [rsp + 0x88], rcx
xor ebx, ebx
mov qword [rsp + 0x68], rbx
sub rax, rbx
mov rdx, rcx
cmp rax, rcx
cmovb rdx, rax
mov qword [rsp + 0xf8], rdx
mov r8, rbx
shr r8, 0x20
mov qword [rsp + 0x20], rdx
mov r9d, ebx
mov edx, 4
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r14, rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x100030940
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8d, dword [rsp + 0x6c]
mov edx, 4
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x100030940
mov r8, qword [rsp + 0xf8]
mov rdx, rax
mov rcx, r14
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x100030940
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor r14d, r14d
mov qword [rsp + 0x48], r14
xor esi, esi
mov qword [rsp + 0x50], rsi
add rbx, qword [rsp + 0xf8]
mov qword [rsp + 0x68], rbx
mov rax, qword [rsp + 0xf0]
cmp rbx, rax
mov rcx, qword [rsp + 0x88]
jb 0x100030868
lea edi, [rsi + 1]
mov dword [rsp + 0x40], edi
jmp 0x10003095f
test r14, r14
je 0x10003096d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test rsi, rsi
je 0x10003097b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test r15, r15
je 0x100030989
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13, r13
je 0x100030997
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
cmp rcx, 0xffffffffffffffff
je 0x1000309a8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp r12, 0xffffffffffffffff
je 0x1000309b7
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret