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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xd0]
sub rsp, 0x1d0
mov rax, qword [0x1401c73e8]
xor rax, rsp
mov qword [rbp + 0xc8], rax
xor edi, edi
lea r15, [0x140199508]
mov r14, rdx
mov r13, rcx
lea rsi, [rdi - 1]
nop dword [rax]
nop word [rax + rax]
mov r12d, dword [r15]
mov r8d, 1
mov rdx, r14
mov rcx, r13
call fcn.14004ab90
test eax, eax
jns 0x14004b167
test r12d, r12d
je 0x14004af78
mov r8d, 0x1c
mov qword [rbp + 0x10], rdi
lea rdx, str.Attempted_to_open_the_file:
mov qword [rbp + 0x20], rdi
lea rcx, [rbp + 0x10]
mov qword [rbp + 0x28], 7
call fcn.140028220
mov r8, rsi
nop
inc r8
cmp word [r14 + r8*2], 0
jne 0x14004ad20
mov rdx, r14
lea rcx, [rbp + 0x10]
call fcn.140025c40
lea r9, [rbp + 0x92]
mov r8d, r12d
add r9, 0xfffffffffffffffe
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x14004ad41
lea rax, [rbp + 0x92]
mov qword [rbp - 0x60], rdi
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x48], 7
cmp r9, rax
je 0x14004ada6
lea r8, [rbp + 0x92]
mov rdx, r9
sub r8, r9
lea rcx, [rbp - 0x60]
sar r8, 1
call fcn.140028220
lea rbx, [rbp + 0xc2]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
nop word [rax + rax]
add rbx, 0xfffffffffffffffe
mov eax, 0xcccccccd
mul ecx
shr edx, 3
movzx eax, dx
shl ax, 2
lea r8d, [rax + rdx]
add r8w, r8w
sub cx, r8w
add cx, 0x30
mov word [rbx], cx
mov ecx, edx
test edx, edx
jne 0x14004adc0
lea rax, [rbp + 0xc2]
mov qword [rbp - 0x80], rdi
mov qword [rbp - 0x70], rdi
mov qword [rbp - 0x68], 7
cmp rbx, rax
je 0x14004ae23
lea r8, [rbp + 0xc2]
mov rdx, rbx
sub r8, rbx
lea rcx, [rbp - 0x80]
sar r8, 1
call fcn.140028220
mov r9d, 8
lea r8, [0x1401992d0]
lea rcx, [rbp - 0x80]
call fcn.14004c5a0
mov r8d, reloc.OLEAUT32.dll_VariantChangeType
lea rdx, str.._Sleeping
lea rcx, [rbp - 0x20]
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x20], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x10], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
call fcn.140025c40
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x40]
lea rcx, [rsp + 0x60]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
mov qword [rax + 0x10], rdi
movups xmmword [rbp - 0x40], xmm0
mov qword [rax + 0x18], 7
movups xmmword [rbp - 0x30], xmm1
mov word [rax], di
call fcn.14004c3f0
cmp qword [rsp + 0x78], 8
lea rdx, [rsp + 0x60]
mov r8, qword [rsp + 0x70]
lea rcx, [rbp + 0x10]
cmovae rdx, qword [rsp + 0x60]
call fcn.140025c40
lea rcx, [rsp + 0x60]
call fcn.1400285b0
lea rcx, [rbp - 0x40]
call fcn.1400285b0
lea rcx, [rbp - 0x20]
call fcn.1400285b0
lea rcx, [rbp - 0x80]
call fcn.1400285b0
lea rcx, [rbp - 0x60]
call fcn.1400285b0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rdi, qword [0x1401dd1a8]
test rdi, rdi
je 0x14004af0d
lock inc dword [rdi + 8]
mov rdi, qword [0x1401dd1a8]
mov rbx, qword [0x1401dd1a0]
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
cmp qword [rbp + 0x28], 8
lea rdx, [rbp + 0x10]
mov rax, qword [rbx]
mov rcx, rbx
cmovae rdx, qword [rbp + 0x10]
call qword [rax]
test rdi, rdi
je 0x14004af64
mov eax, esi
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x14004af64
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, esi
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x14004af64
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp + 0x10]
call fcn.1400285b0
xor edi, edi
add r15, 4
lea rax, [0x140199518]
cmp r15, rax
jne 0x14004acd0
lea rbx, [rbp + 0x65]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
nop dword [rax]
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 0x14004afa0
lea rax, [rbp + 0x65]
mov qword [rsp + 0x50], rdi
mov rdx, rdi
mov ecx, reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rsp + 0x40], rdx
mov r8, rdi
mov qword [rsp + 0x58], rcx
cmp rbx, rax
je 0x14004b012
lea r8, [rbp + 0x65]
mov rdx, rbx
sub r8, rbx
lea rcx, [rsp + 0x40]
call fcn.140028df0
mov rcx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x40]
mov rax, rcx
lea r14, str.Failed_to_open_the_file:
sub rax, r8
mov r15d, 0x19
cmp rax, r15
jb 0x14004b0a1
lea rax, [r8 + 0x19]
cmp rcx, 0x10
lea rbx, [rsp + 0x40]
mov qword [rsp + 0x50], rax
cmovae rbx, rdx
lea rax, [0x140199301]
cmp rax, rbx
jbe 0x14004b062
lea rax, [rbx + r8]
cmp r14, rax
ja 0x14004b062
cmp rbx, r14
jbe 0x14004b065
mov rdi, rbx
sub rdi, r14
jmp 0x14004b065
mov rdi, r15
inc r8
lea rcx, [rbx + 0x19]
mov rdx, rbx
call fcn.140125070
mov r8, rdi
mov rdx, r14
mov rcx, rbx
call fcn.140125070
lea rdx, [r14 + 0x19]
sub r15, rdi
add rdx, rdi
lea rcx, [rbx + rdi]
mov r8, r15
call fcn.140125070
lea rax, [rsp + 0x40]
xor edi, edi
jmp 0x14004b0b8
mov qword [rsp + 0x28], r15
lea rcx, [rsp + 0x40]
mov rdx, r15
mov qword [rsp + 0x20], r14
call fcn.1400436e0
movups xmm0, xmmword [rax]
lea rcx, [rsp + 0x40]
movups xmmword [rbp + 0x30], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x40], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], reloc.OLEAUT32.dll_SafeArrayDestroy
mov byte [rax], 0
call fcn.140028ff0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rdi, qword [0x1401dd1a8]
test rdi, rdi
je 0x14004b103
lock inc dword [rdi + 8]
mov rdi, qword [0x1401dd1a8]
mov rbx, qword [0x1401dd1a0]
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
cmp qword [rbp + 0x48], 0x10
lea rdx, [rbp + 0x30]
mov rax, qword [rbx]
mov rcx, rbx
cmovae rdx, qword [rbp + 0x30]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rdi, rdi
je 0x14004b159
mov eax, esi
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x14004b159
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
lock xadd dword [rdi + 0xc], esi
cmp esi, 1
jne 0x14004b159
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [rbp + 0x30]
call fcn.140028ff0
jmp 0x14004b2e4
mov rcx, qword [r13]
lea rdx, [rbp + 0xc]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 8], eax
cmp eax, 0xffffffff
jne 0x14004b1c8
call fcn.14004ab40
test eax, eax
jns 0x14004b1c8
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rdi, qword [0x1401dd1a8]
test rdi, rdi
je 0x14004b1a9
lock inc dword [rdi + 8]
mov rdi, qword [0x1401dd1a8]
mov rbx, qword [0x1401dd1a0]
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
lea rdx, str.Failed_to_get_size
jmp 0x14004b2af
mov rcx, qword [rbp + 8]
mov qword [r13 + 0x18], rcx
test rcx, rcx
jne 0x14004b1da
mov rcx, rdi
jmp 0x14004b1ec
xor edx, edx
mov rax, rsi
div rcx
cmp rax, 1
jb 0x14004b272
call fcn.14012f120
mov qword [r13 + 0x10], rax
test rax, rax
je 0x14004b272
mov ebx, dword [r13 + 0x18]
lea r9, [rbp]
mov rcx, qword [r13]
mov r8d, ebx
mov rdx, rax
mov dword [rbp], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14004b22e
call fcn.14004ab40
test eax, eax
js 0x14004b233
mov al, 1
jmp 0x14004b2e6
cmp dword [rbp], ebx
je 0x14004b227
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rdi, qword [0x1401dd1a8]
test rdi, rdi
je 0x14004b256
lock inc dword [rdi + 8]
mov rdi, qword [0x1401dd1a8]
mov rbx, qword [0x1401dd1a0]
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
lea rdx, str.Failed_to_read_file_to_memory
jmp 0x14004b2af
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rdi, qword [0x1401dd1a8]
test rdi, rdi
je 0x14004b295
lock inc dword [rdi + 8]
mov rdi, qword [0x1401dd1a8]
mov rbx, qword [0x1401dd1a0]
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
lea rdx, str.Failed_to_allocate_memory
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rdi, rdi
je 0x14004b2e4
mov eax, esi
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x14004b2e4
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
lock xadd dword [rdi + 0xc], esi
cmp esi, 1
jne 0x14004b2e4
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor al, al
mov rcx, qword [rbp + 0xc8]
xor rcx, rsp
call fcn.140122510
mov rbx, qword [rsp + 0x220]
add rsp, 0x1d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret