Function at 0x40333e
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x2dc
mov eax, 0x408995
call fcn.00408766
cmp dword [0x40d7f4], 0
jne 0x4035d6
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x2e0]
push eax
push 0x20019
xor ebx, ebx
push ebx
push 0x409e70
push reloc.AppVIsvSubsystems32.dll_Ordinal_1
mov dword [0x40d140], ebx
call edi
test eax, eax
jne 0x4033ea
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x2d4], 4
push eax
lea eax, [ebp - 0x2d8]
push eax
lea eax, [ebp - 0x2dc]
push eax
push ebx
push str.LastUILang
push dword [ebp - 0x2e0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x2e0]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4033ea
cmp dword [ebp - 0x2dc], 4
jne 0x4033ea
mov eax, dword [0x40d140]
cmp dword [ebp - 0x2d8], ebx
cmovne eax, dword [ebp - 0x2d8]
mov dword [0x40d140], eax
jmp 0x4033ef
mov eax, dword [0x40d140]
mov esi, dword [sym.imp.KERNEL32.dll_LocaleNameToLCID]
test eax, eax
jne 0x403494
lea eax, [ebp - 0x2d4]
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftOffice16.0CommonLanguageResources
push reloc.AppVIsvSubsystems32.dll_Ordinal_1
call edi
test eax, eax
jne 0x403448
lea eax, [ebp - 0x2d4]
mov ecx, str.UILanguageTag
push eax
push 0x55
lea edx, [ebp - 0xc0]
call fcn.004022e7
test al, al
je 0x403448
push ebx
lea eax, [ebp - 0xc0]
push eax
call esi
mov dword [0x40d140], eax
jmp 0x40344d
mov eax, dword [0x40d140]
test eax, eax
jne 0x403494
lea eax, [ebp - 0x2d4]
push eax
push 0x20019
push ebx
push 0x409cd8
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x403483
lea eax, [ebp - 0x2d4]
xor edx, edx
push eax
mov ecx, str.SKULanguage
call fcn.00402299
jmp 0x403485
mov eax, ebx
test eax, eax
mov ecx, 0x409
cmove eax, ecx
mov dword [0x40d140], eax
cmp eax, 0x404
jne 0x4034e4
lea eax, [ebp - 0x2d4]
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftOffice16.0CommonLanguageResources
push reloc.AppVIsvSubsystems32.dll_Ordinal_1
call edi
test eax, eax
jne 0x4034e4
lea eax, [ebp - 0x2d4]
mov ecx, str.UILanguageTag
push eax
push 0x55
lea edx, [ebp - 0xc0]
call fcn.004022e7
test al, al
je 0x4034e4
push ebx
lea eax, [ebp - 0xc0]
push eax
call esi
mov dword [0x40d140], eax
mov dword [ebp - 0x2d8], 0x40a344
sub esp, 0x14
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x2d8]
call fcn.00405db9
push ebx
mov ecx, str.msi.dll
mov dword [ebp - 0x2e4], 0x104
call fcn.00401916
mov esi, dword [ebp - 0x2d8]
mov ebx, eax
test ebx, ebx
jne 0x40352f
mov dword [0], 1
jmp 0x4035ce
push str.MsiProvideQualifiedComponentW
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.OneNote_
lea ecx, [ebp - 0x2dc]
mov dword [ebp - 0x2d4], eax
call fcn.00405eb9
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2dc]
mov eax, dword [esi - 4]
cdq
sub eax, edx
sar eax, 1
push eax
push esi
call fcn.00405cd3
mov edi, dword [ebp - 0x2dc]
lea eax, [ebp - 0x2e4]
push eax
lea eax, [ebp - 0x2d0]
push eax
push 0xfffffffffffffffe
push edi
push str.EEDBAC4F_D024_4FDD_B578_0D6CB152634C
call dword [ebp - 0x2d4]
test eax, eax
jne 0x4035a1
push eax
lea ecx, [ebp - 0x2d0]
call fcn.00401916
mov dword [0x40d7f4], eax
lea eax, [ebp - 0x2e4]
push eax
push 0x40d848
push 0xfffffffffffffffe
push str.onenote.exe
push str.5812C571_53F0_4467_BEFA_0A4F47A9437C
call dword [ebp - 0x2d4]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [edi - 0xc]
call fcn.00405a76
lea ecx, [esi - 0xc]
call fcn.00405a76
call fcn.00408727
ret