Function at 0x102123a
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 [0x10733a0], 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 0x102126c
mov dword [ebp - 0x10], esi
jmp 0x1021476
lea eax, [ebp - 0x20]
push eax
push edi
push esi
push 0x1011db8
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x1021473
lea eax, [ebp - 0x18]
push eax
push esi
push 0x1011d9c
push dword [ebp - 0x20]
call fcn.010319e3
cmp eax, esi
mov dword [ebp - 0x28], eax
jne 0x10212b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x102142a
cmp dword [ebp - 0x18], edi
je 0x10212bd
push 0xb
pop edi
jmp 0x102142a
cmp word [eax], si
mov ecx, eax
push ebx
mov dword [ebp - 0x1c], ecx
je 0x1021424
mov ebx, 0x1011d78
mov ax, word [ecx]
and dword [ebp - 8], 0
and dword [ebp - 0xc], 0
cmp ax, 0x2c
mov byte [ebp - 1], 0
jne 0x10212f0
inc ecx
inc ecx
mov dword [ebp - 0x1c], ecx
jmp 0x102141a
mov dword [ebp - 0x24], ecx
jmp 0x1021303
cmp ax, 0x2c
je 0x1021308
inc ecx
inc ecx
mov ax, word [ecx]
mov dword [ebp - 0x1c], ecx
test ax, ax
jne 0x10212f5
mov edi, ecx
sub edi, dword [ebp - 0x24]
sar edi, 1
je 0x102141a
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 0x1021482
push edi
push dword [ebp - 0x24]
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy]
and word [esi + edi*2], 0
push 0x1011d30
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 0x1021482
push 0x1011d30
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 0x1021429
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push 0x1011d24
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 0x10213e0
cmp edi, 2
jne 0x1021429
jmp 0x10213f4
cmp dword [ebp - 0x18], 4
jne 0x1021487
test byte [ebp - 0x30], 2
jne 0x102148b
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 0x10212d1
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 0x1021440
push dword [ebp - 0x14]
call esi
xor esi, esi
cmp dword [ebp - 0x28], esi
je 0x1021450
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], esi
je 0x102145e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], esi
je 0x102146c
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp edi, esi
je 0x1021476
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 0x1021429
push 0xb
jmp 0x1021484
xor edi, edi
mov dword [ebp - 0x10], 1
jmp 0x1021429