Function at 0x1002f361
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get disk information
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x29d8
call sub.ntdll.dll__chkstk
or dword [ebp - 0xc], 0xffffffff
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
push esi
xor esi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], esi
mov eax, dword [eax + 0x324]
push edi
mov dword [ebp - 0x18], 0x2000
mov dword [ebp + 8], esi
cmp eax, esi
je 0x1002f3ad
push ebx
call eax
pop ecx
cmp eax, 1
je 0x1002f3ad
mov esi, ebx
call fcn.1003397f
xor eax, eax
jmp 0x1002fa93
movzx eax, byte [ebp + 0xc]
dec eax
cmp eax, 9
ja case.0x1002f3bb.2
jmp dword [eax*4 + 0x1002fcdd]
movzx eax, byte [ebp + 0x10]
dec eax
je 0x1002f46b
dec eax
jne case.0x1002f3bb.2
lea eax, [ebp - 0x5c4]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
mov dword [ebp - 0xc], eax
add eax, 0xfffffffd
cmp eax, esi
jbe 0x1002f44d
lea edi, [ebp - 0x20]
lea eax, [ebp - 0x5c4]
sub edi, eax
mov esi, dword [ebp + 8]
lea esi, [ebp + esi - 0x5c2]
lea eax, [esi - 2]
mov cl, byte [eax]
mov byte [edi + eax], cl
inc eax
test cl, cl
jne 0x1002f408
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
dec eax
dec eax
je 0x1002f438
dec eax
je 0x1002f433
dec eax
je 0x1002f42e
dec eax
jne 0x1002f43b
mov byte [esi], 0x63
jmp 0x1002f43b
mov byte [esi], 0x6e
jmp 0x1002f43b
mov byte [esi], 0x6c
jmp 0x1002f43b
mov byte [esi], 0x66
mov eax, dword [ebp - 0xc]
add dword [ebp + 8], 4
add eax, 0xfffffffd
sub edi, 4
cmp dword [ebp + 8], eax
jb 0x1002f3fb
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x5c4]
push eax
push 3
xor eax, eax
mov cl, 2
push ebx
call fcn.1002ed9f
add esp, 0xc
jmp 0x1002fa93
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push dword [ebp + 0x18]
mov eax, ebx
call fcn.1002f165
mov edi, eax
pop ecx
cmp edi, esi
je 0x1002f3a6
push edi
push dword [ebp + 0x18]
push ebx
call fcn.1002ee52
mov esi, edi
mov dword [ebp - 8], eax
add esp, 0xc
call fcn.1000e820
mov eax, dword [ebp - 8]
jmp 0x1002fa93
push dword [ebp + 0x18]
mov eax, ebx
call fcn.1002f165
pop ecx
mov dword [ebp + 8], eax
cmp eax, esi
je 0x1002f3a6
lea edx, [ebp - 0x13c]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1002f4c5
push 3
pop ecx
mov edi, str.My_Documents
lea esi, [ebp - 0x13c]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x1002f4ea
mov dword [ebp - 0xc], 5
push 7
pop ecx
mov edi, str.Desktop
lea esi, [ebp - 0x13c]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x1002f501
and dword [ebp - 0xc], eax
push 0x11
pop ecx
mov edi, str.Network_Favorites
lea esi, [ebp - 0x13c]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x1002f51c
mov dword [ebp - 0xc], 0x13
cmp dword [ebp - 0xc], 0xffffffff
je 0x1002f590
push 0
push dword [ebp - 0xc]
lea eax, [ebp - 0x8d4]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x13c]
push 0x5c
push eax
call dword [sym.imp.ntdll.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x1002f57b
cmp byte [eax + 1], 0
je 0x1002f57b
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f553
lea edi, [ebp - 0x8d4]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1002f563
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [ebp + eax - 0x8d4]
mov byte [ebp + eax - 0x13c], cl
inc eax
test cl, cl
jne 0x1002f57d
lea eax, [ebp - 0x13c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f599
sub eax, edx
inc eax
push eax
lea ecx, [ebp - 0x4c4]
push ecx
push eax
lea eax, [ebp - 0x13c]
push eax
push 0
push 0x4e3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x4c4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1002f76b
lea esi, [ebp - 0x4c4]
call fcn.1002f349
cmp word [eax], 0x5b
mov dword [ebp - 0x18], eax
jne 0x1002f76b
mov edi, eax
mov eax, esi
sub edi, eax
sar edi, 1
lea esi, [edi + edi]
push esi
push eax
lea eax, [ebp - 0x7cc]
push eax
call sub.ntdll.dll_memcpy
xor eax, eax
mov word [ebp + esi - 0x7cc], ax
mov eax, dword [ebp - 0x18]
add esp, 0xc
add eax, 4
push eax
lea eax, [ebp - 0x7cc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x7cc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
mov word [ebp + eax*2 - 0x7d0], cx
lea eax, [ebp - 0x7cc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1002f76b
test al, 0x10
je 0x1002f76b
mov eax, dword [0x1004efcc]
and dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], eax
mov eax, dword [0x1004efd0]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x9d4]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x4c4]
push eax
push 0
push 0x1004efd4
lea eax, [ebp - 0x9d4]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x4c4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x4c4]
push eax
lea esi, [ebp - 0x7cc]
call fcn.1003f6be
pop ecx
pop ecx
lea eax, [ebp - 0x4c4]
push eax
lea eax, [ebx + 0x7654]
push eax
mov dword [ebx + 0x7650], 1
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
lea eax, [ebp - 0x13c]
push eax
lea eax, [ebp - 0x2bc]
push eax
call sub.ntdll.dll_memcpy
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
add esp, 0xc
lea eax, [ebp + edi - 0x13a]
push eax
lea eax, [ebp - 0x2bc]
push eax
mov byte [ebp + edi - 0x2bc], 0
call esi
lea eax, [ebp - 0x2bc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x2bc]
mov byte [eax + ecx - 2], 0
mov eax, ecx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f73a
mov ecx, dword [ebp + 8]
sub eax, edi
add eax, 5
call fcn.1000e850
mov dword [ebp + 8], eax
lea eax, [ebp - 0x2bc]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str..zip
push dword [ebp + 8]
call esi
xor edi, edi
push edi
push edi
push 3
push edi
push edi
push 0x80000000
lea eax, [ebp - 0x4c4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0x7638], eax
cmp eax, 0xffffffff
je 0x1002f87d
lea ecx, [ebp - 0x170]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x1002f86a
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x16c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx eax, word [ebp - 0x26]
push eax
movzx eax, word [ebp - 0x28]
push eax
movzx eax, word [ebp - 0x30]
push eax
movzx eax, word [ebp - 0x2a]
push eax
movzx eax, word [ebp - 0x2e]
push eax
lea eax, [ebp - 0x1b4]
push str._02d__02d__04d__02d:_02d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x1b4]
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f7f2
push dword [ebp + 8]
sub eax, edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 8]
lea eax, [eax + esi + 2]
call fcn.1000e850
mov dword [ebp + 8], eax
cmp eax, edi
je 0x1002f3a6
lea edi, [eax - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1002f820
mov esi, 0x100494c4
lea eax, [ebp - 0x1b4]
movsw word es:[edi], word [esi]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f837
mov edi, dword [ebp + 8]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1002f844
push dword [ebp + 8]
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp + 0x18], eax
jmp 0x1002f87d
push dword [ebx + 0x7638]
call fcn.1002d67f
or dword [ebx + 0x7638], 0xffffffff
pop ecx
xor eax, eax
cmp dword [ebp + 0x14], 1
sete al
mov dword [ebx + 0x763c], eax
or eax, 0xffffffff
cmp dword [ebx + 0x7638], eax
je 0x1002f89d
mov eax, dword [ebp - 0x14c]
push dword [ebp + 8]
mov edi, dword [ebp + 0x18]
xor esi, esi
push esi
push ebx
mov cl, 4
call fcn.1002ed9f
add esp, 0xc
cmp dword [ebx + 0x7638], 0xffffffff
mov dword [ebp - 8], eax
jne 0x1002f8ce
cmp dword [ebp + 8], esi
je 0x1002f49f
mov esi, dword [ebp + 8]
jmp 0x1002f49a
mov eax, dword [ebp - 0x14c]
mov dword [ebx + 0x7640], eax
shr eax, 0xd
mov dword [ebx + 0x7644], eax
lea eax, [ebp - 0x14]
push 4
push eax
mov eax, ebx
mov dword [ebx + 0x7648], esi
mov dword [ebx + 0x764c], esi
mov dword [ebp - 0x14], esi
call fcn.10033beb
pop ecx
pop ecx
test eax, eax
jns 0x1002fa82
cmp dword [ebx + 0x7650], esi
je 0x1002f91e
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, ebx
call fcn.1003397f
mov esi, dword [ebp + 8]
test esi, esi
je 0x1002f3a6
call fcn.1000e820
jmp 0x1002f3a6
cmp dword [ebp + 0x14], 0xffffffff
jne 0x1002f958
push dword [ebx + 0x7638]
call fcn.1002d67f
or dword [ebx + 0x7638], 0xffffffff
pop ecx
jmp case.0x1002f3bb.2
mov ecx, ebx
mov dword [ebx + 0x764c], 1
call fcn.1002f1c7
jmp 0x1002fa93
push dword [ebp + 0x18]
mov eax, ebx
call fcn.1002f165
mov edi, eax
pop ecx
mov dword [ebp + 8], edi
cmp edi, esi
je 0x1002f3a6
mov cl, byte [edi]
jmp 0x1002f992
cmp cl, 0x2c
je 0x1002f996
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x1002f98a
cmp byte [eax], 0
jne 0x1002f99d
xor eax, eax
cmp eax, esi
je 0x1002f9b7
mov byte [eax], 0
inc eax
lea edx, [ebp - 0x8d4]
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x1002f9ad
lea eax, [ebp - 0x14]
push 4
push eax
mov eax, ebx
call fcn.10033bbd
pop ecx
pop ecx
test eax, eax
jg 0x1002f9d9
mov esi, ebx
call fcn.1003397f
mov esi, dword [ebp + 8]
jmp 0x1002f930
mov eax, dword [ebp - 0x14]
mov ecx, eax
mov edx, eax
shr edx, 0x10
and ecx, 0xff0000
or ecx, edx
mov edx, eax
and edx, 0xff00
shl eax, 0x10
or edx, eax
shl edx, 8
shr ecx, 8
or ecx, edx
lea edx, [ebp - 0x13c]
mov dword [ebp - 0x14], ecx
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x1002fa0d
push esi
push esi
push 2
push esi
push esi
push 0x40000000
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebx + 0x7638], eax
push esi
push ebx
lea eax, [ecx - 1]
mov cl, 9
call fcn.1002ed9f
add esp, 0xc
cmp dword [ebx + 0x7638], 0xffffffff
mov dword [ebp - 8], eax
je 0x1002f8c6
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x7640], eax
shr eax, 0xd
mov dword [ebx + 0x7644], eax
mov dword [ebx + 0x7648], 1
mov dword [ebx + 0x764c], esi
cmp dword [ebp + 8], 0
je case.0x1002f3bb.2
mov esi, dword [ebp + 8]
call fcn.1000e820
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp + 0x18]
mov eax, ebx
call fcn.1002f165
pop ecx
mov dword [ebp + 8], eax
cmp eax, esi
je 0x1002f3a6
mov ecx, dword [ebx + 0x7638]
cmp ecx, 0xffffffff
je 0x1002fa82
cmp dword [ebp + 0x14], esi
jne 0x1002faca
push esi
lea edx, [ebp - 8]
push edx
push dword [ebp + 0x18]
push eax
push ecx
jmp 0x1002faf3
push dword [ebp + 0x18]
lea ecx, [ebp - 0x29d4]
push ecx
lea ecx, [ebp - 0x18]
call fcn.100412f1
pop ecx
pop ecx
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 0x29d4]
push eax
push dword [ebx + 0x7638]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 8], 0xffffffff
jne 0x1002fa82
push dword [ebx + 0x7638]
call fcn.1002d67f
or dword [ebx + 0x7638], 0xffffffff
pop ecx
mov dword [ebx + 0x764c], esi
mov dword [ebx + 0x7648], esi
jmp 0x1002fa82
mov eax, dword [ebx + 0x7638]
cmp eax, 0xffffffff
je 0x1002fb35
push eax
call fcn.1002d67f
pop ecx
or dword [ebx + 0x7638], 0xffffffff
mov dword [ebx + 0x764c], esi
mov dword [ebx + 0x7648], esi
jmp case.0x1002f3bb.2
mov eax, dword [ebx + 0x7638]
cmp eax, 0xffffffff
jne 0x1002fb2e
cmp byte [ebp + 0x10], 0
jne 0x1002fb6f
push 0x1004e591
xor edi, edi
push esi
or eax, eax
mov cl, 7
jmp 0x1002f45d
mov eax, dword [ebx]
mov eax, dword [eax + 0x324]
cmp eax, esi
je 0x1002fb9b
push ebx
call eax
pop ecx
push 0x1004e591
xor edi, edi
push esi
mov cl, 0xe
push ebx
cmp eax, 1
je 0x1002f45e
or eax, 0xffffffff
jmp 0x1002f45e
push 0x1004e591
xor edi, edi
push esi
or eax, 0xffffffff
mov cl, 0xe
jmp 0x1002f45d
push dword [ebp + 0x18]
mov eax, ebx
call fcn.1002f165
pop ecx
mov dword [ebp + 8], eax
cmp eax, esi
je 0x1002f3a6
movzx ecx, byte [ebp + 0x10]
dec ecx
je 0x1002fca1
sub ecx, 3
je 0x1002fc51
dec ecx
jne 0x1002fa82
mov cl, byte [eax]
mov edi, eax
jmp 0x1002fbe8
cmp cl, 0x2a
je 0x1002fbec
inc edi
mov cl, byte [edi]
test cl, cl
jne 0x1002fbe0
cmp byte [edi], 0
jne 0x1002fbf3
xor edi, edi
cmp edi, esi
je 0x1002fa82
lea esi, [ebp - 0x13c]
mov byte [edi], 0
sub esi, eax
mov cl, byte [eax]
mov byte [eax + esi], cl
inc eax
test cl, cl
jne 0x1002fc06
lea eax, [edi + 1]
lea edx, [ebp - 0x2bc]
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x1002fc1b
lea eax, [ebp - 0x2bc]
push eax
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov esi, dword [ebp + 8]
neg eax
sbb eax, eax
neg eax
dec eax
mov dword [ebp - 8], eax
push esi
mov byte [edi], 0x2a
mov eax, dword [ebp - 8]
push 8
jmp 0x1002fccb
lea edx, [ebp - 0x13c]
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x1002fc59
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1002fc79
or eax, eax
jmp 0x1002fc99
test al, 0x10
lea eax, [ebp - 0x13c]
push eax
je 0x1002fc8c
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x1002fc92
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
neg eax
dec eax
mov esi, dword [ebp + 8]
push esi
push 7
jmp 0x1002fcc8
lea edx, [ebp - 0x13c]
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x1002fca9
push 0
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov esi, dword [ebp + 8]
push esi
push 4
mov dword [ebp - 8], eax
mov edi, dword [ebp + 0x18]
push ebx
mov cl, 0xb
call fcn.1002ed9f
jmp 0x1002f494