Function at 0x1400099d0
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 [0x14005fc4c], edi
call fcn.140001494
lea rcx, [0x140060b10]
mov dword [0x14005fc48], edi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov rcx, qword [0x14005c218]
mov dword [0x14005b070], 9
call fcn.14000c1b4
mov rcx, qword [0x14005c218]
call fcn.140008d84
mov r8, rax
mov qword [0x14005fc40], rax
mov eax, edi
mov rdx, r8
test r8, r8
je 0x140009a48
mov rcx, qword [rdx + 8]
mov word [rcx + 0x2e], ax
inc eax
mov rdx, qword [rdx]
test rdx, rdx
jne 0x140009a36
mov edx, edi
mov r9, r8
test r8, r8
je 0x140009ab3
mov r11d, dword [0x14005f430]
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 + 0x43320]
jmp 0x140009aa0
inc r11d
mov ecx, edx
mov dword [0x14005f430], 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 0x140009a7a
mov r9, qword [r9]
cmp edx, ebx
cmovle edx, ebx
test r9, r9
jne 0x140009a60
cmp dword [0x14006146c], edi
jne 0x140020db6
mov dword [0x14005fc58], edi
mov r8, rdi
mov ecx, edi
mov rax, qword [0x14005c218]
lea rdx, [0x140009884]
test ecx, ecx
mov qword [rax + 0x20], r8
lea rax, [0x14002ad1c]
cmove rax, rdx
mov r8d, 0x400
lea rdx, [0x14005f440]
mov qword [0x14005fc50], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, eax
call fcn.14000295c
lea rdx, str.bananana
lea rcx, str.MPCL_SERVER_373011
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp dword [0x14005fc58], edi
jne 0x140020ddf
mov rbx, qword [0x14005fc40]
test rbx, rbx
je 0x140009b79
mov ecx, 0x28
call fcn.140007230
mov rdx, rax
test rax, rax
je 0x140020dfc
mov dword [rax], 1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], rdi
mov qword [rdx + 8], rbx
lea rcx, [0x14005fc90]
mov rax, qword [rbx + 8]
mov qword [rdx + 0x10], rax
call fcn.140009978
mov rbx, qword [rbx]
jmp 0x140009b33
call fcn.140010c64
call fcn.140010ab8
cmp dword [0x14005fc58], edi
jne 0x140020e04
xor edx, edx
lea rcx, str.MPCL_SERVER_373011
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [0x14005fc40]
mov eax, edi
mov dword [0x14005f338], eax
test rcx, rcx
je 0x140009bcb
mov edx, edi
test edx, edx
jne 0x140009bc5
mov eax, dword [rcx + 0x54]
mov edx, eax
mov rcx, qword [rcx]
test rcx, rcx
jne 0x140009bb4
mov dword [0x14005f338], eax
cmp dword [0x14005fc48], 1
je 0x140020e0f
test eax, eax
jne 0x140009c22
mov rbx, qword [0x14005fc40]
test rbx, rbx
je 0x140009c16
cmp dword [rbx + 0x50], edi
je 0x140009c11
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x140009c11
mov edx, 8
call fcn.1400084fc
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 0x140009be3
mov rcx, qword [0x14005c218]
call fcn.14000c0b0
mov rcx, qword [0x14005f420]
test rcx, rcx
je 0x140009c34
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [0x14005fc40]
test rbx, rbx
je 0x140009c54
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x140009c4f
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rbx]
jmp 0x140009c3b
lea rcx, [0x140060b10]
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 0x140009abf
cmp edx, 1
jle 0x140009abf
mov dword [0x14005fc58], 1
mov ecx, 1
jmp 0x140009aca
or dword [0x14005d260], 0xffffffff
call fcn.14002ae6c
cmp dword [0x14005fc58], edi
jne 0x140009b7e
jmp 0x140009b2c
mov rdx, rdi
jmp 0x140009b5c
call fcn.14002ac54
nop
jmp 0x140009b8f
mov ecx, 0x1f68
call fcn.14000c824
mov eax, dword [0x14005f338]
jmp 0x140009bd8