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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57cf5d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
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.00562e6c
add esp, 8
mov dword [ebp - 0x14], eax
push eax
push ebx
call esi
xor eax, eax
mov dword [ebp - 0x2c], 0x3a0043
xor ecx, ecx
mov dword [ebp - 0x10], eax
xorps xmm0, xmm0
mov word [ebp - 0x28], cx
xor esi, esi
movlpd qword [ebp - 0x24], xmm0
test ebx, ebx
je 0x406c35
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
nop
mov eax, dword [ebp - 0x14]
mov ax, word [eax + esi*2]
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ecx, dword [ebp - 0x30]
cmp ecx, ebx
jb 0x406c2c
mov eax, dword [ebp - 0x34]
ja 0x406c21
cmp eax, edi
jbe 0x406c2c
mov edi, eax
mov ebx, ecx
mov eax, esi
mov dword [ebp - 0x10], eax
jmp 0x406c2f
mov eax, dword [ebp - 0x10]
inc esi
cmp esi, dword [ebp - 0x18]
jb 0x406bf0
mov ebx, dword [ebp - 0x14]
lea ecx, [ebp - 0x2c]
lea edx, [ecx + 2]
mov ax, word [ebx + eax*2]
mov word [ebp - 0x2c], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406c46
sub ecx, edx
lea eax, [ebp - 0x2c]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5f2c40
call fcn.0040c620
push str.Games
lea eax, [ebp - 0x20]
push 0x5f2c40
push eax
call fcn.0040b390
push 0x5c1e10
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 0
push eax
call fcn.0040b390
push 0x5f2c30
push eax
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 1
push eax
call fcn.0040b520
add esp, 0x24
mov byte [ebp - 4], 2
or edi, 0xffffffff
mov ecx, dword [eax]
mov esi, dword [0x5f2c40]
add esi, 0xfffffff0
mov dword [ebp - 0x18], esi
lea edx, [ecx - 0x10]
cmp edx, esi
je 0x406d0e
cmp dword [esi + 0xc], 0
jl 0x406d00
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x406d00
push edx
call fcn.0040c4e0
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, edi
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406cf6
mov esi, dword [esi]
push dword [ebp - 0x18]
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
mov ecx, esi
call edx
mov eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [0x5f2c40], eax
jmp 0x406d0e
push dword [ecx - 0xc]
push ecx
mov ecx, 0x5f2c40
call fcn.0040c620
mov edx, dword [ebp - 0x10]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x406d28
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x406d42
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x406d61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
call fcn.0055d993
mov eax, dword [0x5f2c40]
add esp, 4
cmp dword [eax - 4], 1
pop edi
pop esi
pop ebx
jle 0x406d8a
push dword [eax - 0xc]
mov ecx, 0x5f2c40
call fcn.0040c340
mov eax, dword [0x5f2c40]
push eax
push 0
push 0x1800
push dword [0x5f2b30]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret