Function at 0x405150
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x648e69
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x230], eax
xor eax, eax
mov esi, ecx
mov dword [ebp - 0x228], eax
mov dword [ebp - 4], eax
cmp dword [esi + 0x1c4], eax
jne 0x4052ad
mov ecx, dword [0x6cc250]
mov dx, word [0x6cc254]
mov edi, dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x14], dx
mov ebx, 0x41
nop
lea eax, [ebp - 0x18]
push eax
mov word [ebp - 0x18], bx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
je 0x405298
push 0x208
lea ecx, [ebp - 0x220]
push 0
push ecx
call fcn.005236f0
add esp, 0xc
push 0x103
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x18]
push eax
call edi
lea ecx, [ebp - 0x220]
push ecx
lea ecx, [ebp - 0x224]
call fcn.004023d0
lea edx, [ebp - 0x224]
push edx
lea ecx, [esi + 0x1c8]
mov byte [ebp - 4], 1
call fcn.00406b10
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40524d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x22c]
call fcn.004023d0
lea edx, [ebp - 0x22c]
push edx
lea ecx, [esi + 0x1d8]
mov byte [ebp - 4], 2
call fcn.00406b10
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405298
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc ebx
cmp bx, 0x5a
jbe 0x4051c0
mov dword [esi + 0x1c4], 1
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [edi - 4], 0
lea ecx, [edi - 4]
jl 0x4052d6
cmp eax, dword [edi - 0x10]
jne 0x4052d6
lea ebx, [edi - 0x10]
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x40530f
mov ecx, dword [edi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x4052ef
call fcn.00402c50
mov eax, dword [edi - 0xc]
mov dword [ebx + 4], eax
mov eax, dword [edi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [ebx + 0x10]
push eax
call fcn.00521e00
add esp, 0x10
add ebx, 0x10
mov dword [ebp - 0x228], ebx
mov byte [ebp - 4], 3
mov edi, dword [esi + 0x1c8]
mov ecx, dword [esi + 0x1d8]
mov dword [ebp - 0x224], ecx
cmp edi, dword [esi + 0x1cc]
je 0x405387
mov eax, dword [edi]
test eax, eax
je 0x405356
cmp dword [ebx - 0xc], 0
jl 0x405356
push eax
push ebx
call fcn.00522032
add esp, 8
test eax, eax
je 0x405356
sub eax, ebx
sar eax, 1
je 0x40536a
add dword [ebp - 0x224], 4
add edi, 4
cmp edi, dword [esi + 0x1cc]
jne 0x405336
jmp 0x405387
mov edx, dword [ebp - 0x224]
mov eax, dword [edx]
mov edi, dword [edi]
push eax
push edi
lea ecx, [ebp - 0x228]
call fcn.004063e0
mov ebx, dword [ebp - 0x228]
mov ecx, dword [ebx - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea esi, [ebx - 0x10]
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x4053ae
cmp eax, dword [esi]
jne 0x4053ae
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4053ea
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x4053c7
call fcn.00402c50
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [esi + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00521e00
add esp, 0x10
lea edx, [edi + 0x10]
mov edi, dword [ebp - 0x230]
mov dword [edi], edx
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405412
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405438
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 8