Function at 0x78ac2144
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 0x78ae1b7b
push esi
mov esi, dword [eax]
push edi
mov dword [ebp - 4], esi
cmp esi, ebx
je 0x78ac21e4
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 0x78ac21e4
cmp esi, edi
je 0x78ac21e4
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 0x78ae1b93
cmp eax, ebx
je 0x78ae1ba2
mov esi, dword [sym.MSVCR100.dll__environ]
mov dword [ebp - 0x10], esi
cmp esi, ebx
je 0x78ac21ee
sub edi, dword [ebp - 4]
push dword [ebp - 4]
call fcn.78ac1c7b
mov edi, eax
pop ecx
cmp edi, ebx
jge 0x78ae1c14
cmp dword [ebp - 8], ebx
je 0x78ae1c67
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 0x78ae1bc1
or eax, 0xffffffff
jmp 0x78ac21df
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x78ac21e1
call fcn.78b2fb9c
mov dword [sym.MSVCR100.dll__environ], eax
jmp 0x78ac219b
cmp dword [ebp + 0xc], ebx
je 0x78ae1bcc
cmp dword [sym.MSVCR100.dll__wenviron], ebx
je 0x78ae1bcc
call fcn.78b2eeb3
test eax, eax
jne 0x78ac21e4
jmp 0x78ac21a3
mov dword [eax], 0x16
jmp 0x78ac21ee
cmp dword [ebp - 8], ebx
jne 0x78ac21dd
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__environ], eax
cmp eax, ebx
je 0x78ac21ee
mov dword [eax], ebx
cmp dword [sym.MSVCR100.dll__wenviron], ebx
jne 0x78ac21a3
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__wenviron], eax
cmp eax, ebx
je 0x78ac21ee
mov dword [eax], ebx
jmp 0x78ac21a3
cmp dword [esi], ebx
je 0x78ac21c6
lea esi, [esi + edi*4]
push dword [esi]
call sym.MSVCR100.dll_free
pop ecx
cmp dword [ebp - 8], ebx
jne 0x78ae1c44
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x78ae1cb1
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 0x78ae1c38
cmp edi, 0x3fffffff
jae 0x78ae1cb1
push 4
push edi
push dword [sym.MSVCR100.dll__environ]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
cmp eax, ebx
jne 0x78ae1cac
jmp 0x78ae1cb1
cmp edi, ebx
jge 0x78ae1c6d
neg edi
lea eax, [edi + 2]
cmp eax, edi
jl 0x78ac21ee
cmp eax, 0x3fffffff
jae 0x78ac21ee
push eax
push 4
push dword [sym.MSVCR100.dll__environ]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
cmp eax, ebx
je 0x78ac21ee
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 0x78ae1d23
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 0x78ae1d23
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 0x78ae1d3e
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 0x78ae1d1c
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 0x78ae1d36
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 0x78ac21df
push ebx
push ebx
push ebx
push ebx
push ebx
call sym.MSVCR100.dll__invoke_watson
int3