Function at 0x419c45
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x419c69
call fcn.0040e229
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x419ec1
push edi
push 0x3d
push esi
mov edi, esi
call fcn.004213d0
mov dword [ebp - 0x10], eax
pop ecx
pop ecx
test eax, eax
je 0x419eab
cmp eax, esi
je 0x419eab
movzx ecx, word [eax + 2]
mov eax, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.00419f8e
mov eax, dword [0x42e978]
xor ebx, ebx
mov dword [ebp - 4], eax
test eax, eax
jne 0x419d42
mov eax, dword [0x42e974]
cmp dword [ebp + 0xc], ebx
je 0x419ce6
test eax, eax
je 0x419ce6
call fcn.00410961
test eax, eax
jne 0x419cd7
call fcn.0040e229
mov dword [eax], 0x16
or ebx, 0xffffffff
push esi
jmp 0x419e91
call fcn.00419f8e
mov eax, dword [0x42e978]
mov dword [ebp - 4], eax
jmp 0x419d3e
cmp word [ebp - 0xc], bx
je 0x419cd1
test eax, eax
jne 0x419d1b
push 4
push 1
call fcn.00413b97
push ebx
mov dword [0x42e974], eax
call fcn.00413bf4
add esp, 0xc
cmp dword [0x42e974], ebx
je 0x419cce
mov eax, dword [0x42e978]
mov dword [ebp - 4], eax
test eax, eax
jne 0x419d42
push 4
push 1
call fcn.00413b97
push ebx
mov dword [0x42e978], eax
call fcn.00413bf4
mov eax, dword [0x42e978]
add esp, 0xc
mov dword [ebp - 4], eax
test eax, eax
je 0x419cce
test eax, eax
je 0x419cce
mov eax, dword [ebp - 0x10]
sub eax, esi
sar eax, 1
push eax
push esi
mov dword [ebp - 0x10], eax
call fcn.00419fa8
pop ecx
pop ecx
mov ecx, eax
mov eax, dword [ebp - 4]
mov dword [ebp - 8], ecx
test ecx, ecx
js 0x419db1
cmp dword [eax], ebx
je 0x419db1
push dword [eax + ecx*4]
call fcn.00413bf4
mov edx, dword [ebp - 8]
pop ecx
cmp word [ebp - 0xc], bx
jne 0x419da7
mov ecx, dword [ebp - 4]
jmp 0x419d84
mov eax, dword [ecx + edx*4 + 4]
mov dword [ecx + edx*4], eax
inc edx
cmp dword [ecx + edx*4], ebx
jne 0x419d7c
push 4
push edx
push ecx
call fcn.0041c5c5
push ebx
mov dword [ebp - 0xc], eax
call fcn.00413bf4
mov eax, dword [ebp - 0xc]
add esp, 0x10
test eax, eax
je 0x419e08
jmp 0x419e03
mov eax, dword [ebp - 4]
mov edi, ebx
mov dword [eax + edx*4], esi
jmp 0x419e08
cmp word [ebp - 0xc], bx
je 0x419cd1
neg ecx
mov dword [ebp - 8], ecx
lea edx, [ecx + 2]
cmp edx, ecx
jb 0x419cce
cmp edx, 0x3fffffff
jae 0x419cce
push 4
push edx
push eax
call fcn.0041c5c5
push ebx
mov dword [ebp - 0xc], eax
call fcn.00413bf4
mov eax, dword [ebp - 0xc]
add esp, 0x10
test eax, eax
je 0x419cce
mov edx, dword [ebp - 8]
mov edi, ebx
mov dword [eax + edx*4], esi
mov dword [eax + edx*4 + 4], ebx
mov dword [0x42e978], eax
cmp dword [ebp + 0xc], ebx
je 0x419ea1
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x419e14
sub esi, ecx
sar esi, 1
push 2
lea eax, [esi + 2]
push eax
mov dword [ebp - 0xc], eax
call fcn.00413b97
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x419e41
push ebx
call fcn.00413bf4
jmp 0x419e8f
push dword [ebp + 8]
push dword [ebp - 0xc]
push esi
call fcn.004161fe
add esp, 0xc
test eax, eax
jne 0x419ec5
mov eax, dword [ebp - 0x10]
xor edx, edx
lea ecx, [eax + 1]
mov word [esi + eax*2], dx
mov eax, dword [ebp - 0x14]
lea ecx, [esi + ecx*2]
movzx eax, ax
neg eax
sbb eax, eax
and eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x419e9a
call fcn.0040e229
push esi
mov dword [eax], 0x2a
call fcn.00413bf4
or ebx, 0xffffffff
pop ecx
push edi
call fcn.00413bf4
mov eax, ebx
jmp 0x419ebf
push esi
call fcn.00413bf4
pop ecx
push edi
call fcn.00413bf4
xor eax, eax
jmp 0x419ebf
call fcn.0040e229
push esi
mov dword [eax], 0x16
call fcn.00413bf4
or eax, 0xffffffff
pop ecx
pop edi
pop esi
pop ebx
leave
ret
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040ae3c
int3