Function at 0x4c4a50
Capabilities:
Access peb ldr_data
Delete registry value
Get file size
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x558b90
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x318
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
push ebx
push esi
mov ebx, ecx
push edi
mov edi, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x14]
mov dword [ebx], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebx + 0xc], edi
mov edi, dword [ebp + 0x28]
mov dword [ebx + 0x28], esi
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x70], esi
cmp eax, esi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x70], ebx
mov dword [ebp - 4], esi
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x2c], esi
mov dword [ebx + 0x6c], esi
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x74], esi
mov dword [ebx + 0x68], esi
mov dword [ebx + 0x40], esi
mov dword [ebx + 4], edx
mov dword [ebx + 8], ecx
mov dword [ebx + 0x10], edi
jne 0x4c4ac9
cmp ecx, esi
jne 0x4c4ae0
jmp 0x4c590c
push eax
lea ecx, [ebp - 0x324]
push str.SoftwareDownloadManager_ldChList
push ecx
call fcn.0051d0e8
add esp, 0xc
jmp 0x4c4af6
push ecx
push edx
lea edx, [ebp - 0x324]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ldChList
push edx
call fcn.0051d0e8
add esp, 0x10
mov eax, dword [ebx + 0x54]
lea edi, [ebx + 0x54]
cmp eax, esi
je 0x4c4b07
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x324]
push eax
push edi
push esi
push 0xf003f
push esi
push 0x5ba440
push esi
push ecx
push 0x80000001
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ecx, dword [edi]
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x30]
push edx
push eax
push esi
push esi
push 0x59d84c
push ecx
mov dword [ebx + 0x44], esi
mov dword [ebp - 0x1c], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4c58b3
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x4c4cb2
push eax
lea edx, [ebp - 0x324]
push str.SoftwareDownloadManager_ld
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x64]
lea ecx, [ebp + 0x28]
lea edx, [ebp - 0x324]
push eax
push ecx
push esi
push 0xf003f
push esi
push 0x5ba440
push esi
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push esi
lea eax, [ebp - 0x1c]
push esi
mov ecx, dword [ebp + 0x28]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov edx, dword [ebp - 0x1c]
inc edx
push edx
call fcn.005380a1
mov edi, eax
add esp, 4
cmp edi, esi
mov dword [ebp + 0x24], edi
jne 0x4c4be5
mov eax, 0x753b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov ecx, dword [ebp + 0x28]
lea eax, [ebp - 0x1c]
push eax
push edi
push esi
push esi
push str.LocalFileName
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4c4c2a
push str.Cannot_find_old_localFileName_in_registry._n
mov ecx, ebx
call fcn.004c2cc0
push edi
call fcn.005380ca
add esp, 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push edi
lea edx, [ebp - 0x2c4]
push str.Loading_old_localFileName____s_from_registry_n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
mov edx, dword [ebp + 0x28]
lea ecx, [ebp - 0x1c]
lea edi, [ebx + 0x30]
push ecx
push edi
push esi
push esi
push str.FileSize
push edx
mov dword [ebp - 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4c4c87
push str.Cannot_find_old_file_size_in_registry._n
mov ecx, ebx
call fcn.004c2cc0
mov dword [edi], esi
mov dword [edi + 4], esi
jmp 0x4c4d30
mov eax, dword [edi + 4]
mov ecx, dword [edi]
push eax
push ecx
lea edx, [ebp - 0x2c4]
push str.Loading_old_file_size__I64d_Bytes_from_registry_n
push edx
call fcn.0051d0e8
add esp, 0x10
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
jmp 0x4c4d30
cmp dword [ebp + 0x18], esi
jne 0x4c4ccd
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov edi, dword [ebp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.005380a1
add esp, 4
cmp eax, esi
mov dword [ebp + 0x24], eax
jne 0x4c4d01
mov eax, 0x753b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov edi, dword [ebp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [ebp + 0x1c]
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x20]
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], ecx
xor esi, esi
mov edx, dword [ebp + 0x24]
mov ecx, ebx
push edx
push esi
call fcn.004c6b80
mov edi, dword [ebp + 0x24]
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x1c], 0x10
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.005380a1
add esp, 4
cmp eax, esi
mov dword [ebp + 0x18], eax
jne 0x4c4d86
mov eax, dword [ebp + 0x24]
push eax
call fcn.005380ca
add esp, 4
mov eax, 0x753b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov edi, dword [ebp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.005380a1
add esp, 4
cmp eax, esi
mov dword [ebp + 0x20], eax
jne 0x4c4dd5
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.005380ca
mov edx, dword [ebp + 0x18]
add esp, 4
push edx
call fcn.005380ca
add esp, 4
mov eax, 0x753b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push str.Rebuilding_old_downloaded_files_before_resume._n
mov ecx, ebx
call fcn.004c2cc0
mov eax, dword [ebp + 0x24]
push esi
push esi
push 3
push esi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c4e29
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x2c4]
push str.Error_reading_first_chunk__errcode___d._n
push ecx
call fcn.0051d0e8
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004c2cc0
jmp 0x4c4e9f
lea eax, [ebp - 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], esi
cmp dword [ebx + 0x28], 0xffffffff
jne 0x4c4e7b
mov eax, esi
cmp eax, esi
jne 0x4c4e7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
je 0x4c4e7b
push eax
lea ecx, [ebp - 0x2c4]
push str.Error_during_GetFileSize____errcode___d._n
push ecx
call fcn.0051d0e8
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004c2cc0
mov dword [ebx + 0x28], esi
mov dword [ebx + 0x2c], esi
jmp 0x4c4e98
mov eax, dword [ebp - 0x3c]
push 1
push esi
push esi
push eax
call fcn.0051ec30
mov ecx, dword [ebx + 0x28]
add ecx, eax
mov dword [ebx + 0x28], ecx
mov eax, dword [ebx + 0x2c]
adc eax, edx
mov dword [ebx + 0x2c], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x28]
mov edx, dword [ebx + 0x2c]
push esi
mov dword [ebx + 0x78], ecx
mov ecx, dword [ebp + 0x24]
push esi
lea eax, [ebp + 0xc]
push esi
push eax
push ecx
mov dword [ebx + 0x7c], edx
mov dword [ebx + 0x44], 1
call fcn.0051d13a
mov eax, dword [ebx + 0x2c]
add esp, 0x14
cmp eax, esi
jg 0x4c4ed9
jl 0x4c4ed3
cmp dword [ebx + 0x28], esi
jae 0x4c4ed9
mov dword [ebx + 0x28], esi
mov dword [ebx + 0x2c], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x18]
push edx
push 0x597df0
push eax
call fcn.0051d0e8
mov eax, dword [ebp - 0x2c]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4c4f79
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x6c], ecx
mov dword [ebx + 0x70], edx
push str.This_is_the_last_chunk._End_rebuilding._n
mov ecx, ebx
mov dword [ebx + 0x74], eax
call fcn.004c2cc0
mov edi, dword [ebp + 0x24]
xor esi, esi
push edi
call fcn.005380ca
mov eax, dword [ebp + 0x18]
add esp, 4
push eax
call fcn.005380ca
mov ecx, dword [ebp + 0x20]
add esp, 4
push ecx
call fcn.005380ca
mov eax, dword [ebx + 0x54]
lea edi, [ebx + 0x54]
add esp, 4
cmp eax, esi
je 0x4c4f54
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x4c580a
push eax
lea edx, [ebp - 0x324]
push str.SoftwareDownloadManager_ldChList
push edx
call fcn.0051d0e8
add esp, 0xc
jmp 0x4c5826
mov edi, dword [ebp + 0x24]
mov ecx, ebx
push edi
push eax
call fcn.004c6b80
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x30]
push ecx
mov ecx, dword [ebx + 0x54]
xor esi, esi
push edx
push esi
lea eax, [ebp - 0x18]
push esi
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, esi
je 0x4c4fcb
push eax
lea edx, [ebp - 0x2c4]
push str.Error_reading_registry__errCode___d._End_rebuilding._n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
jmp 0x4c4f22
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
push ecx
mov ecx, dword [ebp - 0x30]
push edx
push eax
lea edx, [ebp - 0x18]
push ecx
push edx
lea eax, [ebp - 0x2c4]
push str.Read_record_num.__s_from_registry:_ID___d__startPos___I64d__nextID___d_n
push eax
call fcn.0051d0e8
add esp, 0x1c
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
mov edx, dword [ebp - 0x30]
push edx
push edi
mov edi, dword [ebp + 0x18]
push str._s_d
push edi
call fcn.0051d0e8
add esp, 0x10
push esi
push esi
push 3
push esi
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x4c51f9
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x3c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor esi, esi
cmp edi, 0xffffffff
jne 0x4c517b
test esi, esi
jne 0x4c517b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4c517b
push eax
lea edx, [ebp - 0x2c4]
push str.Error_during_GetFileSize____errcode___d._n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
mov ecx, dword [ebx + 0x54]
lea eax, [ebp - 0x18]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x2c4]
push edx
push str.Deleting_record__s_from_registry_n
push eax
call fcn.0051d0e8
add esp, 0xc
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
mov esi, dword [ebp - 0x48]
lea edx, [ebp - 0x18]
push esi
push 0x597df0
push edx
call fcn.0051d0e8
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 0x44]
add esp, 0xc
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x54]
push 0x10
push ecx
push 0
lea edx, [ebp - 0x18]
push 0
push edx
push eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4c510f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x40]
push ecx
push edx
push edi
push esi
lea eax, [ebp - 0x2c4]
push str.Adding_record_with_ID__d__startPos__I64d__nextID__d_n
push eax
call fcn.0051d0e8
add esp, 0x18
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
mov edx, dword [ebp + 0x18]
push edx
call fcn.0051de13
add esp, 4
cmp eax, 0xffffffff
jne 0x4c4ee2
mov eax, dword [ebp + 0x18]
lea ecx, [ebp - 0x2c4]
push eax
push str.Could_not_delete_temp_file__s_n
push ecx
call fcn.0051d0e8
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004c2cc0
jmp 0x4c4ee2
mov ecx, dword [ebp - 0x3c]
push 1
push 0
push 0
push ecx
call fcn.0051ec30
add edi, eax
lea eax, [ebp - 0x2c4]
adc esi, edx
mov edx, dword [ebp + 0x18]
push esi
push edi
push edx
push str.next_file__s__size__I64d_n
push eax
call fcn.0051d0e8
add esp, 0x14
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
test esi, esi
jl 0x4c508a
jg 0x4c51c8
test edi, edi
jbe 0x4c508a
mov edx, dword [ebx + 0x28]
mov eax, dword [ebp - 0x48]
add edx, edi
mov dword [ebx + 0x28], edx
mov ecx, dword [ebx + 0x2c]
adc ecx, esi
test eax, eax
mov dword [ebx + 0x2c], ecx
je 0x4c522b
mov edx, dword [ebp + 0x24]
mov esi, dword [ebp + 0x20]
mov ecx, eax
push ecx
push edx
push str._s_d
push esi
call fcn.0051d0e8
add esp, 0x10
jmp 0x4c5243
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea edx, [ebp - 0x2c4]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.0051d0e8
add esp, 0x10
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
mov dword [ebp - 0x20], esi
jmp 0x4c508a
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x20]
push eax
push 0x597ddc
push ecx
call fcn.0051d0e8
mov esi, dword [ebp + 0x20]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x28], eax
jne 0x4c53bd
push esi
lea edx, [ebp - 0x2c4]
push str.Error_opening_file__s._n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
mov dword [ebp + 0x28], 0
xor esi, esi
xor edi, edi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], edi
mov ecx, dword [ebp + 0x20]
push edi
push esi
push ecx
lea edx, [ebp - 0x2c4]
push str.this_file__s__size__I64d_n
push edx
call fcn.0051d0e8
add esp, 0x14
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
mov ecx, dword [0x5b5ecc]
xor esi, esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x48]
lea eax, [ebp - 0x34]
push edx
push str.sk_ld
push eax
mov byte [ebp - 4], 3
call fcn.0053091a
mov eax, dword [ebp - 0x34]
add esp, 0xc
lea ecx, [ebp - 0x60]
lea edx, [ebp - 0x38]
push ecx
mov ecx, dword [ebx + 0x54]
push edx
push esi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, 4
push eax
push ecx
mov dword [ebp - 0x60], edi
call esi
test eax, eax
jne 0x4c5335
mov eax, dword [ebp - 0x38]
test eax, eax
jbe 0x4c5335
mov ecx, dword [ebx + 0x54]
lea edx, [ebp - 0x60]
lea eax, [ebp - 0x6c]
push edx
push eax
push 0
push 0
push str.mmsPacketSize
push ecx
mov dword [ebp - 0x60], edi
call esi
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x40]
sub eax, edx
mov edx, esi
sbb edx, ecx
mov ecx, dword [ebp - 0x6c]
imul ecx, dword [ebp - 0x38]
xor edi, edi
add ecx, dword [ebp - 0x50]
adc edi, dword [ebp - 0x4c]
cmp ecx, eax
jne 0x4c55ad
cmp edi, edx
jne 0x4c55ad
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x28]
lea eax, [ebp + 0xc]
push eax
push ecx
push edi
mov ecx, ebx
call fcn.004c45a0
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4c5443
mov edx, dword [ebp + 0x24]
push edx
call fcn.005380ca
mov eax, dword [ebp + 0x18]
add esp, 4
push eax
call fcn.005380ca
mov ecx, dword [ebp + 0x20]
add esp, 4
push ecx
call fcn.005380ca
add esp, 4
jmp 0x4c56df
test eax, eax
je 0x4c5292
mov edx, dword [ebp + 0x28]
lea ecx, [ebp - 0x3c]
xor edi, edi
push ecx
push edx
mov dword [ebp - 0x3c], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4c5415
test edi, edi
jne 0x4c5415
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4c5415
push eax
lea eax, [ebp - 0x2c4]
push str.Error_during_GetFileSize____errcode___d._n
push eax
call fcn.0051d0e8
add esp, 0xc
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
jmp 0x4c5292
mov edx, dword [ebp - 0x3c]
push 1
push 0
push 0
push edx
call fcn.0051ec30
add esi, eax
mov eax, dword [ebp + 0x28]
push 2
push 0
adc edi, edx
push 0
push eax
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4c529c
mov eax, dword [ebx + 0x54]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea edx, [ebp - 0x18]
push edx
push eax
call esi
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x2c4]
push ecx
push str.Deleting_record__s_from_registry_n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
mov ecx, dword [0x5b5ecc]
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x54], ecx
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x54]
push edx
push str.sk_s
push eax
mov byte [ebp - 4], 4
call fcn.0053091a
mov eax, dword [ebp - 0x54]
add esp, 0xc
lea ecx, [ebp - 0x74]
lea edx, [ebp - 0x68]
push ecx
mov ecx, dword [ebx + 0x54]
push edx
push 0
push 0
push eax
push ecx
mov dword [ebp - 0x74], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4c54f4
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebx + 0x54]
add eax, edx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x54]
push eax
push ecx
call esi
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebx + 0x54]
lea edx, [ebp - 0x38]
push 4
push edx
push 4
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, dword [ebp - 0x48]
lea edx, [ebp - 0x18]
push esi
push 0x599b9c
push edx
call fcn.0051d0e8
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 0x44]
add esp, 0xc
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x54]
push 0x10
push ecx
push 0
lea edx, [ebp - 0x18]
push 0
push edx
push eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x40]
push ecx
push edx
push edi
push esi
lea eax, [ebp - 0x2c4]
push str.Adding_record_with_ID__d__startPos__I64d__nextID__d_n
push eax
call fcn.0051d0e8
add esp, 0x18
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
mov esi, dword [ebp + 0x18]
push esi
call fcn.0051de13
add esp, 4
cmp eax, 0xffffffff
jne 0x4c5590
push esi
lea edx, [ebp - 0x2c4]
push str.Could_not_delete_temp_file__s_n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.00537b04
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0
call fcn.00537b04
jmp 0x4c4ee2
mov ecx, dword [ebp - 0x4c]
cmp ecx, edx
jl 0x4c57af
jg 0x4c55c3
cmp dword [ebp - 0x50], eax
jbe 0x4c57af
test ecx, ecx
jl 0x4c57af
jg 0x4c55d8
mov eax, dword [ebp - 0x50]
test eax, eax
jbe 0x4c57af
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
push esi
push ecx
push edx
lea eax, [ebp - 0x2c4]
push str.Chunk_order_violation_error__cInf.ID__d__startPos__I64d_n
push eax
call fcn.0051d0e8
add esp, 0x14
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x4c57ac
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x40]
sub eax, esi
sbb ecx, edx
js 0x4c562b
jg 0x4c5626
test eax, eax
jbe 0x4c562b
mov dword [ebp - 0x5c], eax
jmp 0x4c5632
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x5c], eax
push ecx
push eax
lea edx, [ebp - 0x2c4]
push str.Try_rollback__set_chunksize_to__I64d_n
push edx
mov dword [ebp - 0x58], ecx
call fcn.0051d0e8
add esp, 0x10
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp + 0x28]
lea ecx, [ebp - 0x58]
push 0
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5c], eax
call edi
mov esi, eax
mov eax, dword [ebp - 0x5c]
cmp eax, 0xffffffff
jne 0x4c5700
test esi, esi
je 0x4c5700
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.005380ca
mov edx, dword [ebp + 0x18]
add esp, 4
push edx
call fcn.005380ca
mov eax, dword [ebp + 0x20]
add esp, 4
push eax
call fcn.005380ca
mov ecx, dword [ebp - 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push ecx
call edi
mov edx, dword [ebp + 0x28]
push edx
call edi
push esi
lea eax, [ebp - 0x2c4]
push str.SetFilePointer_failed__err___ld_n
push eax
call fcn.0051d0e8
add esp, 0xc
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0
call fcn.00537b04
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov edx, dword [ebp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4c578c
call edi
mov edi, eax
mov eax, dword [ebp + 0x24]
push eax
call fcn.005380ca
mov ecx, dword [ebp + 0x18]
add esp, 4
push ecx
call fcn.005380ca
mov edx, dword [ebp + 0x20]
add esp, 4
push edx
call fcn.005380ca
mov eax, dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push eax
call esi
mov ecx, dword [ebp + 0x28]
push ecx
call esi
push edi
lea edx, [ebp - 0x2c4]
push str.SetEndOfFile_failed__err___ld_n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004c2cc0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0
call fcn.00537b04
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebx + 0x28]
sub ecx, eax
sbb edx, edi
add esi, ecx
mov dword [ebx + 0x28], esi
mov eax, dword [ebx + 0x2c]
adc eax, edx
mov dword [ebx + 0x2c], eax
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
push esi
push ecx
mov dword [ebp - 0x48], eax
push eax
lea eax, [ebp - 0x2c4]
push str.Set_curID__d__curPos__I64d_n
push eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], esi
call fcn.0051d0e8
add esp, 0x14
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004c2cc0
mov edx, dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x4c57f9
push eax
call esi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0
call fcn.00537b04
jmp 0x4c4ee2
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
lea edx, [ebp - 0x324]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ldChList
push edx
call fcn.0051d0e8
add esp, 0x10
mov eax, dword [edi]
cmp eax, esi
je 0x4c5833
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x324]
push eax
push edi
push esi
push 0xf003f
push esi
push 0x5ba440
push esi
push ecx
push 0x80000001
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push esi
push esi
mov edx, dword [edi]
lea eax, [ebx + 0x40]
push esi
push esi
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x4c5886
push str.Cannot_find_registry_subkeys_counter._n
mov ecx, ebx
call fcn.004c2cc0
mov dword [ebx + 0x40], esi
jmp 0x4c58ac
mov eax, dword [ebx + 0x40]
lea ecx, [ebp - 0x2c4]
push eax
push str.Values_counter_in_the_registry_subkey___d_n
push ecx
call fcn.0051d0e8
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004c2cc0
mov dword [ebx + 0x48], 1
mov edx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x2c]
mov ecx, edx
mov dword [ebp + 0x20], eax
or ecx, eax
je 0x4c590c
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x34]
mov edi, eax
or edi, ecx
je 0x4c590c
mov ebx, dword [ebx + 0x50]
mov edi, dword [ebx]
cmp edi, esi
je 0x4c590c
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x88], ecx
push eax
mov dword [ebp - 0x84], edx
mov edx, dword [ebp + 0x20]
push 0x1389
mov ecx, edi
push 0x111
push ecx
mov dword [ebp - 0x80], edx
mov dword [ebp - 0x7c], esi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x24