Function at 0x405d70
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x407f1e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x210
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x20], esi
lea ecx, [esi + 0x34]
mov dword [esi], 0x4081d8
call fcn.00406dd0
xor eax, eax
mov dword [esi], 0x4081d4
mov dword [esp + 0x228], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ecx, dword [esp + 0x230]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [esi + 0x30], ecx
mov edi, 0x41
lea esi, [esp + 0x50]
mov dword [esp + 0x14], 0x1a
push edi
lea edx, [esp + 0x34]
push str._c:_
mov dword [esi], 0
push edx
mov dword [esi + 4], 0
call ebx
add esp, 0xc
lea eax, [esp + 0x30]
push eax
call ebp
cmp eax, 5
jne 0x405e23
mov eax, dword [esp + 0x18]
mov dword [esi], 1
inc eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
inc edi
add esi, 8
dec eax
mov dword [esp + 0x14], eax
jne 0x405deb
mov edi, dword [esp + 0x20]
mov ecx, edi
call fcn.00404f60
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x40606e
xor cl, cl
mov byte [esp + 0x10], cl
mov esi, dword [esp + 0x10]
mov eax, esi
and eax, 0xff
shl eax, 3
cmp dword [esp + eax + 0x50], 1
jne 0x405e6c
mov edx, dword [esp + eax + 0x54]
test edx, edx
je 0x405e7b
inc cl
cmp cl, 0x1a
mov byte [esp + 0x10], cl
jb 0x405e4f
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x120]
push 0xff
push ecx
push esi
mov ecx, edi
call fcn.004059f0
test eax, eax
jl 0x406098
mov edx, dword [esp + 0x230]
and esi, 0xff
lea esi, [esi + esi*2]
shl esi, 4
add esi, edx
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x405ec3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0xffffffff
mov al, byte [esp + 0x120]
mov dword [esp + 0x14], 0
test al, al
jbe 0x40605e
mov edx, dword [esp + 0x14]
mov eax, dword [esp + edx*8 + 0x128]
test eax, eax
lea edi, [esp + eax + 0x120]
je 0x40603a
mov esi, dword [esp + 0x230]
mov byte [esp + 0x10], 0
mov ecx, dword [esp + 0x10]
mov eax, ecx
and eax, 0xff
shl eax, 3
mov edx, dword [esp + eax + 0x50]
test edx, edx
je 0x405f76
cmp dword [esp + eax + 0x54], 1
je 0x405f76
push ecx
call fcn.00406560
add esp, 4
mov ebp, eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x24]
push 0
push eax
push 8
push ecx
push 0
push 0
push 0x41018
push ebp
mov dword [esp + 0x44], 8
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x405f76
mov ax, word [esp + 0x2a]
mov cl, byte [edi + 2]
cmp ah, cl
jne 0x405f76
mov dl, byte [esp + 0x29]
mov cl, byte [edi]
cmp dl, cl
jne 0x405f76
cmp al, byte [edi + 1]
je 0x405f90
mov al, byte [esp + 0x10]
add esi, 0x30
inc al
cmp al, 0x1a
mov byte [esp + 0x10], al
jb 0x405f00
jmp 0x406019
mov al, byte [esp + 0x10]
mov ebx, dword [sym.imp.MSVCRT.dll_strncpy]
mov byte [esi], al
mov byte [esi + 1], 0
mov cl, byte [edi + 1]
lea eax, [edi + 0x14]
mov byte [esi + 2], cl
mov byte [esi + 4], 5
mov dl, byte [edi + 2]
push 8
lea ecx, [esi + 0xc]
push eax
push ecx
mov byte [esi + 3], dl
call ebx
lea edx, [edi + 0x1c]
push 0x10
lea eax, [esi + 0x15]
push edx
push eax
mov byte [esi + 0x14], 0
call ebx
lea ecx, [edi + 0x2c]
push 4
lea edx, [esi + 0x26]
push ecx
push edx
mov byte [esi + 0x25], 0
call ebx
mov byte [esi + 0x2a], 0
mov eax, dword [edi + 4]
add esp, 0x24
cmp eax, 0x3a
jb 0x405ff9
xor eax, eax
mov ah, byte [edi + 0x44]
mov al, byte [edi + 0x45]
mov word [esi + 0x2c], ax
jmp 0x405fff
mov word [esi + 0x2c], 0x100
mov eax, dword [esp + 0x10]
and eax, 0xff
mov dword [esp + eax*8 + 0x54], 1
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
mov edi, dword [edi + 8]
test edi, edi
je 0x40603a
mov ecx, dword [esp + 0x14]
lea edi, [esp + edi + 0x120]
mov eax, dword [esp + ecx*8 + 0x128]
test eax, eax
jne 0x405ef4
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x120]
and ecx, 0xff
lea eax, [edx + 1]
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x405eda
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp eax, edx
jl 0x405e49
mov edx, dword [esp + 0x234]
mov dword [edx], 0
mov ecx, dword [esp + 0x220]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x21c
ret 8
mov ecx, dword [esp + 0x234]
mov dword [ecx], eax
jmp 0x40607b