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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x46e780]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [0x46fb44]
mov esi, dword [ebp + 8]
mov ebx, eax
mov eax, dword [esi - 0xc]
test eax, eax
jl 0x412190
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
test eax, eax
je 0x412190
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x4121f9
lea eax, [ebp - 0x1c]
push str._GetMaxDisk__Invalid_arguments__Missing_operator_____:
push eax
lea ecx, [ebp + 8]
call fcn.004022b0
mov edi, dword [eax]
xor esi, esi
add esp, 8
cmp edi, esi
jne 0x4121b1
mov dword [ebp - 8], esi
jmp 0x4121df
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x4121c7
mov dword [ebp - 8], esi
jmp 0x4121df
lea esi, [eax + eax]
mov eax, esi
call fcn.004411d0
mov eax, esp
push ebx
push esi
push edi
push eax
call fcn.00408520
mov dword [ebp - 8], eax
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x48]
call fcn.0043a782
push 0x468880
lea edx, [ebp - 0x48]
push edx
call fcn.0043e4e2
cmp dword [esi - 0xc], 0
jge 0x412204
or eax, 0xffffffff
jmp 0x41221f
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
test eax, eax
jne 0x41221b
or eax, 0xffffffff
jmp 0x41221f
sub eax, esi
sar eax, 1
push eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp + 8]
call fcn.004079f0
cmp dword [esi - 0xc], 0
jge 0x412237
or eax, 0xffffffff
jmp 0x412252
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
test eax, eax
jne 0x41224e
or eax, 0xffffffff
jmp 0x412252
sub eax, esi
sar eax, 1
add eax, 2
lea ebx, [ebp + 8]
call fcn.00407860
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x1c], eax
call fcn.00402490
add esp, 4
mov dword [ebp - 0x18], eax
call fcn.00421a7e
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x41228e
push 0x80004005
call fcn.00401350
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 8], eax
mov dword [ebp - 0x38], edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [ebp - 0x2c], eax
mov ebx, 2
call fcn.00421a7e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x412284
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov edx, 1
mov ecx, ebx
shl edx, cl
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x2c]
test eax, edx
je 0x4123dd
mov cl, bl
add cl, 0x41
lea edx, [ebp - 0x10]
mov byte [ebp - 0x10], cl
push edx
lea ecx, [ebp - 0xc]
mov byte [ebp - 0xf], 0
call fcn.00405190
push 0x462154
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.004021d0
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov esi, eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412338
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, 3
jne 0x4123dd
push 0x462154
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x20]
push edx
call fcn.004021d0
mov eax, dword [eax]
add esp, 0xc
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x50]
push edx
lea ecx, [ebp - 0x44]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41238a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x30]
cmp ecx, dword [ebp - 0x38]
jb 0x4123dd
mov eax, dword [ebp - 0x34]
ja 0x41239b
cmp eax, edi
jbe 0x4123dd
mov dword [ebp - 0x38], ecx
push 0x462154
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
mov edi, eax
call fcn.004021d0
add esp, 0xc
push eax
lea ecx, [ebp - 8]
call fcn.004029f0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4123dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4123fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, 1
cmp ebx, 0x1a
jl 0x4122ae
mov ebx, dword [ebp - 8]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41245e
push 0x4602d4
push 0x45fd14
lea ecx, [ebp - 8]
push ecx
call fcn.004144d0
mov ebx, dword [ebp - 8]
push ecx
lea eax, [ebx - 0x10]
mov dword [ebp - 0x14], esp
mov esi, esp
push eax
call fcn.00402490
mov edx, dword [ebp - 0x18]
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 0x14], esp
mov esi, esp
push edx
call fcn.00402490
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0040b290
add esp, 8
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41247a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412496
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4124b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4124d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x5c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00439e3e
mov esp, ebp
pop ebp
ret