Function at 0x40971b
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x40ef1e
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x114
push ebx
xor ebx, ebx
push esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x1c]
mov esi, 0x20019
push eax
push esi
push ebx
push str.SOFTWARE
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [ebp - 4], 2
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x409776
lea ecx, [ebp - 0x18]
call fcn.0040bd29
mov ecx, dword [ebp - 0x1c]
cmp eax, ebx
mov dword [ebp - 0x18], ecx
je 0x40979e
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.0040bd29
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.0040bd29
cmp dword [ebp - 0x18], ebx
je 0x4097f0
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4097f0
push esi
push 0x413d8c
push ecx
lea ecx, [ebp - 0x14]
call fcn.0040bd40
test eax, eax
jne 0x4097c6
push esi
push str.Java_Runtime_Environment
push dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
call fcn.0040bd40
test eax, eax
je 0x4097f7
cmp dword [ebp - 0x10], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x4097d9
push dword [ebp - 0x10]
call esi
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x14], ebx
je 0x4097e6
push dword [ebp - 0x14]
call esi
mov dword [ebp - 0x14], ebx
cmp dword [ebp - 0x18], ebx
je 0x4097f0
push dword [ebp - 0x18]
call esi
xor eax, eax
jmp 0x409927
push edi
mov edi, 0x415cfc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x120]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x80
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0xa0]
push eax
push ebx
push dword [ebp - 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
and ecx, 3
mov dword [ebp - 0x1c], 1
rep movsb byte es:[edi], byte [esi]
call ebx
test eax, eax
jne 0x4098f7
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.MSVCRT.dll__strcmpi]
pop ecx
test eax, eax
pop ecx
jle 0x4098b6
push 9
mov edi, str.1.5.0_11
lea esi, [ebp - 0xa0]
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4098b6
lea edi, [ebp - 0xa0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 3
jbe 0x4098b6
lea edi, [ebp - 0xa0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x120]
mov eax, ecx
mov esi, edi
mov edi, edx
mov dword [ebp - 0x20], 1
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x1c]
inc dword [ebp - 0x1c]
lea ecx, [ebp - 0xa0]
push 0x80
push ecx
push eax
push dword [ebp - 0x10]
call ebx
test eax, eax
je 0x409847
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x4098f9
lea eax, [ebp - 0x120]
push eax
push 0x413dc0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x4098f9
xor edi, edi
cmp dword [ebp - 0x10], edi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x40990c
push dword [ebp - 0x10]
call esi
mov dword [ebp - 0x10], edi
cmp dword [ebp - 0x14], edi
je 0x409919
push dword [ebp - 0x14]
call esi
mov dword [ebp - 0x14], edi
cmp dword [ebp - 0x18], edi
pop edi
je 0x409924
push dword [ebp - 0x18]
call esi
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret