Function at 0x4f2840
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 0x5ac026
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 0x4f287c
call fcn.004f2720
push 0x48
call fcn.00584a5c
mov ecx, eax
add esp, 4
mov dword [ebp - 0x1c], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x4f289a
call fcn.004f8250
jmp 0x4f289c
xor eax, eax
test eax, eax
mov byte [ebp - 4], 0
mov dword [ebx + 0x20], eax
jne 0x4f28bf
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.004f8320
test eax, eax
je 0x4f291c
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f28fd
mov ecx, esi
call fcn.004f8290
push esi
call fcn.00584a85
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 0x4f2d0f
mov ecx, dword [ebx + 0x74]
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x38]
push edx
push eax
push 0
push 0
push 0x63f570
push ecx
mov dword [ebp - 0x24], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4f2cd9
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 0x4f29f7
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 0x4f29cc
test ecx, ecx
jne 0x4f29cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f29cc
push eax
lea eax, [ebp - 0x258]
push str.Error_in_GetFileSize____errcode___ld._n
push eax
call fcn.0056d05a
add esp, 0xc
lea ecx, [ebp - 0x258]
push ecx
mov ecx, ebx
call fcn.004f2710
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 0x4f2a2c
mov edx, dword [ebp - 0x40]
push 1
push 0
push 0
push edx
call fcn.0056ee00
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 0x4f2a2c
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.0056d05a
add esp, 0x10
lea ecx, [ebp - 0x258]
push ecx
mov ecx, ebx
call fcn.004f2710
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
push edi
lea ecx, [esi + 0x10]
call fcn.004fbfa0
test eax, eax
je 0x4f2a97
push eax
push edi
lea edx, [ebp - 0x258]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.0056d05a
add esp, 0x10
lea eax, [ebp - 0x258]
mov ecx, ebx
push eax
call fcn.004f2710
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f2d59
mov ecx, esi
call fcn.004f8290
push esi
call fcn.00584a85
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 0x4f2bcc
mov eax, dword [ebp - 0x14]
test eax, eax
jl 0x4f2bcc
jg 0x4f2ac5
cmp dword [ebp - 0x18], 0x800
jb 0x4f2bcc
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 0x4f2bcc
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 0x4f2bbf
cmp dword [ebp - 0x20], 0x800
jne 0x4f2bbf
push 0x10
call fcn.00584a5c
mov edi, eax
add esp, 4
mov dword [ebp - 0x28], edi
test edi, edi
mov byte [ebp - 4], 2
je 0x4f2bad
push 0x800
mov dword [edi + 4], 0
call fcn.00584a5c
add esp, 4
mov dword [ebp - 0x44], eax
test eax, eax
mov dword [edi], eax
je 0x4f2ba3
mov edx, dword [edi + 4]
lea eax, [edx + 0x800]
cmp eax, 0x800
jl 0x4f2b77
mov eax, 0x800
cmp eax, edx
jle 0x4f2ba3
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 0x4f2baf
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 0x4f2c01
xor eax, eax
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x64], eax
jmp 0x4f2c96
push eax
lea ecx, [ebp - 0x18]
push 0x638fec
push ecx
call fcn.0056d05a
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 0x4f2c3b
xor eax, eax
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x64], eax
jmp 0x4f2c96
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 0x4f2c96
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.0058148b
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.0056d05a
add esp, 0x20
lea eax, [ebp - 0x258]
mov ecx, ebx
push eax
call fcn.004f2710
xor ecx, ecx
jmp 0x4f2d7b
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f2cf0
mov ecx, esi
call fcn.004f8290
push esi
call fcn.00584a85
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.004fbf50
xor ecx, ecx
cmp eax, ecx
je 0x4f2d78
push eax
push edi
lea ecx, [ebp - 0x258]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.0056d05a
add esp, 0x10
lea edx, [ebp - 0x258]
mov ecx, ebx
push edx
call fcn.004f2710
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4f2d59
mov ecx, esi
call fcn.004f8290
push esi
call fcn.00584a85
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 0x4f2dc1
mov eax, dword [ebx + 0x74]
cmp eax, ecx
je 0x4f2dd7
lea edx, [ebp - 0x54]
push 0x10
push edx
push ecx
push ecx
push 0x63f570
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 0x4f2dd5
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
je 0x4f2dd7
push eax
mov eax, dword [ebx + 0x20]
push eax
mov ecx, ebx
call fcn.004f7480
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 0x4f2e13
jg 0x4f2e00
cmp dword [esi + 0x30], ecx
jbe 0x4f2e13
mov ecx, dword [esi + 0x80]
cmp dword [ecx + 0x24], 4
je 0x4f2e13
mov ecx, esi
call fcn.004fa950
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