Function at 0x422e60
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
sub esp, 0x850
mov eax, dword [esp + 0x854]
push ebx
test eax, eax
mov dword [esp + 4], 1
lea ebx, [esp + 0x344]
jne 0x422e8b
xor eax, eax
pop ebx
add esp, 0x850
ret
mov eax, dword [esp + 0x85c]
test eax, eax
je 0x422ea7
cmp word [eax], 0
je 0x422ea7
push eax
lea eax, [esp + 0x448]
push eax
jmp 0x422eb4
lea ecx, [esp + 0x444]
push str.USBlocator.txt
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
lea edx, [esp + 0x344]
push ebp
push esi
push edi
push edx
push 0x80
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [esp + 0x350], 0
je 0x4231cd
mov ebp, dword [sym.imp.MSVCRT.dll_swprintf]
push ebx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 2
jne 0x422f9e
mov dword [esp + 0x10], eax
xor eax, eax
mov ax, word [ebx]
lea ecx, [esp + 0x48]
push eax
push str.._c:
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x48]
push 0
push 0
push 3
push 0
push 3
push connect
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
lea eax, [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
push 0x20
push ecx
push 0
push 0
push 0x74004
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x422f9e
xor edx, edx
lea eax, [esp + 0x48]
mov dx, word [ebx]
push edx
push 0x4371fc
push eax
call ebp
lea ecx, [esp + 0x45c]
lea edx, [esp + 0x5a]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
lea eax, [esp + 0x5c]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x423059
mov dword [esp + 0x10], 4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [ebx + eax*2 + 2], 0
lea ebx, [ebx + eax*2 + 2]
jne 0x422ee8
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x423167
mov ecx, dword [esp + 0x864]
mov esi, dword [sym.imp.MSVCRT.dll_wcscpy]
add ecx, 6
lea edx, [ebx + 2]
push ecx
push edx
call esi
mov eax, dword [esp + 0x878]
add esp, 8
test eax, eax
je 0x422fed
push ebx
push eax
call esi
add esp, 8
mov eax, dword [esp + 0x86c]
test eax, eax
je 0x4231ed
cmp word [eax], 0
je 0x423012
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4231ed
xor eax, eax
lea ecx, [esp + 0x48]
mov ax, word [ebx]
push eax
push 0x4371fc
push ecx
call ebp
lea edx, [esp + 0x45c]
lea eax, [esp + 0x5a]
push edx
push eax
call esi
mov esi, dword [sym.imp.MSVCRT.dll__wfopen]
lea ecx, [esp + 0x5c]
push 0x4371f8
push ecx
call esi
add esp, 0x1c
test eax, eax
jne 0x423066
mov dword [esp + 0x10], 4
jmp 0x4231ed
mov dword [esp + 0x10], 0
jmp 0x422fc1
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
push eax
call edi
add esp, 4
lea edx, [esp + 0x658]
push 0x104
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x658]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_wcsrchr]
push 0x4371e0
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 0x10
test eax, eax
jne 0x42314a
lea ecx, [esp + 0x48]
push 0x4371dc
push ecx
call esi
mov esi, eax
add esp, 8
test esi, esi
je 0x42314a
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [esp + 0x1e]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x1a]
and eax, 0xffff
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x1a]
push ecx
mov ecx, dword [esp + 0x1c]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
lea edx, [esp + 0x264]
push str.Time:__02d__02d__02d__02d:_02d
push edx
call ebp
lea eax, [esp + 0x26c]
push ebx
push eax
lea ecx, [esp + 0x274]
push str._s_BackupDir_is_set_to:__s
push ecx
call ebp
lea edx, [esp + 0x27c]
push 0xa
push edx
push str._s_c
push esi
call dword [sym.imp.MSVCRT.dll_fwprintf]
push esi
call edi
add esp, 0x40
push ebx
call fcn.00424b40
mov eax, dword [esp + 0x870]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 0xc
jmp 0x4231ed
cmp eax, 4
jne 0x4231c3
push 0
push 0x80
push 1
push 0
push 1
lea ecx, [esp + 0x5c]
push connect
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x870]
inc esi
neg esi
sbb esi, esi
and esi, 0xfffffff8
add esi, 0x10
test eax, eax
mov dword [esp + 0x10], esi
je 0x4231ed
mov ecx, dword [esp + 0x86c]
test ecx, ecx
je 0x4231ed
mov word [ecx], 0
mov word [eax], 0
jmp 0x4231ed
cmp eax, 2
je 0x4231cd
cmp eax, 1
jne 0x4231ed
mov ecx, dword [esp + 0x870]
test ecx, ecx
je 0x4231ed
mov eax, dword [esp + 0x86c]
test eax, eax
je 0x4231ed
mov word [eax], 0
mov word [ecx], 0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x874]
pop edi
pop esi
pop ebp
or eax, ecx
pop ebx
add esp, 0x850
ret