Function at 0x401090
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x38
mov eax, dword [0x41f004]
xor eax, esp
mov dword [esp + 0x34], eax
push esi
push edi
push str.Start_MTU_device_monitor_thread_n
mov edi, ecx
call fcn.00403f40
add esp, 4
push 0x15f900
push 0
push 0x57fce0
call fcn.00405010
add esp, 0xc
push 0x15f900
push 0
push 0x4203c0
call fcn.00405010
add esp, 0xc
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0x2710
mov byte [esp + 0x14], 0
test eax, eax
jne 0x401125
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_create_startup_event:__d_n
call fcn.00403f40
add esp, 8
pop edi
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
push eax
push 0
lea eax, [esp + 0x14]
push eax
push 0x4013c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401176
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_launch_device_monitor_thread__error__d_n
call fcn.00403f40
push str.Error:_Unable_to_launch__possibly_another_instance_already_running_n
call fcn.00401010
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
movzx eax, byte [esp + 0x14]
push eax
push str.Startup_event_signaled:__d_n
call fcn.00403f40
add esp, 8
cmp byte [esp + 0x14], 0
je 0x4011c6
push str.Unable_to_launch_device_monitor_thread_n
call fcn.00403f40
add esp, 4
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 1
jne 0x40131c
push str.App_mode__create_window_n
call fcn.00403f40
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4203a0], eax
test eax, eax
jne 0x401212
call edi
push eax
push str.App_mode__GetModuleHandle_failure__d_n
call fcn.00403f40
mov eax, dword [0x4203a0]
add esp, 8
push 0x7f00
push 0
mov dword [0x420340], 0x30
mov dword [0x420344], 3
mov dword [0x420348], 0x402ea0
mov dword [0x42034c], 0
mov dword [0x420350], 0
mov dword [0x420354], eax
call dword [sym.imp.USER32.dll_LoadIconA]
push 0x7f00
push 0
mov dword [0x420358], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0
mov dword [0x42035c], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
push 0x420340
mov dword [0x420360], eax
mov dword [0x420364], 0x41bc54
mov dword [0x420368], 0x41c330
mov dword [0x42036c], 0
call dword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
jne 0x4012b8
call edi
push eax
push str.App_mode__RegisterClass_failure__d_n
call fcn.00403f40
add esp, 8
push 0
push dword [0x4203a0]
push 0
push 0
push 0x80000000
push 0x80000000
push 0x80000000
push 0x80000000
push 0x20000000
push str.QCMTU
push str.QCMTU
push 0x8000000
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x4203a4], eax
test eax, eax
jne 0x401310
call edi
push eax
push str.App_mode__CreateWindow_failure__d_n
call fcn.00403f40
add esp, 8
nop dword [eax + eax]
call fcn.004088a5
cmp eax, 0x1b
jne 0x401310
jmp 0x40137f
xorps xmm0, xmm0
mov dword [esp + 0x1c], 0x20
push 1
lea eax, [esp + 0x20]
movlpd qword [esp + 0x28], xmm0
movlpd qword [esp + 0x30], xmm0
movlpd qword [esp + 0x38], xmm0
movups xmm0, xmmword [0x41f8b0]
push eax
push dword [0x4202ec]
mov dword [esp + 0x2c], 5
movups xmmword [0x42038c], xmm0
call dword [sym.imp.USER32.dll_RegisterDeviceNotificationA]
mov dword [0x4202e4], eax
test eax, eax
jne 0x40138b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_register_device_notification__error__d_n
call fcn.00403f40
add esp, 8
push dword [0x4203ac]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.USER32.dll_UnregisterDeviceNotification]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Device_monitor_thread_terminated_n
call fcn.00403f40
mov ecx, dword [esp + 0x40]
add esp, 4
pop edi
pop esi
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret