Function at 0x4cb898
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 0x4cb8bd
call fcn.004bc77f
mov dword [eax], 0x16
call fcn.004bdd46
or eax, 0xffffffff
jmp 0x4cb936
push ebx
mov ebx, dword [ebp]
push esi
test ebx, ebx
je 0x4cb926
push 0x3d
push ebx
call fcn.004cbe5f
mov esi, eax
mov dword [esp + 0x1c], esi
pop ecx
pop ecx
test esi, esi
je 0x4cb926
cmp ebx, esi
je 0x4cb926
mov edi, dword [0x520ca4]
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [esp + 0x1c], eax
cmp edi, dword [0x520cc4]
jne 0x4cb90b
push edi
call fcn.004cbb02
mov edi, eax
mov eax, dword [esp + 0x20]
pop ecx
mov dword [0x520ca4], edi
test edi, edi
jne 0x4cb97e
cmp dword [esp + 0x20], edi
je 0x4cb93b
cmp dword [0x520ca8], edi
je 0x4cb93b
call fcn.004c9239
test eax, eax
je 0x4cb974
call fcn.004bc77f
mov dword [eax], 0x16
or eax, 0xffffffff
pop esi
pop ebx
pop edi
pop ebp
pop ecx
pop ecx
ret
test eax, eax
jne 0x4cbaee
push 4
call fcn.004bc66d
mov dword [0x520ca4], eax
pop ecx
test eax, eax
je 0x4cb931
and dword [eax], 0
cmp dword [0x520ca8], 0
jne 0x4cb974
push 4
call fcn.004bc66d
mov dword [0x520ca8], eax
pop ecx
test eax, eax
je 0x4cb931
and dword [eax], 0
mov edi, dword [0x520ca4]
test edi, edi
je 0x4cb931
mov eax, esi
sub eax, ebx
push eax
push ebx
call fcn.004cbb61
mov esi, eax
pop ecx
pop ecx
test esi, esi
js 0x4cba98
cmp dword [edi], 0
je 0x4cba98
push dword [edi + esi*4]
call fcn.004b592c
cmp dword [esp + 0x20], 0
pop ecx
jne 0x4cba5f
mov dword [edi + esi*4], ebx
and dword [ebp], 0
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x20], 0
je 0x4cba3f
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb9c9
sub ecx, edx
push 1
lea eax, [ecx + 2]
push eax
call fcn.004bc625
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4cba3f
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb9ea
sub ecx, edx
push ebx
lea eax, [ecx + 2]
push eax
push esi
call fcn.004c5c8d
add esp, 0xc
test eax, eax
jne 0x4cbaf5
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 0x4cba38
or dword [esp + 0x10], 0xffffffff
call fcn.004bc77f
mov dword [eax], 0x2a
push esi
call fcn.004b592c
pop ecx
test edi, edi
je 0x4cba4e
push ebx
call fcn.004b592c
and dword [ebp], 0
pop ecx
mov eax, dword [esp + 0x10]
jmp 0x4cb934
mov eax, dword [edi + esi*4 + 4]
mov dword [edi + esi*4], eax
inc esi
cmp dword [edi + esi*4], 0
jne 0x4cba57
cmp esi, 0x3fffffff
jae 0x4cb9b9
push 4
push esi
push dword [0x520ca4]
call fcn.004bc6fe
mov edi, dword [esp + 0x28]
add esp, 0xc
test eax, eax
je 0x4cb9bd
mov dword [0x520ca4], eax
jmp 0x4cb9bd
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4cbae3
test esi, esi
jns 0x4cbaa6
neg esi
lea eax, [esi + 2]
cmp eax, esi
jl 0x4cb931
cmp eax, 0x3fffffff
jae 0x4cb931
push eax
push 4
push dword [0x520ca4]
call fcn.004bc6fe
add esp, 0xc
test eax, eax
je 0x4cb931
and dword [eax + esi*4 + 4], 0
mov dword [eax + esi*4], ebx
and dword [ebp], 0
jmp 0x4cba8e
push ebx
call fcn.004b592c
and dword [ebp], 0
pop ecx
xor eax, eax
jmp 0x4cb934
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004bdd56
int3