Function at 0x494110
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2bc
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov dword [esp], eax
push ebx
push esi
push edi
test eax, eax
jne 0x49414a
lea edx, [esp + 0xb8]
call fcn.00493f20
test eax, eax
jne 0x4943a3
lea ecx, [esp + 0xb8]
mov dword [esp + 0xc], ecx
call fcn.00493e50
mov edx, eax
mov dword [esp + 0x18], edx
test edx, edx
jne 0x494163
lea eax, [edx + 7]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
mov eax, ebx
and eax, 2
mov esi, eax
mov dword [esp + 0x10], eax
neg esi
sbb esi, esi
and esi, 0x40000000
add esi, 0x80000000
test bl, 0x10
je 0x49418d
mov edi, 1
jmp 0x4941a1
test bl, 4
mov ecx, 0
setne cl
add ecx, 3
mov dword [esp + 0x14], ecx
mov edi, ecx
mov ecx, dword [0x53750c]
mov eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExA]
and al, 8
movzx eax, al
neg eax
mov dword [esp + 0x14], ebx
mov ebx, dword [ebp + 0x14]
sbb eax, eax
and eax, 0x4000082
sub eax, 0xffffff80
mov dword [esp + 0x1c], eax
test ecx, ecx
jne 0x4941f9
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x94
push eax
call dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
xor ecx, ecx
cmp dword [esp + 0x30], 2
mov edx, dword [esp + 0x18]
sete cl
inc ecx
mov dword [0x53750c], ecx
push 0
push eax
push edi
push 0
push 3
push esi
push edx
cmp ecx, 2
jne 0x494210
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x494216
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
jne 0x49425e
push dword [esp + 0x18]
call fcn.004ed7d6
add esp, 4
cmp dword [esp + 0x10], 0
je 0x494252
push dword [ebp + 0x18]
and ebx, 0xfffffffd
or ebx, 1
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00494110
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x494271
xor eax, eax
cmp dword [esp + 0x10], eax
setne al
inc eax
mov dword [ecx], eax
mov ebx, dword [ebp + 0x10]
lea eax, [esp + 0x1c0]
push eax
push 0x104
mov dword [ebx + 8], 0
mov dword [ebx + 0x10], 0
push dword [esp + 0x14]
mov dword [ebx], 0x51ffe0
push dword [ebp + 8]
mov dword [ebx + 4], edx
mov dword [ebx + 0xc], 0
mov dword [esp + 0x20], 0x200
call fcn.00494560
add esp, 0x10
test eax, eax
jne 0x49438e
lea ecx, [esp + 0x1c0]
call fcn.00493e50
mov esi, eax
test esi, esi
je 0x494387
mov ecx, dword [0x53750c]
test ecx, ecx
jne 0x494300
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x94
push eax
call dword [esp + 0x18]
xor ecx, ecx
cmp dword [esp + 0x30], 2
sete cl
inc ecx
mov dword [0x53750c], ecx
cmp ecx, 2
mov ecx, esi
jne 0x494345
movzx eax, word [esi]
test ax, ax
je 0x49432c
mov edx, eax
cmp dx, 0x5c
je 0x494327
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x494311
jmp 0x49432c
xor eax, eax
mov word [ecx], ax
lea eax, [esp + 0xc]
push eax
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
jmp 0x494378
mov al, byte [esi]
test al, al
je 0x494361
jmp 0x494350
cmp al, 0x5c
je 0x49435e
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x494350
jmp 0x494361
mov byte [ecx], 0
lea eax, [esp + 0xc]
push eax
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
push esi
mov edi, eax
call fcn.004ed7d6
add esp, 4
test edi, edi
jne 0x49438e
mov eax, 0x200
jmp 0x494392
mov eax, dword [esp + 0x10]
push dword [esp + 0x18]
mov dword [ebx + 0x10], eax
call fcn.004ed7d6
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret