Function at 0x406820
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57970d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
push edi
push 0
push 0
call esi
mov ebx, eax
push 1
mov dword [ebp - 0x18], ebx
lea ecx, [ebx*2 + 2]
push ecx
call fcn.0055ff89
add esp, 8
mov edi, eax
mov dword [ebp - 0x14], edi
push edi
push ebx
call esi
xor eax, eax
mov dword [ebp - 0x28], 0x3a0043
xor ecx, ecx
mov dword [ebp - 0x10], eax
xorps xmm0, xmm0
mov word [ebp - 0x24], cx
xor esi, esi
movlpd qword [ebp - 0x20], xmm0
test ebx, ebx
je 0x4068d8
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
mov ax, word [eax + esi*2]
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ecx, dword [ebp - 0x2c]
cmp ecx, ebx
jb 0x4068cc
mov eax, dword [ebp - 0x30]
ja 0x4068c1
cmp eax, edi
jbe 0x4068cc
mov edi, eax
mov ebx, ecx
mov eax, esi
mov dword [ebp - 0x10], eax
jmp 0x4068cf
mov eax, dword [ebp - 0x10]
inc esi
cmp esi, dword [ebp - 0x18]
jb 0x406890
mov edi, dword [ebp - 0x14]
mov ax, word [edi + eax*2]
lea ecx, [ebp - 0x28]
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4068e6
sub ecx, edx
lea eax, [ebp - 0x28]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5f4654
call fcn.0040c1e0
push str.Games
lea eax, [ebp - 0x1c]
push 0x5f4654
push eax
call fcn.0040b350
push 0x5c4288
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 0
push eax
call fcn.0040b350
push 0x5f4644
push eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push eax
call fcn.0040b480
add esp, 0x24
mov byte [ebp - 4], 2
or esi, 0xffffffff
mov ecx, dword [eax]
mov ebx, dword [0x5f4654]
add ebx, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x4069a5
cmp dword [ebx + 0xc], 0
jl 0x406997
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x406997
push edx
call fcn.0040c100
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, esi
lea edx, [ebx + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40698d
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x18]
add eax, 0x10
mov dword [0x5f4654], eax
jmp 0x4069a5
push dword [ecx - 0xc]
push ecx
mov ecx, 0x5f4654
call fcn.0040c1e0
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4069c3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, esi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4069e1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x406a00
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push edi
call fcn.0055bf43
mov eax, dword [0x5f4654]
add esp, 4
cmp dword [eax - 4], 1
pop edi
pop esi
pop ebx
jle 0x406a29
push dword [eax - 0xc]
mov ecx, 0x5f4654
call fcn.0040bf80
mov eax, dword [0x5f4654]
push eax
push 0
push 0x1800
push dword [0x5f4528]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret