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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rdi
push r12
sub rsp, 0x50
and dword [rsp + 0x78], 0
mov rbx, rdx
mov rbp, rcx
test rdx, rdx
jne 0x1001023cb
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x1001023c1
test byte [rcx + 0x1c], 1
je 0x1001023c1
mov rcx, qword [rcx + 0x10]
lea edx, [rbx + 0x21]
lea r8, [0x10001dad0]
call fcn.100034764
mov eax, 0x80070057
jmp 0x1001026b9
and qword [rsp + 0x30], 0
xor r9d, r9d
mov edx, 0x80010000
lea r8d, [r9 + 1]
mov rcx, rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x100102453
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x10010242e
test byte [rcx + 0x1c], 1
je 0x10010242e
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x23]
lea r8, [0x10001dad0]
mov r9, rbx
call fcn.100034788
call sub.KERNEL32.dll_GetLastError
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1001026a0
mov ebx, 0x80004005
jmp 0x1001026a0
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 0x10], eax
cmp eax, 0x78
jae 0x1001024a1
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x100102497
test byte [rcx + 0x1c], 1
je 0x100102497
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dad0]
mov edx, 0x23
mov r9, rbx
call fcn.100034788
mov ebx, 0x8007000b
jmp 0x100102693
mov ecx, eax
call fcn.10011b8d4
mov qword [rbp + 8], rax
test rax, rax
jne 0x1001024eb
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x1001024e1
test byte [rcx + 0x1c], 1
je 0x1001024e1
mov r9d, dword [rbp + 0x10]
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x24]
lea r8, [0x10001dad0]
call fcn.100036328
mov ebx, 0x8007000e
jmp 0x100102693
mov r8d, dword [rbp + 0x10]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x78]
mov rdx, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10010255a
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x100102536
test byte [rcx + 0x1c], 1
je 0x100102536
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x25]
lea r8, [0x10001dad0]
call fcn.100034764
call sub.KERNEL32.dll_GetLastError
mov ebx, 0x80004005
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
cmovns ecx, ebx
mov ebx, ecx
jmp 0x100102693
mov eax, dword [rbp + 0x10]
cmp dword [rsp + 0x78], eax
je 0x10010259b
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x100102591
test byte [rcx + 0x1c], 1
je 0x100102591
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dad0]
mov edx, 0x26
call fcn.100034764
mov ebx, 0x80004005
jmp 0x100102693
mov rbx, qword [rbp + 8]
test rbx, rbx
jne 0x1001025de
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x1001025d7
test byte [rcx + 0x1c], 1
je 0x1001025d7
mov rcx, qword [rcx + 0x10]
lea edx, [rbx + 0x36]
lea r8, [0x10001dbe8]
call fcn.100034764
mov rcx, qword [0x100152eb8]
mov ebx, 0x80070057
jmp 0x100102645
cmp eax, 0x78
jae 0x100102603
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x100102640
test byte [rcx + 0x1c], 1
je 0x100102640
mov edx, 0x37
jmp 0x100102629
cmp dword [rbx], 0x4d51534d
je 0x100102667
mov rcx, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rcx, rdi
je 0x100102640
test byte [rcx + 0x1c], 1
je 0x100102640
mov edx, 0x38
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dbe8]
call fcn.100034764
mov rcx, qword [0x100152eb8]
mov ebx, 0x8007000b
cmp rcx, rdi
je 0x100102693
test byte [rcx + 0x1c], 1
je 0x100102693
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dad0]
mov edx, 0x27
call fcn.100034764
jmp 0x100102693
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov r11, qword [rsp + 0x80]
mov qword [rbx + 0x28], r11
xor ebx, ebx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jns 0x1001026b7
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x1001026b7
call sub.msvcrt.dll_free
and qword [rbp + 8], 0
and dword [rbp + 0x10], 0
mov eax, ebx
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop r12
pop rdi
pop rbp
ret