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

Disassembly:
push 0xffffffffffffffff
push 0x4cff19
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x424
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov eax, dword [esp + 0x464]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x43c], esi
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], esi
mov ebx, 2
je 0x46dbaa
mov dword [esp + 0x14], ebx
mov eax, dword [ebp + 8]
mov dword [ebp + 0xc], esi
cmp eax, esi
jne 0x46dc5b
lea eax, [esp + 0x13]
lea ecx, [esp + 0x1c]
push eax
call fcn.0041dbef
mov edi, 0x503a34
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x43c], 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x2c], esi
push ecx
push 0x503a34
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], esi
call fcn.0040695a
mov ecx, dword [0x4d68ec]
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x44c]
push esi
push edx
mov byte [esp + 0x448], bl
call fcn.0040b3b2
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x43c], 0
cmp eax, esi
je 0x46dc31
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x2c], esi
push 1
lea ecx, [esp + 0x20]
call fcn.00406ad6
mov eax, dword [esp + 0x45c]
mov dword [esp + 0x43c], 0xffffffff
cmp eax, esi
je 0x46dd02
jmp 0x46dcf2
mov edi, dword [esp + 0x444]
mov eax, dword [edi + 4]
cmp eax, esi
jne 0x46dc6e
mov eax, 0x4d68e8
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push esi
push edx
push esi
push eax
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, esi
mov dword [ebp + 0xc], eax
je 0x46dcbb
mov ecx, dword [edi + 4]
mov edx, 0x4d68e8
cmp ecx, esi
je 0x46dc9a
mov edx, ecx
mov ecx, dword [ebp + 0x18]
cmp ecx, esi
jne 0x46dca6
mov ecx, 0x4d68e8
push edx
push ecx
push str.RegQueryValueEx:__s_:__s
push eax
push 0x503ff0
call fcn.00423520
add esp, 0x14
cmp dword [ebp + 0xc], esi
je 0x46dd15
mov ecx, dword [0x4d68ec]
lea edx, [esp + 0x44c]
push ecx
mov ecx, dword [esp + 0x44c]
push esi
push edx
call fcn.0040b3b2
mov eax, dword [esp + 0x45c]
mov dword [esp + 0x43c], 0xffffffff
cmp eax, esi
je 0x46dd02
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x45c], esi
push 1
lea ecx, [esp + 0x450]
call fcn.00406ad6
jmp 0x46df9f
mov eax, dword [esp + 0x18]
cmp eax, esi
mov esi, dword [esp + 0x448]
jne 0x46dd27
mov eax, dword [esi + 8]
lea edi, [eax + 1]
mov eax, dword [esi + 0x10]
xor ebx, ebx
cmp eax, ebx
je 0x46dd64
push str.m_lpBuffer__NULL
lea eax, [esp + 0x38]
push str.ASSERT__s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
push 0x52f
push str..isoutils.h
mov ecx, 0x503ff0
call fcn.00423080
push edi
call fcn.004bf598
mov ecx, dword [esi + 4]
add esp, 4
cmp ecx, ebx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edi
jne 0x46dd7f
mov ecx, 0x4d68e8
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov edx, dword [esp + 0x444]
mov ecx, dword [esi + 0x10]
mov eax, dword [edx + 4]
cmp eax, ebx
jne 0x46dd9e
mov eax, 0x4d68e8
lea edx, [esp + 0x18]
push edx
mov edx, dword [ebp + 4]
push ecx
lea ecx, [esp + 0x1c]
push ecx
push ebx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp + 0xc], eax
mov edx, dword [esi + 0x10]
cmp edx, ebx
je 0x46dde6
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.0040695a
mov eax, dword [esi + 0x10]
push eax
call fcn.004be17b
add esp, 4
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
mov edx, dword [ebp + 0xc]
cmp edx, ebx
je 0x46de23
mov eax, dword [esp + 0x444]
mov ecx, 0x4d68e8
mov eax, dword [eax + 4]
cmp eax, ebx
je 0x46de02
mov ecx, eax
mov eax, dword [ebp + 0x18]
cmp eax, ebx
jne 0x46de0e
mov eax, 0x4d68e8
push ecx
push eax
push str.RegQueryValueEx:__s_:__s
push edx
push 0x503ff0
call fcn.00423520
add esp, 0x14
cmp dword [ebp + 0xc], ebx
je 0x46de78
mov ecx, dword [0x4d68ec]
lea edx, [esp + 0x44c]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.0040b3b2
mov eax, dword [esp + 0x45c]
mov dword [esp + 0x43c], 0xffffffff
cmp eax, ebx
je 0x46de65
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x45c], ebx
push 1
lea ecx, [esp + 0x450]
call fcn.00406ad6
jmp 0x46df9f
cmp dword [esp + 0x464], ebx
je 0x46df88
lea eax, [esp + 0x13]
lea ecx, [esp + 0x1c]
push eax
call fcn.0041dbef
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov eax, dword [esi + 4]
mov byte [esp + 0x43c], 3
cmp eax, ebx
jne 0x46deaf
mov eax, 0x4d68e8
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push eax
call ebx
mov ebp, eax
test ebp, ebp
jne 0x46dec4
mov eax, dword [esp + 0x24]
lea edi, [eax + 1]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x46df00
push str.m_lpBuffer__NULL
lea ecx, [esp + 0x38]
push str.ASSERT__s_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x34]
mov ecx, 0x503ff0
push edx
push 0x52f
push str..isoutils.h
call fcn.00423080
push edi
call fcn.004bf598
mov ecx, dword [esp + 0x24]
add esp, 4
test ecx, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edi
jne 0x46df1e
mov ecx, 0x4d68e8
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [esi + 4]
test eax, eax
jne 0x46df33
mov eax, 0x4d68e8
mov ecx, dword [esp + 0x2c]
push ebp
push ecx
push eax
call ebx
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
call fcn.0041c7e8
mov edx, dword [0x4d68ec]
lea eax, [esp + 0x1c]
push edx
push 0
push eax
mov ecx, esi
call fcn.0040b3b2
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x43c], 0
test eax, eax
je 0x46df7d
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x2c], 0
push 1
lea ecx, [esp + 0x20]
call fcn.00406ad6
lea ecx, [esp + 0x44c]
mov dword [esp + 0x43c], 0xffffffff
call fcn.00405d6e
mov ecx, dword [esp + 0x434]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x430
ret 0x24