Function at 0x1002e66
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
lea eax, [ebp - 4]
push eax
xor edi, edi
mov ebx, 0x20019
push ebx
push edi
push 0x1001338
push dword [ebp + 8]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], edi
call esi
test eax, eax
jne 0x1002f11
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0x18]
push eax
push edi
push 0x100130c
push dword [ebp - 4]
mov dword [ebp - 8], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1002f05
cmp dword [ebp - 8], 2
jbe 0x1002f05
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
mov dword [ebp - 0x14], eax
je 0x1002f05
lea ecx, [ebp - 8]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push 0x100130c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1002ef9
mov eax, dword [ebp - 0x14]
cmp word [eax], di
jne 0x1002f05
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x14], edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], edi
lea eax, [ebp - 4]
push eax
push ebx
push edi
push 0x10012a0
push dword [ebp + 8]
call esi
test eax, eax
jne 0x1002f93
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0x18]
push eax
push edi
mov ebx, 0x100130c
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], edi
call esi
test eax, eax
jne 0x1002f87
cmp dword [ebp - 8], 2
jbe 0x1002f87
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x1002f87
lea ecx, [ebp - 8]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push ebx
push dword [ebp - 4]
call esi
test eax, eax
jne 0x1002f7b
mov eax, dword [ebp - 0xc]
cmp word [eax], di
jne 0x1002f87
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0xc], edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], edi
mov ebx, dword [ebp - 0x14]
cmp ebx, edi
jne 0x1002fad
mov eax, dword [ebp - 0xc]
cmp eax, edi
je 0x1003034
mov dword [ebp - 0x10], eax
jmp 0x1003034
cmp dword [ebp - 0xc], edi
jne 0x1002fb7
mov dword [ebp - 0x10], ebx
jmp 0x1003034
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call esi
push ebx
mov dword [ebp + 8], eax
call esi
mov ecx, dword [ebp + 8]
lea ebx, [ecx + eax + 2]
lea eax, [ebx + ebx]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
mov dword [ebp - 0x10], eax
je 0x1003024
push dword [ebp - 0xc]
push ebx
push eax
call fcn.0100265c
test eax, eax
push dword [ebp - 0x10]
jl 0x100301b
call esi
mov esi, dword [ebp - 0x10]
lea eax, [esi + eax*2 - 2]
cmp word [eax], 0x3b
je 0x100300c
mov word [eax + 2], 0x3b
mov word [eax + 4], di
push dword [ebp - 0x14]
push ebx
push esi
call fcn.01002a8d
test eax, eax
jge 0x1003024
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x10], edi
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
push dword [ebp - 0xc]
call esi
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret 4