Function at 0x140040480
Capabilities:
Get geographical location
Get keyboard layout
Log keystrokes via polling

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xa8
movaps xmmword [rsp + 0x90], xmm6
mov rax, qword [0x140056040]
xor rax, rsp
mov qword [rbp - 9], rax
mov rsi, qword [0x14007f9c8]
mov r15, r9
mov qword [rbp - 0x19], r8
mov r14d, edx
mov r12, rcx
test rsi, rsi
je case.0x140040d18.527
lea rbx, [rsi + 8]
mov rsi, qword [rsi + 0x90]
cmp edx, 0x200
ja 0x140040cee
je case.0x140040510.160
lea eax, [rdx - 7]
cmp eax, 0xfe
ja case.0x140040d18.527
lea rdx, [0x140000000]
movzx eax, byte [rdx + rax + 0x40f70]
mov ecx, dword [rdx + rax*4 + 0x40f54]
add rcx, rdx
jmp rcx
lea eax, [r14 - 0x100]
mov esi, pe_nt_image_headers64
test eax, 0xfffffffb
sete dil
cmp r8, rsi
jae case.0x140040d18.527
mov ecx, 0x11
call qword [sym.imp.USER32.dll_GetKeyState]
movss xmm6, dword [0x14004f700]
shr eax, 0xf
and al, 1
cmp byte [rbx + 0x37a9], 0
je 0x14004056e
test al, al
je 0x14004055a
movaps xmm3, xmm6
jmp 0x14004055d
xorps xmm3, xmm3
movzx r8d, al
mov edx, 0x1000
mov rcx, rbx
call fcn.1400165d0
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp byte [rbx + 0x37a9], 0
je 0x1400405a4
test al, al
je 0x140040590
movaps xmm3, xmm6
jmp 0x140040593
xorps xmm3, xmm3
movzx r8d, al
mov edx, 0x2000
mov rcx, rbx
call fcn.1400165d0
mov ecx, 0x12
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp byte [rbx + 0x37a9], 0
je 0x1400405da
test al, al
je 0x1400405c6
movaps xmm3, xmm6
jmp 0x1400405c9
xorps xmm3, xmm3
movzx r8d, al
mov edx, 0x4000
mov rcx, rbx
call fcn.1400165d0
mov ecx, 0x5d
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp byte [rbx + 0x37a9], 0
je 0x140040610
test al, al
je 0x1400405fc
movaps xmm3, xmm6
jmp 0x1400405ff
xorps xmm3, xmm3
movzx r8d, al
mov edx, 0x8000
mov rcx, rbx
call fcn.1400165d0
mov rbx, qword [rbp - 0x19]
cmp rbx, 0xd
jne 0x14004062a
shr r15, 0x10
mov eax, 0x10d
test si, r15w
cmovne ebx, eax
movsxd r15, ebx
mov rcx, r15
call fcn.14003ff30
movsxd rsi, eax
cmp esi, 0x256
jne 0x140040683
test dil, dil
jne 0x140040687
mov r14, qword [0x14007f9c8]
cmp byte [r14 + 0x37b1], dil
je 0x140040666
movaps xmm3, xmm6
lea rcx, [r14 + 8]
mov r8b, 1
mov edx, esi
call fcn.1400165d0
cmp ebx, 0x1ff
ja 0x140040687
mov dword [r14 + r15*4 + 0xf0], 0x256
mov dword [r14 + 0xa48], ebx
jmp 0x140040687
test eax, eax
je 0x1400406cc
mov r14, qword [0x14007f9c8]
cmp byte [r14 + 0x37b1], 0
je 0x1400406b4
test dil, dil
je 0x1400406a2
movaps xmm3, xmm6
jmp 0x1400406a5
xorps xmm3, xmm3
movzx r8d, dil
lea rcx, [r14 + 8]
mov edx, esi
call fcn.1400165d0
cmp ebx, 0x1ff
ja 0x1400406cc
mov dword [r14 + r15*4 + 0xf0], esi
mov dword [r14 + rsi*4 + 0xf0], ebx
cmp ebx, 0x10
jne 0x14004078c
mov ecx, 0xa0
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp al, dil
jne 0x14004072d
mov rbx, qword [0x14007f9c8]
cmp byte [rbx + 0x37b1], 0
je 0x140040719
test dil, dil
je 0x140040704
movaps xmm3, xmm6
jmp 0x140040707
xorps xmm3, xmm3
movzx r8d, dil
lea rcx, [rbx + 8]
mov edx, 0x210
call fcn.1400165d0
mov dword [rbx + 0x370], 0x210
mov dword [rbx + 0x930], 0xa0
mov ecx, 0xa1
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp al, dil
jne case.0x140040d18.527
mov rbx, qword [0x14007f9c8]
cmp byte [rbx + 0x37b1], 0
je 0x140040773
test dil, dil
jne 0x14004075e
xorps xmm6, xmm6
movaps xmm3, xmm6
lea rcx, [rbx + 8]
movzx r8d, dil
mov edx, 0x214
call fcn.1400165d0
mov dword [rbx + 0x374], 0x214
mov dword [rbx + 0x940], 0xa1
jmp case.0x140040d18.527
cmp ebx, 0x11
jne 0x14004084c
mov ecx, 0xa2
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp al, dil
jne 0x1400407ed
mov rbx, qword [0x14007f9c8]
cmp byte [rbx + 0x37b1], 0
je 0x1400407d9
test dil, dil
je 0x1400407c4
movaps xmm3, xmm6
jmp 0x1400407c7
xorps xmm3, xmm3
movzx r8d, dil
lea rcx, [rbx + 8]
mov edx, 0x20f
call fcn.1400165d0
mov dword [rbx + 0x378], 0x20f
mov dword [rbx + 0x92c], 0xa2
mov ecx, 0xa3
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp al, dil
jne case.0x140040d18.527
mov rbx, qword [0x14007f9c8]
cmp byte [rbx + 0x37b1], 0
je 0x140040833
test dil, dil
jne 0x14004081e
xorps xmm6, xmm6
movaps xmm3, xmm6
lea rcx, [rbx + 8]
movzx r8d, dil
mov edx, 0x213
call fcn.1400165d0
mov dword [rbx + 0x37c], 0x213
mov dword [rbx + 0x93c], 0xa3
jmp case.0x140040d18.527
cmp ebx, 0x12
jne case.0x140040d18.527
mov ecx, 0xa4
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp al, dil
jne 0x1400408ad
mov rbx, qword [0x14007f9c8]
cmp byte [rbx + 0x37b1], 0
je 0x140040899
test dil, dil
je 0x140040884
movaps xmm3, xmm6
jmp 0x140040887
xorps xmm3, xmm3
movzx r8d, dil
lea rcx, [rbx + 8]
mov edx, 0x211
call fcn.1400165d0
mov dword [rbx + 0x380], 0x211
mov dword [rbx + 0x934], 0xa4
mov ecx, 0xa5
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp al, dil
jne case.0x140040d18.527
mov rbx, qword [0x14007f9c8]
cmp byte [rbx + 0x37b1], 0
je 0x1400408f3
test dil, dil
jne 0x1400408de
xorps xmm6, xmm6
movaps xmm3, xmm6
lea rcx, [rbx + 8]
movzx r8d, dil
mov edx, 0x215
call fcn.1400165d0
mov dword [rbx + 0x384], 0x215
mov dword [rbx + 0x944], 0xa5
jmp case.0x140040d18.527
mov rdx, qword [rbx + 0xdf0]
cmp r14d, 7
sete r8b
lea rdi, [rdx + 0x3e58]
mov r9d, dword [rdi]
lea eax, [r9 - 1]
test eax, eax
js 0x14004094f
movsxd rcx, eax
imul rax, rcx, 0x1c
add rax, qword [rdx + 0x3e60]
nop dword [rax + rax]
cmp dword [rax], 6
je 0x1400409ba
sub rax, 0x1c
sub rcx, 1
jns 0x140040940
cmp byte [rdx + 0x37b0], 0
sete cl
cmp cl, r8b
je case.0x140040d18.527
cmp byte [rbx + 0x72], 0
je 0x140040972
cmp r14d, 7
jne case.0x140040d18.527
mov eax, dword [rdx + 0x3e7c]
xor ebx, ebx
xorps xmm0, xmm0
mov qword [rbp - 0x49], rbx
movups xmmword [rbp - 0x59], xmm0
mov dword [rbp - 0x51], eax
inc eax
mov dword [rdx + 0x3e7c], eax
mov byte [rbp - 0x4d], r8b
mov r8d, dword [rdi + 4]
mov dword [rbp - 0x59], 6
cmp r9d, r8d
jne 0x1400409d9
lea ecx, [r9 + 1]
test r8d, r8d
je 0x1400409c5
mov eax, r8d
cdq
sub eax, edx
sar eax, 1
add eax, r8d
jmp 0x1400409ca
test rax, rax
je 0x14004094f
movzx ecx, byte [rax + 0xc]
jmp 0x140040959
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
mov edx, ecx
mov rcx, rdi
call fcn.14002d300
movsxd rax, dword [rdi]
movups xmm0, xmmword [rbp - 0x59]
movsd xmm1, qword [rbp - 0x49]
imul rcx, rax, 0x1c
mov rax, qword [rdi + 8]
movups xmmword [rcx + rax], xmm0
movsd qword [rcx + rax + 0x10], xmm1
mov dword [rcx + rax + 0x18], ebx
inc dword [rdi]
jmp case.0x140040d18.527
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
shr rax, 0x10
mov r9d, 4
movzx ecx, ax
lea r8, [rsi + 0x2c]
mov edx, 0x20001004
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne case.0x140040d18.527
xor edi, edi
mov dword [rsi + 0x2c], edi
jmp case.0x140040d18.527
mov rcx, r12
call qword [sym.imp.USER32.dll_IsWindowUnicode]
test eax, eax
je 0x140040af2
mov rsi, qword [rbp - 0x19]
lea rax, [rsi - 1]
cmp rax, 0xfffe
ja case.0x140040d18.527
test si, si
jne 0x140040a6f
cmp word [rbx + 0x37ac], si
je case.0x140040d18.527
cmp byte [rbx + 0x37a9], 0
je case.0x140040d18.527
mov ecx, 0xfc00
movzx eax, si
and ax, cx
mov edx, 0xd800
movzx ecx, word [rbx + 0x37ac]
cmp ax, dx
jne 0x140040ab6
test cx, cx
je 0x140040aaa
mov edx, 0xfffd
mov rcx, rbx
call fcn.140016510
mov word [rbx + 0x37ac], si
jmp case.0x140040d18.527
test cx, cx
je 0x140040ae2
mov ecx, 0xdc00
cmp ax, cx
je 0x140040ad4
mov edx, 0xfffd
mov rcx, rbx
call fcn.140016510
jmp 0x140040ad9
mov esi, 0xfffd
xor edi, edi
mov word [rbx + 0x37ac], di
movzx edx, si
mov rcx, rbx
call fcn.140016510
jmp case.0x140040d18.527
mov eax, 1
lea rcx, [rbp - 0x21]
mov dword [rsp + 0x28], eax
lea r8, [rbp - 0x19]
mov qword [rsp + 0x20], rcx
xor edi, edi
mov ecx, dword [rsi + 0x2c]
mov r9d, eax
mov edx, eax
mov word [rbp - 0x21], di
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movzx r8d, word [rbp - 0x21]
mov rdx, qword [rbx + 0xdf0]
test r8d, r8d
je case.0x140040d18.527
cmp byte [rbx + 0x37a9], dil
je case.0x140040d18.527
mov eax, dword [rdx + 0x3e7c]
lea rbx, [rdx + 0x3e58]
mov ecx, 2
mov dword [rbp - 0x51], eax
inc eax
mov dword [rbp - 0x55], ecx
mov dword [rdx + 0x3e7c], eax
mov ecx, dword [rbx]
mov dword [rbp - 0x4d], r8d
mov r8d, dword [rbx + 4]
mov qword [rbp - 0x49], rdi
mov dword [rbp - 0x59], 5
cmp ecx, r8d
jne 0x140040ba0
inc ecx
test r8d, r8d
je 0x140040b8c
mov eax, r8d
cdq
sub eax, edx
sar eax, 1
add eax, r8d
jmp 0x140040b91
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
mov edx, ecx
mov rcx, rbx
call fcn.14002d300
movsxd rax, dword [rbx]
movups xmm0, xmmword [rbp - 0x59]
movsd xmm1, qword [rbp - 0x49]
imul rcx, rax, 0x1c
mov rax, qword [rbx + 8]
movups xmmword [rcx + rax], xmm0
movsd qword [rcx + rax + 0x10], xmm1
mov dword [rcx + rax + 0x18], edi
inc dword [rbx]
jmp case.0x140040d18.527
cmp r15w, 1
jne case.0x140040d18.527
call fcn.14003f420
test al, al
je case.0x140040d18.527
mov eax, 1
jmp 0x140040f2b
call qword [sym.imp.USER32.dll_GetMessageExtraInfo]
mov ecx, 0xffffff80
xor edi, edi
mov r9, rax
mov r8d, 0xff515700
and r9, rcx
mov ecx, 2
cmp r9, r8
jne 0x140040c13
mov dword [rbp - 0x21], ecx
jmp 0x140040c23
mov edx, edi
mov eax, 0xff515780
cmp r9, rax
sete dl
mov dword [rbp - 0x21], edx
mov edx, dword [rsi + 0x10]
cmp r14d, 0x200
mov r13d, edi
mov qword [rsi + 8], r12
setne r13b
inc r13d
cmp edx, r13d
je 0x140040c91
cmp r14d, 0x200
mov dword [rbp - 0x39], 0x18
mov eax, 0x12
mov dword [rbp - 0x35], 0x80000000
cmovne ecx, eax
mov qword [rbp - 0x31], r12
mov dword [rbp - 0x55], ecx
mov dword [rbp - 0x29], edi
mov dword [rbp - 0x59], 0x18
mov qword [rbp - 0x51], r12
mov dword [rbp - 0x49], edi
test edx, edx
je 0x140040c83
lea rcx, [rbp - 0x39]
call qword [sym.imp.USER32.dll_TrackMouseEvent]
lea rcx, [rbp - 0x59]
call qword [sym.imp.USER32.dll_TrackMouseEvent]
mov dword [rsi + 0x10], r13d
movsx eax, r15w
shr r15, 0x10
mov dword [rbp - 0x11], eax
movsx eax, r15w
mov dword [rbp - 0xd], eax
cmp r14d, 0xa0
jne 0x140040cc1
lea rdx, [rbp - 0x11]
mov rcx, r12
call qword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je case.0x140040d18.527
mov rax, qword [rbx + 0xdf0]
mov ecx, dword [rbp - 0x21]
mov dword [rax + 0x3e78], ecx
mov rcx, rbx
movd xmm2, dword [rbp - 0xd]
movd xmm1, dword [rbp - 0x11]
cvtdq2ps xmm2, xmm2
cvtdq2ps xmm1, xmm1
call fcn.140016770
jmp case.0x140040d18.527
lea eax, [rdx - 0x201]
cmp eax, 0xa2
ja case.0x140040d18.527
lea rdx, [0x140000000]
movzx eax, byte [rdx + rax + 0x4108c]
mov ecx, dword [rdx + rax*4 + 0x41070]
add rcx, rdx
jmp rcx
xor edi, edi
cmp r14d, 0x2a3
mov eax, edi
setne al
inc eax
cmp dword [rsi + 0x10], eax
jne case.0x140040d18.527
cmp qword [rsi + 8], r12
jne 0x140040d3d
mov qword [rsi + 8], rdi
movss xmm1, dword [0x14004f8d4]
mov rcx, rbx
movaps xmm2, xmm1
mov dword [rsi + 0x10], edi
call fcn.140016770
jmp case.0x140040d18.527
call qword [sym.imp.USER32.dll_GetMessageExtraInfo]
mov ecx, 0xffffff80
xor edi, edi
mov rdx, rax
mov r8d, 0xff515700
and rdx, rcx
mov ecx, 2
cmp rdx, r8
jne 0x140040d80
mov r13d, ecx
jmp 0x140040d8f
mov eax, 0xff515780
mov r13d, edi
cmp rdx, rax
sete r13b
lea eax, [r14 - 0x204]
mov r15d, edi
test eax, 0xfffffffd
mov eax, 1
cmove r15d, eax
lea eax, [r14 - 0x207]
test eax, 0xfffffffd
lea eax, [r14 - 0x20b]
cmove r15d, ecx
test eax, 0xfffffffd
jne 0x140040ddc
mov rax, qword [rbp - 0x19]
mov r15d, edi
shr rax, 0x10
cmp ax, 1
setne r15b
add r15d, 3
cmp dword [rsi + 0x14], edi
jne 0x140040df5
call qword [sym.imp.USER32.dll_GetCapture]
test rax, rax
jne 0x140040df5
mov rcx, r12
call qword [sym.imp.USER32.dll_SetCapture]
mov eax, dword [rsi + 0x14]
mov r8b, 1
bts eax, r15d
mov edx, r15d
mov dword [rsi + 0x14], eax
mov rcx, rbx
mov rax, qword [rbx + 0xdf0]
mov dword [rax + 0x3e78], r13d
call fcn.140016910
jmp case.0x140040d18.527
call qword [sym.imp.USER32.dll_GetMessageExtraInfo]
mov ecx, 0xffffff80
xor edi, edi
mov rdx, rax
mov r8d, 0xff515700
and rdx, rcx
mov ecx, 2
cmp rdx, r8
jne 0x140040e48
mov r13d, ecx
jmp 0x140040e57
mov eax, 0xff515780
mov r13d, edi
cmp rdx, rax
sete r13b
cmp r14d, 0x205
mov r15d, edi
sete r15b
cmp r14d, 0x208
jne 0x140040e73
mov r15d, ecx
jmp 0x140040e93
cmp r14d, 0x20c
jne 0x140040e93
mov rax, qword [rbp - 0x19]
mov r15d, edi
shr rax, 0x10
cmp ax, 1
setne r15b
add r15d, 3
mov eax, dword [rsi + 0x14]
btr eax, r15d
mov dword [rsi + 0x14], eax
test eax, eax
jne 0x140040eb2
call qword [sym.imp.USER32.dll_GetCapture]
cmp rax, r12
jne 0x140040eb2
call qword [sym.imp.USER32.dll_ReleaseCapture]
mov rax, qword [rbx + 0xdf0]
xor r8d, r8d
mov edx, r15d
mov rcx, rbx
mov dword [rax + 0x3e78], r13d
call fcn.140016910
jmp case.0x140040d18.527
shr r8, 0x10
xorps xmm1, xmm1
movsx eax, r8w
mov rcx, rbx
movd xmm2, eax
cvtdq2ps xmm2, xmm2
divss xmm2, dword [0x14004f84c]
call fcn.140016a40
jmp case.0x140040d18.527
shr r8, 0x10
xorps xmm2, xmm2
movsx eax, r8w
mov rcx, rbx
movd xmm1, eax
cvtdq2ps xmm1, xmm1
xorps xmm1, xmmword [0x14004fe70]
divss xmm1, dword [0x14004f84c]
call fcn.140016a40
jmp case.0x140040d18.527
cmp r8d, 7
jne case.0x140040d18.527
mov byte [rsi + 0x31], 1
xor eax, eax
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.140044810
movaps xmm6, xmmword [rsp + 0x90]
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret