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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x411bd9
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.00409454
add esp, 0xc
push esi
lea eax, [esp + 0x38]
push 2
push eax
call fcn.00409454
add esp, 0xc
push esi
lea eax, [esp + 0x38]
push 3
push eax
call fcn.00409454
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.0040a174
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 0x4096e3
mov esi, ebx
add ebx, 0x38
cmp ebx, eax
je 0x4096e3
cmp dword [ebx + 0x14], 8
mov edi, dword [ebx + 0x10]
jb 0x4096c7
mov eax, dword [ebx]
jmp 0x4096c9
mov eax, ebx
push eax
mov eax, dword [esi + 0x10]
mov ecx, esi
call fcn.00402d60
test eax, eax
je 0x40971d
mov esi, ebx
add ebx, 0x38
cmp ebx, dword [esp + 0x14]
jne 0x4096ba
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
cmp esi, edi
je 0x409757
mov ebx, dword [esp + 0x38]
jmp 0x409738
cmp dword [ebx + 0x14], 8
mov edi, dword [ebx + 0x10]
jb 0x409702
mov eax, dword [ebx]
jmp 0x409704
mov eax, ebx
push eax
mov eax, dword [esi + 0x10]
mov ecx, esi
call fcn.00402d60
test eax, eax
je 0x40971d
add esi, 0x38
mov eax, ebx
call fcn.0040a255
add ebx, 0x38
cmp ebx, dword [esp + 0x14]
jne 0x4096f5
add esi, 0x38
jmp 0x4096e7
mov eax, edi
call fcn.0040a255
add esi, 0x38
add edi, 0x38
cmp edi, ebx
jne 0x40972b
mov ebx, dword [esp + 0x38]
mov edi, esi
cmp esi, ebx
je 0x409753
push edi
call fcn.004095eb
add edi, 0x38
cmp edi, ebx
jne 0x409746
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 0x409782
xor edi, edi
mov ecx, dword [esp + 0x14]
xor eax, eax
inc eax
shl eax, cl
test dword [esp + 0x18], eax
je 0x409953
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 0x409824
mov edi, dword [esp + 0x34]
cmp edi, dword [esp + 0x38]
je 0x4098a2
add edi, 0x1c
cmp dword [edi + 0x10], 2
jne 0x409816
mov ecx, dword [edi + 0x14]
cmp ecx, 8
jb 0x4097ed
mov eax, dword [edi]
jmp 0x4097ef
mov eax, edi
cmp word [eax + 2], 0x3a
jne 0x409816
cmp ecx, 8
jb 0x4097ff
mov eax, dword [edi]
jmp 0x409801
mov eax, edi
movzx eax, word [eax]
push eax
call fcn.0040c1ab
pop ecx
cmp word [esp + 0x20], ax
je 0x409953
add edi, 0x38
lea eax, [edi - 0x1c]
cmp eax, dword [esp + 0x38]
jne 0x4097db
jmp 0x4098a2
cmp esi, 2
jne 0x409857
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 0x409953
cmp dword [esp + 0x2c], edi
ja 0x409857
cmp dword [esp + 0x28], 0xa00000
jb 0x409953
cmp esi, 3
je 0x409866
cmp esi, 2
je 0x409866
cmp esi, 6
jne 0x40988f
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 0x40988f
mov eax, dword [esp + 0x1c]
shr eax, 0x13
and al, 1
jne 0x409953
cmp esi, 3
je 0x4098a2
cmp esi, 2
je 0x4098a2
cmp esi, 6
jne 0x409953
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.004033b5
mov byte [esp + 0x7c], 2
mov edi, dword [esp + 0x48]
mov eax, esi
cmp eax, edi
jae 0x40990f
cmp dword [esp + 0x44], eax
ja 0x40990f
sub eax, dword [esp + 0x44]
push 0x1c
cdq
pop ecx
idiv ecx
mov esi, eax
cmp edi, dword [esp + 0x4c]
jne 0x4098fc
lea ecx, [esp + 0x44]
call fcn.00409c8c
mov edi, dword [esp + 0x48]
imul esi, esi, 0x1c
add esi, dword [esp + 0x44]
mov byte [esp + 0x7c], 3
test edi, edi
je 0x409937
push esi
jmp 0x409930
cmp edi, dword [esp + 0x4c]
jne 0x409922
lea ecx, [esp + 0x44]
call fcn.00409c8c
mov edi, dword [esp + 0x48]
mov byte [esp + 0x7c], 4
test edi, edi
je 0x409937
lea eax, [esp + 0x54]
push eax
mov esi, edi
call fcn.00405f19
add edi, 0x1c
mov dword [esp + 0x48], edi
push 1
xor edi, edi
lea esi, [esp + 0x58]
mov byte [esp + 0x80], 1
call fcn.00403304
inc bl
inc dword [esp + 0x14]
cmp bl, 0x19
jb 0x409780
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 0x409a3d
lea ecx, [esi + edi]
lea edx, [ecx - 0x38]
mov eax, dword [edx + 0x10]
cmp eax, dword [ecx + 0x10]
jae 0x409a1c
cmp dword [ecx + 0x14], 8
jb 0x40999d
mov edi, dword [ecx]
jmp 0x40999f
mov edi, ecx
cmp word [edi + eax*2], 0x5c
jne 0x409a1c
or edi, 0xffffffff
mov ebx, eax
cmp eax, 0xffffffff
jae 0x4099b2
mov edi, eax
cmp dword [edx + 0x14], 8
jb 0x4099ba
mov edx, dword [edx]
push edx
mov eax, ebx
call fcn.00402d60
test eax, eax
jne 0x409a1c
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 0x4099fd
mov ebx, eax
sub ebx, edi
lea esi, [edi + ebx]
mov eax, edi
call fcn.0040a255
add edi, 0x38
cmp edi, dword [esp + 0x1c]
jne 0x4099ea
mov edi, dword [esp + 0x38]
lea esi, [edi - 0x38]
jmp 0x409a0f
push esi
call fcn.004095eb
add esi, 0x38
cmp esi, edi
jne 0x409a06
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 0x409981
mov esi, edi
cmp edi, dword [esp + 0x38]
je 0x409a58
push esi
lea edi, [esp + 0x48]
call fcn.00409b68
add esi, 0x38
cmp esi, dword [esp + 0x38]
jne 0x409a45
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 0x409a93
push esi
call fcn.00405580
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.00405580
cmp dword [esp + 0x34], edi
je 0x409ac6
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
cmp edi, ebx
je 0x409abc
push edi
call fcn.004095eb
add edi, 0x38
cmp edi, ebx
jne 0x409aaf
push dword [esp + 0x34]
call fcn.0040aee7
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