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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51e762
mov eax, dword fs:[0]
push eax
sub esp, 0x868
mov eax, dword [0x562904]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x840], 0
xor eax, eax
mov ecx, 3
mov dword [ebp - 0x834], 0
cmp dword [esi + 0x10], ecx
mov word [ebp - 0x834], ax
mov eax, esi
cmovb ecx, dword [esi + 0x10]
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x824], 0
mov dword [ebp - 0x820], 7
jb 0x40c7f7
mov eax, dword [esi]
push ecx
push eax
lea ecx, [ebp - 0x834]
call fcn.004046e0
mov eax, 4
mov dword [ebp - 0x83c], eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x81c]
cmp dword [ebp - 0x820], 8
lea eax, [ebp - 0x834]
push 0
cmovae eax, dword [ebp - 0x834]
xorps xmm0, xmm0
push 0
push ecx
push eax
movq qword [ebp - 0x81c], xmm0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40caaa
push 0x800
lea eax, [ebp - 0x810]
mov dword [ebp - 0x814], 1
push 0
push eax
call fcn.004f3680
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x40c877
mov esi, dword [esi]
push 0x400
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x814]
push eax
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x40c9e2
xor eax, eax
mov dword [ebp - 0x874], 0
lea ecx, [ebp - 0x810]
mov dword [ebp - 0x864], 0
mov dword [ebp - 0x860], 7
lea edx, [ecx + 2]
mov word [ebp - 0x874], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c8d1
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x874]
call fcn.004046e0
mov byte [ebp - 4], 1
lea esi, [ebp - 0x874]
cmp dword [ebp - 0x860], 8
mov eax, 5
mov ebx, dword [ebp - 0x874]
cmovae esi, ebx
mov dword [ebp - 0x83c], eax
mov dword [ebp - 0x840], eax
cmp dword [ebp - 0x864], eax
jne 0x40c946
mov ecx, str.FAT32
mov edx, eax
sub esi, ecx
nop
mov ax, word [ecx + esi]
cmp ax, word [ecx]
jne 0x40c946
add ecx, 2
sub edx, 1
jne 0x40c930
jmp 0x40c9e8
lea ecx, [ebp - 0x810]
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x84c], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x848], 7
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c970
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x85c]
call fcn.004046e0
cmp dword [ebp - 0x848], 8
lea esi, [ebp - 0x85c]
mov edi, dword [ebp - 0x85c]
mov eax, 7
cmovae esi, edi
mov dword [ebp - 0x83c], eax
cmp dword [ebp - 0x84c], 4
jne 0x40c9d9
mov ecx, str.NTFS
lea edx, [eax - 3]
sub esi, ecx
mov ax, word [ecx + esi]
cmp ax, word [ecx]
jne 0x40c9d9
add ecx, 2
sub edx, 1
jne 0x40c9c6
jmp 0x40c9ee
mov byte [ebp - 0x835], 1
jmp 0x40c9f5
mov ebx, dword [ebp - 0x874]
mov edi, dword [ebp - 0x85c]
mov byte [ebp - 0x835], 0
mov eax, dword [ebp - 0x83c]
test al, 2
je 0x40ca48
mov ecx, dword [ebp - 0x848]
and eax, 0xfffffffd
mov dword [ebp - 0x83c], eax
cmp ecx, 8
jb 0x40ca48
lea ecx, [ecx*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x40ca38
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb15
push ecx
push edi
call fcn.004f19ca
mov eax, dword [ebp - 0x83c]
add esp, 8
test al, 1
je 0x40ca86
mov eax, dword [ebp - 0x860]
cmp eax, 8
jb 0x40ca86
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x40ca7c
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb15
push ecx
push ebx
call fcn.004f19ca
add esp, 8
cmp byte [ebp - 0x835], 0
jne 0x40caaa
mov edx, dword [ebp - 0x818]
mov ecx, dword [ebp - 0x81c]
call fcn.004f1f50
mulsd xmm0, qword [0x552ef8]
jmp 0x40caad
xorps xmm0, xmm0
mov edx, dword [ebp - 0x820]
movsd qword [ebp - 0x844], xmm0
cmp edx, 8
jb 0x40caf1
mov ecx, dword [ebp - 0x834]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cae7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb15
push edx
push ecx
call fcn.004f19ca
add esp, 8
movsd xmm0, qword [ebp - 0x844]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f1532
mov esp, ebp
pop ebp
ret
call fcn.004fbf0c
int3