Function at 0x414310
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 ebx
push esi
push edi
mov ecx, 0x800
lea eax, [esp + 0x140]
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x414340
cmp byte [0x4adf48], cl
jne 0x414360
mov eax, str._ProgramFiles__
cmp byte [0x4adf49], cl
je 0x414365
mov eax, str._ProgramFiles_x86___
push eax
lea eax, [esp + 0x7c]
push 0x64
push eax
call fcn.00474910
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [esp + 0x7c]
add esp, 0xc
mov eax, 0x4ade98
cmp dword [0x4adeac], 8
cmovae eax, dword [0x4ade98]
push ecx
push 0xf023f
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4143fd
lea eax, [esp + 0x74]
mov dword [esp + 0x74], 0x800
push eax
lea eax, [esp + 0x144]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [esp + 0x84]
call edi
test eax, eax
jne 0x4143ed
lea ecx, [esp + 0x140]
call fcn.00413870
test al, al
jne 0x4143f7
xor eax, eax
mov word [esp + 0x140], ax
push dword [esp + 0x70]
call esi
lea ecx, [esp + 0x140]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414407
sub ecx, edx
sar ecx, 1
jne 0x41448e
cmp dword [0x4ade94], 8
lea ecx, [esp + 0x70]
push ecx
push 0xf023f
mov eax, 0x4ade80
cmovae eax, dword [0x4ade80]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x41448e
lea eax, [esp + 0x74]
mov dword [esp + 0x74], 0x800
push eax
lea eax, [esp + 0x144]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [esp + 0x84]
call edi
test eax, eax
jne 0x41447e
lea ecx, [esp + 0x140]
call fcn.00413870
test al, al
jne 0x414488
xor eax, eax
mov word [esp + 0x140], ax
push dword [esp + 0x70]
call esi
lea ecx, [esp + 0x140]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4144a0
sub ecx, edx
sar ecx, 1
jne 0x414527
cmp dword [0x4ade7c], 8
lea ecx, [esp + 0x70]
push ecx
push 0xf023f
mov eax, 0x4ade68
cmovae eax, dword [0x4ade68]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x414527
lea eax, [esp + 0x74]
mov dword [esp + 0x74], 0x800
push eax
lea eax, [esp + 0x144]
push eax
push 0
push 0
push str.Inno_Setup:_App_Path
push dword [esp + 0x84]
call edi
test eax, eax
jne 0x414517
lea ecx, [esp + 0x140]
call fcn.00413870
test al, al
jne 0x414521
xor eax, eax
mov word [esp + 0x140], ax
push dword [esp + 0x70]
call esi
lea ecx, [esp + 0x140]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414531
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub ecx, edx
sar ecx, 1
jne 0x414602
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x944]
push 0x400
push eax
call fcn.00474910
add esp, 0xc
lea eax, [esp + 0x10]
mov ecx, 0x4addf8
push 0
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x41457f
mov eax, dword [eax]
push eax
lea eax, [esp + 0x944]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x30]
add esp, 0xc
cmp edx, 8
jb 0x4145d1
mov ecx, dword [esp + 0x10]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4145c7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414847
push edx
push ecx
call fcn.0046ba31
add esp, 8
push 0x400
lea eax, [esp + 0x144]
push eax
lea eax, [esp + 0x948]
push eax
call esi
lea ecx, [esp + 0x140]
call fcn.00413870
test al, al
jne 0x414602
xor eax, eax
mov word [esp + 0x140], ax
lea ecx, [esp + 0x140]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414610
sub ecx, edx
sar ecx, 1
jne 0x4146db
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x944]
push 0x400
push eax
call fcn.00474910
add esp, 0xc
lea eax, [esp + 0x28]
mov ecx, 0x4adde8
push 0
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x414658
mov eax, dword [eax]
push eax
lea eax, [esp + 0x944]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x48]
add esp, 0xc
cmp edx, 8
jb 0x4146aa
mov ecx, dword [esp + 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4146a0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41484c
push edx
push ecx
call fcn.0046ba31
add esp, 8
push 0x400
lea eax, [esp + 0x144]
push eax
lea eax, [esp + 0x948]
push eax
call esi
lea ecx, [esp + 0x140]
call fcn.00413870
test al, al
jne 0x4146db
xor eax, eax
mov word [esp + 0x140], ax
lea ecx, [esp + 0x140]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4146e5
sub ecx, edx
sar ecx, 1
jne 0x414800
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x944]
push 0x400
push eax
call fcn.00474910
add esp, 0xc
cmp dword [0x4ae84c], 3
push 0
jne 0x414784
lea eax, [esp + 0x44]
mov ecx, 0x4addf8
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x414736
mov eax, dword [eax]
push eax
lea eax, [esp + 0x944]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x60]
add esp, 0xc
cmp edx, 8
jb 0x4147e9
mov ecx, dword [esp + 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4147df
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414851
jmp 0x4147df
lea eax, [esp + 0x5c]
mov ecx, 0x4addd8
push eax
call fcn.0040c060
cmp dword [eax + 0x14], 8
jb 0x41479b
mov eax, dword [eax]
push eax
lea eax, [esp + 0x944]
push 0x400
push eax
call fcn.00474974
mov edx, dword [esp + 0x78]
add esp, 0xc
cmp edx, 8
jb 0x4147e9
mov ecx, dword [esp + 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4147df
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414856
push edx
push ecx
call fcn.0046ba31
add esp, 8
push 0x400
lea eax, [esp + 0x144]
push eax
lea eax, [esp + 0x948]
push eax
call esi
lea ecx, [esp + 0x140]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414810
sub ecx, edx
lea eax, [esp + 0x140]
sar ecx, 1
push ecx
push eax
mov ecx, 0x4ae0e8
call fcn.00402430
mov ecx, dword [esp + 0x1144]
pop edi
pop esi
pop ebx
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