Function at 0x417390
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov edx, dword [str.SH_OPTION_SETTINGS_RESTORED]
push ebx
push esi
lea eax, [ebp - 0x18]
push edi
lea ecx, [ebp - 0x10]
push eax
push ecx
push 0
push 0x40
push edx
call fcn.0040b290
add esp, 0x14
test eax, eax
je 0x4173ea
cmp eax, 0x457ea0
je 0x4173ea
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4173ea
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x4173db
push eax
call fcn.0040ac40
add esp, 4
jmp 0x4173ea
mov ecx, dword [ebp - 0x10]
push 0
push ecx
push eax
call fcn.0040a4c0
add esp, 0xc
mov ecx, dword [str.SoftwareMortice_Kern_SystemsToolkitShell]
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0xc]
push edx
push eax
push 0
push 1
push 0
push 0x44b560
push 0
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
mov dword [0x4586cc], eax
jne 0x4176f2
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [ebp - 8]
lea eax, [ebp - 0x14]
push edx
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 4]
push eax
push ecx
push 0
mov edi, 4
push str.RestoreOptionSettings
push edx
mov dword [ebp - 8], edi
call esi
test eax, eax
mov dword [0x4586cc], eax
jne 0x4176e8
cmp dword [ebp - 4], edi
jne 0x4176e8
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4176e8
mov ecx, dword [str.SH_OPTION_SETTINGS_RESTORED]
lea eax, [ebp - 0x10]
push 0
push eax
push 0
push 0x40
push ecx
call fcn.0040b290
add esp, 0x14
test eax, eax
je 0x417499
cmp eax, 0x457ea0
je 0x417499
mov edx, dword [ebp - 0x10]
push 1
push edx
push eax
call fcn.0040a720
add esp, 0xc
lea eax, [ebp - 8]
lea ecx, [ebp - 0x41c]
push eax
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 4]
push ecx
push edx
push 0
push str.OptionSettings
push eax
mov dword [ebp - 8], 0x400
call esi
test eax, eax
mov dword [0x4586cc], eax
jne 0x417568
cmp dword [ebp - 4], 1
jne 0x417568
mov al, byte [ebp - 0x41c]
lea edi, [ebp - 0x41c]
test al, al
je 0x417568
jmp 0x4174ef
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push edi
call fcn.00429700
add esp, 4
cmp eax, 3
jb 0x417568
push 3
push 0x444548
push edi
call fcn.0042e620
mov esi, eax
add esp, 0xc
neg esi
sbb esi, esi
add edi, 3
push 0x20
push edi
inc esi
call fcn.0042d3b0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41752b
mov byte [ebx], 0
push str.login
push edi
call fcn.0042a7d0
add esp, 8
test eax, eax
je 0x417554
push edi
call fcn.00409e10
add esp, 4
test eax, eax
je 0x417554
push esi
push eax
call fcn.00409e90
add esp, 8
test ebx, ebx
je 0x417562
mov al, byte [ebx + 1]
lea edi, [ebx + 1]
test al, al
jne 0x4174e9
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [ebp - 8]
lea edx, [ebp - 0x41c]
push ecx
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 4]
push edx
push eax
push 0
mov edi, 0x400
push 0x442f18
push ecx
mov dword [ebp - 8], edi
call esi
test eax, eax
mov dword [0x4586cc], eax
mov ebx, 1
jne 0x4175b6
cmp dword [ebp - 4], ebx
jne 0x4175b6
mov eax, dword [0x442ca0]
lea edx, [ebp - 0x41c]
push edx
push 0
push eax
call fcn.0040a4c0
add esp, 0xc
lea ecx, [ebp - 8]
lea edx, [ebp - 0x41c]
push ecx
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 4]
push edx
push eax
push 0
push 0x442f14
push ecx
mov dword [ebp - 8], edi
call esi
test eax, eax
mov dword [0x4586cc], eax
jne 0x4175fa
cmp dword [ebp - 4], ebx
jne 0x4175fa
mov eax, dword [0x442cb0]
lea edx, [ebp - 0x41c]
push edx
push 0
push eax
call fcn.0040a4c0
add esp, 0xc
lea ecx, [ebp - 8]
lea edx, [ebp - 0x41c]
push ecx
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 4]
push edx
push eax
push 0
push 0x442f0c
push ecx
mov dword [ebp - 8], edi
call esi
test eax, eax
mov dword [0x4586cc], eax
jne 0x41763e
cmp dword [ebp - 4], ebx
jne 0x41763e
mov eax, dword [0x442cc0]
lea edx, [ebp - 0x41c]
push edx
push 0
push eax
call fcn.0040a4c0
add esp, 0xc
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 4]
push 0x457d80
push edx
push 0
push str.HISTSIZE
push eax
mov dword [ebp - 8], edi
call esi
test eax, eax
mov dword [0x4586cc], eax
jne 0x41768a
cmp dword [ebp - 4], 4
jne 0x41768a
mov ecx, dword [0x457d80]
push ecx
push 0
push ebx
push str.HISTSIZE
call fcn.0040a210
add esp, 8
push eax
call fcn.0040a720
add esp, 0xc
lea edx, [ebp - 8]
lea eax, [ebp - 0x41c]
push edx
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 4]
push eax
push ecx
push 0
push str.HISTFILE
push edx
mov dword [ebp - 8], edi
call esi
test eax, eax
mov dword [0x4586cc], eax
jne 0x4176d7
cmp dword [ebp - 4], ebx
jne 0x4176d7
push ebx
push str.HISTFILE
call fcn.0040a210
add esp, 8
lea ecx, [ebp - 0x41c]
push ecx
push 0
push eax
call fcn.0040a4c0
add esp, 0xc
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret