Function at 0x5071f0
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 0x5c5fbe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xab4
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 - 0x68], ebx
mov dword [ebp - 4], 0
je 0x50722c
call fcn.005070b0
push 0x50
call fcn.0059cff9
mov ecx, eax
add esp, 4
mov dword [ebp - 0x1c], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x50724a
call fcn.0050d790
jmp 0x50724c
xor eax, eax
test eax, eax
mov byte [ebp - 4], 0
mov dword [ebx + 0x20], eax
jne 0x50726f
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 edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [eax + 0x44], ecx
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x74]
push esi
mov dword [edx + 0x48], eax
mov ecx, dword [ebx + 0x20]
mov dword [ecx], edi
mov ecx, dword [ebx + 0x20]
call fcn.0050d860
test eax, eax
je 0x5072cc
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x5072ad
mov ecx, esi
call fcn.0050d7d0
push esi
call fcn.0059d022
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 0x5077f8
mov ecx, dword [ebx + 0x74]
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x60]
push edx
push eax
push 0
push 0
push 0x65d508
push ecx
mov dword [ebp - 0x34], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x5077c2
push eax
push eax
push 3
push eax
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x5073a6
lea edx, [ebp - 0x64]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
jne 0x50737e
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x50737e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50737e
push eax
lea eax, [ebp - 0x27c]
push str.Error_in_GetFileSize____errcode___ld._n
push eax
call fcn.005851fa
add esp, 0xc
lea ecx, [ebp - 0x27c]
push ecx
mov ecx, ebx
call fcn.005070a0
xor eax, eax
push edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x5073d8
mov edx, dword [ebp - 0x64]
push 1
push 0
push 0
push edx
call fcn.005870a0
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]
jmp 0x5073d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x27c]
push str.Error_opening_file__s__errcode___ld._n
push eax
call fcn.005851fa
add esp, 0x10
lea ecx, [ebp - 0x27c]
push ecx
mov ecx, ebx
call fcn.005070a0
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov edi, dword [ebp + 8]
push esi
lea ecx, [edi + 0x10]
call fcn.005115c0
test eax, eax
je 0x507442
push eax
push esi
lea edx, [ebp - 0x27c]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.005851fa
add esp, 0x10
lea eax, [ebp - 0x27c]
mov ecx, ebx
push eax
call fcn.005070a0
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x507423
mov ecx, esi
call fcn.0050d7d0
push esi
call fcn.0059d022
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 [edi + 0x80]
mov eax, dword [ecx + 0xe0]
test eax, eax
jne 0x507577
mov eax, dword [ebp - 0x14]
test eax, eax
jl 0x507577
jg 0x507470
cmp dword [ebp - 0x18], 0x800
jb 0x507577
push 0
push 0
push 3
push 0
push 3
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x1c], esi
je 0x507577
mov ecx, 0x200
xor eax, eax
lea edi, [ebp - 0xac0]
lea edx, [ebp - 0x20]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
push 0
push edx
lea eax, [ebp - 0xac0]
push 0x800
push eax
push esi
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x50756d
cmp dword [ebp - 0x20], 0x800
jne 0x50756d
push 0x10
call fcn.0059cff9
mov edi, eax
add esp, 4
mov dword [ebp - 0x44], edi
test edi, edi
mov byte [ebp - 4], 2
je 0x507558
push 0x800
mov dword [edi + 4], 0
call fcn.0059cff9
add esp, 4
mov dword [ebp - 0x24], eax
test eax, eax
mov dword [edi], eax
je 0x50754e
mov edx, dword [edi + 4]
lea eax, [edx + 0x800]
cmp eax, 0x800
jl 0x507522
mov eax, 0x800
cmp eax, edx
jle 0x50754e
mov edi, dword [ebp - 0x24]
mov ecx, eax
sub ecx, edx
add edi, edx
mov edx, ecx
lea esi, [ebp - 0xac0]
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 - 0x44]
mov esi, dword [ebp - 0x1c]
mov edi, ecx
mov dword [ecx + 4], eax
xor eax, eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
jmp 0x50755a
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 edi, dword [ebp + 8]
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edi + 0x64]
mov dword [edi + 0x20], edx
mov dword [edi + 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 - 0x5c]
cmp eax, 0xffffffff
jne 0x5075ac
xor eax, eax
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x64], eax
jmp 0x50777e
push eax
lea ecx, [ebp - 0x18]
push 0x656fa0
push ecx
call fcn.005851fa
add esp, 0xc
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x60]
xor esi, esi
push edx
mov edx, dword [ebx + 0x74]
push eax
push esi
lea ecx, [ebp - 0x18]
push esi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x5075e7
mov dword [ebx + 0x2c], esi
mov dword [ebx + 0x64], esi
jmp 0x50777e
mov edx, dword [ebx + 0x20]
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
sub eax, 1
mov edx, dword [edx]
sbb ecx, esi
mov dword [edx + 0x30], eax
mov dword [edx + 0x34], ecx
mov eax, dword [ebp - 0x60]
dec eax
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 0x20]
mov dword [ebx + 0x24], eax
mov ecx, dword [edi + 0x80]
cmp dword [ecx + 0x24], 4
jne 0x50777e
mov edx, dword [ebp - 0x58]
push 0xa
mov dword [eax + 0x20], edx
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebp - 0x60]
lea edx, [ebp - 0x2bc]
mov dword [eax + 0x28], ecx
mov eax, dword [ebp - 0x60]
push edx
push eax
call fcn.00585e92
mov esi, eax
mov eax, dword [ebx + 0x20]
mov ecx, 0x656fdc
add esp, 0xc
mov edi, dword [eax + 0x10]
add eax, 0x2c
test ecx, ecx
mov dword [ebp - 0x20], eax
je 0x50777e
test edi, edi
je 0x50777e
test esi, esi
je 0x50777e
xor eax, eax
push eax
push ecx
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], eax
mov word [ebp - 0x4c], ax
call fcn.00402800
xor eax, eax
push edi
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 3
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], eax
mov word [ebp - 0x3c], ax
call fcn.00401ee0
xor edi, edi
push esi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x28], edi
mov word [ebp - 0x2c], di
call fcn.00401ee0
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], 5
call fcn.00401070
mov eax, dword [ebp - 0x40]
cmp eax, edi
jne 0x5076c7
lea eax, [ebp - 0x3c]
mov esi, dword [ebp - 0x30]
cmp esi, edi
jne 0x5076d1
lea esi, [ebp - 0x2c]
mov edi, dword [ebp - 0x48]
push eax
call fcn.00584816
mov edx, eax
push esi
mov dword [ebp - 0x1c], edx
call fcn.00584816
mov edx, dword [ebp - 0x1c]
add edi, edx
lea edi, [eax + edi + 3]
mov dword [ebp - 0x1c], edi
lea esi, [edi + edi]
push esi
call fcn.0059cff9
mov edi, eax
mov eax, dword [ebp - 0x20]
add esp, 0xc
test edi, edi
mov dword [eax], edi
je 0x50775a
mov ecx, esi
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x30]
test eax, eax
mov edx, eax
jne 0x507726
lea edx, [ebp - 0x2c]
mov ecx, dword [ebp - 0x40]
test ecx, ecx
jne 0x507730
lea ecx, [ebp - 0x3c]
mov eax, dword [ebp - 0x50]
test eax, eax
jne 0x50773a
lea eax, [ebp - 0x4c]
mov esi, dword [ebp - 0x20]
push edx
push ecx
push eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [esi]
push eax
push ecx
call fcn.005847a6
mov edx, dword [esi]
push edx
call fcn.00584816
add esp, 0x18
mov dword [esi + 8], eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
call fcn.00401070
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 3
call fcn.00401070
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0
call fcn.00401070
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
mov ecx, dword [ecx + 0x40]
mov edx, dword [eax + 0x34]
push edx
mov edx, dword [eax + 0x30]
push edx
mov edx, dword [ebp + 0xc]
push edx
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x20]
push edx
push eax
push ecx
lea edx, [ebp - 0x27c]
push str.first_listitem_id___d__startpos___I64d__file__s__endpos___I64d_n
push edx
call fcn.005851fa
add esp, 0x20
lea eax, [ebp - 0x27c]
mov ecx, ebx
push eax
call fcn.005070a0
jmp 0x507860
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x5077d9
mov ecx, esi
call fcn.0050d7d0
push esi
call fcn.0059d022
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 esi
lea ecx, [edi + 0x10]
call fcn.00511570
xor edi, edi
cmp eax, edi
je 0x50785d
push eax
push esi
lea ecx, [ebp - 0x27c]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.005851fa
add esp, 0x10
lea edx, [ebp - 0x27c]
mov ecx, ebx
push edx
call fcn.005070a0
mov esi, dword [ebx + 0x20]
cmp esi, edi
je 0x507842
mov ecx, esi
call fcn.0050d7d0
push esi
call fcn.0059d022
add esp, 4
mov dword [ebx + 0x20], edi
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], edi
mov esi, dword [ebp + 8]
mov eax, dword [ebx + 0x20]
xor edi, edi
mov dword [esi + 0x60], eax
mov ecx, dword [ebx + 0x20]
mov dword [ecx + 0x40], edi
mov edx, dword [ebx + 0x20]
mov dword [edx + 0x38], edi
mov eax, dword [ebx + 0x64]
cmp eax, edi
jne 0x5078ab
mov eax, dword [ebx + 0x74]
cmp eax, edi
je 0x5078bf
lea ecx, [ebp - 0x78]
push 0x10
push ecx
push edi
push edi
push 0x65d508
push eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x74], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x5078bf
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
je 0x5078bf
mov edx, dword [ebx + 0x20]
push eax
push edx
mov ecx, ebx
call fcn.0050c9c0
mov eax, dword [ebx + 0x20]
mov ecx, dword [esi + 0x20]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0x24]
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x34]
mov dword [esi + 0x2c], ecx
cmp eax, edi
jl 0x5078fb
jg 0x5078e8
cmp dword [esi + 0x30], edi
jbe 0x5078fb
mov edx, dword [esi + 0x80]
cmp dword [edx + 0x24], 4
je 0x5078fb
mov ecx, esi
call fcn.0050ff10
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