Function at 0x4a6839
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x4a6519
call fcn.0049f208
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x4a6595
push esi
push edi
push 0x3d
push ebx
mov edi, ebx
call fcn.004ac7b0
mov dword [ebp - 0xc], eax
pop ecx
pop ecx
test eax, eax
je 0x4a657c
cmp eax, ebx
je 0x4a657c
cmp byte [eax + 1], 0
mov esi, dword [0x4cc834]
sete al
mov byte [ebp - 1], al
cmp esi, dword [0x4cc840]
jne 0x4a655c
push esi
call fcn.004a6734
mov esi, eax
mov al, byte [ebp - 1]
pop ecx
mov dword [0x4cc834], esi
xor ebx, ebx
test esi, esi
jne 0x4a65f4
cmp dword [ebp + 0xc], ebx
je 0x4a659a
cmp dword [0x4cc838], ebx
je 0x4a659a
call fcn.0049e533
test eax, eax
jne 0x4a65ea
call fcn.0049f208
mov dword [eax], 0x16
or ebx, 0xffffffff
push edi
call fcn.0049f278
pop ecx
pop edi
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, al
je 0x4a65a2
xor ebx, ebx
jmp 0x4a658a
push 4
push 1
call fcn.0049f21b
push ebx
mov dword [0x4cc834], eax
call fcn.0049f278
mov esi, dword [0x4cc834]
add esp, 0xc
test esi, esi
je 0x4a6587
cmp dword [0x4cc838], ebx
jne 0x4a65f0
push 4
push 1
call fcn.0049f21b
push ebx
mov dword [0x4cc838], eax
call fcn.0049f278
add esp, 0xc
cmp dword [0x4cc838], ebx
je 0x4a6587
mov esi, dword [0x4cc834]
test esi, esi
je 0x4a6587
mov eax, dword [ebp - 0xc]
mov ecx, edi
sub eax, ecx
push eax
push ecx
call fcn.004a67e5
mov dword [ebp - 8], eax
pop ecx
pop ecx
test eax, eax
js 0x4a6653
cmp dword [esi], ebx
je 0x4a6653
push dword [esi + eax*4]
call fcn.0049f278
pop ecx
mov ecx, dword [ebp - 8]
cmp byte [ebp - 1], bl
jne 0x4a6632
mov eax, dword [ebp + 8]
mov edi, ebx
mov dword [esi + ecx*4], eax
jmp 0x4a66a9
mov eax, dword [esi + ecx*4 + 4]
mov dword [esi + ecx*4], eax
inc ecx
cmp dword [esi + ecx*4], ebx
jne 0x4a662a
push 4
push ecx
push esi
call fcn.00494b03
push ebx
mov esi, eax
call fcn.0049f278
add esp, 0x10
mov eax, edi
test esi, esi
je 0x4a66a9
jmp 0x4a66a3
cmp byte [ebp - 1], bl
jne 0x4a658a
neg eax
mov dword [ebp - 8], eax
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x4a6587
cmp ecx, 0x3fffffff
jae 0x4a6587
push 4
push ecx
push esi
call fcn.00494b03
push ebx
mov esi, eax
call fcn.0049f278
add esp, 0x10
test esi, esi
je 0x4a6587
mov ecx, dword [ebp - 8]
mov edi, ebx
mov eax, dword [ebp + 8]
mov dword [esi + ecx*4], eax
mov dword [esi + ecx*4 + 4], ebx
mov dword [0x4cc834], esi
cmp dword [ebp + 0xc], ebx
je 0x4a658a
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a66b7
sub ecx, edx
push 1
lea eax, [ecx + 2]
push eax
mov dword [ebp - 8], eax
call fcn.0049f21b
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4a671d
push dword [ebp + 8]
push dword [ebp - 8]
push esi
call fcn.0049ee26
add esp, 0xc
test eax, eax
jne 0x4a6729
mov ecx, dword [ebp - 0xc]
mov eax, esi
sub eax, dword [ebp + 8]
inc ecx
add ecx, eax
movzx eax, byte [ebp - 1]
neg eax
sbb eax, eax
not eax
mov byte [ecx - 1], bl
and eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x4a671d
call fcn.0049f208
or ebx, 0xffffffff
mov dword [eax], 0x2a
push esi
call fcn.0049f278
pop ecx
jmp 0x4a658a
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0049f15c
int3
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp 0x4a64f9