Function at 0x110133b98
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor ebp, ebp
mov r13d, edx
mov dword [rsp + 0x60], ebp
mov r14, rcx
test rcx, rcx
jne 0x110133be9
call sym.msvcrt.dll__errno
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rax], 0x16
call sym.msvcrt.dll__invalid_parameter
jmp 0x110133c92
mov rdi, qword [rcx]
test rdi, rdi
je 0x110133c87
mov edx, 0x3d
mov rcx, rdi
call sym.msvcrt.dll_wcschr
mov r15, rax
test rax, rax
je 0x110133c87
cmp rdi, rax
je 0x110133c87
mov rcx, qword [sym.msvcrt.dll__wenviron]
cmp rcx, qword [sym.msvcrt.dll___winitenv]
movzx r12d, word [rax + 2]
jne 0x110133c33
call fcn.110133f44
mov rcx, rax
mov qword [sym.msvcrt.dll__wenviron], rax
test rcx, rcx
jne 0x110133d04
mov rax, qword [sym.msvcrt.dll__environ]
test r13d, r13d
je 0x110133cb2
test rax, rax
je 0x110133cb2
call fcn.11013085c
mov qword [0x1101945a8], rax
call fcn.11013c158
mov rcx, qword [sym.msvcrt.dll__wenviron]
mov ebx, eax
call fcn.110133f44
mov qword [sym.msvcrt.dll__wenviron], rax
mov rcx, rax
test ebx, ebx
jns 0x110133d04
call fcn.1101306c4
test eax, eax
je 0x110133cfd
call sym.msvcrt.dll__errno
mov dword [rax], 0x16
or eax, 0xffffffff
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
test r12w, r12w
jne 0x110133cbc
xor eax, eax
jmp 0x110133c95
test rax, rax
jne 0x110133ce4
lea ecx, [rax + 8]
call fcn.110119f14
mov qword [sym.msvcrt.dll__environ], rax
test rax, rax
je 0x110133c92
mov qword [rax], rbp
mov rcx, qword [sym.msvcrt.dll__wenviron]
test rcx, rcx
jne 0x110133d04
mov ecx, 8
call fcn.110119f14
mov qword [sym.msvcrt.dll__wenviron], rax
test rax, rax
je 0x110133c92
mov qword [rax], rbp
mov rcx, qword [sym.msvcrt.dll__wenviron]
mov rsi, rcx
test rcx, rcx
je 0x110133c92
mov rax, qword [rcx]
sub r15, rdi
sar r15, 1
mov rbx, rcx
test rax, rax
je 0x110133d61
movsxd rbp, r15d
mov r8, rbp
mov rdx, rax
mov rcx, rdi
call sym.msvcrt.dll__wcsnicoll
xor ecx, ecx
test eax, eax
jne 0x110133d4e
mov rax, qword [rbx]
lea edx, [rcx + 0x3d]
cmp word [rax + rbp*2], dx
je 0x110133df8
cmp word [rax + rbp*2], cx
je 0x110133df8
add rbx, 8
mov rax, qword [rbx]
test rax, rax
jne 0x110133d20
mov rcx, qword [sym.msvcrt.dll__wenviron]
sub rbx, rcx
sar rbx, 3
neg ebx
xor ebp, ebp
test ebx, ebx
js 0x110133e13
cmp qword [rsi], rbp
je 0x110133e13
movsxd rax, ebx
lea rsi, [rsi + rax*8]
mov rax, qword [rsi]
cmp rax, qword [sym.msvcrt.dll___winitenv]
jb 0x110133d99
cmp rax, qword [0x110195b50]
jbe 0x110133da8
mov rcx, rax
call sym.msvcrt.dll_free
mov rcx, qword [sym.msvcrt.dll__wenviron]
test r12w, r12w
jne 0x110133e0b
cmp qword [rsi], rbp
je 0x110133dcc
mov rcx, qword [rsi + 8]
inc ebx
mov qword [rsi], rcx
lea rsi, [rsi + 8]
test rcx, rcx
jne 0x110133db3
mov rcx, qword [sym.msvcrt.dll__wenviron]
movsxd rdx, ebx
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x110133e76
mov r8d, 8
call fcn.11011a020
test rax, rax
je 0x110133e76
jmp 0x110133e6f
mov rcx, qword [sym.msvcrt.dll__wenviron]
sub rbx, rcx
sar rbx, 3
jmp 0x110133d6a
mov qword [rsi], rdi
mov qword [r14], rbp
jmp 0x110133e76
test r12w, r12w
je 0x110133f2c
mov eax, ebx
cdq
mov r8d, eax
xor r8d, edx
sub r8d, edx
lea eax, [r8 + 2]
cmp eax, r8d
jl 0x110133c92
movsxd rbx, r8d
movabs rax, 0x1fffffffffffffff
lea r8, [rbx + 2]
cmp r8, rax
jae 0x110133c92
mov edx, 8
call fcn.11011a020
test rax, rax
je 0x110133c92
mov qword [rax + rbx*8], rdi
mov qword [rax + rbx*8 + 8], rbp
mov qword [r14], rbp
mov qword [sym.msvcrt.dll__wenviron], rax
test r13d, r13d
je 0x110133f12
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rdi + rcx*2], bp
jne 0x110133e83
mov esi, 2
add rcx, rsi
mov edx, esi
call fcn.110119e8c
mov rbx, rax
test rax, rax
je 0x110133f12
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rdi + rdx*2], bp
jne 0x110133ea7
add rdx, rsi
mov r8, rdi
mov rcx, rbx
call sym.msvcrt.dll_wcscpy_s
test eax, eax
je 0x110133ed6
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.11012bbfc
lea rcx, [rbx + r15*2]
movzx eax, r12w
mov word [rcx], bp
add rcx, rsi
neg ax
sbb rdx, rdx
and rdx, rcx
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x110133f0a
or dword [rsp + 0x60], 0xffffffff
call sym.msvcrt.dll__errno
mov dword [rax], 0x2a
mov rcx, rbx
call sym.msvcrt.dll_free
test r12w, r12w
jne 0x110133f23
mov rcx, rdi
call sym.msvcrt.dll_free
mov qword [r14], rbp
mov eax, dword [rsp + 0x60]
jmp 0x110133c95
mov rcx, rdi
call sym.msvcrt.dll_free
mov qword [r14], rbp
jmp 0x110133cb8