Function at 0x499300
Capabilities:
Set environment variable

Disassembly:
mov dword [rsp + 0x10], edx
sub rsp, 0x68
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r13
xor ebp, ebp
test rcx, rcx
mov qword [rsp + 0x30], r14
mov edi, edx
mov r12, rcx
mov qword [rsp + 0x28], r15
je 0x4993a7
mov rsi, qword [rcx]
test rsi, rsi
je 0x4993a7
mov edx, 0x3d
mov rcx, rsi
call fcn.00488820
test rax, rax
mov r15, rax
je 0x4993a7
cmp rsi, rax
je 0x4993a7
cmp byte [rax + 1], bpl
mov rcx, qword [0x004e5478]
mov r14d, ebp
sete r14b
cmp rcx, qword [0x004e5480]
jne 0x499388
call fcn.00499260
mov rcx, rax
mov qword [0x004e5478], rax
test rcx, rcx
jne 0x499424
test edi, edi
je 0x4993d9
cmp qword [0x004e5488], rbp
je 0x4993d9
call fcn.00498960
test eax, eax
je 0x49941d
mov eax, 0xffffffff
mov r15, qword [rsp + 0x28]
mov r14, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
mov r12, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x58]
add rsp, 0x68
ret
test r14d, r14d
jne 0x4995c9
mov ecx, 8
call fcn.00487350
test rax, rax
mov qword [0x004e5478], rax
je 0x4993a7
mov qword [rax], rbp
cmp qword [0x004e5488], rbp
jne 0x49941d
mov ecx, 8
call fcn.00487350
test rax, rax
mov qword [0x004e5488], rax
je 0x4993a7
mov qword [rax], rbp
mov rcx, qword [0x004e5478]
mov eax, r15d
mov r13, rcx
mov rdi, rcx
sub eax, esi
movsxd rbx, eax
mov rax, qword [rcx]
test rax, rax
je 0x49947e
nop
nop
mov r8, rbx
mov rdx, rax
mov rcx, rsi
call fcn.004988b0
test eax, eax
jne 0x49946a
mov rax, qword [rdi]
movzx ecx, byte [rbx + rax]
cmp cl, 0x3d
je 0x4994e8
test cl, cl
je 0x4994e8
mov rax, qword [rdi + 8]
add rdi, 8
test rax, rax
jne 0x499440
mov rcx, qword [0x004e5478]
sub rdi, rcx
sar rdi, 3
neg edi
test edi, edi
js 0x499503
cmp qword [r13], rbp
je 0x499503
movsxd rbx, edi
mov rcx, qword [r13 + rbx*8]
call fcn.00487200
test r14d, r14d
je 0x4994f8
cmp qword [r13 + rbx*8], rbp
je 0x4994c7
lea rdx, [r13 + rbx*8]
mov rcx, rdx
mov rax, qword [rdx + 8]
add rcx, 8
inc edi
mov qword [rdx], rax
cmp qword [rcx], rbp
mov rdx, rcx
jne 0x4994b2
mov rcx, qword [0x004e5478]
movsxd rdx, edi
shl rdx, 3
call fcn.0048a970
test rax, rax
je 0x499544
mov qword [0x004e5478], rax
jmp 0x499544
mov rcx, qword [0x004e5478]
sub rdi, rcx
sar rdi, 3
jmp 0x499487
mov qword [r13 + rbx*8], rsi
mov qword [r12], rbp
jmp 0x499544
test r14d, r14d
jne 0x4995bd
test edi, edi
jns 0x499512
neg edi
lea eax, [rdi + 2]
movsxd rdx, eax
shl rdx, 3
call fcn.0048a970
test rax, rax
mov r11, rax
je 0x4993a7
movsxd rax, edi
mov qword [r11 + rax*8], rsi
mov qword [r11 + rax*8 + 8], rbp
mov qword [r12], rbp
mov qword [0x004e5478], r11
cmp dword [rsp + 0x78], ebp
je 0x4995a9
xor eax, eax
mov rbx, 0xffffffffffffffff
mov rdi, rsi
mov rcx, rbx
repne scasb al, byte [rdi]
not rcx
inc rcx
call fcn.00487350
test rax, rax
mov rdi, rax
je 0x4995a9
mov rdx, rsi
sub rax, rsi
movzx ecx, byte [rdx]
inc rdx
test cl, cl
mov byte [rax + rdx - 1], cl
jne 0x499574
lea rdx, [rax + r15]
mov rcx, rdi
mov byte [rdx], bpl
inc rdx
test r14d, r14d
cmovne rdx, rbp
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov rcx, rdi
test eax, eax
cmove ebp, ebx
call fcn.00487200
test r14d, r14d
je 0x4995b6
mov rcx, rsi
call fcn.00487200
mov eax, ebp
jmp 0x4993ac
mov rcx, rsi
call fcn.00487200
mov qword [r12], rbp
xor eax, eax
jmp 0x4993ac