Function at 0x5f7b84
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, 4
push 0
push 0
dec ecx
jne 0x5f7b8c
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040507c
xor eax, eax
push ebp
push 0x5f7dde
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call fcn.00404ba0
lea eax, [ebp - 0xc]
call fcn.00404ba0
mov eax, 4
call fcn.00402b48
mov ebx, eax
mov eax, 4
call fcn.00402b48
mov esi, eax
mov dword [ebx], 1
mov edi, 0x80004005
mov eax, dword [0x6e3838]
cmp byte [eax], 1
jne 0x5f7c64
lea eax, [ebp - 0x18]
call fcn.00406cb4
push eax
mov eax, dword [0x6e4024]
push eax
push 3
push 0
mov eax, dword [0x6e59dc]
push eax
call sub.ole32.dll_CoCreateInstance
test eax, eax
jne 0x5f7c64
lea eax, [ebp - 0x1c]
push eax
push 1
push 0
lea edx, [ebp - 0x24]
mov eax, dword [ebp - 4]
call fcn.00409c98
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
call fcn.004054bc
mov eax, dword [ebp - 0x20]
call fcn.00405538
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [eax]
call dword [eax + 0xc]
mov edi, eax
test edi, edi
jne 0x5f7c5c
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x1c]
call fcn.00404dd8
mov eax, dword [ebp - 0x1c]
push eax
call sub.ole32.dll_CoTaskMemFree_1
lea eax, [ebp - 0x18]
call fcn.00406cb4
test edi, edi
je 0x5f7cee
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
mov eax, dword [ebp - 4]
call fcn.0040508c
push eax
push 0x80000000
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x5f7cee
lea eax, [ebp - 0xc]
mov edx, 0x400
call fcn.00405218
mov dword [esi], 0x400
push esi
lea eax, [ebp - 0xc]
call fcn.004050e4
push eax
push ebx
push 0
push 0x5f7dec
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0x5f7cdd
mov eax, dword [esi]
test eax, eax
jbe 0x5f7cd3
mov edx, eax
dec edx
lea eax, [ebp - 0xc]
call fcn.00405218
jmp 0x5f7ce5
lea eax, [ebp - 0xc]
call fcn.00404ba0
jmp 0x5f7ce5
lea eax, [ebp - 0xc]
call fcn.00404ba0
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
cmp dword [ebp - 0xc], 0
je 0x5f7d8b
lea eax, [ebp - 0x10]
mov ecx, 0x5f7df8
mov edx, dword [ebp - 0xc]
call fcn.00404ed8
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
mov eax, dword [ebp - 0x10]
call fcn.0040508c
push eax
push 0x80000000
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x5f7d8b
lea eax, [ebp - 0xc]
mov edx, 0x400
call fcn.00405218
mov dword [esi], 0x400
push esi
lea eax, [ebp - 0xc]
call fcn.004050e4
push eax
push ebx
push 0
push 0x5f7dec
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0x5f7d82
mov eax, dword [esi]
test eax, eax
jbe 0x5f7d6f
mov edx, eax
dec edx
lea eax, [ebp - 0xc]
call fcn.00405218
jmp 0x5f7d77
lea eax, [ebp - 0xc]
call fcn.00404ba0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
call fcn.00404bf4
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
mov edx, 4
mov eax, esi
call fcn.00402b78
mov edx, 4
mov eax, ebx
call fcn.00402b78
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5f7de5
lea eax, [ebp - 0x24]
call fcn.00404ba0
lea eax, [ebp - 0x20]
call fcn.004052d8
lea eax, [ebp - 0x18]
call fcn.00406cb4
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00404bc4
lea eax, [ebp - 4]
call fcn.00404ba0
ret