Function at 0x7c353ce4
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x7c353cfd
or eax, 0xffffffff
jmp 0x7c353d5e
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x7c353d5a
push 0x3d
push esi
call sym.MSVCR71.dll__mbschr
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x7c353d5a
cmp esi, eax
je 0x7c353d5a
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [sym.MSVCR71.dll__environ]
sete cl
cmp eax, dword [sym.MSVCR71.dll___initenv]
mov dword [ebp - 8], ecx
jne 0x7c353d40
mov edi, eax
call fcn.7c353c83
mov dword [sym.MSVCR71.dll__environ], eax
cmp eax, ebx
jne 0x7c353d99
cmp dword [ebp + 0xc], ebx
je 0x7c353d62
cmp dword [sym.MSVCR71.dll__wenviron], ebx
je 0x7c353d62
call fcn.7c353ba6
test eax, eax
je 0x7c353d99
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x7c353d6b
xor eax, eax
jmp 0x7c353d5d
push 4
call sym.MSVCR71.dll_malloc
cmp eax, ebx
pop ecx
mov dword [sym.MSVCR71.dll__environ], eax
je 0x7c353d5a
mov dword [eax], ebx
cmp dword [sym.MSVCR71.dll__wenviron], ebx
jne 0x7c353d99
push 4
call sym.MSVCR71.dll_malloc
cmp eax, ebx
pop ecx
mov dword [sym.MSVCR71.dll__wenviron], eax
je 0x7c353d5a
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [sym.MSVCR71.dll__environ]
call fcn.7c353c36
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x7c353dfa
cmp dword [esi], ebx
je 0x7c353dfa
lea esi, [esi + edi*4]
push dword [esi]
call sym.MSVCR71.dll_free
cmp dword [ebp - 8], ebx
pop ecx
jne 0x7c353ddd
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x7c353e3b
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x7c353dd4
mov eax, edi
shl eax, 2
push eax
push dword [sym.MSVCR71.dll__environ]
call sym.MSVCR71.dll_realloc
cmp eax, ebx
pop ecx
pop ecx
je 0x7c353e3b
jmp 0x7c353e36
cmp dword [ebp - 8], ebx
jne 0x7c353ea6
cmp edi, ebx
jge 0x7c353e09
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [sym.MSVCR71.dll__environ]
call sym.MSVCR71.dll_realloc
cmp eax, ebx
pop ecx
pop ecx
je 0x7c353d5a
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [sym.MSVCR71.dll__environ], eax
cmp dword [ebp + 0xc], ebx
je 0x7c353e90
push dword [ebp - 4]
call sym.MSVCR71.dll_strlen
inc eax
inc eax
push eax
call sym.MSVCR71.dll_malloc
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x7c353e90
push dword [ebp - 4]
push esi
call sym.MSVCR71.dll__mbscpy
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x7c353e89
or dword [ebp - 0x10], 0xffffffff
push esi
call sym.MSVCR71.dll_free
pop ecx
cmp dword [ebp - 8], ebx
je 0x7c353e9e
push dword [ebp - 4]
call sym.MSVCR71.dll_free
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x7c353d5d
push dword [ebp - 4]
call sym.MSVCR71.dll_free
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x7c353d67