Function at 0x100102914
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 0x100102967
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x10010295d
test byte [rcx + 0x1c], 1
je 0x10010295d
mov rcx, qword [rcx + 0x10]
lea edx, [rbx + 0x21]
lea r8, [0x10001dad0]
call fcn.100034784
mov eax, 0x80070057
jmp 0x100102c55
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 0x1001029ef
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x1001029ca
test byte [rcx + 0x1c], 1
je 0x1001029ca
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x23]
lea r8, [0x10001dad0]
mov r9, rbx
call fcn.1000347a8
call sub.KERNEL32.dll_GetLastError
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x100102c3c
mov ebx, 0x80004005
jmp 0x100102c3c
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 0x10], eax
cmp eax, 0x78
jae 0x100102a3d
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x100102a33
test byte [rcx + 0x1c], 1
je 0x100102a33
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dad0]
mov edx, 0x23
mov r9, rbx
call fcn.1000347a8
mov ebx, 0x8007000b
jmp 0x100102c2f
mov ecx, eax
call fcn.10011bdc8
mov qword [rbp + 8], rax
test rax, rax
jne 0x100102a87
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x100102a7d
test byte [rcx + 0x1c], 1
je 0x100102a7d
mov r9d, dword [rbp + 0x10]
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x24]
lea r8, [0x10001dad0]
call fcn.100036510
mov ebx, 0x8007000e
jmp 0x100102c2f
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 0x100102af6
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x100102ad2
test byte [rcx + 0x1c], 1
je 0x100102ad2
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x25]
lea r8, [0x10001dad0]
call fcn.100034784
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 0x100102c2f
mov eax, dword [rbp + 0x10]
cmp dword [rsp + 0x78], eax
je 0x100102b37
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x100102b2d
test byte [rcx + 0x1c], 1
je 0x100102b2d
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dad0]
mov edx, 0x26
call fcn.100034784
mov ebx, 0x80004005
jmp 0x100102c2f
mov rbx, qword [rbp + 8]
test rbx, rbx
jne 0x100102b7a
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x100102b73
test byte [rcx + 0x1c], 1
je 0x100102b73
mov rcx, qword [rcx + 0x10]
lea edx, [rbx + 0x36]
lea r8, [0x10001dbe8]
call fcn.100034784
mov rcx, qword [0x100153eb8]
mov ebx, 0x80070057
jmp 0x100102be1
cmp eax, 0x78
jae 0x100102b9f
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x100102bdc
test byte [rcx + 0x1c], 1
je 0x100102bdc
mov edx, 0x37
jmp 0x100102bc5
cmp dword [rbx], 0x4d51534d
je 0x100102c03
mov rcx, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rcx, rdi
je 0x100102bdc
test byte [rcx + 0x1c], 1
je 0x100102bdc
mov edx, 0x38
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dbe8]
call fcn.100034784
mov rcx, qword [0x100153eb8]
mov ebx, 0x8007000b
cmp rcx, rdi
je 0x100102c2f
test byte [rcx + 0x1c], 1
je 0x100102c2f
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001dad0]
mov edx, 0x27
call fcn.100034784
jmp 0x100102c2f
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 0x100102c53
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x100102c53
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