Function at 0x1401f5d50
Capabilities:
Identify system language via api
Set thread local storage value

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x118
mov dword [rsp + 0x5c], 0xcedc
cmp dword [rsp + 0x5c], 0xbd96
jbe 0x1401f5e02
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x94], eax
cmp dword [rsp + 0x94], 0xcedc
je 0x1401f5d90
jmp 0x1401f5db0
mov eax, dword [0x140274b90]
mov dword [rsp + 0x40], eax
mov eax, 0xcce
mov word [rsp + 0x38], ax
movzx eax, word [rsp + 0x38]
mov word [rsp + 0x3c], ax
jmp 0x1401f5dfd
mov eax, dword [rsp + 0x120]
mov ecx, dword [0x140274b90]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x40], eax
mov r8, qword [rsp + 0xe0]
mov edx, 0x71
mov ecx, 0xac
call qword [sym.imp.KERNEL32.dll_SetLocaleInfoA]
mov dword [rsp + 0x78], eax
mov rdx, qword [rsp + 0x128]
mov ecx, dword [rsp + 0x40]
call fcn.1401f5d50
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x120], eax
mov byte [rsp + 0x30], 3
mov eax, dword [rsp + 0x5c]
add eax, 0xae5d
cmp eax, 0x82d7
jbe 0x1401f5e7b
movzx eax, word [rsp + 0x3c]
imul eax, eax, 0x2a7
movzx ecx, word [rsp + 0x38]
cmp eax, ecx
jne 0x1401f5e35
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
mov dword [rsp + 0x50], eax
jmp 0x1401f5e79
movsx eax, byte [rsp + 0x30]
cmp eax, 0x6c
jge 0x1401f5e79
movabs rax, 0x7b2236935d21ae
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x58], eax
movzx eax, word [0x140273278]
mov word [rsp + 0x34], ax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x80], rax
jmp 0x1401f5e87
movsx eax, byte [rsp + 0x30]
or eax, 0xe
mov byte [rsp + 0x30], al
movsx eax, byte [rsp + 0x30]
xor eax, 9
cmp eax, 0x62
jne 0x1401f5f36
movsx eax, word [rsp + 0x34]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0x1d0
je 0x1401f5eb7
cmp dword [rsp + 0x70], 0x385
je 0x1401f5f28
jmp 0x1401f5f36
movzx r9d, byte [rsp + 0x30]
mov r8d, dword [rsp + 0x58]
movzx edx, word [rsp + 0x34]
movzx ecx, word [rsp + 0x38]
call fcn.1401f4ec0
mov eax, dword [rsp + 0x50]
movzx ecx, al
mov eax, dword [rsp + 0x40]
sar eax, cl
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0xb8], rcx
movzx ecx, al
mov rax, qword [rsp + 0xb8]
mov eax, dword [rax]
shl eax, cl
mov dword [rsp + 0x40], eax
lea rdx, [rsp + 0x34]
mov ecx, 0x53
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [rsp + 0x9c], eax
call fcn.1401f5210
nop
jmp 0x1401f5f36
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
mov dword [rsp + 0x120], eax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xa0], rax
movabs rax, 0x7b2236935d21ae
cmp qword [rsp + 0xa0], rax
je 0x1401f5f74
movabs rax, 0x7ba7ecb5ff30b7
cmp qword [rsp + 0xa0], rax
je 0x1401f6008
jmp 0x1401f6069
mov rax, qword [rsp + 0x80]
mov rax, qword [rax]
movabs rcx, 0x72c3a132cdc1f3
sub rax, rcx
cmp rax, qword [rsp + 0x68]
jle 0x1401f5ff8
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0x877c
je 0x1401f5fad
jmp 0x1401f5fe3
mov ecx, 0xf2
call qword [sym.imp.KERNEL32.dll_AttachConsole]
mov dword [rsp + 0xa8], eax
mov eax, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x50]
and ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
movzx eax, word [rsp + 0x3c]
sub eax, 0x52c
mov word [rsp + 0x38], ax
jmp 0x1401f5ff6
mov eax, dword [rsp + 0x50]
mov ecx, dword [rsp + 0x40]
add ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
jmp 0x1401f6006
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
mov dword [rsp + 0x8c], eax
jmp 0x1401f6069
lea r8, [rsp + 0x9c]
mov edx, 1
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_GetCurrentConsoleFont]
mov dword [rsp + 0x78], eax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
mov dword [rsp + 0x120], eax
mov rax, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x120]
mov eax, dword [rax]
sub eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x80]
mov rax, qword [rax]
movabs rcx, 0x787f3cc5994335
add rax, rcx
mov qword [rsp + 0x68], rax
movzx eax, word [rsp + 0x34]
mov word [rsp + 0x64], ax
movzx eax, word [rsp + 0x38]
mov word [rsp + 0x54], ax
movsx eax, word [rsp + 0x34]
mov dword [rsp + 0x88], eax
cmp dword [rsp + 0x88], 0xe6
je 0x1401f6098
jmp 0x1401f60f9
mov rax, qword [rsp + 0x80]
mov rax, qword [rax]
shl rax, 0x35
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0xac]
mov r8d, dword [rsp + 0xb0]
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_ReadConsoleOutputA]
mov dword [rsp + 0x7c], eax
mov rax, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x50]
mov eax, dword [rax]
or eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
jmp 0x1401f624c
mov rax, qword [rsp + 0x80]
movabs rcx, 0x71278864505842
mov rax, qword [rax]
xor rax, rcx
cmp rax, qword [rsp + 0x68]
jg 0x1401f616c
movzx eax, byte [rsp + 0x30]
mov byte [rsp + 0x74], al
cmp byte [rsp + 0x74], 3
je 0x1401f6131
cmp byte [rsp + 0x74], 0x3e
je 0x1401f615b
jmp 0x1401f6167
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x90], eax
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0xc8], rax
lea rax, [rsp + 0x54]
mov qword [rsp + 0xd0], rax
jmp 0x1401f6167
movsx eax, byte [rsp + 0x30]
add eax, 0x5f
mov byte [rsp + 0x30], al
jmp 0x1401f6208
mov r8d, 0xa3
mov edx, 0x5b
lea rcx, [fcn.1401f4ec0]
call qword [sym.imp.KERNEL32.dll_EnumUILanguagesA]
mov dword [rsp + 0x78], eax
mov rdx, qword [rsp + 0xc8]
mov rax, qword [rsp + 0x48]
mov ecx, dword [rax]
call fcn.1401f5d50
movsx eax, word [rsp + 0x34]
movsx ecx, word [0x140273278]
sub eax, ecx
mov word [rsp + 0x64], ax
mov ecx, 0x6d
call qword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov dword [rsp + 0x7c], eax
mov rax, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x8c]
mov eax, dword [rax]
sub eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
movzx r9d, byte [rsp + 0x30]
mov r8d, dword [rsp + 0x58]
movzx edx, word [rsp + 0x34]
mov rax, qword [rsp + 0xd0]
movzx ecx, word [rax]
call fcn.1401f4ec0
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x5c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x90], eax
lea rax, [rsp + 0x50]
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xf8], rax
lea rax, [rsp + 0x128]
mov qword [rsp + 0x100], rax
movzx eax, byte [rsp + 0x30]
mov byte [rsp + 0x60], al
movzx eax, word [rsp + 0x38]
movzx ecx, word [rsp + 0x54]
and eax, ecx
mov word [rsp + 0x3c], ax
mov ecx, 0x47
call qword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov dword [rsp + 0x7c], eax
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0xd8], rcx
movzx ecx, al
mov rax, qword [rsp + 0xd8]
mov eax, dword [rax]
sar eax, cl
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov eax, dword [0x140274b90]
add rsp, 0x118
ret