Function at 0x4f1190
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 0x5aa3c6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa50
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x10], esp
test eax, eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 4], 0
je 0x4f11cc
call fcn.004f1070
push 0x48
call fcn.00582ecc
mov ecx, eax
add esp, 4
mov dword [ebp - 0x1c], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x4f11ea
call fcn.004f6ba0
jmp 0x4f11ec
xor eax, eax
test eax, eax
mov byte [ebp - 4], 0
mov dword [ebx + 0x20], eax
jne 0x4f120f
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 + 0x6c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [eax + 0x3c], ecx
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x74]
push edi
mov dword [edx + 0x40], eax
mov ecx, dword [ebx + 0x20]
mov dword [ecx], esi
mov ecx, dword [ebx + 0x20]
call fcn.004f6c60
test eax, eax
je 0x4f126c
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f124d
mov ecx, esi
call fcn.004f6be0
push esi
call fcn.00582ef5
add esp, 4
mov dword [ebx + 0x20], 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 + 0x64]
test eax, eax
je 0x4f165f
mov ecx, dword [ebx + 0x74]
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x38]
push edx
push eax
push 0
push 0
push 0x63d538
push ecx
mov dword [ebp - 0x24], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4f1629
push eax
push eax
push 3
push eax
push 1
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4f1347
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 0x4f131c
test ecx, ecx
jne 0x4f131c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f131c
push eax
lea eax, [ebp - 0x258]
push str.Error_in_GetFileSize____errcode___ld._n
push eax
call fcn.0056b4da
add esp, 0xc
lea ecx, [ebp - 0x258]
push ecx
mov ecx, ebx
call fcn.004f1060
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 0x4f137c
mov edx, dword [ebp - 0x40]
push 1
push 0
push 0
push edx
call fcn.0056d280
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 0x4f137c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp + 0xc]
push eax
push edi
lea eax, [ebp - 0x258]
push str.Error_opening_file__s__errcode___ld._n
push eax
call fcn.0056b4da
add esp, 0x10
lea ecx, [ebp - 0x258]
push ecx
mov ecx, ebx
call fcn.004f1060
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
push edi
lea ecx, [esi + 0x10]
call fcn.004fa8e0
test eax, eax
je 0x4f13e7
push eax
push edi
lea edx, [ebp - 0x258]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.0056b4da
add esp, 0x10
lea eax, [ebp - 0x258]
mov ecx, ebx
push eax
call fcn.004f1060
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f16a9
mov ecx, esi
call fcn.004f6be0
push esi
call fcn.00582ef5
add esp, 4
mov dword [ebx + 0x20], 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 0x4f151c
mov eax, dword [ebp - 0x14]
test eax, eax
jl 0x4f151c
jg 0x4f1415
cmp dword [ebp - 0x18], 0x800
jb 0x4f151c
push 0
push 0
push 3
push 0
push 3
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
mov dword [ebp - 0x1c], edx
je 0x4f151c
mov ecx, 0x200
xor eax, eax
lea edi, [ebp - 0xa5c]
push 0
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0xa5c]
push eax
push 0x800
push ecx
push edx
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4f150f
cmp dword [ebp - 0x20], 0x800
jne 0x4f150f
push 0x10
call fcn.00582ecc
mov edi, eax
add esp, 4
mov dword [ebp - 0x28], edi
test edi, edi
mov byte [ebp - 4], 2
je 0x4f14fd
push 0x800
mov dword [edi + 4], 0
call fcn.00582ecc
add esp, 4
mov dword [ebp - 0x44], eax
test eax, eax
mov dword [edi], eax
je 0x4f14f3
mov edx, dword [edi + 4]
lea eax, [edx + 0x800]
cmp eax, 0x800
jl 0x4f14c7
mov eax, 0x800
cmp eax, edx
jle 0x4f14f3
mov edi, dword [ebp - 0x44]
mov ecx, eax
sub ecx, edx
add edi, edx
mov edx, ecx
lea esi, [ebp - 0xa5c]
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 - 0x28]
mov esi, dword [ebp + 8]
mov edi, ecx
mov dword [ecx + 4], eax
xor eax, eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
jmp 0x4f14ff
xor edi, edi
mov edx, dword [esi + 0x80]
mov byte [ebp - 4], 0
mov dword [edx + 0xe0], edi
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x34]
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 + 0x38]
mov dword [ecx], edx
mov eax, dword [ebx + 0x3c]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x34]
cmp eax, 0xffffffff
jne 0x4f1551
xor eax, eax
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x64], eax
jmp 0x4f15e6
push eax
lea ecx, [ebp - 0x18]
push 0x636fe4
push ecx
call fcn.0056b4da
add esp, 0xc
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x18]
push edx
mov edx, dword [ebx + 0x74]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4f158b
xor eax, eax
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x64], eax
jmp 0x4f15e6
mov edx, dword [ebx + 0x20]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
sub eax, 1
mov edx, dword [edx]
sbb ecx, 0
mov dword [edx + 0x30], eax
mov dword [edx + 0x34], ecx
mov eax, dword [ebp - 0x38]
dec eax
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 0x20]
mov dword [ebx + 0x24], eax
mov ecx, dword [esi + 0x80]
cmp dword [ecx + 0x24], 4
jne 0x4f15e6
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x20], edx
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebp - 0x38]
mov dword [eax + 0x28], ecx
mov eax, dword [ebx + 0x20]
mov edx, dword [ebp - 0x38]
mov ecx, dword [eax + 0x10]
push edx
push ecx
add eax, 0x2c
push str._s_d
push eax
call fcn.0057f8fb
add esp, 0x10
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
mov ecx, dword [ecx + 0x38]
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 - 0x258]
push str.first_listitem_id___d__startpos___I64d__file__s__endpos___I64d_n
push edx
call fcn.0056b4da
add esp, 0x20
lea eax, [ebp - 0x258]
mov ecx, ebx
push eax
call fcn.004f1060
xor ecx, ecx
jmp 0x4f16cb
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f1640
mov ecx, esi
call fcn.004f6be0
push esi
call fcn.00582ef5
add esp, 4
mov dword [ebx + 0x20], 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.004fa890
xor ecx, ecx
cmp eax, ecx
je 0x4f16c8
push eax
push edi
lea ecx, [ebp - 0x258]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.0056b4da
add esp, 0x10
lea edx, [ebp - 0x258]
mov ecx, ebx
push edx
call fcn.004f1060
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f16a9
mov ecx, esi
call fcn.004f6be0
push esi
call fcn.00582ef5
add esp, 4
mov dword [ebx + 0x20], 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 + 0x2c], ecx
mov eax, dword [ebx + 0x20]
mov dword [esi + 0x60], eax
mov edx, dword [ebx + 0x20]
mov dword [edx + 0x38], ecx
mov eax, dword [ebx + 0x20]
mov dword [eax + 0x30], ecx
mov eax, dword [ebx + 0x64]
cmp eax, ecx
jne 0x4f1711
mov eax, dword [ebx + 0x74]
cmp eax, ecx
je 0x4f1727
lea edx, [ebp - 0x54]
push 0x10
push edx
push ecx
push ecx
push 0x63d538
push eax
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x50], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x4f1725
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
je 0x4f1727
push eax
mov eax, dword [ebx + 0x20]
push eax
mov ecx, ebx
call fcn.004f5dd0
xor ecx, ecx
mov edx, dword [ebx + 0x20]
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 0x4f1763
jg 0x4f1750
cmp dword [esi + 0x30], ecx
jbe 0x4f1763
mov ecx, dword [esi + 0x80]
cmp dword [ecx + 0x24], 4
je 0x4f1763
mov ecx, esi
call fcn.004f9290
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