Function at 0x465318
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
xor eax, eax
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov byte [ebp - 1], 0
setge al
mov byte [ebp - 2], 0
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x465370
xor ecx, ecx
mov cx, word [eax]
cmp cx, di
je 0x465370
cmp word [eax + 2], 0x3a
mov byte [ebp - 1], 1
jne 0x46535a
mov dword [ebp - 0x20], ecx
jmp 0x465370
push 1
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp + 0x10]
push eax
call fcn.004567b5
add esp, 0xc
mov byte [ebp - 2], 2
push 0x20c84c
lea ecx, [ebp - 0x14]
call fcn.00446437
mov eax, dword [ebp - 0x14]
add eax, 0x200010
lea esi, [eax + 0xc000]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x30], edi
push dword [ebp + 8]
mov dword [ebp - 8], edi
push str..PhysicalDrive_d
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push edi
push 0x22000000
push 3
push edi
push 3
push 0x80000000
push esi
lea ecx, [ebp - 8]
call fcn.00405c6d
mov ebx, dword [ebp - 8]
cmp ebx, edi
je 0x465646
push edi
lea eax, [ebp - 0x30]
push eax
push 0xc
add esi, 0x820
push esi
push edi
push edi
push 0x2d1080
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4653f2
mov dword [esi], edi
push 0x200
push ebx
call fcn.004438ac
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0xc], edi
push ebx
call fcn.00443c2d
mov esi, eax
add esp, 0x14
cmp esi, edi
je 0x465646
cmp dword [esi], 1
sete byte [ebp + 0x13]
cmp byte [ebp + 0x13], 0
je 0x46544a
mov eax, dword [ebp - 0x14]
push edi
push edi
push edi
push edi
push edi
push dword [ebp - 0x10]
add eax, 0x200010
push dword [esi + 0x28]
push eax
lea eax, [ebp - 8]
push eax
call fcn.0044b37e
add esp, 0x24
add esi, 0x30
xor ebx, ebx
cmp dword [ebp - 0xc], edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x18], edi
jle 0x465646
add esi, 0x20
mov al, byte [ebp + 0x13]
test al, al
jne 0x46547f
cmp byte [esi], 0x42
je 0x465519
jmp 0x4654ec
push 0x10
push 0x4cda74
push esi
call fcn.0043ff15
add esp, 0xc
test eax, eax
jne 0x4654b3
mov eax, dword [ebp - 0x10]
mov edi, dword [esi - 0x18]
mov ebx, dword [esi - 0x14]
mov ecx, dword [esi - 0x10]
cdq
add edi, eax
adc ebx, edx
sub ecx, eax
mov eax, dword [esi - 0xc]
sbb eax, edx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], eax
jmp 0x4654de
push 0x10
push 0x4cda84
push esi
call fcn.0043ff15
add esp, 0xc
test eax, eax
jne 0x4654de
mov eax, dword [ebp - 0x10]
cdq
push edx
push eax
push dword [esi - 0x14]
push dword [esi - 0x18]
call fcn.004b4580
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
mov eax, edi
or eax, ebx
je 0x4654ec
mov eax, dword [ebp - 0x3c]
or eax, dword [ebp - 0x38]
jne 0x465506
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
add esi, 0x90
cmp eax, dword [ebp - 0xc]
jl 0x46546d
jmp 0x465644
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x44]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x40]
mov dword [eax + 4], ecx
xor eax, eax
mov al, byte [ebp + 0x13]
push 0
push dword [ebp - 0x38]
and eax, 1
push dword [ebp - 0x3c]
or eax, dword [ebp - 0x10]
push ebx
push edi
push eax
push dword [ebp - 0x1c]
push dword [ebp - 8]
call fcn.0044b770
mov edi, eax
add esp, 0x20
test edi, edi
mov dword [ebp - 0xc], edi
jle 0x465644
mov esi, dword [ebp - 0x24]
imul eax, eax, 0xb4
mov ebx, dword [ebp + 0xc]
lea eax, [eax + esi + 0x80]
push eax
mov ecx, ebx
call fcn.0044645c
mov ebx, dword [ebx]
and dword [ebp + 0x10], 0
add ebx, esi
test edi, edi
mov dword [ebp - 0x18], ebx
mov esi, ebx
jle 0x46563f
mov edi, dword [ebp - 0x1c]
add edi, 0x40
cmp byte [ebp - 1], 0
je 0x4655ae
mov eax, dword [ebp - 0x20]
test ax, ax
je 0x46558e
cmp ax, word [edi]
je 0x4655ae
cmp byte [ebp - 2], 0
je 0x46562a
push 0x10
lea eax, [edi - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.0043ff15
add esp, 0xc
test eax, eax
jne 0x46562a
movzx eax, byte [edi - 0x20]
mov dword [ebp - 0x1c], eax
mov ax, word [edi]
test ax, ax
je 0x4655c2
movzx eax, ax
jmp 0x4655c5
push 0x2a
pop eax
push 4
pop ebx
mov dword [esi], eax
push 0x10
lea eax, [edi - 0x10]
push eax
add esi, ebx
push esi
call fcn.00414839
mov eax, dword [ebp + 8]
add esi, 0x10
mov dword [esi], eax
mov eax, dword [edi - 0x28]
add esi, ebx
mov dword [esi], eax
mov eax, dword [ebp - 0x2c]
add eax, 0x820
mov eax, dword [eax]
add esi, ebx
mov dword [esi], eax
mov eax, dword [ebp - 0x1c]
add esi, ebx
mov dword [esi], eax
mov eax, dword [edi - 0x38]
add esi, ebx
mov dword [esi], eax
mov eax, dword [edi - 0x34]
mov dword [esi + 4], eax
mov eax, dword [edi - 0x30]
add esi, 8
mov dword [esi], eax
mov eax, dword [edi - 0x2c]
add esp, 0xc
mov dword [esi + 4], eax
add esi, 8
inc dword [ebp - 0x28]
cmp word [ebp - 0x20], 0
jne 0x465667
mov ebx, dword [ebp - 0x18]
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
add edi, 0x90
cmp eax, dword [ebp - 0xc]
jl 0x46557b
sub esi, ebx
add dword [ebp - 0x24], esi
xor edi, edi
cmp dword [ebp - 0x34], edi
lea ecx, [ebp - 8]
jne 0x465674
inc dword [ebp + 8]
call fcn.00402d2b
cmp dword [ebp + 8], 0x3e80
jge 0x465679
mov esi, dword [ebp - 0x2c]
jmp 0x465397
lea ecx, [ebp - 8]
call fcn.00402d2b
xor esi, esi
inc esi
jmp 0x46567c
call fcn.00402d2b
mov esi, dword [ebp - 0x28]
lea ecx, [ebp - 0x14]
call fcn.0043fe25
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret