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

Disassembly:
mov eax, 0x100254d
call fcn.010022d0
sub esp, 0x438
push ebx
mov ebx, ecx
mov ecx, dword [ebx]
push esi
push edi
mov dword [ebp - 0x18], ebx
call sub.MFC42u.DLL_CString::Empty
mov esi, dword [sym.imp.msvcrt.dll__waccess]
push 4
mov edi, 0x10011f4
push edi
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10018d5
mov ecx, dword [ebx]
push edi
call fcn.01002000
jmp 0x1001afb
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
push 0x10012b0
mov ebx, 0x80000002
push ebx
call edi
test eax, eax
jne 0x100195a
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0
push 0x1001454
push dword [ebp - 0x14]
mov dword [ebp - 0x10], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1001951
lea eax, [ebp - 0x23c]
push 4
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1001951
lea eax, [ebp - 0x23c]
push eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call fcn.01002000
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1001afb
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
push 0x1001250
push ebx
call edi
test eax, eax
mov edi, 0x104
jne 0x1001a66
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x30]
push eax
push 0
push 0x100122c
push dword [ebp - 0x14]
mov dword [ebp - 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1001a5d
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString_1
and dword [ebp - 4], 0
push 0x1001408
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::operator
push 4
push dword [ebp - 0x10]
call esi
test eax, eax
pop ecx
pop ecx
je 0x1001a32
push 0xa
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::LoadStringW
test eax, eax
je 0x1001a51
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x24]
call sub.MFC42u.DLL_CString::CString_1
lea ecx, [ebp - 0x10]
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 1
call sub.MFC42u.DLL_operator
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call sub.MFC42u.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call sub.MFC42u.DLL_CString::CString
push 4
push dword [ebp - 0x10]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1001a51
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call sub.MFC42u.DLL_CString::operator_1
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x10]
jmp 0x1001af2
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x1c]
call fcn.01002006
push 0xb
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 3
call sub.MFC42u.DLL_CString::LoadStringW
test eax, eax
je 0x1001abc
push edi
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1001abc
lea eax, [ebp - 0x444]
push 4
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1001abc
lea eax, [ebp - 0x444]
push eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call fcn.01002000
jmp 0x1001aef
lea ecx, [ebp - 0x20]
call fcn.01002006
push 8
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 4
call sub.MFC42u.DLL_CString::LoadStringW
push 0
push 0
push dword [ebp - 0x20]
call sub.MFC42u.DLL_AfxMessageBox
call fcn.01001686
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x1c]
or dword [ebp - 4], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret