Function at 0x40c680
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e42fb
mov eax, dword fs:[0]
push eax
sub esp, 0xfc
mov eax, dword [0x50f130]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [0x5156f8]
add eax, 0xfffffff0
mov dword [ebp - 0xf0], 0x515668
call fcn.004012d0
lea ebx, [eax + 0x10]
mov dword [ebp - 0xe4], ebx
lea eax, [ebp - 0xe4]
xor esi, esi
push eax
mov dword [ebp - 4], esi
call fcn.0040c4b0
cmp eax, esi
mov dword [ebp - 0xf8], eax
jne 0x40c719
lea eax, [ebx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c70f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40c9c3
cmp dword [0x5156c8], esi
jne 0x40c795
mov ecx, dword [0x5156f8]
push ecx
push 0x4f08f0
mov ecx, 0x515890
call fcn.004899e0
push 0xc6
lea edx, [ebp - 0xde]
push esi
mov byte [ebp - 4], 1
push edx
mov dword [ebp - 0xf4], esi
mov word [ebp - 0xe0], si
call fcn.004be320
add esp, 0x14
lea eax, [ebp - 0xe0]
push eax
push 0x64
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
lea esp, [esp]
mov edi, dword [ebp - 0xf4]
cmp word [ebp + edi*2 - 0xe0], 0
lea edi, [ebp + edi*2 - 0xe0]
jne 0x40c800
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xf8]
mov esi, 1
cmp eax, esi
jne 0x40c92b
mov eax, dword [0x5157dc]
test eax, eax
je 0x40c7ed
lea edx, [ebp - 0x104]
push edx
push 0
push 0x4a
lea ecx, [ebp - 0xec]
push eax
mov dword [ebp - 0xec], 0x64
mov dword [ebp - 0xe8], esi
mov dword [ebp - 0x104], 0x2711
mov dword [ebp - 0xfc], ecx
mov dword [ebp - 0x100], 8
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0xf0]
mov dword [eax + 8], esi
push 0x4f0948
jmp 0x40c991
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x40c91f
movzx ecx, word [edi]
mov esi, dword [ebx - 0xc]
test esi, esi
mov dword [ebp - 0xe8], ecx
jg 0x40c82a
push 0x80070057
call fcn.00401340
cmp dword [ebx - 4], 1
jle 0x40c845
mov edx, esi
push edx
lea eax, [ebp - 0xe4]
push eax
call fcn.00401180
mov ebx, dword [ebp - 0xe4]
test esi, esi
mov cx, word [ebp - 0xe8]
mov word [ebx], cx
jl 0x40c820
cmp esi, dword [ebx - 8]
jg 0x40c820
lea edx, [ebp - 0xe4]
mov dword [ebx - 0xc], esi
push edx
mov word [ebx + esi*2], 0
call fcn.0040c4b0
test eax, eax
jne 0x40c91f
movzx eax, word [edi]
mov esi, dword [ebp - 0xf0]
add esi, 0x90
mov dword [ebp - 0xe8], eax
mov eax, dword [esi]
mov edi, dword [eax - 0xc]
test edi, edi
jg 0x40c89d
push 0x80070057
call fcn.00401340
cmp dword [eax - 4], 1
jle 0x40c8ac
mov ecx, edi
push ecx
push esi
call fcn.00401180
test edi, edi
mov eax, dword [esi]
mov dx, word [ebp - 0xe8]
mov word [eax], dx
jl 0x40c820
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x40c820
mov dword [eax - 0xc], edi
mov eax, dword [esi]
mov word [eax + edi*2], 0
mov ecx, dword [esi]
push ecx
push 0x4f091c
mov ecx, 0x515890
call fcn.004899e0
lea eax, [ebx - 0x10]
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40c703
add dword [ebp - 0xf4], 4
jmp 0x40c770
cmp eax, 2
jne 0x40c99e
mov eax, dword [0x5157dc]
test eax, eax
je 0x40c97f
lea edx, [ebp - 0x104]
push edx
push 0
push 0x4a
lea ecx, [ebp - 0xec]
push eax
mov dword [ebp - 0xec], 0x64
mov dword [ebp - 0xe8], 3
mov dword [ebp - 0x104], 0x2711
mov dword [ebp - 0xfc], ecx
mov dword [ebp - 0x100], 8
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0xf0]
mov dword [eax + 8], 3
push 0x4f0964
mov ecx, 0x515890
call fcn.004899e0
add esp, 4
lea eax, [ebx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c9c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004b84de
mov esp, ebp
pop ebp
ret