Function at 0x78ac248a
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 0x78ae1473
push ebx
mov ebx, dword [eax]
push edi
mov dword [ebp - 4], ebx
cmp ebx, esi
je 0x78ac73f0
push 0x3d
push ebx
call sym.MSVCR100.dll_wcschr
mov edi, eax
pop ecx
pop ecx
cmp edi, esi
je 0x78ac73f0
cmp ebx, edi
je 0x78ac73f0
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 0x78ac73e1
cmp eax, esi
je 0x78ae148b
mov ebx, dword [sym.MSVCR100.dll__wenviron]
cmp ebx, esi
je 0x78ac73fa
sub edi, dword [ebp - 4]
push dword [ebp - 4]
sar edi, 1
mov dword [ebp - 0x10], edi
call fcn.78ac244e
mov edi, eax
pop ecx
cmp edi, esi
jge 0x78ae1519
cmp dword [ebp - 8], esi
je 0x78ae1616
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.78ac7385
mov dword [sym.MSVCR100.dll__wenviron], eax
jmp 0x78ac24eb
call sym.MSVCR100.dll__errno
jmp 0x78ae14c2
or eax, 0xffffffff
jmp 0x78ac2535
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x78ac2537
mov eax, dword [sym.MSVCR100.dll__environ]
cmp dword [ebp + 0xc], esi
je 0x78ae14cd
cmp eax, esi
je 0x78ae14cd
call fcn.78ac1201
mov dword [0x78b542bc], eax
call fcn.78ac10e3
test eax, eax
jns 0x78ac24f3
call fcn.78b2b73c
test eax, eax
jne 0x78ac73f0
jmp 0x78ac24f3
mov dword [eax], 0x16
jmp 0x78ac73fa
cmp dword [ebp - 8], esi
jne 0x78ac2533
cmp eax, esi
jne 0x78ae14fd
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__environ], eax
cmp eax, esi
je 0x78ac73fa
mov dword [eax], esi
cmp dword [sym.MSVCR100.dll__wenviron], esi
jne 0x78ac24f3
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__wenviron], eax
cmp eax, esi
je 0x78ac73fa
mov dword [eax], esi
jmp 0x78ac24f3
cmp dword [ebx], esi
je 0x78ac251c
lea esi, [ebx + edi*4]
push dword [esi]
call sym.MSVCR100.dll_free
xor eax, eax
pop ecx
cmp dword [ebp - 8], eax
jne 0x78ae15e3
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 0x78ae15bf
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 0x78ae15bf
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 0x78ae1665
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 0x78ae15b8
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 0x78ae15d2
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 0x78ac2535
mov ecx, dword [esi + 4]
inc edi
mov dword [esi], ecx
lea esi, [ebx + edi*4]
cmp dword [esi], eax
jne 0x78ae15da
cmp edi, 0x3fffffff
jae 0x78ae1541
push 4
push edi
push dword [sym.MSVCR100.dll__wenviron]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
test eax, eax
je 0x78ae1541
mov dword [sym.MSVCR100.dll__wenviron], eax
jmp 0x78ae1541
cmp edi, esi
jge 0x78ae161c
neg edi
lea eax, [edi + 2]
cmp eax, edi
jl 0x78ac73fa
cmp eax, 0x3fffffff
jae 0x78ac73fa
push eax
push 4
push dword [sym.MSVCR100.dll__wenviron]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
cmp eax, esi
je 0x78ac73fa
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 0x78ae1543
push esi
push esi
push esi
push esi
push esi
call sym.MSVCR100.dll__invoke_watson
int3