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

Disassembly:
push 0xffffffffffffffff
push 0x44a0d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
push esi
mov esi, dword [ebx]
push edi
xor edi, edi
mov dword [esp + 0x10], ecx
mov edx, dword [esi - 8]
cmp edx, edi
jne 0x4085a9
mov eax, 2
jmp 0x408a22
cmp edx, 0x80
jle 0x4085bb
mov eax, 8
jmp 0x408a22
xor ecx, ecx
cmp edx, edi
jle 0x408601
mov ax, word [esi + ecx*2]
cmp ax, 0x3a
jne 0x4085d2
cmp ecx, 1
jne 0x408620
jmp 0x4085fc
cmp ax, 0x2a
je 0x408620
cmp ax, 0x3f
je 0x408620
cmp ax, 0x22
je 0x408620
cmp ax, 0x3c
je 0x408620
cmp ax, 0x3e
je 0x408620
cmp ax, 0x7c
je 0x408620
cmp ax, 0x2f
je 0x408620
inc ecx
cmp ecx, edx
jl 0x4085c1
cmp edx, 4
jge 0x40862a
cmp edx, 1
jle 0x408847
cmp word [esi + 2], 0x3a
je 0x40862a
mov eax, 1
jmp 0x408a22
mov eax, 7
jmp 0x408a22
cmp edx, 2
jl 0x408640
cmp word [esi + 2], 0x3a
je 0x408640
mov eax, 1
jmp 0x408a22
cmp edx, 1
jle 0x40867a
mov eax, dword [0x455858]
mov ecx, dword [0x45585c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov ax, word [esi]
lea edx, [esp + 0x14]
push edx
mov word [esp + 0x18], ax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x40867a
mov eax, 9
jmp 0x408a22
mov al, byte [esp + 0x38]
push edi
push edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], al
call fcn.0040a4d0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
mov eax, dword [ebx]
mov dword [esp + 0x30], edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x408851
mov eax, dword [ebx]
push ecx
mov dword [esp + 0x18], esp
mov esi, esp
cmp dword [eax - 0xc], edi
jl 0x4086c6
mov dword [esi], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x40870f
mov ecx, dword [0x455050]
mov dword [esi], ecx
mov ebp, dword [ebx]
cmp ebp, edi
je 0x4086dd
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
push edi
mov ecx, esi
call fcn.0040ac40
test eax, eax
je 0x40870f
mov eax, dword [esi]
lea ebx, [edi + edi]
push ebx
lea edx, [edi + edi + 2]
push ebp
push edx
push eax
call fcn.004017c0
mov ecx, dword [esi]
add esp, 0x10
mov dword [ecx - 8], edi
mov edx, dword [esi]
mov word [edx + ebx], 0
mov ebx, dword [esp + 0x3c]
lea ecx, [esp + 0x20]
call fcn.00408b20
xor edi, edi
cmp eax, edi
je 0x4088f0
cmp eax, 0x50
je 0x408851
cmp eax, 0xb7
je 0x408851
cmp eax, 5
jne 0x4087c8
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x34], 1
mov dword [esp + 0x3c], eax
call fcn.0040a470
lea edx, [esp + 0x38]
push eax
push edx
call fcn.0040b3f0
add esp, 8
test al, al
jne 0x4087ad
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
push eax
call fcn.0040b430
mov ecx, dword [esp + 0x3c]
add esp, 4
lea eax, [esp + 0x10]
mov edx, dword [ecx + 4]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x3c], edx
call fcn.0040a470
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.0040b3f0
add esp, 8
test al, al
je 0x40876f
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0xffffffff
call fcn.0040a400
mov eax, 5
jmp 0x408a22
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x34], 2
mov dword [esp + 0x3c], edx
call fcn.0040a470
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.0040b3f0
add esp, 8
test al, al
jne 0x408836
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 4]
mov eax, dword [eax + 8]
push eax
call fcn.0040b430
mov eax, dword [esp + 0x3c]
add esp, 4
lea edx, [esp + 0x10]
mov ecx, dword [eax + 4]
push edx
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x20]
call fcn.0040a470
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040b3f0
add esp, 8
test al, al
je 0x4087f8
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0xffffffff
call fcn.0040a400
mov eax, 1
jmp 0x408a22
mov ecx, dword [esp + 0x10]
push ebx
call fcn.00408d20
test eax, eax
jne 0x4088f0
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x10]
mov dword [esp + 0x38], ecx
push edx
lea ecx, [esp + 0x20]
mov dword [esp + 0x34], 3
call fcn.0040a470
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040b3f0
add esp, 8
test al, al
jne 0x4088d5
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 4]
mov eax, dword [eax + 8]
push eax
call fcn.0040b430
add esp, 4
lea edx, [esp + 0x14]
lea ecx, [esp + 0x38]
push edi
push edx
call fcn.0040a480
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
call fcn.0040a470
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.0040b3f0
add esp, 8
test al, al
je 0x408893
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0xffffffff
call fcn.0040a400
mov eax, 5
jmp 0x408a22
mov eax, dword [0x45b5a0]
mov ecx, dword [ebx]
shl eax, 0x14
cdq
push edx
push eax
push ecx
call fcn.00405be0
add esp, 0xc
test eax, eax
jne 0x408997
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x34], 4
mov dword [esp + 0x3c], edx
call fcn.0040a470
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.0040b3f0
add esp, 8
test al, al
jne 0x40897c
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 4]
mov eax, dword [eax + 8]
push eax
call fcn.0040b430
mov eax, dword [esp + 0x3c]
add esp, 4
lea edx, [esp + 0x10]
mov ecx, dword [eax + 4]
push edx
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x20]
call fcn.0040a470
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040b3f0
add esp, 8
test al, al
je 0x40893e
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0xffffffff
call fcn.0040a400
mov eax, 3
jmp 0x408a22
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], 5
push ecx
lea ecx, [esp + 0x20]
call fcn.0040a460
lea edx, [esp + 0x10]
lea ecx, [esp + 0x1c]
push edx
call fcn.0040a470
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040b3f0
add esp, 8
test al, al
jne 0x408a0f
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 4]
mov eax, dword [eax + 8]
push eax
call fcn.0040b430
add esp, 4
lea edx, [esp + 0x14]
lea ecx, [esp + 0x38]
push edi
push edx
call fcn.0040a480
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
call fcn.0040a470
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.0040b3f0
add esp, 8
test al, al
je 0x4089cd
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0xffffffff
call fcn.0040a400
xor eax, eax
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x24
ret 4