Function at 0x405020
Capabilities:
Get disk information

Disassembly:
sub esp, 8
mov dword [esp], 0xc
mov eax, dword [esp]
add eax, 0x394
mov ecx, dword [esp]
xor eax, ecx
or al, 0xb7
mov dword [esp + 4], eax
mov edx, dword [esp]
mov eax, dword [esp]
imul edx, eax
sub edx, 0x3b5
mov ecx, dword [esp + 4]
mov eax, dword [esp]
imul ecx, eax
or edx, ecx
mov dword [esp], edx
mov eax, dword [esp + 4]
xor edx, edx
div dword [esp]
mov edx, dword [esp]
mov ecx, edx
shl ecx, 4
add ecx, edx
shl ecx, 4
sub ecx, edx
lea ecx, [ecx + ecx*2]
lea edx, [eax + ecx - 0x1d6]
mov dword [esp], edx
mov eax, dword [esp + 4]
or ecx, 0xffffffff
sub ecx, eax
and ecx, 1
mov dword [esp], ecx
mov eax, dword [esp]
cmp eax, 0xa
jb 0x4050c7
mov edx, dword [esp]
mov eax, dword [esp]
imul edx, eax
mov eax, 0x8d3dcb09
mul edx
shr edx, 4
mov ecx, dword [esp + 4]
and edx, ecx
mov dword [esp + 4], edx
jmp 0x4052af
mov eax, dword [esp]
cmp eax, 6
jbe 0x405107
mov eax, 0x359
xor edx, edx
div dword [esp + 4]
xor edx, edx
div dword [esp + 4]
lea ecx, [eax + eax*2]
lea ecx, [ecx + ecx*4]
shl ecx, 4
sub ecx, eax
lea edx, [ecx + ecx*2]
mov eax, dword [esp]
sub edx, eax
mov ecx, dword [esp + 4]
and edx, ecx
xor edx, 0x57
mov dword [esp], edx
jmp 0x4052af
mov eax, dword [esp]
cmp eax, 0x56
jbe 0x40515c
mov al, byte [esp]
mov dl, 0x41
imul dl
mov ecx, dword [esp + 4]
add al, cl
mov edx, dword [esp]
mov ecx, dword [esp]
add dl, cl
or al, dl
push eax
mov eax, dword [esp + 4]
lea edx, [eax + eax*2]
shl edx, 6
sub edx, eax
mov eax, 0xfffec700
sub eax, edx
mov ecx, dword [esp + 8]
add eax, ecx
mov ecx, dword [esp + 4]
mov edx, dword [esp + 4]
add ecx, edx
or eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_TransmitCommChar]
jmp 0x4052af
mov eax, dword [esp]
cmp eax, 0x37
jbe 0x405191
mov edx, dword [esp]
mov eax, dword [esp]
imul edx, eax
mov ecx, dword [esp]
lea ecx, [edx + ecx + 0x151]
mov eax, 0xd3
xor edx, edx
div dword [esp]
and ecx, eax
mov dword [esp], ecx
jmp 0x4052af
mov eax, dword [esp]
cmp eax, 0x1f
jbe 0x4051db
mov edx, dword [esp]
mov eax, 0x4bb
sub eax, edx
mov ecx, dword [esp]
and eax, ecx
push eax
mov edx, dword [esp + 4]
mov eax, 0x4bb
sub eax, edx
mov ecx, dword [esp + 4]
and eax, ecx
push eax
mov edx, dword [esp + 8]
mov eax, 0x4bb
sub eax, edx
mov ecx, dword [esp + 8]
and eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
jmp 0x4052af
mov eax, dword [esp]
test eax, eax
jne 0x4052af
mov eax, dword [esp + 4]
cmp eax, 0x3bf
jne 0x40521c
mov edx, dword [esp + 4]
push edx
push 0xb458
mov eax, dword [esp + 0xc]
push eax
push 0x578d
call fcn.00402940
add esp, 0x10
and eax, 0xffff
mov dword [esp + 4], eax
jmp 0x4052af
mov eax, dword [esp + 4]
cmp eax, 0x60
jae 0x40522e
mov ax, word [esp]
add esp, 8
ret
mov eax, dword [esp + 4]
cmp eax, 0x36
jae 0x405283
mov ecx, dword [esp + 4]
mov eax, dword [esp]
add ecx, eax
mov edx, dword [esp]
add ecx, edx
or ecx, 0x1f5
push ecx
mov edx, dword [esp + 8]
mov ecx, dword [esp + 4]
add edx, ecx
mov eax, dword [esp + 4]
add edx, eax
or edx, 0x1f5
push edx
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 8]
add eax, edx
mov ecx, dword [esp + 8]
add eax, ecx
or eax, 0x1f5
push eax
call dword [sym.imp.KERNEL32.dll_GetProfileIntW]
jmp 0x4052af
mov eax, dword [esp + 4]
cmp eax, 0x33
jne 0x4052af
mov eax, dword [esp + 4]
lea ecx, [eax + eax*4]
shl ecx, 4
sub ecx, eax
mov eax, 0xbacf914d
shl ecx, 2
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 9
mov dword [esp + 4], ecx
mov ecx, dword [esp + 4]
mov edx, dword [esp + 4]
sub ecx, edx
mov eax, dword [esp]
sub ecx, eax
xor ecx, 0x241
mov dword [esp + 4], ecx
mov eax, dword [esp + 4]
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
lea edx, [eax + eax*8]
mov eax, 0x1cb
sub eax, edx
mov ecx, dword [esp]
and eax, ecx
mov edx, dword [esp]
and eax, edx
mov dword [esp], eax
mov ax, word [esp + 4]
add esp, 8
ret