Function at 0x140059920
Capabilities:
Check for debugger via api
Check for outputdebugstring error
Create thread
Execute command
Log keystrokes via polling
Print debug messages
Set console window title
Terminate process

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0xc8
mov rcx, qword [0x1401c81a0]
call fcn.140008870
mov rcx, qword [0x1401c81a0]
call fcn.1400088b0
lea rdx, str.qwertyssddsjdfkjd
lea rcx, [rsp + 0x60]
call fcn.140059bf0
mov rcx, rax
call fcn.140059bc0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
mov edx, 0x46
lea rcx, [rsp + 0x40]
call fcn.14004f2a0
nop
lea rcx, [rsp + 0x40]
call fcn.14005b750
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
lea rdx, str.qwertyssddsjdfkjd
lea rcx, [rsp + 0x72]
call fcn.140059bf0
mov rcx, rax
call fcn.140059bc0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
movzx eax, ax
test eax, eax
jne 0x1400599c8
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
cmp dword [rsp + 0x30], 0
jne 0x1400599ea
cmp dword [rsp + 0x30], 1
jne 0x1400599f2
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, str.Using_a_debugger_
lea rcx, [rsp + 0x84]
call fcn.140059bf0
mov rcx, rax
call fcn.140059bc0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140059a31
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
lea rdx, str.qwertyssddsjdfkjd
lea rcx, [rsp + 0x96]
call fcn.140059bf0
mov rcx, rax
call fcn.140059bc0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
movzx eax, ax
test eax, eax
jne 0x140059a65
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
cmp dword [rsp + 0x30], 0
jne 0x140059a87
cmp dword [rsp + 0x30], 1
jne 0x140059a8f
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, str.Using_a_debugger_
lea rcx, [rsp + 0xa8]
call fcn.140059bf0
mov rcx, rax
call fcn.140059bc0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140059ace
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x14004d010]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x34]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [rsp + 0x34], 0x103
jne 0x140059b9d
call fcn.140058020
call fcn.14004bb60
movzx eax, al
test eax, eax
je 0x140059b2b
jmp 0x140059b3b
call fcn.14004b580
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [0x1400d9ad4]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rdx, [0x1401c8358]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14005cbd0
xor eax, eax
cmp eax, 1
je 0x140059b76
mov ecx, 0x70
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
cwde
test eax, eax
je 0x140059b74
jmp 0x140059b76
jmp 0x140059b5b
lea rcx, [0x1400d9ad8]
call fcn.14004bc10
cmp dword [0x1401c81e4], 0
je 0x140059b9b
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.1400575a0
jmp 0x140059ba6
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
nop
lea rcx, [rsp + 0x40]
call fcn.14004d260
jmp 0x140059bb4
xor eax, eax
add rsp, 0xc8
ret