Function at 0x413d40
Capabilities:
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ce7aa
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x4ff0f4]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
push esi
push edi
mov eax, dword [0x4ff0f4]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x38], edx
lea edx, [esp + 0x10]
push edx
push 0x20019
xor ebx, ebx
push ebx
push ecx
push eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x414034
push ebx
push ebx
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x54], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x414029
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x414029
cmp dword [esp + 0x14], ebx
je 0x414029
mov dword [esp + 0x18], ebx
cmp eax, ebx
jbe 0x414029
lea edi, [ebx + 7]
lea esi, [ebx + 8]
mov eax, dword [esp + 0x14]
xor ecx, ecx
add eax, 2
push ebx
mov word [esp + 0x7c], cx
push eax
lea ecx, [esp + 0x7c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
call fcn.00419770
mov dword [esp + 0xa0], ebx
mov eax, dword [esp + 0x24]
shr eax, 1
add eax, 2
push ebx
xor edx, edx
push eax
lea ecx, [esp + 0x60]
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], dx
call fcn.00419770
mov byte [esp + 0xa0], 1
mov eax, dword [esp + 0x6c]
lea ecx, [eax + eax]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x20], ebx
cmp dword [esp + 0x70], esi
jae 0x413e88
lea ecx, [esp + 0x5c]
mov eax, dword [esp + 0x78]
cmp dword [esp + 0x8c], esi
jae 0x413e99
lea eax, [esp + 0x78]
lea edx, [esp + 0x28]
push edx
push ecx
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x1c]
push ebx
lea edx, [esp + 0x3c]
push edx
push eax
mov eax, dword [esp + 0x30]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x413fb7
mov ecx, dword [esp + 0x2c]
cmp ecx, ebx
je 0x413fb7
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x413ee5
cmp eax, edi
je 0x413ee5
cmp eax, 2
jne 0x413fb7
push ecx
lea ecx, [esp + 0x78]
call fcn.00417580
xor edx, edx
mov word [eax], dx
mov eax, dword [esp + 0x28]
shr eax, 1
push eax
lea ecx, [esp + 0x5c]
call fcn.00417580
lea edx, [esp + 0x3c]
xor ecx, ecx
push edx
mov word [eax], cx
call fcn.00410a20
mov byte [esp + 0xa0], 2
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
push ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0x40], eax
call fcn.004059e0
mov eax, dword [esp + 0x78]
cmp dword [esp + 0x8c], esi
jae 0x413f42
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x48]
call fcn.004059e0
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x70], esi
jae 0x413f5a
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x4c]
call fcn.004059e0
cmp dword [esp + 0x30], 0x80000001
mov byte [esp + 0x54], bl
lea ecx, [esp + 0x4c]
jne 0x413f7d
push str.User
jmp 0x413f82
push str.System
call fcn.004059e0
push str.Enabled
lea ecx, [esp + 0x54]
call fcn.004059e0
mov ebx, dword [esp + 0x38]
lea edx, [esp + 0x3c]
push edx
call fcn.004180a0
mov byte [esp + 0xa0], 1
lea eax, [esp + 0x3c]
push eax
call fcn.00414060
xor ebx, ebx
mov byte [esp + 0xa0], bl
cmp dword [esp + 0x70], esi
jb 0x413fd1
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.004a9741
add esp, 4
xor edx, edx
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov word [esp + 0x5c], dx
mov dword [esp + 0xa0], 0xffffffff
cmp dword [esp + 0x8c], esi
jb 0x414001
mov eax, dword [esp + 0x78]
push eax
call fcn.004a9741
add esp, 4
mov eax, dword [esp + 0x18]
inc eax
xor ecx, ecx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], cx
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x1c]
jb 0x413e0e
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.004a974c
mov esp, ebp
pop ebp
ret