Function at 0x78ac1fba
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 0xc], esi
cmp eax, esi
je 0x78ae146b
push ebx
mov ebx, dword [eax]
push edi
mov dword [ebp - 4], ebx
cmp ebx, esi
je 0x78ac7450
push 0x3d
push ebx
call sym.MSVCR100.dll_wcschr
mov edi, eax
pop ecx
pop ecx
cmp edi, esi
je 0x78ac7450
cmp ebx, edi
je 0x78ac7450
xor eax, eax
cmp word [edi + 2], si
sete al
mov dword [ebp - 8], eax
mov eax, dword [sym.MSVCR100.dll__wenviron]
cmp eax, dword [sym.MSVCR100.dll___winitenv]
je 0x78ac7441
cmp eax, esi
je 0x78ae1483
mov ebx, dword [sym.MSVCR100.dll__wenviron]
cmp ebx, esi
je 0x78ac745a
sub edi, dword [ebp - 4]
push dword [ebp - 4]
sar edi, 1
mov dword [ebp - 0x10], edi
call fcn.78ac1f7e
mov edi, eax
pop ecx
cmp edi, esi
jge 0x78ae1511
cmp dword [ebp - 8], esi
je 0x78ae160e
push dword [ebp - 4]
call sym.MSVCR100.dll_free
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], esi
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret
call fcn.78ac73e5
mov dword [sym.MSVCR100.dll__wenviron], eax
jmp 0x78ac201b
call sym.MSVCR100.dll__errno
jmp 0x78ae14ba
or eax, 0xffffffff
jmp 0x78ac2065
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x78ac2067
mov eax, dword [sym.MSVCR100.dll__environ]
cmp dword [ebp + 0xc], esi
je 0x78ae14c5
cmp eax, esi
je 0x78ae14c5
call fcn.78ac235f
mov dword [0x78b557dc], eax
call fcn.78ac2420
test eax, eax
jns 0x78ac2023
call fcn.78b2b814
test eax, eax
jne 0x78ac7450
jmp 0x78ac2023
mov dword [eax], 0x16
jmp 0x78ac745a
cmp dword [ebp - 8], esi
jne 0x78ac2063
cmp eax, esi
jne 0x78ae14f5
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__environ], eax
cmp eax, esi
je 0x78ac745a
mov dword [eax], esi
cmp dword [sym.MSVCR100.dll__wenviron], esi
jne 0x78ac2023
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__wenviron], eax
cmp eax, esi
je 0x78ac745a
mov dword [eax], esi
jmp 0x78ac2023
cmp dword [ebx], esi
je 0x78ac204c
lea esi, [ebx + edi*4]
push dword [esi]
call sym.MSVCR100.dll_free
xor eax, eax
pop ecx
cmp dword [ebp - 8], eax
jne 0x78ae15db
mov ecx, dword [ebp - 4]
mov dword [esi], ecx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
xor esi, esi
cmp dword [ebp + 0xc], esi
je 0x78ae15b7
push 2
pop ebx
push ebx
push dword [ebp - 4]
call sym.MSVCR100.dll_wcslen
pop ecx
add eax, ebx
push eax
call sym.MSVCR100.dll__calloc_crt
mov edi, eax
pop ecx
pop ecx
cmp edi, esi
je 0x78ae15b7
push dword [ebp - 4]
push dword [ebp - 4]
call sym.MSVCR100.dll_wcslen
pop ecx
add eax, ebx
push eax
push edi
call sym.MSVCR100.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x78ae165d
mov eax, dword [ebp - 0x10]
xor ecx, ecx
lea eax, [edi + eax*2]
mov word [eax], cx
mov ecx, dword [ebp - 8]
add eax, ebx
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x78ae15b0
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], esi
je 0x78ae15ca
push dword [ebp - 4]
call sym.MSVCR100.dll_free
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], esi
mov eax, dword [ebp - 0xc]
jmp 0x78ac2065
mov ecx, dword [esi + 4]
inc edi
mov dword [esi], ecx
lea esi, [ebx + edi*4]
cmp dword [esi], eax
jne 0x78ae15d2
cmp edi, 0x3fffffff
jae 0x78ae1539
push 4
push edi
push dword [sym.MSVCR100.dll__wenviron]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
test eax, eax
je 0x78ae1539
mov dword [sym.MSVCR100.dll__wenviron], eax
jmp 0x78ae1539
cmp edi, esi
jge 0x78ae1614
neg edi
lea eax, [edi + 2]
cmp eax, edi
jl 0x78ac745a
cmp eax, 0x3fffffff
jae 0x78ac745a
push eax
push 4
push dword [sym.MSVCR100.dll__wenviron]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
cmp eax, esi
je 0x78ac745a
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], esi
mov ecx, dword [ebp + 8]
mov dword [ecx], esi
mov dword [sym.MSVCR100.dll__wenviron], eax
jmp 0x78ae153b
push esi
push esi
push esi
push esi
push esi
call sym.MSVCR100.dll__invoke_watson
int3