Function at 0x403e84
Capabilities:
Enumerate disk volumes
Get disk information via ioctl

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0xe04
push ebx
push esi
mov esi, dword [ebp + 0x74]
xor ebx, ebx
cmp esi, ebx
push edi
mov word [ebp - 0xda0], bx
jl 0x403eaf
jg 0x403ea9
cmp dword [ebp + 0x70], ebx
jb 0x403eaf
mov byte [ebp + 0x63], 1
jmp 0x403eb2
mov byte [ebp + 0x63], bl
mov ecx, dword [ebp + 0x70]
mov edi, 0x514
add ecx, edi
mov eax, esi
adc eax, ebx
cmp eax, esi
mov dword [ebp + 0x4c], ecx
mov dword [ebp + 0x50], eax
jg 0x403edc
jl 0x403ed1
cmp ecx, dword [ebp + 0x70]
jae 0x403edc
or dword [ebp + 0x4c], 0xffffffff
mov dword [ebp + 0x50], 0x7fffffff
push edi
lea eax, [ebp - 0xda0]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
cmp eax, 0xffffffff
mov dword [ebp + 0x54], eax
je 0x40413a
mov ecx, dword [ebp + 0x70]
mov eax, dword [0x4a5bd4]
and ecx, esi
cmp ecx, 0xffffffff
mov dword [ebp + 0x58], eax
jne 0x403f61
cmp eax, ebx
je 0x40413a
mov esi, dword [eax]
add eax, 4
mov dword [ebp + 0x58], eax
jmp 0x403f4e
mov eax, dword [ebp + 0x58]
dec esi
lea eax, [eax + esi*4]
mov edi, dword [eax]
cmp edi, ebx
mov dword [eax], ebx
je 0x403f4e
push ebx
lea eax, [ebp + 0x74]
push eax
push ebx
push ebx
push ebx
push ebx
push 0x9001c
push edi
mov dword [ebp + 0x74], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
jg 0x403f1a
mov ecx, 0x4a5bd4
call fcn.0042dd2d
jmp 0x40413a
cmp eax, ebx
jne 0x403f84
push 0x7d4
mov ecx, 0x4a5bd4
call fcn.00432b85
mov eax, dword [0x4a5bd4]
cmp eax, ebx
mov dword [ebp + 0x58], eax
je 0x40413a
add dword [ebp + 0x58], 4
mov dword [ebp + 0x48], eax
mov dword [eax], ebx
jmp 0x404111
lea eax, [ebp - 0xda0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
mov word [ebp + eax*2 - 0xda2], bx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push 0x80
push 3
push ebx
push 7
push 0x80000000
lea eax, [ebp - 0xda0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x404111
xor eax, eax
mov dword [ebp - 0x374], ebx
mov ecx, 0xc7
lea edi, [ebp - 0x370]
rep stosd dword es:[edi], eax
lea edi, [ebp + 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
mov dword [ebp + 0x5c], 0xffffff9c
stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp + 0x40], 0xffffffff
push ebx
lea eax, [ebp - 0x374]
push eax
push 0xc
lea eax, [ebp + 0x3c]
push eax
push ebx
push ebx
push 0x2d1080
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40402a
movsx eax, word [ebp + 0x40]
mov dword [ebp + 0x5c], eax
mov eax, dword [ebp + 0x5c]
cmp dword [ebp + 0x6c], eax
jne 0x404101
push 0x24
pop ecx
xor eax, eax
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
mov edi, 0x90
push edi
lea eax, [ebp - 0x54]
push ebx
push eax
call fcn.00479cf0
or dword [ebp - 0x3c], 0xffffffff
add esp, 0xc
push ebx
lea eax, [ebp - 0x374]
push eax
push edi
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
push 0x70048
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp byte [ebp + 0x63], bl
je 0x4040a4
mov edx, dword [ebp - 0x48]
cmp edx, dword [ebp + 0x50]
jg 0x40409f
mov eax, dword [ebp - 0x4c]
jl 0x404089
cmp eax, dword [ebp + 0x4c]
jae 0x40409f
mov ecx, dword [ebp - 0x44]
add ecx, eax
mov eax, dword [ebp - 0x40]
adc eax, edx
cmp eax, dword [ebp + 0x74]
jg 0x4040a4
jl 0x40409f
cmp ecx, dword [ebp + 0x70]
jae 0x4040a4
or eax, 0xffffffff
jmp 0x4040a7
mov eax, dword [ebp + 0x5c]
cmp dword [ebp + 0x6c], eax
jne 0x404101
mov edi, dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
mov dword [ebp + 0x5c], ebx
call edi
push esi
call edi
push esi
call edi
push esi
call edi
xor edi, edi
push ebx
lea eax, [ebp + 0x5c]
push eax
push ebx
push ebx
push ebx
push ebx
push 0x90018
push esi
mov dword [ebp + 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4040ea
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
dec edi
jns 0x4040c3
mov eax, dword [ebp + 0x48]
mov ecx, dword [eax]
cmp ecx, 0x1f4
jge 0x4040ff
mov edx, dword [ebp + 0x58]
mov dword [edx + ecx*4], esi
inc dword [eax]
xor esi, esi
cmp esi, ebx
je 0x40410c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0x514
push edi
lea eax, [ebp - 0xda0]
push eax
push dword [ebp + 0x54]
mov word [ebp - 0xda0], bx
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x403f92
push dword [ebp + 0x54]
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
pop edi
pop esi
pop ebx
add ebp, 0x64
leave
ret