Function at 0x410130
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 esi
mov ecx, 0x800
lea eax, [ebp - 0x8d0]
mov byte [eax], 0
lea eax, [eax + 1]
dec ecx
jne 0x410153
cmp byte [0x495bc0], cl
jne 0x410173
cmp byte [0x495bc1], cl
jne 0x410173
push str._ProgramFiles__
jmp 0x410178
push str._ProgramFiles_x86___
lea eax, [ebp - 0xd0]
push 0x64
push eax
call fcn.004513ee
add esp, 0xc
cmp dword [0x495adc], 8
lea ecx, [ebp - 0x10d8]
push ecx
push 0xf023f
mov eax, 0x495ac8
cmovae eax, dword [0x495ac8]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x410211
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 dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410200
lea ecx, [ebp - 0x8d0]
call fcn.0040fc80
test al, al
jne 0x410209
xor eax, eax
mov word [ebp - 0x8d0], ax
push dword [ebp - 0x10d8]
call esi
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410220
sub ecx, edx
sar ecx, 1
jne 0x4102b7
cmp dword [0x495ac4], 8
lea ecx, [ebp - 0x10d8]
push ecx
push 0xf023f
mov eax, 0x495ab0
cmovae eax, dword [0x495ab0]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4102b7
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 dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4102a6
lea ecx, [ebp - 0x8d0]
call fcn.0040fc80
test al, al
jne 0x4102af
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 0x4102c0
mov esi, dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
sub ecx, edx
sar ecx, 1
jne 0x41036a
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, 0x495a40
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x410311
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 0x41033d
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.0040fc80
test al, al
jne 0x41036a
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 0x410373
sub ecx, edx
sar ecx, 1
jne 0x410417
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, 0x495a30
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x4103be
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 0x4103ea
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.0040fc80
test al, al
jne 0x410417
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 0x410420
sub ecx, edx
sar ecx, 1
jne 0x4104f4
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 0x41049a
lea eax, [ebp - 0x110c]
push eax
mov ecx, 0x495a40
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x410474
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 0x4104df
push dword [ebp - 0x110c]
jmp 0x4104d7
lea eax, [ebp - 0x113c]
push eax
mov ecx, 0x495a30
call fcn.0040a370
cmp dword [eax + 0x14], 8
jb 0x4104b3
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 0x4104df
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 0x410502
xor ecx, ecx
jmp 0x41051f
lea ecx, [ebp - 0x8d0]
lea edx, [ecx + 2]
jmp 0x410510
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410510
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x8d0]
push eax
mov ecx, 0x495d1c
call fcn.004023a0
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0044fdac
mov esp, ebp
pop ebp
ret