Function at 0x418c40
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x48e8d8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push esi
push edi
mov eax, dword [0x4b5a50]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
xor edi, edi
call fcn.0041d9a0
test eax, eax
jne 0x418e75
call fcn.0043e9ec
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x418c8e
push 0x80004005
call fcn.004010b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0xc], esi
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push edi
push str.SOFTWAREMicrosoftDirectX
mov dword [esp + 0x3c], edi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], 3
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x418d36
mov ecx, 1
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], 0x100
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
jge 0x418cfb
push 0x100
lea ecx, [esp + 0x10]
call fcn.00401de0
mov esi, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
push esi
lea eax, [esp + 0x18]
push eax
push edi
push str.Version
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0045d3d2
add esp, 8
cmp eax, edi
jl 0x418d4d
cmp eax, dword [esi - 8]
jg 0x418d4d
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esi - 0xc]
cmp eax, edi
jge 0x418d57
or eax, 0xffffffff
jmp 0x418d72
push 0x80070057
call fcn.004010b0
push 0x49d374
push esi
call fcn.0045d05a
add esp, 8
cmp eax, edi
jne 0x418d6e
or eax, 0xffffffff
jmp 0x418d72
sub eax, esi
sar eax, 1
inc eax
push eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00410b40
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 1
call fcn.00401b30
mov byte [esp + 0x2c], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x418db6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0xc]
cmp dword [esi - 0xc], edi
jge 0x418dc4
or eax, 0xffffffff
jmp 0x418ddf
push 0x49d374
push esi
call fcn.0045d05a
add esp, 8
cmp eax, edi
jne 0x418ddb
or eax, 0xffffffff
jmp 0x418ddf
sub eax, esi
sar eax, 1
push eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00410b70
push 1
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x20]
mov byte [esp + 0x34], 2
call fcn.00401750
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 3
call fcn.00401b30
mov byte [esp + 0x2c], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418e37
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0xc]
push esi
call fcn.0045d3c7
add esp, 4
cmp eax, 9
jl 0x418e4e
mov edi, 1
mov byte [esp + 0x2c], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418ee4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x418ee4
call fcn.0043e9ec
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x418e8f
push 0x80004005
call fcn.004010b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push 0x26
push 0x49d378
lea ecx, [esp + 0x20]
mov dword [esp + 0x34], 4
call fcn.00401d30
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push ecx
push 0x20019
push edi
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x418ed9
lea edi, [eax + 1]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x2c], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418f04
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x24
ret