Function at 0x14000a058
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push r14
sub rsp, 0x20
xor edi, edi
mov dword [0x14005fc5c], edi
call fcn.140010f50
lea rcx, [0x140060b20]
mov dword [0x14005fc58], edi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov rcx, qword [0x14005c218]
mov dword [0x14005b070], 9
call fcn.14000c934
mov rcx, qword [0x14005c218]
call fcn.140009484
mov r8, rax
mov qword [0x14005fc50], rax
mov eax, edi
mov rdx, r8
test r8, r8
je 0x14000a0d0
mov rcx, qword [rdx + 8]
mov word [rcx + 0x2e], ax
inc eax
mov rdx, qword [rdx]
test rdx, rdx
jne 0x14000a0be
mov edx, edi
mov r9, r8
test r8, r8
je 0x14000a13b
mov r11d, dword [0x14005f440]
lea r14, [0x140000000]
mov rax, qword [r9 + 8]
mov ebx, edx
mov edx, edi
movsxd rax, dword [rax + 0x28]
lea rcx, [rax + rax*2]
mov r10, qword [r14 + rcx*8 + 0x43830]
jmp 0x14000a128
inc r11d
mov ecx, edx
mov dword [0x14005f440], r11d
lea edx, [rdx + 1]
movsxd rax, dword [r10]
lea r10, [r10 + 4]
shl rax, 6
test byte [rax + r14 + 0x5b094], 1
cmove edx, ecx
cmp dword [r10], 0x12
jne 0x14000a102
mov r9, qword [r9]
cmp edx, ebx
cmovle edx, ebx
test r9, r9
jne 0x14000a0e8
cmp dword [0x1400614a4], edi
jne 0x140021178
mov dword [0x14005fc68], edi
mov r8, rdi
mov ecx, edi
mov rax, qword [0x14005c218]
lea rdx, [0x140009f84]
test ecx, ecx
mov qword [rax + 0x20], r8
lea rax, [0x14002adb0]
cmove rax, rdx
mov r8d, 0x400
lea rdx, [0x14005f450]
mov qword [0x14005fc60], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, eax
call fcn.14000305c
lea rdx, str.bananana
lea rcx, str.MPCL_SERVER_373011
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp dword [0x14005fc68], edi
jne 0x1400211a1
mov rbx, qword [0x14005fc50]
test rbx, rbx
je 0x14000a201
mov ecx, 0x28
call fcn.140007930
mov rdx, rax
test rax, rax
je 0x1400211be
mov dword [rax], 1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], rdi
mov qword [rdx + 8], rbx
lea rcx, [0x14005fca0]
mov rax, qword [rbx + 8]
mov qword [rdx + 0x10], rax
call fcn.14000a000
mov rbx, qword [rbx]
jmp 0x14000a1bb
call fcn.140010afc
call fcn.140010950
cmp dword [0x14005fc68], edi
jne 0x1400211c6
xor edx, edx
lea rcx, str.MPCL_SERVER_373011
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [0x14005fc50]
mov eax, edi
mov dword [0x14005f3a8], eax
test rcx, rcx
je 0x14000a253
mov edx, edi
test edx, edx
jne 0x14000a24d
mov eax, dword [rcx + 0x54]
mov edx, eax
mov rcx, qword [rcx]
test rcx, rcx
jne 0x14000a23c
mov dword [0x14005f3a8], eax
cmp dword [0x14005fc58], 1
je 0x1400211d1
test eax, eax
jne 0x14000a2aa
mov rbx, qword [0x14005fc50]
test rbx, rbx
je 0x14000a29e
cmp dword [rbx + 0x50], edi
je 0x14000a299
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x14000a299
mov edx, 8
call fcn.140008bfc
mov rcx, qword [rbx + 8]
mov rdx, qword [rcx]
mov qword [rax], rdx
mov rcx, qword [rbx + 8]
mov qword [rcx], rax
mov rbx, qword [rbx]
jmp 0x14000a26b
mov rcx, qword [0x14005c218]
call fcn.14000c830
mov rcx, qword [0x14005f430]
test rcx, rcx
je 0x14000a2bc
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [0x14005fc50]
test rbx, rbx
je 0x14000a2dc
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x14000a2d7
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rbx]
jmp 0x14000a2c3
lea rcx, [0x140060b20]
mov rbx, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
jmp qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp dword [0x14005b068], edi
je 0x14000a147
cmp edx, 1
jle 0x14000a147
mov dword [0x14005fc68], 1
mov ecx, 1
jmp 0x14000a152
or dword [0x14005d250], 0xffffffff
call fcn.14002af00
cmp dword [0x14005fc68], edi
jne 0x14000a206
jmp 0x14000a1b4
mov rdx, rdi
jmp 0x14000a1e4
call fcn.14002ace8
nop
jmp 0x14000a217
mov ecx, 0x1f68
call fcn.14000cfa4
mov eax, dword [0x14005f3a8]
jmp 0x14000a260