Function at 0x413d30
Capabilities:
Check os version
Delete registry key
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55db46
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1fbc
call fcn.00539330
mov eax, dword [0x5b4450]
xor eax, esp
mov dword [esp + 0x1fb8], eax
push ebx
push esi
push edi
mov eax, dword [0x5b4450]
xor eax, esp
push eax
lea eax, [esp + 0x1fd0]
mov dword fs:[0], eax
xor edi, edi
push edi
lea eax, [esp + 0x18]
mov esi, ecx
push str.Tool_DeletePrinter
push eax
mov dword [esp + 0x34], esi
mov ebx, edx
call fcn.0040ac70
add esp, 0xc
push edi
push ebx
push esi
push str.hWnd___08x__lpszPrinter___s__bJob___d
mov esi, 1
lea ecx, [esp + 0x24]
push esi
push ecx
mov dword [esp + 0x1ff0], edi
call fcn.0040aed0
add esp, 0x18
mov dword [esp + 0x1c], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x50], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], esi
call fcn.00442c4d
mov esi, dword [eax + 4]
push edi
push edi
push 1
mov ecx, ebx
mov dword [esp + 0x30], esi
call fcn.00416630
add esp, 0xc
cmp eax, 1
jne 0x413e21
push 3
push str.return___08x
lea edx, [esp + 0x1c]
push 2
push edx
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x1fd8], 0xffffffff
call fcn.0040ae50
lea eax, [edi + 3]
jmp 0x4149d4
mov dword [esp + 0x60], edi
cmp ebx, edi
je 0x413e3c
mov eax, dword [esi + 0x5f4]
mov ecx, dword [eax + 0xa4]
push ebx
call ecx
mov dword [esp + 0x60], eax
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x20]
push eax
push ebx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x90], edi
mov dword [esp + 0x94], 0xf000c
call dword [sym.imp.WINSPOOL.DRV_OpenPrinterW]
cmp eax, edi
jne 0x413eb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4140c7
push 4
push str.return___08x
lea ecx, [esp + 0x1c]
push 2
push ecx
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x1fd8], 0xffffffff
call fcn.0040ae50
mov eax, 4
jmp 0x4149d4
call fcn.0040bea0
lea edx, [esp + 0x1354]
mov ecx, ebx
mov dword [esp + 0x40], eax
call fcn.00416d70
or esi, 0xffffffff
cmp eax, esi
mov eax, dword [esp + 0x1c]
jne 0x413ef8
push eax
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
push 1
push str.return___08x
lea ecx, [esp + 0x1c]
push 2
push ecx
call fcn.0040aed0
mov dword [esp + 0x1fe8], esi
jmp 0x4149c3
lea edx, [esp + 0x48]
push edx
push edi
push edi
push 3
push edi
push eax
mov dword [esp + 0x60], edi
call dword [sym.imp.WINSPOOL.DRV_GetPrinterDriverW]
test eax, eax
jne 0x413f46
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x413f46
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
push 1
push str.return___08x
lea edx, [esp + 0x1c]
push 2
push edx
call fcn.0040aed0
mov dword [esp + 0x1fe8], esi
jmp 0x4149c3
mov eax, dword [esp + 0x48]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
mov dword [esp + 0x38], esi
cmp esi, edi
je 0x4140bc
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x48]
push eax
push ecx
push esi
push 3
push edi
push edx
call dword [sym.imp.WINSPOOL.DRV_GetPrinterDriverW]
test eax, eax
jne 0x413f95
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
jmp 0x4149a5
mov ecx, dword [esi + 0x1c]
push edi
call fcn.0040c450
add esp, 4
cmp eax, 1
jne 0x41409b
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
lea ecx, [esp + 0x20]
call fcn.004011e0
lea ecx, [esp + 0x10]
call fcn.004011e0
push 2
lea ecx, [esp + 0x24]
mov byte [esp + 0x1fdc], 2
call fcn.00401320
push 3
lea ecx, [esp + 0x14]
call fcn.00401320
call fcn.00442c4d
mov esi, dword [eax + 4]
mov eax, dword [esi + 0x140]
cmp dword [eax + 0x28], edi
je 0x41403e
mov ecx, dword [esp + 0x10]
mov edi, dword [esi + 0x144]
push ecx
call fcn.004062a0
push 0x20
push 0xa
lea ebx, [esp + 0x28]
call fcn.00408110
mov edx, dword [esp + 0x20]
mov edi, dword [esi + 0x144]
push edx
call fcn.004062a0
mov edi, dword [esi + 0x144]
push 0x58acc8
call fcn.004062a0
jmp 0x414055
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
push 0x30
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
push 2
push str.return___08x
lea eax, [esp + 0x1c]
push 2
push eax
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x10]
call fcn.00401500
lea ecx, [esp + 0x20]
call fcn.00401500
lea ecx, [esp + 0x14]
mov dword [esp + 0x1fd8], 0xffffffff
call fcn.0040ae50
mov eax, 2
jmp 0x4149d4
mov ecx, dword [esi + 0xc]
push 1
push 0x40
lea edx, [esp + 0x94]
call fcn.0040ce00
add esp, 8
test eax, eax
jne 0x4140da
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
push 1
push str.return___08x
push 2
lea edx, [esp + 0x20]
push edx
jmp 0x4149b3
push 0x820
lea eax, [esp + 0x520]
push edi
push eax
call fcn.005373f0
lea ecx, [esp + 0x3c]
add esp, 0xc
push ecx
lea edx, [esp + 0x520]
mov ecx, ebx
mov dword [esp + 0x34], edi
call fcn.00409ca0
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x5f8]
mov ecx, dword [esp + 0x20]
add esp, 4
cmp dword [esp + 0x40], 0xa
mov dword [esp + 0x10], eax
jne 0x414169
call fcn.0041eb60
mov ecx, dword [esp + 0x1c]
push ecx
mov dword [esp + 0x14], eax
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
cmp dword [esp + 0x10], edi
jne 0x414150
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
push edx
push edi
push ebx
add eax, 0x5ec
push eax
jmp 0x414186
lea edx, [esp + 0x51c]
mov ecx, ebx
call fcn.00417700
mov edi, ebx
call fcn.004096b0
xor edi, edi
jmp 0x414192
push ecx
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
push edx
push eax
push ebx
add ecx, 0x5ec
push ecx
lea ecx, [esp + 0x52c]
call fcn.0043c240
cmp eax, edi
jne 0x41499e
lea ecx, [esp + 0x2c]
call fcn.004011e0
lea ecx, [esp + 0x20]
call fcn.004011e0
lea ecx, [esp + 0x54]
call fcn.004011e0
lea ecx, [esp + 0x58]
call fcn.004011e0
mov byte [esp + 0x1fd8], 6
mov edx, dword [esi + 4]
push edx
lea ecx, [esp + 0x48]
call fcn.00401210
push 5
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x4c]
mov byte [esp + 0x1fe0], 7
call fcn.00413980
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x1fdc], 8
call fcn.00401520
lea ecx, [esp + 0x28]
mov byte [esp + 0x1fd8], 7
call fcn.00401500
mov ecx, dword [esi + 4]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401210
lea ecx, [esp + 0x10]
call fcn.004011e0
lea edx, [esp + 0x10]
mov byte [esp + 0x1fd8], 0xa
mov eax, dword [esp + 0x4c]
push edx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov edi, esp
push eax
call fcn.004017c0
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.00417dc0
mov edi, dword [esp + 0x2c]
add edi, 0x5e8
push 0x58d4c8
push edi
call fcn.00401940
add esp, 0x10
test al, al
je 0x414287
mov ecx, dword [esi + 4]
lea eax, [esp + 0x8c]
push eax
push ebx
call fcn.00421040
add esp, 8
jmp 0x41448d
push ebx
lea ecx, [esp + 0x38]
call fcn.00401210
push 2
push 0x58d4d0
push ebx
mov byte [esp + 0x1fe4], 0xb
call fcn.00534305
add esp, 0xc
test eax, eax
jne 0x414390
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx - 0xc]
dec eax
push eax
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x3c]
call fcn.00413980
mov esi, dword [esp + 0x24]
push eax
add esi, 0xf8
lea eax, [esp + 0x2c]
push esi
push eax
mov byte [esp + 0x1fe4], 0xc
call fcn.00413a80
add esp, 0xc
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x1fdc], 0xd
call fcn.00401520
lea ecx, [esp + 0x28]
call fcn.00401500
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1fd8], 0xb
call fcn.00401500
push esi
lea ecx, [esp + 0x24]
call fcn.00401520
mov esi, dword [esp + 0x2c]
push esi
push SysReAllocString
call fcn.00414fb0
add esp, 8
push esi
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push 0x5c
lea ecx, [esp + 0x30]
call fcn.00404d90
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x34]
call fcn.00413a00
mov byte [esp + 0x1fd8], 0xe
mov edi, dword [esp + 0x28]
mov esi, SysReAllocString
call fcn.00415170
cmp eax, 1
jne 0x41437a
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea ecx, [esp + 0x28]
mov byte [esp + 0x1fd8], 0xb
call fcn.00401500
jmp 0x414446
push ebx
lea ecx, [esp + 0x2c]
call fcn.00401210
mov esi, dword [esp + 0x24]
push eax
lea edx, [esi + 0xf4]
push edx
lea eax, [esp + 0x44]
push eax
mov byte [esp + 0x1fe4], 0xf
call fcn.00413a80
add esp, 0xc
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x1fdc], 0x10
call fcn.00401520
lea ecx, [esp + 0x3c]
call fcn.00401500
lea ecx, [esp + 0x28]
mov byte [esp + 0x1fd8], 0xb
call fcn.00401500
add esi, 0xf8
push esi
lea ecx, [esp + 0x24]
call fcn.00401520
mov esi, dword [esp + 0x2c]
push esi
push SysReAllocString
call fcn.00414fb0
add esp, 8
push esi
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push str.CAPT
push edi
call fcn.00401940
add esp, 8
test al, al
je 0x414446
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x414446
mov ecx, dword [esp + 0x24]
cmp dword [ecx + 0x62c], 0
je 0x414446
mov esi, ebx
call fcn.004242a0
mov edi, dword [esp + 0x20]
mov esi, SysReAllocString
call fcn.00415170
cmp eax, 1
jne 0x414478
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov edi, str.SOFTWARECANON_
call fcn.00415170
cmp eax, 1
jne 0x414478
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea ecx, [esp + 0x34]
mov byte [esp + 0x1fd8], 0xa
call fcn.00401500
mov esi, dword [esp + 0x38]
mov edx, dword [esi + 4]
push ebx
push edx
call fcn.00414a00
add esp, 8
test eax, eax
jne 0x414794
push 0x208
xor edi, edi
lea eax, [esp + 0x318]
push edi
push eax
call fcn.005373f0
mov edx, dword [esp + 0x44]
mov eax, dword [edx + 4]
add esp, 0xc
lea ecx, [esp + 0x314]
push ecx
push eax
call fcn.004178b0
push 0x206
lea edx, [esp + 0x11a]
xor ecx, ecx
push edi
push edx
mov dword [esp + 0x50], eax
mov word [esp + 0x120], cx
call fcn.005373f0
add esp, 0x14
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
mov esi, dword [esp + 0x24]
mov byte [esp + 0x1fd8], 0x11
cmp dword [esi + 0x870], edi
je 0x414535
call fcn.0040e2f0
mov ecx, str.SPOOLER
call fcn.0040e4e0
call fcn.00412fb0
xor ecx, ecx
cmp eax, 0xb
sete cl
mov dword [esi + 0x870], ecx
lea esi, [esp + 0x70]
call fcn.00408360
push 0
lea edx, [esp + 0x110]
mov ecx, esi
mov esi, dword [esp + 0x3c]
push 0
push edx
mov edx, dword [esi + 4]
call fcn.0041bdc0
add esp, 0xc
call fcn.0041dec0
sub eax, 0
je 0x41456f
sub eax, 2
jne 0x41456f
lea esi, [eax + 5]
jmp 0x414571
mov esi, dword [esi]
mov edi, dword [esp + 0x24]
lea eax, [edi + 0x5e8]
push str.CAPT
push eax
call fcn.00401940
add esp, 8
test al, al
je 0x4145a3
cmp dword [edi + 0x62c], 0
je 0x4145a3
call fcn.00422180
test eax, eax
jne 0x4145a3
mov dword [esp + 0x64], eax
mov ecx, dword [edi + 0x5f8]
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x51c]
push eax
mov eax, dword [edx + 4]
push ecx
push eax
lea ecx, [edi + 0x5ec]
push ecx
mov ecx, dword [esp + 0x40]
mov edx, esi
call fcn.0043bcb0
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
mov dword [esp + 0x50], ebx
je 0x41463a
mov ecx, 0x58a8c8
lea eax, [esp + 0x10c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41460b
test dx, dx
je 0x414607
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41460b
add eax, 4
add ecx, 4
test dx, dx
jne 0x4145e5
xor eax, eax
jmp 0x414610
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x41463a
push 0x58a8c8
mov esi, 1
lea edx, [esp + 0x110]
push esi
push edx
lea ecx, [esp + 0x7c]
mov edx, 0x58a8c8
call fcn.0041bdc0
add esp, 0xc
jmp 0x41463f
mov esi, 1
cmp ebx, esi
jne 0x41467d
cmp dword [esp + 0x40], 0xa
jne 0x414664
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 4]
mov edx, dword [edi + 0x170]
lea ecx, [edi + 0x168]
push eax
push edx
call fcn.004422ff
cmp dword [esp + 0x3c], 0
jne 0x414683
lea ecx, [esp + 0x314]
call fcn.00417a90
mov dword [esp + 0x6c], esi
jmp 0x414683
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x30], esi
mov dword [esp + 0x68], esi
lea esi, [esp + 0x70]
mov byte [esp + 0x1fd8], 0xa
call fcn.00408250
mov ecx, dword [edi + 0x140]
cmp dword [ecx + 0x5c], 0
jne 0x414794
mov edx, dword [esp + 0x38]
mov ecx, dword [edx + 4]
call fcn.0040d250
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4146fc
call fcn.0040d790
lea eax, [esp + 0x40]
push eax
push 0x2001f
push 0
push str.SOFTWARECanonVDCSETUPVDCUser
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x54], 0
call esi
test eax, eax
jne 0x4146fc
mov ecx, dword [esp + 0x40]
push ecx
mov dword [esp + 0x34], eax
call edi
call fcn.00410f60
test eax, eax
je 0x4147a8
call fcn.00410ba0
xor edx, edx
push 0x616
push edx
lea eax, [esp + 0xd46]
push eax
mov dword [esp + 0x40], 0
mov word [esp + 0xd48], dx
call fcn.005373f0
add esp, 0xc
push str.DIASUser
push str.SOFTWARECanonDIASSETUP
lea ecx, [esp + 0xd44]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea edx, [esp + 0x34]
push edx
push 0x2001f
push 0
lea eax, [esp + 0xd48]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x4147a8
mov ecx, dword [esp + 0x34]
xor esi, esi
push ecx
mov dword [esp + 0x60], esi
call edi
mov dword [esp + 0x34], esi
call fcn.00421d40
mov edi, eax
mov esi, 1
jmp 0x4147b8
cmp dword [esp + 0x68], 0
mov ebx, dword [esp + 0x50]
mov esi, 1
mov dword [esp + 0x30], esi
je 0x4147b6
call fcn.00421d40
mov edi, eax
mov esi, 1
jmp 0x4147b8
mov edi, esi
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [esp + 0x60], esi
jne 0x4147f3
lea ecx, [esp + 0x1764]
call fcn.004168b0
cmp eax, esi
jne 0x4147f3
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x5f4]
mov eax, dword [ecx + 0x88]
lea edx, [esp + 0x1764]
push edx
call eax
cmp dword [esp + 0x6c], esi
jne 0x414808
call fcn.0040e2f0
mov ecx, str.SPOOLER
call fcn.0040e4e0
mov eax, dword [esp + 0x10]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x40], esp
mov esi, esp
push eax
call fcn.004017c0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004183b0
add esp, 4
test ebx, ebx
jne 0x4148a1
push 6
push str.return___08x
lea ecx, [esp + 0x1c]
push 2
push ecx
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x10]
call fcn.00401500
lea ecx, [esp + 0x4c]
call fcn.00401500
lea ecx, [esp + 0x44]
call fcn.00401500
lea ecx, [esp + 0x58]
call fcn.00401500
lea ecx, [esp + 0x54]
call fcn.00401500
lea ecx, [esp + 0x20]
call fcn.00401500
lea ecx, [esp + 0x2c]
call fcn.00401500
lea ecx, [esp + 0x14]
mov dword [esp + 0x1fd8], 0xffffffff
call fcn.0040ae50
lea eax, [ebx + 6]
jmp 0x4149d4
cmp dword [esp + 0x30], 0
je 0x41492e
cmp dword [esp + 0x5c], 0
je 0x41492e
test edi, edi
je 0x41492e
cmp dword [esp + 0x64], 0
je 0x41492e
push 0
push str.return___08x
lea edx, [esp + 0x1c]
push 2
push edx
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x10]
call fcn.00401500
lea ecx, [esp + 0x4c]
call fcn.00401500
lea ecx, [esp + 0x44]
call fcn.00401500
lea ecx, [esp + 0x58]
call fcn.00401500
lea ecx, [esp + 0x54]
call fcn.00401500
lea ecx, [esp + 0x20]
call fcn.00401500
lea ecx, [esp + 0x2c]
call fcn.00401500
lea ecx, [esp + 0x14]
mov dword [esp + 0x1fd8], 0xffffffff
call fcn.0040ae50
xor eax, eax
jmp 0x4149d4
push 5
push str.return___08x
lea eax, [esp + 0x1c]
push 2
push eax
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x10]
call fcn.00401500
lea ecx, [esp + 0x4c]
call fcn.00401500
lea ecx, [esp + 0x44]
call fcn.00401500
lea ecx, [esp + 0x58]
call fcn.00401500
lea ecx, [esp + 0x54]
call fcn.00401500
lea ecx, [esp + 0x20]
call fcn.00401500
lea ecx, [esp + 0x2c]
call fcn.00401500
lea ecx, [esp + 0x14]
mov dword [esp + 0x1fd8], 0xffffffff
call fcn.0040ae50
mov eax, 5
jmp 0x4149d4
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 1
push str.return___08x
push 2
lea ecx, [esp + 0x20]
push ecx
call fcn.0040aed0
mov dword [esp + 0x1fe8], 0xffffffff
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.0040ae50
mov eax, 1
mov ecx, dword [esp + 0x1fd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1fb8]
xor ecx, esp
call fcn.005337cb
mov esp, ebp
pop ebp
ret