Function at 0x41ee5d
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, esi
mov dword [ebp - 4], esi
jne 0x41ee92
call fcn.00416019
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00417183
add esp, 0x14
or eax, 0xffffffff
jmp 0x41ef27
push ebx
mov ebx, dword [eax]
cmp ebx, esi
push edi
mov dword [ebp - 8], ebx
je 0x41ef17
push 0x3d
push ebx
call fcn.0041a5ae
mov edi, eax
cmp edi, esi
pop ecx
pop ecx
je 0x41ef17
cmp ebx, edi
je 0x41ef17
xor eax, eax
cmp word [edi + 2], si
sete al
mov dword [ebp - 0xc], eax
mov eax, dword [0x428b38]
cmp eax, dword [0x428b3c]
jne 0x41eed4
call fcn.0041edfe
mov dword [0x428b38], eax
cmp eax, esi
jne 0x41ef65
cmp dword [ebp + 0xc], esi
mov eax, dword [0x428b30]
je 0x41ef2a
cmp eax, esi
je 0x41ef2a
call fcn.0041c14a
mov dword [0x428b04], eax
call fcn.0041db8b
mov ebx, eax
mov eax, dword [0x428b38]
call fcn.0041edfe
cmp ebx, esi
mov dword [0x428b38], eax
jge 0x41ef65
call fcn.0041daff
test eax, eax
je 0x41ef65
call fcn.00416019
mov dword [eax], 0x16
or eax, 0xffffffff
pop edi
pop ebx
pop esi
leave
ret
cmp dword [ebp - 0xc], esi
jne 0x41f1f0
cmp eax, esi
jne 0x41ef52
push 4
call fcn.004144f2
cmp eax, esi
pop ecx
mov dword [0x428b30], eax
je 0x41ef22
mov dword [eax], esi
cmp dword [0x428b38], esi
jne 0x41ef65
push 4
call fcn.004144f2
cmp eax, esi
pop ecx
mov dword [0x428b38], eax
je 0x41ef22
mov dword [eax], esi
mov eax, dword [0x428b38]
cmp eax, esi
mov dword [ebp - 0x14], eax
je 0x41ef22
sub edi, dword [ebp - 8]
push dword [ebp - 8]
sar edi, 1
mov dword [ebp - 0x10], edi
call fcn.0041eda3
mov ebx, eax
cmp ebx, esi
pop ecx
jl 0x41efeb
mov ecx, dword [ebp - 0x14]
cmp dword [ecx], esi
je 0x41efeb
lea edi, [ecx + ebx*4]
mov eax, dword [edi]
cmp eax, dword [0x428b3c]
jb 0x41efa4
cmp eax, dword [0x42d618]
jbe 0x41efae
push eax
call fcn.0041440b
pop ecx
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 0xc], esi
jne 0x41efc8
mov eax, dword [ebp - 8]
mov dword [edi], eax
mov eax, dword [ebp + 8]
mov dword [eax], esi
jmp 0x41f03e
mov eax, dword [edi + 4]
inc ebx
mov dword [edi], eax
lea edi, [ecx + ebx*4]
cmp dword [edi], esi
jne 0x41efbf
cmp ebx, 0x3fffffff
jae 0x41f03e
push 4
push ebx
push dword [0x428b38]
call fcn.0041be25
add esp, 0xc
cmp eax, esi
je 0x41f03e
jmp 0x41f039
cmp dword [ebp - 0xc], esi
jne 0x41f1e2
cmp ebx, esi
jge 0x41effa
neg ebx
lea eax, [ebx + 2]
cmp eax, ebx
jl 0x41ef22
cmp eax, 0x3fffffff
jae 0x41ef22
push eax
push 4
push dword [0x428b38]
call fcn.0041be25
add esp, 0xc
cmp eax, esi
je 0x41ef22
mov ecx, dword [ebp - 8]
lea ebx, [eax + ebx*4]
mov dword [ebx], ecx
mov ecx, dword [ebp + 8]
mov dword [ebx + 4], esi
mov dword [ecx], esi
mov dword [0x428b38], eax
cmp dword [ebp + 0xc], esi
je 0x41f1cc
mov eax, dword [ebp - 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x41f04d
sub eax, edx
sar eax, 1
add eax, 2
push 2
push eax
call fcn.00419183
mov edi, eax
cmp edi, esi
pop ecx
pop ecx
mov dword [ebp - 0x18], edi
je 0x41f1cc
mov eax, dword [ebp - 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x41f07b
push dword [ebp - 8]
sub eax, edx
sar eax, 1
add eax, 2
push eax
push edi
call fcn.0041a53a
add esp, 0xc
test eax, eax
je 0x41f0aa
push esi
push esi
push esi
push esi
push esi
call fcn.004170d8
add esp, 0x14
mov eax, dword [ebp - 0x10]
lea ebx, [edi + eax*2]
mov word [ebx], si
inc ebx
inc ebx
cmp dword [0x426f50], 1
jne 0x41f0ec
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
not eax
and eax, ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x41f0ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x41f0e8
mov dword [0x426f50], esi
jmp 0x41f0f8
or dword [ebp - 4], 0xffffffff
cmp dword [0x426f50], esi
jne 0x41f1b4
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 - 0x14], esi
mov dword [ebp - 0x10], esi
call edi
cmp eax, esi
mov dword [ebp + 8], eax
je 0x41f19b
push 1
push eax
call fcn.00419183
cmp eax, esi
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
je 0x41f19b
push esi
push esi
push dword [ebp + 8]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x18]
push esi
push esi
call edi
test eax, eax
je 0x41f19b
cmp dword [ebp - 0xc], esi
jne 0x41f17b
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push ebx
push esi
push esi
call edi
cmp eax, esi
mov dword [ebp + 8], eax
je 0x41f19b
push 1
push eax
call fcn.00419183
cmp eax, esi
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x41f19b
push esi
push esi
push dword [ebp + 8]
push eax
push 0xffffffffffffffff
push ebx
push esi
push esi
call edi
test eax, eax
jne 0x41f17b
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 4], 0xffffffff
je 0x41f19f
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0x10]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x41f19f
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x10]
call fcn.0041440b
push dword [ebp - 0x14]
call fcn.0041440b
mov edi, dword [ebp - 0x18]
pop ecx
pop ecx
cmp dword [ebp - 4], 0xffffffff
jne 0x41f1c5
call fcn.00416019
mov dword [eax], 0x2a
push edi
call fcn.0041440b
pop ecx
cmp dword [ebp - 0xc], esi
je 0x41f1da
push dword [ebp - 8]
call fcn.0041440b
pop ecx
mov eax, dword [ebp - 4]
jmp 0x41ef25
push dword [ebp - 8]
call fcn.0041440b
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], esi
xor eax, eax
jmp 0x41ef25