Function at 0x52a570
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 0x6069ee
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 + 0x88]
mov dword [ebp - 0x10], esp
test eax, eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 4], 0
je 0x52a5af
call fcn.00529690
push 0x50
call fcn.005db95d
mov ecx, eax
add esp, 4
mov dword [ebp - 0x20], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x52a5cd
call fcn.005324b0
jmp 0x52a5cf
xor eax, eax
test eax, eax
mov byte [ebp - 4], 0
mov dword [ebx + 0x88], eax
jne 0x52a5f5
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 + 0xd4]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [eax + 0x44], ecx
mov edx, dword [ebx + 0x88]
mov eax, dword [ebx + 0xdc]
push edi
mov dword [edx + 0x48], eax
mov ecx, dword [ebx + 0x88]
mov dword [ecx], esi
mov ecx, dword [ebx + 0x88]
call fcn.00532580
test eax, eax
je 0x52a667
mov esi, dword [ebx + 0x88]
test esi, esi
je 0x52a645
mov ecx, esi
call fcn.005324f0
push esi
call fcn.005db986
add esp, 4
mov dword [ebx + 0x88], 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 + 0xcc]
test eax, eax
je 0x52abc1
mov edx, dword [esi + 0xb0]
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x60]
push eax
push ecx
mov byte [edx + 0x152], 1
mov edx, dword [ebx + 0xdc]
push 0
push 0
push 0x6a5020
push edx
mov dword [ebp - 0x38], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x52ab85
push eax
push eax
push 3
push eax
mov eax, dword [ebp + 0xc]
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x52a779
lea ecx, [ebp - 0x64]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
jne 0x52a725
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x52a725
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x52a725
push eax
lea edx, [ebp - 0x27c]
push str.Error_in_GetFileSize____errcode___ld._n
push edx
call fcn.005c3928
add esp, 0xc
lea eax, [ebp - 0x27c]
mov ecx, ebx
push eax
call fcn.00529670
xor eax, eax
mov dword [ebp - 0x18], eax
jmp 0x52a741
mov ecx, dword [ebp - 0x64]
push 1
push 0
push 0
push ecx
call fcn.005c5810
mov ecx, dword [ebp - 0x18]
add ecx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], ecx
adc eax, edx
push edi
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
or edx, eax
je 0x52a7ae
mov eax, dword [esi + 0xb0]
mov eax, dword [eax + 0x24]
cmp eax, 1
je 0x52a76c
cmp eax, 2
je 0x52a76c
test eax, eax
jne 0x52a7ae
mov edi, dword [ebp + 0xc]
mov ecx, esi
push edi
call fcn.005340b0
jmp 0x52a7ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0xc]
push eax
push edx
lea eax, [ebp - 0x27c]
push str.Error_opening_file__ls__errcode___ld._n
push eax
call fcn.005c3928
add esp, 0x10
lea ecx, [ebp - 0x27c]
push ecx
mov ecx, ebx
call fcn.00529670
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov edi, dword [ebp + 0xc]
lea ecx, [esi + 0x10]
push edi
call fcn.0053ad60
test eax, eax
jne 0x52abd0
mov eax, dword [esi + 0xb0]
mov ecx, dword [eax + 0xe0]
test ecx, ecx
jne 0x52a8f5
mov eax, dword [ebp - 0x14]
test eax, eax
jl 0x52a8f5
jg 0x52a7f0
cmp dword [ebp - 0x18], 0x800
jb 0x52a8f5
push 0
push 0
push 3
push 0
push 3
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
je 0x52a8f5
mov ecx, 0x200
xor eax, eax
lea edi, [ebp - 0xac0]
push 0
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x34]
lea edx, [ebp - 0xac0]
stosb byte es:[edi], al
mov eax, dword [ebp - 0x1c]
push ecx
push 0x800
push edx
push eax
mov dword [ebp - 0x34], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x52a8eb
cmp dword [ebp - 0x34], 0x800
jne 0x52a8eb
push 0x10
call fcn.005db95d
mov edi, eax
add esp, 4
mov dword [ebp - 0x24], edi
test edi, edi
mov byte [ebp - 4], 2
je 0x52a8d9
push 0x800
mov dword [edi + 4], 0
call fcn.005db95d
add esp, 4
mov dword [ebp - 0x20], eax
test eax, eax
mov dword [edi], eax
je 0x52a8cf
mov edx, dword [edi + 4]
lea eax, [edx + 0x800]
cmp eax, 0x800
jl 0x52a8a3
mov eax, 0x800
cmp eax, edx
jle 0x52a8cf
mov edi, dword [ebp - 0x20]
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 - 0x24]
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 0x52a8db
xor edi, edi
mov edx, dword [esi + 0xb0]
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 ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 0x94]
mov dword [esi + 0x50], edx
mov dword [esi + 0x54], eax
mov edx, dword [ebx + 0xa0]
mov dword [ecx], edx
mov eax, dword [ebx + 0xa4]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x5c]
cmp eax, 0xffffffff
jne 0x52a939
xor eax, eax
mov dword [ebx + 0x94], eax
mov dword [ebx + 0xcc], eax
jmp 0x52ab3e
push eax
lea ecx, [ebp - 0x18]
push 0x69e000
push ecx
call fcn.005c3928
add esp, 0xc
lea edx, [ebp - 0x38]
lea eax, [ebp - 0x60]
xor edi, edi
push edx
mov edx, dword [ebx + 0xdc]
push eax
push edi
lea ecx, [ebp - 0x18]
push edi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x52a97d
mov dword [ebx + 0x94], edi
mov dword [ebx + 0xcc], edi
jmp 0x52ab3e
mov edx, dword [ebx + 0x88]
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
sub eax, 1
mov edx, dword [edx]
sbb ecx, edi
mov dword [edx + 0x60], eax
mov dword [edx + 0x64], ecx
mov eax, dword [ebp - 0x60]
dec eax
mov dword [ebx + 0x94], eax
mov eax, dword [ebx + 0x88]
mov dword [ebx + 0x8c], eax
mov ecx, dword [esi + 0xb0]
mov ecx, dword [ecx + 0x24]
cmp ecx, 4
je 0x52a9c3
cmp ecx, 5
jne 0x52ab3e
mov edx, dword [ebp - 0x58]
push 0xa
mov dword [eax + 0x20], edx
mov eax, dword [ebx + 0x88]
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.005c469a
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x88]
mov ecx, 0x69e048
add esp, 0xc
mov edi, dword [eax + 0x10]
add eax, 0x2c
test ecx, ecx
mov dword [ebp + 8], eax
je 0x52ab3e
test edi, edi
je 0x52ab3e
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x52ab3e
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.00402880
xor eax, eax
push edi
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x3c], eax
mov word [ebp - 0x40], ax
call fcn.00401f50
mov edx, dword [ebp - 0x1c]
xor edi, edi
push edx
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.00401f50
mov ecx, dword [ebp + 8]
mov byte [ebp - 4], 5
call fcn.00401070
mov eax, dword [ebp - 0x44]
cmp eax, edi
jne 0x52aa7d
lea eax, [ebp - 0x40]
mov ecx, dword [ebp - 0x30]
cmp ecx, edi
mov edi, ecx
jne 0x52aa89
lea edi, [ebp - 0x2c]
mov ecx, dword [ebp - 0x48]
push eax
mov dword [ebp - 0x20], ecx
call fcn.005c2f1a
mov edx, eax
push edi
mov dword [ebp - 0x1c], edx
call fcn.005c2f1a
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
add ecx, edx
lea eax, [eax + ecx + 3]
mov dword [ebp - 0x20], eax
lea edi, [eax + eax]
push edi
call fcn.005db95d
mov edx, eax
mov eax, dword [ebp + 8]
add esp, 0xc
test edx, edx
mov dword [eax], edx
je 0x52ab1a
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
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 0x52aae6
lea edx, [ebp - 0x2c]
mov ecx, dword [ebp - 0x44]
test ecx, ecx
jne 0x52aaf0
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x50]
test eax, eax
jne 0x52aafa
lea eax, [ebp - 0x4c]
mov edi, dword [ebp + 8]
push edx
push ecx
push eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [edi]
push eax
push ecx
call fcn.005c2eaa
mov edx, dword [edi]
push edx
call fcn.005c2f1a
add esp, 0x18
mov dword [edi + 8], eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
call fcn.00401070
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
call fcn.00401070
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0
call fcn.00401070
mov ecx, dword [ebx + 0x88]
mov eax, dword [ecx]
mov ecx, dword [ecx + 0x40]
mov edx, dword [eax + 0x64]
push edx
mov edx, dword [eax + 0x60]
push edx
mov edx, dword [ebp + 0xc]
push edx
mov edx, dword [eax + 0x54]
mov eax, dword [eax + 0x50]
push edx
push eax
push ecx
lea edx, [ebp - 0x27c]
push str.first_listitem_id___d__startpos___I64d__file__ls__endpos___I64d_n
push edx
call fcn.005c3928
add esp, 0x20
lea eax, [ebp - 0x27c]
mov ecx, ebx
push eax
call fcn.00529670
jmp 0x52ac54
mov esi, dword [ebx + 0x88]
test esi, esi
je 0x52ab9f
mov ecx, esi
call fcn.005324f0
push esi
call fcn.005db986
add esp, 4
mov dword [ebx + 0x88], 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.0053ab90
xor ecx, ecx
cmp eax, ecx
je 0x52ac30
push eax
push edi
lea ecx, [ebp - 0x27c]
push str.Error_opening_file__ls__errcode___ld._n
push ecx
call fcn.005c3928
add esp, 0x10
lea edx, [ebp - 0x27c]
mov ecx, ebx
push edx
call fcn.00529670
mov esi, dword [ebx + 0x88]
test esi, esi
je 0x52ac0e
mov ecx, esi
call fcn.005324f0
push esi
call fcn.005db986
add esp, 4
mov dword [ebx + 0x88], 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 [esi + 0x174], 0x40
mov dword [esi + 0x178], ecx
mov byte [esi + 0xc6], 0
mov byte [esi + 0xc7], 0
mov dword [ebx + 0x94], ecx
mov eax, dword [ebx + 0x88]
xor edi, edi
mov dword [esi + 0x90], eax
mov ecx, dword [ebx + 0x88]
mov dword [ecx + 0x40], edi
mov edx, dword [ebx + 0x88]
mov dword [edx + 0x38], edi
mov eax, dword [ebx + 0xcc]
cmp eax, edi
jne 0x52acae
mov eax, dword [ebx + 0xdc]
cmp eax, edi
je 0x52acc5
lea ecx, [ebp - 0x78]
push 0x10
push ecx
push edi
push edi
push 0x6a5020
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 0x52acc5
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
je 0x52acc5
mov edx, dword [ebx + 0x88]
push eax
push edx
mov ecx, ebx
call fcn.00531420
mov eax, dword [ebx + 0x88]
mov ecx, dword [esi + 0x50]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0x54]
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0x64]
mov dword [esi + 0x5c], ecx
cmp eax, edi
jl 0x52ad0b
jg 0x52acf1
cmp dword [esi + 0x60], edi
jbe 0x52ad0b
mov edx, dword [esi + 0xb0]
mov eax, dword [edx + 0x24]
cmp eax, 4
je 0x52ad0b
cmp eax, 5
je 0x52ad0b
mov ecx, esi
call fcn.00536600
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