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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4d7f08
push eax
mov eax, dword [ebp + 0x14]
mov dword fs:[0], esp
sub esp, 0x248
push ebx
xor ebx, ebx
cmp eax, ebx
je 0x407ad0
mov ecx, dword [eax + 4]
cmp ecx, ebx
je 0x407ac4
xor edx, edx
mov word [ecx], dx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov dword [eax + 8], ebx
mov byte [eax + 0x14], bl
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x407e21
cmp word [eax], bx
je 0x407e21
push esi
push edi
push eax
call fcn.004c62c0
mov esi, eax
push esi
call fcn.004c62f0
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x2c], bl
neg eax
sbb eax, eax
push ebx
not eax
push ebx
and eax, 0x4e4b38
push eax
push esi
push 0x4e59a0
mov dword [ebp - 4], ebx
call fcn.0044c5d0
add esp, 0x1c
push eax
lea ecx, [ebp - 0x40]
call fcn.004070e0
xor edi, edi
mov dword [ebp - 0x48], 0x200
mov dword [ebp - 0x44], 0x100
mov dword [ebp - 0x1c], edi
mov byte [ebp + 0xb], 0
cmp edi, ebx
je 0x407b58
call fcn.004c6070
test al, al
je 0x407b58
mov eax, dword [ebp + edi*4 - 0x4c]
jmp 0x407b5a
xor eax, eax
cmp edi, 2
jne 0x407b67
cmp eax, ebx
je 0x407dba
mov edx, dword [ebp - 0x3c]
or eax, 0x20019
lea ecx, [ebp - 0x18]
push ecx
push eax
xor eax, eax
cmp edi, ebx
setne al
push ebx
push edx
add eax, 0x80000001
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x407dad
push 0x208
lea edx, [ebp - 0x252]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0x254], cx
call fcn.004c9b50
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x254]
push ecx
lea edx, [ebp - 0x24]
push edx
push ebx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
mov dword [ebp - 0x14], 0x208
call ebx
test eax, eax
jne 0x407d9b
mov eax, dword [ebp - 0x24]
cmp eax, 1
jne 0x407beb
lea esi, [ebp - 0x254]
jmp 0x407c0d
cmp eax, 2
jne 0x407d9b
lea ecx, [ebp - 0x254]
push ecx
call fcn.004c6380
mov esi, eax
add esp, 4
test esi, esi
je 0x407d9b
push 1
push esi
call fcn.004c6330
mov edi, eax
push 0
push edi
call fcn.004c5850
add esp, 0x10
test al, al
je 0x407d98
mov ecx, dword [ebp + 0xc]
push 0xffffffffffffffff
push edi
call fcn.00407140
lea edx, [ebp - 0x254]
mov byte [ebp + 0xb], 1
cmp esi, edx
je 0x407c4c
push esi
call fcn.0044c4f0
add esp, 4
cmp byte [ebp + 0x10], 0
je 0x407d98
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
push 0
lea ecx, [ebp - 0x24]
push ecx
push 0
push str.PATH
push edx
mov dword [ebp - 0x14], 0
call ebx
test eax, eax
jne 0x407d98
cmp dword [ebp - 0x14], eax
je 0x407d98
push str.PATH
call fcn.004c6e90
mov esi, eax
mov eax, dword [ebp - 0x14]
add eax, 4
push 1
push eax
call fcn.0044c490
mov edi, eax
add esp, 0xc
mov dword [ebp - 0x28], 0
test edi, edi
je 0x407d7b
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
push ecx
push edi
lea edx, [ebp - 0x24]
push edx
push 0
push str.PATH
push eax
call ebx
test eax, eax
jne 0x407d72
cmp word [edi], ax
je 0x407d72
test esi, esi
je 0x407cea
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x20], eax
jmp 0x407cf1
mov dword [ebp - 0x20], 0
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
cmp dword [ebp - 0x20], ebx
mov byte [ebp - 0xd], 1
jl 0x407d3d
movzx eax, word [esi + ebx*2]
cmp ax, 0x3b
je 0x407d12
test ax, ax
jne 0x407d3d
movzx ecx, ax
push edi
xor edx, edx
push esi
mov dword [ebp - 0x20], ecx
mov word [esi + ebx*2], dx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x407d2e
xor al, al
jmp 0x407d31
mov al, byte [ebp - 0xd]
mov cx, word [ebp - 0x20]
mov word [esi + ebx*2], cx
test al, al
je 0x407d72
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x407d4a
push esi
call fcn.004071d0
push 0
push 0
push esi
push 0x4e599c
push edi
call fcn.0044c5d0
add esp, 0x14
mov dword [ebp - 0x28], eax
test eax, eax
je 0x407d72
mov edx, eax
push edx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
call fcn.0044c4f0
add esp, 4
test esi, esi
je 0x407d88
push esi
call fcn.0044c4f0
add esp, 4
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x407d98
push eax
call fcn.0044c4f0
add esp, 4
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp + 0xb], 0
jne 0x407dff
xor ebx, ebx
inc edi
cmp edi, 3
mov dword [ebp - 0x1c], edi
jl 0x407b41
cmp byte [ebp - 0x2c], 0
mov esi, dword [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
je 0x407ddf
cmp esi, ebx
je 0x407dec
cmp word [esi], bx
je 0x407ddf
push esi
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp esi, ebx
je 0x407dec
push esi
call fcn.0044c4f0
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.004070a0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
xor al, al
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret