Function at 0x42252005
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4226993c
mov eax, dword fs:[0]
push eax
sub esp, 0x6e0
mov eax, dword [0x42278bb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x4229ef58], 0
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
jne 0x422521c0
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x42251e0f
movzx eax, word [ebx]
mov ecx, 0x34
cmp cx, ax
jbe 0x42251e0f
mov ecx, 0x32
cmp cx, ax
ja 0x42251dc6
cmp word [ebx + 2], 0x2e
jne 0x42251e0f
mov ecx, str.3.393
mov eax, ebx
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x42251dff
test dx, dx
je 0x42251df2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x42251dff
add eax, 4
add ecx, 4
test dx, dx
jne 0x42251dd0
xor eax, eax
test eax, eax
setns byte [ebp - 0x6e5]
jmp 0x42251e16
sbb eax, eax
or eax, 1
test eax, eax
setns byte [ebp - 0x6e5]
jmp 0x42251e16
mov byte [ebp - 0x6e5], 1
lea ecx, [ebp - 0x634]
call fcn.422476b0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x6e4]
call fcn.422476b0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x634]
push eax
push str.TEMP
call fcn.42252c60
lea eax, [ebp - 0x6e4]
push eax
push str.USERPROFILE
call fcn.42252c60
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x424], ax
lea eax, [ebp - 0x422]
push eax
call fcn.42254ce0
push 0x104
lea eax, [ebp - 0x424]
push eax
push 0
push 0
call fcn.42251c00
add esp, 0x2c
test eax, eax
jne 0x42251ea2
lea eax, [ebp - 0x424]
push eax
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x6ec]
mov dword [ebp - 0x6ec], 0
push eax
push 0x20019
push 0
push str.Environment
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x42251f0f
push 0x104
lea eax, [ebp - 0x424]
push eax
push str.TEMP
push dword [ebp - 0x6ec]
call fcn.42251950
add esp, 0x10
test eax, eax
jne 0x42251f03
lea eax, [ebp - 0x424]
push eax
push str.TEMP
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 0x6ec]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push 3
push esi
push 0
push 0x16
push 0x4226b640
mov dword [0x4229ef58], 1
call fcn.422517f0
add esp, 0x18
cmp byte [ebp - 0x6e5], 0
je 0x42251f4c
push edi
push 3
push esi
push 0
push 0xd
push 0x4226b748
call fcn.422517f0
add esp, 0x18
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.42254ce0
add esp, 0xc
test ebx, ebx
je 0x42251fea
mov eax, 0x35
cmp ax, word [ebx]
jae 0x42251fea
push 0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x25
call fcn.42251a50
add esp, 0x10
test eax, eax
jne 0x42251fae
push edi
push 3
push 3
push esi
lea eax, [ebp - 0x218]
push eax
push str.SystemSystem
call fcn.42251210
add esp, 0x18
mov ecx, 0x4229ed68
call fcn.4224a610
test al, al
je 0x422520e3
push 0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x29
call fcn.42251a50
add esp, 0x10
test eax, eax
jne 0x422520e3
push edi
push 3
push 2
jmp 0x422520ce
mov ecx, 0x4229ed68
call fcn.4224a610
test al, al
je 0x422520ad
push edi
push 3
push esi
push 0x100
push 2
push 0x4226b7e4
call fcn.422517f0
push 0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x25
call fcn.42251a50
add esp, 0x28
test eax, eax
jne 0x42252047
push edi
push 1
push 3
push esi
lea eax, [ebp - 0x218]
push eax
push str.SystemSystem_x64_
call fcn.42251210
add esp, 0x18
push 0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x25
call fcn.42251a50
add esp, 0x10
test eax, eax
jne 0x4225207d
push edi
push 2
push 2
push esi
lea eax, [ebp - 0x218]
push eax
push str.SystemSystem
call fcn.42251210
add esp, 0x18
push 0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x25
call fcn.42251a50
add esp, 0x10
test eax, eax
jne 0x422520e3
push edi
push 2
push 1
push esi
lea eax, [ebp - 0x218]
push eax
push str.SystemSystem_x64_
jmp 0x422520db
push 0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x25
call fcn.42251a50
add esp, 0x10
test eax, eax
jne 0x422520e3
push edi
push 3
push 3
push esi
lea eax, [ebp - 0x218]
push eax
push str.SystemSystem
call fcn.42251210
add esp, 0x18
cmp byte [ebp - 0x6e5], 0
je 0x4225217f
lea ecx, [ebp - 0x4d4]
call fcn.422476b0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x4d4]
push eax
push str.TEMP
call fcn.42252c60
add esp, 8
test al, al
je 0x42252170
lea ecx, [ebp - 0x584]
call fcn.422476b0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x584]
push eax
push dword [ebp - 0x4d4]
call dword [section..data]
add esp, 8
push edi
push 3
push 3
push esi
test eax, eax
js 0x4225214e
push dword [ebp - 0x584]
jmp 0x42252154
push dword [ebp - 0x4d4]
push str.Temp
call fcn.42251210
add esp, 0x18
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x584]
call fcn.42247740
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4d4]
call fcn.42247740
push dword [ebp - 0x634]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push str.TEMP
call ebx
push dword [ebp - 0x6e4]
push str.USERPROFILE
call ebx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x6e4]
call fcn.42247740
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x634]
call fcn.42247740
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.42252e9b
mov esp, ebp
pop ebp
ret