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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41048e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push esi
xor esi, esi
mov dword [esp + 0x18], esi
push edi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
push esi
lea eax, [esp + 0x38]
push 1
push eax
mov dword [esp + 0x88], esi
call fcn.00408015
add esp, 0xc
push esi
lea eax, [esp + 0x38]
push 2
push eax
call fcn.00408015
add esp, 0xc
push esi
lea eax, [esp + 0x38]
push 3
push eax
call fcn.00408015
mov eax, dword [esp + 0x44]
sub eax, dword [esp + 0x40]
add esp, 0xc
push dword [esp + 0x1c]
cdq
push 0x38
pop ecx
idiv ecx
push eax
push dword [esp + 0x40]
push dword [esp + 0x40]
call fcn.00408d35
mov eax, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
add esp, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
cmp ebx, eax
je 0x4082a4
mov esi, ebx
add ebx, 0x38
cmp ebx, eax
je 0x4082a4
cmp dword [ebx + 0x14], 8
mov edi, dword [ebx + 0x10]
jb 0x408288
mov eax, dword [ebx]
jmp 0x40828a
mov eax, ebx
push eax
mov eax, dword [esi + 0x10]
mov ecx, esi
call fcn.004027b7
test eax, eax
je 0x4082de
mov esi, ebx
add ebx, 0x38
cmp ebx, dword [esp + 0x14]
jne 0x40827b
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
cmp esi, edi
je 0x408318
mov ebx, dword [esp + 0x38]
jmp 0x4082f9
cmp dword [ebx + 0x14], 8
mov edi, dword [ebx + 0x10]
jb 0x4082c3
mov eax, dword [ebx]
jmp 0x4082c5
mov eax, ebx
push eax
mov eax, dword [esi + 0x10]
mov ecx, esi
call fcn.004027b7
test eax, eax
je 0x4082de
add esi, 0x38
mov eax, ebx
call fcn.00408e16
add ebx, 0x38
cmp ebx, dword [esp + 0x14]
jne 0x4082b6
add esi, 0x38
jmp 0x4082a8
mov eax, edi
call fcn.00408e16
add esi, 0x38
add edi, 0x38
cmp edi, ebx
jne 0x4082ec
mov ebx, dword [esp + 0x38]
mov edi, esi
cmp esi, ebx
je 0x408314
push edi
call fcn.004081ac
add edi, 0x38
cmp edi, ebx
jne 0x408307
mov dword [esp + 0x38], esi
xor edi, edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov byte [esp + 0x7c], 1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [esp + 0x18], eax
mov bl, 1
mov dword [esp + 0x14], 1
jmp 0x408343
xor edi, edi
mov ecx, dword [esp + 0x14]
xor eax, eax
inc eax
shl eax, cl
test dword [esp + 0x18], eax
je 0x408514
movzx eax, bl
add ax, 0x61
push 0x3a
mov word [esp + 0x24], ax
pop eax
mov word [esp + 0x22], ax
push 0x5c
pop eax
mov word [esp + 0x24], ax
xor eax, eax
mov word [esp + 0x26], ax
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov esi, eax
cmp esi, 4
jne 0x4083e5
mov edi, dword [esp + 0x34]
cmp edi, dword [esp + 0x38]
je 0x408463
add edi, 0x1c
cmp dword [edi + 0x10], 2
jne 0x4083d7
mov ecx, dword [edi + 0x14]
cmp ecx, 8
jb 0x4083ae
mov eax, dword [edi]
jmp 0x4083b0
mov eax, edi
cmp word [eax + 2], 0x3a
jne 0x4083d7
cmp ecx, 8
jb 0x4083c0
mov eax, dword [edi]
jmp 0x4083c2
mov eax, edi
movzx eax, word [eax]
push eax
call fcn.0040a9cb
pop ecx
cmp word [esp + 0x20], ax
je 0x408514
add edi, 0x38
lea eax, [edi - 0x1c]
cmp eax, dword [esp + 0x38]
jne 0x40839c
jmp 0x408463
cmp esi, 2
jne 0x408418
push edi
lea eax, [esp + 0x2c]
push eax
push edi
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x408514
cmp dword [esp + 0x2c], edi
ja 0x408418
cmp dword [esp + 0x28], 0xa00000
jb 0x408514
cmp esi, 3
je 0x408427
cmp esi, 2
je 0x408427
cmp esi, 6
jne 0x408450
push edi
push edi
lea eax, [esp + 0x24]
push eax
push edi
push edi
push edi
push edi
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x408450
mov eax, dword [esp + 0x1c]
shr eax, 0x13
and al, 1
jne 0x408514
cmp esi, 3
je 0x408463
cmp esi, 2
je 0x408463
cmp esi, 6
jne 0x408514
xor eax, eax
and dword [esp + 0x64], eax
mov word [esp + 0x24], ax
mov word [esp + 0x54], ax
lea eax, [esp + 0x20]
push eax
lea esi, [esp + 0x58]
mov dword [esp + 0x6c], 7
call fcn.00402de4
mov byte [esp + 0x7c], 2
mov edi, dword [esp + 0x48]
mov eax, esi
cmp eax, edi
jae 0x4084d0
cmp dword [esp + 0x44], eax
ja 0x4084d0
sub eax, dword [esp + 0x44]
push 0x1c
cdq
pop ecx
idiv ecx
mov esi, eax
cmp edi, dword [esp + 0x4c]
jne 0x4084bd
lea ecx, [esp + 0x44]
call fcn.0040884d
mov edi, dword [esp + 0x48]
imul esi, esi, 0x1c
add esi, dword [esp + 0x44]
mov byte [esp + 0x7c], 3
test edi, edi
je 0x4084f8
push esi
jmp 0x4084f1
cmp edi, dword [esp + 0x4c]
jne 0x4084e3
lea ecx, [esp + 0x44]
call fcn.0040884d
mov edi, dword [esp + 0x48]
mov byte [esp + 0x7c], 4
test edi, edi
je 0x4084f8
lea eax, [esp + 0x54]
push eax
mov esi, edi
call fcn.0040522c
add edi, 0x1c
mov dword [esp + 0x48], edi
push 1
xor edi, edi
lea esi, [esp + 0x58]
mov byte [esp + 0x80], 1
call fcn.00402d33
inc bl
inc dword [esp + 0x14]
cmp bl, 0x19
jb 0x408341
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
sub eax, edi
push 0x38
cdq
pop esi
idiv esi
xor ecx, ecx
inc ecx
mov dword [esp + 0x14], ecx
cmp eax, ecx
jbe 0x4085fe
lea ecx, [esi + edi]
lea edx, [ecx - 0x38]
mov eax, dword [edx + 0x10]
cmp eax, dword [ecx + 0x10]
jae 0x4085dd
cmp dword [ecx + 0x14], 8
jb 0x40855e
mov edi, dword [ecx]
jmp 0x408560
mov edi, ecx
cmp word [edi + eax*2], 0x5c
jne 0x4085dd
or edi, 0xffffffff
mov ebx, eax
cmp eax, 0xffffffff
jae 0x408573
mov edi, eax
cmp dword [edx + 0x14], 8
jb 0x40857b
mov edx, dword [edx]
push edx
mov eax, ebx
call fcn.004027b7
test eax, eax
jne 0x4085dd
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
add eax, esi
dec dword [esp + 0x14]
sub esi, 0x38
lea edi, [eax + 0x38]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
cmp edi, ecx
je 0x4085be
mov ebx, eax
sub ebx, edi
lea esi, [edi + ebx]
mov eax, edi
call fcn.00408e16
add edi, 0x38
cmp edi, dword [esp + 0x1c]
jne 0x4085ab
mov edi, dword [esp + 0x38]
lea esi, [edi - 0x38]
jmp 0x4085d0
push esi
call fcn.004081ac
add esi, 0x38
cmp esi, edi
jne 0x4085c7
sub dword [esp + 0x38], 0x38
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
sub eax, edi
push 0x38
cdq
pop ecx
idiv ecx
inc dword [esp + 0x14]
add esi, 0x38
cmp dword [esp + 0x14], eax
jb 0x408542
mov esi, edi
cmp edi, dword [esp + 0x38]
je 0x408619
push esi
lea edi, [esp + 0x48]
call fcn.00408729
add esi, 0x38
cmp esi, dword [esp + 0x38]
jne 0x408606
mov esi, dword [ebp + 8]
xor edi, edi
lea eax, [esp + 0x44]
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
cmp esi, eax
je 0x408654
push esi
call fcn.00404a15
mov eax, dword [esp + 0x44]
mov dword [esi], eax
mov eax, dword [esp + 0x48]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esi + 8], eax
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
lea eax, [esp + 0x44]
push eax
call fcn.00404a15
cmp dword [esp + 0x34], edi
je 0x408687
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
cmp edi, ebx
je 0x40867d
push edi
call fcn.004081ac
add edi, 0x38
cmp edi, ebx
jne 0x408670
push dword [esp + 0x34]
call fcn.00409b84
pop ecx
mov ecx, dword [esp + 0x74]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret