Function at 0x405960
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43e020
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x44f6d0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
xor edi, edi
mov dword [esp + 0x20], edi
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
lea edx, [esp + 0x1c]
push edx
push 0x20019
mov dword [esp + 0x48], edi
mov eax, dword [eax]
mov ecx, dword [ebx]
push edi
push eax
push ecx
mov dword [esp + 0x30], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
jne 0x405c9f
mov eax, dword [esp + 0x1c]
push 0x400
mov dword [esp + 0x2c], eax
call fcn.00409be8
add esp, 4
mov esi, eax
mov dword [esp + 0x14], 0x400
call fcn.00409eaf
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4059f8
push 0x80004005
call fcn.00402420
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov byte [esp + 0x40], 1
call fcn.00409eaf
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405a27
push 0x80004005
call fcn.00402420
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x10]
mov eax, ebx
mov byte [esp + 0x40], 2
call fcn.00405cc0
test eax, eax
jne 0x405a69
mov byte [esp + 0x40], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x405c63
test esi, esi
je 0x405c4a
mov edx, dword [esp + 0x1c]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
push esi
push 0
push edx
mov dword [esp + 0x34], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
mov edi, 1
jne 0x405b30
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x405aa6
sub eax, edx
jne 0x405ad4
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [esp + 0x10]
push 0x444964
push ecx
push edx
push 0x444948
push 0x444958
lea eax, [esp + 0x2c]
push eax
jmp 0x405aef
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [esp + 0x10]
push esi
push edx
push eax
push 0x444948
push 0x444958
lea ecx, [esp + 0x2c]
push ecx
call fcn.00402620
mov ebx, dword [ebp + 8]
add esp, 0x18
lea eax, [esp + 0x18]
call fcn.00404a70
mov eax, dword [esp + 0x1c]
push 0
push 0
push 0
push 0
lea edx, [esp + 0x24]
push edx
push esi
push edi
push eax
mov dword [esp + 0x34], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
add edi, 1
test eax, eax
je 0x405aa1
cmp eax, 0x103
jne 0x405b3f
mov dword [esp + 0x20], 1
mov ebx, dword [ebp + 0x18]
mov ecx, dword [ebx]
test ecx, ecx
jne 0x405c3d
xor edi, edi
cmp dword [esp + 0x20], edi
je 0x405c3d
cmp dword [ebp + 0x14], edi
je 0x405c3d
lea ecx, [esp + 0x24]
call fcn.00402860
mov byte [esp + 0x40], 3
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
push esi
push edi
push ecx
mov dword [esp + 0x34], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
add edi, 1
test eax, eax
jne 0x405c25
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x10]
call fcn.00405cc0
test eax, eax
je 0x405be5
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [esp + 0x10]
push esi
push eax
push ecx
push 0x444950
lea edx, [esp + 0x28]
push 0x444958
push edx
call fcn.00402620
mov ebx, dword [ebp + 8]
add esp, 0x18
lea eax, [esp + 0x18]
call fcn.00404a70
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push esi
push ecx
lea edx, [esp + 0x2c]
push str._s_s
push edx
call fcn.00402620
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push ebx
push eax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x3c]
push ecx
push edx
push eax
call fcn.00405960
add esp, 0x24
test eax, eax
je 0x405c34
mov ecx, dword [ebx]
test ecx, ecx
je 0x405b73
jmp 0x405c34
cmp eax, 0x103
jne 0x405c34
mov dword [esp + 0x20], 1
lea ecx, [esp + 0x24]
call fcn.00402440
push esi
call fcn.00409bed
mov edi, dword [esp + 0x1c]
add esp, 4
mov byte [esp + 0x40], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405c6f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x40], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405c90
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x405c9f
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret