Function at 0x140001a20
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
lea rcx, str.PTC_USE_SYS_DEFAULT_LANG_CHARSET
xor dil, dil
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001a7f
movsxd rax, dword [0x1400bb290]
mov dil, 1
imul rcx, rax, 0x38
mov rax, qword [0x14007d060]
test byte [rcx + rax + 0x18], 0x40
je 0x140001a7f
mov r8, qword [rcx + rax]
lea rcx, str._s_MONITOR:_s:
mov rdx, qword [str._unknown_program_]
call fcn.140003480
lea rcx, str.User_has_set_env_variable_named_PTC_USE_SYS_DEFAULT_LANG_CHARSET
call fcn.140003210
cmp dword [0x1400bae30], 0
lea r14, [0x140000000]
jne 0x140001c3e
test dil, dil
jne 0x140001c3e
lea rcx, str.LANG
mov qword [rsp + 0x30], rbx
call fcn.140001330
mov rbx, rax
test rax, rax
je 0x140001b23
cmp byte [rax], dil
je 0x140001b23
mov rcx, rax
call fcn.140001870
mov dword [0x1400bae30], eax
test eax, eax
je 0x140001b23
movsxd rcx, dword [0x1400bb290]
mov rax, qword [0x14007d060]
imul rdx, rcx, 0x38
test byte [rdx + rax + 0x18], 0x40
je 0x140001c39
mov r8, qword [rdx + rax]
lea rcx, str._s_MONITOR:_s:
mov rdx, qword [str._unknown_program_]
call fcn.140003480
movsxd rdx, dword [0x1400bae30]
lea rcx, str.Setting_System_Language_to__d___s__from_LANG___s__n
mov r9, rbx
mov r8, qword [r14 + rdx*8 + 0x7c730]
call fcn.140003210
jmp 0x140001c39
xor edx, edx
mov qword [rsp + 0x38], rsi
lea ecx, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
mov rcx, rax
call fcn.1400038b0
lea rdx, [0x1400bb1b8]
mov ecx, 2
mov rsi, rax
call qword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
mov rbx, rax
test rax, rax
je 0x140001bc3
cmp byte [rax], 0
je 0x140001bc3
mov rcx, rax
call fcn.140001870
mov dword [0x1400bae30], eax
test eax, eax
je 0x140001bc3
movsxd rcx, dword [0x1400bb290]
mov rax, qword [0x14007d060]
imul rdx, rcx, 0x38
test byte [rdx + rax + 0x18], 0x40
je 0x140001c18
mov r8, qword [rdx + rax]
lea rcx, str._s_MONITOR:_s:
mov rdx, qword [str._unknown_program_]
call fcn.140003480
movsxd rdx, dword [0x1400bae30]
lea rcx, str.Setting_System_Language_to__d___s__from_CTYPE_locale___s__n
mov r9, rbx
mov r8, qword [r14 + rdx*8 + 0x7c730]
call fcn.140003210
jmp 0x140001c18
movsxd rax, dword [0x1400bb290]
imul rcx, rax, 0x38
mov rax, qword [0x14007d060]
mov dword [0x1400bae30], 0xe
test byte [rcx + rax + 0x18], 0x40
je 0x140001c18
mov r8, qword [rcx + rax]
lea rcx, str._s_MONITOR:_s:
mov rdx, qword [str._unknown_program_]
call fcn.140003480
movsxd rdx, dword [0x1400bae30]
lea rcx, str.Setting_System_Language_to_default__d___s__n
mov r8, qword [r14 + rdx*8 + 0x7c730]
call fcn.140003210
test rsi, rsi
je 0x140001c34
mov rdx, rsi
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
cmp dword [0x14007c18c], 1
jne 0x140001c9a
test dil, dil
jne 0x140001c9a
movsxd rax, dword [0x1400bae30]
mov eax, dword [r14 + rax*4 + 0x7c8d0]
mov dword [0x14007c18c], eax
movsxd rax, dword [0x1400bb290]
imul rdx, rax, 0x38
mov rax, qword [0x14007d060]
test byte [rdx + rax + 0x18], 0x40
je 0x140001ce5
mov r8, qword [rdx + rax]
lea rcx, str._s_MONITOR:_s:
mov rdx, qword [str._unknown_program_]
call fcn.140003480
lea rcx, [0x14007cd18]
jmp 0x140001cd1
movsxd rax, dword [0x1400bb290]
imul rcx, rax, 0x38
mov rax, qword [0x14007d060]
test byte [rcx + rax + 0x18], 0x40
je 0x140001ce5
mov r8, qword [rcx + rax]
lea rcx, str._s_MONITOR:_s:
mov rdx, qword [str._unknown_program_]
call fcn.140003480
lea rcx, str.Setting_System_CharSet_to__d___s__n
movsxd rdx, dword [0x14007c18c]
mov r8, qword [r14 + rdx*8 + 0x7c5c0]
call fcn.140003210
mov rdi, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret
sub rsp, 0x38
cmp dword [0x1400bb290], 0
jne 0x140003c5f
lea rcx, [0x140003a90]
mov qword [rsp + 0x30], rbx
call fcn.140066f0c
lea rcx, [0x14007d578]
call fcn.140002f10
xor ebx, ebx
mov dword [0x1400bb290], eax
xor r9d, r9d
mov qword [rsp + 0x20], rbx
lea r8, [0x14007d638]
mov ecx, eax
lea rdx, str.General_Utility_Library
call fcn.1400031d0
mov dword [rsp + 0x40], ebx
mov byte [rsp + 0x40], 1
mov eax, dword [rsp + 0x40]
cmp eax, 1
je 0x140003b61
lea rcx, str.This_machine_is_defined_to_be_a_Little_endian_machine_but_doesnt_appear_to_be__n
call fcn.140002a30
lea rcx, [0x14007d6b8]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r10, rax
test rax, rax
je 0x140003c42
mov r9, rbx
lea r11, [0x140000000]
nop dword [rax]
nop dword [rax + rax]
mov r8, qword [r9 + r11 + 0x7d520]
mov rcx, r10
sub r8, r10
nop
movzx edx, byte [rcx]
movzx eax, byte [rcx + r8]
sub edx, eax
jne 0x140003bb3
inc rcx
test eax, eax
jne 0x140003ba0
test edx, edx
je 0x140003bf3
mov r8, qword [r9 + r11 + 0x7d580]
mov rax, r10
sub r8, r10
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140003be3
inc rax
test ecx, ecx
jne 0x140003bd0
test edx, edx
je 0x140003bf3
inc ebx
add r9, 8
cmp r9, 0x58
jl 0x140003b90
cmp ebx, 0xb
jne 0x140003c0c
mov r8, r10
lea rdx, str.Unknown_units___s__set_by_PVIEW_UNIT_n
lea ecx, [rbx - 0xa]
call fcn.1400038e0
jmp 0x140003c42
movsxd rax, ebx
movss xmm0, dword [r11 + rax*4 + 0x7d5d8]
movss dword [0x14007d510], xmm0
movss xmm0, dword [r11 + rax*4 + 0x7d608]
mov rax, qword [r11 + rax*8 + 0x7d580]
mov qword [0x14007d518], rax
movss dword [0x14007d514], xmm0
call fcn.140003c70
call fcn.140004610
mov rbx, qword [rsp + 0x30]
add rsp, 0x38
jmp 0x140001a20
add rsp, 0x38
ret