Function at 0x180031998
Capabilities:
Set current directory
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r14
lea rbp, [rax - 0x168]
sub rsp, 0x250
mov rax, qword [0x180375980]
xor rax, rsp
mov qword [rbp + 0x140], rax
mov ebx, edx
mov rdi, rcx
xor esi, esi
call fcn.180021fa4
test ebx, ebx
jne 0x1800319ef
xor edx, edx
lea rcx, str.KSL_CONSOLE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x18003210c
cmp ebx, 1
jne 0x18003210c
xor edx, edx
mov ecx, ebx
call fcn.18002a404
mov word [rsp + 0x30], 0x900
mov byte [rsp + 0x32], 0xa
lea rax, [rsp + 0x32]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x31]
lea r8, [rsp + 0x30]
lea rdx, str.KSL_version:_..
lea rcx, [rbp - 0x40]
call fcn.180025a50
nop
lea r14d, [rbx + 1]
mov edx, r14d
mov rcx, rax
call fcn.18002a548
nop
lea rcx, [rbp - 0x40]
call fcn.1800133a0
xor edx, edx
lea rcx, [rbp - 0x60]
call fcn.1800300fc
nop
lea rcx, [rbp + 0x20]
call fcn.180031888
nop
mov rdx, rdi
lea rcx, [rbp]
call fcn.1800300fc
nop
mov r8b, bl
lea rdx, [rbp]
lea rcx, [rbp - 0x20]
call fcn.1800314f4
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rsi
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], 7
cmova rdx, qword [rbp - 0x60]
mov r8, qword [rbp - 0x50]
lea rcx, [rsp + 0x60]
call fcn.180001ed8
nop
lea rbx, [rsp + 0x60]
cmp qword [rsp + 0x78], 7
cmova rbx, qword [rsp + 0x60]
or r12, 0xffffffffffffffff
mov rdi, qword [rsp + 0x70]
test rdi, rdi
je 0x180031b8b
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0x40]
call fcn.1800e44e0
lea rcx, [0x1800edf34]
mov edx, 0x100
cmp word [rcx], dx
jae 0x180031b37
movzx eax, byte [rcx]
mov byte [rbp + rax + 0x40], 1
add rcx, r14
lea rax, [0x1800edf38]
cmp rcx, rax
jne 0x180031aee
lea rcx, [rdi - 1]
mov rax, r12
cmp rcx, r12
cmovb rax, rcx
lea r8, [rbx + rax*2]
cmp word [r8], dx
jae 0x180031b2d
movzx eax, word [r8]
cmp byte [rbp + rax + 0x40], sil
jne 0x180031b83
cmp r8, rbx
je 0x180031b8b
sub r8, r14
jmp 0x180031b1c
lea rcx, [rdi - 1]
mov rax, r12
cmp rcx, r12
cmovb rax, rcx
lea r8, [rbx + rax*2]
mov rcx, r14
movzx edx, word [r8]
lea rax, [0x1800edf34]
mov r9d, 0x2f
cmp r9w, dx
je 0x180031b83
cmp rcx, 1
je 0x180031b79
dec rcx
add rax, r14
cmp word [rax], dx
jne 0x180031b63
test rax, rax
jne 0x180031b83
cmp r8, rbx
je 0x180031b8b
sub r8, r14
jmp 0x180031b49
sub r8, rbx
sar r8, 1
jmp 0x180031b8e
mov r8, r12
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
cmp rdi, r8
cmovb r8, rdi
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 7
cmova rdx, qword [rsp + 0x60]
lea rcx, [rbp - 0x40]
call fcn.180001d08
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
mov ebx, 0x20
mov r8d, ebx
lea rdx, [rbp - 0x40]
lea rcx, [rsp + 0x40]
call fcn.1800e3e40
lea rdi, [0x1803750f8]
mov rcx, rdi
call fcn.1800133a0
mov r8d, ebx
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.1800e3e40
movdqa xmm0, xmmword [0x1800ea3c0]
movdqu xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x40], si
mov r12d, 0x1000
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x180031c5b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, r12
jb 0x180031c56
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180032143
call fcn.1800af2ac
mov rcx, rdi
cmp qword [reloc.WS2_32.dll_getsockopt], 7
cmova rcx, qword [0x1803750f8]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov r8b, sil
lea rdx, str.kino
lea rcx, [rbp - 0x40]
call fcn.1800020a0
nop
lea r8, [rbp - 0x40]
mov rdx, rdi
lea rcx, [rbp - 0x80]
call fcn.180020624
nop
lea rcx, [rbp - 0x40]
call fcn.1800133a0
lea rcx, [rbp - 0x80]
call fcn.180014a4c
test al, al
jne 0x180031cce
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 7
cmova rcx, qword [rbp - 0x80]
call fcn.18008ee1c
shr rax, 0x20
test eax, eax
jne 0x180032149
call fcn.1800113a0
mov ebx, dword [rax]
mov dword [rsp + 0x30], ebx
mov eax, ebx
shr eax, 8
test al, al
je 0x180031d54
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
mov r8d, reloc.WS2_32.dll_ntohs
lea rdx, str.kino_loader.log
lea rcx, [rsp + 0x40]
call fcn.180001d08
nop
lea rcx, [rsp + 0x40]
call fcn.18002a450
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x180031d54
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, r12
jb 0x180031d4f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003215c
call fcn.1800af2ac
lea rax, [rsp + 0x33]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x32]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x31]
lea r8, [rsp + 0x30]
lea rdx, str.Config:_n____enabled___n____mmLog___n____gameLog___n____console__
lea rcx, [rsp + 0x40]
call fcn.180031004
nop
mov edx, r14d
mov rcx, rax
call fcn.18002a548
nop
lea rcx, [rsp + 0x40]
call fcn.1800133a0
mov edx, r14d
lea rcx, str.Proxy_started
call fcn.18002a580
lea rax, [rbp - 0x60]
cmp qword [rbp - 0x48], 7
cmova rax, qword [rbp - 0x60]
mov qword [rsp + 0x38], rax
lea r8, [rsp + 0x38]
lea rdx, str.Exe_path:_
lea rcx, [rsp + 0x40]
call fcn.1800063ac
nop
mov edx, r14d
mov rcx, rax
call fcn.18002a548
nop
lea rcx, [rsp + 0x40]
call fcn.1800133a0
lea rax, [rbp]
cmp qword [rbp + 0x18], 7
cmova rax, qword [rbp]
mov qword [rsp + 0x38], rax
lea r8, [rsp + 0x38]
lea rdx, str.Proxy_path:_
lea rcx, [rsp + 0x40]
call fcn.1800063ac
nop
mov edx, r14d
mov rcx, rax
call fcn.18002a548
nop
lea rcx, [rsp + 0x40]
call fcn.1800133a0
cmp qword [reloc.WS2_32.dll_getsockopt], 7
cmova rdi, qword [0x1803750f8]
mov qword [rsp + 0x38], rdi
lea r8, [rsp + 0x38]
lea rdx, str.App_dir:_
lea rcx, [rsp + 0x40]
call fcn.1800063ac
nop
mov edx, r14d
mov rcx, rax
call fcn.18002a548
nop
lea rcx, [rsp + 0x40]
call fcn.1800133a0
lea rax, [rbp + 0x20]
cmp qword [rbp + 0x38], 7
cmova rax, qword [rbp + 0x20]
mov qword [rsp + 0x38], rax
lea r8, [rsp + 0x38]
lea rdx, str.Working_dir:_
lea rcx, [rsp + 0x40]
call fcn.1800063ac
nop
mov edx, r14d
mov rcx, rax
call fcn.18002a548
nop
lea rcx, [rsp + 0x40]
call fcn.1800133a0
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
lea rdx, [rbp - 0x20]
cmp qword [rbp - 8], 7
cmova rdx, qword [rbp - 0x20]
mov r8, qword [rbp - 0x10]
lea rcx, [rsp + 0x40]
call fcn.180001ed8
nop
lea rcx, [rsp + 0x40]
call fcn.180030ad4
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x180031f22
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, r12
jb 0x180031f1d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180032162
call fcn.1800af2ac
mov edx, r14d
lea rcx, str.Proxy_loaded
call fcn.18002a580
lea rdi, [0x1800ef360]
cmp byte [rsp + 0x32], sil
je 0x180031f4f
mov rdx, rdi
lea rcx, str.KSL_FILE_LOG
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edx, r14d
test bl, bl
je 0x18003207b
lea rcx, str.Proxy_enabled
call fcn.18002a580
lea rcx, str.UnityPlayer
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rbx, rax
test rax, rax
jne 0x180031f87
lea rcx, str.No_UnityPlayer.dll_found__aborting_loader_execution
jmp 0x18003208e
lea rdx, str.mono_jit_init_version
lea rcx, [rsp + 0x38]
call fcn.1800310d0
mov rdx, qword [rax]
mov qword [rax], rsi
mov rcx, qword [0x180379068]
mov qword [0x180379068], rdx
test rcx, rcx
je 0x180031fbb
mov edx, 1
call fcn.180031238
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180031fcf
mov edx, 1
call fcn.180031238
mov edx, r14d
lea rcx, str.Mono_backend_created
call fcn.18002a580
mov edx, r14d
lea rcx, str.Installing_IAT_hook
call fcn.18002a580
lea r9, [0x1800312d4]
mov r8, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x1800ef480]
mov rcx, rbx
call fcn.180031424
test eax, eax
je 0x18003206d
lea r9, [0x1800312b4]
mov r8, qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [0x1800ef480]
mov rcx, rbx
call fcn.180031424
test eax, eax
je 0x18003206d
mov edx, r14d
lea rcx, str.Proxy_hook_installed
call fcn.18002a580
mov rdx, rdi
lea rcx, str.KSL_DISABLE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [0x1800ef510]
cmp byte [rsp + 0x33], sil
cmovne rdx, rdi
lea rcx, str.KSL_CONSOLE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x180032087
mov edx, 4
lea rcx, str.Failed_to_install_IAT_hook_
jmp 0x180032082
lea rcx, str.Proxy_disabled
call fcn.18002a580
lea rcx, str.Proxy_setup_completed
mov edx, r14d
call fcn.18002a580
call fcn.18002a1cc
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, 7
jbe 0x1800320d4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, r12
jb 0x1800320cf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003213d
call fcn.1800af2ac
movdqa xmm0, xmmword [0x1800ea3c0]
movdqu xmmword [rbp - 0x70], xmm0
mov word [rbp - 0x80], si
lea rcx, [rbp - 0x20]
call fcn.1800133a0
nop
lea rcx, [rbp]
call fcn.1800133a0
nop
lea rcx, [rbp + 0x20]
call fcn.1800133a0
nop
lea rcx, [rbp - 0x60]
call fcn.1800133a0
mov eax, 1
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.1800af730
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rbp
ret
call fcn.1800b698c
nop
call fcn.1800b698c
nop
lea r8, [rbp - 0x80]
mov edx, eax
lea rcx, str.create_directory
call fcn.180020b78
int3
call fcn.1800b698c
int3
call fcn.1800b698c
int3