Function at 0x50bfa0
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 0x5caf10
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x33c
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x28]
push esi
mov esi, ecx
mov ecx, dword [ebp + 0x18]
push edi
mov dword [esi], eax
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [esi + 0xc], ebx
mov ebx, dword [ebp + 0x2c]
mov dword [esi + 0x38], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x40], edi
mov dword [esi + 0x50], edi
mov dword [esi + 0x90], edi
cmp eax, edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x6c], esi
mov dword [ebp - 4], edi
mov dword [esi + 0x28], eax
mov dword [esi + 0x3c], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x88], edi
mov dword [esi + 0x44], edi
mov dword [esi + 0x54], edi
mov dword [esi + 0x94], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x60], edi
mov dword [esi + 4], edx
mov dword [esi + 8], ecx
mov dword [esi + 0x10], ebx
jne 0x50c02e
cmp ecx, edi
jne 0x50c045
jmp 0x50cec2
push eax
lea ecx, [ebp - 0x348]
push str.SoftwareDownloadManager_ldChList
push ecx
call fcn.00589e0a
add esp, 0xc
jmp 0x50c05b
push ecx
push edx
lea edx, [ebp - 0x348]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ldChList
push edx
call fcn.00589e0a
add esp, 0x10
mov eax, dword [esi + 0x74]
lea ebx, [esi + 0x74]
cmp eax, edi
je 0x50c06c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x60]
lea ecx, [ebp - 0x348]
push eax
push ebx
push edi
push 0xf003f
push edi
push 0x6874e8
push edi
push ecx
push reloc.WSOCK32.dll_accept
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp + 0xc], edi
je 0x50c0c6
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
push edx
push eax
push ecx
mov ecx, esi
call fcn.0050adf0
cmp eax, edi
je 0x50ce66
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 [ebx]
lea edx, [ebp + 0x2c]
lea eax, [ebp - 0x28]
push edx
push eax
push edi
push edi
push 0x6625c4
push ecx
mov dword [esi + 0x64], edi
mov dword [ebp + 0x2c], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x50ce66
mov eax, dword [ebp + 8]
cmp eax, edi
je 0x50c266
push eax
lea edx, [ebp - 0x348]
push str.SoftwareDownloadManager_ld
push edx
call fcn.00589e0a
add esp, 0xc
lea eax, [ebp - 0x60]
lea ecx, [ebp + 0x1c]
lea edx, [ebp - 0x348]
push eax
push ecx
push edi
push 0xf003f
push edi
push 0x6874e8
push edi
push edx
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push edi
lea eax, [ebp + 0x2c]
push edi
mov ecx, dword [ebp + 0x1c]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov edx, dword [ebp + 0x2c]
lea eax, [edx*4 + 4]
push eax
call fcn.005a1be9
mov ebx, eax
add esp, 4
cmp ebx, edi
mov dword [ebp + 0xc], ebx
jne 0x50c183
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 edx, dword [ebp + 0x1c]
lea ecx, [ebp + 0x2c]
push ecx
push ebx
push edi
push edi
push str.LocalFileName
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x50c1c8
push str.Cannot_find_old_localFileName_in_registry._n
mov ecx, esi
call fcn.00507f30
push ebx
call fcn.005a1c12
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 ebx
lea eax, [ebp - 0x2c8]
push str.Loading_old_localFileName____ls_from_registry_n
push eax
call fcn.00589e0a
add esp, 0xc
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
lea edx, [ebp + 0x2c]
lea eax, [esi + 0x40]
push edx
push eax
mov eax, dword [ebp + 0x1c]
push edi
push edi
push str.FileSize
push eax
mov dword [ebp + 0x2c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x50c230
push str.Cannot_find_old_file_size_in_registry._n
mov ecx, esi
call fcn.00507f30
mov edx, dword [ebp + 0x1c]
mov dword [esi + 0x40], edi
push edx
mov dword [esi + 0x44], edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x50c2d0
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x40]
push ecx
push edx
lea eax, [ebp - 0x2c8]
push str.Loading_old_file_size__I64d_Bytes_from_registry_n
push eax
call fcn.00589e0a
add esp, 0x10
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
mov edx, dword [ebp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x50c2d0
mov eax, dword [ebp + 0x1c]
cmp eax, edi
jne 0x50c283
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 eax
call fcn.00589432
lea eax, [eax + eax + 2]
push eax
call fcn.005a1be9
mov ebx, eax
add esp, 8
cmp ebx, edi
mov dword [ebp + 0xc], ebx
jne 0x50c2b7
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 + 0x1c]
push ecx
push ebx
call fcn.005895ca
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x24]
mov dword [esi + 0x40], edx
add esp, 8
mov dword [esi + 0x44], eax
push ebx
push edi
mov ecx, esi
call fcn.0050e3f0
push ebx
mov dword [ebp + 0x2c], 0x10
call fcn.00589432
lea ecx, [eax + eax + 0x14]
push ecx
call fcn.005a1be9
add esp, 8
cmp eax, edi
mov dword [ebp + 0x1c], eax
push ebx
jne 0x50c31b
call fcn.005a1c12
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
call fcn.00589432
lea edx, [eax + eax + 0x14]
push edx
call fcn.005a1be9
add esp, 8
cmp eax, edi
mov dword [ebp + 0x24], eax
jne 0x50c361
push ebx
call fcn.005a1c12
mov eax, dword [ebp + 0x1c]
add esp, 4
push eax
call fcn.005a1c12
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, esi
call fcn.00507f30
push edi
push edi
push 3
push edi
push 1
push closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0x28], eax
jne 0x50c3b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x2c8]
push str.Error_reading_first_chunk__errcode___d._n
push ecx
call fcn.00589e0a
add esp, 0xc
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
jmp 0x50c42f
mov ecx, dword [ebp + 0x28]
lea eax, [ebp - 0x34]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edi
cmp dword [esi + 0x38], 0xffffffff
jne 0x50c408
mov eax, edi
cmp eax, edi
jne 0x50c408
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
je 0x50c408
push eax
lea edx, [ebp - 0x2c8]
push str.Error_during_GetFileSize____errcode___d._n
push edx
call fcn.00589e0a
add esp, 0xc
lea eax, [ebp - 0x2c8]
mov ecx, esi
push eax
call fcn.00507f30
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], edi
jmp 0x50c425
mov ecx, dword [ebp - 0x34]
push 1
push edi
push edi
push ecx
call fcn.0058bcb0
mov ecx, dword [esi + 0x38]
add ecx, eax
mov dword [esi + 0x38], ecx
mov eax, dword [esi + 0x3c]
adc eax, edx
mov dword [esi + 0x3c], eax
mov edx, dword [ebp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
push edi
push edi
lea edx, [ebp - 0x78]
push edi
push edx
mov dword [esi + 0x98], eax
push ebx
mov dword [esi + 0x9c], ecx
mov dword [esi + 0x64], 1
call fcn.0058a1ba
mov eax, dword [esi + 0x3c]
add esp, 0x14
cmp eax, edi
jg 0x50c46c
jl 0x50c466
cmp dword [esi + 0x38], edi
jae 0x50c46c
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
push eax
push 0x65bfb0
push ecx
call fcn.00589e0a
mov eax, dword [ebp - 0x24]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x50c519
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
mov dword [esi + 0x90], eax
mov dword [esi + 0x94], ecx
push str.This_is_the_last_chunk._End_rebuilding._n
mov ecx, esi
mov dword [esi + 0x88], edx
call fcn.00507f30
mov ebx, dword [ebp + 0xc]
xor edi, edi
push ebx
call fcn.005a1c12
mov edx, dword [ebp + 0x1c]
add esp, 4
push edx
call fcn.005a1c12
mov eax, dword [ebp + 0x24]
add esp, 4
push eax
call fcn.005a1c12
mov eax, dword [esi + 0x74]
lea ebx, [esi + 0x74]
add esp, 4
cmp eax, edi
je 0x50c4f4
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp + 8]
cmp eax, edi
je 0x50cdbe
push eax
lea ecx, [ebp - 0x348]
push str.SoftwareDownloadManager_ldChList
push ecx
call fcn.00589e0a
add esp, 0xc
jmp 0x50cdda
mov ebx, dword [ebp + 0xc]
mov ecx, esi
push ebx
push eax
call fcn.0050e3f0
lea edx, [ebp + 0x2c]
lea eax, [ebp - 0x28]
push edx
mov edx, dword [esi + 0x74]
xor edi, edi
push eax
push edi
lea ecx, [ebp - 0x18]
push edi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
je 0x50c56b
push eax
lea eax, [ebp - 0x2c8]
push str.Error_reading_registry__errCode___d._End_rebuilding._n
push eax
call fcn.00589e0a
add esp, 0xc
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
jmp 0x50c4c2
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
push edx
mov edx, dword [ebp - 0x28]
push eax
push ecx
lea eax, [ebp - 0x18]
push edx
push eax
lea ecx, [ebp - 0x2c8]
push str.Read_record_num.__s_from_registry:_ID___d__startPos___I64d__nextID___d_n
push ecx
call fcn.00589e0a
add esp, 0x1c
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
mov eax, dword [ebp - 0x28]
push eax
push ebx
mov ebx, dword [ebp + 0x1c]
push 0x674e40
push ebx
call fcn.0058a33e
add esp, 0x10
push edi
push edi
push 3
push edi
push 3
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0x28], eax
je 0x50c798
lea ecx, [ebp - 0x34]
mov edx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor ebx, ebx
cmp edi, 0xffffffff
jne 0x50c71a
test ebx, ebx
jne 0x50c71a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50c71a
push eax
lea eax, [ebp - 0x2c8]
push str.Error_during_GetFileSize____errcode___d._n
push eax
call fcn.00589e0a
add esp, 0xc
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
mov eax, dword [esi + 0x74]
lea edx, [ebp - 0x18]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x2c8]
push ecx
push str.Deleting_record__s_from_registry_n
push edx
call fcn.00589e0a
add esp, 0xc
lea eax, [ebp - 0x2c8]
mov ecx, esi
push eax
call fcn.00507f30
mov edi, dword [ebp - 0x30]
lea ecx, [ebp - 0x18]
push edi
push 0x65bfb0
push ecx
call fcn.00589e0a
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
add esp, 0xc
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], edx
mov edx, dword [esi + 0x74]
push 0x10
push eax
push 0
lea ecx, [ebp - 0x18]
push 0
push ecx
push edx
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x50c6ae
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x3c]
push eax
push ecx
push ebx
push edi
lea edx, [ebp - 0x2c8]
push str.Adding_record_with_ID__d__startPos__I64d__nextID__d_n
push edx
call fcn.00589e0a
add esp, 0x18
lea eax, [ebp - 0x2c8]
mov ecx, esi
push eax
call fcn.00507f30
mov ecx, dword [ebp + 0x1c]
push ecx
call fcn.0058ae33
add esp, 4
cmp eax, 0xffffffff
jne 0x50c475
mov edx, dword [ebp + 0x1c]
lea eax, [ebp - 0x2c8]
push edx
push str.Could_not_delete_temp_file__ls_n
push eax
call fcn.00589e0a
add esp, 0xc
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
jmp 0x50c475
mov edx, dword [ebp - 0x34]
push 1
push 0
push 0
push edx
call fcn.0058bcb0
add edi, eax
mov eax, dword [ebp + 0x1c]
adc ebx, edx
lea ecx, [ebp - 0x2c8]
push ebx
push edi
push eax
push str.next_file__s__size__I64d_n
push ecx
call fcn.00589e0a
add esp, 0x14
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
test ebx, ebx
jl 0x50c629
jg 0x50c767
test edi, edi
jbe 0x50c629
mov edx, dword [esi + 0x38]
mov eax, dword [ebp - 0x30]
add edx, edi
mov dword [esi + 0x38], edx
mov ecx, dword [esi + 0x3c]
adc ecx, ebx
test eax, eax
mov dword [esi + 0x3c], ecx
je 0x50c7ca
mov edi, dword [ebp + 0x24]
mov edx, eax
mov eax, dword [ebp + 0xc]
push edx
push eax
push 0x674e40
push edi
call fcn.0058a33e
add esp, 0x10
jmp 0x50c7e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
lea eax, [ebp - 0x2c8]
push str.Error_opening_file__s__errcode___ld._n
push eax
call fcn.00589e0a
add esp, 0x10
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
mov dword [ebp + 0x28], edi
jmp 0x50c629
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x24]
push ecx
push 0x6758cc
push edx
call fcn.0058a33e
mov edi, dword [ebp + 0x24]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0x10], eax
jne 0x50c969
push edi
lea eax, [ebp - 0x2c8]
push str.Error_opening_file__s._n
push eax
call fcn.00589e0a
add esp, 0xc
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
mov dword [ebp + 0x10], 0
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], ebx
mov eax, dword [ebp + 0x24]
push ebx
push edi
push eax
lea ecx, [ebp - 0x2c8]
push str.this_file__s__size__I64d_n
push ecx
call fcn.00589e0a
add esp, 0x14
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
mov eax, dword [0x682f9c]
xor edi, edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x30]
lea edx, [ebp - 0x2c]
push ecx
push str.sk_ld
push edx
mov byte [ebp - 4], 3
call fcn.0059e618
mov edx, dword [ebp - 0x2c]
add esp, 0xc
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x38]
push eax
mov eax, dword [esi + 0x74]
push ecx
push edi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, 4
push edx
push eax
mov dword [ebp - 0x58], ebx
call edi
test eax, eax
jne 0x50c8d3
mov eax, dword [ebp - 0x38]
test eax, eax
jbe 0x50c8d3
mov eax, dword [esi + 0x74]
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x5c]
push ecx
push edx
push 0
push 0
push str.mmsPacketSize
push eax
mov dword [ebp - 0x58], ebx
call edi
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x3c]
sub eax, edx
mov edx, ebx
sbb edx, ecx
mov ecx, dword [ebp - 0x5c]
imul ecx, dword [ebp - 0x38]
xor edi, edi
add ecx, dword [ebp - 0x48]
adc edi, dword [ebp - 0x44]
cmp ecx, eax
jne 0x50cb61
cmp edi, edx
jne 0x50cb61
mov ecx, dword [ebp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x10]
lea edx, [ebp - 0x78]
push 0
push edx
push eax
push ebx
mov ecx, esi
call fcn.0050a7d0
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x50c9f8
cmp edi, 0x757c
je 0x50c9f8
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.005a1c12
mov edx, dword [ebp + 0x1c]
add esp, 4
push edx
call fcn.005a1c12
mov eax, dword [ebp + 0x24]
add esp, 4
push eax
call fcn.005a1c12
add esp, 4
jmp 0x50cd1f
test eax, eax
je 0x50c831
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x34]
xor ebx, ebx
push edx
push eax
mov dword [ebp - 0x34], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x50c9c1
test ebx, ebx
jne 0x50c9c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50c9c1
push eax
lea ecx, [ebp - 0x2c8]
push str.Error_during_GetFileSize____errcode___d._n
push ecx
call fcn.00589e0a
add esp, 0xc
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
jmp 0x50c831
mov eax, dword [ebp - 0x34]
push 1
push 0
push 0
push eax
call fcn.0058bcb0
add edi, eax
lea ecx, [ebp - 0x70]
adc ebx, edx
mov edx, dword [ebp + 0x10]
push 2
push ecx
push 0
push edx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x70], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x50c83b
mov edx, dword [esi + 0x74]
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea ecx, [ebp - 0x18]
push ecx
push edx
call edi
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x2c8]
push eax
push str.Deleting_record__s_from_registry_n
push ecx
call fcn.00589e0a
add esp, 0xc
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
mov eax, dword [0x682f9c]
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x4c]
push ecx
push str.sk_s
push edx
mov byte [ebp - 4], 4
call fcn.0059e618
mov edx, dword [ebp - 0x4c]
add esp, 0xc
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x64]
push eax
mov eax, dword [esi + 0x74]
push ecx
push 0
push 0
push edx
push eax
mov dword [ebp - 0x68], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x50caa8
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x38]
mov eax, dword [esi + 0x74]
add edx, ecx
mov dword [ebp - 0x38], edx
mov edx, dword [ebp - 0x4c]
push edx
push eax
call edi
mov edx, dword [ebp - 0x2c]
mov eax, dword [esi + 0x74]
lea ecx, [ebp - 0x38]
push 4
push ecx
push 4
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, dword [ebp - 0x30]
lea ecx, [ebp - 0x18]
push edi
push 0x65e490
push ecx
call fcn.00589e0a
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
add esp, 0xc
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], edx
mov edx, dword [esi + 0x74]
push 0x10
push eax
push 0
lea ecx, [ebp - 0x18]
push 0
push ecx
push edx
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x3c]
push eax
push ecx
push ebx
push edi
lea edx, [ebp - 0x2c8]
push str.Adding_record_with_ID__d__startPos__I64d__nextID__d_n
push edx
call fcn.00589e0a
add esp, 0x18
lea eax, [ebp - 0x2c8]
mov ecx, esi
push eax
call fcn.00507f30
mov edi, dword [ebp + 0x1c]
push edi
call fcn.0058ae33
add esp, 4
cmp eax, 0xffffffff
jne 0x50cb44
push edi
lea ecx, [ebp - 0x2c8]
push str.Could_not_delete_temp_file__ls_n
push ecx
call fcn.00589e0a
add esp, 0xc
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 3
call fcn.005a584d
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.005a584d
jmp 0x50c475
mov ecx, dword [ebp - 0x44]
cmp ecx, edx
jl 0x50cd63
jg 0x50cb77
cmp dword [ebp - 0x48], eax
jbe 0x50cd63
test ecx, ecx
jl 0x50cd63
jg 0x50cb8c
mov eax, dword [ebp - 0x48]
test eax, eax
jbe 0x50cd63
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
push ebx
push eax
push ecx
lea edx, [ebp - 0x2c8]
push str.Chunk_order_violation_error__cInf.ID__d__startPos__I64d_n
push edx
call fcn.00589e0a
add esp, 0x14
lea eax, [ebp - 0x2c8]
mov ecx, esi
push eax
call fcn.00507f30
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x50cd60
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
sub eax, edi
sbb ecx, edx
js 0x50cbdf
jg 0x50cbda
test eax, eax
jbe 0x50cbdf
mov dword [ebp - 0x54], eax
jmp 0x50cbe6
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], ecx
push ecx
push eax
lea ecx, [ebp - 0x2c8]
push str.Try_rollback__set_chunksize_to__I64d_n
push ecx
call fcn.00589e0a
add esp, 0x10
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp + 0x10]
lea eax, [ebp - 0x50]
push 0
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x54], eax
call edi
mov ebx, eax
mov eax, dword [ebp - 0x54]
cmp eax, 0xffffffff
jne 0x50ccb4
test ebx, ebx
je 0x50ccb4
mov eax, dword [ebp + 0xc]
push eax
call fcn.005a1c12
mov ecx, dword [ebp + 0x1c]
add esp, 4
push ecx
call fcn.005a1c12
mov edx, dword [ebp + 0x24]
add esp, 4
push edx
call fcn.005a1c12
mov eax, dword [ebp + 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push eax
call edi
mov ecx, dword [ebp + 0x10]
push ecx
call edi
push ebx
lea edx, [ebp - 0x2c8]
push str.SetFilePointer_failed__err___ld_n
push edx
call fcn.00589e0a
add esp, 0xc
lea eax, [ebp - 0x2c8]
mov ecx, esi
push eax
call fcn.00507f30
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.005a584d
mov eax, ebx
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 + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x50cd40
call edi
mov edx, dword [ebp + 0xc]
mov edi, eax
push edx
call fcn.005a1c12
mov eax, dword [ebp + 0x1c]
add esp, 4
push eax
call fcn.005a1c12
mov ecx, dword [ebp + 0x24]
add esp, 4
push ecx
call fcn.005a1c12
mov edx, dword [ebp + 0x28]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push edx
call ebx
mov eax, dword [ebp + 0x10]
push eax
call ebx
push edi
lea ecx, [ebp - 0x2c8]
push str.SetEndOfFile_failed__err___ld_n
push ecx
call fcn.00589e0a
add esp, 0xc
lea edx, [ebp - 0x2c8]
mov ecx, esi
push edx
call fcn.00507f30
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.005a584d
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 eax, dword [ebp - 0x54]
mov ebx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x44]
mov edx, dword [esi + 0x38]
sub eax, ebx
sbb ecx, edi
add edx, eax
mov dword [esi + 0x38], edx
mov eax, dword [esi + 0x3c]
adc eax, ecx
mov dword [esi + 0x3c], eax
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
push ebx
push ecx
push eax
lea edx, [ebp - 0x2c8]
push str.Set_curID__d__curPos__I64d_n
push edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ebx
call fcn.00589e0a
add esp, 0x14
lea eax, [ebp - 0x2c8]
mov ecx, esi
push eax
call fcn.00507f30
mov ecx, dword [ebp + 0x28]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call ebx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x50cdad
push eax
call ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.005a584d
jmp 0x50c475
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push edx
push eax
lea ecx, [ebp - 0x348]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ldChList
push ecx
call fcn.00589e0a
add esp, 0x10
mov eax, dword [ebx]
cmp eax, edi
je 0x50cde7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x60]
lea eax, [ebp - 0x348]
push edx
push ebx
push edi
push 0xf003f
push edi
push 0x6874e8
push edi
push eax
push reloc.WSOCK32.dll_accept
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push edi
push edi
mov ecx, dword [esi + 0x74]
lea ebx, [esi + 0x60]
push edi
push edi
push ebx
push edi
push edi
push edi
push edi
push edi
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x50ce3a
push str.Cannot_find_registry_subkeys_counter._n
mov ecx, esi
call fcn.00507f30
mov dword [ebx], edi
jmp 0x50ce5f
mov edx, dword [ebx]
lea eax, [ebp - 0x2c8]
push edx
push str.Values_counter_in_the_registry_subkey___d_n
push eax
call fcn.00589e0a
add esp, 0xc
lea ecx, [ebp - 0x2c8]
push ecx
mov ecx, esi
call fcn.00507f30
mov dword [esi + 0x68], 1
mov edx, dword [esi + 0x38]
mov eax, dword [esi + 0x3c]
mov ecx, edx
mov dword [ebp + 0x24], eax
or ecx, eax
je 0x50cec2
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
mov ebx, eax
or ebx, ecx
je 0x50cec2
mov esi, dword [esi + 0x70]
mov ebx, dword [esi]
cmp ebx, edi
je 0x50cec2
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x8c], ecx
push eax
mov dword [ebp - 0x88], edx
mov edx, dword [ebp + 0x24]
push 0x1471
mov ecx, ebx
push 0x111
push ecx
mov dword [ebp - 0x84], edx
mov dword [ebp - 0x80], edi
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