Function at 0x4139b0
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 0x4139e0
cmp byte [0x4adf48], cl
jne 0x413a00
mov eax, str._ProgramFiles__
cmp byte [0x4adf49], cl
je 0x413a05
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 [0x4ade34], 8
mov eax, 0x4ade20
cmovae eax, dword [0x4ade20]
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 0x413a96
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 0x413a86
lea ecx, [esp + 0x138]
call fcn.00413770
test al, al
jne 0x413a90
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 0x413aa0
sub ecx, edx
sar ecx, 1
jne 0x413b2c
cmp dword [0x4ade1c], 8
lea ecx, [esp + 0x68]
push ecx
push 0xf023f
mov eax, 0x4ade08
cmovae eax, dword [0x4ade08]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x413b2c
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 0x413b1c
lea ecx, [esp + 0x138]
call fcn.00413770
test al, al
jne 0x413b26
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 0x413b36
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub ecx, edx
sar ecx, 1
jne 0x413c07
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, 0x4adda8
push 0
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x413b84
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 0x413bd6
mov ecx, dword [esp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413bcc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413e45
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.00413770
test al, al
jne 0x413c07
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 0x413c11
sub ecx, edx
sar ecx, 1
jne 0x413cdc
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, 0x4add98
push 0
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x413c59
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 0x413cab
mov ecx, dword [esp + 0x20]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413ca1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413e4a
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.00413770
test al, al
jne 0x413cdc
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 0x413ce6
sub ecx, edx
sar ecx, 1
jne 0x413e05
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 0x413d85
lea eax, [esp + 0x3c]
mov ecx, 0x4adda8
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x413d37
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 0x413dee
mov ecx, dword [esp + 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413de4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413e4f
jmp 0x413de4
lea eax, [esp + 0x54]
mov ecx, 0x4add98
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x413d9c
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 0x413dee
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413de4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413e54
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 0x413e10
sub ecx, edx
lea eax, [esp + 0x138]
sar ecx, 1
push ecx
push eax
mov ecx, 0x4ae0b8
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