Function at 0x140004510
Capabilities:
Get keyboard layout
Link many functions at runtime

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
lea rbp, [rsp - 0x18]
sub rsp, 0x118
mov rax, qword [0x14013b4f8]
xor rax, rsp
mov qword [rbp], rax
mov dword [rsp + 0x60], r9d
mov r14, r8
mov rbx, rdx
mov r12, rcx
call fcn.1400a41d0
mov qword [0x14013ed20], r12
mov qword [0x14013c8a0], rbx
call fcn.14006c800
call fcn.14001f7a0
call fcn.1400235f0
call fcn.14000dac0
call fcn.1400a20c0
cmp dword [0x14013ed98], 4
jb 0x140004581
jne 0x140004594
cmp dword [0x14013ed90], 2
je 0x140004594
lea rcx, str.MSWHEEL_ROLLMSG
call qword [sym.imp.USER32.dll_RegisterWindowMessageA]
mov dword [0x1400ef028], eax
call fcn.14000bcc0
lea rcx, str.user32.dll
call fcn.1400a4240
lea rcx, str.winmm.dll
mov rbx, rax
call fcn.1400a4240
lea rcx, str.shcore.dll
mov rdi, rax
call fcn.1400a4240
mov rsi, rax
test rbx, rbx
je 0x1400045f4
lea rdx, str.FlashWindowEx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ToUnicodeEx
mov rcx, rbx
mov qword [0x14013c8f8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x140004601
mov qword [0x14013c8f8], 0
xor eax, eax
mov qword [0x14013c900], rax
test rdi, rdi
je 0x14000461f
lea rdx, str.PlaySoundA
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x140004621
xor eax, eax
mov qword [0x14013c798], rax
test rbx, rbx
je 0x14000466d
lea rdx, str.GetMonitorInfoA
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MonitorFromPoint
mov rcx, rbx
mov qword [0x14013c828], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MonitorFromWindow
mov rcx, rbx
mov qword [0x14013c830], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x140004685
mov qword [0x14013c828], 0
xor eax, eax
mov qword [0x14013c830], 0
mov qword [0x14013c838], rax
test rsi, rsi
je 0x1400046a3
lea rdx, str.GetDpiForMonitor
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x1400046a5
xor eax, eax
mov qword [0x14013c840], rax
test rbx, rbx
je 0x1400046da
lea rdx, str.GetSystemMetricsForDpi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.AdjustWindowRectExForDpi
mov rcx, rbx
mov qword [0x14013c848], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x1400046e7
mov qword [0x14013c848], 0
xor eax, eax
mov qword [0x14013c850], rax
call fcn.1400a8b00
xor ecx, ecx
mov qword [0x14013c0a0], rax
call qword [sym.imp.ole32.dll_CoInitialize]
cmp eax, 1
jbe 0x14000475e
mov rdx, qword [str.l:_v_]
lea rcx, str._s_Fatal_Error
call fcn.1400a6690
mov r9d, 0x30
lea rdx, str.Failed_to_initialize_COM_subsystem
mov r8, rax
xor ecx, ecx
mov rbx, rax
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, rbx
call fcn.1400a62e0
mov eax, 1
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.1400b0530
add rsp, 0x118
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rcx, qword [0x14013c0a0]
mov rdx, r14
mov qword [rsp + 0x158], r13
mov qword [rsp + 0x110], r15
call fcn.14000b710
xor edx, edx
lea rcx, [0x14013b570]
mov r8d, 0xb0c
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [0x14013c0a0]
mov edx, 0x6f
call fcn.1400a8480
mov rcx, qword [0x14013c0a0]
mov edx, 0xa6
mov dword [0x14013c07c], eax
call fcn.1400a8480
mov rcx, qword [0x14013c0a0]
mov edx, 0x7e
mov dword [0x14013c0b0], eax
mov dword [0x14013b548], 0xa
mov dword [0x14013b54c], 0x14
mov dword [0x14013b540], 0x19
mov dword [0x14013b544], 0x1c
call fcn.1400a8480
mov rcx, qword [0x14013c0a0]
mov ebx, eax
imul ebx, dword [0x14013b548]
mov edx, 0x7f
add ebx, dword [0x14013b540]
call fcn.1400a8480
mov edi, eax
imul edi, dword [0x14013b54c]
add edi, dword [0x14013b544]
cmp qword [0x14013c828], 0
je 0x140004869
mov rax, qword [0x14013c838]
test rax, rax
je 0x140004869
mov rcx, qword [0x1400ef010]
mov edx, 2
call rax
lea rdx, [rbp - 0x50]
mov dword [rbp - 0x50], 0x28
mov rcx, rax
call qword [0x14013c828]
movups xmm0, xmmword [rbp - 0x4c]
movups xmmword [rbp - 0x68], xmm0
jmp 0x14000487c
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
lea rdx, [rbp - 0x68]
call qword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [rbp - 0x60]
mov r15d, 0xef0000
sub eax, dword [rbp - 0x68]
mov ecx, dword [0x1400b3ac8]
cmp ebx, eax
cmovg ebx, eax
mov eax, dword [rbp - 0x5c]
sub eax, dword [rbp - 0x64]
cmp edi, eax
cmovg edi, eax
call fcn.140061e90
xor r14b, r14b
mov esi, 1
test rax, rax
je 0x1400048bf
test byte [rax + 0xa8], sil
movzx r14d, r14b
cmovne r14d, esi
mov r8, qword [str.l:_v_]
xor edx, edx
xor ecx, ecx
call fcn.1400a6e10
mov r8, qword [str.l:_v_]
xor edx, edx
xor ecx, ecx
mov r13, rax
call fcn.1400a6e10
mov r8, qword [str.l:_v_]
xor edx, edx
xor ecx, ecx
mov qword [0x14013c738], rax
call fcn.1400a6e10
mov rcx, qword [0x14013c0a0]
mov edx, 0x78
mov qword [0x14013c740], rax
call fcn.1400a8210
test al, al
mov ecx, 0xcf0000
mov edx, 0x7a
cmove r15d, ecx
mov rcx, qword [0x14013c0a0]
call fcn.1400a8480
cmp eax, esi
je 0x140004936
test r14b, r14b
je 0x14000493d
and r15d, 0xfffaffff
mov rcx, qword [0x14013c0a0]
mov edx, 0x61
call fcn.1400a8210
xor r14d, r14d
mov ecx, 8
test al, al
mov edx, 0x8a
cmovne r14d, ecx
mov rcx, qword [0x14013c0a0]
call fcn.1400a8210
test al, al
je 0x140004976
bts r14d, 9
mov rax, qword [sym.imp.USER32.dll_PeekMessageW]
mov qword [0x14013c888], rax
mov rax, qword [sym.imp.USER32.dll_DispatchMessageW]
mov qword [0x14013c890], rax
mov rax, qword [sym.imp.USER32.dll_DefWindowProcW]
mov qword [0x14013c898], rax
mov rax, qword [0x14013c8a8]
mov byte [0x14013c7aa], sil
test rax, rax
jne 0x1400049ca
mov r8, qword [str.l:_v_]
xor edx, edx
xor ecx, ecx
call fcn.1400a6e10
mov qword [0x14013c8a8], rax
cmp qword [0x14013c8a0], 0
jne 0x140004a37
xor ecx, ecx
lea rax, [0x140005120]
mov dword [rbp - 0x50], ecx
mov edx, 0xc8
mov qword [rbp - 0x40], rcx
mov rcx, qword [0x14013ed20]
mov qword [rbp - 0x38], rcx
mov qword [rbp - 0x48], rax
call qword [sym.imp.USER32.dll_LoadIconA]
mov edx, 0x7f01
xor ecx, ecx
mov qword [rbp - 0x30], rax
call qword [sym.imp.USER32.dll_LoadCursorA]
mov qword [rbp - 0x28], rax
xorps xmm0, xmm0
mov rax, qword [0x14013c8a8]
lea rcx, [rbp - 0x50]
mov qword [rbp - 0x10], rax
movdqa xmmword [rbp - 0x20], xmm0
call qword [sym.imp.USER32.dll_RegisterClassW]
mov rax, qword [0x14013c8a8]
mov qword [rsp + 0x58], 0
mov r9d, r15d
mov qword [rsp + 0x50], r12
mov r8, r13
xor r12d, r12d
mov rdx, rax
mov qword [rsp + 0x48], r12
mov ecx, r14d
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 0x80000000
mov dword [rsp + 0x20], 0x80000000
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov qword [0x1400ef010], rax
test rax, rax
je 0x1400050f7
xorps xmm0, xmm0
xor eax, eax
movups xmmword [0x14013c858], xmm0
mov qword [0x14013c868], rax
call fcn.140009930
mov rcx, r13
call fcn.1400a62e0
xor edx, edx
xor ecx, ecx
call fcn.140009a20
call fcn.14000a0e0
mov rcx, qword [0x14013c0a0]
lea rax, [0x1400b2c90]
lea r8, [0x14013c748]
mov qword [0x14013c748], rax
lea rdx, [0x14013b570]
call fcn.140016710
mov rdx, qword [0x14013c0a0]
mov rcx, rax
mov qword [0x14013c0a8], rax
call fcn.14000acc0
mov rdx, qword [0x14013c0a0]
lea rcx, [0x1400ef020]
call fcn.140023b90
mov rcx, qword [0x14013c0a8]
mov rdx, rax
mov qword [0x14013c7c8], rax
call fcn.14001bd80
mov rcx, qword [0x14013c0a0]
lea edx, [r12 + 0x6b]
call fcn.1400a8480
mov rcx, qword [0x14013c0a0]
lea edx, [r12 + 0x7e]
mov edi, eax
call fcn.1400a8480
mov rcx, qword [0x14013c0a0]
lea edx, [r12 + 0x7f]
mov ebx, eax
call fcn.1400a8480
mov rcx, qword [0x14013c0a8]
mov edx, eax
mov r9d, edi
mov r8d, ebx
call fcn.14001c7b0
mov rcx, qword [0x1400ef010]
lea rdx, [rbp - 0x50]
call qword [sym.imp.USER32.dll_GetWindowRect]
mov rcx, qword [0x1400ef010]
lea rdx, [rbp - 0x68]
call qword [sym.imp.USER32.dll_GetClientRect]
mov rcx, qword [0x14013c0a0]
mov edx, 0x8b
call fcn.1400a8480
mov ecx, dword [rbp - 0x44]
xor r9d, r9d
mov dword [rsp + 0x30], 0xe
mov dword [0x14013b558], eax
lea edx, [rax + rax]
mov dword [0x14013b554], eax
mov rax, qword [0x14013c0a8]
mov r8d, edx
sub edx, dword [rbp - 0x5c]
sub edx, dword [rbp - 0x4c]
add edx, dword [rbp - 0x64]
sub r8d, dword [rbp - 0x60]
add ecx, edx
sub r8d, dword [rbp - 0x50]
add r8d, dword [rbp - 0x68]
add r8d, dword [rbp - 0x48]
mov edx, dword [0x14013b54c]
imul edx, dword [rax + 0x174]
mov dword [0x14013b544], ecx
mov dword [0x14013b540], r8d
add edx, ecx
mov ecx, dword [0x14013b548]
imul ecx, dword [rax + 0x178]
mov dword [rsp + 0x28], edx
add ecx, r8d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], ecx
mov rcx, qword [0x1400ef010]
call qword [sym.imp.USER32.dll_SetWindowPos]
mov eax, dword [0x14013b548]
xor r8d, r8d
add eax, 0xf
cdq
and edx, 0xf
add eax, edx
mov rdx, rsi
sar eax, 4
imul eax, dword [0x14013b54c]
add eax, eax
movsxd rbx, eax
mov rcx, rbx
call fcn.1400a64d0
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rdi, rax
call sub.VCRUNTIME140.dll_memset
mov edx, dword [0x14013b54c]
mov r9d, esi
mov ecx, dword [0x14013b548]
mov r8d, esi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.GDI32.dll_CreateBitmap]
mov rcx, rdi
mov qword [0x14013c870], rax
call fcn.1400a62e0
mov r9d, dword [0x14013b54c]
mov r8d, dword [0x14013b548]
mov rdx, qword [0x14013c870]
mov rcx, qword [0x1400ef010]
call qword [sym.imp.USER32.dll_CreateCaret]
mov rax, qword [0x14013c0a8]
lea r8, [rbp - 0x50]
xor r9d, r9d
mov dword [rbp - 0x50], 0x1c
mov edx, esi
mov qword [rbp - 0x4c], 0x1f
mov dword [rbp - 0x3c], r12d
mov ecx, dword [rax + 0x174]
mov dword [rbp - 0x40], ecx
lea eax, [rcx - 1]
mov rcx, qword [0x1400ef010]
mov dword [rbp - 0x44], eax
call qword [sym.imp.USER32.dll_SetScrollInfo]
mov dword [0x14013c878], r12d
mov dword [0x14013c87c], r12d
call qword [sym.imp.USER32.dll_GetDoubleClickTime]
mov rcx, qword [0x1400ef010]
xor edx, edx
mov dword [0x14013c7bc], eax
call qword [sym.imp.USER32.dll_GetSystemMenu]
mov qword [0x14013c090], rax
call qword [sym.imp.USER32.dll_CreatePopupMenu]
lea r9, [0x1400b32d8]
xor edx, edx
mov rcx, rax
mov qword [0x14013c098], rax
mov r8d, 0x190
call qword [sym.imp.USER32.dll_AppendMenuA]
mov rcx, qword [0x14013c098]
lea r9, str.Paste
xor edx, edx
mov r8d, 0x1a0
call qword [sym.imp.USER32.dll_AppendMenuA]
call qword [sym.imp.USER32.dll_CreateMenu]
movzx edx, sil
lea rcx, [0x14013c7d0]
mov qword [0x14013c7c0], rax
call fcn.140061f80
call fcn.14000b380
mov r14d, r12d
lea r15, [0x14013c090]
nop dword [rax]
mov rdi, qword [r15]
xor r9d, r9d
mov rcx, rdi
xor r8d, r8d
mov edx, 0x800
call qword [sym.imp.USER32.dll_AppendMenuA]
xor edx, edx
lea r9, str.Event_Log
mov rcx, rdi
lea r8d, [rdx + 0x10]
call qword [sym.imp.USER32.dll_AppendMenuA]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x800
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
xor edx, edx
lea r9, str.New_Session...
mov rcx, rdi
lea r8d, [rdx + 0x20]
call qword [sym.imp.USER32.dll_AppendMenuA]
xor edx, edx
lea r9, str.Duplicate_Session
mov rcx, rdi
lea r8d, [rdx + 0x30]
call qword [sym.imp.USER32.dll_AppendMenuA]
mov r8, qword [0x14013c7c0]
lea r9, [0x1400b3320]
mov edx, 0x10
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
xor edx, edx
lea r9, str.Change_Settings...
mov rcx, rdi
lea r8d, [rdx + 0x50]
call qword [sym.imp.USER32.dll_AppendMenuA]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x800
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
lea r9, str.Copy_All_to_Clipboard
xor edx, edx
mov r8d, 0x170
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
xor edx, edx
lea r9, str.Clear_Scrollback
mov rcx, rdi
lea r8d, [rdx + 0x60]
call qword [sym.imp.USER32.dll_AppendMenuA]
xor edx, edx
lea r9, str.Reset_Terminal
mov rcx, rdi
lea r8d, [rdx + 0x70]
call qword [sym.imp.USER32.dll_AppendMenuA]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x800
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
mov rcx, qword [0x14013c0a0]
mov edx, 0x7a
call fcn.1400a8480
cmp eax, esi
lea r9, str.Full_Screen
mov edx, r12d
mov r8d, 0x180
sete dl
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x800
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
call fcn.14000bca0
test al, al
je 0x140004eff
lea r9, [0x1400b3398]
xor edx, edx
mov r8d, 0x140
mov rcx, rdi
call qword [sym.imp.USER32.dll_AppendMenuA]
mov rdx, qword [str.l:_v_]
lea rcx, [0x1400b33a0]
call fcn.1400a6690
mov r9, rax
xor edx, edx
mov r8d, 0x150
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.USER32.dll_AppendMenuA]
mov rcx, rbx
call fcn.1400a62e0
inc r14d
add r15, 8
cmp r14d, 2
jb 0x140004d90
call fcn.1400a4e40
test al, al
je 0x140004f5e
lea rdx, str.Running_with_restricted_process_ACL
lea rcx, [0x1400ef020]
call fcn.14000a1f0
mov rcx, qword [0x1400ef010]
call fcn.140031810
call fcn.14000aea0
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov rcx, rax
call fcn.14000ac70
mov edx, dword [rsp + 0x60]
mov rcx, qword [0x1400ef010]
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, qword [0x1400ef010]
call qword [sym.imp.USER32.dll_SetForegroundWindow]
call qword [sym.imp.USER32.dll_GetForegroundWindow]
cmp rax, qword [0x1400ef010]
mov rcx, qword [0x14013c0a8]
sete dl
call fcn.14001c6c0
mov rcx, qword [0x1400ef010]
call qword [sym.imp.USER32.dll_UpdateWindow]
mov r8, qword [0x14013b568]
lea rdx, str.P__v_
mov rcx, qword [0x1400ef010]
call fcn.14000bc00
call fcn.1400320a0
test al, al
jne 0x140005028
xor r9d, r9d
mov dword [rsp + 0x20], r12d
xor r8d, r8d
lea rcx, [rsp + 0x68]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x140005028
mov edi, 0xffffffff
call qword [sym.imp.USER32.dll_GetForegroundWindow]
cmp rax, qword [0x1400ef010]
mov rcx, qword [0x14013c0a8]
sete dl
call fcn.14001c6c0
jmp 0x14000502b
mov edi, r12d
call fcn.1400319d0
mov r9d, edi
mov dword [rsp + 0x20], 0x1cff
xor r8d, r8d
mov rdx, rax
mov rbx, rax
mov ecx, dword [rax + 0x200]
call qword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, dword [rbx + 0x200]
jae 0x140005062
mov edx, eax
mov rcx, rbx
call fcn.140031ab0
mov rcx, rbx
call fcn.140031b20
xor r9d, r9d
mov dword [rsp + 0x20], esi
xor r8d, r8d
lea rcx, [rsp + 0x68]
xor edx, edx
call qword [0x14013c888]
test eax, eax
je 0x1400050e3
cmp dword [rsp + 0x70], 0x12
je 0x1400050ed
call fcn.14000dcf0
mov rcx, rax
mov rbx, rax
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x1400050b3
lea rdx, [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
jne 0x1400050be
lea rcx, [rsp + 0x68]
call qword [0x14013c890]
cmp dword [rsp + 0x70], 0x8005
jne 0x1400050e3
xor r9d, r9d
mov dword [rsp + 0x20], esi
xor r8d, r8d
lea rcx, [rsp + 0x68]
xor edx, edx
call qword [0x14013c888]
test eax, eax
jne 0x140005085
call fcn.140032030
jmp 0x140004fe0
mov ecx, dword [rsp + 0x78]
call fcn.140007ad0
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1400a42b0
mov rdx, rax
lea rcx, str.Unable_to_create_terminal_window:__s
call fcn.14000a3b0
int3