Function at 0x140003340
Capabilities:
Accept command line arguments
Print debug messages

Disassembly:
push rbx
sub rsp, 0xef0
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov rax, qword [0x140009010]
xor rax, rsp
mov qword [rsp + 0xee0], rax
xor edx, edx
mov r8d, 0x20a
lea rcx, [rsp + 0xb0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x20a
lea rcx, [rsp + 0x4d0]
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rbx, rax
test rax, rax
je 0x14000344c
mov ecx, dword [rsp + 0x30]
add ecx, 0xfffffffe
cmp ecx, 1
ja 0x14000344c
mov r8d, 0x104
mov rdx, qword [rax + 8]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
cmp dword [rsp + 0x30], 3
jne 0x140003400
mov r8d, 0x104
mov rdx, qword [rbx + 0x10]
lea rcx, [rsp + 0x4d0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor edx, edx
mov r8d, 0x800
lea rcx, [rsp + 0x6e0]
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x4d0]
lea r8, [rsp + 0xb0]
lea rdx, str.Parameters_Syntax_Valid:___s_____s__n
lea rcx, [rsp + 0x6e0]
call fcn.1400032e0
lea rcx, [rsp + 0x6e0]
jmp 0x140003453
lea rcx, str.Invalid_Parameter_Syntax.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov r8d, 0x10
lea rdx, str._registerConnect
lea rcx, [rsp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x14000348f
lea rcx, str.Register_WIA_Events.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call fcn.140002020
jmp 0x1400037b1
mov r8d, 0x12
lea rdx, str._unregisterConnect
lea rcx, [rsp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x1400034c5
lea rcx, str.Unregister_WIA_Events.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call fcn.140002470
jmp 0x1400037b1
mov r8d, 2
lea rdx, [0x1400068a8]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x140003550
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x2c0]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x2c0]
sub rcx, 2
lea rcx, [rcx + 2]
cmp word [rcx], 0
jne 0x140003505
mov eax, dword [0x1400068b0]
mov dword [rcx], eax
movzx eax, word [0x1400068b4]
mov word [rcx + 4], ax
mov r8d, 2
lea rdx, [rsp + 0x4d0]
lea rcx, [rsp + 0x2c0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat]
lea rcx, [rsp + 0x2c0]
call fcn.140003b70
jmp 0x1400037b1
mov r8d, 0xb
lea rdx, str._StiDevice:
lea rcx, [rsp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x14000359e
lea r8d, [rax + 0xa]
lea rdx, str._StiEvent:
lea rcx, [rsp + 0x4d0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x14000359e
lea rcx, [rsp + 0xb0]
call fcn.1400037e0
jmp 0x1400037b1
mov r8d, 2
lea rdx, [0x1400068e8]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x1400037a4
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x14000379f
mov dword [rsp + 0x40], 1
lea rax, vtable.CFactoryHWEventHandler.0
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x48], 0
lea rcx, str.We_are_in_the_exe_for_wpd_device_launch
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 1
lea r8d, [r9 + 3]
lea rdx, [rsp + 0x38]
lea rcx, [0x140006b18]
call qword [sym.imp.ole32.dll_CoRegisterClassObject]
test eax, eax
js 0x140003788
lea rcx, str.finished_registering_the_class
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x1400036af
nop dword [rax]
cmp eax, 0xffffffff
je 0x140003698
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_DispatchMessageW]
lea rcx, str.finished_processing_message
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x140003670
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x2c0]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x38]
call fcn.140004010
nop
lea rcx, [rsp + 0x88]
mov rbx, qword [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae rcx, rbx
xor r9d, r9d
mov rdx, qword [rsp + 0x98]
call fcn.140003d50
test eax, eax
jne 0x14000372e
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.ole32.dll_CoRevokeClassObject]
call qword [sym.imp.ole32.dll_CoUninitialize]
nop
lea rcx, [rsp + 0x88]
call fcn.1400028c0
or eax, 0xffffffff
jmp 0x1400037b8
lea rcx, [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae rcx, rbx
lea rdx, [rsp + 0x2c0]
nop dword [rax + rax]
movzx eax, word [rcx]
mov word [rdx], ax
lea rcx, [rcx + 2]
lea rdx, [rdx + 2]
test ax, ax
jne 0x140003750
lea rcx, [rsp + 0x2c0]
call fcn.140003b70
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.ole32.dll_CoRevokeClassObject]
nop
lea rcx, [rsp + 0x88]
call fcn.1400028c0
lea rcx, str.not_registering_the_class
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call qword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
jmp 0x1400037b8
or eax, 0xffffffff
jmp 0x1400037b8
lea rcx, str.Unregcognized_launch_option.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
jmp 0x1400037b8
mov rcx, qword [rsp + 0xee0]
xor rcx, rsp
call fcn.1400044c0
add rsp, 0xef0
pop rbx
ret