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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58d4db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c0
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x48], esi
mov eax, dword [esi + 0x54]
test eax, eax
je 0x4e869b
mov eax, dword [esi + 0x20]
lea ecx, [ebp - 0x1cc]
inc eax
mov dword [ebp - 4], 0
push eax
push str.insert_from_reg__ID___d_n
push ecx
call fcn.0054ea2a
add esp, 0xc
lea edx, [ebp - 0x1cc]
mov ecx, esi
push edx
call fcn.004e50a0
mov eax, dword [esi + 0x20]
lea ecx, [ebp - 0x24]
inc eax
mov dword [ebp - 0x2c], 0x10
push eax
push 0x615ee0
push ecx
call fcn.0054ea2a
add esp, 0xc
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x24]
push edx
mov edx, dword [esi + 0x54]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4e869b
mov eax, dword [ebp - 0x38]
push 0x30
mov dword [ebp - 0x40], eax
call fcn.0056649c
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x4e84d7
call fcn.004e97f0
mov ebx, eax
jmp 0x4e84d9
xor ebx, ebx
test ebx, ebx
mov byte [ebp - 4], 0
je 0x4e869b
mov ecx, dword [esi + 0x4c]
mov dword [ebx + 0x28], ecx
mov edx, dword [esi + 0x54]
mov dword [ebx + 0x2c], edx
mov eax, dword [esi + 0x14]
or ecx, 0xffffffff
mov edi, dword [eax + 0x10]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.0056649c
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp - 0x14], edi
jne 0x4e8522
mov ecx, ebx
call fcn.004e9810
push ebx
jmp 0x4e8693
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x68]
inc edx
mov eax, edx
mov dword [esi + 0x20], edx
cmp ecx, eax
jge 0x4e8535
mov dword [esi + 0x68], eax
mov dword [ebx + 0x24], eax
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x20]
mov eax, dword [edx + 0x10]
push ecx
push eax
push str._s_d
push edi
call fcn.0054ea2a
add esp, 0x10
mov ecx, ebx
push edi
call fcn.004e9880
test eax, eax
jne 0x4e8682
push eax
push eax
push 3
push eax
push 1
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x28], eax
je 0x4e8613
lea ecx, [ebp - 0x44]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x18], eax
jne 0x4e85d4
test eax, eax
jne 0x4e85d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4e85d4
push eax
lea edx, [ebp - 0x1cc]
push str.Error_during_GetFileSize____errcode___ld._n
push edx
call fcn.0054ea2a
add esp, 0xc
lea eax, [ebp - 0x1cc]
mov ecx, esi
push eax
call fcn.004e50a0
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov edi, eax
jmp 0x4e85f0
mov ecx, dword [ebp - 0x44]
push 1
push 0
push 0
push ecx
call fcn.00550840
add edi, eax
mov eax, dword [ebp - 0x18]
adc eax, edx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, dword [ebp - 0x18]
je 0x4e8645
mov edi, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
push edx
lea ecx, [edi + 0x10]
mov dword [ebp + 8], ecx
call fcn.004ec4d0
jmp 0x4e8657
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea eax, [ebp - 0x1cc]
push str.Error_opening_file__s_to_get_size__errcode___ld._n
push eax
call fcn.0054ea2a
add esp, 0x10
lea ecx, [ebp - 0x1cc]
push ecx
mov ecx, esi
call fcn.004e50a0
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
push eax
lea ecx, [edi + 0x10]
mov dword [ebp + 8], ecx
call fcn.004ec480
test eax, eax
je 0x4e86b0
mov edi, dword [ebp - 0x14]
push eax
push edi
lea ecx, [ebp - 0x1cc]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.0054ea2a
add esp, 0x10
lea edx, [ebp - 0x1cc]
mov ecx, esi
push edx
call fcn.004e50a0
mov ecx, ebx
call fcn.004e9810
push ebx
call fcn.005664c5
add esp, 4
push edi
call fcn.005664c5
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [ebx], edi
mov eax, dword [ebp - 0x34]
add eax, ecx
mov ecx, dword [ebp - 0x30]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x38]
adc ecx, edx
cmp eax, 0xffffffff
mov dword [edi + 0x24], ecx
jne 0x4e874b
mov edx, dword [esi + 0x68]
mov eax, dword [esi + 0x14]
mov dword [esi + 0x44], 0
mov dword [esi + 0x20], edx
mov ecx, dword [eax]
mov edx, dword [edi + 0x20]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x4e873a
mov edx, dword [edi + 0x24]
cmp edx, ecx
jne 0x4e873a
push str.The_last_chunk_is_full._n
mov ecx, esi
call fcn.004e50a0
mov eax, dword [ebp - 0x14]
push eax
call fcn.005664c5
mov ecx, dword [esi + 0x18]
add esp, 4
mov edx, dword [ecx + 0x1c]
mov ecx, dword [ebp + 8]
mov dword [ebx + 0x1c], edx
mov eax, dword [esi + 0x18]
mov dword [eax + 0x1c], ebx
mov dword [esi + 0x18], ebx
mov dword [ebx + 0x14], 1
call fcn.004ec460
mov dword [ebx], 0
jmp 0x4e869b
sub eax, 1
sbb ecx, 0
mov dword [edi + 0x30], eax
mov dword [edi + 0x34], ecx
jmp 0x4e87ea
push eax
lea ecx, [ebp - 0x24]
push 0x615ee0
push ecx
call fcn.0054ea2a
add esp, 0xc
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x24]
push edx
mov edx, dword [esi + 0x54]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4e87d1
push eax
lea eax, [ebp - 0x1cc]
push str.error_reading_registry__d_n
push eax
call fcn.0054ea2a
add esp, 0xc
lea ecx, [ebp - 0x1cc]
push ecx
mov ecx, esi
call fcn.004e50a0
mov edx, dword [esi + 0x68]
mov eax, dword [esi + 0x14]
mov dword [esi + 0x44], 0
mov dword [esi + 0x20], edx
mov ecx, dword [eax]
mov edx, dword [edi + 0x20]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x4e873a
mov edx, dword [edi + 0x24]
cmp edx, ecx
jne 0x4e873a
jmp 0x4e8702
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x3c]
sub ecx, 1
sbb edx, 0
mov dword [edi + 0x30], ecx
dec eax
mov dword [edi + 0x34], edx
mov dword [esi + 0x20], eax
mov ecx, dword [edi + 0x64]
xor eax, eax
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], eax
mov edx, dword [ecx + 4]
push edx
mov edx, dword [edi + 0x30]
mov eax, dword [ecx]
mov ecx, dword [edi + 0x34]
push eax
mov eax, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x1c]
push edx
mov edx, dword [ebp - 0x14]
push eax
mov eax, dword [ebx]
push ecx
push edx
mov ecx, dword [eax + 0x24]
push ecx
lea ecx, [ebp - 0x1cc]
mov edx, dword [eax + 0x20]
mov eax, dword [ebx + 0x24]
push edx
push eax
push str.new_listitem_id___d__startpos___I64d__file__s___ndownloaded___I64d__endpos___I64d__totaldownloaded___I64d_n
push ecx
call fcn.0054ea2a
add esp, 0x30
lea edx, [ebp - 0x1cc]
mov ecx, esi
push edx
call fcn.004e50a0
mov eax, dword [ebp - 0x14]
push eax
call fcn.005664c5
mov ecx, dword [esi + 0x18]
add esp, 4
mov edx, dword [ecx + 0x1c]
mov dword [ebx + 0x1c], edx
mov eax, dword [esi + 0x18]
mov dword [eax + 0x1c], ebx
mov eax, dword [ebp - 0x40]
mov dword [edi + 0x60], ebx
cmp eax, 0xffffffff
mov dword [esi + 0x18], ebx
je 0x4e8872
push eax
push ebx
mov ecx, esi
call fcn.004e8a30
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4