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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd0
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push dword [ebp - 8]
push SysReAllocStringLen
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
je 0x4046c6
xor eax, eax
jmp 0x404977
mov dword [ebp - 0x24], 0xff
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp - 0x230]
push ecx
lea eax, [ebp - 0x20]
push eax
push 0
push 0x6edb9b
push dword [ebp - 0x10]
call sub.ADVAPI32.DLL_RegQueryValueExA
lea edx, [ebp - 0x14]
push edx
push 0x20019
push 0
lea ecx, [ebp - 0x230]
push ecx
push SysReAllocStringLen
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
je 0x40471a
push dword [ebp - 0x10]
call sub.ADVAPI32.DLL_RegCloseKey
xor eax, eax
jmp 0x404977
mov dword [ebp - 0x24], 0xff
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp - 0x230]
push ecx
lea eax, [ebp - 0x20]
push eax
push 0
push 0x6edb9c
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegQueryValueExA
push 0x18
call fcn.0066c62c
pop ecx
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x30]
test edx, edx
jne 0x40477a
push 0x59fa
call fcn.00402b9c
pop ecx
push eax
mov ecx, dword [sym.UltraISO.exe__frmMain]
mov eax, dword [ecx]
call fcn.00640b4c
push eax
call fcn.00462a84
add esp, 8
xor eax, eax
jmp 0x404977
push 0x18
push 0
push dword [ebp - 0x30]
call fcn.0066cc88
add esp, 0xc
mov edx, dword [0x6ebf0c]
test edx, edx
jne 0x40479c
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ecx], eax
jmp 0x4047a7
mov edx, dword [0x6ebf0c]
mov ecx, dword [ebp - 0x30]
mov dword [ecx], edx
mov eax, dword [ebp - 0x30]
mov dword [0x6ebf0c], eax
inc dword [0x6ebf14]
mov edx, dword [ebp - 8]
inc edx
push edx
call fcn.0066cfd0
pop ecx
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 8], eax
mov al, byte [ebp - 0x230]
test al, al
jne 0x4047e4
push dword [0x833724]
call fcn.0066cfd0
pop ecx
mov edx, dword [ebp - 0x30]
mov dword [edx + 0x10], eax
jmp 0x4047f7
lea ecx, [ebp - 0x230]
push ecx
call fcn.0066cfd0
pop ecx
mov edx, dword [ebp - 0x30]
mov dword [edx + 0x10], eax
push dword [ebp - 0x30]
call fcn.00435570
pop ecx
mov eax, dword [ebp - 0x30]
xor ecx, ecx
mov dword [eax + 0xc], ecx
lea eax, [ebp - 0x18]
push eax
push 0x20019
push 0
push 0x6edb9d
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x4048b1
mov dword [ebp - 0x24], 0xff
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp - 0x230]
push ecx
lea eax, [ebp - 0x20]
push eax
push 0
push 0x6edbb0
push dword [ebp - 0x18]
call sub.ADVAPI32.DLL_RegQueryValueExA
mov edx, dword [ebp - 0x20]
cmp edx, 2
jne 0x404890
mov ecx, dword [ebp - 0x24]
add ecx, 0xa
push ecx
call fcn.0066c62c
pop ecx
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x24]
push dword [ebp - 0x2c]
lea eax, [ebp - 0x230]
push eax
call sub.KERNEL32.DLL_ExpandEnvironmentStringsA
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00404124
push dword [ebp - 0x2c]
call fcn.0066c63c
pop ecx
jmp 0x4048a9
mov edx, dword [ebp - 0x20]
cmp edx, 1
jne 0x4048a9
lea edx, [ebp - 0x230]
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 4]
call fcn.00404124
push dword [ebp - 0x18]
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, dword [ebp - 0x30]
xor edx, edx
mov dword [eax + 4], edx
lea ecx, [ebp - 0x18]
push ecx
push 0x20019
push 0
push 0x6edbb1
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x404962
mov dword [ebp - 0x24], 0xff
lea eax, [ebp - 0x24]
push eax
lea edx, [ebp - 0x230]
push edx
lea ecx, [ebp - 0x20]
push ecx
push 0
push 0x6edbbd
push dword [ebp - 0x18]
call sub.ADVAPI32.DLL_RegQueryValueExA
mov eax, dword [ebp - 0x20]
cmp eax, 2
jne 0x404941
mov edx, dword [ebp - 0x24]
add edx, 0xa
push edx
call fcn.0066c62c
pop ecx
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x24]
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x230]
push ecx
call sub.KERNEL32.DLL_ExpandEnvironmentStringsA
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00404294
push dword [ebp - 0x2c]
call fcn.0066c63c
pop ecx
jmp 0x40495a
mov eax, dword [ebp - 0x20]
cmp eax, 1
jne 0x40495a
lea edx, [ebp - 0x230]
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 4]
call fcn.00404294
push dword [ebp - 0x18]
call sub.ADVAPI32.DLL_RegCloseKey
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegCloseKey
push dword [ebp - 0x10]
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, 1
mov esp, ebp
pop ebp
ret