Function at 0x40a0e0
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 0x40a1ea
push dword [ebp + 0x10]
call fcn.0040a390
test al, al
jne 0x40a1ea
cmp dword [ebp + 0x14], 0
je 0x40a1ea
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 0x40a1fe
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 0x40a1ea
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.0040acec
mov edi, eax
add esp, 4
test edi, edi
je 0x40a1aa
push dword [ebp - 4]
mov edx, ebx
mov ecx, edi
call fcn.0040e440
test eax, eax
jns 0x40a1aa
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 0x40a1ea
mov eax, dword [0x4116fc]
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 [0x412204]
call esi
add esp, 0x18
test edi, edi
je 0x40a1ea
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 0x40a239
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push 0x18
mov eax, dword [0x4116fc]
push 0
push eax
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x412204]
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 0x40a249
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push 0xe
jmp 0x40a20b
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.0040acec
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], edi
test edi, edi
je 0x40a379
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 0x40a34a
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 0x40a342
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.0040acec
mov edi, eax
add esp, 4
test edi, edi
je 0x40a302
push dword [ebp - 4]
mov edx, ebx
mov ecx, edi
call fcn.0040e440
test eax, eax
jns 0x40a302
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 0x40a342
mov eax, dword [0x4116fc]
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 [0x412204]
call esi
add esp, 0x18
test edi, edi
je 0x40a342
push edi
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
push dword [ebp - 0x10]
jmp 0x40a1e1
xor eax, eax
cmp ax, word [edi]
jne 0x40a1ee
mov eax, dword [0x4116fc]
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 [0x412204]
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