Function at 0x4126c0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x4128ef
cmp byte [esi], 0
je 0x4128ef
lea eax, [ebp + 8]
push eax
push 0x2001f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4128ef
mov ecx, dword [0x49a0e8]
test dword [0x49a27c], ecx
je 0x412716
push esi
push str.RegPatg__s
call fcn.0040acd0
add esp, 8
push ebx
lea edx, [ebp - 4]
push edx
mov edx, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x14]
push ecx
push 0
push str.ATIPOLL
mov ebx, 4
push edx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], 0
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x412767
cmp dword [ebp - 4], ebx
jne 0x412767
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
push edx
mov dword [eax], ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov dword [edi], 0
mov dword [esi], 0
mov eax, dword [0x49b638]
cmp eax, 8
jbe 0x41278b
mov eax, 0x478610
jmp 0x412797
mov eax, 0x4784a8
je 0x412797
mov eax, 0x478830
push edi
push 0x1e
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00412630
mov eax, dword [0x49b638]
add esp, 0x10
cmp eax, 9
jb 0x4127b7
and dword [edi], 0xfffefffd
test dword [edi], 0x10000
je 0x4127ea
cmp dword [0x49b638], 8
mov eax, 0x478778
jae 0x4127d2
mov eax, 0x478998
mov ecx, dword [ebp + 8]
push esi
push 0xf
push eax
push ecx
call fcn.00412630
mov edx, dword [esi]
push edx
call fcn.00412380
add esp, 0x14
test byte [edi], 2
je 0x41280e
mov eax, dword [ebp + 8]
lea edi, [esi + 4]
push edi
push 2
push 0x478a4c
push eax
call fcn.00412630
mov ecx, dword [edi]
push ecx
call fcn.00412380
add esp, 0x14
cmp dword [0x49b638], 9
jae 0x41282e
mov eax, dword [ebp + 8]
lea edx, [esi + 8]
push edx
push 2
push 0x478a64
push eax
call fcn.00412630
add esp, 0x10
mov ecx, dword [esi + 8]
push ecx
call fcn.00412380
mov edx, dword [ebp + 8]
lea edi, [esi + 0xc]
push edi
push 7
push 0x478a80
push edx
call fcn.00412630
mov eax, dword [0x49b638]
add esp, 0x14
cmp eax, 8
jb 0x4128a8
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x18]
push edx
push 0
push str.EnableLassoSupport
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4128a8
cmp dword [ebp - 0xc], ebx
jne 0x4128a8
mov eax, dword [ebp - 0x10]
cmp eax, 1
jne 0x41289a
mov eax, dword [edi]
or eax, 0x40
jmp 0x4128a6
cmp eax, 2
jne 0x4128a8
mov eax, dword [edi]
or eax, 0x80
mov dword [edi], eax
mov ecx, dword [edi]
push ecx
call fcn.00412380
mov edx, dword [ebp + 8]
lea edi, [esi + 0x10]
push edi
push 1
push 0x478ad4
push edx
call fcn.00412630
mov eax, dword [edi]
push eax
call fcn.00412380
mov ecx, dword [ebp + 8]
add esi, 0x14
push esi
push 1
push 0x478ae0
push ecx
call fcn.00412630
mov edx, dword [ebp + 8]
add esp, 0x28
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret