Function at 0x410de4
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4208
call fcn.00412df0
push ebx
push esi
lea eax, [ebp - 0x3a04]
push edi
push eax
mov eax, 0x3770
call fcn.00405552
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
pop ecx
lea ecx, [ebp - 0x3c]
push ecx
push 1
xor edi, edi
push ebx
mov dword [ebp - 0x3c], edi
call dword [eax + 0x54]
mov eax, dword [ebp - 0x3c]
cmp eax, edi
je 0x410e9b
add eax, 4
mov esi, 0x41a9f0
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x10], eax
call fcn.0040d71c
test eax, eax
je 0x410e92
push str.ConvertStringSidToSidW
push dword [0x41a9f0]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x410e92
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp - 0x10]
call eax
cmp eax, edi
je 0x410e92
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp dword [eax + 0xc], 2
jne 0x410e6f
add eax, 0x10
cmp word [eax], di
je 0x410e6f
mov ecx, eax
lea eax, [ebp - 0x10c2]
push eax
push dword [ebp - 0x1c]
mov ebx, 0x419aa8
push ecx
call fcn.0040d73c
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [ebp + 0xc]
xor edi, edi
push dword [ebp - 0x3c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebx]
lea ecx, [ebp - 0x40]
push ecx
push edi
push ebx
mov dword [ebp - 0x40], edi
call dword [eax + 0x38]
mov eax, dword [ebp - 0x40]
cmp eax, edi
je 0x410ed3
lea edx, [ebp + 0xc]
push edx
mov dword [ebp + 0xc], edi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
mov eax, dword [ebp + 0xc]
cmp eax, edi
je 0x410eca
mov dword [ebp - 0x298], eax
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebx]
lea ecx, [ebp - 0x44]
push ecx
push ebx
mov dword [ebp - 0x44], edi
call dword [eax + 0x28]
xor eax, eax
cmp word [ebp - 0x44], di
lea ecx, [ebp - 0x38]
setne al
push ecx
push ebx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3a04], eax
mov eax, dword [ebx]
call dword [eax + 0x20]
cmp dword [ebp - 0x38], edi
je 0x410f20
push dword [ebp - 0x38]
mov eax, 0x1ff
lea edi, [ebp - 0x14c2]
call fcn.00404c75
pop ecx
push dword [ebp - 0x38]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor edi, edi
mov eax, dword [ebx]
lea ecx, [ebp - 0x54]
push ecx
push ebx
call dword [eax + 0x3c]
test eax, eax
mov esi, dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
jne 0x410f53
fld qword [ebp - 0x54]
lea eax, [ebp - 0x80]
push eax
push ecx
push ecx
fstp qword [esp]
call esi
lea eax, [ebp - 0x39f8]
push eax
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, dword [ebx]
lea ecx, [ebp - 0x54]
push ecx
push ebx
call dword [eax + 0x48]
test eax, eax
jne 0x410f80
fld qword [ebp - 0x54]
lea eax, [ebp - 0x80]
push eax
push ecx
push ecx
fstp qword [esp]
call esi
lea eax, [ebp - 0x39f0]
push eax
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, dword [ebx]
lea ecx, [ebp - 0x39e8]
push ecx
push ebx
call dword [eax + 0x40]
mov eax, dword [ebx]
lea ecx, [ebp - 0x39e4]
push ecx
push ebx
call dword [eax + 0x44]
mov eax, dword [ebx]
lea ecx, [ebp - 0x48]
push ecx
push ebx
mov dword [ebp - 0x48], edi
call dword [eax + 0x24]
mov eax, dword [ebp - 0x48]
lea ecx, [ebp - 0x30]
push ecx
mov dword [ebp - 0x39e0], eax
mov eax, dword [ebx]
push ebx
mov dword [ebp - 0x30], edi
call dword [eax + 0x1c]
cmp dword [ebp - 0x30], edi
je 0x410fdf
push dword [ebp - 0x30]
mov eax, 0xff
lea edi, [ebp - 0x39d8]
call fcn.00404c75
pop ecx
push dword [ebp - 0x30]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push dword [ebp + 0x10]
mov eax, 0x1ff
lea edi, [ebp - 0x37d8]
call fcn.00404c75
mov eax, dword [ebx]
pop ecx
lea ecx, [ebp - 0x20]
push ecx
xor esi, esi
push ebx
mov dword [ebp - 0x20], esi
call dword [eax + 0x4c]
mov eax, dword [ebp - 0x20]
cmp eax, esi
je 0x41179a
lea edx, [ebp - 0x28]
push edx
mov dword [ebp - 0x28], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
mov eax, dword [ebp - 0x28]
cmp eax, esi
je 0x4110b6
lea edx, [ebp + 0xc]
push edx
mov dword [ebp + 0xc], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
cmp dword [ebp + 0xc], esi
je 0x411054
push dword [ebp + 0xc]
mov eax, 0xff
lea edi, [ebp - 0xec2]
call fcn.00404c75
pop ecx
push dword [ebp + 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp word [ebp - 0xec2], si
jne 0x41108f
mov eax, dword [ebp - 0x28]
lea edx, [ebp + 0x10]
push edx
mov dword [ebp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
cmp dword [ebp + 0x10], esi
je 0x41108f
push dword [ebp + 0x10]
mov eax, 0xff
lea edi, [ebp - 0xec2]
call fcn.00404c75
pop ecx
push dword [ebp + 0x10]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
lea edx, [ebp - 0x10]
push edx
push eax
call dword [ecx + 0x44]
test eax, eax
jne 0x4110ad
cmp dword [ebp - 0x10], 1
sete al
mov dword [ebp - 0xab8], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x2c]
push edx
mov dword [ebp - 0x2c], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x2c]
cmp eax, esi
je 0x411109
lea edx, [ebp + 0xc]
push edx
mov dword [ebp + 0xc], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x94]
cmp word [ebp + 0xc], si
je 0x4110ed
mov dword [ebp - 0x3a00], 1
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
lea edx, [ebp - 0x39fc]
push edx
push eax
call dword [ecx + 0x84]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x24], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x24]
cmp eax, esi
je 0x4111bc
lea edx, [ebp + 0xc]
push edx
mov dword [ebp + 0xc], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
cmp dword [ebp + 0xc], esi
je 0x411153
push dword [ebp + 0xc]
mov eax, 0x3ff
lea edi, [ebp - 0x1ec2]
call fcn.00404c75
pop ecx
push dword [ebp + 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x24]
lea edx, [ebp + 0x10]
push edx
mov dword [ebp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
cmp dword [ebp + 0x10], esi
je 0x411183
push dword [ebp + 0x10]
lea edi, [ebp - 0x16c2]
push 0x7f
pop eax
call fcn.00404c75
pop ecx
push dword [ebp + 0x10]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0xc]
push edx
mov dword [ebp - 0xc], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
cmp dword [ebp - 0xc], esi
je 0x4111b3
push dword [ebp - 0xc]
lea edi, [ebp - 0x15c2]
push 0x7f
pop eax
call fcn.00404c75
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x34]
push edx
mov dword [ebp - 0x34], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov eax, dword [ebp - 0x34]
cmp eax, esi
je 0x4114a1
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x14], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
xor eax, eax
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x29c], esi
jle 0x411498
xor edi, edi
inc edi
lea edx, [ebp + 0xc]
lea ebx, [eax + 1]
mov eax, dword [ebp - 0x34]
push edx
push ebx
mov dword [ebp + 0xc], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov eax, dword [ebp + 0xc]
cmp eax, esi
je 0x41148d
mov ecx, dword [eax]
lea edx, [ebp - 0x10]
push edx
push eax
call dword [ecx + 0x1c]
test eax, eax
jne 0x411484
mov ecx, dword [ebp - 0x10]
mov eax, edi
shl eax, cl
or dword [ebp - 0x29c], eax
cmp ecx, 8
jne 0x411246
mov dword [ebp - 0xab4], edi
jmp 0x411484
cmp ecx, 9
jne 0x411256
mov dword [ebp - 0xab0], edi
jmp 0x411484
cmp ecx, 2
jne 0x4112a0
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 8]
push edx
push 0x417054
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx]
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x411484
lea edx, [ebp + 0x10]
push edx
mov dword [ebp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
cmp word [ebp + 0x10], si
je 0x41147b
movsx eax, word [ebp + 0x10]
mov dword [ebp - 0x2ac], eax
jmp 0x41147b
cmp ecx, 3
jne 0x411309
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
push edx
push 0x417064
mov dword [ebp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx]
mov eax, dword [ebp + 0x10]
cmp eax, esi
je 0x411484
lea edx, [ebp - 8]
push edx
mov dword [ebp - 8], esi
mov dword [ebp - 0x18], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x58]
cmp word [ebp - 8], si
je 0x4112e4
movsx eax, word [ebp - 8]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
lea edx, [ebp - 0x18]
push edx
push eax
call dword [ecx + 0x50]
cmp word [ebp - 0x18], si
je 0x411301
movsx eax, word [ebp - 0x18]
mov dword [ebp - 0x2a4], eax
mov eax, dword [ebp + 0x10]
jmp 0x41147e
cmp ecx, 4
jne 0x411353
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 8]
push edx
push 0x417074
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx]
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x411484
lea edx, [ebp + 0x10]
push edx
mov dword [ebp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x58]
cmp word [ebp + 0x10], si
je 0x41147b
movsx eax, word [ebp + 0x10]
mov dword [ebp - 0x2a0], eax
jmp 0x41147b
cmp ecx, edi
jne 0x411396
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 8]
push edx
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x411484
lea edx, [ebp + 0x10]
push edx
mov dword [ebp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
cmp dword [ebp + 0x10], esi
je 0x41147b
push dword [ebp + 0x10]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x41147b
cmp ecx, esi
jne 0x411484
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 8]
push edx
push 0x417084
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx]
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x411484
lea edx, [ebp + 0x10]
push edx
mov dword [ebp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
cmp dword [ebp + 0x10], esi
je 0x41147b
push 0x4170d4
push dword [ebp + 0x10]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x58], 0x100
mov dword [ebp - 0x60], esi
call fcn.00404aa2
cmp eax, esi
pop ecx
pop ecx
lea edi, [ebp - 0x68]
jle 0x41143c
mov ecx, dword [ebp + 0x10]
lea eax, [ecx + eax*2 + 4]
push eax
or eax, 0xffffffff
call fcn.00405da9
mov edi, dword [ebp - 0x68]
cmp edi, esi
mov eax, 0x413548
je 0x41141a
mov eax, edi
push str.__Select_
push eax
call fcn.00404aa2
cmp eax, esi
pop ecx
pop ecx
jl 0x411447
cmp edi, esi
mov ecx, 0x413548
je 0x411436
mov ecx, edi
mov word [ecx + eax*2], si
jmp 0x411447
push dword [ebp + 0x10]
or eax, 0xffffffff
call fcn.00405da9
mov eax, dword [ebp - 0x68]
cmp eax, esi
jne 0x411453
mov eax, 0x413548
push eax
mov eax, 0x3ff
lea edi, [ebp - 0xaac]
call fcn.00404c75
pop ecx
push dword [ebp + 0x10]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea esi, [ebp - 0x68]
call fcn.00405d84
xor edi, edi
xor esi, esi
inc edi
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebx
cmp eax, dword [ebp - 0x14]
jl 0x4111f8
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x1c]
push edx
mov dword [ebp - 0x1c], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0x411791
lea edx, [ebp - 0x10]
push edx
mov dword [ebp - 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
xor eax, eax
cmp dword [ebp - 0x10], esi
mov dword [ebp - 0x39dc], esi
jle 0x411788
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x1c]
lea edi, [ebp - 0xc]
push edi
push ecx
mov dword [ebp - 0xc], esi
mov edx, dword [eax]
push eax
mov dword [ebp - 0x6c], ecx
call dword [edx + 0x20]
mov eax, dword [ebp - 0xc]
cmp eax, esi
je 0x41177c
mov ecx, dword [eax]
lea edx, [ebp - 0x70]
push edx
push eax
call dword [ecx + 0x24]
test eax, eax
jne 0x411773
mov eax, dword [ebp - 0x70]
cmp eax, esi
jne 0x4115e1
mov eax, dword [ebp - 0xc]
or dword [ebp - 0x39dc], 1
lea edx, [ebp + 0xc]
push edx
push str.MbLk
mov dword [ebp + 0xc], esi
mov ecx, dword [eax]
push eax
call dword [ecx]
mov eax, dword [ebp + 0xc]
cmp eax, esi
je 0x411773
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
lea edx, [ebp - 0x18]
push edx
push eax
call dword [ecx + 0x30]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
lea edx, [ebp - 8]
push edx
push eax
call dword [ecx + 0x38]
cmp dword [ebp - 0x14], esi
je 0x411595
push 0x104
lea eax, [ebp - 0x33d8]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 0x14]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x18], esi
je 0x4115b7
push dword [ebp - 0x18]
mov eax, 0x3ff
lea edi, [ebp - 0x31ce]
call fcn.00404c75
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 8], esi
je 0x4115d9
push dword [ebp - 8]
mov eax, 0x104
lea edi, [ebp - 0xcc2]
call fcn.00404c75
pop ecx
push dword [ebp - 8]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp + 0xc]
jmp 0x41176d
cmp eax, 5
jne 0x411688
mov eax, dword [ebp - 0xc]
or dword [ebp - 0x39dc], 2
lea edx, [ebp - 8]
push edx
push 0x417044
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx]
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x411773
lea edx, [ebp + 0xc]
push edx
mov dword [ebp + 0xc], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
cmp dword [ebp + 0xc], esi
je 0x41176a
push dword [ebp + 0xc]
mov eax, 0x80
lea edi, [ebp - 0x29ce]
call fcn.00404c75
mov eax, dword [ebp + 8]
cmp dword [eax + 0xc], 2
pop ecx
mov dword [ebp + 0x10], esi
jne 0x4116ae
mov edi, eax
cmp dword [edi + 8], esi
je 0x411761
lea eax, [ebp - 0x29ce]
push eax
push str.SoftwareClassesCLSID_s
lea eax, [ebp - 0x4204]
push 0x3ff
push eax
call sub.msvcrt.dll__snwprintf
mov eax, dword [edi + 8]
add esp, 0x10
lea ecx, [ebp + 0x10]
push ecx
push 0x20119
push esi
lea ecx, [ebp - 0x4204]
push ecx
push eax
jmp 0x4116e4
cmp eax, 6
jne 0x411699
or dword [ebp - 0x39dc], 4
jmp 0x411773
cmp eax, 7
jne 0x411773
or dword [ebp - 0x39dc], 8
jmp 0x411773
lea eax, [ebp - 0x29ce]
push eax
push str.CLSID_s
lea eax, [ebp - 0x4204]
push 0x3ff
push eax
call sub.msvcrt.dll__snwprintf
add esp, 0x10
lea eax, [ebp + 0x10]
push eax
push 0x20119
push esi
lea eax, [ebp - 0x4204]
push eax
push SysReAllocString
call ebx
cmp eax, esi
jne 0x411761
push 0x413548
push dword [ebp + 0x10]
mov eax, 0x3ff
lea esi, [ebp - 0x28cc]
call fcn.0040f175
xor edi, edi
push 0x208
lea eax, [ebp - 0x292]
push edi
push eax
mov word [ebp - 0x294], di
call sub.msvcrt.dll_memset
push 0x413548
push str.InprocServer32
push dword [ebp + 0x10]
lea esi, [ebp - 0x294]
call fcn.0040f1ce
add esp, 0x20
cmp word [ebp - 0x294], di
je 0x411756
push 0x104
lea eax, [ebp - 0x20cc]
push eax
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
push dword [ebp + 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp - 0x10]
jl 0x4114e0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
lea edx, [ebp - 0x3a04]
push edx
call dword [eax]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0xc