Function at 0x40d59c
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30054
call fcn.0040f7c0
mov eax, dword [0x421e50]
xor eax, ebp
mov dword [ebp - 0x20], eax
push esi
push edi
xor eax, eax
jne 0x40d5b5
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040d2bc
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40d5db
or eax, 0xffffffff
jmp 0x40da2f
push dword [ebp + 0xc]
call dword [0x422c4c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 7
jl 0x40d665
push 4
push 0x421b10
push 4
push dword [ebp + 0xc]
push 0
push 0x7f
call dword [0x422be0]
dec eax
dec eax
jne 0x40d665
push 2
push 0x421b1c
push 2
mov eax, dword [ebp + 0xc]
add eax, 0xa
push eax
push 0
push 0x7f
call dword [0x422be0]
dec eax
dec eax
jne 0x40d64e
mov eax, dword [ebp - 8]
sub eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
lea eax, [eax + eax + 2]
push eax
mov eax, dword [ebp + 0xc]
add eax, 8
push eax
push dword [ebp + 0xc]
call fcn.004103d0
add esp, 0xc
xor eax, eax
jne 0x40d648
jmp 0x40d665
call fcn.004102e6
mov dword [eax], 0x16
xor eax, eax
jne 0x40d659
or eax, 0xffffffff
jmp 0x40da2f
cmp dword [ebp - 0xc], 0xa0000003
jne 0x40da28
mov eax, dword [0x421b24]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0x421b28
mov dword [ebp - 0x10], 0x421b2c
xor eax, eax
jne 0x40d688
push 0
lea eax, [ebp - 0x20028]
push eax
push 0x8000
push dword [ebp + 8]
call dword [0x422c0c]
mov al, byte [ebp - 0x20028]
mov byte [ebp - 0x14], al
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [ebp - 4], eax
xor eax, eax
jne 0x40d6b9
cmp dword [ebp - 4], 4
jne 0x40d8cf
and dword [ebp - 0x2002c], 0
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
test eax, eax
je 0x40d8b3
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 2]
cmp eax, 0x3a
jne 0x40d8b3
mov esi, 0x421b30
lea edi, [ebp - 0x30040]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 0x20030], 0x8000
mov ax, word [ebp - 0x20028]
mov word [ebp - 0x30040], ax
lea eax, [ebp - 0x20030]
push eax
lea eax, [ebp - 0x30038]
push eax
lea eax, [ebp - 0x30040]
push eax
call fcn.0041c74b
mov dword [ebp - 0x20034], eax
cmp dword [ebp - 0x20034], 0
jne 0x40d8b3
xor eax, eax
jne 0x40d73f
movzx eax, word [ebp - 0x30038]
cmp eax, 0x5c
jne 0x40d8b3
movzx eax, word [ebp - 0x30036]
cmp eax, 0x5c
jne 0x40d8b3
push 0x5c
lea eax, [ebp - 0x30034]
push eax
call fcn.00411acf
pop ecx
pop ecx
mov dword [ebp - 0x30044], eax
cmp dword [ebp - 0x30044], 0
je 0x40d8b3
mov eax, dword [ebp - 0x30044]
movzx eax, word [eax + 4]
cmp eax, 0x24
jne 0x40d803
mov eax, dword [ebp - 0x30044]
movzx eax, word [eax + 6]
test eax, eax
jne 0x40d803
xor eax, eax
jne 0x40d7a3
mov eax, dword [ebp - 0x30044]
movsx eax, byte [eax + 2]
push eax
call fcn.00411a84
pop ecx
mov byte [ebp - 0x30045], al
mov eax, dword [ebp + 0xc]
movsx eax, byte [eax]
push eax
call fcn.00411a84
pop ecx
mov byte [ebp - 0x30046], al
movsx eax, byte [ebp - 0x30045]
movsx ecx, byte [ebp - 0x30046]
cmp eax, ecx
jne 0x40d7fe
mov eax, dword [ebp + 0xc]
mov cx, word [ebp - 0x30040]
mov word [eax], cx
mov dword [ebp - 0x2002c], 1
xor eax, eax
jne 0x40d7fa
jmp 0x40d8b3
xor eax, eax
jne 0x40d803
mov eax, dword [ebp + 0xc]
mov cx, word [ebp - 0x20028]
mov word [eax], cx
push dword [ebp + 0xc]
call dword [0x422c08]
mov dword [ebp - 0x3004c], eax
xor eax, eax
jne 0x40d823
cmp dword [ebp - 0x3004c], 0xffffffff
je 0x40d840
mov dword [ebp - 0x2002c], 1
xor eax, eax
jne 0x40d83a
jmp 0x40d8b3
xor eax, eax
jne 0x40d840
push 0x5c
mov eax, dword [ebp + 0xc]
add eax, 6
push eax
call fcn.00411acf
pop ecx
pop ecx
mov dword [ebp - 0x30050], eax
cmp dword [ebp - 0x30050], 0
je 0x40d8b3
push dword [ebp - 0x30050]
call dword [0x422c4c]
lea eax, [eax + eax + 2]
push eax
push dword [ebp - 0x30050]
mov eax, dword [ebp + 0xc]
add eax, 4
push eax
call fcn.004103d0
add esp, 0xc
push dword [ebp + 0xc]
call dword [0x422c08]
mov dword [ebp - 0x3004c], eax
xor eax, eax
jne 0x40d898
cmp dword [ebp - 0x3004c], 0xffffffff
je 0x40d8b3
mov dword [ebp - 0x2002c], 1
xor eax, eax
jne 0x40d8af
cmp dword [ebp - 0x2002c], 0
jne 0x40d8cf
call fcn.004102e6
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x40da2f
lea eax, [ebp - 0x20028]
push eax
call fcn.0040d136
pop ecx
push 0
lea eax, [ebp - 0x10020]
push eax
push 0x8000
push dword [ebp + 0xc]
call dword [0x422c0c]
xor eax, eax
jne 0x40d8f3
xor eax, eax
jne 0x40d8f7
lea eax, [ebp - 0x20028]
mov dword [ebp - 0x10024], eax
lea eax, [ebp - 0x10020]
mov dword [ebp - 0x1c], eax
jmp 0x40d928
mov eax, dword [ebp - 0x10024]
inc eax
inc eax
mov dword [ebp - 0x10024], eax
mov eax, dword [ebp - 0x1c]
inc eax
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10024]
mov cx, word [ecx]
mov word [eax], cx
mov eax, dword [ebp - 0x18]
movzx eax, word [eax]
test eax, eax
je 0x40d97d
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
mov cx, word [ecx]
mov word [eax], cx
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
test eax, eax
je 0x40d97d
push dword [ebp - 0x18]
call dword [0x422c54]
push dword [ebp - 0x10]
call dword [0x422c54]
mov eax, dword [ebp - 0x18]
movzx eax, word [eax]
mov ecx, dword [ebp - 0x10]
movzx ecx, word [ecx]
cmp eax, ecx
je 0x40d97b
jmp 0x40d97d
jmp 0x40d912
mov eax, dword [ebp - 0x10024]
lea ecx, [ebp - 0x20028]
cmp eax, ecx
je 0x40da28
jmp 0x40d9a9
mov eax, dword [ebp - 0x10024]
dec eax
dec eax
mov dword [ebp - 0x10024], eax
mov eax, dword [ebp - 0x1c]
dec eax
dec eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10024]
movzx eax, word [eax - 2]
cmp eax, 0x5c
je 0x40d9ba
jmp 0x40d993
xor eax, eax
jne 0x40d9ba
xor eax, eax
jne 0x40d9be
mov eax, dword [ebp + 0xc]
and word [eax], 0
mov eax, dword [ebp - 0x10024]
mov dword [ebp - 0x30054], eax
jmp 0x40d9e5
mov eax, dword [ebp - 0x30054]
inc eax
inc eax
mov dword [ebp - 0x30054], eax
mov eax, dword [ebp - 0x30054]
movzx eax, word [eax]
test eax, eax
je 0x40da10
mov eax, dword [ebp - 0x30054]
movzx eax, word [eax]
cmp eax, 0x5c
jne 0x40da0e
push 0x421b38
push dword [ebp + 0xc]
call dword [0x422c3c]
jmp 0x40d9d7
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
call dword [0x422c3c]
push dword [ebp + 0xc]
call dword [0x422c4c]
mov dword [ebp - 8], eax
xor eax, eax
jne 0x40da28
mov eax, dword [ebp - 8]
pop edi
pop esi
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0040f274
leave
ret