Function at 0x140039090
Capabilities:
Identify system language via api

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd0
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rsp + 0x118], rbx
mov r12d, edx
mov rsi, rcx
mov rax, qword [rcx + 0x178]
mov rdi, qword [rax + 0x178]
xor ebx, ebx
lea r13, [0x1400fb278]
test rdi, rdi
je 0x140039171
mov rax, qword [rdi]
cmp dword [rax + 0x174], 3
jl 0x140039171
call fcn.14009d5e8
mov r11, rax
mov ecx, ebx
test rax, rax
setne cl
test ecx, ecx
jne 0x14003910c
mov ecx, 0x80004005
call fcn.1400034f0
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x20], r13
lea r9, str.ShowLanguageDlg
lea r8, [0x1400ff6f8]
lea rdx, str.__public___s::_s__s_
lea rcx, [rsp + 0x38]
call fcn.14000a800
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.14002f200
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140039171
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r15d, ebx
mov rax, qword [rsi + 0x180]
mov rcx, qword [rax + 0x70]
test rcx, rcx
je 0x1400391ac
cmp dword [rax + 0x20], 0x80000000
je 0x1400391ac
mov rbp, qword [rax + 0x20]
test rbp, rbp
js 0x1400391a6
cmp rbp, qword [rcx + 0x10]
jge 0x1400391a6
mov rax, qword [rcx + 8]
mov rbp, qword [rax + rbp*8]
jmp 0x1400391af
call fcn.1400a0610
int3
mov rbp, rbx
test rbp, rbp
je 0x1400398b0
mov qword [rsp + 0x128], rbx
lea rcx, [rsp + 0x40]
call fcn.1400aa430
nop
lea rax, method.CPtrArray.virtual_0
mov qword [rsp + 0x40], rax
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [rsp + 0x68], rax
mov rax, qword [rbp]
mov rdi, qword [rax + 0x178]
test rdi, rdi
je 0x140039291
mov rax, qword [rdi]
cmp dword [rax + 0x174], 4
jl 0x140039291
call fcn.14009d5e8
mov r11, rax
mov ecx, ebx
test rax, rax
setne cl
test ecx, ecx
jne 0x14003922c
mov ecx, 0x80004005
call fcn.1400034f0
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x20], r13
lea r9, str.GetLCIDsInfo
lea r8, str.CPrinter
lea rdx, str.private__s::_s__s_
lea rcx, [rsp + 0x30]
call fcn.14000a800
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.14002f200
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140039291
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rbp + 0x30]
cmp dword [rdx - 0x10], 0
cmove rdx, rbx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x128]
movzx r8d, word [rbp + 0x24]
mov rcx, qword [rbp + 0x18]
call fcn.14007c6b0
mov edi, eax
mov dword [rsp + 0x20], eax
lea r9, [0x1400fb428]
lea r8, str.GetLCIDsInfo
lea rdx, str.CPrinter
mov rcx, qword [rbp]
call fcn.140080e70
test edi, edi
je 0x140039814
mov rbp, qword [rsp + 0x128]
test rbp, rbp
je 0x14003981c
cmp qword [rsp + 0x50], 0
jle 0x14003981c
mov r9, qword [rsi + 0x180]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, rbp
lea rcx, [r9 + 0x180]
call fcn.140003940
mov rdx, qword [rsp + 0x50]
lea r8, [rdx*4]
mov rcx, qword [rsi + 0x188]
mov r14, rbx
test r8, r8
je 0x14003935c
mov edx, 8
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
mov rcx, qword [rsi + 0x188]
mov edx, 8
lea r8d, [rdx + 0x18]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r13, rax
mov dword [rsp + 0x80], 1
call fcn.1400a0754
test rax, rax
je 0x14003939b
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
jmp 0x14003939e
mov rax, rbx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2b3f
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov qword [rsp + 0x88], rax
mov rcx, qword [rsi + 0x180]
mov eax, dword [rcx]
bt rax, 0xe
jae 0x1400393d1
movzx eax, word [rcx + 0x40]
jmp 0x1400393d7
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
mov dword [rsp + 0x90], eax
mov qword [rsp + 0x98], rbp
mov dword [rsp + 0xa0], r12d
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0xa4], ecx
mov qword [rsp + 0xa8], r14
mov dword [rsp + 0xb0], 4
mov qword [rsp + 0xb8], r13
mov ebp, ebx
mov rdi, rbx
test rcx, rcx
jle 0x140039467
test rdi, rdi
js 0x14003943c
cmp rdi, rcx
jge 0x14003943c
test rdi, rdi
js 0x140039461
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + rdi*8]
jmp 0x14003943f
mov rcx, rbx
call fcn.14002b1a0
movzx ecx, ax
mov dword [r14 + rdi*4], ecx
add ebp, 1
add rdi, 1
movsxd rax, ebp
mov rcx, qword [rsp + 0x50]
cmp rcx, rax
jle 0x140039467
jmp 0x140039422
call fcn.1400a0610
int3
call fcn.14009d5e8
mov rdx, rax
mov ecx, ebx
test rax, rax
setne cl
test ecx, ecx
jne 0x140039486
mov ecx, 0x80004005
call fcn.1400034f0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x120], rax
mov rax, qword [rsi + 0x180]
mov rdx, qword [rax + 0x138]
cmp dword [rdx - 0x10], 0
cmove rdx, rbx
mov rcx, qword [rsi + 0x188]
call fcn.140013c20
mov qword [r13], rax
lea r8, [rsp + 0x120]
mov dx, 0x23c
mov rcx, qword [rsi + 0x190]
call fcn.14006bf80
test eax, eax
je 0x1400394f5
mov rdx, qword [rsp + 0x120]
mov rcx, qword [rsi + 0x188]
call fcn.140013c20
mov qword [r13 + 8], rax
lea r8, [rsp + 0x120]
mov dx, 0x23d
mov rcx, qword [rsi + 0x190]
call fcn.14006bf80
test eax, eax
je 0x140039529
mov rdx, qword [rsp + 0x120]
mov rcx, qword [rsi + 0x188]
call fcn.140013c20
mov qword [r13 + 0x10], rax
lea r8, [rsp + 0x120]
mov dx, 0x1f4
mov rcx, qword [rsi + 0x190]
call fcn.14006bf80
test eax, eax
je 0x14003955d
mov rdx, qword [rsp + 0x120]
mov rcx, qword [rsi + 0x188]
call fcn.140013c20
mov qword [r13 + 0x18], rax
lea r8, [rsp + 0x120]
mov dx, 0x23b
mov rcx, qword [rsi + 0x190]
call fcn.14006bf80
test eax, eax
je 0x140039785
mov rax, qword [rsi + 0x180]
mov rbp, qword [rax + 0x100]
cmp dword [rbp - 0x10], 0
cmove rbp, rbx
test rbp, rbp
je 0x140039785
mov ecx, 0x7fffffff
mov rax, rbp
cmp word [rax], 0
je 0x1400395b6
add rax, 2
sub rcx, 1
jne 0x1400395a4
jmp 0x1400395ca
test rcx, rcx
je 0x1400395ca
mov edx, 0x7fffffff
sub rdx, rcx
mov qword [rsp + 0x70], rdx
jmp 0x1400395d2
mov rdx, rbx
mov qword [rsp + 0x70], rbx
mov rax, qword [rsp + 0x120]
mov ecx, dword [rax - 0x10]
lea eax, [rdx + rcx + 0x104]
movsxd rdi, eax
lea r8, [rdi + rdi]
mov rcx, qword [rsi + 0x188]
mov r12, rbx
test r8, r8
je 0x14003960b
mov edx, 8
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r12, rax
test rdi, rdi
je 0x140039656
cmp rdi, 0x7fffffff
ja 0x140039656
mov rcx, r12
mov edx, 0x7ffffffe
sub rdx, rdi
sub rbp, r12
lea rax, [rdx + rdi]
test rax, rax
je 0x140039648
movzx eax, word [rcx + rbp]
test ax, ax
je 0x140039648
mov word [rcx], ax
add rcx, 2
sub rdi, 1
jne 0x140039627
jmp 0x14003964d
test rdi, rdi
jne 0x140039651
sub rcx, 2
mov word [rcx], 0
mov rdx, qword [rsp + 0x120]
mov rcx, r12
call fcn.14002ae40
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x140039785
lea rdx, str.DriverInstallExtensionW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbp, rax
test rax, rax
je 0x14003977c
mov rdx, qword [rsi + 0x180]
mov ecx, dword [rdx]
bt rcx, 0xe
jae 0x1400396ad
movzx eax, word [rdx + 0x40]
jmp 0x1400396b3
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
mov dword [rsp + 0x110], eax
lea r9, [rsp + 0x110]
lea r8, [rsp + 0x80]
mov edx, 1
mov rcx, rdi
call rbp
test eax, eax
jne 0x14003977c
mov rcx, qword [rsi + 0x180]
mov eax, dword [rcx]
bt rax, 0xe
jae 0x1400396f5
movzx eax, word [rcx + 0x40]
jmp 0x1400396fb
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov ecx, dword [rsp + 0x110]
cmp cx, ax
je 0x14003977c
movzx eax, cx
and ax, 0x3ff
cmp ax, 1
je 0x14003971a
cmp ax, 0x29
jne 0x140039730
mov ecx, 0x4a
call qword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x14003977c
mov ecx, dword [rsp + 0x110]
mov dword [rsp + 0x20], ecx
lea r9, [0x140100940]
lea r8, str.ShowLanguageDlg
lea rdx, [0x1400ff6f8]
mov rcx, qword [rsi + 0x178]
call fcn.140080a70
mov rdx, qword [rsi + 0x180]
movzx eax, word [rsp + 0x110]
mov word [rdx + 0x40], ax
mov rax, qword [rsi + 0x180]
or qword [rax], 0x4000
mov r15d, 1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rdi, rbx
nop
nop
mov r8, qword [r13 + rdi*8]
mov rcx, qword [rsi + 0x188]
test r8, r8
je 0x1400397ac
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
add rdi, 1
cmp rdi, 4
jl 0x140039790
mov rcx, qword [rsi + 0x188]
mov r8, r13
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsi + 0x188]
test r14, r14
je 0x1400397e6
mov r8, r14
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov rdx, qword [rsp + 0x120]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140039814
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbp, qword [rsp + 0x128]
jmp 0x14003981c
mov rbp, qword [rsp + 0x128]
mov rcx, qword [rsi + 0x188]
test rbp, rbp
je 0x140039837
mov r8, rbp
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
lea rax, method.CPtrArray.virtual_0
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x50], 0
jle 0x14003989a
nop
nop
test rbx, rbx
js 0x140039894
cmp rbx, qword [rsp + 0x50]
jge 0x140039894
mov rax, qword [rsp + 0x48]
mov r8, qword [rax + rbx*8]
test r8, r8
je 0x140039877
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_HeapFree]
add rbx, 1
cmp rbx, qword [rsp + 0x50]
jl 0x140039850
or r8, 0xffffffffffffffff
xor edx, edx
lea rcx, [rsp + 0x40]
call fcn.1400aa464
jmp 0x14003989a
call fcn.1400a0610
int3
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_HeapDestroy]
nop
lea rcx, [rsp + 0x40]
call fcn.1400aa450
mov dword [rsp + 0x20], r15d
lea r9, [0x1400fb428]
lea r8, str.ShowLanguageDlg
lea rdx, [0x1400ff6f8]
mov rcx, qword [rsi + 0x178]
call fcn.140080e70
mov eax, r15d
mov rbx, qword [rsp + 0x118]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret