Function at 0x140105850
Capabilities:
Get file size

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rax, qword [0x1403bf028]
xor rax, rsp
mov qword [rbp - 8], rax
mov r15d, r8d
mov r14, rcx
movdqa xmm0, xmmword [0x140333fe0]
movdqu xmmword [rbp - 0x18], xmm0
xor edi, edi
mov word [rbp - 0x28], di
movzx r13d, r8w
mov dword [rbp - 0x40], edi
test rdx, rdx
jne 0x1401058b1
mov esi, 0x80004003
jmp 0x140105ac6
cmp r13d, 4
jae 0x140105ac1
mov eax, r15d
and eax, 0xffff0000
mov ecx, 0x7f0000
or eax, ecx
cmp eax, ecx
jne 0x140105ac1
mov eax, r15d
and eax, 0x10000
neg eax
sbb r9d, r9d
and r9d, 0x4000100
add r9d, 0x2000
mov ecx, r15d
shr ecx, 0x12
not ecx
and ecx, 1
mov eax, r15d
mov r8d, ecx
or r8d, 4
and eax, 0x200000
cmove r8d, ecx
mov eax, r15d
mov esi, r8d
or esi, 2
and eax, 0x400000
cmove esi, r8d
mov r12d, r9d
bts r12d, 0x1e
cmp r13d, 2
cmove r12d, r9d
lea rcx, [rbp - 0x28]
call fcn.14000b3a4
lea r10, [0x1402e3930]
mov eax, dword [r10 + r13*8 + 4]
lea rcx, [rbp - 0x28]
cmp qword [rbp - 0x10], 8
cmovae rcx, qword [rbp - 0x28]
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, esi
mov edx, dword [r10 + r13*8]
call fcn.14010bdf0
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1401059eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x1401059bf
test esi, esi
je 0x1401059bf
lea r10, [0x1402e3930]
mov eax, dword [r10 + r13*8 + 4]
lea rcx, [rbp - 0x28]
cmp qword [rbp - 0x10], 8
cmovae rcx, qword [rbp - 0x28]
or esi, 2
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, esi
mov edx, dword [r10 + r13*8]
call fcn.14010bdf0
mov rbx, rax
mov dword [rbp - 0x40], 1
cmp rbx, 0xffffffffffffffff
jne 0x1401059eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jne 0x140105a88
mov esi, 0x8000ffff
jmp 0x140105a88
lea rdx, [rbp - 0x38]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x140105a14
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jne 0x140105a78
mov rax, qword [rbp - 0x38]
test rax, rax
jns 0x140105a24
mov esi, 0x8000ffff
jmp 0x140105a78
mov esi, edi
test r13d, r13d
setne dil
mov dword [r14 + 0x30], edi
shr r12d, 0x1e
mov dword [r14 + 0x34], r12d
mov ecx, dword [rbp - 0x40]
mov dword [r14 + 0x38], ecx
mov qword [r14 + 0x70], rax
mov rax, qword [r14 + 0x28]
mov qword [r14 + 0x28], rbx
mov rbx, rax
bt r15d, 0x11
jb 0x140105a6a
xor r8d, r8d
xor edx, edx
lea rcx, [r14 + 0x40]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionEx]
mov byte [r14 + 0x68], 1
lea rcx, [r14 + 0x78]
lea rdx, [rbp - 0x28]
call fcn.14000b27c
nop
cmp rbx, 0xffffffffffffffff
je 0x140105a88
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rax, qword [rbp - 0x10]
cmp rax, 8
jb 0x140105ac6
mov rcx, qword [rbp - 0x28]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, 0x1000
jb 0x140105aba
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x140105aef
call fcn.140261814
jmp 0x140105ac6
mov esi, 0x80070057
mov eax, esi
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1402361b0
mov rbx, qword [rsp + 0xd8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140261a5c
nop
jmp 0x140105af8
nop
nop
nop
nop