Function at 0x1033408
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 0x1033494
cmp dword [ebp + 0xc], ebx
je 0x1033494
cmp dword [ebp + 0x10], ebx
je 0x1033494
xor edi, edi
cmp dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
jbe 0x10335dd
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
cmp edi, ebx
pop ecx
je 0x1033494
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.msvcrt.dll_malloc]
add eax, 2
push eax
call esi
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
jne 0x103349d
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
test ebx, ebx
pop ecx
jne 0x10334c3
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 0x1033493
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 0x1033587
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 0x1033587
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x103351d
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 0x1033580
cmp dword [ebp - 0x18], 1
je 0x1033549
cmp dword [ebp - 0x18], 2
jne 0x103355b
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x10335b3
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1033561
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 0x10334e4
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 0x10335ca
mov ecx, dword [ebx + eax*4]
cmp ecx, dword [ebp - 8]
je 0x10335a9
inc eax
cmp eax, dword [ebp - 4]
jbe 0x103359b
cmp eax, dword [ebp - 4]
ja 0x10335ca
inc dword [ebp - 8]
jmp 0x1033593
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 0x1033496
push ebx
call esi
cmp dword [ebp - 8], 0x1869f
pop ecx
jg 0x103348d
xor ebx, ebx
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x10335e3
sub eax, edx
sar eax, 1
add eax, eax
lea ecx, [eax + 6]
cmp dword [ebp - 0x10], ecx
mov dword [ebp - 4], eax
jae 0x1033657
cmp edi, ebx
je 0x103360c
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
cmp edi, ebx
pop ecx
je 0x1033494
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 0x10335c3
cmp edi, ebx
je 0x10335c3
jmp 0x1033631