Function at 0x4cb370
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 0x563d66
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 0x4cb3ac
call fcn.004cb270
push 0x30
call fcn.0054276d
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x4cb3ca
call fcn.004cf3d0
jmp 0x4cb3cc
xor eax, eax
test eax, eax
mov byte [ebp - 4], 0
mov dword [ebx + 0x14], eax
jne 0x4cb3ef
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.004cf460
test eax, eax
je 0x4cb445
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x4cb42d
mov ecx, ebx
call fcn.004cf3f0
push ebx
call fcn.00542796
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 8
mov eax, dword [ebx + 0x44]
test eax, eax
je 0x4cb7ed
mov ecx, dword [ebx + 0x54]
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x50]
push edx
push eax
push 0
push 0
push 0x5a9b3c
push ecx
mov dword [ebp - 0x34], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4cb7be
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 0x4cb520
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 0x4cb4f5
test ecx, ecx
jne 0x4cb4f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4cb4f5
push eax
lea eax, [ebp - 0x1d4]
push str.Error_in_GetFileSize____errcode___ld._n
push eax
call fcn.00527718
add esp, 0xc
lea ecx, [ebp - 0x1d4]
push ecx
mov ecx, ebx
call fcn.004cb260
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 0x4cb555
mov edx, dword [ebp - 0x40]
push 1
push 0
push 0
push edx
call fcn.005291e0
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 0x4cb555
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.00527718
add esp, 0x10
lea ecx, [ebp - 0x1d4]
push ecx
mov ecx, ebx
call fcn.004cb260
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
push edi
lea ecx, [esi + 0x10]
call fcn.004d20c0
test eax, eax
je 0x4cb5b9
push eax
push edi
lea edx, [ebp - 0x1d4]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.00527718
add esp, 0x10
lea eax, [ebp - 0x1d4]
mov ecx, ebx
push eax
call fcn.004cb260
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x4cb837
mov ecx, ebx
call fcn.004cf3f0
push ebx
call fcn.00542796
add esp, 4
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 + 0x7c]
mov eax, dword [ecx + 0x1cc]
test eax, eax
jne 0x4cb6eb
mov eax, dword [ebp - 0x14]
test eax, eax
jl 0x4cb6eb
jg 0x4cb5e4
cmp dword [ebp - 0x18], 0x800
jb 0x4cb6eb
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 0x4cb6e5
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 0x4cb6de
cmp dword [ebp - 0x2c], 0x800
jne 0x4cb6de
push 0x10
call fcn.0054276d
mov edi, eax
add esp, 4
mov dword [ebp - 0x30], edi
test edi, edi
mov byte [ebp - 4], 2
je 0x4cb6cc
push 0x800
mov dword [edi + 4], 0
call fcn.0054276d
add esp, 4
mov dword [ebp - 0x3c], eax
test eax, eax
mov dword [edi], eax
je 0x4cb6c2
mov edx, dword [edi + 4]
lea eax, [edx + 0x800]
cmp eax, 0x800
jl 0x4cb696
mov eax, 0x800
cmp eax, edx
jle 0x4cb6c2
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 0x4cb6ce
xor edi, edi
mov edx, dword [ebp + 8]
mov byte [ebp - 4], 0
mov eax, dword [edx + 0x7c]
mov dword [eax + 0x1cc], 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 0x4cb71d
xor eax, eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x44], eax
jmp 0x4cb77b
push eax
lea ecx, [ebp - 0x28]
push 0x5a3e38
push ecx
call fcn.00527718
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 0x4cb757
xor eax, eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x44], eax
jmp 0x4cb77b
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.00527718
add esp, 0x20
lea eax, [ebp - 0x1d4]
mov ecx, ebx
push eax
call fcn.004cb260
xor ecx, ecx
jmp 0x4cb852
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x4cb7d5
mov ecx, ebx
call fcn.004cf3f0
push ebx
call fcn.00542796
add esp, 4
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.004d2070
xor ecx, ecx
cmp eax, ecx
je 0x4cb84f
push eax
push edi
lea ecx, [ebp - 0x1d4]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.00527718
add esp, 0x10
lea edx, [ebp - 0x1d4]
mov ecx, ebx
push edx
call fcn.004cb260
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x4cb837
mov ecx, ebx
call fcn.004cf3f0
push ebx
call fcn.00542796
add esp, 4
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 0x4cb898
mov eax, dword [ebx + 0x54]
cmp eax, ecx
je 0x4cb8ae
lea edx, [ebp - 0x20]
push 0x10
push edx
push ecx
push ecx
push 0x5a9b3c
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 0x4cb8ac
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
je 0x4cb8ae
push eax
mov eax, dword [ebx + 0x14]
push eax
mov ecx, ebx
call fcn.004ce610
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 0x4cb8de
jg 0x4cb8d7
cmp dword [esi + 0x30], ecx
jbe 0x4cb8de
mov ecx, esi
call fcn.004d17d0
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