Function at 0x140005200
Capabilities:
Get geographical location
Get keyboard layout

Disassembly:
mov qword [rsp + 0x20], rbp
push rsi
sub rsp, 0x70
mov rax, qword [0x140073040]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rsi, qword [0x140073b48]
mov rbp, rcx
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x14000549e
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x14000549e
mov qword [rsp + 0x80], rbx
mov ecx, 0x50
mov qword [rsp + 0x88], rdi
mov qword [rsp + 0x90], r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8, qword [0x140073b48]
xor ebx, ebx
mov rdi, rax
test r8, r8
je 0x1400052dc
movsx rdx, word [r8 + 0x5678]
lea rax, [r8 + 0x567c]
mov r9d, dword [r8 + 0x4128]
lea rax, [rax + rdx*8]
cmp dword [rax], r9d
je 0x1400052d1
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [r8 + 0x5678], cx
movsx rax, cx
lea rax, [rax*8 + 0x567c]
add rax, r8
mov dword [rax], r9d
mov dword [rax + 4], ebx
inc word [rax + 4]
inc dword [r8 + 0x5670]
test rdi, rdi
je 0x1400052f9
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
movups xmmword [rdi + 0x10], xmm0
movups xmmword [rdi + 0x20], xmm0
movups xmmword [rdi + 0x30], xmm0
movups xmmword [rdi + 0x40], xmm0
jmp 0x1400052fc
mov rdi, rbx
or dword [rsi + 0xc], 0xc06
lea rax, [0x140060198]
mov qword [rsi + 0x90], rax
mov qword [rsi + 0xa0], rdi
mov qword [rdi], rbp
mov rax, qword [rsp + 0x58]
mov qword [rdi + 0x20], rax
mov rax, qword [rsp + 0x60]
mov qword [rdi + 0x18], rax
mov dword [rdi + 0x28], 9
test r8, r8
je 0x140005342
mov rbp, qword [r8 + 0xa0]
jmp 0x140005345
mov rbp, rbx
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
shr rax, 0x10
mov r9d, 4
movzx ecx, ax
lea r8, [rbp + 0x2c]
mov edx, 0x20001004
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x140005370
mov dword [rbp + 0x2c], ebx
mov rax, qword [0x140073b48]
test rax, rax
je 0x140005385
mov rbp, qword [rax + 0xa0]
jmp 0x140005388
mov rbp, rbx
lea r14, [rax + 0x3a20]
mov ecx, dword [r14 + 4]
test ecx, ecx
jns 0x1400053af
mov eax, ecx
cdq
sub eax, edx
mov edx, ebx
sar eax, 1
add eax, ecx
mov rcx, r14
test eax, eax
cmovg edx, eax
call fcn.140008950
xor r9d, r9d
mov dword [r14], ebx
lea r8, [0x140005f50]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_EnumDisplayMonitors]
mov rax, qword [0x140073b48]
mov r14, qword [rsp + 0x90]
mov byte [rbp + 0x30], bl
mov rcx, qword [rax + 0x4d40]
mov rax, qword [rdi]
mov rdx, qword [rcx]
mov qword [rdx + 0x50], rax
mov qword [rdx + 0x48], rax
test dword [rsi + 8], 0x400
je 0x1400053fb
call fcn.1400085a0
lea rax, str.xinput1_4.dll
mov byte [rdi + 0x32], 1
mov qword [rsp + 0x30], rax
lea rax, str.xinput1_3.dll
mov qword [rsp + 0x38], rax
lea rax, str.xinput9_1_0.dll
mov qword [rsp + 0x40], rax
lea rax, str.xinput1_2.dll
mov qword [rsp + 0x48], rax
lea rax, str.xinput1_1.dll
mov qword [rsp + 0x50], rax
nop dword [rax + rax]
mov rcx, qword [rsp + rbx*8 + 0x30]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
jne 0x14000545e
inc rbx
cmp rbx, 5
jl 0x140005440
jmp 0x14000548a
lea rdx, str.XInputGetCapabilities
mov qword [rdi + 0x38], rsi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.XInputGetState
mov rcx, rsi
mov qword [rdi + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rdi + 0x48], rax
mov rdi, qword [rsp + 0x88]
mov al, 1
mov rbx, qword [rsp + 0x80]
jmp 0x1400054a0
xor al, al
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14005bfe0
mov rbp, qword [rsp + 0x98]
add rsp, 0x70
pop rsi
ret