Function at 0x465620
Capabilities:
Get file size
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59f888
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1e4
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], esi
call fcn.00465330
mov edi, dword [ebp + 8]
lea eax, [ebp - 0xbc]
push edi
push str.SoftwareDownloadManager_ld
push eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
call fcn.0056b4da
add esp, 0xc
lea ecx, [ebp - 0x6c]
lea edx, [ebp - 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push ecx
push edx
push esi
push 0xf003f
push esi
push 0x660ff8
lea eax, [ebp - 0xbc]
push esi
push eax
push reloc.WSOCK32.dll_accept
call ebx
push esi
lea ecx, [ebp - 0x14]
push esi
mov edx, dword [ebp - 0x18]
push ecx
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [ebp - 0x14]
inc eax
push eax
call fcn.00582ecc
add esp, 4
cmp eax, esi
mov dword [ebp + 8], eax
jne 0x4656d0
mov ecx, dword [ebp - 0x18]
push ecx
jmp 0x46570a
lea edx, [ebp - 0x14]
push edx
push eax
mov eax, dword [ebp - 0x18]
push esi
push esi
push str.LocalFileName
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x465723
push str.Cannot_find_old_localFileName_in_registry._n
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx + 8]
call fcn.004fa4e0
mov edx, dword [ebp + 8]
push edx
call fcn.00582ef5
mov eax, dword [ebp - 0x18]
add esp, 4
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x68]
push ecx
push edx
push 0
push 0
push str.TPswitch
push eax
mov esi, 1
mov dword [ebp - 0x14], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x465845
mov esi, dword [ebp - 0x68]
cmp esi, 4
jne 0x465845
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x3c]
push ecx
push edx
push eax
push eax
mov eax, dword [ebp - 0x18]
push str.Duration
push eax
mov dword [ebp - 0x14], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x46578c
push str.Cannot_find_old_duration_in_registry._n
jmp 0x4656ef
fld qword [ebp - 0x3c]
fmul qword [0x5bbd38]
call fcn.0056afb4
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push edi
lea edx, [ebp - 0xbc]
push str.SoftwareDownloadManager_ldChList
push edx
call fcn.0056b4da
add esp, 0xc
lea eax, [ebp - 0x6c]
lea ecx, [ebp - 0x20]
lea edx, [ebp - 0xbc]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0x660ff8
push 0
push edx
push reloc.WSOCK32.dll_accept
call ebx
cmp esi, 4
jne 0x465a33
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x4c]
push eax
push ecx
push 0
push 0
push 0x63d538
push edx
mov dword [ebp - 0x14], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x465879
mov eax, dword [ebp + 8]
push eax
call fcn.00582ef5
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 4
push ecx
call esi
mov edx, dword [ebp - 0x20]
push edx
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x54]
push ecx
push edx
push 0
push 0
push str.FileSize
push eax
mov dword [ebp - 0x14], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4657a0
push str.Cannot_find_old_file_size_in_registry._n
jmp 0x4656ef
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x3c]
push eax
push str._dkf
push ecx
xor esi, esi
xor edi, edi
call fcn.0056b4da
add esp, 0xc
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x8c]
lea ecx, [ebp - 0x3c]
push edx
mov edx, dword [ebp - 0x20]
push eax
push edi
push edi
push ecx
push edx
mov dword [ebp - 0x28], 0x10
call ebx
test eax, eax
jne 0x465940
mov ecx, dword [ebp - 0x84]
cmp ecx, 0xffffffff
jne 0x4658eb
mov ecx, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x2c]
cmp ebx, ecx
jl 0x465943
mov eax, dword [ebp - 0x44]
jg 0x4658e0
cmp dword [ebp - 0x30], eax
jbe 0x465946
mov esi, dword [ebp - 0x30]
mov edi, ebx
sub esi, eax
sbb edi, ecx
jmp 0x465946
mov eax, dword [ebp - 0x44]
cmp ecx, eax
jbe 0x4658fd
mov ebx, dword [ebp - 0x2c]
sub ecx, eax
mov esi, ecx
xor edi, edi
jmp 0x465946
mov edx, dword [0x65ca8c]
mov dword [ebp - 0x34], edx
push ecx
mov ecx, dword [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x48]
push eax
push ecx
lea edx, [ebp - 0x34]
push str.error_in_chlist__id_d__next_d__starttime_ld__ts_ld_n
push edx
mov byte [ebp - 4], 1
call fcn.0057f8fb
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x34]
add esp, 0x18
mov ecx, dword [ecx + 8]
push eax
call fcn.004fa4e0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0
call fcn.00586b33
mov ebx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
jne 0x46598a
push 0x18
call fcn.00582ecc
add esp, 4
test eax, eax
je 0x465981
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x40]
add ecx, esi
mov dword [eax + 0x10], 0
adc edx, edi
mov dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ebx
mov dword [ecx], eax
jmp 0x4659e2
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ecx], eax
jmp 0x4659e2
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x40]
mov dword [ecx + 0xc], edx
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
add ecx, esi
adc eax, edi
cmp eax, ebx
jg 0x4659e5
jl 0x4659ab
cmp ecx, dword [ebp - 0x30]
jae 0x4659e5
push 0x18
call fcn.00582ecc
add esp, 4
test eax, eax
je 0x4659da
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x40]
add ecx, esi
mov dword [eax + 0x10], 0
mov dword [eax], ecx
mov ecx, dword [ebp - 0x30]
adc edx, edi
mov dword [eax + 8], ecx
mov dword [eax + 4], edx
mov dword [eax + 0xc], ebx
jmp 0x4659dc
xor eax, eax
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x10], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x48]
cmp eax, 0xffffffff
je 0x465cfc
push eax
lea eax, [ebp - 0x7c]
push 0x636fe4
push eax
call fcn.0056b4da
add esp, 0xc
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x4c]
push ecx
mov ecx, dword [ebp - 0x20]
push edx
push 0
lea eax, [ebp - 0x7c]
push 0
push eax
push ecx
mov dword [ebp - 0x28], 0x10
call ebx
test eax, eax
je 0x465886
jmp 0x465cfc
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x64]
push edx
push eax
push 0
push 0
mov esi, 0x10
push 0x63d538
push ecx
mov dword [ebp - 0x14], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x465cfc
mov dword [ebp - 0x14], esi
mov esi, dword [ebp + 8]
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.00582ecc
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [ebp - 0x34], ebx
jne 0x465ab0
push esi
call fcn.00582ef5
mov edx, dword [ebp - 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 4
push edx
call esi
mov eax, dword [ebp - 0x20]
push eax
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.00582ecc
add esp, 4
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x465b05
push esi
call fcn.00582ef5
add esp, 4
push ebx
call fcn.00582ef5
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 4
push ecx
call esi
mov edx, dword [ebp - 0x20]
push edx
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push 0
push 3
push 0
push 3
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x465b57
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1f0]
push str.Error_reading_first_chunk__errcode___d._n
push eax
call fcn.0056b4da
mov edx, dword [ebp - 0x1c]
add esp, 0xc
lea ecx, [ebp - 0x1f0]
push ecx
mov ecx, dword [edx + 8]
call fcn.004fa4e0
mov esi, dword [ebp - 0x38]
mov edi, dword [ebp - 0x3c]
jmp 0x465bc1
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor esi, esi
cmp edi, 0xffffffff
jne 0x465ba4
test esi, esi
jne 0x465ba4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x465ba4
push eax
lea ecx, [ebp - 0x1f0]
push str.Error_during_GetFileSize____errcode___d._n
push ecx
call fcn.0056b4da
mov eax, dword [ebp - 0x1c]
add esp, 0xc
lea edx, [ebp - 0x1f0]
mov ecx, dword [eax + 8]
push edx
call fcn.004fa4e0
xor edi, edi
jmp 0x465bb7
mov ecx, dword [ebp - 0x24]
push 1
push 0
push 0
push ecx
call fcn.0056d280
add edi, eax
adc esi, edx
push ebx
mov dword [ebp - 0x38], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jg 0x465bd0
jl 0x465bcb
test edi, edi
jae 0x465bd0
xor edi, edi
mov dword [ebp - 0x38], edi
push 0x18
call fcn.00582ecc
add esp, 4
test eax, eax
je 0x465c0b
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x38]
sub ecx, 1
sbb edx, 0
add esi, edi
mov edi, dword [ebp - 0x58]
mov dword [eax], esi
adc edi, ebx
mov dword [eax + 8], ecx
mov dword [eax + 0x10], 0
mov dword [eax + 4], edi
mov dword [eax + 0xc], edx
jmp 0x465c0d
xor eax, eax
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov dword [edx], eax
mov eax, dword [ebp - 0x60]
cmp eax, 0xffffffff
je 0x465ce4
push eax
lea eax, [ebp - 0x74]
push 0x636fe4
push eax
call fcn.0056b4da
add esp, 0xc
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x64]
lea eax, [ebp - 0x74]
push ecx
mov ecx, dword [ebp - 0x20]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x465c59
push eax
push str.Error_reading_registry__errCode___d._End_rebuilding._n
jmp 0x465cc3
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp + 8]
mov esi, dword [ebp - 0x34]
push edx
push eax
push str._s_d
push esi
call fcn.0056b4da
add esp, 0x10
push 0
push 0
push 3
push 0
push 3
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x465dd7
lea ecx, [ebp - 0x24]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor esi, esi
cmp edi, 0xffffffff
jne 0x465d37
test esi, esi
jne 0x465d37
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x465d37
push eax
push str.Error_during_GetFileSize____errcode___d._n
lea edx, [ebp - 0x1f0]
push edx
call fcn.0056b4da
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
lea eax, [ebp - 0x1f0]
mov ecx, dword [ecx + 8]
push eax
call fcn.004fa4e0
mov edx, dword [ebp - 0x34]
push edx
call fcn.00582ef5
mov eax, dword [ebp - 0x2c]
add esp, 4
push eax
call fcn.00582ef5
add esp, 4
mov ecx, dword [ebp + 8]
push ecx
call fcn.00582ef5
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 4
mov dword [edx + 4], 0
push eax
call esi
mov ecx, dword [ebp - 0x18]
push ecx
call esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp - 0x24]
push 1
push 0
push 0
push edx
call fcn.0056d280
mov ecx, dword [ebp - 0x5c]
add edi, eax
mov eax, dword [ebp - 0x28]
adc esi, edx
mov edx, dword [ebp - 0x58]
sub ecx, 1
mov dword [ebp - 0x38], esi
sbb edx, 0
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
add eax, edi
adc ecx, esi
cmp eax, edx
jne 0x465d78
cmp ecx, dword [ebp - 0x50]
je 0x465dbc
push 0x18
call fcn.00582ecc
add esp, 4
test eax, eax
je 0x465db1
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x5c]
sub ecx, 1
sbb edx, 0
add esi, edi
mov edi, dword [ebp - 0x58]
mov dword [eax], esi
adc edi, dword [ebp - 0x38]
mov dword [eax + 8], ecx
mov dword [eax + 0x10], 0
mov dword [eax + 0xc], edx
mov dword [eax + 4], edi
jmp 0x465db3
xor eax, eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x28], eax
mov dword [ecx + 0x10], eax
test ebx, ebx
je 0x465c15
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
jmp 0x465c15
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea edx, [ebp - 0x1f0]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.0056b4da
mov ecx, dword [ebp - 0x1c]
add esp, 0x10
lea eax, [ebp - 0x1f0]
mov ecx, dword [ecx + 8]
push eax
call fcn.004fa4e0
jmp 0x465c15