Function at 0x410540
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x113c
call fcn.0045db90
mov eax, dword [0x4920c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ecx, 0x800
lea eax, [ebp - 0x8d0]
mov byte [eax], 0
lea eax, [eax + 1]
dec ecx
jne 0x410565
cmp byte [0x495bc0], cl
jne 0x410585
cmp byte [0x495bc1], cl
jne 0x410585
push str._ProgramFiles__
jmp 0x41058a
push str._ProgramFiles_x86___
lea eax, [ebp - 0xd0]
push 0x64
push eax
call fcn.004513ee
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 0xc
cmp dword [0x495b24], 8
lea ecx, [ebp - 0x10d8]
push ecx
push 0xf023f
mov eax, 0x495b10
cmovae eax, dword [0x495b10]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x410627
lea eax, [ebp - 0x10d4]
push eax
lea eax, [ebp - 0x8d0]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [ebp - 0x10d8]
mov dword [ebp - 0x10d4], 0x800
call edi
test eax, eax
jne 0x410616
lea ecx, [ebp - 0x8d0]
call fcn.0040fbe0
test al, al
jne 0x41061f
xor eax, eax
mov word [ebp - 0x8d0], ax
push dword [ebp - 0x10d8]
call esi
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410630
sub ecx, edx
sar ecx, 1
jne 0x4106bb
cmp dword [0x495b0c], 8
lea ecx, [ebp - 0x10d8]
push ecx
push 0xf023f
mov eax, 0x495af8
cmovae eax, dword [0x495af8]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x4106bb
lea eax, [ebp - 0x10d4]
push eax
lea eax, [ebp - 0x8d0]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [ebp - 0x10d8]
mov dword [ebp - 0x10d4], 0x800
call edi
test eax, eax
jne 0x4106aa
lea ecx, [ebp - 0x8d0]
call fcn.0040fbe0
test al, al
jne 0x4106b3
xor eax, eax
mov word [ebp - 0x8d0], ax
push dword [ebp - 0x10d8]
call esi
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4106c4
sub ecx, edx
sar ecx, 1
jne 0x41074f
cmp dword [0x495af4], 8
lea ecx, [ebp - 0x10d8]
push ecx
push 0xf023f
mov eax, 0x495ae0
cmovae eax, dword [0x495ae0]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x41074f
lea eax, [ebp - 0x10d4]
push eax
lea eax, [ebp - 0x8d0]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [ebp - 0x10d8]
mov dword [ebp - 0x10d4], 0x800
call edi
test eax, eax
jne 0x41073e
lea ecx, [ebp - 0x8d0]
call fcn.0040fbe0
test al, al
jne 0x410747
xor eax, eax
mov word [ebp - 0x8d0], ax
push dword [ebp - 0x10d8]
call esi
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
jmp 0x410760
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410760
mov esi, dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
sub ecx, edx
sar ecx, 1
jne 0x41080a
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x10d0]
push 0x400
push eax
call fcn.004513ee
add esp, 0xc
lea eax, [ebp - 0x1124]
push 0
push eax
mov ecx, 0x495a70
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x4107b1
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x10d0]
push 0x400
push eax
call fcn.00451274
add esp, 0xc
cmp dword [ebp - 0x1110], 8
jb 0x4107dd
push dword [ebp - 0x1124]
call fcn.00450920
add esp, 4
push 0x400
lea eax, [ebp - 0x8d0]
push eax
lea eax, [ebp - 0x10d0]
push eax
call esi
lea ecx, [ebp - 0x8d0]
call fcn.0040fbe0
test al, al
jne 0x41080a
xor eax, eax
mov word [ebp - 0x8d0], ax
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410813
sub ecx, edx
sar ecx, 1
jne 0x4108b7
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x10d0]
push 0x400
push eax
call fcn.004513ee
add esp, 0xc
lea eax, [ebp - 0x10f4]
push 0
push eax
mov ecx, 0x495a60
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x41085e
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x10d0]
push 0x400
push eax
call fcn.00451274
add esp, 0xc
cmp dword [ebp - 0x10e0], 8
jb 0x41088a
push dword [ebp - 0x10f4]
call fcn.00450920
add esp, 4
push 0x400
lea eax, [ebp - 0x8d0]
push eax
lea eax, [ebp - 0x10d0]
push eax
call esi
lea ecx, [ebp - 0x8d0]
call fcn.0040fbe0
test al, al
jne 0x4108b7
xor eax, eax
mov word [ebp - 0x8d0], ax
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4108c0
sub ecx, edx
sar ecx, 1
jne 0x410994
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x10d0]
push 0x400
push eax
call fcn.004513ee
add esp, 0xc
cmp dword [0x496430], 3
push 0
jne 0x41093a
lea eax, [ebp - 0x110c]
push eax
mov ecx, 0x495a70
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x410914
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x10d0]
push 0x400
push eax
call fcn.00451274
add esp, 0xc
cmp dword [ebp - 0x10f8], 8
jb 0x41097f
push dword [ebp - 0x110c]
jmp 0x410977
lea eax, [ebp - 0x113c]
push eax
mov ecx, 0x495a50
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x410953
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x10d0]
push 0x400
push eax
call fcn.00451274
add esp, 0xc
cmp dword [ebp - 0x1128], 8
jb 0x41097f
push dword [ebp - 0x113c]
call fcn.00450920
add esp, 4
push 0x400
lea eax, [ebp - 0x8d0]
push eax
lea eax, [ebp - 0x10d0]
push eax
call esi
cmp word [ebp - 0x8d0], 0
jne 0x4109a2
xor ecx, ecx
jmp 0x4109bf
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
jmp 0x4109b0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4109b0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x8d0]
push eax
mov ecx, 0x495d34
call fcn.004023a0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044fdac
mov esp, ebp
pop ebp
ret