Function at 0x1101338a8
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
and dword [rsp + 0x60], 0
mov r12d, edx
mov r15, rcx
test rcx, rcx
jne 0x1101338f8
call sym.msvcrt.dll__errno
and qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rax], 0x16
call sym.msvcrt.dll__invalid_parameter
jmp 0x1101339dd
mov rsi, qword [rcx]
test rsi, rsi
je 0x1101339d2
mov edx, 0x3d
mov rcx, rsi
call sym.msvcrt.dll__mbschr
mov r13, rax
test rax, rax
je 0x1101339d2
cmp rsi, rax
je 0x1101339d2
mov rdi, qword [sym.msvcrt.dll__environ]
mov r14d, 8
cmp rdi, qword [sym.msvcrt.dll___initenv]
mov bpl, byte [rax + 1]
jne 0x1101339b2
xor ecx, ecx
mov rbx, rdi
mov rax, rdi
test rdi, rdi
je 0x1101339ab
cmp qword [rdi], rcx
je 0x11013395d
add rax, r14
inc ecx
cmp qword [rax], 0
jne 0x110133952
lea eax, [rcx + 1]
mov rdx, r14
movsxd rcx, eax
call fcn.110119eec
mov r14, rax
mov rdi, rax
test rax, rax
jne 0x11013397e
lea ecx, [rax + 9]
call sym.msvcrt.dll__amsg_exit
mov rax, qword [rbx]
test rax, rax
je 0x1101339a1
sub rbx, r14
mov rcx, rax
call sym.msvcrt.dll__mbsdup
mov qword [r14], rax
add r14, 8
mov rax, qword [rbx + r14]
test rax, rax
jne 0x110133989
and qword [r14], 0
mov r14d, 8
mov qword [sym.msvcrt.dll__environ], rdi
test rdi, rdi
jne 0x110133a47
test r12d, r12d
je 0x1101339fd
cmp qword [sym.msvcrt.dll__wenviron], rdi
je 0x1101339fd
call fcn.1101342e4
test eax, eax
je 0x110133a40
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 bpl, bpl
jne 0x110133a06
xor eax, eax
jmp 0x1101339e0
mov rcx, r14
call fcn.110119f74
mov qword [sym.msvcrt.dll__environ], rax
test rax, rax
je 0x1101339dd
and qword [rax], 0
cmp qword [sym.msvcrt.dll__wenviron], 0
jne 0x110133a40
mov rcx, r14
call fcn.110119f74
mov qword [sym.msvcrt.dll__wenviron], rax
test rax, rax
je 0x1101339dd
and qword [rax], 0
mov rdi, qword [sym.msvcrt.dll__environ]
mov r14, rdi
test rdi, rdi
je 0x1101339dd
mov rax, qword [rdi]
mov ecx, r13d
sub ecx, esi
mov rbx, rdi
test rax, rax
je 0x110133a9e
movsxd rdi, ecx
mov r8, rdi
mov rdx, rax
mov rcx, rsi
call sym.msvcrt.dll__mbsnbicoll
test eax, eax
jne 0x110133a8b
mov rax, qword [rbx]
cmp byte [rdi + rax], 0x3d
je 0x110133b34
cmp byte [rdi + rax], 0
je 0x110133b34
add rbx, 8
mov rax, qword [rbx]
test rax, rax
jne 0x110133a62
mov rdi, qword [sym.msvcrt.dll__environ]
sub rbx, rdi
sar rbx, 3
neg ebx
test ebx, ebx
js 0x110133b50
cmp qword [r14], 0
je 0x110133b50
movsxd rax, ebx
lea r14, [r14 + rax*8]
mov rcx, qword [r14]
cmp rcx, qword [sym.msvcrt.dll___initenv]
jb 0x110133ad5
cmp rcx, qword [0x110195b48]
jbe 0x110133ae1
call sym.msvcrt.dll_free
mov rdi, qword [sym.msvcrt.dll__environ]
test bpl, bpl
jne 0x110133b47
cmp qword [r14], 0
je 0x110133b05
mov rcx, qword [r14 + 8]
inc ebx
mov qword [r14], rcx
lea r14, [r14 + 8]
test rcx, rcx
jne 0x110133aec
mov rdi, qword [sym.msvcrt.dll__environ]
movsxd rdx, ebx
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x110133bb2
mov r8d, 8
mov rcx, rdi
call fcn.11011a080
test rax, rax
je 0x110133bb2
jmp 0x110133bab
mov rdi, qword [sym.msvcrt.dll__environ]
sub rbx, rdi
sar rbx, 3
jmp 0x110133aa7
mov qword [r14], rsi
and qword [r15], 0
jmp 0x110133bb2
test bpl, bpl
je 0x110133c6c
mov eax, ebx
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
lea eax, [rcx + 2]
cmp eax, ecx
jl 0x1101339dd
movsxd rbx, ecx
movabs rax, 0x1fffffffffffffff
lea r8, [rbx + 2]
cmp r8, rax
jae 0x1101339dd
mov edx, 8
mov rcx, rdi
call fcn.11011a080
test rax, rax
je 0x1101339dd
and qword [rax + rbx*8 + 8], 0
mov qword [rax + rbx*8], rsi
and qword [r15], 0
mov qword [sym.msvcrt.dll__environ], rax
test r12d, r12d
je 0x110133c52
or rcx, 0xffffffffffffffff
inc rcx
cmp byte [rsi + rcx], 0
jne 0x110133bbf
add rcx, 2
mov edx, 1
call fcn.110119eec
mov rbx, rax
test rax, rax
je 0x110133c52
or rdx, 0xffffffffffffffff
inc rdx
cmp byte [rsi + rdx], 0
jne 0x110133be2
add rdx, 2
mov r8, rsi
mov rcx, rbx
call sym.msvcrt.dll_strcpy_s
test eax, eax
je 0x110133c13
and qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.11012bc8c
mov al, bpl
mov rcx, rbx
sub rcx, rsi
add rcx, r13
mov byte [rcx], 0
inc rcx
neg al
sbb rdx, rdx
and rdx, rcx
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x110133c4a
or dword [rsp + 0x60], 0xffffffff
call sym.msvcrt.dll__errno
mov dword [rax], 0x2a
mov rcx, rbx
call sym.msvcrt.dll_free
test bpl, bpl
jne 0x110133c63
mov rcx, rsi
call sym.msvcrt.dll_free
and qword [r15], 0
mov eax, dword [rsp + 0x60]
jmp 0x1101339e0
mov rcx, rsi
call sym.msvcrt.dll_free
and qword [r15], 0
jmp 0x110133a02