Function at 0x105769d
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x1057729
cmp dword [ebp + 0xc], ebx
je 0x1057729
cmp dword [ebp + 0x10], ebx
je 0x1057729
xor edi, edi
mov dword [ebp - 8], ebx
cmp dword [ebp - 4], ebx
jbe 0x1057872
mov eax, dword [ebp - 0x10]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
cmp edi, ebx
je 0x1057729
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.msvcrt.dll_malloc]
add eax, 2
push eax
call esi
pop ecx
mov dword [ebp - 0xc], eax
cmp eax, ebx
jne 0x1057732
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc
mov eax, dword [ebp - 4]
lea eax, [eax*4 + 4]
push eax
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x1057758
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x1057728
mov esi, dword [ebp - 4]
lea eax, [esi*4 + 4]
push eax
push 0xff
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
test esi, esi
jbe 0x105781c
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x20]
push eax
push edi
lea eax, [esi - 1]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x105781c
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10577b2
sub eax, edx
sar eax, 1
push eax
push dword [ebp + 0xc]
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x1057815
cmp dword [ebp - 0x18], 1
je 0x10577de
cmp dword [ebp - 0x18], 2
jne 0x10577f0
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1057848
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10577f6
sub eax, edx
sar eax, 1
lea eax, [edi + eax*2]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
mov dword [ebp - 8], eax
mov dword [ebx + esi*4], eax
dec esi
jne 0x1057779
push dword [ebp - 0xc]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
pop ecx
xor eax, eax
inc eax
cmp dword [ebp - 4], eax
jb 0x105785f
mov ecx, dword [ebx + eax*4]
cmp ecx, dword [ebp - 8]
je 0x105783e
inc eax
cmp eax, dword [ebp - 4]
jbe 0x1057830
cmp eax, dword [ebp - 4]
ja 0x105785f
inc dword [ebp - 8]
jmp 0x1057828
push dword [ebp - 0xc]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push ebx
call esi
pop ecx
pop ecx
mov eax, edi
jmp 0x105772b
push ebx
call esi
cmp dword [ebp - 8], 0x1869f
pop ecx
jg 0x1057722
xor ebx, ebx
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1057878
sub eax, edx
sar eax, 1
add eax, eax
lea ecx, [eax + 6]
mov dword [ebp - 4], eax
cmp dword [ebp - 0x10], ecx
jae 0x10578ec
cmp edi, ebx
je 0x10578a1
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 4]
pop ecx
xor ecx, ecx
push 2
add eax, 6
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
cmp edi, ebx
je 0x1057729
mov eax, dword [ebp - 4]
push eax
push dword [ebp + 0xc]
push edi
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
shr eax, 1
push 0xa
lea eax, [edi + eax*2]
push eax
push dword [ebp - 8]
call dword [sym.imp.msvcrt.dll__itow]
add esp, 0x18
jmp 0x1057858
cmp edi, ebx
je 0x1057858
jmp 0x10578c6