Function at 0xa21540
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0xa8b69b
push eax
mov al, byte [0xaf474d]
mov dword fs:[0], esp
sub esp, 0x210
test al, al
push ebx
push ebp
push esi
push edi
je 0xa21593
mov eax, dword [esp + 0x23c]
mov ecx, dword [esp + 0x238]
mov edx, dword [esp + 0x234]
push eax
mov eax, dword [esp + 0x234]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
jmp 0xa2177c
mov ebx, dword [esp + 0x23c]
test ebx, ebx
jne 0xa215a8
mov eax, 0x57
jmp 0xa2177c
mov eax, dword [ebx]
mov esi, dword [esp + 0x234]
cdq
sub eax, edx
sar eax, 1
test esi, esi
mov dword [esp + 0x10], eax
jne 0xa215c7
mov dword [esp + 0x118], esi
jmp 0xa21644
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [esp + 0x18], eax
call fcn.00a7e07a
mov ebp, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
add esp, 4
cmp edi, 0xff
jg 0xa21612
push 0
push 0
lea ecx, [esp + 0x20]
push 0x100
push ecx
push 0xffffffffffffffff
push esi
push 0
push 0
call ebp
test eax, eax
je 0xa21612
lea edx, [esp + 0x18]
mov dword [esp + 0x118], edx
jmp 0xa21635
lea edi, [edi + edi*2 + 3]
push edi
call fcn.00a1fcf0
add esp, 4
mov dword [esp + 0x118], eax
push 0
push 0
push edi
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call ebp
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x238]
mov dword [esp + 0x228], 0
test ecx, ecx
jne 0xa216a9
mov ecx, dword [esp + 0x118]
mov edx, dword [esp + 0x230]
push ebx
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov esi, eax
mov eax, dword [ebx]
shl eax, 1
mov dword [ebx], eax
mov eax, dword [esp + 0x118]
test eax, eax
mov dword [esp + 0x228], 0xffffffff
je 0xa216a2
lea ecx, [esp + 0x18]
cmp eax, ecx
je 0xa216a2
push eax
call fcn.00a1fd20
add esp, 4
mov eax, esi
jmp 0xa2177c
cmp eax, 0x100
jae 0xa216b9
lea eax, [esp + 0x11c]
jmp 0xa216ca
test eax, eax
je 0xa216c8
push eax
call fcn.00a1fcf0
add esp, 4
jmp 0xa216ca
xor eax, eax
mov ecx, dword [esp + 0x230]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x220], eax
mov esi, eax
push eax
mov eax, dword [esp + 0x120]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
mov ebp, eax
je 0xa2170d
cmp edi, 0xd
je 0xa2170d
mov edx, dword [esp + 0x10]
lea eax, [edx + edx]
mov dword [ebx], eax
jmp 0xa2172d
mov ecx, dword [ebx]
mov edx, dword [esp + 0x238]
mov eax, dword [esp + 0x10]
push ecx
push edx
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [eax + eax]
mov dword [ebx], ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x21c]
test eax, eax
je 0xa21753
lea edx, [esp + 0x11c]
cmp eax, edx
je 0xa21753
push eax
call fcn.00a1fd20
add esp, 4
mov eax, dword [esp + 0x118]
mov dword [esp + 0x228], 0xffffffff
test eax, eax
je 0xa2177a
lea ecx, [esp + 0x18]
cmp eax, ecx
je 0xa2177a
push eax
call fcn.00a1fd20
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x220]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x21c
ret 0x10