Function at 0x40d810
Capabilities:
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4331d7
mov eax, dword fs:[0]
push eax
sub esp, 0x410
mov eax, dword [0x442018]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, 7
xor edi, edi
xor ecx, ecx
mov dword [ebp - 0x3dc], eax
mov dword [ebp - method.CSDIResultString.virtual_0], vtable.CSDIResultString.0
mov dword [ebp - 0x284], ebx
mov dword [ebp - 0x288], edi
mov word [ebp - 0x298], cx
mov dword [ebp - 4], edi
mov ecx, dword [eax + 0x178]
mov edx, dword [ecx]
mov edx, dword [edx + 0x44]
lea eax, [ebp - 0x29c]
push eax
push str.kDrvImageFormat
call edx
lea eax, [ebp - 0x3d6]
push eax
lea ecx, [ebp - 0x418]
push ecx
call fcn.0040a990
mov byte [ebp - 4], 1
cmp dword [ebp - 0x284], 8
mov eax, dword [ebp - 0x298]
jae 0x40d8b5
lea eax, [ebp - 0x298]
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x228], edi
mov word [ebp - 0x238], dx
lea esi, [ecx + 2]
nop
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x40d8d0
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x238]
call fcn.00401890
lea ecx, [ebp - 0x418]
mov edx, esi
mov byte [ebp - 4], 2
call fcn.0041d2e0
mov byte [ebp - 4], 1
cmp dword [ebp - 0x224], 8
jb 0x40d919
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
lea ecx, [ebp - 0x418]
call fcn.004100d0
test eax, eax
je 0x40d933
lea ecx, [ebp - 0x418]
call fcn.004100d0
lea ecx, [ebp - 0x21c]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor edx, edx
push 0x14
mov eax, str.EPSONIMAGERUNNNER_
lea esi, [ebp - 0x2f0]
mov dword [ebp - 0x2dc], ebx
mov dword [ebp - 0x2e0], edi
mov word [ebp - 0x2f0], dx
call fcn.00401890
mov byte [ebp - 4], 3
xor eax, eax
mov word [ebp - 0x2d4], ax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x2c0], ebx
mov dword [ebp - 0x2c4], edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40d990
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x2d4]
call fcn.00401890
lea eax, [ebp - 0x2f0]
mov ecx, esi
lea ebx, [ebp - 0x2b8]
mov byte [ebp - 4], 4
call fcn.004053a0
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
mov ebx, 8
cmp dword [ebp - 0x2c0], ebx
jb 0x40d9e7
mov ecx, dword [ebp - 0x2d4]
push ecx
call esi
add esp, 4
xor edx, edx
mov dword [ebp - 0x2c0], 7
mov dword [ebp - 0x2c4], edi
mov word [ebp - 0x2d4], dx
mov byte [ebp - 4], 7
cmp dword [ebp - 0x2dc], ebx
jb 0x40da18
mov eax, dword [ebp - 0x2f0]
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x2b8]
xor ecx, ecx
mov dword [ebp - 0x2dc], 7
mov dword [ebp - 0x2e0], edi
mov word [ebp - 0x2f0], cx
cmp dword [ebp - 0x2a4], ebx
jae 0x40da45
lea eax, [ebp - 0x2b8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x40da5b
lea ecx, [ebp - 0x2b8]
call fcn.0042e320
mov edx, dword [ebp - 0x3dc]
mov ecx, dword [edx + 0x178]
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
call edx
test al, al
je 0x40de86
mov eax, dword [ebp - 0x3dc]
mov ecx, dword [eax + 0x178]
mov edx, dword [ecx]
mov eax, dword [edx + 0x38]
call eax
mov edi, eax
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
mov ecx, edi
call eax
cmp eax, 2
je 0x40de63
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
mov ecx, edi
call eax
cmp eax, 4
je 0x40de63
mov edx, dword [edi]
mov eax, dword [edx + 0x88]
mov ecx, edi
call eax
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x3d8], eax
je 0x40dae7
mov edx, dword [edi]
lea ecx, [eax + eax - 1]
mov eax, dword [edx + 0x8c]
mov dword [ebp - 0x3d8], ecx
mov ecx, edi
call eax
test al, al
je 0x40dae7
inc dword [ebp - 0x3d8]
push str._08d.tmp
lea ebx, [ebp - 0x3d4]
call fcn.0040f3c0
mov byte [ebp - 4], 8
lea edx, [ebp - 0x3ec]
lea ecx, [ebp - 0x3d8]
push edx
mov dword [ebp - 0x3ec], ecx
mov dword [ebp - 0x3e8], fcn.0040a960
mov dword [ebp - 0x3e4], 0x4132e0
call fcn.004124c0
add esp, 4
lea edx, [ebp - 0x274]
mov ecx, eax
call fcn.0040f4f0
mov esi, eax
push str.ScannedImage_
lea eax, [ebp - 0x2b8]
push eax
lea ecx, [ebp - 0x328]
push ecx
mov byte [ebp - 4], 9
call fcn.0040ed10
add esp, 0xc
mov ecx, eax
mov eax, dword [ebp - 0x3dc]
add eax, 0x200
lea ebx, [ebp - 0x30c]
mov byte [ebp - 4], 0xa
call fcn.0040ee00
mov ecx, eax
mov eax, esi
lea ebx, [ebp - 0x238]
mov byte [ebp - 4], 0xb
call fcn.004053a0
mov ebx, 8
cmp dword [ebp - 0x2f8], ebx
jb 0x40dba4
mov edx, dword [ebp - 0x30c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov esi, 7
xor eax, eax
mov dword [ebp - 0x2f8], esi
mov dword [ebp - 0x2fc], 0
mov word [ebp - 0x30c], ax
cmp dword [ebp - 0x314], ebx
jb 0x40dbda
mov ecx, dword [ebp - 0x328]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov dword [ebp - 0x314], esi
mov dword [ebp - 0x318], 0
mov word [ebp - 0x328], dx
cmp dword [ebp - 0x260], ebx
jb 0x40dc0b
mov eax, dword [ebp - 0x274]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x260], esi
mov dword [ebp - 0x264], 0
mov word [ebp - 0x274], cx
lea edx, [ebp - 0x3d4]
push edx
mov byte [ebp - 4], 0x10
call fcn.0040df60
mov eax, dword [edi]
mov edx, dword [eax + 0x60]
mov ecx, edi
call edx
cmp eax, ebx
jne 0x40dc67
mov eax, dword [edi]
mov edx, dword [eax + 0x64]
mov ecx, edi
call edx
cmp eax, 1
jne 0x40dc67
cmp dword [ebp + 0x10], 0xffffffff
jne 0x40dc67
push 5
mov eax, str..mono
lea ecx, [ebp - 0x238]
call fcn.00404b10
mov eax, dword [edi]
mov edx, dword [eax + 0x84]
mov ecx, edi
call edx
push eax
lea eax, [ebp - 0x254]
push eax
call fcn.0040d6b0
add esp, 8
push 0
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x238]
mov byte [ebp - 4], 0x11
call fcn.00405a30
mov byte [ebp - 4], 0x10
cmp dword [ebp - 0x240], ebx
jb 0x40dcb4
mov ecx, dword [ebp - 0x254]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
mov ecx, edi
call eax
cmp eax, 3
jne 0x40de42
mov esi, 7
xor ecx, ecx
mov dword [ebp - method.CSDIResultString.virtual_0], vtable.CSDIResultString.0
mov dword [ebp - 0x240], esi
mov dword [ebp - 0x244], 0
mov word [ebp - 0x254], cx
mov byte [ebp - 4], 0x12
mov edx, dword [edi]
mov edx, dword [edx + 0x9c]
lea eax, [ebp - 0x258]
push eax
mov ecx, edi
call edx
mov ecx, dword [ebp - 0x238]
cmp dword [ebp - 0x224], ebx
jae 0x40dd19
lea ecx, [ebp - 0x238]
mov eax, dword [ebp - 0x254]
cmp dword [ebp - 0x240], ebx
jae 0x40dd2d
lea eax, [ebp - 0x254]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor eax, eax
mov dword [ebp - 0x268], esi
mov dword [ebp - 0x26c], 0
mov word [ebp - 0x27c], ax
push eax
lea ecx, [ebp - 0x238]
push ecx
or eax, 0xffffffff
lea ecx, [ebp - 0x27c]
mov byte [ebp - 4], 0x13
call fcn.00401cf0
mov edx, dword [edi]
mov eax, dword [edx + 0x8c]
mov ecx, edi
call eax
mov ecx, dword [ebp - 0x3d8]
mov edi, dword [ebp - 0x3dc]
mov dword [ebp - 0x260], ecx
add edi, 0x220
lea ecx, [ebp - 0x27c]
mov byte [ebp - 0x25c], al
call fcn.0040e880
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x3e0], esp
xor edi, edi
push edi
lea eax, [ebp - 0x238]
xor edx, edx
push eax
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], edi
or eax, 0xffffffff
mov word [ecx], dx
call fcn.00401cf0
mov esi, dword [ebp - 0x3dc]
call fcn.0040d740
cmp dword [ebp - 0x268], ebx
jb 0x40dde8
mov ecx, dword [ebp - 0x27c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [ebp - 0x254]
xor edx, edx
mov dword [ebp - 0x268], 7
mov dword [ebp - 0x26c], edi
mov word [ebp - 0x27c], dx
mov dword [ebp - method.CSDIResultString.virtual_0], vtable.CSDIResultString.0
mov dword [ebp - 0x244], edi
cmp dword [ebp - 0x240], ebx
jae 0x40de25
lea eax, [ebp - 0x254]
xor ecx, ecx
mov word [eax], cx
cmp dword [ebp - 0x240], ebx
jb 0x40de42
mov edx, dword [ebp - 0x254]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov byte [ebp - 4], 7
cmp dword [ebp - 0x224], ebx
jb 0x40de5e
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ebx, 8
mov ecx, dword [ebp - 0x3dc]
mov ecx, dword [ecx + 0x178]
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
call eax
test al, al
jne 0x40da76
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
xor edi, edi
cmp dword [ebp - 0x2a4], ebx
jb 0x40de9a
mov ecx, dword [ebp - 0x2b8]
push ecx
call esi
add esp, 4
mov eax, dword [ebp - 0x408]
xor edx, edx
mov dword [ebp - 0x2a4], 7
mov dword [ebp - 0x2a8], edi
mov word [ebp - 0x2b8], dx
cmp eax, edi
je 0x40dec3
push eax
call esi
add esp, 4
lea eax, [ebp - 0x414]
mov dword [ebp - 0x408], edi
mov dword [ebp - 0x404], edi
mov dword [ebp - 0x400], edi
mov dword [ebp - 0x3e0], eax
mov ecx, eax
push ecx
mov byte [ebp - 4], 0x14
call fcn.0040aab0
mov edx, dword [ebp - 0x414]
push edx
call esi
mov eax, dword [ebp - 0x298]
add esp, 4
mov dword [ebp - method.CSDIResultString.virtual_0], vtable.CSDIResultString.0
mov dword [ebp - 0x288], edi
cmp dword [ebp - 0x284], ebx
jae 0x40df1d
lea eax, [ebp - 0x298]
xor ecx, ecx
mov word [eax], cx
cmp dword [ebp - 0x284], ebx
jb 0x40df36
mov edx, dword [ebp - 0x298]
push edx
call esi
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042ef46
mov esp, ebp
pop ebp
ret 0xc