Function at 0x40f800
Capabilities:
Get disk information
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x100
mov eax, dword [str..X:]
mov ecx, dword [0x453804]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x110]
mov dword [esp + 0x1c], eax
push edi
mov eax, dword [esi + 0x12198]
mov dword [esp + 0x24], ecx
test eax, eax
mov byte [esi + 8], 0
mov dword [esp + 0x14], 0x19
jne 0x40fab4
lea ebp, [esi + 0x12eba]
mov ebx, 0x43
mov dword [esp + 0x18], ebp
lea edx, [esp + 0x24]
mov byte [esp + 0x24], bl
push edx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 5
jne 0x40faaa
push 0
push 0
push 3
push 0
push 3
lea eax, [esp + 0x34]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f8ab
push 0
push 0
push 3
push 0
push 3
lea ecx, [esp + 0x34]
push SysReAllocStringLen
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40faaa
lea edx, [esp + 0xd0]
push 0
push edx
lea eax, [esp + 0x30]
push 8
push eax
push 0
push 0
push 0x41018
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40f93a
xor eax, eax
mov dl, byte [esp + 0x2c]
mov al, byte [esi + 8]
mov ecx, eax
shl ecx, 5
add ecx, eax
xor eax, eax
mov byte [esi + ecx*4 + 0x121d5], dl
mov al, byte [esi + 8]
mov dl, byte [esp + 0x2e]
mov ecx, eax
shl ecx, 5
add ecx, eax
xor eax, eax
mov byte [esi + ecx*4 + 0x121d6], dl
mov al, byte [esi + 8]
mov dl, byte [esp + 0x2f]
mov ecx, eax
shl ecx, 5
add ecx, eax
xor eax, eax
mov byte [esi + ecx*4 + 0x121d7], dl
mov al, byte [esi + 8]
mov ecx, eax
shl ecx, 5
add ecx, eax
mov byte [esi + ecx*4 + 0x121d4], bl
mov al, byte [esi + 8]
mov ebp, eax
and ebp, 0xff
inc al
mov byte [esi + 8], al
jmp 0x40f964
mov dl, byte [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov byte [ebp - 1], dl
mov byte [ebp], 0
mov byte [ebp + 1], 0
mov byte [ebp - 2], bl
mov ebp, dword [esp + 0x14]
mov ecx, ebp
dec ecx
sub eax, 0x84
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
mov dword [esi + 0xc], edi
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
push eax
lea eax, [esp + 0x74]
lea edi, [esi + 0x394]
push eax
push esi
mov byte [esi + 9], bl
mov byte [esp + 0x7f], 0x48
mov dword [esp + 0x88], 0x40
mov dword [esp + 0x8c], edi
mov byte [esp + 0x91], 6
mov byte [esp + 0xac], 0x12
mov byte [esp + 0xb0], 0x40
mov byte [esp + 0x90], 0x18
mov byte [esp + 0x7c], 2
call fcn.0040f660
mov al, byte [esp + 0x7d]
add esp, 0xc
cmp al, 1
jne 0x40fa95
cmp byte [edi], 5
jne 0x40fa95
lea edx, [esi + 0x39c]
mov ecx, 0xfffffc6c
mov eax, edx
sub ecx, esi
cmp byte [eax], 0x20
jge 0x40f9f4
mov byte [eax], 0x20
inc eax
lea edi, [ecx + eax]
cmp edi, 0x30
jl 0x40f9ec
push 8
lea ecx, [esp + 0x4c]
push edx
push ecx
call fcn.0041ead0
lea edx, [esi + 0x3a4]
push 0x10
lea eax, [esp + 0x44]
push edx
push eax
mov byte [esp + 0x68], 0
call fcn.0041ead0
lea ecx, [esi + 0x3b4]
push 0x10
lea edx, [esp + 0x78]
push ecx
push edx
mov byte [esp + 0x68], 0
call fcn.0041ead0
add esp, 0x24
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x34]
lea edx, [esp + 0x48]
push eax
push ecx
movsx eax, byte [esi + 9]
mov ecx, dword [esp + 0x37]
push edx
mov edx, dword [esp + 0x3a]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, ebp
shl ecx, 5
and edx, 0xff
add ecx, ebp
and eax, 0xff
push edx
push eax
lea edx, [esi + ecx*4 + 0x121d8]
push str._d:_d:_d__c:__s__s__s
push edx
mov byte [esp + 0x84], 0
call fcn.0041ef81
add esp, 0x24
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x18]
mov dword [esi + 0xc], 0xffffffff
inc ebx
cmp ebx, 0x5b
jl 0x40f84d
mov al, byte [esi + 8]
test al, al
je 0x40fb85
mov edx, dword [esp + 0x14]
mov ebx, 0x19
sub ebx, edx
mov ebp, 1
cmp ebx, 0x19
mov dword [esi + 4], ebp
mov dword [esi + 0x12194], ebp
je 0x40fb70
xor cl, cl
and eax, 0xff
jle 0x40fb03
lea edx, [esi + 0x121d5]
mov edi, eax
mov al, byte [edx]
cmp al, cl
jbe 0x40fafa
mov cl, al
add edx, 0x84
dec edi
jne 0x40faf2
mov edx, 0x19
inc cl
sub edx, ebx
cmp edx, 0x19
jge 0x40fb3a
mov edi, 0x19
lea eax, [esi + 0x12eb9]
sub edi, edx
mov byte [eax], cl
mov dl, byte [eax]
add dl, 0x30
inc cl
mov byte [eax + 3], dl
mov byte [eax + 5], 0x30
mov byte [eax + 7], 0x30
sub eax, 0x84
dec edi
jne 0x40fb1e
mov eax, ebx
mov ecx, esi
shl eax, 5
add eax, ebx
push 0x84
shl eax, 2
sub ecx, eax
xor eax, eax
mov al, byte [esi + 8]
add ecx, 0x12f3c
mov edx, eax
push ecx
shl edx, 5
add edx, eax
lea eax, [esi + edx*4 + 0x121d4]
push eax
call fcn.0041ead0
add esp, 0xc
mov al, byte [esi + 8]
pop edi
add al, bl
mov byte [esi + 8], al
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x100
ret
push str.WNASPI32.DLL
mov byte [esi + 8], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40fed7
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetASPI32SupportInfo
push edi
call ebx
push str.SendASPI32Command
push edi
mov dword [0x455d04], eax
call ebx
mov dword [0x455d08], eax
mov dword [esi + 0x12190], eax
mov eax, dword [0x455d04]
test eax, eax
je 0x40fed7
mov ecx, dword [0x455d08]
test ecx, ecx
je 0x40fed7
call eax
test eax, eax
je 0x40fed7
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xd4]
mov dword [esi + 4], 1
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xd4]
mov byte [esp + 0xd4], al
push ecx
call dword [0x455d08]
mov al, byte [esp + 0xe0]
add esp, 4
test al, al
jne 0x40fc2c
mov al, 7
mov byte [esp + 0xdc], al
test al, al
mov byte [esp + 0x14], 0
jbe 0x40fec7
mov byte [esp + 0x13], 0
mov dword [esp + 0x1c], 0
xor bl, bl
mov dword [esp + 0x18], 0
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dl, byte [esp + 0x14]
mov ebp, eax
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
mov al, byte [esp + 0x13]
lea ecx, [esp + 0x70]
lea edi, [esi + 0x394]
push ecx
mov byte [esp + 0x77], 0x48
mov dword [esp + 0x80], 0x40
mov dword [esp + 0x84], edi
mov byte [esp + 0x89], 6
mov byte [esp + 0xa4], 0x12
mov byte [esp + 0xa8], 0x40
mov byte [esp + 0x76], dl
mov byte [esp + 0x7c], al
mov byte [esp + 0x7d], bl
mov byte [esp + 0x88], 0x18
mov byte [esp + 0x74], 2
mov dword [esp + 0x8c], ebp
call dword [0x455d08]
add esp, 4
test eax, eax
jne 0x40fce5
push 0xffffffffffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebp
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esp + 0x71], 1
jne 0x40fe7f
cmp byte [edi], 5
jne 0x40fe7f
lea ecx, [esi + 0x39c]
mov edx, 0xfffffc6c
mov eax, ecx
sub edx, esi
cmp byte [eax], 0x20
jge 0x40fd1e
mov byte [eax], 0x20
inc eax
lea edi, [edx + eax]
cmp edi, 0x30
jl 0x40fd16
push 8
lea edx, [esp + 0x4c]
push ecx
push edx
call fcn.0041ead0
lea eax, [esi + 0x3a4]
push 0x10
lea ecx, [esp + 0x44]
push eax
push ecx
mov byte [esp + 0x68], 0
call fcn.0041ead0
lea edx, [esi + 0x3b4]
push 0x10
lea eax, [esp + 0x78]
push edx
push eax
mov byte [esp + 0x68], 0
call fcn.0041ead0
xor eax, eax
mov dl, byte [esp + 0x38]
mov al, byte [esi + 8]
mov byte [esp + 0x84], 0
mov ecx, eax
push esi
shl ecx, 5
add ecx, eax
xor eax, eax
mov byte [esi + ecx*4 + 0x121d5], dl
mov al, byte [esi + 8]
mov dl, byte [esp + 0x3b]
mov ecx, eax
shl ecx, 5
add ecx, eax
xor eax, eax
mov byte [esi + ecx*4 + 0x121d6], dl
mov al, byte [esi + 8]
mov ecx, eax
shl ecx, 5
add ecx, eax
mov byte [esi + ecx*4 + 0x121d7], bl
call fcn.0040f550
add esp, 0x28
cmp al, 0x81
mov byte [esi + 9], al
jne 0x40fdc1
mov byte [esi + 9], 0x3f
xor eax, eax
mov al, byte [esi + 8]
mov edx, eax
shl edx, 5
add edx, eax
mov al, byte [esi + 9]
mov byte [esi + edx*4 + 0x121d4], al
mov al, byte [esi + 9]
test al, al
je 0x40fe2e
mov cl, byte [esp + 0x14]
mov dl, byte [esp + 0x13]
lea eax, [esi + 0x12175]
mov byte [esi + 0x12177], cl
push eax
mov byte [esi + 0x1217d], dl
mov byte [eax], 6
mov byte [esi + 0x1217e], bl
call dword [0x455d08]
add esp, 4
cmp eax, 1
jne 0x40fe2e
mov al, byte [esi + 0x12180]
xor ecx, ecx
mov cl, byte [esi + 8]
add al, 0x41
mov edx, ecx
mov byte [esi + 9], al
shl edx, 5
add edx, ecx
mov byte [esi + edx*4 + 0x121d4], al
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x34]
push eax
lea edx, [esp + 0x4c]
movsx eax, byte [esi + 9]
push ecx
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x24]
push ecx
and eax, 0xff
push edx
push eax
xor eax, eax
push str._d:_d:_d__c:__s__s__s
mov al, byte [esi + 8]
mov ecx, eax
shl ecx, 5
add ecx, eax
lea edx, [esi + ecx*4 + 0x121d8]
push edx
call fcn.0041ef81
mov al, byte [esi + 8]
add esp, 0x24
inc al
mov byte [esi + 8], al
mov ecx, dword [esp + 0x18]
inc bl
inc ecx
cmp bl, 7
mov dword [esp + 0x18], ecx
jb 0x40fc50
mov al, byte [esp + 0x13]
mov edx, dword [esp + 0x1c]
inc al
inc edx
cmp al, 8
mov byte [esp + 0x13], al
mov dword [esp + 0x1c], edx
jb 0x40fc46
mov al, byte [esp + 0x14]
mov cl, byte [esp + 0xdc]
inc al
cmp al, cl
mov byte [esp + 0x14], al
jb 0x40fc39
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x100
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x100
ret