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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x582a10
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1b4
push ebx
push esi
push edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
call fcn.0045d730
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x8c]
push esi
push str.SoftwareDownloadManager_ld
push eax
call fcn.0054ea2a
add esp, 0xc
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x8c]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x63e040
push 0
push eax
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push 0
lea ecx, [ebp - 0x1c]
push 0
mov edx, dword [ebp - 0x18]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [ebp - 0x1c]
inc eax
push eax
call fcn.0056649c
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [ebp - 0x4c], ebx
je 0x45da25
mov eax, dword [ebp - 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [ebp - 0x1c]
push edx
push ebx
push 0
push 0
push str.LocalFileName
push eax
call edi
test eax, eax
je 0x45d9ea
mov ecx, dword [ebp - 0x14]
push str.Cannot_find_old_localFileName_in_registry._n
mov ecx, dword [ecx + 8]
call fcn.004ec0d0
push ebx
call fcn.005664c5
mov edx, dword [ebp - 0x18]
add esp, 4
push edx
jmp 0x45da29
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x38]
push eax
push ecx
push 0
push 0
push str.FileSize
push edx
mov dword [ebp - 0x1c], 8
call edi
test eax, eax
je 0x45da42
mov eax, dword [ebp - 0x14]
push str.Cannot_find_old_file_size_in_registry._n
mov ecx, dword [eax + 8]
call fcn.004ec0d0
push ebx
call fcn.005664c5
add esp, 4
mov ecx, dword [ebp - 0x18]
push ecx
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 edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push esi
lea eax, [ebp - 0x8c]
push str.SoftwareDownloadManager_ldChList
push eax
call fcn.0054ea2a
add esp, 0xc
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x8c]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x63e040
push 0
push eax
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x48]
push ecx
push edx
push 0
push 0
mov esi, 0x10
push 0x61be94
push eax
mov dword [ebp - 0x1c], esi
call edi
test eax, eax
jne 0x45dd50
mov edi, ebx
or ecx, 0xffffffff
mov dword [ebp - 0x1c], esi
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.0056649c
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp - 0x28], esi
jne 0x45db01
push ebx
call fcn.005664c5
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 edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.0056649c
add esp, 4
mov dword [ebp - 0x54], eax
test eax, eax
jne 0x45db56
push ebx
call fcn.005664c5
add esp, 4
push esi
call fcn.005664c5
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 4
push eax
call esi
mov ecx, dword [ebp - 0x20]
push ecx
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 connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x45dba8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x1c0]
push str.Error_reading_first_chunk__errcode___d._n
push edx
call fcn.0054ea2a
mov ecx, dword [ebp - 0x14]
add esp, 0xc
lea eax, [ebp - 0x1c0]
mov ecx, dword [ecx + 8]
push eax
call fcn.004ec0d0
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
jmp 0x45dc12
lea edx, [ebp + 8]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor esi, esi
cmp edi, 0xffffffff
jne 0x45dbf5
test esi, esi
jne 0x45dbf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x45dbf5
push eax
lea eax, [ebp - 0x1c0]
push str.Error_during_GetFileSize____errcode___d._n
push eax
call fcn.0054ea2a
mov edx, dword [ebp - 0x14]
add esp, 0xc
lea ecx, [ebp - 0x1c0]
push ecx
mov ecx, dword [edx + 8]
call fcn.004ec0d0
xor edi, edi
jmp 0x45dc08
mov eax, dword [ebp + 8]
push 1
push 0
push 0
push eax
call fcn.00550840
add edi, eax
adc esi, edx
push ebx
mov dword [ebp - 0x2c], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jg 0x45dc21
jl 0x45dc1c
test edi, edi
jae 0x45dc21
xor edi, edi
mov dword [ebp - 0x2c], edi
push 0x18
call fcn.0056649c
add esp, 4
test eax, eax
je 0x45dc5c
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x2c]
sub ecx, 1
sbb edx, 0
add esi, edi
mov edi, dword [ebp - 0x3c]
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 0x45dc5e
xor eax, eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov dword [ecx], eax
mov eax, dword [ebp - 0x44]
cmp eax, 0xffffffff
je 0x45dd35
push eax
lea edx, [ebp - 0x5c]
push 0x615ee0
push edx
call fcn.0054ea2a
add esp, 0xc
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x48]
lea edx, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x20]
push ecx
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x45dcaa
push eax
push str.Error_reading_registry__errCode___d._End_rebuilding._n
jmp 0x45dd14
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x28]
push ecx
push edx
push str._s_d
push esi
call fcn.0054ea2a
add esp, 0x10
push 0
push 0
push 3
push 0
push 3
push connect
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x45de28
lea eax, [ebp + 8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor esi, esi
cmp edi, 0xffffffff
jne 0x45dd88
test esi, esi
jne 0x45dd88
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x45dd88
push eax
push str.Error_during_GetFileSize____errcode___d._n
lea ecx, [ebp - 0x1c0]
push ecx
call fcn.0054ea2a
mov eax, dword [ebp - 0x14]
add esp, 0xc
lea edx, [ebp - 0x1c0]
mov ecx, dword [eax + 8]
push edx
call fcn.004ec0d0
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.005664c5
mov edx, dword [ebp - 0x54]
add esp, 4
push edx
call fcn.005664c5
mov ebx, dword [ebp - 0x4c]
add esp, 4
push ebx
call fcn.005664c5
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 4
mov dword [eax + 4], 0
push ecx
call esi
mov edx, dword [ebp - 0x18]
push edx
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 ecx, dword [ebp + 8]
push 1
push 0
push 0
push ecx
call fcn.00550840
mov ecx, dword [ebp - 0x3c]
add edi, eax
mov eax, dword [ebp - 0x24]
adc esi, edx
mov edx, dword [ebp - 0x40]
sub edx, 1
mov dword [ebp - 0x2c], esi
sbb ecx, 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
add eax, edi
adc ecx, esi
cmp eax, edx
jne 0x45ddc9
cmp ecx, dword [ebp - 0x34]
je 0x45de0d
push 0x18
call fcn.0056649c
add esp, 4
test eax, eax
je 0x45de02
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x40]
sub ecx, 1
sbb edx, 0
add esi, edi
mov edi, dword [ebp - 0x3c]
mov dword [eax], esi
adc edi, dword [ebp - 0x2c]
mov dword [eax + 8], ecx
mov dword [eax + 0x10], 0
mov dword [eax + 0xc], edx
mov dword [eax + 4], edi
jmp 0x45de04
xor eax, eax
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x24], eax
mov dword [edx + 0x10], eax
test ebx, ebx
je 0x45dc66
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
jmp 0x45dc66
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c0]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.0054ea2a
mov eax, dword [ebp - 0x14]
add esp, 0x10
lea edx, [ebp - 0x1c0]
mov ecx, dword [eax + 8]
push edx
call fcn.004ec0d0
jmp 0x45dc66