Function at 0x40a8c0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov edx, dword [ebp + 8]
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
push ebx
mov bl, 1
push esi
push edi
test edx, edx
je 0x40a9ca
push dword [ebp + 0x10]
call fcn.0040ab70
test al, al
jne 0x40a9ca
cmp dword [ebp + 0x14], 0
je 0x40a9ca
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 8]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40a9de
push 0
push 0
lea ecx, [ebp - 4]
mov dword [ebp - 4], 0
push ecx
push 0
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov esi, eax
test esi, esi
je 0x40a9ca
xor ecx, ecx
lea ebx, [esi + 1]
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040b4cc
mov edi, eax
add esp, 4
test edi, edi
je 0x40a98a
push dword [ebp - 4]
mov edx, ebx
mov ecx, edi
call fcn.0040ed4d
test eax, eax
jns 0x40a98a
push edi
xor esi, esi
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
xor edi, edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x40a9ca
mov eax, dword [0x41172c]
mov ecx, dword [ebp + 0xc]
push edi
push ecx
mov ecx, dword [ebp + 0x10]
mov esi, dword [eax]
push ecx
push 0x16
push 0
mov esi, dword [esi + 4]
mov ecx, esi
push eax
call dword [0x412228]
call esi
add esp, 0x18
test edi, edi
je 0x40a9ca
push edi
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
xor bl, bl
xor edi, edi
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp - 0xc], 1
je 0x40aa19
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push 0x18
mov eax, dword [0x41172c]
push 0
push eax
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x412228]
call esi
mov eax, dword [ebp + 0x14]
add esp, 0x14
xor bl, bl
xor edi, edi
mov dword [eax], edi
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [ebp - 8]
test esi, esi
jne 0x40aa29
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push 0xe
jmp 0x40a9eb
shr esi, 1
xor ecx, ecx
mov edx, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040b4cc
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], edi
test edi, edi
je 0x40ab59
xor eax, eax
mov word [edi + esi*2], ax
lea eax, [ebp - 8]
push eax
push edi
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40ab2a
push 0
push 0
lea ecx, [ebp - 4]
mov dword [ebp - 4], 0
push ecx
push 0
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov esi, eax
test esi, esi
je 0x40ab22
xor ecx, ecx
lea ebx, [esi + 1]
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040b4cc
mov edi, eax
add esp, 4
test edi, edi
je 0x40aae2
push dword [ebp - 4]
mov edx, ebx
mov ecx, edi
call fcn.0040ed4d
test eax, eax
jns 0x40aae2
push edi
xor esi, esi
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
xor edi, edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x40ab22
mov eax, dword [0x41172c]
mov ecx, dword [ebp + 0xc]
push edi
push ecx
mov ecx, dword [ebp + 0x10]
mov esi, dword [eax]
push ecx
push 0x16
push 0
mov esi, dword [esi + 4]
mov ecx, esi
push eax
call dword [0x412228]
call esi
add esp, 0x18
test edi, edi
je 0x40ab22
push edi
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
push dword [ebp - 0x10]
jmp 0x40a9c1
xor eax, eax
cmp ax, word [edi]
jne 0x40a9ce
mov eax, dword [0x41172c]
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x10]
mov esi, dword [eax]
push ecx
push 0xe
push 0
mov esi, dword [esi + 4]
mov ecx, esi
push eax
call dword [0x412228]
call esi
add esp, 0x14
mov eax, dword [ebp + 0x14]
xor bl, bl
mov dword [eax], edi
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10