Function at 0x140059510
Capabilities:
Identify system language via api

Disassembly:
push rbx
push rdi
push r12
sub rsp, 0x160
mov rax, qword [0x140193440]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov qword [rsp + 0x198], r15
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx ecx, ax
call fcn.14004ea10
mov qword [rsp + 0x28], rax
lea r9, str._s_s_shell32.dll.mui
lea rax, [0x1401e8560]
mov edx, 0x104
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x40]
call fcn.140004fd0
lea rcx, [rsp + 0x40]
mov byte [rsp + 0x143], 0
call fcn.140051290
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test rbx, rbx
je 0x1400595a8
mov rcx, rbx
call fcn.1400e8c70
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
lea r12, [0x1401e4030]
mov edi, 0x80
test r15, r15
je 0x140059786
mov qword [rsp + 0x180], rbp
mov edx, 2
mov qword [rsp + 0x188], rsi
mov ecx, edi
mov qword [rsp + 0x190], r14
call fcn.1400c4f6c
mov r9d, edi
mov r8, rax
mov edx, 0x101d
mov rcx, r15
mov rsi, rax
call qword [sym.imp.USER32.dll_LoadStringW]
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test ebp, ebp
jle 0x140059649
mov qword [rsp + 0x38], rbx
mov r9d, 0xffffffff
mov qword [rsp + 0x30], rbx
mov r8, rsi
mov dword [rsp + 0x28], edi
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test eax, eax
jne 0x140059649
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test rsi, rsi
je 0x140059656
mov rcx, rsi
call fcn.1400e8c70
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebp, ebp
jg 0x14005969e
movups xmm0, xmmword [str.Microsoft_Windows]
movzx eax, word [0x14016ff70]
mov word [0x1401e4040], ax
movaps xmmword [0x1401e4030], xmm0
mov byte [0x1401e4041], bl
call fcn.14004fba0
mov r8, rax
lea rdx, [rsp + 0x40]
lea rcx, str.Warning:_Could_not_locate_localized_format_prompt_title_string_in__s:__s
call fcn.14004f2f0
mov edx, 2
mov rcx, rdi
call fcn.1400c4f6c
mov r9d, edi
mov r8, rax
mov edx, 0x101e
mov rcx, r15
mov rsi, rax
call qword [sym.imp.USER32.dll_LoadStringW]
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test ebp, ebp
jle 0x140059710
mov qword [rsp + 0x38], rbx
lea rax, [0x1401e3f60]
mov qword [rsp + 0x30], rbx
mov r9d, 0xffffffff
mov dword [rsp + 0x28], edi
mov r8, rsi
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test eax, eax
jne 0x140059710
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test rsi, rsi
je 0x14005971d
mov rcx, rsi
call fcn.1400e8c70
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r14, qword [rsp + 0x190]
test ebp, ebp
mov rbp, qword [rsp + 0x180]
mov rsi, qword [rsp + 0x188]
jg 0x14005977d
movsd xmm0, qword [str.Format_disk]
mov eax, dword [0x14016ffd8]
mov dword [0x1401e3f68], eax
movsd qword [0x1401e3f60], xmm0
mov byte [0x1401e3f6b], bl
call fcn.14004fba0
mov r8, rax
lea rdx, [rsp + 0x40]
lea rcx, str.Warning:_Could_not_locate_localized_format_prompt_button_string_in__s:__s
call fcn.14004f2f0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, 0xc4d
call fcn.140021050
mov r15, qword [rsp + 0x198]
test rax, rax
je 0x1400597b9
mov ecx, 0xc4d
call fcn.140021050
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400597b0
mov ecx, 0xc4d
inc rbx
call fcn.140021050
cmp rbx, rdi
lea rcx, [0x1401e40b0]
mov rdx, rax
cmovb rdi, rbx
mov r8, rdi
call fcn.140135ea0
mov byte [rdi + r12 + 0x7f], 0
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.1400b2a30
add rsp, 0x160
pop r12
pop rdi
pop rbx
ret