Function at 0x401590
Capabilities:
Get disk information

Disassembly:
sub esp, 0x628
mov eax, dword [0x56c3c0]
xor eax, esp
mov dword [esp + 0x624], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebp
mov ebp, dword [esp + 0x638]
push esi
push edi
push 0x53ef00
lea eax, [esp + 0x1c]
mov edi, ecx
push eax
mov dword [esp + 0x1c], edi
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebp
call esi
cmp eax, 8
jle 0x4015ec
push 9
push ebp
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
xor edx, edx
mov word [esp + 0x30], dx
jmp 0x4015f8
push ebp
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov ecx, 0x3a
cmp cx, word [esp + 0x22]
jne 0x40160b
xor edx, edx
mov word [esp + 0x24], dx
push ebp
call esi
cmp eax, 1
jne 0x401623
push 0x53ef0c
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [esp + 0x20]
push ecx
add edi, 0x204
push edi
call ebx
push ebp
call esi
cmp eax, 1
je 0x401645
push 0x53ef10
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0
push 0x20000000
push 3
push 0
push 3
push 0
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40170e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xaa
call esi
push 0x104
lea eax, [esp + 0x42c]
push eax
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x40176b
mov edi, dword [esp + 0x63c]
push edi
lea edx, [esp + 0x224]
push str.DeviceEsafenetEncryDisk_u
push edx
call fcn.004d984c
add esp, 0xc
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x42c]
push ecx
call fcn.004da375
add esp, 8
test eax, eax
jne 0x40176b
mov eax, edi
call fcn.00401e00
push 0
test eax, eax
je 0x4016ed
call esi
jmp 0x401853
lea edx, [esp + 0x24]
push edx
push 2
call dword [0x5784e0]
movzx esi, word [ebp]
shl esi, 0x10
or esi, 0x8004
call fcn.00401350
jmp 0x401715
mov edi, dword [esp + 0x63c]
push edi
call fcn.004013b0
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
je 0x40176b
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
movzx ecx, word [eax + 0x244]
push 0
push 0
add ecx, 0x660
push ecx
push eax
push 0x80002000
push esi
call ebx
test eax, eax
jne 0x401772
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call dword [sym.imp.ntdll.dll_NtClose]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x401858
push 0
lea edx, [esp + 0x14]
push edx
push 0
push 0
push 0
push 0
push 0x800024d8
push esi
call ebx
push edi
lea eax, [esp + 0x224]
push str.DeviceEsafenetEncryDisk_u
push eax
call fcn.004d984c
add esp, 0xc
lea ecx, [esp + 0x220]
push ecx
lea edx, [esp + 0x24]
push edx
push 1
call dword [0x5784e0]
test eax, eax
jne 0x4017cd
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x24]
push ecx
push 2
call dword [0x5784e0]
lea edx, [esp + 0x220]
push edx
lea eax, [esp + 0x24]
push eax
push 1
call dword [0x5784e0]
test eax, eax
jne 0x401830
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x20000000
push 3
push 0
push 3
push 0
lea ecx, [esp + 0x30]
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x401829
push 0
lea edx, [esp + 0x14]
push edx
push 0
push 0
push 0
push 0
push 0x80002004
push esi
call ebx
jmp 0x40175d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [esp + 0x644], 0
je 0x401853
movzx esi, word [ebp]
shl esi, 0x10
or esi, 0x8000
call fcn.00401350
mov eax, 1
mov ecx, dword [esp + 0x634]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004d6555
add esp, 0x628
ret