Function at 0x40fd90
Capabilities:
Enumerate disk volumes
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4f94d6
mov eax, dword fs:[0]
push eax
sub esp, 0xe78
mov eax, dword [0x5365f0]
xor eax, esp
mov dword [esp + 0xe70], eax
push ebx
push esi
push edi
mov eax, dword [0x5365f0]
xor eax, esp
push eax
lea eax, [esp + 0xe88]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x206
xor ebx, ebx
lea edx, [esp + 0x62]
xor ecx, ecx
push ebx
push edx
mov dword [esp + 0x24], eax
mov word [esp + 0x68], cx
call fcn.004da450
add esp, 0xc
push 0x104
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x40fe13
xor eax, eax
jmp 0x410193
lea eax, [esp + 0x5c]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40fe20
sub eax, edx
mov edi, 0x5c
sar eax, 1
cmp word [esp + 0x5c], di
jne 0x410183
cmp word [esp + 0x5e], di
jne 0x410183
cmp word [esp + 0x60], 0x3f
jne 0x410183
cmp word [esp + 0x62], di
jne 0x410183
cmp word [esp + eax*2 + 0x5a], di
lea esi, [esp + eax*2 + 0x5a]
jne 0x410183
push 0x206
lea eax, [esp + 0x26a]
xor ecx, ecx
xor edx, edx
push ebx
push eax
mov word [esi], cx
mov word [esp + 0x270], dx
call fcn.004da450
add esp, 0xc
push 0x104
lea ecx, [esp + 0x268]
push ecx
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x410183
push 0x7fe
lea ecx, [esp + 0x682]
xor eax, eax
push ebx
push ecx
mov word [esi], di
mov word [esp + 0x688], ax
call fcn.004da450
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push 0x400
lea eax, [esp + 0x684]
push eax
lea ecx, [esp + 0x68]
push ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetVolumePathNamesForVolumeNameW]
cmp eax, ebx
je 0x40ff0a
lea eax, [esp + 0x67c]
jmp 0x40ff68
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x410166
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004d4853
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
cmp esi, ebx
je 0x410166
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x14]
push eax
push ecx
push esi
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_GetVolumePathNamesForVolumeNameW]
cmp eax, ebx
jne 0x40ff66
push esi
jmp 0x41015e
mov eax, esi
mov edi, eax
cmp word [eax], bx
je 0x410155
mov eax, edi
lea edx, [eax + 2]
jmp 0x40ff80
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ff80
sub eax, edx
sar eax, 1
cmp eax, 3
jbe 0x410132
xor eax, eax
mov word [esp + 0x24], ax
mov eax, edi
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ffb0
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea esi, [esp + 0x28]
call fcn.004027c0
mov dword [esp + 0xe90], ebx
mov ecx, dword [esp + 0x18]
mov edx, esi
call fcn.00410900
mov esi, eax
lea eax, [esp + 0x264]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40fff0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x268]
call fcn.004027c0
mov dword [esp + 0xe90], 0xffffffff
cmp dword [esp + 0x38], 8
jb 0x41002b
mov ecx, dword [esp + 0x24]
push ecx
call fcn.004d5559
add esp, 4
push 0x208
lea ecx, [esp + 0x472]
xor edx, edx
xor eax, eax
push ebx
mov esi, 7
push ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebx
mov word [esp + 0x30], dx
mov word [esp + 0x478], ax
call fcn.004da450
add esp, 0xc
push 0x105
lea edx, [esp + 0x470]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x410132
cmp word [esp + 0x46c], bx
je 0x410132
xor eax, eax
mov word [esp + 0x40], ax
lea eax, [esp + 0x46c]
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4100a2
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x470]
lea esi, [esp + 0x44]
call fcn.004027c0
mov dword [esp + 0xe90], 1
mov ecx, dword [esp + 0x18]
mov edx, esi
call fcn.00410900
mov esi, eax
lea eax, [esp + 0x264]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4100e4
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x268]
call fcn.004027c0
mov dword [esp + 0xe90], 0xffffffff
cmp dword [esp + 0x54], 8
jb 0x41011f
mov ecx, dword [esp + 0x40]
push ecx
call fcn.004d5559
add esp, 4
xor edx, edx
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], dx
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x410137
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 + 2], bx
lea edi, [edi + eax*2 + 2]
jne 0x40ff73
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x410166
push eax
call fcn.004d632b
add esp, 4
mov ecx, dword [esp + 0x20]
push 0x104
lea eax, [esp + 0x60]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x40fe13
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov eax, 1
mov ecx, dword [esp + 0xe88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe70]
xor ecx, esp
call fcn.004d5564
mov esp, ebp
pop ebp
ret 4