Function at 0x4013c0
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x2018
call fcn.00403440
push ebx
push ebp
push esi
push edi
push str.GetDriveLetter_n
call fcn.00401100
mov eax, dword [esp + 0x2030]
add esp, 4
add eax, 4
mov dword [esp + 0x18], 0
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x401421
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
or ax, 0xffff
pop ebx
add esp, 0x2018
ret
lea ecx, [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
push ecx
lea edx, [esp + 0x30]
push 0x2000
push edx
lea ecx, [esp + 0x38]
push 0x2000
push ecx
push 0x4d0008
push eax
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40145c
call ebp
mov edi, dword [esp + 0x18]
jmp 0x401472
lea edx, [esp + 0x2a]
lea edi, [esp + 0x28]
push edx
push str._nMountName:__s_n
call fcn.004034c1
add esp, 8
push edi
call fcn.00401240
mov ebx, eax
add esp, 4
cmp bx, 0xffff
jne 0x40149d
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
or ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret
xor edi, edi
lea ecx, [esp + 0x10]
push edi
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x30]
push 0x2000
push edx
lea eax, [esp + 0x2c]
push 0xc
push eax
push 0x2d1400
push ecx
mov dword [esp + 0x3c], 1
mov dword [esp + 0x40], edi
call esi
test eax, eax
jne 0x4014de
call ebp
mov ebx, 0xffff
jmp 0x401610
movzx dx, byte [esp + 0x40]
lea eax, [esp + 0x10]
push edi
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
mov word [esp + 0x20], dx
push 0x2000
push ecx
lea edx, [esp + 0x2c]
push 0xc
push edx
push 0x2d1400
push eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
call esi
test eax, eax
jne 0x401524
call ebp
mov ebx, 0xffff
jmp 0x401610
mov eax, dword [esp + 0x34]
cmp eax, edi
je 0x40157c
mov cl, byte [esp + eax + 0x28]
lea eax, [esp + eax + 0x28]
test cl, cl
je 0x40157c
push eax
mov eax, ebx
and eax, 0xffff
push 0x40c10c
lea ecx, [eax + eax*8]
shl ecx, 5
add ecx, eax
lea edx, [ecx*4 + 0x40e792]
push edx
call fcn.0040346f
mov eax, dword [esp + 0x40]
add esp, 0xc
mov cl, byte [esp + eax + 0x28]
test cl, cl
je 0x40157c
mov ecx, dword [esp + 0x10]
cmp eax, ecx
jae 0x401580
mov dl, byte [esp + eax + 0x29]
inc eax
test dl, dl
jne 0x40156d
jmp 0x401580
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
cmp eax, edi
je 0x4015d6
mov dl, byte [esp + eax + 0x28]
lea eax, [esp + eax + 0x28]
test dl, dl
je 0x4015d6
push eax
mov eax, ebx
and eax, 0xffff
push 0x40c10c
lea ecx, [eax + eax*8]
shl ecx, 5
add ecx, eax
lea edx, [ecx*4 + 0x40e7d2]
push edx
call fcn.0040346f
mov eax, dword [esp + 0x44]
add esp, 0xc
mov cl, byte [esp + eax + 0x28]
test cl, cl
mov ecx, dword [esp + 0x10]
je 0x4015d6
cmp eax, ecx
jae 0x4015d6
mov dl, byte [esp + eax + 0x29]
inc eax
test dl, dl
jne 0x4015c9
mov eax, dword [esp + 0x3c]
cmp eax, edi
je 0x4015f3
mov dl, byte [esp + eax + 0x28]
test dl, dl
je 0x4015f3
cmp eax, ecx
jae 0x4015f3
mov dl, byte [esp + eax + 0x29]
inc eax
test dl, dl
jne 0x4015e6
mov eax, dword [esp + 0x40]
cmp eax, edi
je 0x401610
mov dl, byte [esp + eax + 0x28]
test dl, dl
je 0x401610
cmp eax, ecx
jae 0x401610
mov dl, byte [esp + eax + 0x29]
inc eax
test dl, dl
jne 0x401603
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp bx, 0x1a
jae 0x401755
cmp word [esp + 0x18], 7
jne 0x401755
mov eax, ebx
and eax, 0xffff
lea esi, [eax + eax*8]
shl esi, 5
add esi, eax
shl esi, 2
mov al, byte [esi + 0x40e7e1]
cmp al, 1
jl 0x401659
cmp al, 0x20
jg 0x401659
add al, 0x30
mov byte [esi + 0x40e7e1], al
mov al, byte [esi + 0x40e7d2]
test al, al
je 0x401755
cmp al, 0x20
je 0x401755
mov al, byte [esi + 0x40e7e1]
cmp al, 0x30
jb 0x40169a
cmp al, 0x39
ja 0x40169a
and eax, 0xff
pop edi
sub eax, 0x30
mov word [esi + 0x40e812], ax
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea edi, [esi + 0x40e7e0]
push edi
push 0x40c108
call ebp
test eax, eax
jne 0x4016c9
mov word [esi + 0x40e812], 1
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret
push edi
push 0x40c104
call ebp
test eax, eax
jne 0x4016ec
mov word [esi + 0x40e812], 2
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret
push edi
push 0x40c100
call ebp
test eax, eax
jne 0x40170f
mov word [esi + 0x40e812], 3
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret
push edi
push 0x40c0fc
call ebp
test eax, eax
jne 0x401732
mov word [esi + 0x40e812], 4
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret
push edi
push 0x40c0f8
call ebp
test eax, eax
jne 0x401755
mov word [esi + 0x40e812], 5
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret
mov ebx, 0xffff
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x2018
ret