Function at 0x40f830
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x447c40
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4650f0]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0x40]
test eax, eax
mov edi, dword [esp + 0x3c]
mov ebx, 1
mov dword [esp + 0x24], ebx
jle 0x40f91c
cmp eax, 2
jle 0x40f90c
cmp eax, 3
jne 0x40f91c
push ebx
push edi
sub esp, 8
lea eax, [esp + 0x44]
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
call fcn.00401050
sub esp, 8
lea edx, [esp + 0x44]
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
mov byte [esp + 0x40], 2
call fcn.00401050
mov eax, dword [esi]
add eax, 0x10
mov eax, dword [eax]
mov ecx, esi
mov byte [esp + 0x3c], bl
call eax
test eax, eax
je 0x40fa03
push 2
push edi
sub esp, 8
lea edx, [esp + 0x44]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00401050
sub esp, 8
lea eax, [esp + 0x44]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x40], 3
call fcn.00401050
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
add eax, 0x10
mov ecx, esi
mov byte [esp + 0x3c], bl
call edx
mov esi, eax
jmp 0x40fa57
push eax
call fcn.0040ed80
add esp, 4
mov esi, eax
jmp 0x40fa07
cmp dword [0x466c08], 0
jne 0x40f937
mov dword [0x466c08], ebx
call fcn.0041bd80
mov dword [0x466c04], eax
jmp 0x40f93c
mov eax, dword [0x466c04]
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x20219
mov esi, eax
mov eax, dword [esp + 0x30]
cmp dword [eax - 4], ebx
mov dword [esp + 0x14], 0x2bc
jle 0x40f96e
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x34]
call fcn.00401df0
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push ecx
push esi
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40fa0f
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x3c], 4
cmp dword [eax - 4], ebx
jle 0x40f9b0
mov edx, dword [eax - 0xc]
push edx
lea ecx, [esp + 0x3c]
call fcn.00401df0
mov eax, dword [esp + 0x38]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 0x40]
push ecx
push 0
lea edx, [esp + 0x44]
push edx
push 0
push eax
mov eax, dword [esp + 0x24]
push eax
call esi
test eax, eax
jne 0x40fa48
cmp dword [esp + 0x3c], 4
jne 0x40fa48
cmp dword [esp + 0x40], 4
jne 0x40fa48
lea ecx, [esp + 0x40]
push ecx
push edi
lea edx, [esp + 0x44]
push edx
push eax
lea ecx, [esp + 0x44]
call fcn.0040ef00
push eax
mov eax, dword [esp + 0x24]
push eax
call esi
test eax, eax
jne 0x40fa48
xor esi, esi
jmp 0x40fa4c
mov esi, dword [esp + 0x40]
test esi, esi
jne 0x40f94c
lea ecx, [esp + 0x2c]
mov byte [esp + 0x24], 0
call fcn.00411520
lea ecx, [esp + 0x34]
mov dword [esp + 0x24], 0xffffffff
call fcn.00411520
mov eax, 0x2bc
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x18
ret 0x18
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x24], 0
call fcn.00411520
lea ecx, [esp + 0x34]
mov dword [esp + 0x24], 0xffffffff
call fcn.00411520
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x18
ret 0x18