Function at 0x4d1a85
Capabilities:
Set environment variable

Disassembly:
push ecx
push ecx
and dword [esp], 0
push ebp
mov ebp, dword [esp + 0x10]
push edi
test ebp, ebp
jne 0x4d1aaa
call fcn.004c2a7f
mov dword [eax], 0x16
call fcn.004c40ce
or eax, 0xffffffff
jmp 0x4d1b23
push ebx
mov ebx, dword [ebp]
push esi
test ebx, ebx
je 0x4d1b13
push 0x3d
push ebx
call fcn.004d204c
mov esi, eax
mov dword [esp + 0x1c], esi
pop ecx
pop ecx
test esi, esi
je 0x4d1b13
cmp ebx, esi
je 0x4d1b13
mov edi, dword [0x528f0c]
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [esp + 0x1c], eax
cmp edi, dword [0x528f2c]
jne 0x4d1af8
push edi
call fcn.004d1cef
mov edi, eax
mov eax, dword [esp + 0x20]
pop ecx
mov dword [0x528f0c], edi
test edi, edi
jne 0x4d1b6b
cmp dword [esp + 0x20], edi
je 0x4d1b28
cmp dword [0x528f10], edi
je 0x4d1b28
call fcn.004cf425
test eax, eax
je 0x4d1b61
call fcn.004c2a7f
mov dword [eax], 0x16
or eax, 0xffffffff
pop esi
pop ebx
pop edi
pop ebp
pop ecx
pop ecx
ret
test eax, eax
jne 0x4d1cdb
push 4
call fcn.004c296d
mov dword [0x528f0c], eax
pop ecx
test eax, eax
je 0x4d1b1e
and dword [eax], 0
cmp dword [0x528f10], 0
jne 0x4d1b61
push 4
call fcn.004c296d
mov dword [0x528f10], eax
pop ecx
test eax, eax
je 0x4d1b1e
and dword [eax], 0
mov edi, dword [0x528f0c]
test edi, edi
je 0x4d1b1e
mov eax, esi
sub eax, ebx
push eax
push ebx
call fcn.004d1d4e
mov esi, eax
pop ecx
pop ecx
test esi, esi
js 0x4d1c85
cmp dword [edi], 0
je 0x4d1c85
push dword [edi + esi*4]
call fcn.004bb566
cmp dword [esp + 0x20], 0
pop ecx
jne 0x4d1c4c
mov dword [edi + esi*4], ebx
and dword [ebp], 0
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x20], 0
je 0x4d1c2c
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4d1bb6
sub ecx, edx
push 1
lea eax, [ecx + 2]
push eax
call fcn.004c2925
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4d1c2c
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4d1bd7
sub ecx, edx
push ebx
lea eax, [ecx + 2]
push eax
push esi
call fcn.004cc01d
add esp, 0xc
test eax, eax
jne 0x4d1ce2
mov eax, esi
xor ecx, ecx
sub eax, ebx
add eax, dword [esp + 0x14]
mov byte [eax], 0
inc eax
test edi, edi
cmovne eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x4d1c25
or dword [esp + 0x10], 0xffffffff
call fcn.004c2a7f
mov dword [eax], 0x2a
push esi
call fcn.004bb566
pop ecx
test edi, edi
je 0x4d1c3b
push ebx
call fcn.004bb566
and dword [ebp], 0
pop ecx
mov eax, dword [esp + 0x10]
jmp 0x4d1b21
mov eax, dword [edi + esi*4 + 4]
mov dword [edi + esi*4], eax
inc esi
cmp dword [edi + esi*4], 0
jne 0x4d1c44
cmp esi, 0x3fffffff
jae 0x4d1ba6
push 4
push esi
push dword [0x528f0c]
call fcn.004c29fe
mov edi, dword [esp + 0x28]
add esp, 0xc
test eax, eax
je 0x4d1baa
mov dword [0x528f0c], eax
jmp 0x4d1baa
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4d1cd0
test esi, esi
jns 0x4d1c93
neg esi
lea eax, [esi + 2]
cmp eax, esi
jl 0x4d1b1e
cmp eax, 0x3fffffff
jae 0x4d1b1e
push eax
push 4
push dword [0x528f0c]
call fcn.004c29fe
add esp, 0xc
test eax, eax
je 0x4d1b1e
and dword [eax + esi*4 + 4], 0
mov dword [eax + esi*4], ebx
and dword [ebp], 0
jmp 0x4d1c7b
push ebx
call fcn.004bb566
and dword [ebp], 0
pop ecx
xor eax, eax
jmp 0x4d1b21
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004c40de
int3