Function at 0x40e8f0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x43f6a0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x456ea4]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0041890e
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40e935
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esi + 0x16c]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], ebx
call fcn.00407040
mov eax, dword [esi + 0x68]
push eax
lea edx, [esp + 0x18]
push edx
call fcn.00404840
push eax
lea eax, [esp + 0x2c]
push 0x442694
push eax
mov byte [esp + 0x44], 1
call fcn.00406010
add esp, 0x14
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], 2
call fcn.00406540
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x30], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e9b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x30], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e9dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x18]
mov ecx, dword [edi - 8]
mov ebp, 1
mov eax, ebp
sub eax, dword [edi - 4]
or ecx, eax
jge 0x40ea00
push ebx
lea ecx, [esp + 0x1c]
call fcn.00407500
mov edi, dword [esp + 0x18]
mov edx, dword [esi + 0x168]
lea ecx, [esp + 0x1c]
push ecx
push 0x2001f
push ebx
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ebe6
call fcn.0041890e
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40ea3b
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
push ebx
lea edx, [esp + 0x2c]
push edx
push ebx
push 0x445a30
push eax
mov byte [esp + 0x48], 3
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40ebbb
push 0x4484d4
lea ecx, [esp + 0x18]
call fcn.00406a30
mov esi, dword [esp + 0x14]
mov eax, dword [esi - 8]
mov ecx, ebp
sub ecx, dword [esi - 4]
mov edi, 4
sub eax, edi
or eax, ecx
jge 0x40eaab
push edi
lea ecx, [esp + 0x18]
call fcn.00407500
mov esi, dword [esp + 0x14]
cmp dword [esi - 8], edi
jl 0x40eabc
mov dword [esi - 0xc], edi
mov word [esi + 8], bx
cmp dword [esi - 0xc], ebp
jg 0x40eac6
push 0x80070057
call fcn.00406210
cmp dword [esi - 4], ebp
mov edi, dword [esi - 0xc]
jle 0x40eade
mov ecx, edi
push ecx
lea ecx, [esp + 0x18]
call fcn.004076c0
mov esi, dword [esp + 0x14]
cmp edi, ebx
mov word [esi + 2], bx
jl 0x40eabc
cmp edi, dword [esi - 8]
jg 0x40eabc
mov dword [esi - 0xc], edi
mov word [esi + edi*2], bx
cmp dword [esi - 0xc], 2
jg 0x40eb02
push 0x80070057
call fcn.00406210
cmp dword [esi - 4], ebp
mov edi, dword [esi - 0xc]
jle 0x40eb1a
mov edx, edi
push edx
lea ecx, [esp + 0x18]
call fcn.004076c0
mov esi, dword [esp + 0x14]
cmp edi, ebx
mov word [esi + 4], bx
jl 0x40eabc
cmp edi, dword [esi - 8]
jg 0x40eabc
mov dword [esi - 0xc], edi
mov ebp, 3
mov word [esi + edi*2], bx
cmp dword [esi - 0xc], ebp
jg 0x40eb42
push 0x80070057
call fcn.00406210
cmp dword [esi - 4], 1
mov edi, dword [esi - 0xc]
jle 0x40eb5b
mov eax, edi
push eax
lea ecx, [esp + 0x18]
call fcn.004076c0
mov esi, dword [esp + 0x14]
cmp edi, ebx
mov word [esi + 6], bx
jl 0x40eabc
cmp edi, dword [esi - 8]
jg 0x40eabc
mov dword [esi - 0xc], edi
mov word [esi + edi*2], bx
mov dword [esp + 0x20], ebp
mov ecx, dword [esi - 8]
mov edi, dword [esi - 0xc]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x40eb9b
push ebx
lea ecx, [esp + 0x18]
call fcn.00407500
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
lea ecx, [edi + edi + 2]
push ecx
push esi
push edx
push ebx
push 0x445a30
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi - 0x10]
mov byte [esp + 0x30], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ebe6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ec0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret