Function at 0x477ff4
Capabilities:
Get disk size
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x76
push 0
push 0
dec ecx
jne 0x477ffd
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, eax
lea edi, [ebp - 0x32c]
xor eax, eax
push ebp
push 0x4788ec
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0xc], 0xffffffff
lea eax, [ebp - 0xc6]
xor ecx, ecx
mov edx, 0x66
call fcn.004030e0
mov eax, edi
xor ecx, ecx
mov edx, 0x200
call fcn.004030e0
lea eax, [ebp - 0x12c]
xor ecx, ecx
mov edx, 0xc
call fcn.004030e0
push 0
lea eax, [ebp - 0x30]
push eax
push 0x200
push edi
push 0x200
push edi
push 0x70000
push ebx
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4780a7
call sub.kernel32.dll_GetLastError
xor edx, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 0
jne 0x4780a1
cmp dword [ebp - 0x38], 0
jne 0x4788b4
lea edx, [ebp - 0x344]
mov eax, edi
mov ecx, 0x18
call fcn.00402c80
mov eax, dword [ebp - 0x330]
xor edx, edx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], edx
mov eax, edi
xor ecx, ecx
mov edx, 0x200
call fcn.004030e0
push 0
lea eax, [ebp - 0x30]
push eax
push 0x200
push edi
push 0x200
push edi
push 0x7405c
push ebx
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x47815e
call sub.kernel32.dll_GetLastError
xor edx, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 0
jne 0x478113
cmp dword [ebp - 0x38], 0
je 0x47815e
push 0x10
lea edx, [ebp - 0x34c]
mov eax, dword [ebp - 0x38]
call fcn.0040b9cc
mov ecx, dword [ebp - 0x34c]
lea eax, [ebp - 0x348]
mov edx, 0x478908
call fcn.004047a8
mov eax, dword [ebp - 0x348]
call fcn.0040495c
mov edx, eax
mov ecx, 0x478924
mov eax, dword [0x47fe04]
mov eax, dword [eax]
call fcn.00470e84
call fcn.004043a4
lea edx, [ebp - 0x50]
mov eax, edi
mov ecx, 8
call fcn.00402c80
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x54], eax
mov eax, edi
xor ecx, ecx
mov edx, 0x200
call fcn.004030e0
mov dword [ebp - 0x12c], 1
xor eax, eax
mov dword [ebp - 0x128], eax
push 0
lea eax, [ebp - 0x30]
push eax
push 0x200
push edi
push 0xc
lea eax, [ebp - 0x12c]
push eax
push 0x2d1400
push ebx
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x478225
call sub.kernel32.dll_GetLastError
xor edx, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 0
jne 0x4781da
cmp dword [ebp - 0x38], 0
je 0x478225
push 0x10
lea edx, [ebp - 0x354]
mov eax, dword [ebp - 0x38]
call fcn.0040b9cc
mov ecx, dword [ebp - 0x354]
lea eax, [ebp - 0x350]
mov edx, 0x478908
call fcn.004047a8
mov eax, dword [ebp - 0x350]
call fcn.0040495c
mov edx, eax
mov ecx, 0x478924
mov eax, dword [0x47fe04]
mov eax, dword [eax]
call fcn.00470e84
call fcn.004043a4
lea edx, [ebp - 0xe8]
mov eax, edi
mov ecx, 0x20
call fcn.00402c80
mov eax, edi
xor ecx, ecx
mov edx, 0x200
call fcn.004030e0
xor eax, eax
mov dword [ebp - 0x12c], eax
xor eax, eax
mov dword [ebp - 0x128], eax
push 0
lea eax, [ebp - 0x30]
push eax
push 0x200
push edi
push 0xc
lea eax, [ebp - 0x12c]
push eax
push 0x2d1400
push ebx
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4782e1
call sub.kernel32.dll_GetLastError
xor edx, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 0
jne 0x478296
cmp dword [ebp - 0x38], 0
je 0x4782e1
push 0x10
lea edx, [ebp - 0x35c]
mov eax, dword [ebp - 0x38]
call fcn.0040b9cc
mov ecx, dword [ebp - 0x35c]
lea eax, [ebp - 0x358]
mov edx, 0x478908
call fcn.004047a8
mov eax, dword [ebp - 0x358]
call fcn.0040495c
mov edx, eax
mov ecx, 0x478924
mov eax, dword [0x47fe04]
mov eax, dword [eax]
call fcn.00470e84
call fcn.004043a4
lea edx, [ebp - 0x120]
mov eax, edi
mov ecx, 0x38
call fcn.00402c80
lea eax, [ebp - 0x3c]
call fcn.0040449c
lea eax, [ebp - 0x40]
call fcn.0040449c
lea eax, [ebp - 0x44]
call fcn.0040449c
lea eax, [ebp - 0x48]
call fcn.0040449c
cmp dword [ebp - 0x114], 0
je 0x47835d
mov esi, dword [ebp - 0x30]
dec esi
test esi, esi
jb 0x47835d
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x114]
add eax, ebx
cmp byte [edi + eax], 0
je 0x47835d
lea eax, [ebp - 0x360]
mov edx, dword [ebp - 0x114]
add edx, ebx
mov dl, byte [edi + edx]
call fcn.00404684
mov edx, dword [ebp - 0x360]
lea eax, [ebp - 0x3c]
call fcn.00404764
inc ebx
dec esi
jne 0x478327
lea edx, [ebp - 0x364]
mov eax, dword [ebp - 0x3c]
call fcn.004087f4
mov edx, dword [ebp - 0x364]
lea eax, [ebp - 0x3c]
mov ecx, 0x478934
call fcn.004047a8
cmp dword [ebp - 0x110], 0
je 0x4783c8
mov esi, dword [ebp - 0x30]
dec esi
test esi, esi
jb 0x4783c8
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x110]
add eax, ebx
cmp byte [edi + eax], 0
je 0x4783c8
lea eax, [ebp - 0x368]
mov edx, dword [ebp - 0x110]
add edx, ebx
mov dl, byte [edi + edx]
call fcn.00404684
mov edx, dword [ebp - 0x368]
lea eax, [ebp - 0x40]
call fcn.00404764
inc ebx
dec esi
jne 0x478392
lea edx, [ebp - 0x36c]
mov eax, dword [ebp - 0x40]
call fcn.004087f4
mov edx, dword [ebp - 0x36c]
lea eax, [ebp - 0x40]
call fcn.00404534
cmp dword [ebp - 0x10c], 0
je 0x47842e
mov esi, dword [ebp - 0x30]
dec esi
test esi, esi
jb 0x47842e
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x10c]
add eax, ebx
cmp byte [edi + eax], 0
je 0x47842e
lea eax, [ebp - 0x370]
mov edx, dword [ebp - 0x10c]
add edx, ebx
mov dl, byte [edi + edx]
call fcn.00404684
mov edx, dword [ebp - 0x370]
lea eax, [ebp - 0x44]
call fcn.00404764
inc ebx
dec esi
jne 0x4783f8
lea edx, [ebp - 0x374]
mov eax, dword [ebp - 0x44]
call fcn.004087f4
mov edx, dword [ebp - 0x374]
lea eax, [ebp - 0x44]
call fcn.00404534
cmp dword [ebp - 0x108], 0
je 0x478494
mov esi, dword [ebp - 0x30]
dec esi
test esi, esi
jb 0x478494
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x108]
add eax, ebx
cmp byte [edi + eax], 0
je 0x478494
lea eax, [ebp - 0x378]
mov edx, dword [ebp - 0x108]
add edx, ebx
mov dl, byte [edi + edx]
call fcn.00404684
mov edx, dword [ebp - 0x378]
lea eax, [ebp - 0x48]
call fcn.00404764
inc ebx
dec esi
jne 0x47845e
lea edx, [ebp - 0x37c]
mov eax, dword [ebp - 0x48]
call fcn.004087f4
mov edx, dword [ebp - 0x37c]
lea eax, [ebp - 0x48]
call fcn.00404534
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x5c], 0
jne 0x4784cd
cmp dword [ebp - 0x60], 0x200
jb 0x4784e8
jmp 0x4784cf
jl 0x4784e8
push dword [ebp - 0x5c]
push dword [ebp - 0x60]
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
call fcn.004052c4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
jmp 0x4784f6
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
xor eax, eax
mov al, byte [ebp - 0xd0]
xor edx, edx
mov dword [ebp - 0x72], eax
mov dword [ebp - 0x6e], edx
cmp dword [ebp - 0x6e], 0
jne 0x47851a
cmp dword [ebp - 0x72], 3
jne 0x47851a
call fcn.00477f98
mov byte [ebp - 0x61], al
mov al, byte [ebp - 0x116]
mov byte [ebp - 0x62], al
cmp dword [ebp - 0x14], 0
jne 0x478534
cmp dword [ebp - 0x18], 0x200
jae 0x478544
jmp 0x478536
jge 0x478544
mov dword [ebp - 0x18], 0x200
mov dword [ebp - 0x14], 0
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, dword [ebp - 0xe0]
xor edx, edx
call fcn.004052c4
mov dword [ebp - 0x6a], eax
mov dword [ebp - 0x66], edx
cmp dword [ebp - 0x66], 0
jne 0x47856e
cmp dword [ebp - 0x6a], 0xfa
jbe 0x47857e
jmp 0x478570
jle 0x47857e
mov dword [ebp - 0x6a], 0xfa
mov dword [ebp - 0x66], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x82], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x7e], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x7a], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x76], eax
lea edx, [ebp - 0x384]
mov eax, dword [ebp - 0x3c]
call fcn.004087f4
push dword [ebp - 0x384]
push 0x478934
lea edx, [ebp - 0x388]
mov eax, dword [ebp - 0x40]
call fcn.004087f4
push dword [ebp - 0x388]
lea eax, [ebp - 0x380]
mov edx, 3
call fcn.0040481c
mov eax, dword [ebp - 0x380]
lea edx, [ebp - 0x24]
call fcn.004087f4
jmp 0x4785f3
lea eax, [ebp - 0x24]
mov edx, 0x478934
call fcn.00404764
mov eax, dword [ebp - 0x24]
call fcn.0040475c
cmp eax, 0x18
jl 0x4785e6
lea eax, [ebp - 0x24]
call fcn.004049b4
lea edx, [ebp - 0xc6]
mov ecx, 0x18
call fcn.00402c80
jmp 0x478627
lea eax, [ebp - 0x44]
mov edx, 0x478934
call fcn.00404764
mov eax, dword [ebp - 0x44]
call fcn.0040475c
cmp eax, 8
jl 0x47861a
xor ebx, ebx
lea eax, [ebp - 0x9e]
xor edx, edx
mov dl, bl
mov ecx, dword [ebp - 0x44]
mov dl, byte [ecx + edx]
mov byte [eax], dl
inc ebx
inc eax
cmp bl, 8
jne 0x47863c
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x48]
call fcn.00404534
mov eax, dword [ebp - 0x24]
call fcn.0040475c
cmp eax, 0x28
jne 0x478814
lea edx, [ebp - 0x38c]
mov eax, dword [ebp - 0x24]
call fcn.0040857c
mov edx, dword [ebp - 0x38c]
lea eax, [ebp - 0x24]
call fcn.00404534
jmp 0x4786a5
mov edx, dword [ebp - 0x24]
mov eax, 0x478940
call fcn.00404aa0
mov ebx, eax
lea eax, [ebp - 0x24]
call fcn.004049b4
mov byte [eax + ebx - 1], 0x32
mov edx, dword [ebp - 0x24]
mov eax, 0x478940
call fcn.00404aa0
test eax, eax
jne 0x478689
jmp 0x4786d4
mov edx, dword [ebp - 0x24]
mov eax, 0x478934
call fcn.00404aa0
mov ebx, eax
lea eax, [ebp - 0x24]
call fcn.004049b4
mov byte [eax + ebx - 1], 0x32
mov edx, dword [ebp - 0x24]
mov eax, 0x478934
call fcn.00404aa0
test eax, eax
jne 0x4786b8
mov byte [ebp - 0x29], 1
mov eax, dword [ebp - 0x24]
call fcn.0040475c
cmp eax, 0x28
je 0x4786fa
mov byte [ebp - 0x29], 0
cmp byte [ebp - 0x29], 0
je 0x478723
mov bl, 1
xor eax, eax
mov al, bl
mov edx, dword [ebp - 0x24]
mov al, byte [edx + eax - 1]
add al, 0xd0
sub al, 0xa
jb 0x47871d
add al, 0xf9
sub al, 6
jb 0x47871d
mov byte [ebp - 0x29], 0
inc ebx
cmp bl, 0x29
jne 0x478702
lea eax, [ebp - 0x28]
call fcn.0040449c
cmp byte [ebp - 0x29], 0
je 0x478875
xor ebx, ebx
push dword [ebp - 0x28]
lea eax, [ebp - 0x398]
push eax
xor eax, eax
mov al, bl
mov esi, eax
add esi, esi
mov eax, esi
inc eax
mov edx, eax
add edx, edx
inc edx
mov ecx, 2
mov eax, dword [ebp - 0x24]
call fcn.004049bc
mov ecx, dword [ebp - 0x398]
lea eax, [ebp - 0x394]
mov edx, 0x47894c
call fcn.004047a8
mov eax, dword [ebp - 0x394]
call fcn.00408bd8
mov edx, eax
lea eax, [ebp - 0x390]
call fcn.00404684
push dword [ebp - 0x390]
lea eax, [ebp - 0x3a4]
push eax
mov edx, esi
add edx, edx
inc edx
mov ecx, 2
mov eax, dword [ebp - 0x24]
call fcn.004049bc
mov ecx, dword [ebp - 0x3a4]
lea eax, [ebp - 0x3a0]
mov edx, 0x47894c
call fcn.004047a8
mov eax, dword [ebp - 0x3a0]
call fcn.00408bd8
mov edx, eax
lea eax, [ebp - 0x39c]
call fcn.00404684
push dword [ebp - 0x39c]
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.0040481c
inc ebx
cmp bl, 0xa
jne 0x478737
lea edx, [ebp - 0x3a8]
mov eax, dword [ebp - 0x28]
call fcn.004087f4
mov edx, dword [ebp - 0x3a8]
lea eax, [ebp - 0x28]
call fcn.00404534
jmp 0x478875
mov eax, dword [ebp - 0x24]
call fcn.0040475c
cmp eax, 0x28
jle 0x47886a
lea eax, [ebp - 0x3b4]
push eax
mov ecx, 0x28
mov edx, 1
mov eax, dword [ebp - 0x24]
call fcn.004049bc
mov eax, dword [ebp - 0x3b4]
lea edx, [ebp - 0x3b0]
call fcn.0040857c
mov eax, dword [ebp - 0x3b0]
lea edx, [ebp - 0x3ac]
call fcn.004087f4
mov edx, dword [ebp - 0x3ac]
lea eax, [ebp - 0x24]
call fcn.00404534
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x24]
call fcn.00404534
mov eax, dword [ebp - 0x28]
call fcn.0040475c
push eax
lea eax, [ebp - 0x28]
call fcn.004049b4
lea edx, [ebp - 0x96]
pop ecx
call fcn.00402c80
mov eax, dword [ebp - 4]
mov edi, eax
lea esi, [ebp - 0xc6]
mov ecx, 0x19
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4788f3
lea eax, [ebp - 0x3b4]
mov edx, 0x1c
call fcn.004044c0
lea eax, [ebp - 0x48]
mov edx, 4
call fcn.004044c0
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004044c0
ret