Function at 0x504d38
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffb84
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x37c], ebx
mov dword [ebp - 0x374], ebx
mov dword [ebp - 0x378], ebx
mov dword [ebp - 0x2c4], ebx
mov byte [ebp - 0x2f1], cl
mov dword [ebp - 0x2a0], edx
mov dword [ebp - 0x29c], eax
xor eax, eax
push ebp
push 0x505627
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x2c0], eax
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x2a4], 0
cmp dword [ebp - 0x29c], 0
jl 0x5055fe
cmp dword [ebp - 0x29c], 0xc7
jge 0x5055fe
mov eax, dword [0x7d6870]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x29c]
jle 0x504f83
mov eax, dword [ebp - 0x29c]
lea eax, [eax + eax*4]
mov edx, dword [0x7d748c]
cmp byte [edx + eax*2], 0
je 0x504e40
mov eax, dword [ebp - 0x29c]
mov eax, dword [eax*4 + 0xc0b72c]
cdq
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
cmp dword [ebp - 0x2a4], 0
jne 0x504e11
cmp dword [ebp - 0x2a8], 0
jb 0x5055fe
jmp 0x504e17
jl 0x5055fe
push 0
push 0x100000
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
call fcn.004063ec
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
jmp 0x5055fe
imul eax, dword [ebp - 0x29c], 0xd9
mov edx, dword [0x7d6e38]
cmp dword [edx + eax], 1
jne 0x504f03
mov eax, dword [ebp - 0x29c]
shl eax, 2
lea eax, [eax + eax*2]
mov edx, dword [0x7d6f38]
fld qword [edx + eax*8 + 0x28]
call fcn.00402d64
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
mov eax, dword [ebp - 0x29c]
shl eax, 2
lea eax, [eax + eax*2]
mov edx, dword [0x7d6f38]
cmp word [edx + eax*8 + 0x10], 0x1000
jne 0x504ec2
push 0
push 0x1000
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
call fcn.004063ec
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
jmp 0x504ee6
push 0
push 0x200
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
call fcn.004063ec
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
cmp dword [ebp - 0x2a4], 0
jne 0x504efd
cmp dword [ebp - 0x2a8], 0
jbe 0x504f03
jmp 0x5055fe
jg 0x5055fe
imul eax, dword [ebp - 0x29c], 0xd9
mov edx, dword [0x7d6e38]
cmp dword [edx + eax], 2
jne 0x504f83
imul eax, dword [ebp - 0x29c], 0xac1
mov edx, dword [0x7d65a0]
mov ecx, dword [edx + eax*8 + 0x3b0]
mov dword [ebp - 0x2a8], ecx
mov ecx, dword [edx + eax*8 + 0x3b4]
mov dword [ebp - 0x2a4], ecx
imul eax, dword [ebp - 0x29c], 0xac1
mov edx, dword [0x7d65a0]
push dword [edx + eax*8 + 0x3bc]
push dword [edx + eax*8 + 0x3b8]
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
call fcn.004063ec
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
jmp 0x5055fe
xor eax, eax
push ebp
push 0x504ff4
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x29c], 0
jl 0x504fea
mov eax, dword [0x7d6870]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x29c]
jle 0x504fea
imul eax, dword [ebp - 0x29c], 0x83
mov edx, dword [0x7d6d40]
add edx, eax
mov eax, 0x505644
call fcn.00402c58
test eax, eax
jle 0x504fea
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x2a4], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5055fe
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x504ffe
mov eax, dword [0x7d7484]
cmp dword [eax], 2
je 0x505043
mov al, byte [ebp - 0x29c]
lea edx, [ebp - 0x370]
call fcn.00577430
test al, al
je 0x5055fe
fld qword [ebp - 0x348]
fmul dword [0x50564c]
call fcn.00402d64
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
jmp 0x5055fe
mov eax, dword [0x7d6594]
mov edx, dword [ebp - 0x29c]
cmp byte [eax + edx], 0
jne 0x505146
mov eax, dword [0x7d69cc]
mov edx, dword [ebp - 0x29c]
mov eax, dword [eax + edx*4]
call fcn.00405548
cmp eax, 0x80
jle 0x505146
mov eax, dword [ebp - 0x29c]
mov edx, eax
shl eax, 4
add eax, edx
mov edx, dword [0x7d6aec]
cmp byte [edx + eax], 0
je 0x505146
cmp byte [ebp + 8], 0
je 0x505146
mov eax, dword [ebp - 0x29c]
shl eax, 2
lea eax, [eax + eax*2]
mov edx, dword [0x7d6f38]
fld qword [edx + eax*8 + 0x28]
call fcn.00402d64
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
mov eax, dword [ebp - 0x29c]
shl eax, 2
lea eax, [eax + eax*2]
mov edx, dword [0x7d6f38]
cmp word [edx + eax*8 + 0x10], 0x1000
jne 0x505105
push 0
push 0x1000
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
call fcn.004063ec
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
jmp 0x505129
push 0
push 0x200
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
call fcn.004063ec
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
cmp dword [ebp - 0x2a4], 0
jne 0x505140
cmp dword [ebp - 0x2a8], 0
jbe 0x505146
jmp 0x5055fe
jg 0x5055fe
cmp byte [ebp + 8], 0
je 0x50515d
mov eax, dword [ebp - 0x29c]
call fcn.005a8144
mov dword [ebp - 0x29c], eax
mov dword [ebp - 0x2bc], 0x80000000
cmp dword [ebp - 0x2a0], 2
jne 0x50517a
add dword [ebp - 0x2bc], 0x40000000
lea eax, [ebp - 0x310]
xor ecx, ecx
mov edx, 0x18
call fcn.00403450
push 0
push 0
push 3
push 0
push 3
mov eax, dword [ebp - 0x2bc]
push eax
lea edx, [ebp - 0x378]
mov eax, dword [ebp - 0x29c]
call fcn.0040a83c
mov ecx, dword [ebp - 0x378]
lea eax, [ebp - 0x374]
mov edx, 0x505658
call fcn.00405594
mov eax, dword [ebp - 0x374]
call fcn.00405748
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x2cc], eax
cmp dword [ebp - 0x2cc], 0xffffffff
jne 0x50524f
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x20
jne 0x505208
inc dword [ebp - 0x2c0]
push 0xa
call sub.kernel32.dll_Sleep_1
cmp dword [ebp - 0x2c0], 0x14
jl 0x50517a
mov eax, dword [0x7d6388]
mov edx, dword [ebp - 0x29c]
cmp dword [eax + edx*8 + 4], 0
jne 0x505226
cmp dword [eax + edx*8], 0
jbe 0x5055fe
jmp 0x50522c
jle 0x5055fe
mov eax, dword [0x7d6388]
mov edx, dword [ebp - 0x29c]
mov ecx, dword [eax + edx*8]
mov dword [ebp - 0x2a8], ecx
mov ecx, dword [eax + edx*8 + 4]
mov dword [ebp - 0x2a4], ecx
jmp 0x5055fe
cmp dword [ebp - 0x2a0], 1
jne 0x505269
call fcn.00504884
test al, al
je 0x505269
xor eax, eax
mov dword [ebp - 0x2a0], eax
cmp dword [ebp - 0x2a0], 1
jne 0x505318
lea eax, [ebp - 0x37c]
call fcn.004a1a18
mov eax, dword [ebp - 0x37c]
mov edx, 0x505674
call fcn.00405694
jb 0x50530e
push 0
lea eax, [ebp - 0x2b0]
push eax
push 8
lea eax, [ebp - 0x2d8]
push eax
push 0
push 0
push 0x7405c
mov eax, dword [ebp - 0x2cc]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x2c5], al
cmp byte [ebp - 0x2c5], 0
je 0x50530e
mov eax, dword [ebp - 0x2d8]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x2d4]
mov dword [ebp - 0x2a4], eax
cmp dword [ebp - 0x2a4], 0
jne 0x5052fb
cmp dword [ebp - 0x2a8], 0
jbe 0x50530e
jmp 0x5052fd
jle 0x50530e
mov eax, dword [ebp - 0x2cc]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x5055fe
mov dword [ebp - 0x2a0], 2
cmp dword [ebp - 0x2a0], 2
jne 0x5054a3
lea eax, [ebp - 0x298]
xor ecx, ecx
mov edx, 0x298
call fcn.00403450
mov word [ebp - 0x298], 0x2c
mov byte [ebp - 0x294], 1
mov byte [ebp - 0x292], 0xa
mov byte [ebp - 0x291], 0x18
mov byte [ebp - 0x290], 1
mov dword [ebp - 0x28c], 0xc0
mov dword [ebp - 0x288], 2
lea eax, [ebp - 0x24c]
lea edx, [ebp - 0x298]
sub eax, edx
mov dword [ebp - 0x284], eax
lea eax, [ebp - 0x26c]
lea edx, [ebp - 0x298]
sub eax, edx
mov dword [ebp - 0x280], eax
mov byte [ebp - 0x27c], 0x25
mov eax, dword [ebp - 0x284]
add eax, dword [ebp - 0x28c]
mov dword [ebp - 0x2ac], eax
push 0
lea eax, [ebp - 0x2b0]
push eax
mov eax, dword [ebp - 0x2ac]
push eax
lea eax, [ebp - 0x298]
push eax
push 0x2c
lea eax, [ebp - 0x298]
push eax
push 0x4d004
mov eax, dword [ebp - 0x2cc]
push eax
call sub.kernel32.dll_DeviceIoControl
test eax, eax
je 0x5054a3
lea eax, [ebp - 0x24c]
xor ecx, ecx
mov edx, 0x1ff
call fcn.004a0228
xor edx, edx
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
cmp dword [ebp - 0x2a4], 0
jne 0x505432
cmp dword [ebp - 0x2a8], 0xffffffff
jne 0x505432
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x2a4], 0
jmp 0x5054a3
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
add eax, 1
adc edx, 0
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
lea eax, [ebp - 0x24c]
mov ecx, 4
mov edx, 0x1ff
call fcn.004a0228
mov dword [ebp - 0x2b0], eax
mov eax, dword [ebp - 0x2b0]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x2a8]
mov edx, dword [ebp - 0x2a4]
call fcn.004063ec
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
mov eax, dword [ebp - 0x2cc]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x5055fe
push 0
lea eax, [ebp - 0x2b0]
push eax
push 0x18
lea eax, [ebp - 0x310]
push eax
push 0
push 0
push 0x70000
mov eax, dword [ebp - 0x2cc]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x2c5], al
mov eax, dword [ebp - 0x2cc]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp byte [ebp - 0x2c5], 0
je 0x5055fe
push dword [ebp - 0x30c]
push dword [ebp - 0x310]
lea eax, [ebp - 0x47c]
call fcn.00406608
lea edx, [ebp - 0x47c]
lea eax, [ebp - 0x2c4]
call fcn.004054ec
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x2b8], eax
mov eax, dword [ebp - 0x30c]
mov dword [ebp - 0x2b4], eax
mov eax, dword [ebp - 0x300]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x304]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x2b8]
mov edx, dword [ebp - 0x2b4]
call fcn.004063ec
call fcn.004063ec
mov dword [ebp - 0x2b8], eax
mov dword [ebp - 0x2b4], edx
mov eax, dword [ebp - 0x2fc]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x2b8]
mov edx, dword [ebp - 0x2b4]
call fcn.004063ec
mov dword [ebp - 0x2b8], eax
mov dword [ebp - 0x2b4], edx
mov eax, dword [ebp - 0x2b8]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x2b4]
mov dword [ebp - 0x2a4], eax
call fcn.00504884
test al, al
je 0x5055fe
lea ecx, [ebp - 0x2f0]
lea edx, [ebp - 0x2e8]
mov eax, dword [ebp - 0x29c]
call fcn.00504a3c
mov dword [ebp - 0x2e0], eax
mov dword [ebp - 0x2dc], edx
cmp dword [ebp - 0x2dc], 0
jne 0x5055e4
cmp dword [ebp - 0x2e0], 0
jbe 0x5055fe
jmp 0x5055e6
jle 0x5055fe
mov eax, dword [ebp - 0x2e0]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x2dc]
mov dword [ebp - 0x2a4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50562e
lea eax, [ebp - 0x37c]
mov edx, 3
call fcn.0040529c
lea eax, [ebp - 0x2c4]
call fcn.00405278
ret