Function at 0x10004c20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
push ebx
push esi
push edi
test eax, eax
je 0x1000518e
cmp dword [ebp + 0xc], 0
je 0x1000518e
push 0x20000
mov byte [eax], 0
call fcn.10005480
add esp, 4
mov ebx, eax
mov dword [ebp - 8], ebx
push 0x10000
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
dec eax
cmp eax, 0xfffe
ja 0x10004d54
xor ecx, ecx
mov dword [ebp - 0x20], 0x2000000
test ebx, ebx
mov dword [ebp - 0x24], ecx
mov eax, 0x10019a68
mov dword [ebp - 0x28], ebx
cmovne eax, ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
call fcn.100053c0
mov ebx, eax
xor edi, edi
lea esp, [esp]
mov eax, dword [edi + 0x10027434]
push eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x3c]
push 0x1001ab08
push eax
call fcn.10006a30
mov ecx, eax
add esp, 0xc
cmp byte [ecx + 0xf], 0
jge 0x10004cc5
mov ecx, dword [ecx]
test ecx, ecx
mov eax, 0x10019a68
cmovne eax, ecx
push eax
push ebx
call dword [sym.imp.vstdlib_s.dll_StringFindSuffix]
add esp, 8
mov esi, eax
test byte [ebp - 0x2d], 0x80
je 0x10004cf4
mov ecx, dword [sym.imp.tier0_s.dll_g_pMemAllocSteam]
push 0
push dword [ebp - 0x3c]
mov ecx, dword [ecx]
mov edx, dword [ecx]
call dword [edx + 0x1c]
test esi, esi
je 0x10004d16
mov eax, esi
sub eax, ebx
cmp eax, dword [ebp + 0xc]
jge 0x10004d16
push ecx
mov eax, esp
mov dword [eax], ebx
call fcn.10007270
add esp, 4
test al, al
jne 0x10004fa8
add edi, 4
cmp edi, 0x1c
jb 0x10004ca0
cmp byte [ebp - 0x20], 0
je 0x10004d2f
push dword [ebp - 0x2c]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1f], 0
je 0x10004d40
push dword [ebp - 0x28]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1e], 0
je 0x10004d51
push dword [ebp - 0x24]
call fcn.100054b0
add esp, 4
mov ebx, dword [ebp - 8]
push ebx
call fcn.100054b0
push 2
push 0
call fcn.100054b0
add esp, 0xc
lea eax, [ebp - 4]
push eax
push 1
push 0
push str.SoftwareValveSteamActiveProcess
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10004f1b
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x18], 4
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x1001ab30
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x10004f1b
cmp dword [ebp - 8], 4
jne 0x10004f1b
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10004f1b
push eax
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x10004f1b
push 0x20000
call fcn.10005480
add esp, 4
mov dword [ebp - 0x10], 0
mov edi, eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push 0x10000
push edi
push 0
push esi
call sub.PSAPI.DLL_GetModuleFileNameExW
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0x103
jne 0x10004f13
lea eax, [ebx - 1]
cmp eax, 0xfffe
ja 0x10004f13
xor ecx, ecx
mov dword [ebp - 0x20], 0x2000000
test edi, edi
mov dword [ebp - 0x24], ecx
mov eax, 0x10019a68
mov dword [ebp - 0x28], edi
cmovne eax, ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
call fcn.100053c0
mov ebx, eax
xor edi, edi
mov eax, dword [edi + 0x10027434]
push eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x3c]
push 0x1001ab08
push eax
call fcn.10006a30
mov ecx, eax
add esp, 0xc
cmp byte [ecx + 0xf], 0
jge 0x10004e87
mov ecx, dword [ecx]
test ecx, ecx
mov eax, 0x10019a68
cmovne eax, ecx
push eax
push ebx
call dword [sym.imp.vstdlib_s.dll_StringFindSuffix]
add esp, 8
mov esi, eax
test byte [ebp - 0x2d], 0x80
je 0x10004eb6
mov ecx, dword [sym.imp.tier0_s.dll_g_pMemAllocSteam]
push 0
push dword [ebp - 0x3c]
mov ecx, dword [ecx]
mov edx, dword [ecx]
call dword [edx + 0x1c]
test esi, esi
je 0x10004ed8
mov eax, esi
sub eax, ebx
cmp eax, dword [ebp + 0xc]
jge 0x10004ed8
push ecx
mov eax, esp
mov dword [eax], ebx
call fcn.10007270
add esp, 4
test al, al
jne 0x10005001
add edi, 4
cmp edi, 0x1c
jb 0x10004e62
cmp byte [ebp - 0x20], 0
je 0x10004ef1
push dword [ebp - 0x2c]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1f], 0
je 0x10004f02
push dword [ebp - 0x28]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1e], 0
je 0x10004f13
push dword [ebp - 0x24]
call fcn.100054b0
add esp, 4
lea ecx, [ebp - 0x14]
call fcn.10004be0
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 4]
push eax
push 1
push 0
push str.SoftwareValveSteam
push 0x80000002
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp + 8]
test eax, eax
jne 0x100050ab
push dword [ebp + 0xc]
push ebx
push str.InstallPath
push dword [ebp - 4]
call fcn.10005250
add esp, 0x10
mov esi, eax
push dword [ebp - 4]
call edi
test esi, esi
jne 0x100050a5
lea esp, [esp]
mov edi, dword [esi + 0x10027434]
lea eax, [ebp - 0x2c]
push edi
push ebx
push 0x1001ab58
push eax
call fcn.10006a30
add esp, 0x10
test byte [ebp - 0x1d], 0x80
je 0x1000505a
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x1000505d
mov ecx, 0x10019a68
jmp 0x10005067
mov edi, dword [ebp + 8]
sub esi, ebx
push esi
push ebx
push edi
call fcn.10009150
add esp, 0xc
mov byte [esi + edi], 0
cmp byte [ebp - 0x20], 0
je 0x10004fcd
push dword [ebp - 0x2c]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1f], 0
je 0x10004fde
push dword [ebp - 0x28]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1e], 0
je 0x10004fef
push dword [ebp - 0x24]
call fcn.100054b0
add esp, 4
lea ecx, [ebp - 8]
call fcn.10004be0
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
sub esi, ebx
push esi
push ebx
push edi
call fcn.10009150
add esp, 0xc
mov byte [esi + edi], 0
cmp byte [ebp - 0x20], 0
je 0x10005026
push dword [ebp - 0x2c]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1f], 0
je 0x10005037
push dword [ebp - 0x28]
call fcn.100054b0
add esp, 4
cmp byte [ebp - 0x1e], 0
je 0x10005048
push dword [ebp - 0x24]
call fcn.100054b0
add esp, 4
lea ecx, [ebp - 0x14]
call fcn.10004be0
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2c]
test eax, eax
mov ecx, 0x10019a68
cmovne ecx, eax
push ecx
mov eax, esp
mov dword [eax], ecx
call fcn.10007270
add esp, 4
test al, al
jne 0x1000512d
test byte [ebp - 0x1d], 0x80
je 0x10005093
mov eax, dword [sym.imp.tier0_s.dll_g_pMemAllocSteam]
push 0
push dword [ebp - 0x2c]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x1c]
add esi, 4
cmp esi, 0x1c
jb 0x10004f70
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call dword [sym.imp.tier0_s.dll_Is64BitOS]
test al, al
je 0x1000518e
lea eax, [ebp - 4]
push eax
push 0x201
push 0
push str.SoftwareValveSteam
push 0x80000002
call esi
test eax, eax
jne 0x1000518e
push dword [ebp + 0xc]
push ebx
push str.InstallPath
push dword [ebp - 4]
call fcn.10005250
add esp, 0x10
mov esi, eax
push dword [ebp - 4]
call edi
test esi, esi
jne 0x1000518e
jmp 0x10005100
mov edi, dword [esi + 0x10027434]
lea eax, [ebp - 0x2c]
push edi
push ebx
push 0x1001ab58
push eax
call fcn.10006a30
add esp, 0x10
test byte [ebp - 0x1d], 0x80
je 0x1000514d
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x10005150
mov ecx, 0x10019a68
jmp 0x1000515a
cmp byte [ebp - 0x1d], 0
jge 0x10005144
mov eax, dword [sym.imp.tier0_s.dll_g_pMemAllocSteam]
push 0
push dword [ebp - 0x2c]
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x1c]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2c]
test eax, eax
mov ecx, 0x10019a68
cmovne ecx, eax
push ecx
mov eax, esp
mov dword [eax], ecx
call fcn.10007270
add esp, 4
test al, al
jne 0x1000512d
test byte [ebp - 0x1d], 0x80
je 0x10005182
mov eax, dword [sym.imp.tier0_s.dll_g_pMemAllocSteam]
push 0
push dword [ebp - 0x2c]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x1c]
add esi, 4
cmp esi, 0x1c
jb 0x10005100
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret