Function at 0x1400082c0
Capabilities:
Manipulate console buffer

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
push rdi
sub rsp, 0x2e0
movaps xmmword [rax - 0x18], xmm6
movaps xmmword [rax - 0x28], xmm7
mov rax, qword [0x1400850c0]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
xor edi, edi
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbx, rax
lea rdx, [rsp + 0xa8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
mov dword [rsp + 0xac], edi
lea rdx, [rsp + 0xa8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0xe0], xmm0
movups xmmword [rsp + 0xf0], xmm0
mov qword [rsp + 0x100], rax
mov dword [rsp + 0x100], 0xe
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsp + 0xe0], rax
lea rdx, [rsp + 0xe8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
lea rdx, [rsp + 0x104]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
nop
movups xmm6, xmmword [rsp + 0xe0]
movups xmmword [rsp + 0x110], xmm6
movups xmm7, xmmword [rsp + 0xf0]
movups xmmword [rsp + 0x120], xmm7
movsd xmm0, qword [rsp + 0x100]
movsd qword [rsp + 0x130], xmm0
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], rdi
lea r8d, [rdi + 0xa]
lea rdx, str.___l____v
lea rcx, [rsp + 0x60]
call fcn.140010aa0
lea rcx, [rsp + 0x60]
call fcn.140006b40
xor edx, edx
xor ecx, ecx
call qword [sym.imp.hidapi.dll_hid_enumerate]
mov qword [0x14008a5a8], rax
call qword [sym.imp.hidapi.dll_hid_init]
mov rcx, qword [0x14008a5a8]
mov rbx, rcx
test rcx, rcx
je 0x140008455
mov edx, 0x352d
mov r8d, 0x2383
lea r9d, [r8 - 1]
mov r10d, 0xfffd
cmp word [rbx + 8], dx
jne 0x14000844c
movzx eax, word [rbx + 0xa]
cmp ax, r8w
je 0x140008441
sub ax, r9w
test r10w, ax
jne 0x14000844c
cmp word [rbx + 0x32], 0
je 0x14000851c
mov rbx, qword [rbx + 0x38]
test rbx, rbx
jne 0x140008427
mov rax, qword [rsp + 0x138]
mov qword [0x14008a5a0], rax
call qword [sym.imp.hidapi.dll_hid_free_enumeration]
mov rcx, qword [0x14008a5a0]
test rcx, rcx
jne 0x140008629
call fcn.140006ab0
mov qword [rsp + 0x48], rdi
lea rcx, str.Unable_to_open_device
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0xc8], 0x15
movaps xmm0, xmmword [rsp + 0xc0]
movdqa xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x50], rdi
movups xmm0, xmmword [rsp + 0x40]
movaps xmmword [rsp + 0xc0], xmm0
movsd xmm1, qword [rsp + 0x50]
movsd qword [rsp + 0xd0], xmm1
lea r9, [rsp + 0x30]
mov r8d, 4
lea rdx, [rsp + 0xc0]
mov rcx, qword [rax + 0x1d8]
call fcn.140004420
call qword [sym.imp.hidapi.dll_hid_exit]
nop
mov ebx, dword [rsp + 0x130]
test bl, 1
je 0x140008540
mov edx, dword [rsp + 0x11c]
movq rdi, xmm6
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140008548
mov rdx, qword [rbx]
lea rcx, str.Device_found:__s_n
call fcn.1400029a0
mov rcx, qword [rbx]
call qword [sym.imp.hidapi.dll_hid_open_path]
mov rcx, qword [0x14008a5a8]
jmp 0x14000845d
mov rdi, qword [rsp + 0x110]
test bl, 2
je 0x14000855a
movd edx, xmm7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test bl, 4
je 0x14000856f
mov edx, dword [rsp + 0x134]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test bl, 8
je 0x140008585
mov edx, dword [rsp + 0x118]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
nop
mov ebx, dword [rsp + 0x100]
test bl, 1
je 0x1400085a6
mov edx, dword [rsp + 0xec]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test bl, 2
je 0x1400085c1
movzx edx, word [rsp + 0xf0]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test bl, 4
je 0x1400085db
mov edx, dword [rsp + 0x104]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test bl, 8
je 0x1400085f5
mov edx, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
mov eax, 1
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.140038a60
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop rdi
ret
mov edx, 1
call qword [sym.imp.hidapi.dll_hid_set_nonblocking]
call fcn.140006ab0
mov qword [rsp + 0x48], rdi
lea rcx, str.Allocating_a_new_virtual_xbox360_controller__
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0xc8], 0x2d
movaps xmm0, xmmword [rsp + 0xc0]
movdqa xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x50], rdi
movups xmm0, xmmword [rsp + 0x40]
movaps xmmword [rsp + 0xc0], xmm0
movsd xmm1, qword [rsp + 0x50]
movsd qword [rsp + 0xd0], xmm1
lea r9, [rsp + 0x30]
mov r8d, 2
lea rdx, [rsp + 0xc0]
mov rcx, qword [rax + 0x1d8]
call fcn.140004420
call fcn.140036f50
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x140008739
call fcn.140006ab0
mov qword [rsp + 0x48], rdi
lea rcx, str.Failed_allocating_memory_for_xbox360_controller__
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0xc8], 0x31
movaps xmm0, xmmword [rsp + 0xc0]
movdqa xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x50], rdi
movups xmm0, xmmword [rsp + 0x40]
movaps xmmword [rsp + 0xc0], xmm0
movsd xmm1, qword [rsp + 0x50]
movsd qword [rsp + 0xd0], xmm1
lea r9, [rsp + 0x30]
lea r8d, [rbx + 4]
lea rdx, [rsp + 0xc0]
mov rcx, qword [rax + 0x1d8]
call fcn.140004420
jmp 0x140008819
mov rcx, rbx
call fcn.140036f90
cmp eax, 0x20000000
je 0x140008767
cdqe
mov qword [rsp + 0xa8], rax
lea rax, str.ViGEm_Bus_connection_failed_with_error_code:_
mov qword [rsp + 0xc8], 0x2f
jmp 0x1400087ac
call fcn.1400373c0
mov rsi, rax
mov qword [rsp + 0x138], rax
mov rdx, rax
mov rcx, rbx
call fcn.140037230
cmp eax, 0x20000000
je 0x1400088fb
mov qword [rsp + 0xa8], 0x20000000
lea rax, str.vigem_target_add___failed_with_error_code:_
mov qword [rsp + 0xc8], 0x2d
mov qword [rsp + 0xc0], rax
call fcn.140006ab0
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x50], rdi
movaps xmm0, xmmword [rsp + 0xc0]
movdqa xmmword [rsp + 0x30], xmm0
movups xmm1, xmmword [rsp + 0x40]
movaps xmmword [rsp + 0xc0], xmm1
movsd xmm0, qword [rsp + 0x50]
movsd qword [rsp + 0xd0], xmm0
lea rcx, [rsp + 0xa8]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0xc0]
mov rcx, qword [rax + 0x1d8]
call fcn.140022890
nop
mov ebx, dword [rsp + 0x130]
test bl, 1
je 0x14000883c
mov edx, dword [rsp + 0x11c]
movq rdi, xmm6
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140008844
mov rdi, qword [rsp + 0x110]
test bl, 2
je 0x140008856
movd edx, xmm7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test bl, 4
je 0x14000886b
mov edx, dword [rsp + 0x134]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test bl, 8
je 0x140008881
mov edx, dword [rsp + 0x118]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
nop
mov ebx, dword [rsp + 0x100]
test bl, 1
je 0x1400088a2
mov edx, dword [rsp + 0xec]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test bl, 2
je 0x1400088bd
movzx edx, word [rsp + 0xf0]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test bl, 4
je 0x1400088d7
mov edx, dword [rsp + 0x104]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test bl, 8
je 0x1400088f1
mov edx, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
mov eax, 0xffffffff
jmp 0x1400085fa
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x150]
call fcn.140063ef0
lea rcx, [rsp + 0x150]
call fcn.140009e50
nop
lea rax, str.LStickX
mov qword [rsp + 0xa8], rax
lea rax, [0x140006da0]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.LStickX_
mov qword [rsp + 0xa8], rax
lea rax, [0x140006de0]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.LStickY
mov qword [rsp + 0xa8], rax
lea rax, [0x140006e20]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.LStickY_
mov qword [rsp + 0xa8], rax
lea rax, [0x140006e60]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.RStickX
mov qword [rsp + 0xa8], rax
lea rax, [0x140006ea0]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.RStickX_
mov qword [rsp + 0xa8], rax
lea rax, [0x140006ee0]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.RStickY
mov qword [rsp + 0xa8], rax
lea rax, [0x140006f20]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.RStickY_
mov qword [rsp + 0xa8], rax
lea rax, [0x140006f60]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.LTrigger
mov qword [rsp + 0xa8], rax
lea rax, [0x140006fa0]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
lea rax, str.RTrigger
mov qword [rsp + 0xa8], rax
lea rax, [0x140006fd0]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x30]
call fcn.14001e8f0
mov qword [rsp + 0x98], rdi
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x150]
lea rcx, [rsp + 0xc0]
call fcn.14000fcc0
nop
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x30]
call fcn.14000ae00
mov rcx, rax
call fcn.140007a40
nop
movzx edx, byte [rsp + 0xc0]
lea rcx, [rsp + 0xc8]
call fcn.14000bf00
nop
mov rax, qword [rsp + 0x150]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x150], rax
mov rax, qword [rsp + 0x150]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x14c], edx
lea rcx, [rsp + 0x160]
call fcn.140009d00
mov rax, qword [rsp + 0x150]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x150], rax
mov rax, qword [rsp + 0x150]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x14c], edx
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x200], rax
lea rcx, [rsp + 0x200]
call fcn.140037eb8
nop
jmp 0x140008bf2
cmp dword [0x14008a598], 0
jne 0x140008c28
mov word [rsp + 0x108], 0xa004
mov byte [rsp + 0x10a], 2
mov r8d, 3
lea rdx, [rsp + 0x108]
mov rcx, qword [0x14008a5a0]
call qword [sym.imp.hidapi.dll_hid_write]
mov dword [rsp + 0xa8], 0x103b604
mov r8d, 4
lea rdx, [rsp + 0xa8]
mov rcx, qword [0x14008a5a0]
call qword [sym.imp.hidapi.dll_hid_write]
mov ecx, 1
call fcn.140038ba8
mov qword [rsp + 0x138], rax
lea rcx, [rsp + 0x148]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], edi
mov r9, rax
lea r8, [0x14001eb50]
xor edx, edx
xor ecx, ecx
call fcn.140043dc8
mov qword [rsp + 0x140], rax
test rax, rax
je 0x140008e52
cmp dword [rsp + 0x148], 0
je 0x140008e6a
movaps xmm0, xmmword [rsp + 0x140]
movdqa xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
call fcn.140038540
test eax, eax
jne 0x140008e6a
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x140], xmm0
lea r8d, [rax + 0x41]
lea rdx, [rsp + 0x260]
mov rcx, qword [0x14008a5a0]
call qword [sym.imp.hidapi.dll_hid_read]
test eax, eax
js 0x140008d20
je 0x140008d01
lea r8, [rsp + 0x260]
mov rdx, rsi
mov rcx, rbx
call fcn.1400071a0
mov r8d, 0x41
lea rdx, [rsp + 0x260]
mov rcx, qword [0x14008a5a0]
call qword [sym.imp.hidapi.dll_hid_read]
test eax, eax
jns 0x140008cec
mov rcx, qword [0x14008a5a0]
call qword [sym.imp.hidapi.dll_hid_error]
mov rdx, rax
lea rcx, str.Unable_to_read__:__ls_n
call fcn.1400029a0
lea rcx, str.Exiting..._n
call fcn.1400029a0
mov rcx, qword [0x14008a5a0]
call qword [sym.imp.hidapi.dll_hid_close]
call qword [sym.imp.hidapi.dll_hid_exit]
lea rcx, str.pause
call fcn.140047d50
nop
cmp dword [rsp + 0x148], 0
jne 0x140008e64
mov ebx, dword [rsp + 0x130]
mov rdi, qword [rsp + 0x110]
test bl, 1
je 0x140008d9a
mov edx, dword [rsp + 0x11c]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test bl, 2
je 0x140008db0
movzx edx, word [rsp + 0x120]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test bl, 4
je 0x140008dc5
mov edx, dword [rsp + 0x134]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test bl, 8
je 0x140008ddb
mov edx, dword [rsp + 0x118]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
nop
mov ebx, dword [rsp + 0x100]
test bl, 1
je 0x140008dfc
mov edx, dword [rsp + 0xec]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test bl, 2
je 0x140008e17
movzx edx, word [rsp + 0xf0]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test bl, 4
je 0x140008e31
mov edx, dword [rsp + 0x104]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test bl, 8
je 0x140008e4b
mov edx, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
xor eax, eax
jmp 0x1400085fa
mov dword [rsp + 0x148], edi
mov ecx, 6
call fcn.140037844
nop
call fcn.140047e98
nop
mov ecx, 1
call fcn.140037844
int3