Function at 0x140029090
Capabilities:
Get disk size
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb0
mov qword [rbp + 0x1f], 0xfffffffffffffffe
mov qword [rsp + 0xf8], rbx
mov r15, rdx
mov r14, rcx
xor r12d, r12d
mov dword [rbp - 0x49], r12d
lea rcx, [0x1401bb9a8]
mov rax, qword [0x1401bb9a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [r14], rax
mov r8d, 1
mov dword [rbp - 0x49], r8d
mov rax, qword [r15]
lea esi, [r12 + 3]
cmp dword [rax - 0x10], r12d
je 0x140029168
movzx eax, word [rax]
cmp ax, word [0x14014c7f8]
jne 0x14002910a
mov eax, r12d
jmp 0x14002910f
sbb eax, eax
or eax, r8d
test eax, eax
je 0x140029168
lea rcx, [rbp - 9]
call fcn.140027830
nop
mov r8d, esi
mov dword [rbp - 0x49], esi
mov rdx, qword [rax]
mov eax, r12d
test rdx, rdx
setne al
test eax, eax
jne 0x14002913e
mov ecx, 0x80004005
call fcn.140001920
int3
mov rax, qword [r15]
sub rdx, rax
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x14002915b
add rax, 2
test cx, cx
jne 0x140029144
mov eax, r12d
jmp 0x140029160
sbb eax, eax
or eax, 1
test eax, eax
je 0x140029168
xor bl, bl
jmp 0x14002916a
mov bl, 1
or rdi, 0xffffffffffffffff
test r8b, 2
je 0x140029193
and r8d, 0xfffffffd
mov dword [rbp - 0x49], r8d
mov rdx, qword [rbp - 9]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], edi
jg 0x140029193
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test bl, bl
je 0x140029215
lea rcx, [rbp + 7]
call fcn.140027830
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
mov rbx, qword [r14]
sub rbx, 0x18
cmp rcx, rbx
je 0x1400291f4
cmp dword [rbx + 0x10], 0
jl 0x1400291e7
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x1400291e7
call fcn.140002410
mov rsi, rax
lock add dword [rbx + 0x10], 0xffffffff
jg 0x1400291de
mov rcx, qword [rbx]
mov r8, qword [rcx]
mov rdx, rbx
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rsi + 0x18]
mov qword [r14], rax
jmp 0x1400291f4
mov r8d, dword [rdx - 0x10]
mov rcx, r14
call fcn.1400022c0
nop
mov rdx, qword [rbp + 7]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140029666
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140029666
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x1400292a6
lea rcx, [rbp - 0x11]
call fcn.140027830
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
mov rbx, qword [r14]
sub rbx, 0x18
cmp rcx, rbx
je 0x14002929d
cmp dword [rbx + 0x10], 0
jl 0x140029290
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140029290
call fcn.140002410
mov rsi, rax
lock add dword [rbx + 0x10], r13d
jg 0x140029287
mov rcx, qword [rbx]
mov r8, qword [rcx]
mov rdx, rbx
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rsi + 0x18]
mov qword [r14], rax
jmp 0x14002929d
mov r8d, dword [rdx - 0x10]
mov rcx, r14
call fcn.1400022c0
nop
mov rdx, qword [rbp - 0x11]
jmp 0x1400291f8
xor eax, eax
mov qword [rbp + 0x7f], rax
lea rdx, [rbp + 0x7f]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1400292f4
lea rcx, [rbp - 0x21]
call fcn.140027830
nop
mov rdx, rax
mov rcx, r14
call fcn.140002230
nop
mov rdx, qword [rbp - 0x21]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x14002965d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14002965d
cmp dword [rbp + 0x83], 0
je 0x140029319
lea rcx, [rbp - 1]
call fcn.140027830
nop
mov rdx, rax
mov rcx, r14
call fcn.140002230
nop
mov rdx, qword [rbp - 1]
jmp 0x1400292d7
cmp dword [rbp + 0x7f], 0
je 0x14002965d
mov qword [rbp - 0x41], r12
mov qword [rbp - 0x39], r12
mov qword [rbp - 0x31], r12
mov edx, dword [rbp + 0x7f]
lea rcx, [rbp - 0x41]
call fcn.140029990
mov dword [rbp + 0x77], r12d
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x77]
mov r8d, dword [rbp + 0x7f]
mov rbx, qword [rbp - 0x41]
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140029382
test rbx, rbx
je 0x14002965d
mov rcx, rbx
call fcn.1400cdaa0
mov qword [rbp - 0x41], r12
mov qword [rbp - 0x39], r12
mov qword [rbp - 0x31], r12
jmp 0x14002965d
xor r15b, r15b
xor r12b, r12b
movzx eax, byte [rbx]
cmp al, 0xff
jne 0x14002939f
cmp byte [rbx + 1], 0xfe
jne 0x14002939f
mov r15b, 1
mov esi, 2
jmp 0x1400293d3
cmp al, 0xfe
jne 0x1400293b7
cmp byte [rbx + 1], 0xff
jne 0x1400293b7
mov r15b, 1
movzx r12d, r15b
mov esi, 2
jmp 0x1400293d3
cmp al, 0xef
jne 0x1400294a7
cmp byte [rbx + 1], 0xbb
jne 0x1400294a7
cmp byte [rbx + 2], 0xbf
jne 0x1400294a7
movsxd rdx, esi
add rdx, rbx
mov rsi, qword [rbp - 0x39]
cmp rdx, rsi
jne 0x1400293eb
mov rsi, rbx
mov qword [rbp - 0x39], rbx
jmp 0x140029405
cmp rbx, rdx
je 0x140029405
sub rsi, rdx
mov r8, rsi
mov rcx, rbx
call fcn.1400cdaf0
add rsi, rbx
mov qword [rbp - 0x39], rsi
test r12b, r12b
je 0x1400294ab
mov rcx, rbx
cmp rbx, rsi
je 0x140029437
nop word [rax + rax]
movzx r8d, byte [rcx + 1]
movzx edx, byte [rcx]
mov byte [rcx + 1], dl
mov byte [rcx], r8b
add rcx, 2
cmp rcx, rsi
jne 0x140029420
mov r9d, dword [0x1401c3d80]
mov ecx, r9d
imul ecx, r9d
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub ecx, eax
cmp ecx, 7
jne 0x1400294b2
mov rax, qword [str.R634kGkr7Oa]
mov qword [rbp + 0xf], rax
mov eax, dword [0x14014fd18]
mov dword [rbp + 0x17], eax
lea rax, [rbp + 0xf]
mov rcx, rdi
nop
inc rcx
cmp byte [rax + rcx], 0
jne 0x140029480
mov eax, 4
mul rcx
cmovo rax, rdi
mov rcx, rax
call fcn.1400cd108
mov rcx, rax
call fcn.1400cebfc
jmp 0x1400294ab
mov rsi, qword [rbp - 0x39]
mov r9d, dword [0x1401c3d80]
sub rsi, rbx
cmp byte [rbx + rsi - 1], 0
je 0x14002958c
lea r8d, [r9 + 2]
lea eax, [r9 + 1]
imul r8d, eax
imul r8d, r9d
mov eax, 0x2aaaaaab
imul r8d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 3
sub r8d, eax
cmp r8d, 2
jne 0x140029512
lea ecx, [r8 + 2]
call fcn.1400ce278
mov rbx, rax
call fcn.1400ce478
mov dword [rbx], eax
mov dword [0x1401c3d80], eax
mov rcx, rbx
call fcn.1400cdaa0
lea rdx, [rsi + 1]
lea rcx, [rbp - 0x41]
call fcn.140029990
mov rbx, qword [rbp - 0x41]
mov byte [rbx + rsi], 0
test r15b, r15b
je 0x140029542
lea rdx, [rsi + 2]
lea rcx, [rbp - 0x41]
call fcn.140029990
mov rbx, qword [rbp - 0x41]
mov byte [rbx + rsi + 1], 0
mov ecx, dword [0x1401c3d80]
lea r8d, [rcx + 1]
imul r8d, ecx
mov eax, 0x66666667
imul r8d
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub r8d, eax
cmp r8d, 0x13
jne 0x1400295a8
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
jmp 0x1400295a8
test r15b, r15b
je 0x1400295e0
lea rdx, [rsi + 2]
lea rcx, [rbp - 0x41]
call fcn.140029990
mov rbx, qword [rbp - 0x41]
mov word [rbx + rsi], 0
test r15b, r15b
je 0x1400295e0
mov rdx, rbx
lea rcx, [rbp - 0x19]
call fcn.140002110
nop
mov rdx, rax
mov rcx, r14
call fcn.140002230
nop
mov rdx, qword [rbp - 0x19]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140029637
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140029637
lea rcx, [0x1401bb9a8]
mov rax, qword [0x1401bb9a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x29], rax
mov rdx, rbx
lea rcx, [rbp - 0x29]
call fcn.140003290
nop
lea rdx, [rbp - 0x29]
mov rcx, r14
call fcn.140002230
nop
mov rdx, qword [rbp - 0x29]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x14002962b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, r14
mov rcx, r14
call fcn.140026c10
nop
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x14002965d
call fcn.1400cdaa0
mov qword [rbp - 0x41], 0
mov qword [rbp - 0x39], 0
mov qword [rbp - 0x31], 0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
mov rbx, qword [rsp + 0xf8]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret