Function at 0x140059270
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rdi
mov rbp, rsp
sub rsp, 0x78
mov rdi, rcx
mov dword [rsp + 0x20], 1
lea rcx, [rbp - 0x48]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x140059a19
mov qword [rsp + 0xa0], rsi
lea rsi, [0x140078ff8]
mov qword [rsp + 0xa8], r12
xor r12d, r12d
mov qword [rsp + 0x70], r13
lea r13, [0x140000000]
mov qword [rsp + 0x90], rbx
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x60], r15
nop word [rax + rax]
mov eax, dword [rbp - 0x40]
cmp eax, 0x402
jb 0x140059849
mov ecx, eax
mov rax, qword [str._br_b_]
cmp rcx, qword [rax]
jg 0x140059849
mov rcx, rdi
mov rbx, r12
call qword [sym.wluart_static.exe_lua_gettop]
mov rcx, qword [rbp - 0x48]
mov r15d, eax
test rcx, rcx
je 0x14005966d
mov edx, 0xffffffeb
call qword [sym.imp.USER32.dll_GetWindowLongPtrA]
mov rbx, rax
test rax, rax
je 0x14005999c
movsxd r8, dword [rax + 0x28]
mov edx, 0xfff0b9d8
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_rawgeti]
cmp eax, 5
jne 0x1400599d0
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_gettop]
mov edx, dword [rbp - 0x40]
lea r8, [rbp + 0x20]
mov rcx, rdi
mov r14d, eax
call qword [sym.wluart_static.exe_lua_getevent]
cmp dword [rbp + 0x20], 6
mov rcx, rdi
jne 0x140059444
mov edx, 0xfffffffe
call qword [sym.wluart_static.exe_lua_pushvalue]
lea rdx, [rbp - 0x48]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushlightuserdata]
xor r9d, r9d
mov qword [rsp + 0x28], r12
mov rcx, rdi
mov qword [rsp + 0x20], r12
lea edx, [r9 + 2]
lea r8d, [r9 - 1]
call qword [sym.wluart_static.exe_lua_pcallk]
test eax, eax
je 0x1400593ba
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_error]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_gettop]
mov esi, eax
sub esi, r14d
cmp esi, 1
jne 0x1400593f5
lea edx, [rsi - 2]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_type]
lea edx, [rsi - 3]
mov rcx, rdi
test eax, eax
je 0x1400596fd
mov r8d, esi
call qword [sym.wluart_static.exe_lua_rotate]
jmp case.0x140059488.1031
jle case.0x140059488.1031
mov edx, esi
mov rcx, rdi
not edx
call qword [sym.wluart_static.exe_lua_pushvalue]
mov edx, 0xfffffffe
mov r8d, 0xffffffff
sub edx, esi
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_rotate]
mov edx, 0xfffffffe
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_settop]
neg esi
mov r8d, 1
mov edx, esi
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_rotate]
jmp case.0x140059488.1031
mov r8, rax
mov edx, 0xffffffff
call qword [sym.wluart_static.exe_lua_getfield]
mov edx, 0xfffffffe
mov rcx, rdi
test eax, eax
je 0x1400596fd
lea r8d, [rdx + 3]
call qword [sym.wluart_static.exe_lua_rotate]
mov eax, dword [rbp - 0x40]
add eax, 0xfffffbfa
cmp eax, 0x11
ja case.0x140059488.1031
mov ecx, dword [r13 + rax*4 + 0x59a30]
add rcx, r13
jmp rcx
mov eax, dword [rbx + 0x10]
cmp eax, dword [0x1400895f8]
jl case.0x140059488.1031
cmp eax, dword [0x1400895fc]
jg case.0x140059488.1031
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je case.0x140059488.1031
cmp eax, dword [0x1400895f0]
lea r8d, [rcx - 1]
mov r9, r12
mov rdx, rbx
cmove r9, rcx
mov rcx, rdi
call fcn.140066680
jmp case.0x140059488.1031
mov rdx, qword [rbp - 0x38]
mov rcx, rdi
mov rdx, qword [r13 + rdx*8 + 0x87460]
call qword [sym.wluart_static.exe_lua_pushstring]
movsx rdx, word [rbp - 0x30]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushinteger]
mov rax, qword [rbp - 0x30]
mov rcx, rdi
shr rax, 0x10
movsx rdx, ax
call qword [sym.wluart_static.exe_lua_pushinteger]
jmp case.0x140059488.1031
mov eax, dword [rbx + 0x10]
cmp eax, dword [0x1400895f4]
jne 0x140059540
mov rcx, qword [rbx + 8]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x407
call qword [sym.imp.USER32.dll_SendMessageA]
mov rdx, rax
mov rcx, rdi
call fcn.14005d0a0
jmp case.0x140059488.1031
cmp eax, dword [0x1400895f0]
jne 0x140059599
mov rcx, rdi
cmp qword [rbp - 0x38], r12
je 0x14005956d
mov rdx, qword [rbp - 0x30]
mov r8d, 0xffffffff
call qword [sym.wluart_static.exe_lua_pushlwstring]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14005957c
mov r9, qword [rbp - 0x30]
xor r8d, r8d
mov rdx, rbx
call fcn.140066680
cmp qword [rbp - 0x38], r12
lea rdx, str.edited
mov rcx, rdi
cmovne rdx, rsi
call qword [sym.wluart_static.exe_lua_pushstring]
jmp case.0x140059488.1031
cmp eax, dword [0x1400895ec]
jne case.0x140059488.1031
mov rcx, qword [rbx + 8]
mov r9d, 0x20000
xor r8d, r8d
mov edx, 0x445
call qword [sym.imp.USER32.dll_SendMessageA]
jmp case.0x140059488.1031
mov eax, dword [rbx + 0x10]
cmp eax, dword [0x140089610]
jne 0x1400595de
mov rdx, qword [rbx + 8]
mov rcx, rdi
call fcn.14005d0a0
jmp case.0x140059488.1031
cmp eax, dword [0x1400895f8]
jl 0x140059606
cmp eax, dword [0x1400895fc]
jg 0x140059606
mov r9, qword [rbp - 0x30]
mov rdx, rbx
mov r8d, dword [rbp - 0x38]
mov rcx, rdi
call fcn.140066680
jmp case.0x140059488.1031
cmp eax, dword [0x140089608]
jne 0x14005961f
mov rdx, qword [rbx + 8]
mov rcx, rdi
call fcn.14005fbf0
jmp case.0x140059488.1031
cmp eax, dword [0x1400895ec]
jne case.0x140059488.1031
mov rdx, qword [rbp - 0x38]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushinteger]
mov rdx, qword [rbp - 0x30]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushinteger]
jmp case.0x140059488.1031
mov rdx, qword [rbp - 0x38]
mov rcx, rdi
test rdx, rdx
jne 0x14005958e
lea r8d, [rdx + 1]
lea rdx, [rbp - 0x30]
call qword [sym.wluart_static.exe_lua_pushlstring]
jmp case.0x140059488.1031
cmp dword [rbp - 0x40], 0x414
jne 0x14005999c
mov r8, qword [rbp - 0x38]
mov edx, 0xfff0b9d8
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_rawgeti]
cmp eax, 5
jne case.0x140059488.1031
lea r8, str.onClick
mov rcx, rdi
lea edx, [rax - 6]
call qword [sym.wluart_static.exe_lua_getfield]
test eax, eax
je case.0x140059488.1031
mov edx, 0xfffffffe
mov rcx, rdi
lea r8d, [rdx + 3]
call qword [sym.wluart_static.exe_lua_rotate]
mov rdx, qword [rbp - 0x30]
cmp rdx, 0xffffffffffffffff
jle case.0x140059488.1031
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushinteger]
mov r8d, 2
lea rdx, str.MenuItem
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_pushnewinstance]
mov edx, 0xfffffffe
mov rcx, rdi
lea r8d, [rdx + 1]
call qword [sym.wluart_static.exe_lua_rotate]
mov edx, 0xfffffffe
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_settop]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_gettop]
mov r14d, eax
sub r14d, r15d
sub r14d, 1
jne 0x14005973e
lea edx, [r14 - 1]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_type]
cmp eax, 6
je 0x14005973e
mov eax, dword [0x140089600]
cmp dword [rbx + 0x10], eax
jle 0x1400599b0
jmp 0x14005999c
mov rcx, rdi
call qword [sym.wluart_static.exe_search_task]
mov r15, rax
test rax, rax
je 0x140059756
mov dword [rax + 0x30], 1
xor r9d, r9d
mov qword [rsp + 0x28], r12
mov edx, r14d
mov qword [rsp + 0x20], r12
mov rcx, rdi
lea r8d, [r9 - 1]
call qword [sym.wluart_static.exe_lua_pcallk]
test eax, eax
je 0x140059780
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_error]
test r15, r15
je 0x140059789
mov dword [r15 + 0x30], r12d
mov eax, dword [rbp - 0x40]
cmp eax, 0x40e
jne 0x1400597bf
mov eax, dword [0x1400895ec]
cmp dword [rbx + 0x10], eax
jne 0x1400599b0
mov rcx, qword [rbx + 8]
mov r9d, 0xa0001
xor r8d, r8d
mov edx, 0x445
call qword [sym.imp.USER32.dll_SendMessageA]
jmp 0x1400599b0
cmp eax, 0x408
jne 0x1400599b0
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_gettop]
mov esi, eax
test eax, eax
je 0x1400597eb
mov edx, 0xffffffff
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_toboolean]
test eax, eax
je 0x140059834
mov rcx, qword [rbx + 8]
xor edx, edx
call qword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x140089628]
cmp dword [rbx + 0x10], eax
jne 0x140059824
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140059824
mov edx, 1
call qword [sym.imp.USER32.dll_EnableWindow]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.USER32.dll_SetActiveWindow]
mov qword [rbx + 0x18], r12
cmp dword [rbx + 0xd8], r12d
je 0x140059834
mov dword [rbx + 0xd8], r12d
mov edx, 0xffffffff
mov rcx, rdi
sub edx, esi
call qword [sym.wluart_static.exe_lua_settop]
jmp 0x1400599b0
mov rcx, qword [rbp - 0x48]
mov edx, 0xffffffeb
call qword [sym.imp.USER32.dll_GetWindowLongPtrA]
mov rsi, rax
test rax, rax
je 0x14005999c
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [rsi + 0x10]
cmp ecx, dword [0x140089628]
mov eax, dword [0x1400895fc]
je 0x1400598ba
cmp ecx, eax
je 0x1400598ba
cmp ecx, dword [0x1400895e0]
je 0x1400598ba
cmp ecx, dword [0x140089620]
je 0x1400598ba
mov rcx, qword [rsi + 8]
call qword [sym.imp.USER32.dll_GetParent]
mov rcx, rax
mov edx, 0xffffffeb
call qword [sym.imp.USER32.dll_GetWindowLongPtrA]
mov rsi, rax
test rax, rax
jne 0x140059870
jmp 0x14005999c
cmp dword [rbp - 0x40], 0x100
mov r14, qword [rsi + 8]
jne 0x140059986
cmp qword [rbp - 0x38], 9
jne 0x140059986
cmp ecx, eax
jne 0x140059916
xor r9d, r9d
xor r8d, r8d
mov edx, 0x130b
mov rcx, r14
call qword [sym.imp.USER32.dll_SendMessageW]
xor r8d, r8d
mov rcx, rsi
mov rdx, rax
call fcn.1400664f0
mov rbx, rax
mov rcx, qword [rax + 0x10]
mov r14, qword [rax + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x48]
mov edx, 0xffffffeb
call qword [sym.imp.USER32.dll_GetWindowLongPtrA]
test rax, rax
je 0x140059986
mov edx, dword [0x1400895ec]
cmp dword [rax + 0x10], edx
je 0x140059986
mov ecx, reloc.WS2_32.dll_recv
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
mov rdx, qword [rbp - 0x48]
mov rcx, r14
movzx r8d, ax
shr r8d, 0xf
and r8d, 1
call qword [sym.imp.USER32.dll_GetNextDlgTabItem]
mov rcx, rax
call qword [sym.imp.USER32.dll_SetFocus]
mov ecx, 9
call fcn.140069cb0
mov rcx, qword [rsi + 8]
mov r8, rax
mov edx, 0x415
mov r9d, 9
call qword [sym.imp.USER32.dll_PostMessageA]
jmp 0x1400599c9
mov rdx, qword [rsi + 0x70]
lea r8, [rbp - 0x48]
mov rcx, qword [rsi + 8]
call qword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x1400599a6
lea rcx, [rbp - 0x48]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp - 0x48]
call qword [sym.imp.USER32.dll_DispatchMessageA]
mov rcx, rdi
call qword [sym.wluart_static.exe_lua_gettop]
mov edx, 0xffffffff
mov rcx, rdi
sub edx, eax
call qword [sym.wluart_static.exe_lua_settop]
lea rsi, [0x140078ff8]
xor r9d, r9d
mov dword [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [rbp - 0x48]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x1400592e0
mov r15, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
mov r13, qword [rsp + 0x70]
mov r12, qword [rsp + 0xa8]
mov rsi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x90]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x78
pop rdi
pop rbp
ret