Function at 0x401c10
Capabilities:
Check if file exists
Copy file
Create directory
Enumerate files on windows
Get common file path
Get file attributes
Set file attributes

Disassembly:
sub esp, 0xe8c
mov eax, dword [0x40f004]
xor eax, esp
mov dword [esp + 0xe84], eax
push ebx
push ebp
push esi
push edi
push 0x26
lea edi, [esp + 0x87c]
call fcn.00401340
push str.Canon
mov eax, edi
push eax
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x478]
call fcn.00401030
add esp, 0x10
test eax, eax
jl 0x401d0d
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, ebx
push ecx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 0xffffffff
jne 0x401c84
push 0
mov edx, ebx
push edx
call edi
test eax, eax
je 0x401d0d
push str.CanonIJEREG
lea eax, [esp + 0x87c]
push eax
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x474]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
mov ecx, ebx
push ecx
call esi
cmp eax, 0xffffffff
jne 0x401cc3
push 0
mov edx, ebx
push edx
call edi
test eax, eax
je 0x401d0d
push 0x4121e0
push str.CanonIJEREG
lea eax, [esp + 0x880]
push eax
push str._s_s_s
mov ecx, 0x104
lea ebx, [esp + 0x478]
call fcn.00401030
add esp, 0x10
test eax, eax
jl 0x401d0d
mov ecx, ebx
push ecx
call esi
cmp eax, 0xffffffff
jne 0x401d14
push 0
mov edx, ebx
push edx
call edi
test eax, eax
jne 0x401d14
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x40239f
mov ecx, dword [0x4123e0]
push 0x104
lea eax, [esp + 0xc8c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0xc88]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.IJEREG.exe
lea eax, [esp + 0xc8c]
push eax
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x67c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push str.IJEREG.exe
lea ecx, [esp + 0x46c]
push ecx
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x26c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push 0
mov edx, ebx
push edx
lea eax, [esp + 0x678]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x401dfa
lea ecx, [esp + 0xa80]
push ecx
push eax
push str.IJEREG
lea edx, [esp + 0x474]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x401d0d
lea eax, [esp + 0x670]
push eax
lea esi, [esp + 0xa84]
mov edi, ebx
call fcn.004014b0
add esp, 4
test eax, eax
je 0x401d0d
or dword [0x4123e4], 0x80
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
lea ecx, [esp + 0x264]
push ecx
call ebp
push str.IJRMF.exe
lea edx, [esp + 0xc8c]
push edx
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x67c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push str.IJRMF.exe
lea eax, [esp + 0x46c]
push eax
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x26c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push 0
mov ecx, ebx
push ecx
lea edx, [esp + 0x678]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x401ed2
lea eax, [esp + 0xa80]
push eax
push 0
push str.IJEREG
lea ecx, [esp + 0x474]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x401d0d
lea edx, [esp + 0x670]
push edx
lea esi, [esp + 0xa84]
mov edi, ebx
call fcn.004014b0
add esp, 4
test eax, eax
je 0x401d0d
or dword [0x4123e4], 0x80
push 0x80
lea eax, [esp + 0x264]
push eax
call ebp
push str.UNINST.EXE
lea ecx, [esp + 0xc8c]
push ecx
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x67c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push str.UNINST.EXE
lea edx, [esp + 0x46c]
push edx
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x26c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push 0
mov eax, ebx
push eax
lea ecx, [esp + 0x678]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x401fa3
lea edx, [esp + 0xa80]
push edx
push eax
push str.IJEREG
lea eax, [esp + 0x474]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x401d0d
lea ecx, [esp + 0x670]
push ecx
lea esi, [esp + 0xa84]
mov edi, ebx
call fcn.004014b0
add esp, 4
test eax, eax
je 0x401d0d
or dword [0x4123e4], 0x80
push 0x80
lea edx, [esp + 0x264]
push edx
call ebp
push str.CCL.dll
lea eax, [esp + 0xc8c]
push eax
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x67c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push str.CCL.dll
lea ecx, [esp + 0x46c]
push ecx
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x26c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push 0
mov edx, ebx
push edx
lea eax, [esp + 0x678]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x402074
lea ecx, [esp + 0xa80]
push ecx
push eax
push str.IJEREG
lea edx, [esp + 0x474]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x401d0d
lea eax, [esp + 0x670]
push eax
lea esi, [esp + 0xa84]
mov edi, ebx
call fcn.004014b0
add esp, 4
test eax, eax
je 0x401d0d
or dword [0x4123e4], 0x80
push 0x80
lea ecx, [esp + 0x264]
push ecx
call ebp
lea edx, [esp + 0xc88]
push edx
push str._s.DLL
mov ecx, 0x104
lea ebx, [esp + 0x880]
call fcn.00401030
add esp, 8
test eax, eax
jl 0x401d0d
lea eax, [esp + 0x10]
push eax
mov ecx, ebx
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4021c0
test byte [esp + 0x10], 0x10
jne 0x4021a5
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0xc8c]
push eax
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x67c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x4023b8
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x46c]
push edx
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x26c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x4023b8
push 0
mov eax, ebx
push eax
lea ecx, [esp + 0x678]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x402192
lea edx, [esp + 0xa80]
push edx
push eax
push str.IJEREG
lea eax, [esp + 0x474]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4023b8
lea ecx, [esp + 0x670]
push ecx
lea esi, [esp + 0xa84]
mov edi, ebx
call fcn.004014b0
add esp, 4
test eax, eax
je 0x4023b8
or dword [0x4123e4], 0x80
push 0x80
lea edx, [esp + 0x264]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x10]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4020c5
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
push str.IJEREG.INI
lea ecx, [esp + 0x46c]
push ecx
push 0x40d5bc
mov ecx, 0x104
lea ebx, [esp + 0x26c]
call fcn.00401030
add esp, 0xc
test eax, eax
jl 0x401d0d
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
mov edx, ebx
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x401d0d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, ebx
push eax
push 0x410b60
push 0x40d694
push str.INFO
call esi
mov ecx, ebx
push ecx
push 0x4123e8
push str.URL4URAL
push str.INFO
call esi
mov edx, ebx
push edx
push 0x410960
push str.DEVICEID
push str.INFO
call esi
mov eax, ebx
push eax
push 0x411fc0
push str.CDTYPE
push str.INFO
call esi
mov ecx, ebx
push ecx
push 0x413648
push str.AREA
push str.INFO
call esi
mov edx, ebx
push edx
push 0x4121e0
push str.PRINTER
push str.INFO
call esi
mov eax, ebx
push eax
push 0x411fe0
push str.GDIDRVNAME
push str.INFO
call esi
mov ecx, ebx
push ecx
push 0x411ba8
push str.IJPLMLOGNAME
push str.INFO
call esi
mov edx, ebx
push edx
push 0x411db8
push str.IJPLMREGPATH
push str.INFO
call esi
mov eax, ebx
push eax
push 0x413438
push str.IJPLMREGKEY
push str.INFO
call esi
movzx ecx, word [0x413644]
push ecx
push 0x40d764
mov ecx, 0x104
lea ebx, [esp + 0x880]
call fcn.00401030
add esp, 8
test eax, eax
jl 0x402323
lea edx, [esp + 0x260]
push edx
mov eax, ebx
push eax
push str.LANGID
push str.INFO
call esi
movzx ecx, word [0x411db4]
push ecx
push 0x40d764
mov ecx, 0x104
lea ebx, [esp + 0x880]
call fcn.00401030
add esp, 8
test eax, eax
jl 0x40235f
lea edx, [esp + 0x260]
push edx
mov eax, ebx
push eax
push str.SUBLANGID
push str.INFO
call esi
mov ecx, dword [0x413640]
push ecx
push 0x40d764
mov ecx, 0x104
lea ebx, [esp + 0x880]
call fcn.00401030
add esp, 8
test eax, eax
jl 0x40239a
lea edx, [esp + 0x260]
push edx
mov eax, ebx
push eax
push str.RTLREADING
push str.INFO
call esi
mov eax, 1
mov ecx, dword [esp + 0xe94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00402e0d
add esp, 0xe8c
ret
test ebp, ebp
je 0x4023c3
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40239f