Function at 0x78abf572
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 0x78adf42b
push ebx
mov ebx, dword [eax]
push edi
mov dword [ebp - 4], ebx
cmp ebx, esi
je 0x78ac6240
push 0x3d
push ebx
call sym.MSVCR100.dll_wcschr
mov edi, eax
pop ecx
pop ecx
cmp edi, esi
je 0x78ac6240
cmp ebx, edi
je 0x78ac6240
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 0x78ac6231
cmp eax, esi
je 0x78adf443
mov ebx, dword [sym.MSVCR100.dll__wenviron]
cmp ebx, esi
je 0x78ac624a
sub edi, dword [ebp - 4]
push dword [ebp - 4]
sar edi, 1
mov dword [ebp - 0x10], edi
call fcn.78abf536
mov edi, eax
pop ecx
cmp edi, esi
jge 0x78adf4d1
cmp dword [ebp - 8], esi
je 0x78adf5ce
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.78ac61d5
mov dword [sym.MSVCR100.dll__wenviron], eax
jmp 0x78abf5d3
call sym.MSVCR100.dll__errno
jmp 0x78adf47a
or eax, 0xffffffff
jmp 0x78abf61d
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x78abf61f
mov eax, dword [sym.MSVCR100.dll__environ]
cmp dword [ebp + 0xc], esi
je 0x78adf485
cmp eax, esi
je 0x78adf485
call fcn.78abfbd0
mov dword [0x78b53760], eax
call fcn.78abfab2
test eax, eax
jns 0x78abf5db
call fcn.78b2acc4
test eax, eax
jne 0x78ac6240
jmp 0x78abf5db
mov dword [eax], 0x16
jmp 0x78ac624a
cmp dword [ebp - 8], esi
jne 0x78abf61b
cmp eax, esi
jne 0x78adf4b5
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__environ], eax
cmp eax, esi
je 0x78ac624a
mov dword [eax], esi
cmp dword [sym.MSVCR100.dll__wenviron], esi
jne 0x78abf5db
push 4
call sym.MSVCR100.dll__malloc_crt
pop ecx
mov dword [sym.MSVCR100.dll__wenviron], eax
cmp eax, esi
je 0x78ac624a
mov dword [eax], esi
jmp 0x78abf5db
cmp dword [ebx], esi
je 0x78abf604
lea esi, [ebx + edi*4]
push dword [esi]
call sym.MSVCR100.dll_free
xor eax, eax
pop ecx
cmp dword [ebp - 8], eax
jne 0x78adf59b
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 0x78adf577
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 0x78adf577
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 0x78adf61d
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 0x78adf570
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 0x78adf58a
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 0x78abf61d
mov ecx, dword [esi + 4]
inc edi
mov dword [esi], ecx
lea esi, [ebx + edi*4]
cmp dword [esi], eax
jne 0x78adf592
cmp edi, 0x3fffffff
jae 0x78adf4f9
push 4
push edi
push dword [sym.MSVCR100.dll__wenviron]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
test eax, eax
je 0x78adf4f9
mov dword [sym.MSVCR100.dll__wenviron], eax
jmp 0x78adf4f9
cmp edi, esi
jge 0x78adf5d4
neg edi
lea eax, [edi + 2]
cmp eax, edi
jl 0x78ac624a
cmp eax, 0x3fffffff
jae 0x78ac624a
push eax
push 4
push dword [sym.MSVCR100.dll__wenviron]
call sym.MSVCR100.dll__recalloc_crt
add esp, 0xc
cmp eax, esi
je 0x78ac624a
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 0x78adf4fb
push esi
push esi
push esi
push esi
push esi
call sym.MSVCR100.dll__invoke_watson
int3