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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x634
mov eax, dword [0x46700c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor eax, eax
push edi
inc eax
mov dword [ebp - reloc.ADVAPI32.dll_TraceMessage], eax
mov dword [ebp - reloc.ADVAPI32.dll_TraceMessage], eax
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
xor ebx, ebx
push 0x101
push ebx
push 0x421fd0
push 0x80000002
mov dword [ebp - reloc.ADVAPI32.dll_TraceMessage], ebx
mov dword [ebp - reloc.ADVAPI32.dll_TraceMessage], ebx
mov edi, ebx
call esi
test eax, eax
je 0x454416
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
push 0x101
push ebx
push 0x422068
push 0x80000002
mov dword [ebp - reloc.ADVAPI32.dll_TraceMessage], 2
call esi
test eax, eax
jne 0x4545af
push 0x4220e4
push 4
call fcn.004400fc
cmp dword [ebp - reloc.ADVAPI32.dll_TraceMessage], ebx
je 0x4545a3
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
push ebx
push 0x41e648
push dword [ebp - 0x624]
mov esi, 0x208
mov dword [ebp - reloc.ADVAPI32.dll_TraceMessage], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4544d3
cmp dword [ebp - reloc.ADVAPI32.dll_TraceMessage], 2
je 0x454476
cmp dword [ebp - reloc.ADVAPI32.dll_TraceMessage], 1
jne 0x4544d3
xor edi, edi
inc edi
cmp dword [ebp - reloc.ADVAPI32.dll_TraceMessage], 2
jne 0x4544d3
push 0x104
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4544b6
mov eax, esi
lea edx, reloc.ADVAPI32.dll_TraceMessage
lea esi, reloc.ADVAPI32.dll_TraceMessage
call fcn.0042c8be
test eax, eax
jns 0x4544d3
push 0x422108
push 4
call fcn.004400fc
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4545af
push dword [ebp - 0x624]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
test edi, edi
je 0x4545a3
push ebx
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
push ebx
push 0x20106
push ebx
push ebx
push ebx
push 0x4016a0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x454533
push 4
lea eax, reloc.ADVAPI32.dll_TraceMessage
push eax
push 4
push ebx
push 0x421ac0
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x624]
call esi
cmp dword [ebp - reloc.ADVAPI32.dll_TraceMessage], 2
jne 0x454541
call fcn.00454148
mov esi, dword [sym.imp.msvcrt.dll_wcsstr]
lea eax, reloc.ADVAPI32.dll_TraceMessage
push 0x422140
push eax
call esi
pop ecx
pop ecx
test eax, eax
je 0x45459f
lea eax, reloc.ADVAPI32.dll_TraceMessage
push 0x422158
push eax
call esi
pop ecx
pop ecx
test eax, eax
je 0x45459f
push eax
push 0x422160
mov eax, 0x208
lea ecx, reloc.ADVAPI32.dll_TraceMessage
call fcn.0042c99c
pop ecx
pop ecx
test eax, eax
js 0x45459f
push 0xffff
push 1
lea ecx, reloc.ADVAPI32.dll_TraceMessage
push ecx
push ebx
call fcn.0044328c
mov eax, edi
jmp 0x4545b1
push 0x422108
push 4
call fcn.004400fc
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004655f1
leave
ret