Function at 0x140024474
Capabilities:
Check os version
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x368]
sub rsp, 0x440
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14004e988]
xor rax, rsp
mov qword [rbp + 0x330], rax
mov r12, rcx
mov rdx, qword [rcx]
mov rax, qword [rcx + 8]
sub rax, rdx
sar rax, 3
xor ebx, ebx
test rax, rax
je 0x140024ecb
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov r15, rbx
mov qword [rbp - 0x78], rbx
mov r13d, ebx
mov rsi, qword [rbp - 0x80]
mov rdi, qword [rsp + 0x78]
test eax, eax
jle 0x140024704
mov qword [rbp - 0x60], rbx
mov rcx, rbx
mov qword [rsp + 0x58], rbx
mov qword [rbp - 0x70], rbx
mov r8, qword [rcx + rdx]
lea rdx, str.Package_for_KB_ls
lea rcx, [rbp - 0x70]
call fcn.140027478
mov r14d, eax
test eax, eax
js 0x1400246aa
mov rbx, qword [rbp - 0x70]
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.140013d48
mov r14, rax
cmp rax, rsi
jae 0x1400245c9
cmp rdi, rax
ja 0x1400245c9
sub r14, rdi
cmp rsi, r15
jne 0x1400245bf
mov rax, r15
sub rax, rsi
sar rax, 5
cmp rax, 1
jae 0x1400245bf
sub rsi, rdi
sar rsi, 5
movabs rcx, 0x7ffffffffffffff
mov rax, rcx
sub rax, rsi
cmp rax, 1
jb 0x14002469e
lea rdx, [rsi + 1]
sub r15, rdi
sar r15, 5
mov rax, r15
shr rax, 1
sub rcx, rax
add rax, r15
xor r8d, r8d
cmp rcx, r15
cmovae r8, rax
cmp r8, rdx
cmovae rdx, r8
lea rcx, [rsp + 0x78]
call fcn.14002523c
mov r15, qword [rbp - 0x78]
mov rsi, qword [rbp - 0x80]
mov rdi, qword [rsp + 0x78]
and r14, 0xffffffffffffffe0
lea r8, [rdi + r14]
jmp 0x140024641
cmp rsi, r15
jne 0x14002463e
mov rax, r15
sub rax, rsi
sar rax, 5
cmp rax, 1
jae 0x14002463e
sub rsi, rdi
sar rsi, 5
movabs rcx, 0x7ffffffffffffff
mov rax, rcx
sub rax, rsi
cmp rax, 1
jb 0x1400246a4
lea rdx, [rsi + 1]
sub r15, rdi
sar r15, 5
mov rax, r15
shr rax, 1
sub rcx, rax
add rax, r15
xor r8d, r8d
cmp rcx, r15
cmovae r8, rax
cmp r8, rdx
cmovae rdx, r8
lea rcx, [rsp + 0x78]
call fcn.14002523c
mov r15, qword [rbp - 0x78]
mov rsi, qword [rbp - 0x80]
mov rdi, qword [rsp + 0x78]
mov r8, r14
mov rdx, rsi
call fcn.1400253e4
add rsi, 0x20
mov qword [rbp - 0x80], rsi
cmp qword [rbp - 8], 8
jb 0x140024663
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop
test rbx, rbx
je 0x140024671
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
inc r13d
mov rcx, qword [rsp + 0x58]
add rcx, 8
mov qword [rsp + 0x58], rcx
mov rdx, qword [r12]
mov rax, qword [r12 + 8]
sub rax, rdx
sar rax, 3
cmp r13d, eax
jge 0x140024704
xor ebx, ebx
jmp 0x1400244ff
call fcn.14000ba64
int3
call fcn.14000ba64
nop
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x1400246ba
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop
test rdi, rdi
je 0x1400246fc
mov rbx, rdi
cmp rdi, rsi
je 0x1400246f3
xor eax, eax
cmp qword [rbx + 0x18], 8
jb 0x1400246db
mov rcx, qword [rbx]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
xor eax, eax
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rax
mov word [rbx], ax
add rbx, 0x20
cmp rbx, rsi
jne 0x1400246c9
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov eax, r14d
jmp 0x140024ecb
xor r12d, r12d
mov r14d, r12d
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x48], r12
mov qword [rbp - 0x40], r12
mov qword [rbp - 0x58], r12
lea rdx, [rbp - 0x58]
lea rcx, str.NIS_CbsAlternateRegKey
call fcn.140025c24
mov rbx, qword [rbp - 0x58]
test eax, eax
js 0x14002473a
test rbx, rbx
mov rdx, rbx
jne 0x140024741
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionComponent_Based_ServicingPackages
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x58], r12
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140024776
mov r14, qword [rsp + 0x58]
mov eax, r12d
mov qword [rbp - 0x50], r14
movzx r15d, ax
or r15d, 0x80070000
test eax, eax
cmovle r15d, eax
test r15d, r15d
jns 0x1400247ed
test rbx, rbx
je 0x14002479b
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
test r14, r14
je 0x1400247aa
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rdi, rdi
je 0x140024ec8
mov rbx, rdi
cmp rdi, rsi
je 0x140024ebf
cmp qword [rbx + 0x18], 8
jb 0x1400247cf
mov rcx, qword [rbx]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r12
mov word [rbx], r12w
add rbx, 0x20
cmp rbx, rsi
jne 0x1400247bf
jmp 0x140024ebf
xor edx, edx
mov r8d, VarUI4FromDisp
lea rcx, [rbp + 4]
call sub.msvcrt.dll_memset
mov dword [rbp], VarUI4FromDisp
lea rcx, [rbp]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x1400248f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx r15d, ax
or r15d, 0x80070000
test eax, eax
cmovle r15d, eax
test byte [0x14004d6dc], 1
je 0x140024896
mov dword [rsp + 0x60], r15d
lea rdx, [0x140036d0c]
or r13, 0xffffffffffffffff
inc r13
cmp byte [rdx + r13], r12b
jne 0x140024847
inc r13
mov ecx, 0xa
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], 4
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rdx
movzx r9d, cx
lea r8, [0x14003b248]
lea edx, [rcx + 0x21]
mov rcx, qword [0x14004d6d0]
call qword [sym.imp.ADVAPI32.dll_TraceMessage]
nop
test rbx, rbx
je 0x1400248a5
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
test r14, r14
je 0x1400248b4
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rdi, rdi
je 0x140024ec8
mov rbx, rdi
cmp rdi, rsi
je 0x140024ebf
cmp qword [rbx + 0x18], 8
jb 0x1400248d9
mov rcx, qword [rbx]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r12
mov word [rbx], r12w
add rbx, 0x20
cmp rbx, rsi
jne 0x1400248c9
jmp 0x140024ebf
cmp dword [rbp + 4], 6
ja 0x14002490c
jne 0x140024905
cmp dword [rbp + 8], r12d
ja 0x14002490c
mov byte [rsp + 0x50], r12b
jmp 0x140024911
mov byte [rsp + 0x50], 1
mov r15, rsi
sub r15, rdi
sar r15, 5
xor edx, edx
test r15, r15
je 0x140024e7e
or r13, 0xffffffffffffffff
mov dword [rsp + 0x6c], 0x104
lea rax, [rbp - 0x30]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x6c]
lea r8, [rbp + 0x120]
mov edx, r12d
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
movzx ecx, ax
or ecx, 0x80070000
xor edx, edx
test eax, eax
cmovle ecx, eax
inc r12d
mov dword [rsp + 0x60], r12d
test ecx, ecx
js 0x140024e7e
cmp dword [rsp + 0x6c], 0x104
ja 0x140024e7e
mov eax, dword [rsp + 0x6c]
add rax, rax
cmp rax, 0x20a
jae 0x140024e78
mov word [rbp + rax + 0x120], dx
mov dword [rsp + 0x74], edx
test r15d, r15d
jle 0x140024c6c
mov r12, rdi
cmp qword [r12 + 0x18], 8
jb 0x1400249c9
mov rax, qword [r12]
jmp 0x1400249cc
mov rax, r12
mov r8, r13
inc r8
cmp word [rax + r8*2], dx
jne 0x1400249cf
lea rcx, [rbp + 0x120]
mov rax, r13
inc rax
cmp word [rcx + rax*2], dx
jne 0x1400249e3
cmp rax, r8
jb 0x140024a15
cmp qword [r12 + 0x18], 8
jb 0x1400249ff
mov rdx, qword [r12]
jmp 0x140024a02
mov rdx, r12
lea rcx, [rbp + 0x120]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
xor edx, edx
test eax, eax
je 0x140024a2e
mov eax, dword [rsp + 0x74]
inc eax
mov dword [rsp + 0x74], eax
add r12, 0x20
cmp eax, r15d
jge 0x140024c67
jmp 0x1400249bb
mov r15, rdx
mov qword [rbp - 0x20], rdx
mov qword [rbp - 0x18], rdx
mov qword [rbp - 0x10], rdx
mov qword [rsp + 0x58], rdx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp + 0x120]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor ecx, ecx
test eax, eax
jne 0x140024a76
mov eax, ecx
mov r15, qword [rsp + 0x58]
mov qword [rbp - 0x20], r15
movzx r12d, ax
or r12d, 0x80070000
test eax, eax
cmovle r12d, eax
test r12d, r12d
js 0x140024e03
mov dword [rsp + 0x70], ecx
mov dword [rsp + 0x68], 4
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x68]
xor r8d, r8d
lea rdx, str.CurrentState
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor r9d, r9d
test eax, eax
jne 0x140024adb
mov eax, dword [rbp - 0x68]
sub eax, 4
neg eax
sbb eax, eax
and eax, 0xd
movzx r12d, ax
or r12d, 0x80070000
test eax, eax
cmovle r12d, eax
test r12d, r12d
js 0x140024d8d
mov r8b, byte [rsp + 0x50]
mov edx, dword [rsp + 0x70]
test r8b, r8b
je 0x140024b12
lea eax, [rdx - 0x50]
test eax, 0xffffffdf
jne 0x140024b20
jmp 0x140024c31
lea eax, [rdx - 5]
test eax, 0xfffffffd
je 0x140024c31
mov ecx, r9d
cmp edx, 0x60
sete cl
mov eax, r9d
cmp edx, 6
sete al
test r8b, r8b
cmovne eax, ecx
test eax, eax
je 0x140024c84
xor eax, eax
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x68], 4
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x64]
xor r8d, r8d
lea rdx, str.InstallTimeHigh
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140024b8b
mov eax, dword [rbp - 0x64]
sub eax, 4
neg eax
sbb eax, eax
and eax, 0xd
movzx r12d, ax
or r12d, 0x80070000
test eax, eax
cmovle r12d, eax
test r12d, r12d
js 0x140024d1a
mov dword [rsp + 0x68], 4
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x70]
xor r8d, r8d
lea rdx, str.InstallTimeLow
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140024be9
mov eax, dword [rbp - 0x70]
sub eax, 4
neg eax
sbb eax, eax
and eax, 0xd
movzx r12d, ax
or r12d, 0x80070000
test eax, eax
cmovle r12d, eax
test r12d, r12d
js 0x140024cd4
xor eax, eax
mov qword [rbp - 0x60], rax
lea rcx, [rbp - 0x60]
int3
movsxd r8, dword [rsp + 0x74]
shl r8, 5
add r8, rdi
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.140024f98
nop
xor edx, edx
test r15, r15
je 0x140024c5e
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edx, edx
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rbp - 0x80]
mov r12d, dword [rsp + 0x60]
mov r15, rsi
sub r15, rdi
sar r15, 5
test r15, r15
je 0x140024e7e
jmp 0x14002492a
test r15, r15
je 0x140024c93
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rbx, rbx
je 0x140024ca2
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
test r14, r14
je 0x140024cb1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rdi, rdi
je 0x140024cca
mov r8, rsi
mov rdx, rdi
call fcn.1400251e8
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov eax, 1
jmp 0x140024ecb
test r15, r15
je 0x140024ce3
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rbx, rbx
je 0x140024cf2
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
test r14, r14
je 0x140024d01
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rdi, rdi
je 0x140024e73
mov r8, rsi
mov rdx, rdi
call fcn.1400251e8
jmp 0x140024e6a
xor r13d, r13d
test r15, r15
je 0x140024d2c
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rbx, rbx
je 0x140024d3b
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
test r14, r14
je 0x140024d4a
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rdi, rdi
je 0x140024e73
mov rbx, rdi
cmp rdi, rsi
je 0x140024e6a
cmp qword [rbx + 0x18], 8
jb 0x140024d6f
mov rcx, qword [rbx]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r13
mov word [rbx], r13w
add rbx, 0x20
cmp rbx, rsi
jne 0x140024d5f
jmp 0x140024e6a
test r15, r15
je 0x140024d9e
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor r9d, r9d
test rbx, rbx
je 0x140024daf
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
xor r9d, r9d
test r14, r14
je 0x140024dc0
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor r9d, r9d
test rdi, rdi
je 0x140024e73
mov rbx, rdi
cmp rdi, rsi
je 0x140024e6a
cmp qword [rbx + 0x18], 8
jb 0x140024de8
mov rcx, qword [rbx]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
xor r9d, r9d
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r9
mov word [rbx], r9w
add rbx, 0x20
cmp rbx, rsi
jne 0x140024dd5
jmp 0x140024e6a
test r15, r15
je 0x140024e13
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ecx, ecx
test rbx, rbx
je 0x140024e23
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
xor ecx, ecx
test r14, r14
je 0x140024e33
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ecx, ecx
test rdi, rdi
je 0x140024e73
mov rbx, rdi
cmp rdi, rsi
je 0x140024e6a
cmp qword [rbx + 0x18], 8
jb 0x140024e52
mov rcx, qword [rbx]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
xor ecx, ecx
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rcx
mov word [rbx], cx
add rbx, 0x20
cmp rbx, rsi
jne 0x140024e40
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov eax, r12d
jmp 0x140024ecb
int3
mov rax, rsi
sub rax, rdi
test rax, 0xffffffffffffffe0
mov r15d, edx
setne r15b
test rbx, rbx
je 0x140024ea0
mov rcx, rbx
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
test r14, r14
je 0x140024eaf
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test rdi, rdi
je 0x140024ec8
mov r8, rsi
mov rdx, rdi
call fcn.1400251e8
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov eax, r15d
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.14002b7b0
lea r11, [rsp + 0x440]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret