Function at 0x4f5d10
Capabilities:
Access peb ldr_data
Delete registry value
Get file size
Get ntdll base address
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ac1f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x338
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
push ebx
push esi
mov ebx, ecx
push edi
mov edi, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x18]
mov dword [ebx], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebx + 0xc], edi
mov edi, dword [ebp + 0x2c]
mov dword [ebx + 0x38], esi
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x40], esi
mov dword [ebx + 0x50], esi
mov dword [ebx + 0x90], esi
cmp eax, esi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x70], ebx
mov dword [ebp - 4], esi
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x3c], esi
mov dword [ebx + 0x1c], esi
mov dword [ebx + 0x88], esi
mov dword [ebx + 0x44], esi
mov dword [ebx + 0x54], esi
mov dword [ebx + 0x94], esi
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x60], esi
mov dword [ebx + 4], edx
mov dword [ebx + 8], ecx
mov dword [ebx + 0x10], edi
jne 0x4f5d9e
cmp ecx, esi
jne 0x4f5db5
jmp 0x4f6c52
push eax
lea ecx, [ebp - 0x344]
push str.SoftwareDownloadManager_ldChList
push ecx
call fcn.0056d05a
add esp, 0xc
jmp 0x4f5dcb
push ecx
push edx
lea edx, [ebp - 0x344]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ldChList
push edx
call fcn.0056d05a
add esp, 0x10
mov eax, dword [ebx + 0x74]
lea edi, [ebx + 0x74]
cmp eax, esi
je 0x4f5ddc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x344]
push eax
push edi
push esi
push 0xf003f
push esi
push 0x663188
push esi
push ecx
push reloc.WSOCK32.dll_accept
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp + 0xc], esi
je 0x4f5e36
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
push edx
push eax
push ecx
mov ecx, ebx
call fcn.004f5050
cmp eax, esi
je 0x4f6bf9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov ecx, dword [edi]
lea edx, [ebp + 0xc]
lea eax, [ebp - 0x2c]
push edx
push eax
push esi
push esi
push 0x63f570
push ecx
mov dword [ebx + 0x64], esi
mov dword [ebp + 0xc], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4f6bf9
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x4f5fce
push eax
lea edx, [ebp - 0x344]
push str.SoftwareDownloadManager_ld
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [ebp - 0x64]
lea ecx, [ebp + 0x2c]
lea edx, [ebp - 0x344]
push eax
push ecx
push esi
push 0xf003f
push esi
push 0x663188
push esi
push edx
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push esi
lea eax, [ebp + 0xc]
push esi
mov ecx, dword [ebp + 0x2c]
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 + 0xc]
inc edx
push edx
call fcn.00584a5c
mov edi, eax
add esp, 4
cmp edi, esi
mov dword [ebp + 0x28], edi
jne 0x4f5eed
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 0x28
mov ecx, dword [ebp + 0x2c]
lea eax, [ebp + 0xc]
push eax
push edi
push esi
push esi
push str.LocalFileName
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4f5f32
push str.Cannot_find_old_localFileName_in_registry._n
mov ecx, ebx
call fcn.004f2710
push edi
call fcn.00584a85
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 0x28
push edi
lea edx, [ebp - 0x2c4]
push str.Loading_old_localFileName____s_from_registry_n
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
mov edx, dword [ebp + 0x2c]
lea ecx, [ebp + 0xc]
lea edi, [ebx + 0x40]
push ecx
push edi
push esi
push esi
push str.FileSize
push edx
mov dword [ebp + 0xc], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4f5f99
push str.Cannot_find_old_file_size_in_registry._n
mov ecx, ebx
call fcn.004f2710
mov ecx, dword [ebp + 0x2c]
mov dword [edi], esi
push ecx
mov dword [edi + 4], esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4f604c
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.0056d05a
add esp, 0x10
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
mov ecx, dword [ebp + 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4f604c
cmp dword [ebp + 0x1c], esi
jne 0x4f5fe9
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 0x28
mov edi, dword [ebp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00584a5c
add esp, 4
cmp eax, esi
mov dword [ebp + 0x28], eax
jne 0x4f601d
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 0x28
mov edi, dword [ebp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [ebp + 0x20]
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0x28]
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 + 0x24]
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x44], ecx
xor esi, esi
mov edx, dword [ebp + 0x28]
mov ecx, ebx
push edx
push esi
call fcn.004f7fc0
mov edi, dword [ebp + 0x28]
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp + 0xc], 0x10
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.00584a5c
add esp, 4
cmp eax, esi
mov dword [ebp + 0x1c], eax
jne 0x4f60a2
mov eax, dword [ebp + 0x28]
push eax
call fcn.00584a85
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 0x28
mov edi, dword [ebp + 0x28]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.00584a5c
add esp, 4
cmp eax, esi
mov dword [ebp + 0x24], eax
jne 0x4f60f1
mov ecx, dword [ebp + 0x28]
push ecx
call fcn.00584a85
mov edx, dword [ebp + 0x1c]
add esp, 4
push edx
call fcn.00584a85
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 0x28
push str.Rebuilding_old_downloaded_files_before_resume._n
mov ecx, ebx
call fcn.004f2710
mov eax, dword [ebp + 0x28]
push esi
push esi
push 3
push esi
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4f6145
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.0056d05a
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
jmp 0x4f61bb
lea eax, [ebp - 0x44]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], esi
cmp dword [ebx + 0x38], 0xffffffff
jne 0x4f6197
mov eax, esi
cmp eax, esi
jne 0x4f6197
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
je 0x4f6197
push eax
lea ecx, [ebp - 0x2c4]
push str.Error_during_GetFileSize____errcode___d._n
push ecx
call fcn.0056d05a
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
mov dword [ebx + 0x38], esi
mov dword [ebx + 0x3c], esi
jmp 0x4f61b4
mov eax, dword [ebp - 0x44]
push 1
push esi
push esi
push eax
call fcn.0056ee00
mov ecx, dword [ebx + 0x38]
add ecx, eax
mov dword [ebx + 0x38], ecx
mov eax, dword [ebx + 0x3c]
adc eax, edx
mov dword [ebx + 0x3c], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
push esi
mov dword [ebx + 0x98], ecx
mov ecx, dword [ebp + 0x28]
push esi
lea eax, [ebp + 0x10]
push esi
push eax
push ecx
mov dword [ebx + 0x9c], edx
mov dword [ebx + 0x64], 1
call fcn.0056d0ac
mov eax, dword [ebx + 0x3c]
add esp, 0x14
cmp eax, esi
jg 0x4f61fb
jl 0x4f61f5
cmp dword [ebx + 0x38], esi
jae 0x4f61fb
mov dword [ebx + 0x38], esi
mov dword [ebx + 0x3c], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], esi
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x18]
push edx
push 0x638fec
push eax
call fcn.0056d05a
mov eax, dword [ebp - 0x28]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4f62a8
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x88], ecx
mov dword [ebx + 0x90], edx
push str.This_is_the_last_chunk._End_rebuilding._n
mov ecx, ebx
mov dword [ebx + 0x94], eax
call fcn.004f2710
mov edi, dword [ebp + 0x28]
xor esi, esi
push edi
call fcn.00584a85
mov ecx, dword [ebp + 0x1c]
add esp, 4
push ecx
call fcn.00584a85
mov edx, dword [ebp + 0x24]
add esp, 4
push edx
call fcn.00584a85
mov eax, dword [ebx + 0x74]
lea edi, [ebx + 0x74]
add esp, 4
cmp eax, esi
je 0x4f6283
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x4f6b50
push eax
lea eax, [ebp - 0x344]
push str.SoftwareDownloadManager_ldChList
push eax
call fcn.0056d05a
add esp, 0xc
jmp 0x4f6b6c
mov edi, dword [ebp + 0x28]
mov ecx, ebx
push edi
push eax
call fcn.004f7fc0
lea ecx, [ebp + 0xc]
lea edx, [ebp - 0x2c]
push ecx
mov ecx, dword [ebx + 0x74]
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 0x4f62fa
push eax
lea edx, [ebp - 0x2c4]
push str.Error_reading_registry__errCode___d._End_rebuilding._n
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
jmp 0x4f6251
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x2c]
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.0056d05a
add esp, 0x1c
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
mov edx, dword [ebp - 0x2c]
push edx
push edi
mov edi, dword [ebp + 0x1c]
push str._s_d
push edi
call fcn.0056d05a
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 - 0x1c], eax
je 0x4f6528
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x44]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor esi, esi
cmp edi, 0xffffffff
jne 0x4f64aa
test esi, esi
jne 0x4f64aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f64aa
push eax
lea edx, [ebp - 0x2c4]
push str.Error_during_GetFileSize____errcode___d._n
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
mov edx, dword [ebx + 0x74]
lea ecx, [ebp - 0x18]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x2c4]
push eax
push str.Deleting_record__s_from_registry_n
push ecx
call fcn.0056d05a
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
mov esi, dword [ebp - 0x34]
lea eax, [ebp - 0x18]
push esi
push 0x638fec
push eax
call fcn.0056d05a
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x40]
add esp, 0xc
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebx + 0x74]
push 0x10
push edx
push 0
lea eax, [ebp - 0x18]
push 0
push eax
push ecx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4f643e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
push edx
push eax
push edi
push esi
lea ecx, [ebp - 0x2c4]
push str.Adding_record_with_ID__d__startPos__I64d__nextID__d_n
push ecx
call fcn.0056d05a
add esp, 0x18
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
mov eax, dword [ebp + 0x1c]
push eax
call fcn.0056e8d1
add esp, 4
cmp eax, 0xffffffff
jne 0x4f6204
mov ecx, dword [ebp + 0x1c]
lea edx, [ebp - 0x2c4]
push ecx
push str.Could_not_delete_temp_file__s_n
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
jmp 0x4f6204
mov ecx, dword [ebp - 0x44]
push 1
push 0
push 0
push ecx
call fcn.0056ee00
add edi, eax
lea eax, [ebp - 0x2c4]
adc esi, edx
mov edx, dword [ebp + 0x1c]
push esi
push edi
push edx
push str.next_file__s__size__I64d_n
push eax
call fcn.0056d05a
add esp, 0x14
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
test esi, esi
jl 0x4f63b9
jg 0x4f64f7
test edi, edi
jbe 0x4f63b9
mov edx, dword [ebx + 0x38]
mov eax, dword [ebp - 0x34]
add edx, edi
mov dword [ebx + 0x38], edx
mov ecx, dword [ebx + 0x3c]
adc ecx, esi
test eax, eax
mov dword [ebx + 0x3c], ecx
je 0x4f655a
mov edx, dword [ebp + 0x28]
mov esi, dword [ebp + 0x24]
mov ecx, eax
push ecx
push edx
push str._s_d
push esi
call fcn.0056d05a
add esp, 0x10
jmp 0x4f6572
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.0056d05a
add esp, 0x10
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
mov dword [ebp - 0x1c], esi
jmp 0x4f63b9
mov eax, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x24]
push eax
push 0x638fa8
push ecx
call fcn.0056d05a
mov esi, dword [ebp + 0x24]
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 + 0x2c], eax
jne 0x4f66fa
push esi
lea edx, [ebp - 0x2c4]
push str.Error_opening_file__s._n
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
mov dword [ebp + 0x2c], 0
xor esi, esi
xor edi, edi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], edi
mov edx, dword [ebp + 0x24]
push edi
push esi
push edx
lea eax, [ebp - 0x2c4]
push str.this_file__s__size__I64d_n
push eax
call fcn.0056d05a
add esp, 0x14
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
mov edx, dword [0x65ec1c]
xor esi, esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x30]
push eax
push str.sk_ld
push ecx
mov byte [ebp - 4], 3
call fcn.0058148b
mov ecx, dword [ebp - 0x30]
add esp, 0xc
lea edx, [ebp - 0x5c]
lea eax, [ebp - 0x38]
push edx
mov edx, dword [ebx + 0x74]
push eax
push esi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, 4
push ecx
push edx
mov dword [ebp - 0x5c], edi
call esi
test eax, eax
jne 0x4f6664
mov eax, dword [ebp - 0x38]
test eax, eax
jbe 0x4f6664
mov edx, dword [ebx + 0x74]
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x60]
push eax
push ecx
push 0
push 0
push str.mmsPacketSize
push edx
mov dword [ebp - 0x5c], edi
call esi
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x3c]
sub eax, edx
mov edx, esi
sbb edx, ecx
mov ecx, dword [ebp - 0x60]
imul ecx, dword [ebp - 0x38]
xor edi, edi
add ecx, dword [ebp - 0x4c]
adc edi, dword [ebp - 0x48]
cmp ecx, eax
jne 0x4f68f3
cmp edi, edx
jne 0x4f68f3
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x2c]
lea ecx, [ebp + 0x10]
push 0
push ecx
push edx
push edi
mov ecx, ebx
call fcn.004f4a60
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4f6789
cmp esi, 0x757c
je 0x4f6789
mov eax, dword [ebp + 0x28]
push eax
call fcn.00584a85
mov ecx, dword [ebp + 0x1c]
add esp, 4
push ecx
call fcn.00584a85
mov edx, dword [ebp + 0x24]
add esp, 4
push edx
call fcn.00584a85
add esp, 4
jmp 0x4f6a25
test eax, eax
je 0x4f65c1
mov edx, dword [ebp + 0x2c]
lea ecx, [ebp - 0x44]
xor edi, edi
push ecx
push edx
mov dword [ebp - 0x44], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4f6752
test edi, edi
jne 0x4f6752
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f6752
push eax
lea eax, [ebp - 0x2c4]
push str.Error_during_GetFileSize____errcode___d._n
push eax
call fcn.0056d05a
add esp, 0xc
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
jmp 0x4f65c1
mov edx, dword [ebp - 0x44]
push 1
push 0
push 0
push edx
call fcn.0056ee00
mov ecx, dword [ebp + 0x2c]
add esi, eax
lea eax, [ebp - 0x6c]
push 2
push eax
push 0
adc edi, edx
push ecx
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x6c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4f65cb
mov ecx, dword [ebx + 0x74]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea eax, [ebp - 0x18]
push eax
push ecx
call esi
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x2c4]
push edx
push str.Deleting_record__s_from_registry_n
push eax
call fcn.0056d05a
add esp, 0xc
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
mov edx, dword [0x65ec1c]
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x50], edx
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x50]
push eax
push str.sk_s
push ecx
mov byte [ebp - 4], 4
call fcn.0058148b
mov ecx, dword [ebp - 0x50]
add esp, 0xc
lea edx, [ebp - 0x74]
lea eax, [ebp - 0x68]
push edx
mov edx, dword [ebx + 0x74]
push eax
push 0
push 0
push ecx
push edx
mov dword [ebp - 0x74], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4f683a
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebx + 0x74]
add ecx, eax
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x50]
push ecx
push edx
call esi
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebx + 0x74]
lea eax, [ebp - 0x38]
push 4
push eax
push 4
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, dword [ebp - 0x34]
lea eax, [ebp - 0x18]
push esi
push 0x63b0d8
push eax
call fcn.0056d05a
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x40]
add esp, 0xc
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebx + 0x74]
push 0x10
push edx
push 0
lea eax, [ebp - 0x18]
push 0
push eax
push ecx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
push edx
push eax
push edi
push esi
lea ecx, [ebp - 0x2c4]
push str.Adding_record_with_ID__d__startPos__I64d__nextID__d_n
push ecx
call fcn.0056d05a
add esp, 0x18
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
mov esi, dword [ebp + 0x1c]
push esi
call fcn.0056e8d1
add esp, 4
cmp eax, 0xffffffff
jne 0x4f68d6
push esi
lea eax, [ebp - 0x2c4]
push str.Could_not_delete_temp_file__s_n
push eax
call fcn.0056d05a
add esp, 0xc
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 3
call fcn.005886c0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.005886c0
jmp 0x4f6204
mov ecx, dword [ebp - 0x48]
cmp ecx, edx
jl 0x4f6af5
jg 0x4f6909
cmp dword [ebp - 0x4c], eax
jbe 0x4f6af5
test ecx, ecx
jl 0x4f6af5
jg 0x4f691e
mov eax, dword [ebp - 0x4c]
test eax, eax
jbe 0x4f6af5
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
push esi
push edx
push eax
lea ecx, [ebp - 0x2c4]
push str.Chunk_order_violation_error__cInf.ID__d__startPos__I64d_n
push ecx
call fcn.0056d05a
add esp, 0x14
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x4f6af2
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x3c]
sub eax, esi
sbb ecx, edx
js 0x4f6971
jg 0x4f696c
test eax, eax
jbe 0x4f6971
mov dword [ebp - 0x58], eax
jmp 0x4f6978
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x58], eax
push ecx
push eax
lea eax, [ebp - 0x2c4]
push str.Try_rollback__set_chunksize_to__I64d_n
push eax
mov dword [ebp - 0x54], ecx
call fcn.0056d05a
add esp, 0x10
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp + 0x2c]
lea edx, [ebp - 0x54]
push 0
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x58], eax
call edi
mov esi, eax
mov eax, dword [ebp - 0x58]
cmp eax, 0xffffffff
jne 0x4f6a46
test esi, esi
je 0x4f6a46
mov edx, dword [ebp + 0x28]
push edx
call fcn.00584a85
mov eax, dword [ebp + 0x1c]
add esp, 4
push eax
call fcn.00584a85
mov ecx, dword [ebp + 0x24]
add esp, 4
push ecx
call fcn.00584a85
mov edx, dword [ebp - 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push edx
call edi
mov eax, dword [ebp + 0x2c]
push eax
call edi
push esi
lea ecx, [ebp - 0x2c4]
push str.SetFilePointer_failed__err___ld_n
push ecx
call fcn.0056d05a
add esp, 0xc
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.005886c0
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 0x28
mov eax, dword [ebp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4f6ad2
call edi
mov ecx, dword [ebp + 0x28]
mov edi, eax
push ecx
call fcn.00584a85
mov edx, dword [ebp + 0x1c]
add esp, 4
push edx
call fcn.00584a85
mov eax, dword [ebp + 0x24]
add esp, 4
push eax
call fcn.00584a85
mov ecx, dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push ecx
call esi
mov edx, dword [ebp + 0x2c]
push edx
call esi
push edi
lea eax, [ebp - 0x2c4]
push str.SetEndOfFile_failed__err___ld_n
push eax
call fcn.0056d05a
add esp, 0xc
lea ecx, [ebp - 0x2c4]
push ecx
mov ecx, ebx
call fcn.004f2710
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.005886c0
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 0x28
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x48]
mov esi, dword [ebx + 0x38]
sub edx, eax
mov eax, dword [ebp - 0x54]
sbb eax, edi
add esi, edx
mov dword [ebx + 0x38], esi
mov ecx, dword [ebx + 0x3c]
adc ecx, eax
mov dword [ebx + 0x3c], ecx
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
push esi
mov dword [ebp - 0x40], ecx
push ecx
push eax
lea ecx, [ebp - 0x2c4]
push str.Set_curID__d__curPos__I64d_n
push ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], esi
call fcn.0056d05a
add esp, 0x14
lea edx, [ebp - 0x2c4]
mov ecx, ebx
push edx
call fcn.004f2710
mov eax, dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x4f6b3f
push eax
call esi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.005886c0
jmp 0x4f6204
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push ecx
push edx
lea eax, [ebp - 0x344]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ldChList
push eax
call fcn.0056d05a
add esp, 0x10
mov eax, dword [edi]
cmp eax, esi
je 0x4f6b79
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x64]
lea edx, [ebp - 0x344]
push ecx
push edi
push esi
push 0xf003f
push esi
push 0x663188
push esi
push edx
push reloc.WSOCK32.dll_accept
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push esi
push esi
lea eax, [ebx + 0x60]
push esi
push esi
push eax
mov eax, dword [edi]
push esi
push esi
push esi
push esi
push esi
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x4f6bcc
push str.Cannot_find_registry_subkeys_counter._n
mov ecx, ebx
call fcn.004f2710
mov dword [ebx + 0x60], esi
jmp 0x4f6bf2
mov ecx, dword [ebx + 0x60]
lea edx, [ebp - 0x2c4]
push ecx
push str.Values_counter_in_the_registry_subkey___d_n
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [ebp - 0x2c4]
mov ecx, ebx
push eax
call fcn.004f2710
mov dword [ebx + 0x68], 1
mov edx, dword [ebx + 0x38]
mov eax, dword [ebx + 0x3c]
mov ecx, edx
mov dword [ebp + 0x24], eax
or ecx, eax
je 0x4f6c52
mov eax, dword [ebx + 0x40]
mov ecx, dword [ebx + 0x44]
mov edi, eax
or edi, ecx
je 0x4f6c52
mov ebx, dword [ebx + 0x70]
mov edi, dword [ebx]
cmp edi, esi
je 0x4f6c52
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 + 0x24]
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 0x28