Function at 0x180013df0
Capabilities:
Check os version

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x168
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov rax, qword [0x18009b4d0]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov r13d, r9d
mov r12d, r8d
mov rbp, rdx
mov rsi, rcx
mov r14, qword [rsp + 0x1d8]
mov qword [rsp + 0x30], rdx
lea r15, [0x18009db58]
mov qword [rsp + 0x90], r15
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test rsi, rsi
je 0x180013e65
lea rax, [rsi + 8]
mov qword [0x18009ca88], rax
jmp 0x180013e70
mov qword [0x18009ca88], 0
mov rbx, qword [0x18009dae8]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r9d, eax
mov r8, rbx
lea rdx, [0x180013470]
mov ecx, 5
call qword [sym.imp.USER32.dll_SetWindowsHookExA]
mov qword [0x18009ca80], rax
and byte [rsi + 0xf0], 0xf7
or byte [rsi + 0xf0], 1
mov rbx, qword [rsi + 8]
mov edi, dword [rsp + 0x1d0]
mov edx, edi
mov ecx, r13d
call fcn.18000d0c0
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rbx
mov r9d, edi
mov r8d, eax
mov edx, r12d
mov rcx, rbp
call qword [sym.imp.USER32.dll_TrackPopupMenuEx]
mov r12d, eax
and byte [rsi + 0xf0], 0xfe
mov rcx, qword [0x18009ca80]
call qword [sym.imp.USER32.dll_UnhookWindowsHookEx]
xor r13d, r13d
mov qword [0x18009ca80], r13
mov qword [0x18009ca88], r13
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [rsp + 0x98], r13b
mov rcx, qword [rsi + 8]
call qword [sym.imp.USER32.dll_UpdateWindow]
mov rbx, qword [rsi + 8]
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetParent]
test rax, rax
je 0x180013f41
mov rbx, rax
mov rcx, rax
call qword [sym.imp.USER32.dll_GetParent]
test rax, rax
jne 0x180013f30
mov rcx, rbx
call qword [sym.imp.USER32.dll_UpdateWindow]
test byte [rsi + 0xf0], 4
je 0x1800140f1
lea rbp, [rsi + 0x20]
nop dword [rax + rax]
mov edx, dword [rbp + 8]
dec edx
js 0x1800140f1
movsxd rcx, edx
mov rax, qword [rbp]
mov rsi, qword [rax + rcx*8]
mov rcx, rbp
call fcn.18000cff0
test eax, eax
je 0x1800140f1
test rsi, rsi
je 0x1800140f1
mov qword [rsp + 0x30], rsi
mov ebx, r13d
mov rcx, rsi
call qword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x180013f60
nop word [rax + rax]
xor edx, edx
lea r8d, [rdx + 0x50]
lea rcx, [rsp + 0x40]
call fcn.1800220a0
mov dword [rsp + 0x40], 0x50
xor edx, edx
mov r8d, 0x90
lea rcx, [rsp + 0xb4]
call fcn.1800220a0
mov dword [rsp + 0xb0], 0x94
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x180014015
mov eax, dword [rsp + 0xb4]
cmp eax, 5
jae 0x18001401d
cmp eax, 4
jne 0x180014015
cmp dword [rsp + 0xb8], 0x5a
jae 0x18001401d
mov dword [rsp + 0x40], 0x44
mov dword [rsp + 0x44], 0x32
lea r9, [rsp + 0x40]
mov r8d, 1
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.USER32.dll_GetMenuItemInfoA]
mov rdi, qword [rsp + 0x70]
test rdi, rdi
je 0x1800140d9
cmp dword [rdi], 0x1313
jne 0x1800140d9
mov dword [rsp + 0x44], 0x31
mov eax, dword [rdi + 0x10]
mov dword [rsp + 0x48], eax
mov eax, dword [rdi + 0x14]
mov dword [rsp + 0x4c], eax
mov rax, qword [rdi + 8]
mov qword [rsp + 0x78], rax
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [rsp + 0x80], eax
mov qword [rsp + 0x70], r13
lea r9, [rsp + 0x40]
mov r8d, 1
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetMenuItemInfoA]
mov r9d, dword [rsp + 0x50]
mov r8d, dword [rsp + 0x4c]
or r8d, dword [rsp + 0x48]
bts r8d, 0xa
mov rax, qword [rdi + 8]
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.USER32.dll_ModifyMenuA]
mov rcx, qword [rdi + 8]
call fcn.180022c2c
mov rcx, rdi
call fcn.180021c50
inc ebx
mov rcx, rsi
call qword [sym.imp.USER32.dll_GetMenuItemCount]
cmp ebx, eax
jl 0x180013fb0
jmp 0x180013f60
mov eax, r12d
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.180022070
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret