Function at 0x1021405
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push esi
xor esi, esi
push edi
xor edi, edi
inc edi
cmp dword [0x1074464], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], esi
mov byte [ebp - 1], 0
je 0x1021437
mov dword [ebp - 0x10], esi
jmp 0x1021641
lea eax, [ebp - 0x20]
push eax
push edi
push esi
push 0x1012078
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x102163e
lea eax, [ebp - 0x18]
push eax
push esi
push 0x101205c
push dword [ebp - 0x20]
call fcn.0103208c
cmp eax, esi
mov dword [ebp - 0x28], eax
jne 0x102147b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x10215f5
cmp dword [ebp - 0x18], edi
je 0x1021488
push 0xb
pop edi
jmp 0x10215f5
cmp word [eax], si
mov ecx, eax
push ebx
mov dword [ebp - 0x1c], ecx
je 0x10215ef
mov ebx, 0x1012038
mov ax, word [ecx]
and dword [ebp - 8], 0
and dword [ebp - 0xc], 0
cmp ax, 0x2c
mov byte [ebp - 1], 0
jne 0x10214bb
inc ecx
inc ecx
mov dword [ebp - 0x1c], ecx
jmp 0x10215e5
mov dword [ebp - 0x24], ecx
jmp 0x10214ce
cmp ax, 0x2c
je 0x10214d3
inc ecx
inc ecx
mov ax, word [ecx]
mov dword [ebp - 0x1c], ecx
test ax, ax
jne 0x10214c0
mov edi, ecx
sub edi, dword [ebp - 0x24]
sar edi, 1
je 0x10215e5
lea eax, [edi + edi + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
mov dword [ebp - 8], esi
je 0x102164d
push edi
push dword [ebp - 0x24]
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy]
and word [esi + edi*2], 0
push 0x1011ff0
call dword [sym.imp.msvcrt.dll_wcslen]
mov esi, eax
push ebx
add esi, edi
call dword [sym.imp.msvcrt.dll_wcslen]
add esi, eax
add esp, 0x14
lea eax, [esi + esi + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
mov dword [ebp - 0xc], esi
je 0x102164d
push 0x1011ff0
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 8]
mov edi, dword [sym.imp.msvcrt.dll_wcscat]
push esi
call edi
push ebx
push esi
call edi
add esp, 0x18
lea eax, [ebp - 0x14]
push eax
push 1
push 0
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x10215f4
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push 0x1011fe4
push dword [ebp - 0x14]
mov byte [ebp - 1], 1
mov dword [ebp - 0x2c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
je 0x10215ab
cmp edi, 2
jne 0x10215f4
jmp 0x10215bf
cmp dword [ebp - 0x18], 4
jne 0x1021652
test byte [ebp - 0x30], 2
jne 0x1021656
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
call edi
and dword [ebp - 8], 0
push esi
call edi
push dword [ebp - 0x14]
and dword [ebp - 0xc], 0
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 1], 0
cmp word [ecx], 0
jne 0x102149c
xor edi, edi
mov dword [ebp - 0x10], edi
pop ebx
push dword [ebp - 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
cmp byte [ebp - 1], 0
je 0x102160b
push dword [ebp - 0x14]
call esi
xor esi, esi
cmp dword [ebp - 0x28], esi
je 0x102161b
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], esi
je 0x1021629
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], esi
je 0x1021637
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp edi, esi
je 0x1021641
xor edi, edi
inc edi
mov dword [ebp - 0x10], edi
xor eax, eax
cmp dword [ebp - 0x10], esi
pop edi
sete al
pop esi
leave
ret
push 8
pop edi
jmp 0x10215f4
push 0xb
jmp 0x102164f
xor edi, edi
mov dword [ebp - 0x10], 1
jmp 0x10215f4