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

Disassembly:
push ebp
lea ebp, [esp - 0x1048]
mov eax, 0x1048
call fcn.004038a0
push 0xffffffffffffffff
push 0x403bc9
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x40603c]
xor eax, ebp
mov dword [ebp + 0x1044], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor ebx, ebx
push 0x208
lea eax, [ebp + 0xe3a]
push ebx
mov dword [ebp - 4], ebx
push eax
mov word [ebp + 0xe38], bx
call sub.MSVCR80.dll_memset
push 0x208
lea ecx, [ebp + 0xc2e]
push ebx
push ecx
mov word [ebp + 0xc2c], bx
call sub.MSVCR80.dll_memset
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea edx, [ebp + 0xc2c]
push edx
lea ecx, [ebp + 0xe38]
push ecx
mov ecx, eax
call fcn.00401360
add esp, 8
test al, al
je 0x4021e5
push 0x7fe
lea edx, [ebp + 0x1e]
push ebx
push edx
mov word [ebp + 0x1c], bx
call sub.MSVCR80.dll_memset
lea eax, [ebp + 0xc2c]
push eax
lea ecx, [ebp + 0xe38]
push ecx
lea edx, [ebp + 0x1c]
push str.Parameters_Syntax_Valid:___s_____s__n
push edx
call dword [sym.imp.MSVCR80.dll__swprintf]
add esp, 0x1c
lea eax, [ebp + 0x1c]
push eax
jmp 0x4021ea
push str.Invalid_Parameter_Syntax.
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call edi
mov esi, dword [sym.imp.MSVCR80.dll__wcsnicmp]
push 0x10
lea ecx, [ebp + 0xe38]
push str._registerConnect
push ecx
call esi
add esp, 0xc
test eax, eax
jne 0x402220
push str.Register_WIA_Events.
call edi
call fcn.00401c70
jmp 0x40249a
push 0x12
lea edx, [ebp + 0xe38]
push str._unregisterConnect
push edx
call esi
add esp, 0xc
test eax, eax
jne 0x402248
push str.Unregister_WIA_Events.
call edi
call fcn.00401ec0
jmp 0x40249a
push 2
lea eax, [ebp + 0xe38]
push 0x4045f8
push eax
call esi
add esp, 0xc
test eax, eax
jne 0x4022cc
push 0x206
lea ecx, [ebp + 0xa26]
push ebx
push ecx
mov word [ebp + 0xa24], bx
call sub.MSVCR80.dll_memset
lea eax, [ebp + 0xa24]
add esp, 0xc
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x402284
mov edx, dword [0x404600]
mov cx, word [0x404604]
mov dword [eax], edx
push 2
lea edx, [ebp + 0xc2c]
mov word [eax + 4], cx
push edx
lea eax, [ebp + 0xa24]
push eax
call dword [sym.imp.MSVCR80.dll_wcsncat]
add esp, 0xc
lea ecx, [ebp + 0xa24]
call fcn.004027a0
jmp 0x40249a
push 0xb
lea ecx, [ebp + 0xe38]
push str._StiDevice:
push ecx
call esi
add esp, 0xc
test eax, eax
jne 0x40230a
push 0xa
lea edx, [ebp + 0xc2c]
push str._StiEvent:
push edx
call esi
add esp, 0xc
test eax, eax
jne 0x40230a
lea ecx, [ebp + 0xe38]
call fcn.004024d0
jmp 0x40249a
push 2
lea eax, [ebp + 0xe38]
push 0x404638
push eax
call esi
add esp, 0xc
test eax, eax
jne 0x402493
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jl 0x402424
push str.We_are_in_the_exe_for_wpd_device_launch
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x20], 0x404824
mov dword [ebp - 0x18], ebx
call edi
lea ecx, [ebp - 0x14]
push ecx
push 1
xor eax, eax
push 4
lea edx, [ebp - 0x20]
push edx
push 0x4044c0
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
call dword [sym.imp.ole32.dll_CoRegisterClassObject]
test eax, eax
jl 0x402473
push str.finished_registering_the_class
call edi
mov esi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x4023c3
cmp eax, 0xffffffff
je 0x402395
lea ecx, [ebp - 0x3c]
push ecx
call esi
lea edx, [ebp - 0x3c]
push edx
call ebx
push str.finished_processing_message
call edi
jmp 0x402395
push 0x206
lea eax, [ebp + 0x81e]
push 0
push eax
mov word [ebp + 0x81c], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [ebp]
lea eax, [ebp - 0x20]
call fcn.00402ba0
lea ecx, [ebp]
push ecx
push 0x404708
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_bool___cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___wchar_t_const___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
add esp, 8
test al, al
je 0x402429
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ole32.dll_CoRevokeClassObject]
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [ebp]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or eax, 0xffffffff
jmp 0x40249c
cmp dword [ebp + 0x18], 8
mov ecx, dword [ebp + 4]
jae 0x402435
lea ecx, [ebp + 4]
lea edx, [ebp + 0x81c]
jmp 0x402440
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x402440
lea ecx, [ebp + 0x81c]
call fcn.004027a0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ole32.dll_CoRevokeClassObject]
lea ecx, [ebp]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push str.not_registering_the_class
call edi
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x40249a
push str.Unregcognized_launch_option.
call edi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1044]
xor ecx, ebp
call fcn.00402f2c
add ebp, 0x1048
mov esp, ebp
pop ebp
ret 0x10