Function at 0x140040bb8
Capabilities:
Encode data using xor
Get disk size

Disassembly:
mov rax, rsp
push rbp
push rdi
push r15
lea rbp, [rax - 0x7a8]
sub rsp, 0x890
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1401a0e90]
xor rax, rsp
mov qword [rbp + 0x780], rax
mov rbx, rcx
mov qword [rsp + 0x70], rcx
xor esi, esi
mov dword [rsp + 0x34], esi
mov ecx, dword [0x1401a8d80]
imul ecx, ecx
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
cmp ecx, 5
jne 0x140040c37
call fcn.1400bd978
mov ecx, dword [0x1401a8d80]
cmp ecx, eax
jne 0x140040c37
dec ecx
mov dword [0x1401a8d80], ecx
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x40], esi
mov qword [rsp + 0x48], rsi
mov r9d, 1
lea r8, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov rdi, 0xffffffff80000002
mov rdx, rdi
lea rcx, [rsp + 0x38]
call fcn.14001878c
test eax, eax
je 0x140040d26
mov r9d, 1
lea r8, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov rdx, rdi
lea rcx, [rsp + 0x38]
call fcn.14001878c
mov edi, eax
mov r9d, dword [0x1401a8d80]
lea r8d, [r9 + 1]
imul r8d, r9d
mov eax, 0x30c30c31
imul r8d
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul edx, edx, 0x15
sub r8d, edx
cmp r8d, 0xa
jne 0x140040cd3
mov qword [rsp + 0x20], rsi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov r9d, dword [0x1401a8d80]
test edi, edi
je 0x140040cf3
lea rdx, [0x14013bf20]
mov rcx, rbx
call fcn.140001f2c
mov dword [rsp + 0x34], 1
jmp 0x140040f81
imul r9d, r9d
mov eax, 0x2e8ba2e9
imul r9d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x16
sub r9d, edx
cmp r9d, 0x12
jne 0x140040d26
lea ecx, [r9 - 0xe]
call fcn.1400bd778
mov ecx, dword [0x1401a8d80]
mov dword [rax], ecx
mov word [rbp - 0x80], si
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x7e]
call fcn.1400c2400
mov dword [rsp + 0x30], 0x400
lea rdx, [0x14013bf20]
lea rcx, [rsp + 0x50]
call fcn.140001f2c
nop
lea r9, [rsp + 0x30]
lea r8, [rbp - 0x80]
lea rdx, str.CurrentVersion
lea rcx, [rsp + 0x38]
call fcn.14001886c
mov edi, eax
call fcn.14003dba0
test al, al
jne 0x140040dbc
mov r8d, esi
mov r9d, dword [0x1401a8d80]
mov edx, r8d
mov r10d, 8
mov ecx, edx
and ecx, 1
dec ecx
not ecx
and ecx, r9d
mov eax, edx
sar eax, 1
mov edx, ecx
xor edx, eax
dec r10
jne 0x140040d8d
add r9d, edx
inc r8d
cmp r8d, 0x100
jl 0x140040d84
mov dword [0x1401a8d80], r9d
or r15, 0xffffffffffffffff
test edi, edi
jne 0x140040f31
lea rcx, [rbp - 0x80]
mov rax, r15
inc rax
cmp word [rcx + rax*2], si
jne 0x140040dcf
mov r8d, eax
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x50]
call fcn.1400020f0
mov dword [rsp + 0x30], 0x400
mov ecx, dword [0x1401a8d80]
imul ecx, ecx
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*8]
sub ecx, eax
cmp ecx, 8
jne 0x140040e3b
mov eax, 0xd6
lea r8d, [rcx + 0x68]
test r8d, r8d
je 0x140040e32
mov ecx, r8d
cdq
idiv r8d
mov r8d, edx
mov eax, ecx
test ecx, ecx
jne 0x140040e1d
add eax, r8d
mov dword [0x1401a8d80], eax
lea rdx, [0x14013c450]
lea rcx, [rsp + 0x58]
call fcn.140001f2c
nop
lea r9, [rsp + 0x30]
lea r8, [rbp - 0x80]
lea rdx, str.CurrentBuild
lea rcx, [rsp + 0x38]
call fcn.14001886c
mov r10d, eax
mov r9d, dword [0x1401a8d80]
mov r8d, r9d
imul r8d, r9d
mov eax, 0x2e8ba2e9
imul r8d
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul edx, edx, 0xb
sub r8d, edx
cmp r8d, 8
jne 0x140040e9f
dec r9d
mov dword [0x1401a8d80], r9d
test r10d, r10d
jne 0x140040f10
lea rcx, [rbp - 0x80]
mov rax, r15
inc rax
cmp word [rcx + rax*2], si
jne 0x140040eab
mov r8d, eax
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x58]
call fcn.1400020f0
lea r8, [rsp + 0x58]
lea rdx, [0x1401373c8]
lea rcx, [rsp + 0x60]
call fcn.140017ca4
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x50]
call fcn.14000e294
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x140040f10
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x140040f31
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140040f46
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x40], esi
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.140002bac
mov dword [rsp + 0x34], 1
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x140040f81
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140040f96
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], rsi
mov rax, rbx
mov dword [rsp + 0x40], esi
mov rcx, qword [rbp + 0x780]
xor rcx, rsp
call fcn.1400bcfc0
lea r11, [rsp + 0x890]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop rdi
pop rbp
ret