Function at 0x4059c0
Capabilities:
Create thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419e0d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x28
mov eax, dword [0x43f040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
sub esp, 0x10
mov dword [ebp - 0x34], 0x15f
mov eax, esp
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x2c], str.C:Users_nicok_source_reposVardianRokid.cpp
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x28], str.bool___thiscall_Rokid::start_void_
xor ecx, ecx
movups xmm0, xmmword [ebp - 0x34]
mov dword [ebp - 0x1c], str.Starting_Rokid_driver_instance
mov dword [ebp - 0x18], 0x1e
movups xmmword [eax], xmm0
call fcn.00406e20
add esp, 0x10
mov dword [0x43fc48], 0xffffffff
call fcn.004052a0
test eax, eax
jne 0x405aa9
sub esp, 0x10
mov dword [ebp - 0x34], 0x130
mov eax, esp
mov dword [ebp - 0x30], 3
mov dword [ebp - 0x2c], str.C:Users_nicok_source_reposVardianRokid.cpp
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x28], str.bool___thiscall_Rokid::rokid_hmd_usb_init_void_
mov ecx, 2
movups xmm0, xmmword [ebp - 0x34]
mov dword [ebp - 0x1c], str.Failed_to_find_Rokid_Max
mov dword [ebp - 0x18], 0x18
movups xmmword [eax], xmm0
call fcn.00406e20
add esp, 0x10
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x43fc48], eax
cmp eax, 0xffffffff
jne 0x405b35
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub esp, 0x18
mov dword [ebp - 0x34], 0x13f
mov edx, eax
mov dword [ebp - 0x30], 3
mov ecx, esp
mov dword [ebp - 0x2c], str.C:Users_nicok_source_reposVardianRokid.cpp
mov dword [ebp - 0x28], str.bool___thiscall_Rokid::rokid_hmd_usb_init_void_
mov dword [ebp - 0x1c], str.Failed_to_init_HID:_
mov dword [ebp - 0x18], 0x16
call fcn.00401380
movups xmm0, xmmword [ebp - 0x34]
sub esp, 0x10
lea edx, [ebp - 0x1c]
mov eax, esp
mov ecx, 2
movups xmmword [eax], xmm0
call fcn.004089d0
add esp, 0x28
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov al, byte [0x43fc4d]
test al, al
je 0x405bbc
xor al, al
mov ecx, 0x43fc4c
xchg byte [ecx], al
push 0x10
call fcn.00418a67
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [eax], 0x43fc4d
mov dword [eax + 4], 0x43fc4c
mov dword [eax + 8], 0x43fbf8
mov dword [eax + 0xc], 0x404f10
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
push ecx
push 0
push eax
push 0x40a970
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ecx, eax
add esp, 0x18
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x405c13
mov dword [ebp - 4], 0xffffffff
cmp dword [0x43fc44], 0
je 0x405bae
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
mov eax, dword [ebp - 0x18]
mov dword [0x43fc40], ecx
mov dword [0x43fc44], eax
sub esp, 0x10
mov dword [ebp - 0x24], 0x16c
mov eax, esp
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x1c], str.C:Users_nicok_source_reposVardianRokid.cpp
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x18], str.bool___thiscall_Rokid::start_void_
xor ecx, ecx
movups xmm0, xmmword [ebp - 0x24]
mov dword [ebp - 0x2c], str.Started_Rokid_driver_instance
mov dword [ebp - 0x28], 0x1d
movups xmmword [eax], xmm0
call fcn.00406e20
add esp, 0x10
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 6
mov dword [ebp - 0x18], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3