Function at 0x51cc60
Capabilities:
Get disk size
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58e9d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x950
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 0xc]
push edi
mov edx, dword [esi + 0x10]
lea ebx, [esi + 0x118]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x44], esi
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov eax, dword [edx]
mov dword [ebp - 4], 0
test eax, eax
je 0x51ccc3
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [ebp + 8]
push ecx
push 0x138b
push 0x111
push eax
call edi
jmp 0x51ccc9
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esi + 0x14]
cmp dword [eax], 0
je 0x51ccf8
mov edx, dword [esi + 0x198]
mov ecx, dword [ebx]
mov dword [ebp - 0x2c], edx
mov edx, dword [ebx + 4]
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x20], edx
mov edx, dword [eax]
push ecx
push 0x1393
push 0x111
push edx
call edi
mov eax, dword [esi + 0x18]
cmp dword [eax], 0
je 0x51cd27
mov ecx, dword [esi + 0x198]
mov edx, dword [ebx]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x24], edx
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
mov eax, dword [eax]
push edx
push 0x1393
push 0x111
push eax
call edi
mov eax, dword [esi + 0x19c]
test eax, eax
je 0x51cd44
push 8
push ebx
push 0
push 0
push str.FileSize
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esi + 0xc]
push 0
push 0
lea ecx, [ebp - 0x14]
mov eax, dword [edx + 0x30]
push 0
push ecx
push eax
call fcn.0054ea7c
add esp, 0x14
push str.KERNEL32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor edi, edi
cmp eax, edi
je 0x51cd8a
push str.GetDiskFreeSpaceExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
mov dword [ebp - 0x1c], eax
je 0x51cd8d
mov dword [ebp - 0x34], 1
jmp 0x51cd90
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], edi
or ecx, 0xffffffff
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x34], edi
je 0x51cdc2
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x50]
push ecx
push edx
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x14]
push ecx
push edx
call eax
cmp eax, edi
je 0x51cdf1
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ecx
jmp 0x51cdf1
lea edx, [ebp - 0x48]
lea eax, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x38]
push eax
lea edx, [ebp - 0x18]
push ecx
lea eax, [ebp - 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x51cdf1
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], edi
imul eax, dword [ebp - 0x38]
imul eax, dword [ebp - 0x30]
mov dword [ebp - 0x24], eax
mov edi, dword [ebx]
mov ebx, dword [ebx + 4]
push 0
push 0xa
push ebx
push edi
call fcn.0054fd30
mov ecx, dword [esi + 0x70]
sub eax, ecx
mov ecx, dword [esi + 0x74]
sbb edx, ecx
mov ecx, dword [ebp - 0x20]
add eax, edi
adc edx, ebx
cmp ecx, edx
jg 0x51ce75
mov edx, dword [ebp - 0x24]
jl 0x51ce1f
cmp edx, eax
ja 0x51ce75
and edx, ecx
cmp edx, 0xffffffff
je 0x51ce75
mov edx, dword [esi + 0xc]
lea ecx, [ebp - 0x14]
mov dword [esi + 0x38], 1
push ecx
mov eax, dword [edx + 8]
mov ecx, dword [0x63f2fc]
push ebx
push edi
push eax
lea edx, [ebp - 0x458]
push ecx
push edx
call fcn.0054ea2a
add esp, 0x18
lea eax, [ebp - 0x458]
push 0x50030
push str.Internet_Download_Manager
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push str.Not_enough_disk_space_to_store_files_chunks__canceling_download._n
mov ecx, esi
call fcn.0051c2e0
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x3c]
test ecx, ecx
je 0x51cfa7
mov ecx, dword [eax + 0x34]
test ecx, ecx
je 0x51ce8e
mov eax, ecx
jmp 0x51ce91
add eax, 0x38
push 0
push 0
lea ecx, [ebp - 0x24]
push 0
push ecx
push eax
call fcn.0054fba9
add esp, 0x14
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x18]
push edx
call fcn.0056a1c0
mov edx, dword [ebp - 0x18]
mov byte [ebp - 4], 1
mov edi, edx
lea eax, [ebp - 0x14]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [edi]
jne 0x51cee0
test cl, cl
je 0x51cedc
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [edi + 1]
jne 0x51cee0
add eax, 2
add edi, 2
test cl, cl
jne 0x51cebc
xor eax, eax
jmp 0x51cee5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x51cf9b
mov eax, dword [ebp - 0x34]
or edi, 0xffffffff
or ebx, 0xffffffff
test eax, eax
je 0x51cf16
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x50]
push eax
lea eax, [ebp - 0x40]
push ecx
push eax
push edx
call dword [ebp - 0x1c]
test eax, eax
je 0x51cf3e
mov edi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x3c]
jmp 0x51cf3e
lea ecx, [ebp - 0x48]
lea eax, [ebp - 0x1c]
push ecx
push eax
lea ecx, [ebp - 0x38]
lea eax, [ebp - 0x30]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x51cf3e
mov edi, dword [ebp - 0x30]
imul edi, dword [ebp - 0x38]
imul edi, dword [ebp - 0x1c]
xor ebx, ebx
mov eax, dword [esi + 0x11c]
mov ecx, dword [esi + 0x118]
cmp ebx, eax
jg 0x51cf9b
jl 0x51cf54
cmp edi, ecx
ja 0x51cf9b
and edi, ebx
cmp edi, 0xffffffff
je 0x51cf9b
mov esi, dword [esi + 0xc]
mov edx, dword [esi + 0x30]
push edx
mov edx, dword [ebp - 0x18]
push edx
push eax
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [0x63f4c4]
push eax
lea edx, [ebp - 0x95c]
push ecx
push edx
call fcn.0054ea2a
add esp, 0x1c
lea eax, [ebp - 0x95c]
push 0x50030
push str.Internet_Download_Manager
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call fcn.0056a100
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8