Function at 0x40e820
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x457b9b
mov eax, dword fs:[0]
push eax
sub esp, 0x208
mov eax, dword [0x4740f4]
xor eax, esp
mov dword [esp + 0x204], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4740f4]
xor eax, esp
push eax
lea eax, [esp + 0x21c]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0041f601
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e877
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x1c], ebx
mov ecx, dword [esi + 0x20]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x1032
push ecx
mov dword [esp + 0x234], 0
call ebp
test eax, eax
jne 0x40e8cb
lea eax, [ebx - 0x10]
mov dword [esp + 0x224], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40eb6e
mov ecx, dword [esi + 0x20]
push 2
push 0xffffffffffffffff
push 0x100c
push ecx
call ebp
mov edx, dword [esi + 0x20]
inc eax
push 2
lea edi, [eax - 1]
push edi
push 0x100c
push edx
call ebp
mov eax, edi
imul eax, eax, 0x264
lea ecx, [eax + esi + 0x1ac64]
push ecx
push 0x24
push 0xea86
push 0xea85
call fcn.00410ad0
add esp, 0x10
cmp eax, 6
jne 0x40e8ab
imul edi, edi, 0x1ac
lea edi, [edi + esi + 0x68]
xor ebx, ebx
cmp edi, ebx
jne 0x40e929
xor eax, eax
jmp 0x40e939
mov eax, edi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e930
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x24]
call fcn.00402f40
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], ebx
je 0x40eb57
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionAppCompatFlagsLayers
push reloc.dxwnd.dll_Ordinal_1
mov dword [esp + 0x2c], ebx
call ebp
cmp eax, ebx
je 0x40e9a9
cmp eax, 2
je 0x40ea53
push eax
lea edx, [esp + 0x28]
push str.error__ld_in_RegOpenKeyEx_HKEY_CURRENT_USER
push edx
call fcn.00440071
add esp, 0xc
push ebx
push 0x45d7a0
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call fcn.00419ce4
jmp 0x40ea53
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push ebx
lea edx, [esp + 0x28]
push edx
push ebx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
je 0x40e9f5
cmp eax, 2
je 0x40e9f5
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
lea edx, [esp + 0x30]
push str.error__ld_in_RegQueryValue_hk_lx___s_
push edx
call fcn.00440071
add esp, 0x14
push ebx
push 0x45d7a0
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call fcn.00419ce4
cmp dword [esp + 0x18], ebx
jbe 0x40ea48
push ebx
push 0x45d7a0
push str.Found_compatibility_flag_in_HKEY_CURRENT_USER
mov ecx, esi
call fcn.00419ce4
mov ecx, dword [esp + 0x14]
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, ebx
je 0x40ea48
mov edx, dword [esp + 0x14]
push edi
push edx
push eax
lea eax, [esp + 0x30]
push str.error__ld_in_RegDeleteValue_hk_lx___s_
push eax
call fcn.00440071
add esp, 0x14
push ebx
push 0x45d7a0
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.00419ce4
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x14]
push eax
push 0xf003f
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionAppCompatFlagsLayers
push reloc.dxwnd.dll_Ordinal_2
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call ebp
cmp eax, ebx
je 0x40eaa9
cmp eax, 2
je 0x40eb53
push eax
lea ecx, [esp + 0x28]
push str.error__ld_in_RegOpenKeyEx_HKEY_LOCAL_MACHINE
push ecx
call fcn.00440071
add esp, 0xc
push ebx
push 0x45d7a0
lea edx, [esp + 0x2c]
push edx
mov ecx, esi
call fcn.00419ce4
jmp 0x40eb53
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push ebx
lea ecx, [esp + 0x28]
push ecx
push ebx
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
je 0x40eaf5
cmp eax, 2
je 0x40eaf5
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
lea edx, [esp + 0x30]
push str.error__ld_in_RegQueryValue_hk_lx___s_
push edx
call fcn.00440071
add esp, 0x14
push ebx
push 0x45d7a0
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call fcn.00419ce4
cmp dword [esp + 0x18], ebx
jbe 0x40eb48
push ebx
push 0x45d7a0
push str.Found_compatibility_flag_in_HKEY_LOCAL_MACHINE
mov ecx, esi
call fcn.00419ce4
mov ecx, dword [esp + 0x14]
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, ebx
je 0x40eb48
mov edx, dword [esp + 0x14]
push edi
push edx
push eax
lea eax, [esp + 0x30]
push str.error__ld_in_RegDeleteValue_hk_lx___s_
push eax
call fcn.00440071
add esp, 0x14
push ebx
push 0x45d7a0
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.00419ce4
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x224], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eb7a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x21c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x204]
xor ecx, esp
call fcn.0043fd57
add esp, 0x214
ret