Function at 0x40aec2
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x640
mov eax, dword [0x420004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0x30
push ebx
push 0x420400
mov dword [ebp - 0x634], edx
mov esi, ecx
mov dword [ebp - 0x63c], edi
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x634]
add esp, 0xc
mov dword [0x420410], eax
test esi, esi
je 0x40af14
cmp word [esi], 0x5c
mov al, 1
je 0x40af16
mov al, bl
mov byte [ebp - 0x62d], al
test esi, esi
je 0x40b08f
test al, al
jne 0x40af57
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
xor eax, eax
mov word [ebp - 0xc], ax
lea eax, [ebp - 0x21c]
push 0x104
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
jne 0x40afcc
mov ebx, 0xc000000d
jmp 0x40b2de
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40af5c
sub ecx, edx
sar ecx, 1
cmp ecx, 0xe
jb 0x40af4d
push 0xe
push esi
push 0x401164
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x40af4d
mov edi, 0x104
lea eax, [ebp - 0x62c]
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
test eax, eax
jne 0x40afa7
mov ebx, 0xc0000001
jmp 0x40b2de
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [ebp - 0x610]
push eax
lea eax, [ebp - 0x21c]
push edi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
add esp, 0xc
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40afd5
sub ecx, edx
sar ecx, 1
lea edi, [ecx*2 + 2]
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x42041c], eax
test eax, eax
jne 0x40b00e
mov ebx, 0xc0000017
jmp 0x40b2de
push edi
lea ecx, [ebp - 0x21c]
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp byte [ebp - 0x62d], bl
jne 0x40b02c
add esi, 4
jmp 0x40b04a
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40b035
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 0x1c
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40b04f
sub ecx, edx
sar ecx, 1
lea edi, [ecx*2 + 2]
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x42042c], eax
test eax, eax
je 0x40b004
push edi
push esi
push eax
call sub.msvcrt.dll_memcpy
mov edi, dword [ebp - 0x63c]
add esp, 0xc
mov byte [0x42040c], bl
call fcn.0040f5cb
cmp eax, 2
jne 0x40b0a6
mov byte [0x42040c], 1
test edi, edi
jne 0x40b0b5
mov edi, 0x401184
mov dword [ebp - 0x63c], edi
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40b0ba
sub ecx, edx
sar ecx, 1
lea edi, [ecx*2 + 2]
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x420418], eax
test eax, eax
je 0x40b004
push edi
push dword [ebp - 0x63c]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor cl, cl
call fcn.0040db5a
mov ecx, eax
mov dword [0x420428], ecx
test ecx, ecx
jne 0x40b11a
mov ebx, 0xc0000225
jmp 0x40b2de
test byte [ebp - 0x634], 0x10
je 0x40b133
call fcn.0040d523
mov ecx, dword [0x420428]
mov byte [0x42040d], al
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40b136
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x634], eax
add eax, 0x3c
push eax
push 8
mov dword [ebp - 0x638], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40b004
push dword [ebp - 0x634]
mov dword [edi], 2
lea eax, [edi + 0x14]
push dword [0x420428]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x638]
lea ecx, [ebp - 0x21c]
add esp, 0xc
mov dword [0x420424], eax
mov dword [0x420420], edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40b1ad
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x638], eax
add eax, 0x3c
push eax
push 8
mov dword [ebp - 0x634], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40b004
push dword [ebp - 0x638]
lea eax, [ebp - 0x21c]
mov dword [edi], 2
push eax
lea eax, [edi + 0x14]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x634]
add esp, 0xc
mov dword [0x420404], eax
mov dword [0x420400], edi
test esi, esi
je 0x40b2e3
push 0x401190
push esi
cmp byte [ebp - 0x62d], bl
jne 0x40b252
lea eax, [ebp - 0x10]
push eax
push 0x4011bc
lea eax, [ebp - 0x424]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_swprintf_s]
add esp, 0x18
jmp 0x40b278
lea eax, [ebp - 0x21c]
push eax
push 0x401164
push 0x4011cc
lea eax, [ebp - 0x424]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_swprintf_s]
add esp, 0x1c
mov ecx, dword [ebp - 0x63c]
lea edx, [ebp - 0x638]
call fcn.00410cc5
mov eax, dword [ebp - 0x638]
lea ecx, [ebp - 0x424]
push eax
mov word [0x420414], ax
call fcn.0041e617
mov dword [0x420408], eax
test eax, eax
jne 0x40b2e3
push 2
push ebx
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [0x420408], eax
test eax, eax
jne 0x40b2e3
mov ebx, 0xc0000001
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4011e0
push 4
call fcn.0040fadc
add esp, 0xc
call fcn.0040ade2
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ef80
mov esp, ebp
pop ebp
ret 4