Function at 0x10031ec0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x338
mov eax, dword [0x100ae134]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, 0x10e
mov dword [ebp - 0x330], edx
mov edx, 0x10004428
mov dword [ebp - 0x32c], edi
mov dword [ebp - 0x334], ebx
mov word [edi], ax
lea eax, [ebp - 0x320]
mov ecx, eax
sub edx, ecx
lea esp, [esp]
lea ecx, [esi + 0x7ffffef0]
test ecx, ecx
je 0x10031f33
movzx ecx, word [edx + eax]
test cx, cx
je 0x10031f33
mov word [eax], cx
add eax, 2
sub esi, 1
jne 0x10031f10
sub eax, 2
jmp 0x10031f37
test esi, esi
je 0x10031f2e
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x328]
push eax
push 0x20019
push ecx
lea eax, [ebp - 0x320]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1003a792
xor edi, edi
test ebx, ebx
je 0x1003a764
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100365c0
mov esp, ebp
pop ebp
ret
lea edi, [ebx - 1]
test edi, edi
je 0x10031f6d
mov ebx, dword [ebp - 0x32c]
lea esi, [edi + edi]
push esi
push 0x10004488
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [esi + ebx], ax
jmp 0x10031f6d
mov ecx, dword [ebp - 0x330]
test ecx, ecx
jne 0x1003a8a2
mov esi, ebx
xor ebx, ebx
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x324]
mov dword [ebp - 0x330], ebx
push eax
push edi
push ebx
push dword [ebp - 0x328]
mov dword [ebp - 0x324], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov ecx, dword [ebp - 0x324]
inc ebx
test ecx, ecx
jne 0x1003a7dc
test eax, eax
je 0x1003a7a4
cmp eax, 0xea
jne 0x1003a86c
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x324]
mov dword [ebp - 0x324], 0x80
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x328]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x1003a864
test esi, esi
je 0x1003a85a
lea ecx, [esi - 1]
mov dword [ebp - 0x324], ecx
test ecx, ecx
je 0x1003a845
push ecx
lea eax, [ebp - 0x104]
mov edx, esi
push eax
mov ecx, edi
call fcn.10047487
mov ecx, dword [ebp - 0x324]
sub esi, ecx
je 0x1003a87e
dec esi
cmp esi, 1
jbe 0x1003a87e
lea edi, [edi + ecx*2]
add edi, 2
jmp 0x1003a7a4
xor ecx, ecx
mov dword [ebp - 0x324], ecx
jmp 0x1003a845
mov ecx, esi
mov dword [ebp - 0x324], ecx
test eax, eax
je 0x1003a845
mov eax, dword [ebp - 0x334]
mov ebx, dword [ebp - 0x32c]
jmp 0x1003a896
mov eax, dword [ebp - 0x334]
xor ecx, ecx
mov ebx, dword [ebp - 0x32c]
mov esi, 1
mov word [ebx + eax*2 - 4], cx
sub eax, esi
xor ecx, ecx
mov esi, eax
mov word [ebx + eax*2], cx
jmp 0x1003a8f6
lea eax, [ebx + ebx]
mov dword [ebp - 0x338], eax
lea eax, [ebp - 0x338]
push eax
push edi
push 0
push 0
push ecx
push dword [ebp - 0x328]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [ebp - 0x338]
shr esi, 1
test eax, eax
jne 0x1003a8da
cmp word [edi + esi*2 - 2], ax
jne 0x1003a8e4
dec esi
jmp 0x1003a8f6
cmp eax, 0xea
jne 0x1003a8ec
lea esi, [ebx - 1]
xor eax, eax
mov word [edi + esi*2], ax
jmp 0x1003a8f6
xor eax, eax
cmp eax, ebx
sbb esi, esi
not esi
and esi, ebx
push dword [ebp - 0x328]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x10031f6f