Function at 0x408d20
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x43e885
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x44ef30]
xor eax, esp
mov dword [esp + 0x11c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44ef30]
xor eax, esp
push eax
lea eax, [esp + 0x134]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x24], 0x104
call fcn.00417947
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408d7f
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0x13c], 0
call fcn.00417947
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408db4
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
cmp byte [esi + 0x38], 0
mov byte [esp + 0x13c], 1
mov ecx, str.C:PADSViewer_Projects
jne 0x408ddc
mov ecx, str.C:PADS_Projects
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408de1
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00403650
push str.PADS_Projects
push str.Mentor_GraphicsPADS9_5
lea ecx, [esp + 0x30]
push str.Software_s_s
push ecx
call fcn.00404d40
add esp, 0xc
mov ecx, esp
mov dword [esp + 0x18], esp
push str.Configuring_PADS_Projects_directory
call fcn.004087b0
mov byte [esp + 0x140], 2
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], 1
call fcn.00404f60
push str.SDD_PADSPROJECTS_DIR
call fcn.00426e27
mov ebp, dword [esp + 0x2c]
add esp, 4
test eax, eax
je 0x408eb9
push str.SDD_PADSPROJECTS_DIR
call fcn.00426e27
add esp, 4
add esi, 0x24
test eax, eax
jne 0x408e6a
xor ecx, ecx
jmp 0x408e79
mov ecx, eax
lea edi, [ecx + 1]
nop
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x408e70
sub ecx, edi
push ecx
push eax
mov ecx, esi
call fcn.00403650
push ecx
mov edx, esp
mov dword [esp + 0x18], esp
push esi
push str.SDD_PADSPROJECTS_DIR_environment_variable_found:
push edx
call fcn.004052c0
add esp, 0xc
mov byte [esp + 0x140], 3
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], 1
call fcn.00404f60
jmp 0x4090d6
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.SDD_PADSPROJECTS_DIR_environment_not_found._Checking_registry
call fcn.004087b0
mov byte [esp + 0x140], 4
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], 1
call fcn.00404f60
lea eax, [esp + 0x18]
push eax
push 1
push 0
push ebp
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40902d
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
push eax
mov eax, dword [esp + 0x28]
push 0x441769
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408f74
lea ecx, [esp + 0x2c]
add esi, 0x24
push ecx
mov ecx, esi
call fcn.004073c0
push ecx
mov edx, esp
mov dword [esp + 0x18], esp
push esi
push str.PADS_Projects_directory_found_on_registry:
push edx
call fcn.004052c0
add esp, 0xc
mov byte [esp + 0x140], 5
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], 1
call fcn.00404f60
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4090d6
call fcn.00417947
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408f8e
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push ebp
lea ecx, [esp + 0x18]
push str.Could_not_open_registry_key__s_n
mov bl, 6
push ecx
mov byte [esp + 0x148], bl
call fcn.00404d40
add esp, 0xc
lea edx, [esp + 0x20]
add esi, 0x24
push edx
mov ecx, esi
call fcn.00404ac0
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.PADS_Projects_directory_not_found_on_registry
call fcn.004087b0
mov byte [esp + 0x140], 7
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], bl
call fcn.00404f60
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40901d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4090d6
call fcn.00417947
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x409047
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push ebp
lea ecx, [esp + 0x18]
push str.Could_not_open_registry_key__s_n
mov bl, 8
push ecx
mov byte [esp + 0x148], bl
call fcn.00404d40
add esp, 0xc
lea edx, [esp + 0x20]
add esi, 0x24
push edx
mov ecx, esi
call fcn.00404ac0
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.PADS_Projects_directory_not_found_on_registry
call fcn.004087b0
mov byte [esp + 0x140], 9
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], bl
call fcn.00404f60
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4090d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push ebp
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x409265
mov eax, dword [esi]
mov edi, dword [eax - 0xc]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, edi
or eax, ecx
jge 0x409122
push edi
mov ecx, esi
call fcn.00402830
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
inc edi
push edi
push eax
push 1
push 0
push 0x441769
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
mov eax, dword [esi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x409158
push ecx
push eax
call fcn.004254fa
add esp, 8
test eax, eax
jl 0x40925b
mov ecx, dword [esi]
cmp eax, dword [ecx - 8]
jg 0x40925b
mov dword [ecx - 0xc], eax
mov edx, dword [esi]
mov byte [eax + edx], 0
test edi, edi
jne 0x4091b2
push ecx
mov eax, esp
mov dword [esp + 0x20], esp
push esi
push str.Registry_updated_with_PADS_Projects_directory:
push eax
call fcn.004052c0
add esp, 0xc
mov byte [esp + 0x140], 0xa
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], 1
call fcn.00404f60
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4092fe
call fcn.00417947
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4091cc
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push ebp
lea ecx, [esp + 0x18]
push str.Could_not_write_PADS_Projects_value_to_registry:__s_s_n
mov bl, 0xb
push ecx
mov byte [esp + 0x148], bl
call fcn.00404d40
add esp, 8
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Could_not_write_PADS_Projects_value_to_registry
call fcn.004087b0
mov byte [esp + 0x140], 0xc
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], bl
call fcn.00404f60
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40924b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4092fe
push 0x80070057
call fcn.004010a0
call fcn.00417947
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40927f
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push ebp
lea ecx, [esp + 0x18]
push str.Could_not_create_registry_key__s_n
mov bl, 0xd
push ecx
mov byte [esp + 0x148], bl
call fcn.00404d40
add esp, 8
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Could_not_create_registry_key
call fcn.004087b0
mov byte [esp + 0x140], 0xe
call fcn.004038f0
mov ecx, eax
mov byte [esp + 0x140], bl
call fcn.00404f60
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4092fe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x13c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409322
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x13c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40934d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.00425da1
add esp, 0x12c
ret