Function at 0x4aeb60
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x4aedeb
cmp dword [esi + 8], 0
je 0x4aebb9
mov eax, dword [esi + 4]
sub eax, 0
je 0x4aeb8c
sub eax, 1
je 0x4aeb9b
sub eax, 1
jne 0x4aebb9
jmp 0x4aeb9b
call fcn.004ad0f0
test eax, eax
lea eax, [esi + 0x424]
jne 0x4aeba1
lea eax, [esi + 0x21c]
test eax, eax
je 0x4aebb9
cmp word [eax], 0
je 0x4aebb9
push eax
push str.ComSpec
call fcn.004adfc0
add esp, 8
cmp dword [esi + 0xc], 0
je 0x4aedeb
cmp byte [ebp + 0xc], 0
jne 0x4aedeb
cmp word [esi + 0x62c], 0
push edi
lea edi, [esi + 0x62c]
je 0x4aedea
cmp word [esi + 0x834], 0
lea eax, [esi + 0x834]
mov dword [ebp - 0x14], eax
je 0x4aedea
push ebx
push 0x7d0
push 0x4cd0c4
call fcn.004adf10
mov ebx, eax
add esp, 8
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x4aed99
cmp word [ebx], 0
push ebx
je 0x4aed87
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
mov dword [ebp - 0x10], eax
call fcn.00441380
push 0x208
mov dword [ebp - 0xc], eax
call fcn.004412a0
add esp, 8
cmp dword [ebp - 0xc], 0
mov edi, eax
je 0x4aed78
test edi, edi
je 0x4aed6c
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
push eax
push ecx
mov byte [ebp - 1], 0
xor ebx, ebx
call dword [sym.imp.USER32.dll_CharUpperBuffW]
xor eax, eax
mov dword [ebp - 0x10], eax
sub eax, 0
je 0x4aeca8
sub eax, 1
jne 0x4aecb8
test byte [esi + 0xc], 1
je 0x4aed44
lea eax, [esi + 0x62c]
push eax
mov dword [ebp - 0x14], eax
lea eax, [esi + 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4aed44
mov ebx, dword [ebp - 0x14]
jmp 0x4aecb8
test byte [esi + 0xc], 2
je 0x4aed44
lea ebx, [esi + 0x834]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x104
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push esi
push edi
call dword [sym.imp.USER32.dll_CharUpperBuffW]
mov edx, dword [ebp - 0xc]
push edi
push edx
call fcn.004b138a
add esp, 8
test eax, eax
je 0x4aed10
jmp 0x4aecf0
movzx ecx, word [eax + esi*2]
lea eax, [eax + esi*2]
cmp cx, 0x3b
je 0x4aed41
test cx, cx
je 0x4aed41
push edi
push eax
call fcn.004b138a
add esp, 8
test eax, eax
jne 0x4aecf0
mov eax, dword [ebp - 8]
push 0
push eax
push 0x4d3680
push ebx
call fcn.004413d0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4aed54
mov eax, dword [ebp - 8]
test eax, eax
je 0x4aed3a
push eax
call fcn.00441300
add esp, 4
mov dword [ebp - 8], esi
mov byte [ebp - 1], 1
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
inc eax
cmp eax, 1
mov dword [ebp - 0x10], eax
jle 0x4aec70
cmp byte [ebp - 1], 0
je 0x4aed69
mov ecx, dword [ebp - 8]
push ecx
push 0x4cd0c4
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
push edx
call fcn.00441300
add esp, 4
test edi, edi
je 0x4aeddc
push edi
call fcn.00441300
add esp, 4
jmp 0x4aeddc
call fcn.00441300
mov dword [ebp - 8], 0
mov ebx, dword [ebp - 8]
add esp, 4
mov esi, dword [ebp - 0x14]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4aedb6
push edi
push 0x4cd0c4
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x4aeddc
push 0x4d3680
push esi
push 0x4d3680
push edi
call fcn.004413d0
add esp, 0x10
push eax
push 0x4cd0c4
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x4aede9
push ebx
call fcn.00441300
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret