Function at 0x4bb2da
Capabilities:
Set environment variable

Disassembly:
push ebp
mov edi, edi
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 4], esi
cmp eax, esi
jne 0x4bb30f
call fcn.004a6a4b
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.004a648d
sub esp, 0xffffffec
or eax, 0xffffffff
jmp 0x4bb38f
push ebx
mov ebx, dword [eax]
push edi
mov dword [ebp - 0xc], ebx
cmp ebx, esi
je 0x4bb37f
push 0x3d
push ebx
call fcn.004b25c3
mov edi, eax
pop ecx
cmp edi, esi
pop ecx
je 0x4bb37f
cmp ebx, edi
je 0x4bb37f
xor eax, eax
cmp word [edi + 2], si
sete al
mov dword [ebp - 8], eax
mov eax, dword [0x4fde84]
cmp eax, dword [0x4fde88]
jne 0x4bb351
call fcn.004bb280
mov dword [0x4fde84], eax
cmp eax, esi
jne 0x4bb3cd
mov eax, dword [0x4fde7c]
cmp dword [ebp + 0xc], esi
je 0x4bb392
cmp eax, esi
je 0x4bb392
call fcn.004c2d7f
mov dword [0x4fde64], eax
call fcn.004c2ca1
or eax, eax
jge 0x4bb3cd
call fcn.004c2c1a
or eax, eax
je 0x4bb3cd
call fcn.004a6a4b
mov dword [eax], 0x16
or eax, 0xffffffff
pop edi
pop ebx
pop esi
leave
ret
cmp dword [ebp - 8], esi
jne 0x4bb636
cmp eax, esi
jne 0x4bb3ba
push 4
call fcn.004b7cbe
pop ecx
cmp eax, esi
mov dword [0x4fde7c], eax
je 0x4bb38a
mov dword [eax], esi
cmp dword [0x4fde84], esi
jne 0x4bb3cd
push 4
call fcn.004b7cbe
pop ecx
mov dword [0x4fde84], eax
cmp eax, esi
je 0x4bb38a
mov dword [eax], esi
mov eax, dword [0x4fde84]
mov dword [ebp - 0x18], eax
cmp eax, esi
je 0x4bb38a
sub edi, ebx
sar edi, 1
push ebx
mov dword [ebp - 0x14], edi
call fcn.004bb22a
pop ecx
mov edi, eax
cmp edi, esi
jl 0x4bb442
mov ebx, dword [ebp - 0x18]
cmp dword [ebx], esi
je 0x4bb442
lea ebx, [ebx + edi*4]
push dword [ebx]
call fcn.004a7a46
pop ecx
cmp dword [ebp - 8], esi
jne 0x4bb41f
mov eax, dword [ebp - 0xc]
mov dword [ebx], eax
mov eax, dword [ebp + 8]
mov dword [eax], esi
jmp 0x4bb495
inc edi
mov eax, dword [ebx + 4]
mov dword [ebx], eax
mov eax, dword [ebp - 0x18]
lea ebx, [eax + edi*4]
cmp dword [ebx], esi
jne 0x4bb413
cmp edi, 0x3fffffff
jae 0x4bb495
push 4
push edi
push dword [0x4fde84]
call fcn.004b7d9d
add esp, 0xc
cmp eax, esi
je 0x4bb495
jmp 0x4bb490
cmp dword [ebp - 8], esi
jne 0x4bb628
cmp edi, esi
jge 0x4bb451
neg edi
lea eax, [edi + 2]
cmp eax, edi
jl 0x4bb38a
cmp eax, 0x3fffffff
jae 0x4bb38a
push eax
push 4
push dword [0x4fde84]
call fcn.004b7d9d
add esp, 0xc
cmp eax, esi
je 0x4bb38a
mov ebx, dword [ebp - 0xc]
lea edi, [eax + edi*4]
mov dword [edi], ebx
mov ecx, dword [ebp + 8]
mov dword [edi + 4], esi
mov dword [ecx], esi
mov dword [0x4fde84], eax
cmp dword [ebp + 0xc], esi
je 0x4bb60d
push 2
push dword [ebp - 0xc]
call fcn.004b25e9
pop ecx
inc eax
inc eax
push eax
call fcn.004b7d03
pop ebx
pop ecx
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, esi
je 0x4bb60d
push dword [ebp - 0xc]
push dword [ebp - 0xc]
call fcn.004b25e9
inc eax
pop ecx
inc eax
push eax
push edi
call fcn.004b850d
sub esp, 0xfffffff4
or eax, eax
je 0x4bb4e9
push esi
push esi
push esi
push esi
push esi
call fcn.004a633e
add esp, 0x14
mov eax, dword [ebp - 0x14]
lea ebx, [edi + eax*2]
xor eax, eax
mov word [ebx], ax
inc ebx
inc ebx
cmp dword [0x4ef8c8], 1
jne 0x4bb52d
mov eax, dword [ebp - 8]
neg eax
sbb eax, eax
not eax
and eax, ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
or eax, eax
jne 0x4bb52d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4bb529
mov dword [0x4ef8c8], esi
jmp 0x4bb539
or dword [ebp - 4], 0xffffffff
cmp dword [0x4ef8c8], esi
jne 0x4bb5f5
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
call edi
cmp eax, esi
mov dword [ebp - 0x10], eax
je 0x4bb5dc
push 1
push eax
call fcn.004b7d03
pop ecx
pop ecx
cmp eax, esi
mov dword [ebp - 0x18], eax
je 0x4bb5dc
push esi
push esi
push dword [ebp - 0x10]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x1c]
push esi
push esi
call edi
or eax, eax
je 0x4bb5dc
cmp dword [ebp - 8], esi
jne 0x4bb5bc
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push ebx
push esi
push esi
call edi
mov dword [ebp - 0x10], eax
cmp eax, esi
je 0x4bb5dc
push 1
push eax
call fcn.004b7d03
pop ecx
cmp eax, esi
pop ecx
mov dword [ebp - 0x14], eax
je 0x4bb5dc
push esi
push esi
push dword [ebp - 0x10]
push eax
push 0xffffffffffffffff
push ebx
push esi
push esi
call edi
test eax, eax
jne 0x4bb5bc
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 4], 0xffffffff
je 0x4bb5e0
mov eax, dword [ebp - 8]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
or eax, eax
jne 0x4bb5e0
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x14]
call fcn.004a7a46
push dword [ebp - 0x18]
call fcn.004a7a46
pop ecx
mov edi, dword [ebp - 0x1c]
pop ecx
cmp dword [ebp - 4], 0xffffffff
jne 0x4bb606
call fcn.004a6a4b
mov dword [eax], 0x2a
push edi
call fcn.004a7a46
pop ecx
cmp dword [ebp - 8], esi
je 0x4bb620
push dword [ebp - 0xc]
call fcn.004a7a46
pop ecx
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov eax, dword [ebp - 4]
jmp 0x4bb38d
push dword [ebp - 0xc]
call fcn.004a7a46
pop ecx
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor eax, eax
jmp 0x4bb38d