Function at 0x4e51b0
Capabilities:
Get file size
Query or enumerate registry value
Read file on windows
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58d366
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9cc
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x10], esp
test eax, eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 4], 0
je 0x4e51ec
call fcn.004e50b0
push 0x30
call fcn.0056649c
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x4e520a
call fcn.004e97f0
jmp 0x4e520c
xor eax, eax
test eax, eax
mov byte [ebp - 4], 0
mov dword [ebx + 0x14], eax
jne 0x4e522f
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 8
mov ecx, dword [ebx + 0x4c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [eax + 0x28], ecx
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x54]
push edi
mov dword [edx + 0x2c], eax
mov ecx, dword [ebx + 0x14]
mov dword [ecx], esi
mov ecx, dword [ebx + 0x14]
call fcn.004e9880
test eax, eax
je 0x4e528c
mov edi, dword [ebx + 0x14]
test edi, edi
je 0x4e526d
mov ecx, edi
call fcn.004e9810
push edi
call fcn.005664c5
add esp, 4
mov dword [ebx + 0x14], 0
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 8
mov eax, dword [ebx + 0x44]
test eax, eax
je 0x4e5648
mov ecx, dword [ebx + 0x54]
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x50]
push edx
push eax
push 0
push 0
push 0x61be94
push ecx
mov dword [ebp - 0x34], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4e5612
push eax
push eax
push 3
push eax
push 1
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4e5367
lea edx, [ebp - 0x40]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
jne 0x4e533c
test ecx, ecx
jne 0x4e533c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4e533c
push eax
lea eax, [ebp - 0x1d4]
push str.Error_in_GetFileSize____errcode___ld._n
push eax
call fcn.0054ea2a
add esp, 0xc
lea ecx, [ebp - 0x1d4]
push ecx
mov ecx, ebx
call fcn.004e50a0
xor eax, eax
push edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 0xc]
jmp 0x4e539c
mov edx, dword [ebp - 0x40]
push 1
push 0
push 0
push edx
call fcn.00550840
mov ecx, dword [ebp - 0x18]
push edi
add ecx, eax
mov eax, dword [ebp - 0x14]
adc eax, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 0xc]
jmp 0x4e539c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp + 0xc]
push eax
push edi
lea eax, [ebp - 0x1d4]
push str.Error_opening_file__s__errcode___ld._n
push eax
call fcn.0054ea2a
add esp, 0x10
lea ecx, [ebp - 0x1d4]
push ecx
mov ecx, ebx
call fcn.004e50a0
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
push edi
lea ecx, [esi + 0x10]
call fcn.004ec4d0
test eax, eax
je 0x4e5407
push eax
push edi
lea edx, [ebp - 0x1d4]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.0054ea2a
add esp, 0x10
lea eax, [ebp - 0x1d4]
mov ecx, ebx
push eax
call fcn.004e50a0
mov edi, dword [ebx + 0x14]
test edi, edi
je 0x4e5692
mov ecx, edi
call fcn.004e9810
push edi
call fcn.005664c5
add esp, 4
mov dword [ebx + 0x14], 0
mov eax, 0x7534
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0x80]
mov eax, dword [ecx + 0xe0]
test eax, eax
jne 0x4e553f
mov eax, dword [ebp - 0x14]
test eax, eax
jl 0x4e553f
jg 0x4e5435
cmp dword [ebp - 0x18], 0x800
jb 0x4e553f
push 0
push 0
push 3
push 0
push 3
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x28], esi
je 0x4e5539
mov ecx, 0x200
xor eax, eax
lea edi, [ebp - 0x9d8]
lea edx, [ebp - 0x2c]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
push 0
push edx
lea eax, [ebp - 0x9d8]
push 0x800
push eax
push esi
mov dword [ebp - 0x2c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4e5532
cmp dword [ebp - 0x2c], 0x800
jne 0x4e5532
push 0x10
call fcn.0056649c
mov edi, eax
add esp, 4
mov dword [ebp - 0x30], edi
test edi, edi
mov byte [ebp - 4], 2
je 0x4e551d
push 0x800
mov dword [edi + 4], 0
call fcn.0056649c
add esp, 4
mov dword [ebp - 0x3c], eax
test eax, eax
mov dword [edi], eax
je 0x4e5513
mov edx, dword [edi + 4]
lea eax, [edx + 0x800]
cmp eax, 0x800
jl 0x4e54e7
mov eax, 0x800
cmp eax, edx
jle 0x4e5513
mov edi, dword [ebp - 0x3c]
mov ecx, eax
sub ecx, edx
add edi, edx
mov edx, ecx
lea esi, [ebp - 0x9d8]
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 - 0x30]
mov esi, dword [ebp - 0x28]
mov edi, ecx
mov dword [ecx + 4], eax
xor eax, eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
jmp 0x4e551f
xor edi, edi
mov edx, dword [ebp + 8]
mov byte [ebp - 4], 0
mov eax, dword [edx + 0x80]
mov dword [eax + 0xe0], edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [ebp + 0xc], ecx
mov ecx, dword [esi + 0x64]
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], eax
mov edx, dword [ebx + 0x28]
mov dword [ecx], edx
mov eax, dword [ebx + 0x2c]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x4c]
cmp eax, 0xffffffff
jne 0x4e5571
xor eax, eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x44], eax
jmp 0x4e55cf
push eax
lea ecx, [ebp - 0x28]
push 0x615ee0
push ecx
call fcn.0054ea2a
add esp, 0xc
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x50]
lea ecx, [ebp - 0x28]
push edx
mov edx, dword [ebx + 0x54]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4e55ab
xor eax, eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x44], eax
jmp 0x4e55cf
mov edx, dword [ebx + 0x14]
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
sub eax, 1
mov edx, dword [edx]
sbb ecx, 0
mov dword [edx + 0x30], eax
mov dword [edx + 0x34], ecx
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebx + 0x14]
dec eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x18], ecx
mov ecx, dword [ebx + 0x14]
mov eax, dword [ecx]
mov ecx, dword [ecx + 0x24]
mov edx, dword [eax + 0x34]
push edx
mov edx, dword [eax + 0x30]
push edx
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x20]
push edi
push edx
push eax
push ecx
lea edx, [ebp - 0x1d4]
push str.first_listitem_id___d__startpos___I64d__file__s__endpos___I64d_n
push edx
call fcn.0054ea2a
add esp, 0x20
lea eax, [ebp - 0x1d4]
mov ecx, ebx
push eax
call fcn.004e50a0
xor ecx, ecx
jmp 0x4e56b4
mov edi, dword [ebx + 0x14]
test edi, edi
je 0x4e5629
mov ecx, edi
call fcn.004e9810
push edi
call fcn.005664c5
add esp, 4
mov dword [ebx + 0x14], 0
mov eax, 0x7541
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
lea ecx, [esi + 0x10]
call fcn.004ec480
xor ecx, ecx
cmp eax, ecx
je 0x4e56b1
push eax
push edi
lea ecx, [ebp - 0x1d4]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.0054ea2a
add esp, 0x10
lea edx, [ebp - 0x1d4]
mov ecx, ebx
push edx
call fcn.004e50a0
mov edi, dword [ebx + 0x14]
test edi, edi
je 0x4e5692
mov ecx, edi
call fcn.004e9810
push edi
call fcn.005664c5
add esp, 4
mov dword [ebx + 0x14], 0
mov eax, 0x7534
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [ebx + 0x20], ecx
mov eax, dword [ebx + 0x14]
mov dword [esi + 0x60], eax
mov edx, dword [ebx + 0x14]
mov dword [edx + 0x24], ecx
mov eax, dword [ebx + 0x14]
mov dword [eax + 0x1c], ecx
mov eax, dword [ebx + 0x44]
cmp eax, ecx
jne 0x4e56fa
mov eax, dword [ebx + 0x54]
cmp eax, ecx
je 0x4e5710
lea edx, [ebp - 0x20]
push 0x10
push edx
push ecx
push ecx
push 0x61be94
push eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x4e570e
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
je 0x4e5710
push eax
mov eax, dword [ebx + 0x14]
push eax
mov ecx, ebx
call fcn.004e8a30
xor ecx, ecx
mov edx, dword [ebx + 0x14]
mov eax, dword [esi + 0x20]
mov dword [edx + 8], eax
mov eax, dword [esi + 0x24]
mov dword [edx + 0xc], eax
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x34]
cmp eax, ecx
jl 0x4e5740
jg 0x4e5739
cmp dword [esi + 0x30], ecx
jbe 0x4e5740
mov ecx, esi
call fcn.004ebbc0
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 8