Function at 0x140004270
Capabilities:
Check os version
Set current directory

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x340]
sub rsp, 0x440
mov rax, qword [0x14001a128]
xor rax, rsp
mov qword [rbp + 0x330], rax
mov rdi, rcx
lea rcx, str.CMFNSS6.DLL
mov rbx, r8
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x14001b638], rax
test rax, rax
jne 0x1400042c2
lea ecx, [rax + 0xb]
call fcn.140005bd0
xor eax, eax
jmp 0x1400047cd
mov qword [rsp + 0x468], rsi
xor esi, esi
mov word [0x14001b420], si
cmp word [rbx], si
je 0x1400042f5
lea rdx, str.DEMONSTRATION
mov rcx, rbx
call fcn.140002f90
test eax, eax
je 0x1400042f5
call fcn.140003660
jmp 0x1400047c3
lea rcx, [rbp]
xor edx, edx
mov r8d, 0x114
call fcn.140007500
lea rcx, [rbp]
mov dword [rbp], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov r11d, dword [rbp + 0x10]
cmp r11d, 1
je 0x1400047a0
cmp r11d, 2
jne 0x140004335
cmp dword [rbp + 4], 5
jb 0x1400047a0
mov edx, 2
lea r9, str.Canon_MF_Network_Scanner_Selector
xor ecx, ecx
mov r8d, edx
mov qword [rbp - 0x40], rsi
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov rbx, rax
test rax, rax
je 0x1400047b6
cmp rax, 0xffffffffffffffff
je 0x1400047b6
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140004381
lea rcx, str.hSemaphore:_Already_two_processes_are_running.
jmp 0x1400047b1
lea rdx, [rbp + 0x120]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rbp + 0x120]
mov edx, 0x5c
call fcn.1400083d0
lea rcx, [rbp + 0x120]
test rax, rax
je 0x1400043c2
mov edx, 0x5c
call fcn.1400083d0
mov word [rax], si
jmp 0x1400043e6
mov edx, 0x3a
call fcn.1400083b0
test rax, rax
je 0x1400043e6
lea rcx, [rbp + 0x120]
mov edx, 0x3a
call fcn.1400083b0
mov word [rax + 4], si
lea rcx, [rbp + 0x120]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rdx, [rbp + 0x120]
lea rcx, str.SetCurrentDir:_s
call fcn.1400057b0
mov qword [0x14001b630], rdi
call fcn.140003110
test eax, eax
je 0x14000466a
lea rcx, str.TaskbarCreated
call qword [sym.imp.USER32.dll_RegisterWindowMessageW]
mov dword [0x14001b678], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x14001b678]
lea rcx, str.RegisterWindowMessage__d___d_
mov r8d, eax
call fcn.1400057b0
call fcn.1400057d0
mov rcx, qword [0x14001b660]
mov edx, 0x7a120
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, [0x14001b680]
call fcn.140004210
mov rcx, qword [0x14001b660]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea rdx, [0x14001a090]
lea rcx, [0x14001a08c]
call fcn.1400058b0
cmp dword [0x14001a08c], esi
je 0x14000466a
lea rcx, [rbp - 0x10]
mov qword [rsp + 0x478], r12
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx r9d, word [rbp - 2]
movzx r8d, word [rbp - 4]
movzx edx, word [rbp - 6]
lea rcx, str.Befor
call fcn.1400057b0
mov ecx, dword [0x14001a090]
lea rdx, [0x14001b680]
call fcn.140006a70
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx r9d, word [rbp - 0x12]
movzx r8d, word [rbp - 0x14]
movzx edx, word [rbp - 0x16]
lea rcx, str.After
call fcn.1400057b0
lea r12, str.MF_Network_Scanner_Selector_Wnd
lea r8, [rsp + 0x60]
mov rdx, r12
mov rcx, rdi
call qword [sym.imp.USER32.dll_GetClassInfoExW]
test eax, eax
jne 0x140004583
lea r8d, [rax + 0x50]
lea rcx, [rsp + 0x60]
xor edx, edx
call fcn.140007500
lea rax, [0x140003c00]
xor ecx, ecx
mov dword [rsp + 0x60], 0x50
mov dword [rsp + 0x64], 3
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x68], rax
call qword [sym.imp.GDI32.dll_GetStockObject]
mov edx, 0x7f00
xor ecx, ecx
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x70], rax
call qword [sym.imp.USER32.dll_LoadIconW]
mov edx, 0x7f00
xor ecx, ecx
mov qword [rbp - 0x80], rax
call qword [sym.imp.USER32.dll_LoadCursorW]
lea rcx, [rsp + 0x60]
mov qword [rbp - 0x78], rax
call qword [sym.imp.USER32.dll_RegisterClassExW]
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 1
mov r9d, 0x80000000
mov r8, r12
mov rdx, r12
xor ecx, ecx
mov dword [rsp + 0x28], 0x80000000
mov dword [rsp + 0x20], 0x80000000
call qword [sym.imp.USER32.dll_CreateWindowExW]
lea rcx, [rbp - 0x50]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [0x14001b648], rax
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x14000461a
nop dword [rax + rax]
lea rcx, [rbp - 0x50]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp - 0x50]
call qword [sym.imp.USER32.dll_DispatchMessageW]
lea rcx, [rbp - 0x50]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x1400045f0
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.USER32.dll_UnregisterClassW]
mov edx, dword [0x14001a090]
mov ecx, dword [0x14001a08c]
lea r8, [0x14001b680]
call fcn.140006860
mov rcx, qword [0x14001b660]
mov edx, 0x7a120
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call fcn.140002720
mov rcx, qword [0x14001b660]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov r12, qword [rsp + 0x478]
mov rcx, qword [0x14001b668]
test rcx, rcx
je 0x140004687
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [0x14001b668], rsi
mov rcx, qword [0x14001b670]
test rcx, rcx
je 0x1400046a4
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [0x14001b670], rsi
mov rax, qword [0x14001b658]
test rax, rax
je 0x1400046cd
cmp rax, 0xffffffffffffffff
je 0x1400046cd
xor edx, edx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 2]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call rax
mov rcx, qword [0x14001b640]
test rcx, rcx
je 0x140004718
cmp rcx, 0xffffffffffffffff
je 0x140004700
lea rdx, str.UninitializeScanUtility
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400046f9
cmp rax, 0xffffffffffffffff
je 0x1400046f9
call rax
mov rcx, qword [0x14001b640]
test rcx, rcx
je 0x140004718
cmp rcx, 0xffffffffffffffff
je 0x140004718
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x14001b640], rsi
mov rcx, qword [0x14001b660]
test rcx, rcx
je 0x140004737
cmp rcx, 0xffffffffffffffff
je 0x140004737
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14001b660], rsi
mov rcx, qword [0x14001b638]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.ole32.dll_CoUninitialize]
lea rcx, [0x14001b420]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x14000479b
nop word [rax + rax]
lea rcx, [0x14001b420]
call qword [sym.imp.KERNEL32.dll_GlobalFindAtomW]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GlobalDeleteAtom]
test ax, ax
jne 0x140004780
mov eax, dword [rbp - 0x40]
jmp 0x1400047c5
mov ecx, 0xa
call fcn.140005c70
lea rcx, str.Old_OS
call fcn.1400057b0
mov rcx, qword [0x14001b638]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov rsi, qword [rsp + 0x468]
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.140007330
add rsp, 0x440
pop rdi
pop rbx
pop rbp
ret