Function at 0x406310
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x173c
call fcn.00415280
mov eax, dword [0x42d278]
xor eax, esp
mov dword [esp + 0x1738], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x1000
lea eax, [esp + 0x744]
push ebx
push eax
mov dword [esp + 0x1c], ebx
call fcn.00414e60
push 0x208
lea ecx, [esp + 0x4c8]
push ebx
push ecx
call fcn.00414e60
add esp, 0x18
mov dword [esp + 0x14], 0xffffffff
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [eax + 0x434ec0]
mov word [esp + eax + 0x4b8], cx
add eax, 2
cmp cx, bx
jne 0x406370
push 0x80
lea edx, [esp + 0x6c4]
push ebx
push edx
call fcn.00414e60
lea eax, [esp + 0x4c4]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4063a7
sub eax, edx
sar eax, 1
cmp eax, 3
ja 0x4063f0
lea eax, [esp + 0x4b8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
add eax, 0xfffffffe
mov ecx, 3
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [esp + 0x10], eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1738]
xor ecx, esp
call fcn.0040eac3
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [esp + 0x4b8]
push edx
call edi
lea esi, [esp + eax*2 + 0x4b6]
lea eax, [esp + 0x4b8]
push 0x5c
push eax
call fcn.00410f54
add esp, 8
cmp eax, esi
jne 0x40643e
lea eax, [esp + 0x4b8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406427
sub eax, edx
sar eax, 1
mov word [esp + eax*2 + 0x4b6], bx
push 0x429cc0
call edi
push eax
lea ecx, [esp + 0x4bc]
push 0x429cc0
push ecx
call fcn.0040f9dd
add esp, 0xc
test eax, eax
jne 0x4064c3
lea edx, [esp + 0x4bc]
push 0x5c
push edx
call fcn.0040f9bb
add esp, 8
cmp eax, ebx
jne 0x406496
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1738]
xor ecx, esp
call fcn.0040eac3
mov esp, ebp
pop ebp
ret
add eax, 2
push 0x5c
push eax
call fcn.0040f9bb
add esp, 8
test eax, eax
jne 0x4064c3
mov dword [esp + 0x10], ebx
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1738]
xor ecx, esp
call fcn.0040eac3
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x4bc]
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x4065c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x4064f3
cmp eax, 2
jne 0x406475
mov eax, dword [0x4352d8]
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x800
lea edx, [esp + 0x744]
push edx
push 0x3c
push eax
call esi
mov edx, dword [0x4352d8]
push 0x40
lea ecx, [esp + 0x6c4]
push ecx
push 0x442
push edx
call esi
push 0x24
lea eax, [esp + 0x6c4]
push eax
lea ecx, [esp + 0x748]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je 0x40656d
cmp eax, 1
je 0x40656d
mov dword [esp + 0x10], 3
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1738]
xor ecx, esp
call fcn.0040eac3
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x4b8]
call fcn.00406070
test eax, eax
jne 0x40659e
mov dword [esp + 0x10], 2
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1738]
xor ecx, esp
call fcn.0040eac3
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x268]
push edx
lea eax, [esp + 0x4bc]
push eax
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406475
mov ecx, dword [esp + 0x268]
mov dword [esp + 0x18], ecx
jmp 0x4065cc
mov ebx, dword [esp + 0x14]
test byte [esp + 0x18], 0x10
jne 0x4065db
mov dword [esp + 0x10], 1
cmp edi, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
je 0x4065e9
push edi
call esi
cmp ebx, 0xffffffff
je 0x4065f1
push ebx
call esi
mov ecx, dword [esp + 0x1744]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040eac3
mov esp, ebp
pop ebp
ret