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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x113c
call fcn.0047a9b0
mov eax, dword [0x49f008]
xor eax, esp
mov dword [esp + 0x1138], eax
push esi
mov ecx, 0x800
lea eax, [esp + 0x138]
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4134a0
cmp byte [0x4a1e78], cl
jne 0x4134c0
mov eax, str._ProgramFiles__
cmp byte [0x4a1e79], cl
je 0x4134c5
mov eax, str._ProgramFiles_x86___
push eax
lea eax, [esp + 0x74]
push 0x64
push eax
call fcn.0046b918
add esp, 0xc
lea ecx, [esp + 0x68]
cmp dword [0x4a1d64], 8
mov eax, 0x4a1d50
cmovae eax, dword [0x4a1d50]
push ecx
push 0xf023f
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 0x413556
lea eax, [esp + 0x6c]
mov dword [esp + 0x6c], 0x800
push eax
lea eax, [esp + 0x13c]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [esp + 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x413546
lea ecx, [esp + 0x138]
call fcn.00413230
test al, al
jne 0x413550
xor eax, eax
mov word [esp + 0x138], ax
push dword [esp + 0x68]
call esi
lea ecx, [esp + 0x138]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413560
sub ecx, edx
sar ecx, 1
jne 0x4135ec
cmp dword [0x4a1d4c], 8
lea ecx, [esp + 0x68]
push ecx
push 0xf023f
mov eax, 0x4a1d38
cmovae eax, dword [0x4a1d38]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4135ec
lea eax, [esp + 0x6c]
mov dword [esp + 0x6c], 0x800
push eax
lea eax, [esp + 0x13c]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [esp + 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4135dc
lea ecx, [esp + 0x138]
call fcn.00413230
test al, al
jne 0x4135e6
xor eax, eax
mov word [esp + 0x138], ax
push dword [esp + 0x68]
call esi
lea ecx, [esp + 0x138]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4135f6
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub ecx, edx
sar ecx, 1
jne 0x4136c7
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.0046b918
add esp, 0xc
lea eax, [esp + 8]
mov ecx, 0x4a1cd8
push 0
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x413644
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.0046b97c
mov edx, dword [esp + 0x28]
add esp, 0xc
cmp edx, 8
jb 0x413696
mov ecx, dword [esp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41368c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413905
push edx
push ecx
call fcn.004632e1
add esp, 8
push 0x400
lea eax, [esp + 0x13c]
push eax
lea eax, [esp + 0x940]
push eax
call esi
lea ecx, [esp + 0x138]
call fcn.00413230
test al, al
jne 0x4136c7
xor eax, eax
mov word [esp + 0x138], ax
lea ecx, [esp + 0x138]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4136d1
sub ecx, edx
sar ecx, 1
jne 0x41379c
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.0046b918
add esp, 0xc
lea eax, [esp + 0x20]
mov ecx, 0x4a1cc8
push 0
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x413719
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.0046b97c
mov edx, dword [esp + 0x40]
add esp, 0xc
cmp edx, 8
jb 0x41376b
mov ecx, dword [esp + 0x20]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413761
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41390a
push edx
push ecx
call fcn.004632e1
add esp, 8
push 0x400
lea eax, [esp + 0x13c]
push eax
lea eax, [esp + 0x940]
push eax
call esi
lea ecx, [esp + 0x138]
call fcn.00413230
test al, al
jne 0x41379c
xor eax, eax
mov word [esp + 0x138], ax
lea ecx, [esp + 0x138]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4137a6
sub ecx, edx
sar ecx, 1
jne 0x4138c5
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.0046b918
add esp, 0xc
cmp dword [0x4a2780], 3
push 0
jne 0x413845
lea eax, [esp + 0x3c]
mov ecx, 0x4a1cd8
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x4137f7
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.0046b97c
mov edx, dword [esp + 0x58]
add esp, 0xc
cmp edx, 8
jb 0x4138ae
mov ecx, dword [esp + 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4138a4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41390f
jmp 0x4138a4
lea eax, [esp + 0x54]
mov ecx, 0x4a1cc8
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x41385c
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.0046b97c
mov edx, dword [esp + 0x70]
add esp, 0xc
cmp edx, 8
jb 0x4138ae
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4138a4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413914
push edx
push ecx
call fcn.004632e1
add esp, 8
push 0x400
lea eax, [esp + 0x13c]
push eax
lea eax, [esp + 0x940]
push eax
call esi
lea ecx, [esp + 0x138]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4138d0
sub ecx, edx
lea eax, [esp + 0x138]
sar ecx, 1
push ecx
push eax
mov ecx, 0x4a2000
call fcn.00402380
mov ecx, dword [esp + 0x113c]
pop esi
xor ecx, esp
call fcn.004632a0
mov esp, ebp
pop ebp
ret
call fcn.0046851b
call fcn.0046851b
call fcn.0046851b
call fcn.0046851b
int3