Function at 0x51c0f0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
mov eax, dword [0x6480b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov dword [ebp - 0x434], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
push 0
cmp dword [eax + 4], 4
lea eax, [ebp - 0x420]
push eax
push 0x400
lea eax, [ebp - 0x418]
mov dword [ebp - 0x430], ebx
push eax
push 0
push 0
jne 0x51c2b5
push 0x74004
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x51c275
push 0x38
call fcn.00479f06
mov esi, eax
add esp, 4
mov dword [ebp - 0x41c], esi
test esi, esi
je 0x51c462
push 0x38
push 0
push esi
call fcn.005c9220
push edi
call fcn.0051c090
add esp, 0x10
mov ebx, eax
mov ax, word [ebp + 0xc]
mov word [esi + 0x12], ax
mov dword [esi + 0x18], ebx
push 0
push ebx
push dword [ebp - 0x414]
push dword [ebp - 0x418]
call fcn.0058c810
mov esi, eax
mov edi, edx
mov eax, dword [ebp - 0x41c]
push 0
push ebx
mov dword [eax], esi
mov dword [eax + 4], edi
push dword [ebp - 0x40c]
push dword [ebp - 0x410]
call fcn.0058c810
mov ebx, dword [ebp - 0x41c]
add eax, esi
adc edx, edi
add eax, 0xffffffff
mov dword [ebx + 8], eax
adc edx, 0xffffffff
movzx eax, word [ebp + 0xc]
push eax
lea eax, [ebp - 0x18]
mov dword [ebx + 0xc], edx
push 0x5f6814
push eax
call fcn.0047c390
add esp, 0xc
lea eax, [ebp - 0x418]
push 0x400
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
mov dword [ebp - 0x420], eax
test eax, eax
je 0x51c25b
lea eax, [ebp - 0x418]
push str.Harddisk
push eax
call fcn.005c9f6c
add esp, 8
test eax, eax
je 0x51c257
push 0xa
add eax, 0x10
push 0
push eax
call fcn.005d1ea6
add esp, 0xc
mov byte [ebx + 0x10], al
push ebx
call fcn.0051c040
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov byte [ebx + 0x10], 0xff
push ebx
call fcn.0051c040
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp + 0xc]
push eax
lea eax, [ebp - 0x18]
push 0x5f6a84
push eax
call fcn.0047c390
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
call dword [0x648e20]
cmp eax, 3
jne 0x51c462
pop edi
pop esi
mov dword [ebx], 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
push 0x560000
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x51c462
cmp dword [ebp - 0x420], 0
jbe 0x51c462
push edi
call fcn.0051c090
mov edx, dword [ebp - 0x418]
add esp, 4
mov dword [ebp - 0x42c], edx
mov ecx, eax
mov dword [ebp - 0x428], ecx
test edx, edx
jle 0x51c462
lea eax, [ebp - 0x410]
mov dword [ebp - 0x424], edx
mov dword [ebp - 0x41c], eax
nop dword [eax]
push 0
push ecx
push dword [eax + 0xc]
push dword [eax + 8]
call fcn.0058c810
mov esi, dword [0x651c64]
mov edi, eax
mov ebx, edx
test esi, esi
je 0x51c359
mov ecx, dword [ebp - 0x41c]
mov ecx, dword [ecx]
movzx eax, byte [esi + 0x10]
cmp eax, ecx
jne 0x51c345
cmp dword [esi], edi
jne 0x51c345
cmp dword [esi + 4], ebx
je 0x51c34e
mov esi, dword [esi + 0x30]
test esi, esi
jne 0x51c334
jmp 0x51c359
cmp word [ebp + 0xc], 0
je 0x51c3db
push 0x38
call fcn.00479f06
mov esi, eax
add esp, 4
test esi, esi
je 0x51c440
push 0x38
push 0
push esi
call fcn.005c9220
mov ecx, dword [ebp - 0x41c]
add esp, 0xc
mov ax, word [ebp + 0xc]
mov edx, dword [ebp - 0x428]
mov dword [esi + 0x18], edx
mov word [esi + 0x12], ax
mov al, byte [ecx]
push 0
push edx
mov byte [esi + 0x10], al
mov dword [esi], edi
mov dword [esi + 4], ebx
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0058c810
add eax, edi
adc edx, ebx
add eax, 0xffffffff
mov dword [esi + 8], eax
adc edx, 0xffffffff
cmp dword [ebp - 0x42c], 1
mov dword [esi + 0xc], edx
jle 0x51c3d2
mov eax, dword [ebp - 0x430]
or dword [esi + 0x14], 1
mov dword [eax], 1
push esi
call fcn.0051c040
add esp, 4
cmp dword [esi + 0x1c], 0
jne 0x51c440
mov ebx, dword [ebp - 0x434]
test ebx, ebx
je 0x51c440
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51c3f0
sub ecx, edx
mov edx, 2
sar ecx, 1
lea eax, [ecx + 1]
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00479f2b
mov edx, eax
add esp, 4
mov dword [esi + 0x1c], edx
test edx, edx
je 0x51c440
mov ecx, ebx
sub edx, ebx
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x51c430
mov eax, dword [ebp - 0x41c]
mov ecx, dword [ebp - 0x428]
add eax, 0x18
sub dword [ebp - 0x424], 1
mov dword [ebp - 0x41c], eax
jne 0x51c310
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0058bb64
mov esp, ebp
pop ebp
ret