Function at 0x14004c980
Capabilities:
Get file size

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x3f]
sub rsp, 0xb8
mov rax, qword [0x1401c73e8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r8d, 1
mov rsi, rcx
call fcn.14004ab90
test eax, eax
jns 0x14004cba8
lea rbx, [rbp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
dec rbx
mov eax, 0xcccccccd
mul r9d
shr edx, 3
movzx ecx, dl
shl cl, 2
lea r8d, [rcx + rdx]
add r8b, r8b
sub r9b, r8b
add r9b, 0x30
mov byte [rbx], r9b
mov r9d, edx
test edx, edx
jne 0x14004c9c2
xor edi, edi
lea rax, [rbp + 0x24]
mov qword [rbp - 0x29], rdi
mov edx, edi
mov qword [rbp - 0x39], rdx
mov ecx, reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rbp - 0x21], rcx
mov r8d, edi
cmp rbx, rax
je 0x14004ca2e
lea r8, [rbp + 0x24]
mov rdx, rbx
sub r8, rbx
lea rcx, [rbp - 0x39]
call fcn.140028df0
mov rcx, qword [rbp - 0x21]
mov r8, qword [rbp - 0x29]
mov rdx, qword [rbp - 0x39]
mov qword [rsp + 0xf0], r14
mov rax, rcx
mov qword [rsp + 0xb0], r15
lea r14, str.Failed_to_open_the_file:
sub rax, r8
mov r15d, 0x19
cmp rax, r15
jb 0x14004cacd
lea rax, [r8 + 0x19]
cmp rcx, 0x10
lea rbx, [rbp - 0x39]
mov qword [rbp - 0x29], rax
cmovae rbx, rdx
lea rax, [0x140199301]
cmp rax, rbx
jbe 0x14004ca91
lea rax, [rbx + r8]
cmp r14, rax
ja 0x14004ca91
cmp rbx, r14
ja 0x14004ca89
mov rsi, rdi
jmp 0x14004ca94
mov rsi, rbx
sub rsi, r14
jmp 0x14004ca94
mov rsi, r15
inc r8
lea rcx, [rbx + 0x19]
mov rdx, rbx
call fcn.140125070
mov r8, rsi
mov rdx, r14
mov rcx, rbx
call fcn.140125070
sub r15, rsi
lea rdx, [r14 + 0x19]
add rdx, rsi
lea rcx, [rbx + rsi]
mov r8, r15
call fcn.140125070
lea rax, [rbp - 0x39]
jmp 0x14004cae3
mov qword [rsp + 0x28], r15
lea rcx, [rbp - 0x39]
mov rdx, r15
mov qword [rsp + 0x20], r14
call fcn.1400436e0
movups xmm0, xmmword [rax]
lea rcx, [rbp - 0x39]
movups xmmword [rbp - 0x11], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 1], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], reloc.OLEAUT32.dll_SafeArrayDestroy
mov byte [rax], dil
call fcn.140028ff0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rdi, qword [0x1401dd1a8]
mov r15, qword [rsp + 0xb0]
mov r14, qword [rsp + 0xf0]
test rdi, rdi
je 0x14004cb3d
lock inc dword [rdi + 8]
mov rdi, qword [0x1401dd1a8]
mov rbx, qword [0x1401dd1a0]
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
cmp qword [rbp + 7], 0x10
lea rdx, [rbp - 0x11]
mov rax, qword [rbx]
mov rcx, rbx
cmovae rdx, qword [rbp - 0x11]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rdi, rdi
je 0x14004cb98
mov ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x14004cb98
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
lock xadd dword [rdi + 0xc], ebx
cmp ebx, 1
jne 0x14004cb98
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [rbp - 0x11]
call fcn.140028ff0
xor al, al
jmp 0x14004ccc2
mov rbx, qword [rsi]
lea rdx, [rbp - 0x15]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor edi, edi
mov dword [rbp - 0x19], eax
mov r9, qword [rbp - 0x19]
xor edx, edx
shr r9, 0x20
mov rcx, rbx
mov qword [rsp + 0x28], rdi
lea r8d, [rdi + 2]
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsi + 0x20], rax
mov rcx, rax
test rax, rax
jne 0x14004cbf2
call fcn.14004ab40
mov ebx, eax
jmp 0x14004cc41
mov rax, qword [rbp - 0x19]
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsi + 0x18], rax
mov dword [rsi + 0x30], 4
lea edx, [r9 + 4]
mov qword [rsi + 0x28], rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov qword [rsi + 0x10], rax
test rax, rax
jne 0x14004ccc0
call fcn.14004ab40
mov rcx, qword [rsi + 0x20]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x20], rdi
test ebx, ebx
jns 0x14004ccc0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rdi, qword [0x1401dd1a8]
test rdi, rdi
je 0x14004cc68
lock inc dword [rdi + 8]
mov rdi, qword [0x1401dd1a8]
mov rbx, qword [0x1401dd1a0]
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
mov rax, qword [rbx]
lea rdx, str.Failed_to_map_file_to_memory
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rdi, rdi
je 0x14004ccbc
mov ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x14004ccbc
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
lock xadd dword [rdi + 0xc], ebx
cmp ebx, 1
jne 0x14004ccbc
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor al, al
jmp 0x14004ccc2
mov al, 1
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140122510
add rsp, 0xb8
pop rdi
pop rsi
pop rbx
pop rbp
ret