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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x113c
call fcn.004839d0
mov eax, dword [0x4ab00c]
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 0x413e90
cmp byte [0x4adf48], cl
jne 0x413eb0
mov eax, str._ProgramFiles__
cmp byte [0x4adf49], cl
je 0x413eb5
mov eax, str._ProgramFiles_x86___
push eax
lea eax, [esp + 0x74]
push 0x64
push eax
call fcn.00474910
add esp, 0xc
lea ecx, [esp + 0x68]
cmp dword [0x4ade64], 8
mov eax, 0x4ade50
cmovae eax, dword [0x4ade50]
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 0x413f46
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 0x413f36
lea ecx, [esp + 0x138]
call fcn.00413910
test al, al
jne 0x413f40
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 0x413f50
sub ecx, edx
sar ecx, 1
jne 0x413fdc
cmp dword [0x4ade4c], 8
lea ecx, [esp + 0x68]
push ecx
push 0xf023f
mov eax, 0x4ade38
cmovae eax, dword [0x4ade38]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x413fdc
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 0x413fcc
lea ecx, [esp + 0x138]
call fcn.00413910
test al, al
jne 0x413fd6
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 0x413fe6
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub ecx, edx
sar ecx, 1
jne 0x4140b7
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.00474910
add esp, 0xc
lea eax, [esp + 8]
mov ecx, 0x4addc8
push 0
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x414034
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x28]
add esp, 0xc
cmp edx, 8
jb 0x414086
mov ecx, dword [esp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41407c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142f5
push edx
push ecx
call fcn.0046ba31
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.00413910
test al, al
jne 0x4140b7
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 0x4140c1
sub ecx, edx
sar ecx, 1
jne 0x41418c
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.00474910
add esp, 0xc
lea eax, [esp + 0x20]
mov ecx, 0x4addb8
push 0
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x414109
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x40]
add esp, 0xc
cmp edx, 8
jb 0x41415b
mov ecx, dword [esp + 0x20]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x414151
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142fa
push edx
push ecx
call fcn.0046ba31
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.00413910
test al, al
jne 0x41418c
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 0x414196
sub ecx, edx
sar ecx, 1
jne 0x4142b5
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.00474910
add esp, 0xc
cmp dword [0x4ae84c], 3
push 0
jne 0x414235
lea eax, [esp + 0x3c]
mov ecx, 0x4addc8
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x4141e7
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x58]
add esp, 0xc
cmp edx, 8
jb 0x41429e
mov ecx, dword [esp + 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x414294
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142ff
jmp 0x414294
lea eax, [esp + 0x54]
mov ecx, 0x4addb8
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x41424c
mov eax, dword [eax]
push eax
lea eax, [esp + 0x93c]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x70]
add esp, 0xc
cmp edx, 8
jb 0x41429e
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x414294
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414304
push edx
push ecx
call fcn.0046ba31
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 0x4142c0
sub ecx, edx
lea eax, [esp + 0x138]
sar ecx, 1
push ecx
push eax
mov ecx, 0x4ae0d0
call fcn.00402430
mov ecx, dword [esp + 0x113c]
pop esi
xor ecx, esp
call fcn.0046b9f0
mov esp, ebp
pop ebp
ret
call fcn.00471513
call fcn.00471513
call fcn.00471513
call fcn.00471513
int3