Function at 0x402150
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x3a8
mov eax, dword [0x458070]
xor eax, esp
mov dword [esp + 0x3a4], eax
mov eax, dword [ebp + 0x10]
push esi
push edi
push eax
push str._nCommandLine_Args:__s_n
mov dword [esp + 0x11c], eax
mov dword [esp + 0x1c], 0
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
lea ecx, [esp + 0x130]
xorps xmm0, xmm0
movaps xmmword [esp + 0x130], xmm0
movaps xmmword [esp + 0x140], xmm0
call fcn.00415ee0
push 0x44
lea eax, [esp + 0x15c]
push 0
push eax
call fcn.004225c0
add esp, 0xc
mov dword [esp + 0x2c], 0xf
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], 0
mov byte [esp + 0x18], 0
push 0xf
push str.General_options
call fcn.00403490
mov ecx, dword [0x44599c]
mov eax, ecx
shr eax, 1
push eax
push ecx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x164]
call fcn.00417cd0
lea ecx, [esp + 0x18]
call fcn.00402fa0
push 0x88
call fcn.004102b4
add esp, 4
mov esi, eax
push 0x88
push 0
push esi
call fcn.004225c0
add esp, 8
mov ecx, esi
call fcn.00406c60
push 0x88
mov dword [esp + 0x11c], eax
call fcn.004102b4
add esp, 4
mov esi, eax
push 0x88
push 0
push esi
call fcn.004225c0
add esp, 8
mov ecx, esi
call fcn.00406c60
push 0x88
mov edi, eax
call fcn.004102b4
add esp, 4
mov esi, eax
push 0x88
push 0
push esi
call fcn.004225c0
add esp, 8
mov ecx, esi
call fcn.00406c60
push str.Model
push dword [esp + 0x11c]
push str.Model
push str.HostName
push edi
push str.Host
push str.Name_of_Printer
push eax
push str.Name
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x180]
call fcn.00418a50
mov ecx, eax
call fcn.004182e0
mov ecx, eax
call fcn.004182e0
mov ecx, eax
call fcn.004182e0
mov edi, dword [esp + 0x114]
xor eax, eax
xorps xmm0, xmm0
mov dword [esp + 0x12c], 0
movq qword [esp + 0x124], xmm0
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], 0
mov word [esp + 0x18], ax
cmp word [edi], ax
jne 0x402316
xor ecx, ecx
jmp 0x40232f
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402320
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [esp + 0x20]
call fcn.00403300
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x128]
push eax
call fcn.00419ef0
mov eax, dword [esp + 0x34]
add esp, 8
cmp eax, 8
jb 0x402367
inc eax
lea ecx, [esp + 0x18]
push eax
push dword [esp + 0x1c]
call fcn.00401550
lea edx, [esp + 0x124]
lea ecx, [esp + 0x18]
call fcn.00405fc0
push eax
lea ecx, [esp + 0xac]
call fcn.0041b150
lea ecx, [esp + 0x18]
call fcn.00403230
lea eax, [esp + 0x158]
push eax
lea ecx, [esp + 0xac]
call fcn.0041ed00
lea eax, [esp + 0x158]
mov dword [esp + 0x108], eax
lea ecx, [esp + 0xa8]
lea eax, [esp + 0x130]
push eax
lea eax, [esp + 0x84]
push eax
call fcn.004057d0
push eax
call fcn.00416c60
add esp, 8
lea ecx, [esp + 0x90]
call fcn.00403150
lea ecx, [esp + 0x80]
call fcn.004030f0
lea ecx, [esp + 0xa8]
call fcn.00402ca0
push 0
push 0
mov dword [esp + 0x18], 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov esi, eax
test esi, esi
jns 0x402424
push esi
push str.DeviceFind:CoInitializeEx_failed__error__08.8lx_n
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
lea eax, [esp + 0x120]
push eax
push edi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [esp + 0x14], eax
test esi, esi
js 0x4029ff
push 0x14
call fcn.004102b4
mov edi, eax
xorps xmm0, xmm0
xor esi, esi
mov dword [esp + 0x38], edi
add esp, 4
mov dword [esp + 0x30], esi
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov dword [edi], vtable.CNamespaceWalkCB.0
mov word [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 1
mov dword [edi + 0x10], 0
cmp dword [esp + 0x13c], esi
jbe 0x4027ed
push str.Name
lea ecx, [esp + 0x3c]
call fcn.00403090
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x140]
call fcn.00405bc0
push dword [esp + 0x120]
mov esi, 1
push dword [esp + 0x20]
mov dword [esp + 0x18], esi
push dword [esp + 0x20]
call fcn.004064a0
add esp, 0xc
test eax, eax
je 0x40251b
push str.Name
lea ecx, [esp + 0x54]
call fcn.00403090
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x134]
call fcn.004160f0
mov ecx, eax
call fcn.00407050
mov esi, 3
mov ecx, eax
mov dword [esp + 0x10], esi
call fcn.00405b90
test al, al
je 0x40251b
mov byte [esp + 0xf], 1
mov eax, esi
jmp 0x402524
mov eax, dword [esp + 0x10]
mov byte [esp + 0xf], 0
test al, 2
je 0x40253c
and eax, 0xfffffffd
lea ecx, [esp + 0x50]
mov dword [esp + 0x10], eax
call fcn.00402fa0
mov eax, dword [esp + 0x10]
and eax, 0xfffffffe
lea ecx, [esp + 0x38]
mov dword [esp + 0x10], eax
call fcn.00402fa0
cmp byte [esp + 0xf], 0
je 0x4025b3
push 0x1c
call fcn.004102b4
add esp, 4
lea ecx, [esp + 0x38]
mov esi, eax
push str.Name
call fcn.00403090
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x134]
call fcn.004160f0
mov ecx, eax
call fcn.00407050
push eax
mov ecx, esi
call fcn.004011e0
mov esi, eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], esi
call fcn.00402fa0
mov byte [edi + 5], 1
mov dword [edi + 0x10], esi
mov dword [esp + 0x11c], 0
jmp 0x402826
push str.Model
lea ecx, [esp + 0x84]
call fcn.00403090
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x80]
push eax
lea eax, [esp + 0x1c]
or esi, 8
push eax
lea ecx, [esp + 0x140]
call fcn.00405bc0
push dword [esp + 0x120]
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.004064a0
add esp, 0xc
test eax, eax
je 0x402637
push str.Model
lea ecx, [esp + 0x6c]
call fcn.00403090
lea eax, [esp + 0x68]
or esi, 0x10
push eax
lea ecx, [esp + 0x134]
mov dword [esp + 0x14], esi
call fcn.004160f0
mov ecx, eax
call fcn.00407050
mov ecx, eax
call fcn.00405b90
test al, al
jne 0x4026b5
push str.Host
lea ecx, [esp + 0x54]
call fcn.00403090
lea eax, [esp + 0x50]
or esi, 0x20
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x14], esi
push eax
lea ecx, [esp + 0x140]
call fcn.00405bc0
push dword [esp + 0x120]
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.004064a0
add esp, 0xc
test eax, eax
je 0x4026bc
push str.Host
lea ecx, [esp + 0x3c]
call fcn.00403090
lea eax, [esp + 0x38]
or esi, 0x40
push eax
lea ecx, [esp + 0x134]
mov dword [esp + 0x14], esi
call fcn.004160f0
mov ecx, eax
call fcn.00407050
mov ecx, eax
call fcn.00405b90
test al, al
je 0x4026bc
mov byte [esp + 0xf], 1
jmp 0x4026c1
mov byte [esp + 0xf], 0
mov eax, dword [esp + 0x10]
test al, 0x40
je 0x4026dd
and eax, 0xffffffbf
lea ecx, [esp + 0x38]
mov dword [esp + 0x10], eax
call fcn.00402fa0
mov eax, dword [esp + 0x10]
test al, 0x20
je 0x4026f5
and eax, 0xffffffdf
lea ecx, [esp + 0x50]
mov dword [esp + 0x10], eax
call fcn.00402fa0
mov eax, dword [esp + 0x10]
test al, 0x10
je 0x402702
lea ecx, [esp + 0x68]
call fcn.00402fa0
lea ecx, [esp + 0x80]
call fcn.00402fa0
cmp byte [esp + 0xf], 0
je 0x4027b1
push 0x34
call fcn.004102b4
add esp, 4
lea ecx, [esp + 0x68]
mov edi, eax
push str.Host
call fcn.00403090
push str.Model
lea ecx, [esp + 0x84]
call fcn.00403090
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x134]
call fcn.004160f0
mov ecx, eax
call fcn.00407050
mov esi, eax
lea ecx, [esp + 0x130]
lea eax, [esp + 0x80]
push eax
call fcn.004160f0
mov ecx, eax
call fcn.00407050
push esi
push eax
mov ecx, edi
call fcn.004012a0
mov esi, eax
lea ecx, [esp + 0x80]
mov dword [esp + 0x30], esi
call fcn.00402fa0
lea ecx, [esp + 0x68]
call fcn.00402fa0
mov edi, dword [esp + 0x34]
mov dword [edi + 0x10], esi
mov dword [esp + 0x11c], 0
jmp 0x402826
push str.Usage:_ExecutableName____Name__device_friendly_name______Model__Name____Host__HostName______n
push ecx
call fcn.0040b2d0
add esp, 4
push eax
call fcn.0040b380
add esp, 8
push str.no_device_name_given__devices_will_be_listed_n
push ecx
call fcn.0040b2d0
add esp, 4
push eax
call fcn.0040b380
add esp, 8
xor esi, esi
mov dword [edi + 0x10], esi
mov dword [esp + 0x11c], esi
jmp 0x402826
push str.Usage:_ExecutableName____Name__device_friendly_name______Model__Name____Host__HostName______n
push ecx
call fcn.0040b2d0
add esp, 4
push eax
call fcn.0040b380
add esp, 8
push str.no_device_name_given__devices_will_be_listed_n
push ecx
call fcn.0040b2d0
add esp, 4
push eax
call fcn.0040b380
mov byte [edi + 5], 1
add esp, 8
mov dword [esp + 0x11c], esi
lea eax, [esp + 0x11c]
push eax
push 0x44f430
push 1
push 0
push 0x44f420
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x40285a
push eax
push str.DeviceFind:CoCreateInstance_failed__error__08.8lx_n
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
mov eax, dword [esp + 0x11c]
lea edx, [esp + 0x1a0]
push 0x104
push edx
push str.Microsoft.DevicesAndPrinters
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov esi, eax
test esi, esi
jns 0x402893
push esi
push str.DeviceFind:spControlPanel__GetPath_failed__error__08.8lx_n
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
mov dword [esp + 0x118], 0
test esi, esi
js 0x4028d9
lea eax, [esp + 0x118]
push eax
push 0x44f410
push 0
lea eax, [esp + 0x1ac]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateItemFromParsingName]
mov esi, eax
test esi, esi
jns 0x4028d9
push esi
push str.DeviceFind:SHCreateItemFromIDList_failed__error__08.8lx_n
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
mov dword [esp + 0x114], 0
test esi, esi
js 0x4029ac
lea eax, [esp + 0x114]
push eax
push 0x44f400
push 1
push 0
push 0x44f3f0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x402925
push eax
push str.DeviceFind:CoCreateInstance_NamespaceWalker_failed__error__08.8lx_n
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
jmp 0x4029ac
mov eax, dword [esp + 0x114]
push edi
push 1
push 0x405
push dword [esp + 0x124]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
test eax, eax
jns 0x402959
push eax
push str.DeviceFind:spWalk__Walk_failed__error__08.8lx_n
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
cmp byte [edi + 5], 0
jne 0x4029ac
cmp byte [edi + 4], 0
jne 0x4029ac
push str.device_not_found_n
push ecx
call fcn.0040b2d0
add esp, 4
push eax
call fcn.0040b380
mov eax, dword [esp + 0x1c]
add esp, 8
push dword [eax]
push str.run__s_without_input_parameter_to_list_all_devices_n
call fcn.0040b2d0
push eax
call fcn.0040b380
add esp, 0xc
push str.note_Device_Stage_devices_will_appear_as_ShellFolder_n
push ecx
call fcn.0040b2d0
add esp, 4
push eax
call fcn.0040b380
add esp, 8
mov eax, dword [edi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [edi]
push edi
call dword [eax + 8]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4029cc
push 4
push eax
call fcn.00410577
add esp, 8
mov eax, dword [esp + 0x114]
test eax, eax
je 0x4029dd
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x118]
test eax, eax
je 0x4029ee
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x11c]
test eax, eax
je 0x4029ff
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [esp + 0x124]
test eax, eax
je 0x402a7f
push dword [esp + 0x120]
lea ecx, [esp + 0x128]
push ecx
push dword [esp + 0x130]
push eax
call fcn.00406660
mov ecx, dword [esp + 0x13c]
mov eax, 0x2aaaaaab
mov esi, dword [esp + 0x134]
add esp, 0x10
sub ecx, esi
imul ecx
lea ecx, [esp + 0x124]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push esi
call fcn.00403960
mov dword [esp + 0x124], 0
mov dword [esp + 0x128], 0
mov dword [esp + 0x12c], 0
lea ecx, [esp + 0x158]
call fcn.00402ba0
mov eax, dword [esp + 0x148]
lea ecx, [esp + 0x148]
push eax
push dword [eax]
lea eax, [esp + 0x1c]
push eax
call fcn.00403d20
push dword [esp + 0x148]
call fcn.004102e7
mov eax, dword [esp + 0x144]
lea ecx, [esp + 0x144]
add esp, 4
push eax
push dword [eax]
lea eax, [esp + 0x1c]
push eax
call fcn.004039c0
push dword [esp + 0x140]
call fcn.004102e7
mov ecx, dword [esp + 0x13c]
lea eax, [esp + 0x18]
add esp, 4
push ecx
push dword [ecx]
lea ecx, [esp + 0x140]
push eax
call fcn.00403a70
push dword [esp + 0x138]
call fcn.004102e7
mov ecx, dword [esp + 0x3b0]
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
xor ecx, esp
call fcn.004102a3
mov esp, ebp
pop ebp
ret 0x10