Function at 0x40d682
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Write file on windows

Disassembly:
mov eax, 0x4458df
call fcn.00420850
sub esp, 0x7a0
push ebx
push esi
push edi
push 1
push dword [ebp + 8]
mov dword [ebp - 0x84], ecx
call fcn.0041f29c
pop ecx
mov ebx, eax
pop ecx
lea ecx, [ebp - 0x58]
call fcn.0040f524
xor edi, edi
push edi
mov dword [ebp - 4], edi
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x30], esp
push 1
push dword [ebp + 8]
call fcn.0040e157
lea ecx, [ebp - 0x58]
call fcn.0040f5ac
test al, al
je 0x40e052
push edi
push ebx
lea ecx, [ebp - 0x58]
call fcn.0040f7d9
lea eax, [ebp - 0x7ac]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
mov byte [ebp - 4], 1
jne 0x40d723
and byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.0040f55b
mov dword [ebp - 0x58], vtable.is::file_lite.0
mov dword [ebp - 4], 2
mov esi, 0xfffffcdb
jmp 0x40deac
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 0x78c]
cmp esi, edi
mov dword [ebp - 0x2c], ecx
je 0x40d73d
push eax
call esi
or dword [ebp - 0x18], 0xffffffff
push 0x4000
call fcn.00420e10
mov edi, dword [ebp + 0x10]
pop ecx
test edi, edi
mov dword [ebp - 0x14], eax
je 0x40d782
lea eax, [ebp + 0xb]
push 1
push eax
lea ecx, [ebp - 0x80]
push dword [ebp + 0xc]
call fcn.00401ae3
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x80]
push ecx
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.00410b5b
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 1
call fcn.004014d4
cmp ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], ebx
jae 0x40de47
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, vtable.zpath.0
and byte [ebp + 0xb], 0
push 0
push dword [ebp - 0x10]
lea ecx, [ebp - 0x58]
call fcn.0040f7d9
push 0x104
lea ecx, [ebp - 0x58]
push dword [ebp - 0x14]
call fcn.0040f795
push dword [ebp - 0x14]
lea eax, [ebp - 0x458]
push eax
call esi
lea eax, [ebp - 0x458]
push eax
call edi
mov ecx, dword [ebp - 0x10]
push 0
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x58]
push eax
mov dword [ebp - 0x10], eax
call fcn.0040f7d9
push 0x104
lea ecx, [ebp - 0x58]
push dword [ebp - 0x14]
call fcn.0040f795
push dword [ebp - 0x14]
lea eax, [ebp - 0x55c]
push eax
call esi
lea eax, [ebp - 0x55c]
push eax
call edi
mov ecx, dword [ebp - 0x10]
push 0
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x58]
push eax
mov dword [ebp - 0x10], eax
call fcn.0040f7d9
push 0x104
lea ecx, [ebp - 0x58]
push dword [ebp - 0x14]
call fcn.0040f795
push dword [ebp - 0x14]
lea eax, [ebp - 0x160]
push eax
call esi
lea eax, [ebp - 0x160]
push eax
call edi
mov ecx, dword [ebp - 0x10]
push 0
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x58]
push eax
mov dword [ebp - 0x10], eax
call fcn.0040f7d9
push 0xf
lea ecx, [ebp - 0x58]
push dword [ebp - 0x14]
call fcn.0040f795
push 0xa
push dword [ebp - 0x14]
call fcn.0040eeb0
pop ecx
mov dword [ebp - 0x1c], eax
pop ecx
push dword [ebp - 0x14]
call edi
inc eax
push 0
add dword [ebp - 0x10], eax
lea eax, [ebp - 0x55c]
push eax
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xbc], 0x449d80
mov dword [ebp - 0xb4], 0x449d78
call fcn.0040ece0
mov dword [ebp - 0xc8], ebx
lea eax, [ebp - 0x200]
lea ecx, [ebp - 0xc8]
push eax
mov byte [ebp - 4], 4
call fcn.0040e208
push 0
push eax
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 5
mov dword [ebp - 0x98], 0x449d80
mov dword [ebp - 0x90], 0x449d78
call fcn.0040ed70
mov dword [ebp - 0xa4], ebx
lea ecx, [ebp - 0x200]
mov byte [ebp - 4], 7
call fcn.0040ee1e
push dword [ebp + 0xc]
lea eax, [ebp - 0x354]
push eax
call esi
lea eax, [ebp - 0x354]
push 0x4542a0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0x94], 0
je 0x40da12
push dword [ebp - 0x94]
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
jbe 0x40da12
lea ecx, [ebp - 0xa4]
call fcn.0041051e
push dword [ebp - 0xa0]
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x354]
push 0
push eax
lea ecx, [ebp - 0x100]
mov dword [ebp - 0xf4], 0x449d80
mov dword [ebp - 0xec], 0x449d78
call fcn.0040ece0
mov dword [ebp - 0x100], ebx
lea ecx, [ebp - 0x100]
mov byte [ebp - 4], 8
call fcn.0041051e
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40da03
mov ecx, dword [ebp - 0x84]
lea eax, [ebp - 0x100]
push eax
call fcn.0040e088
cmp dword [ebp + 0x14], 0
je 0x40da03
lea eax, [ebp - 0x25]
push 1
push eax
lea eax, [ebp - 0x354]
push eax
lea ecx, [ebp - 0x188]
call fcn.00401ae3
mov ecx, dword [ebp + 0x14]
lea edx, [ebp - 0x188]
push edx
mov byte [ebp - 4], 9
mov eax, dword [ecx + 8]
push eax
call fcn.00410b5b
lea ecx, [ebp - 0x188]
mov byte [ebp - 4], 8
call fcn.004014d4
lea ecx, [ebp - 0x100]
mov byte [ebp - 4], 7
call fcn.0040ee1e
lea eax, [ebp - 0x458]
push eax
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x458]
push 0
push eax
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xd8], 0x449d80
mov dword [ebp - 0xd0], 0x449d78
call fcn.0040ece0
mov dword [ebp - 0xe4], ebx
lea eax, [ebp - 0x228]
push 0
push eax
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 0xa
call fcn.0040e5d4
mov ecx, eax
mov dword [ebp - 0x24], ecx
mov byte [ebp - 4], 0xb
call fcn.0041051e
mov eax, dword [ebp - 0x24]
push str..cab
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
neg eax
sbb al, al
lea ecx, [ebp - 0x228]
inc al
mov byte [ebp - 4], 0xa
mov byte [ebp - 0x1d], al
call fcn.0040ee1e
cmp byte [ebp - 0x1d], 0
je 0x40db87
lea eax, [ebp - 0x458]
push 5
push eax
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x1b0]
lea ecx, [ebp - 0xa4]
push eax
call fcn.0040e188
mov ecx, eax
call fcn.0040e208
push 0
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 0xc
mov dword [ebp - 0x110], 0x449d80
mov dword [ebp - 0x108], 0x449d78
call fcn.0040ed70
mov dword [ebp - 0x11c], ebx
lea ecx, [ebp - 0x1b0]
mov byte [ebp - 4], 0xe
call fcn.0040ee1e
lea eax, [ebp - 0xac]
push str.data
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40db61
lea eax, [ebp - 0x458]
push str.data1.cab
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40db61
cmp dword [ebp - 0x10c], 0
je 0x40db5d
push dword [ebp - 0x10c]
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
jne 0x40db61
mov byte [ebp + 0xb], 1
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 0xa
call fcn.0040ee1e
cmp byte [ebp + 0xb], 0
je 0x40db87
cmp byte [ebp + 0x18], 0
jne 0x40db87
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x10], eax
jmp 0x40de05
lea ecx, [ebp - 0x80]
call fcn.0040f524
push 2
lea eax, [ebp - 0x354]
sub esp, 0x1c
mov byte [ebp - 4], 0xf
mov ecx, esp
mov dword [ebp + 8], esp
push 1
push eax
call fcn.0040e157
lea ecx, [ebp - 0x80]
call fcn.0040f693
test al, al
je 0x40dec7
cmp dword [ebp - 0x1c], 0x4000
jl 0x40dc24
push 0
lea ecx, [ebp - 0x58]
push dword [ebp - 0x10]
call fcn.0040f7d9
push 0x4000
lea ecx, [ebp - 0x58]
push dword [ebp - 0x14]
call fcn.0040f795
lea ecx, [ebp - 0x88]
mov eax, 0x4000
push 0
add dword [ebp - 0x10], eax
push ecx
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40dc0b
mov eax, dword [ebp - 0x88]
jmp 0x40dc0e
or eax, 0xffffffff
cmp eax, 0xffffffff
je 0x40df3d
mov eax, 0x4000
sub dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], eax
jge 0x40dbc4
cmp dword [ebp - 0x1c], 0
jle 0x40dc73
push 0
lea ecx, [ebp - 0x58]
push dword [ebp - 0x10]
call fcn.0040f7d9
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x58]
push dword [ebp - 0x14]
call fcn.0040f795
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
push 0
add dword [ebp - 0x10], eax
push ecx
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40dc67
mov eax, dword [ebp - 0x30]
jmp 0x40dc6a
or eax, 0xffffffff
cmp eax, 0xffffffff
je 0x40dfbf
lea ecx, [ebp - 0x80]
call fcn.0040f807
lea eax, [ebp - 0x1d8]
lea ecx, [ebp - 0xc8]
push eax
call fcn.0040e2c2
mov ecx, eax
mov dword [ebp + 8], ecx
mov byte [ebp - 4], 0x16
call fcn.0041051e
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0xe4]
mov eax, dword [eax + 4]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x250]
push eax
call fcn.0040e2c2
mov ecx, eax
mov dword [ebp + 8], ecx
mov byte [ebp - 4], 0x17
call fcn.0041051e
mov eax, dword [ebp + 8]
push dword [ebp - 0x24]
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 0x16
setne byte [ebp + 0xb]
call fcn.0040ee1e
lea ecx, [ebp - 0x1d8]
mov byte [ebp - 4], 0xf
call fcn.0040ee1e
cmp byte [ebp + 0xb], 0
je 0x40dda6
push dword [ebp + 0xc]
lea eax, [ebp - 0x458]
push eax
call esi
lea eax, [ebp - 0x458]
push 0x4542a0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x55c]
push eax
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x5e4]
push 0
push eax
lea eax, [ebp - 0x354]
push eax
call sub.LZ32.dll_LZOpenFileA
mov dword [ebp + 8], eax
lea eax, [ebp - 0x66c]
push 0x1001
push eax
lea eax, [ebp - 0x458]
push eax
call sub.LZ32.dll_LZOpenFileA
push eax
mov dword [ebp - 0x24], eax
push dword [ebp + 8]
call sub.LZ32.dll_LZCopy
push dword [ebp + 8]
mov dword [ebp - 0x1c], eax
call sub.LZ32.dll_LZClose
push dword [ebp - 0x24]
call sub.LZ32.dll_LZClose
cmp dword [ebp - 0x1c], 0
jle 0x40dda6
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x458]
push eax
lea eax, [ebp - 0x354]
push eax
call esi
cmp dword [ebp + 0x10], 0
je 0x40dde6
lea eax, [ebp - 0x26]
push 1
push eax
lea eax, [ebp - 0x354]
push eax
lea ecx, [ebp - 0x144]
call fcn.00401ae3
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x144]
push eax
mov byte [ebp - 4], 0x18
call fcn.0040fe7e
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 0xf
call fcn.004014d4
mov dword [ebp - 0x80], vtable.is::file_lite.0
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0x19
call fcn.0040f807
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 0xa
call fcn.0040ee1e
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 7
call fcn.0040ee1e
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 4
call fcn.0040ee1e
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 1
call fcn.0040ee1e
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x10], eax
jb 0x40d79f
mov edi, dword [ebp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
test edi, edi
je 0x40de80
lea eax, [ebp + 0x1b]
push 1
push eax
lea ecx, [ebp - 0x144]
push dword [ebp + 0xc]
call fcn.00401ae3
lea eax, [ebp - 0x144]
mov ecx, edi
push eax
mov byte [ebp - 4], 0x1a
call fcn.0040fe7e
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 1
call fcn.004014d4
push dword [ebp - 0x14]
call fcn.00420016
cmp dword [ebp - 0x18], 0xffffffff
pop ecx
je 0x40de9c
test esi, esi
je 0x40de9c
push dword [ebp - 0x18]
call esi
or dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x58], vtable.is::file_lite.0
mov dword [ebp - 4], 0x1b
xor esi, esi
lea ecx, [ebp - 0x58]
call fcn.0040f807
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.0040ee1e
mov eax, esi
jmp 0x40e077
push dword [ebp - 0x14]
call fcn.00420016
mov esi, vtable.is::file_lite.0
pop ecx
mov dword [ebp - 0x80], esi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0x10
call fcn.0040f807
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 0xa
call fcn.0040ee1e
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 7
call fcn.0040ee1e
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 4
call fcn.0040ee1e
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 1
call fcn.0040ee1e
and byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.0040f55b
mov dword [ebp - 0x58], esi
mov dword [ebp - 4], 0x11
mov esi, 0xfffffce0
jmp 0x40deac
push dword [ebp - 0x14]
call fcn.00420016
mov esi, vtable.is::file_lite.0
pop ecx
mov dword [ebp - 0x80], esi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0x12
call fcn.0040f807
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 0xa
call fcn.0040ee1e
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 7
call fcn.0040ee1e
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 4
call fcn.0040ee1e
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 1
call fcn.0040ee1e
cmp dword [ebp - 0x18], 0xffffffff
je 0x40dfab
mov eax, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40dfab
push dword [ebp - 0x18]
call eax
or dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x58], esi
mov dword [ebp - 4], 0x13
mov esi, 0xfffffcda
jmp 0x40deac
push dword [ebp - 0x14]
call fcn.00420016
mov esi, vtable.is::file_lite.0
pop ecx
mov dword [ebp - 0x80], esi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0x14
call fcn.0040f807
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 0xa
call fcn.0040ee1e
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 7
call fcn.0040ee1e
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 4
call fcn.0040ee1e
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 1
call fcn.0040ee1e
cmp dword [ebp - 0x18], 0xffffffff
je 0x40e02d
mov eax, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40e02d
push dword [ebp - 0x18]
call eax
or dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x58], esi
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0x15
call fcn.0040f807
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.0040ee1e
mov eax, 0xfffffcda
jmp 0x40e077
mov dword [ebp - 0x58], vtable.is::file_lite.0
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0x1c
call fcn.0040f807
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.0040ee1e
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x14