Function at 0x78ac20dc
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], ebx
cmp eax, ebx
je 0x78ae1b4b
push esi
mov esi, dword [eax]
push edi
mov dword [ebp - 4], esi
cmp esi, ebx
je 0x78ac217c
push 0x3d
push esi
call sym.MSVCR100.dll__mbschr
mov edi, eax
pop ecx
pop ecx
mov dword [ebp - 0x14], edi
cmp edi, ebx
je 0x78ac217c
cmp esi, edi
je 0x78ac217c
xor eax, eax
cmp byte [edi + 1], bl
sete al
mov dword [ebp - 8], eax
mov eax, dword [sym.MSVCR100.dll__environ]
cmp eax, dword [sym.MSVCR100.dll___initenv]
je 0x78ae1b63
cmp eax, ebx
je 0x78ae1b72
mov esi, dword [sym.MSVCR100.dll__environ]
mov dword [ebp - 0x10], esi
cmp esi, ebx
je 0x78ac2186
sub edi, dword [ebp - 4]
push dword [ebp - 4]
call fcn.78ac1c0f
mov edi, eax
pop ecx
cmp edi, ebx
jge 0x78ae1be4
cmp dword [ebp - 8], ebx
je 0x78ae1c37
push dword [ebp - 4]
call sym.MSVCR100.dll_free
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
call sym.MSVCR100.dll__errno
jmp 0x78ae1b91
or eax, 0xffffffff
jmp 0x78ac2177
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x78ac2179
call fcn.78b2fb4c
mov dword [sym.MSVCR100.dll__environ], eax
jmp 0x78ac2133
cmp dword [ebp + 0xc], ebx
je 0x78ae1b9c
cmp dword [sym.MSVCR100.dll__wenviron], ebx
je 0x78ae1b9c
call fcn.78b2ee63
test eax, eax
jne 0x78ac217c
jmp 0x78ac213b
mov dword [eax], 0x16
jmp 0x78ac2186
cmp dword [ebp - 8], ebx
jne 0x78ac2175
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__environ], eax
cmp eax, ebx
je 0x78ac2186
mov dword [eax], ebx
cmp dword [sym.MSVCR100.dll__wenviron], ebx
jne 0x78ac213b
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__wenviron], eax
cmp eax, ebx
je 0x78ac2186
mov dword [eax], ebx
jmp 0x78ac213b
cmp dword [esi], ebx
je 0x78ac215e
lea esi, [esi + edi*4]
push dword [esi]
call sym.MSVCR100.dll_free
pop ecx
cmp dword [ebp - 8], ebx
jne 0x78ae1c14
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x78ae1c81
mov eax, dword [esi + 4]
mov dword [esi], eax
mov eax, dword [ebp - 0x10]
inc edi
lea esi, [eax + edi*4]
cmp dword [esi], ebx
jne 0x78ae1c08
cmp edi, 0x3fffffff
jae 0x78ae1c81
push 4
push edi
push dword [sym.MSVCR100.dll__environ]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
cmp eax, ebx
jne 0x78ae1c7c
jmp 0x78ae1c81
cmp edi, ebx
jge 0x78ae1c3d
neg edi
lea eax, [edi + 2]
cmp eax, edi
jl 0x78ac2186
cmp eax, 0x3fffffff
jae 0x78ac2186
push eax
push 4
push dword [sym.MSVCR100.dll__environ]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
cmp eax, ebx
je 0x78ac2186
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.MSVCR100.dll__environ], eax
cmp dword [ebp + 0xc], ebx
je 0x78ae1cf3
mov esi, dword [ebp - 4]
push 1
push esi
call sym.MSVCR100.dll_strlen
pop ecx
add eax, 2
push eax
call sym.MSVCR100.dll__calloc_crt
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x78ae1cf3
push esi
push esi
call sym.MSVCR100.dll_strlen
pop ecx
add eax, 2
push eax
push edi
call sym.MSVCR100.dll_strcpy_s
add esp, 0xc
test eax, eax
jne 0x78ae1d0e
mov ecx, dword [ebp - 8]
mov eax, edi
sub eax, esi
add eax, dword [ebp - 0x14]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x78ae1cec
or dword [ebp - 0xc], 0xffffffff
call sym.MSVCR100.dll__errno
mov dword [eax], 0x2a
push edi
call sym.MSVCR100.dll_free
pop ecx
cmp dword [ebp - 8], ebx
je 0x78ae1d06
push dword [ebp - 4]
call sym.MSVCR100.dll_free
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
mov eax, dword [ebp - 0xc]
jmp 0x78ac2177
push ebx
push ebx
push ebx
push ebx
push ebx
call sym.MSVCR100.dll__invoke_watson
int3