Function at 0x413920
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 0x413950
cmp byte [0x4a1e78], cl
jne 0x413970
mov eax, str._ProgramFiles__
cmp byte [0x4a1e79], cl
je 0x413975
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 [0x4a1d94], 8
mov eax, 0x4a1d80
cmovae eax, dword [0x4a1d80]
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 0x413a06
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 0x4139f6
lea ecx, [esp + 0x138]
call fcn.004133d0
test al, al
jne 0x413a00
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 0x413a10
sub ecx, edx
sar ecx, 1
jne 0x413a9c
cmp dword [0x4a1d7c], 8
lea ecx, [esp + 0x68]
push ecx
push 0xf023f
mov eax, 0x4a1d68
cmovae eax, dword [0x4a1d68]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x413a9c
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 0x413a8c
lea ecx, [esp + 0x138]
call fcn.004133d0
test al, al
jne 0x413a96
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 0x413aa6
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub ecx, edx
sar ecx, 1
jne 0x413b77
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, 0x4a1cf8
push 0
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x413af4
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 0x413b46
mov ecx, dword [esp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413b3c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413db5
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.004133d0
test al, al
jne 0x413b77
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 0x413b81
sub ecx, edx
sar ecx, 1
jne 0x413c4c
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, 0x4a1ce8
push 0
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x413bc9
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 0x413c1b
mov ecx, dword [esp + 0x20]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413c11
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413dba
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.004133d0
test al, al
jne 0x413c4c
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 0x413c56
sub ecx, edx
sar ecx, 1
jne 0x413d75
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 0x413cf5
lea eax, [esp + 0x3c]
mov ecx, 0x4a1cf8
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x413ca7
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 0x413d5e
mov ecx, dword [esp + 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413d54
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413dbf
jmp 0x413d54
lea eax, [esp + 0x54]
mov ecx, 0x4a1ce8
push eax
call fcn.0040bc00
cmp dword [eax + 0x14], 8
jb 0x413d0c
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 0x413d5e
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413d54
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413dc4
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 0x413d80
sub ecx, edx
lea eax, [esp + 0x138]
sar ecx, 1
push ecx
push eax
mov ecx, 0x4a2018
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