Function at 0x1101337bc
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 0x11013380c
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 0x1101338f1
mov rsi, qword [rcx]
test rsi, rsi
je 0x1101338e6
mov edx, 0x3d
mov rcx, rsi
call sym.msvcrt.dll__mbschr
mov r13, rax
test rax, rax
je 0x1101338e6
cmp rsi, rax
je 0x1101338e6
mov rdi, qword [sym.msvcrt.dll__environ]
mov r14d, 8
cmp rdi, qword [sym.msvcrt.dll___initenv]
mov bpl, byte [rax + 1]
jne 0x1101338c6
xor ecx, ecx
mov rbx, rdi
mov rax, rdi
test rdi, rdi
je 0x1101338bf
cmp qword [rdi], rcx
je 0x110133871
add rax, r14
inc ecx
cmp qword [rax], 0
jne 0x110133866
lea eax, [rcx + 1]
mov rdx, r14
movsxd rcx, eax
call fcn.110119e8c
mov r14, rax
mov rdi, rax
test rax, rax
jne 0x110133892
lea ecx, [rax + 9]
call sym.msvcrt.dll__amsg_exit
mov rax, qword [rbx]
test rax, rax
je 0x1101338b5
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 0x11013389d
and qword [r14], 0
mov r14d, 8
mov qword [sym.msvcrt.dll__environ], rdi
test rdi, rdi
jne 0x11013395b
test r12d, r12d
je 0x110133911
cmp qword [sym.msvcrt.dll__wenviron], rdi
je 0x110133911
call fcn.1101341f8
test eax, eax
je 0x110133954
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 0x11013391a
xor eax, eax
jmp 0x1101338f4
mov rcx, r14
call fcn.110119f14
mov qword [sym.msvcrt.dll__environ], rax
test rax, rax
je 0x1101338f1
and qword [rax], 0
cmp qword [sym.msvcrt.dll__wenviron], 0
jne 0x110133954
mov rcx, r14
call fcn.110119f14
mov qword [sym.msvcrt.dll__wenviron], rax
test rax, rax
je 0x1101338f1
and qword [rax], 0
mov rdi, qword [sym.msvcrt.dll__environ]
mov r14, rdi
test rdi, rdi
je 0x1101338f1
mov rax, qword [rdi]
mov ecx, r13d
sub ecx, esi
mov rbx, rdi
test rax, rax
je 0x1101339b2
movsxd rdi, ecx
mov r8, rdi
mov rdx, rax
mov rcx, rsi
call sym.msvcrt.dll__mbsnbicoll
test eax, eax
jne 0x11013399f
mov rax, qword [rbx]
cmp byte [rdi + rax], 0x3d
je 0x110133a48
cmp byte [rdi + rax], 0
je 0x110133a48
add rbx, 8
mov rax, qword [rbx]
test rax, rax
jne 0x110133976
mov rdi, qword [sym.msvcrt.dll__environ]
sub rbx, rdi
sar rbx, 3
neg ebx
test ebx, ebx
js 0x110133a64
cmp qword [r14], 0
je 0x110133a64
movsxd rax, ebx
lea r14, [r14 + rax*8]
mov rcx, qword [r14]
cmp rcx, qword [sym.msvcrt.dll___initenv]
jb 0x1101339e9
cmp rcx, qword [0x110195b48]
jbe 0x1101339f5
call sym.msvcrt.dll_free
mov rdi, qword [sym.msvcrt.dll__environ]
test bpl, bpl
jne 0x110133a5b
cmp qword [r14], 0
je 0x110133a19
mov rcx, qword [r14 + 8]
inc ebx
mov qword [r14], rcx
lea r14, [r14 + 8]
test rcx, rcx
jne 0x110133a00
mov rdi, qword [sym.msvcrt.dll__environ]
movsxd rdx, ebx
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x110133ac6
mov r8d, 8
mov rcx, rdi
call fcn.11011a020
test rax, rax
je 0x110133ac6
jmp 0x110133abf
mov rdi, qword [sym.msvcrt.dll__environ]
sub rbx, rdi
sar rbx, 3
jmp 0x1101339bb
mov qword [r14], rsi
and qword [r15], 0
jmp 0x110133ac6
test bpl, bpl
je 0x110133b80
mov eax, ebx
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
lea eax, [rcx + 2]
cmp eax, ecx
jl 0x1101338f1
movsxd rbx, ecx
movabs rax, 0x1fffffffffffffff
lea r8, [rbx + 2]
cmp r8, rax
jae 0x1101338f1
mov edx, 8
mov rcx, rdi
call fcn.11011a020
test rax, rax
je 0x1101338f1
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 0x110133b66
or rcx, 0xffffffffffffffff
inc rcx
cmp byte [rsi + rcx], 0
jne 0x110133ad3
add rcx, 2
mov edx, 1
call fcn.110119e8c
mov rbx, rax
test rax, rax
je 0x110133b66
or rdx, 0xffffffffffffffff
inc rdx
cmp byte [rsi + rdx], 0
jne 0x110133af6
add rdx, 2
mov r8, rsi
mov rcx, rbx
call sym.msvcrt.dll_strcpy_s
test eax, eax
je 0x110133b27
and qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.11012bbfc
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 0x110133b5e
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 0x110133b77
mov rcx, rsi
call sym.msvcrt.dll_free
and qword [r15], 0
mov eax, dword [rsp + 0x60]
jmp 0x1101338f4
mov rcx, rsi
call sym.msvcrt.dll_free
and qword [r15], 0
jmp 0x110133916