Function at 0x140021230
Capabilities:
Access peb ldr_data
Encode data using xor
Get kernel32 base address
Hash data using fnv
Log keystrokes via polling
Resolve function by parsing pe exports

Disassembly:
mov r11, rsp
push rbp
lea rbp, [r11 - 0x18]
sub rsp, 0x110
mov rax, qword [0x140321090]
xor rax, rsp
mov qword [rbp + 8], rax
cmp byte [0x1403939f0], 0
jne 0x140021847
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
xor esi, esi
mov qword [r11 + 0x18], rdi
mov qword [r11 + 0x20], r14
movabs r14, 0x7fffffffffffffff
nop word [rax + rax]
mov eax, dword [reloc.WS2_32.dll_accept]
inc eax
movsxd rbx, eax
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rdi, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
mov r8, rax
cmp rdi, 0x989680
jne 0x1400212ac
imul rcx, r8, 0x64
jmp 0x1400212d2
cqo
idiv rdi
imul rax, rdx, 0x3b9aca00
cqo
idiv rdi
mov rcx, rax
mov rax, r8
cqo
idiv rdi
imul rdx, rax, 0x3b9aca00
add rcx, rdx
mov qword [rsp + 0x30], rcx
cmp rbx, 1
jl 0x1400212ff
imul rdx, rbx, 0xf4240
mov rax, r14
sub rax, rdx
cmp rcx, rax
jge 0x1400212fa
lea rax, [rdx + rcx]
mov qword [rsp + 0x30], rax
jmp 0x1400212ff
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x30]
call fcn.140004710
cmp byte [0x140393910], sil
je 0x14002181a
cmp qword [0x1403b2f90], rsi
je 0x14002181a
mov ecx, dword [0x140393914]
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x140021409
cmp byte [0x1403b23fd], sil
je 0x14002181a
mov dword [rbp - 0x70], esi
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x6c], xmm0
mov dword [rbp - 0x5c], 4
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
mov r10, qword [rax + 0x30]
movsxd rcx, dword [r10 + 0x3c]
mov edi, dword [rcx + r10 + 0x88]
add rdi, r10
cmp rdi, r10
je 0x1400213e7
mov r9d, dword [rdi + 0x18]
test r9d, r9d
je 0x1400213e7
mov ebx, dword [rdi + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0x9944835
lea rcx, [rbx + r9*4]
mov edx, dword [rcx + r10]
add rdx, r10
movzx ecx, byte [rdx]
inc rdx
test cl, cl
je 0x1400213e2
nop
movsx ecx, cl
lea rdx, [rdx + 1]
xor ecx, r8d
imul r8d, ecx, 0x1000193
movzx ecx, byte [rdx - 1]
test cl, cl
jne 0x1400213c0
cmp r8d, 0x178771cd
je 0x1400213ec
test r9d, r9d
jne 0x1400213a0
mov rax, qword [rax]
jmp 0x140021370
mov ecx, dword [rdi + 0x24]
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rdi + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
lea rdx, [rbp - 0x70]
jmp 0x140021804
mov rcx, qword [0x1403b22d8]
test rcx, rcx
je 0x140021440
cmp dword [0x1403b223c], esi
je 0x140021440
mov rdx, qword [0x1403b2d80]
lea r8, [rbp - 0x78]
mov r9d, 8
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov rcx, qword [0x1403b22d8]
mov rdi, qword [rbp - 0x78]
mov qword [rsp + 0x78], rdi
test rdi, rdi
je 0x14002172f
movaps xmm1, xmmword [0x1403b2fa0]
movups xmmword [rsp + 0x58], xmm1
test rcx, rcx
je 0x14002148d
cmp dword [0x1403b223c], esi
je 0x14002148d
lea rdx, [rdi + 0x90]
mov qword [rsp + 0x20], rsi
mov r9d, ntohl
lea r8, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov rdi, qword [rsp + 0x78]
movss xmm0, dword [rsp + 0x64]
subss xmm0, dword [rsp + 0x40]
movss xmm1, dword [rsp + 0x5c]
movss xmm2, dword [rsp + 0x60]
subss xmm2, dword [rsp + 0x3c]
subss xmm1, dword [rsp + 0x38]
mulss xmm0, xmm0
mulss xmm2, xmm2
mulss xmm1, xmm1
addss xmm2, xmm1
addss xmm2, xmm0
xorps xmm0, xmm0
ucomiss xmm0, xmm2
ja 0x1400214d6
xorps xmm0, xmm0
sqrtss xmm0, xmm2
jmp 0x1400214de
movaps xmm0, xmm2
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrtf
movd xmm1, dword [0x14039391c]
mov rcx, rdi
cvtdq2ps xmm1, xmm1
comiss xmm0, xmm1
setbe bl
call fcn.1400211a0
test al, al
je 0x140021508
cmp byte [0x140393918], sil
movzx ebx, bl
cmove ebx, esi
cmp byte [0x1403938f9], sil
mov rcx, qword [0x1403b22d8]
je 0x140021560
mov rdx, qword [rsp + 0x78]
test rdx, rdx
je 0x14002155e
test rcx, rcx
je 0x140021552
cmp dword [0x1403b223c], esi
je 0x140021552
add rdx, qword [0x1403951f8]
lea r8, [rbp - 0x80]
mov r9d, 1
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov rcx, qword [0x1403b22d8]
movzx eax, byte [rbp - 0x80]
test al, 0xdb
jne 0x140021560
cmp al, 0x20
je 0x140021560
xor bl, bl
test rcx, rcx
je 0x140021589
cmp dword [0x1403b223c], esi
je 0x140021589
mov rdx, qword [0x1403b2d78]
lea r8, [rbp - 0x7f]
mov r9d, 1
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp byte [rbp - 0x7f], sil
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x68]
lea rcx, [0x1403b2cd0]
cmove ebx, esi
call fcn.140021860
mov edx, esi
mov rcx, qword [rax]
movzx eax, bl
cmp byte [rcx + 0x58], sil
cmove edx, eax
test dl, dl
je 0x14002172f
cmp byte [0x1403b23fd], sil
jne 0x14002181a
movsxd rbx, dword [0x140393920]
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rdi, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
mov r8, rax
cmp rdi, 0x989680
jne 0x1400215f2
imul rcx, r8, 0x64
jmp 0x140021618
cqo
idiv rdi
imul rax, rdx, 0x3b9aca00
cqo
idiv rdi
mov rcx, rax
mov rax, r8
cqo
idiv rdi
imul rdx, rax, 0x3b9aca00
add rcx, rdx
mov qword [rsp + 0x30], rcx
cmp rbx, 1
jl 0x140021645
imul rdx, rbx, 0xf4240
mov rax, r14
sub rax, rdx
cmp rcx, rax
jge 0x140021640
lea rax, [rdx + rcx]
mov qword [rsp + 0x30], rax
jmp 0x140021645
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x30]
call fcn.140004710
mov dword [rbp - 0x48], esi
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x44], xmm0
mov dword [rbp - 0x34], 2
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
nop word [rax + rax]
mov r10, qword [rax + 0x30]
movsxd rcx, dword [r10 + 0x3c]
mov edi, dword [rcx + r10 + 0x88]
add rdi, r10
cmp rdi, r10
je 0x1400216f7
mov r9d, dword [rdi + 0x18]
test r9d, r9d
je 0x1400216f7
mov ebx, dword [rdi + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0x54fc2965
lea rcx, [rbx + r9*4]
mov edx, dword [rcx + r10]
add rdx, r10
movzx ecx, byte [rdx]
inc rdx
test cl, cl
je 0x1400216f2
nop
movsx ecx, cl
lea rdx, [rdx + 1]
xor ecx, r8d
imul r8d, ecx, 0x1000193
movzx ecx, byte [rdx - 1]
test cl, cl
jne 0x1400216d0
cmp r8d, 0x96da021d
je 0x1400216fc
test r9d, r9d
jne 0x1400216b0
mov rax, qword [rax]
jmp 0x140021680
mov ecx, dword [rdi + 0x24]
mov r8d, Ordinal_45
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rdi + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
lea rdx, [rbp - 0x48]
add rax, r10
lea ecx, [r8 - 0x27]
call rax
mov byte [0x1403b23fd], 1
jmp 0x14002181a
cmp byte [0x1403b23fd], sil
je 0x14002181a
mov dword [rbp - 0x20], esi
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x1c], xmm0
mov dword [rbp - 0xc], 4
xorps xmm1, xmm1
movdqu xmmword [rbp - 8], xmm1
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
nop word [rax + rax]
mov r10, qword [rax + 0x30]
movsxd rcx, dword [r10 + 0x3c]
mov edi, dword [rcx + r10 + 0x88]
add rdi, r10
cmp rdi, r10
je 0x1400217e7
mov r9d, dword [rdi + 0x18]
test r9d, r9d
je 0x1400217e7
mov ebx, dword [rdi + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0x6a050704
lea rcx, [rbx + r9*4]
mov edx, dword [rcx + r10]
add rdx, r10
movzx ecx, byte [rdx]
inc rdx
test cl, cl
je 0x1400217e2
nop
movsx ecx, cl
lea rdx, [rdx + 1]
xor ecx, r8d
imul r8d, ecx, 0x1000193
movzx ecx, byte [rdx - 1]
test cl, cl
jne 0x1400217c0
cmp r8d, 0x5551ddce
je 0x1400217ec
test r9d, r9d
jne 0x1400217a0
mov rax, qword [rax]
jmp 0x140021770
mov ecx, dword [rdi + 0x24]
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rdi + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
lea rdx, [rbp - 0x20]
mov r8d, Ordinal_45
add rax, r10
lea ecx, [r8 - 0x27]
call rax
mov byte [0x1403b23fd], sil
cmp byte [0x1403939f0], sil
je 0x140021280
mov r14, qword [rsp + 0x138]
mov rdi, qword [rsp + 0x130]
mov rsi, qword [rsp + 0x128]
mov rbx, qword [rsp + 0x120]
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.1400efb60
add rsp, 0x110
pop rbp
ret