Function at 0x4f56e0
Capabilities:
Get file size
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5aa5bb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1dc
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x44], esi
mov eax, dword [esi + 0x74]
test eax, eax
je 0x4f596b
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x1e8]
inc eax
mov dword [ebp - 4], 0
push eax
push str.insert_from_reg__ID___d_n
push ecx
call fcn.0056b4da
add esp, 0xc
lea edx, [ebp - 0x1e8]
mov ecx, esi
push edx
call fcn.004f1060
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x38]
inc eax
mov dword [ebp - 0x40], 0x10
push eax
push 0x636fe4
push ecx
call fcn.0056b4da
add esp, 0xc
lea edx, [ebp - 0x40]
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x38]
push edx
mov edx, dword [esi + 0x74]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4f596b
mov eax, dword [ebp - 0x2c]
push 0x48
mov dword [ebp - 0x48], eax
call fcn.00582ecc
mov ecx, eax
add esp, 4
mov dword [ebp - 0x3c], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x4f57a7
call fcn.004f6ba0
mov ebx, eax
jmp 0x4f57a9
xor ebx, ebx
test ebx, ebx
mov byte [ebp - 4], 0
je 0x4f596b
mov ecx, dword [esi + 0x6c]
mov dword [ebx + 0x3c], ecx
mov edx, dword [esi + 0x74]
mov dword [ebx + 0x40], edx
mov eax, dword [esi + 0x20]
or ecx, 0xffffffff
mov edi, dword [eax + 0x10]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.00582ecc
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp - 0x1c], edi
jne 0x4f57f2
mov ecx, ebx
call fcn.004f6be0
push ebx
jmp 0x4f5963
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
inc edx
mov eax, edx
mov dword [esi + 0x2c], edx
cmp ecx, eax
jge 0x4f5805
mov dword [esi + 0x30], eax
mov dword [ebx + 0x38], eax
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x2c]
mov eax, dword [edx + 0x10]
push ecx
push eax
push str._s_d
push edi
call fcn.0056b4da
add esp, 0x10
mov ecx, ebx
push edi
call fcn.004f6c60
test eax, eax
jne 0x4f5952
push eax
push eax
push 3
push eax
push 1
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x4f58e3
lea ecx, [ebp - 0x4c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x4f58a4
test eax, eax
jne 0x4f58a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f58a4
push eax
lea edx, [ebp - 0x1e8]
push str.Error_during_GetFileSize____errcode___ld._n
push edx
call fcn.0056b4da
add esp, 0xc
lea eax, [ebp - 0x1e8]
mov ecx, esi
push eax
call fcn.004f1060
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov edi, eax
jmp 0x4f58c0
mov ecx, dword [ebp - 0x4c]
push 1
push 0
push 0
push ecx
call fcn.0056d280
add edi, eax
mov eax, dword [ebp - 0x14]
adc eax, edx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, dword [ebp - 0x14]
je 0x4f5915
mov edi, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
push edx
lea ecx, [edi + 0x10]
mov dword [ebp - 0x20], ecx
call fcn.004fa8e0
jmp 0x4f5927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea eax, [ebp - 0x1e8]
push str.Error_opening_file__s_to_get_size__errcode___ld._n
push eax
call fcn.0056b4da
add esp, 0x10
lea ecx, [ebp - 0x1e8]
push ecx
mov ecx, esi
call fcn.004f1060
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [edi + 0x10]
mov dword [ebp - 0x20], ecx
call fcn.004fa890
test eax, eax
je 0x4f5980
mov edi, dword [ebp - 0x1c]
push eax
push edi
lea ecx, [ebp - 0x1e8]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.0056b4da
add esp, 0x10
lea edx, [ebp - 0x1e8]
mov ecx, esi
push edx
call fcn.004f1060
mov ecx, ebx
call fcn.004f6be0
push ebx
call fcn.00582ef5
add esp, 4
push edi
call fcn.00582ef5
add esp, 4
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 4
mov dword [ebx], edi
mov eax, dword [edi + 0x80]
cmp dword [eax + 0x24], 4
jne 0x4f59ad
mov ecx, dword [ebp - 0x28]
mov dword [ebx + 0x1c], ecx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
mov edx, eax
mov dword [ebx + 0x24], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], ecx
sar edx, 0x1f
jmp 0x4f59c3
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
add edx, eax
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x20], edx
adc eax, ecx
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x2c]
cmp eax, 0xffffffff
jne 0x4f5a72
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x64], 0
mov dword [esi + 0x2c], ecx
mov edx, dword [edi + 0x80]
mov byte [ebp + 0xb], 0
cmp dword [edx + 0x24], 4
jne 0x4f5a30
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x54]
push eax
push str._dkf
push ecx
call fcn.0056b4da
add esp, 0xc
lea edx, [ebp - 0x3c]
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x54]
push edx
mov edx, dword [esi + 0x74]
push eax
push 0
push 0
push ecx
push edx
mov dword [ebp - 0x3c], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4f5a30
cmp dword [ebp - 0x5c], 0xffffffff
jne 0x4f5a30
mov byte [ebp + 0xb], 1
mov eax, dword [esi + 0x20]
mov edx, dword [edi + 0x20]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x4f5a49
mov edx, dword [edi + 0x24]
cmp edx, ecx
je 0x4f5a61
mov dl, byte [ebp + 0xb]
test dl, dl
jne 0x4f5a61
sub eax, 1
sbb ecx, 0
mov dword [edi + 0x30], eax
mov dword [edi + 0x34], ecx
jmp 0x4f5b7b
push str.The_last_chunk_is_full._n
mov ecx, esi
call fcn.004f1060
jmp 0x4f5af7
push eax
lea ecx, [ebp - 0x38]
push 0x636fe4
push ecx
call fcn.0056b4da
add esp, 0xc
lea edx, [ebp - 0x40]
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x38]
push edx
mov edx, dword [esi + 0x74]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4f5b2f
push eax
lea eax, [ebp - 0x1e8]
push str.error_reading_registry__d_n
push eax
call fcn.0056b4da
add esp, 0xc
lea ecx, [ebp - 0x1e8]
push ecx
mov ecx, esi
call fcn.004f1060
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x20]
mov dword [esi + 0x64], 0
mov dword [esi + 0x2c], edx
mov ecx, dword [eax]
mov edx, dword [edi + 0x20]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x4f5a50
mov edx, dword [edi + 0x24]
cmp edx, ecx
jne 0x4f5a50
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00582ef5
mov ecx, dword [esi + 0x24]
add esp, 4
mov edx, dword [ecx + 0x30]
mov ecx, dword [ebp - 0x20]
mov dword [ebx + 0x30], edx
mov eax, dword [esi + 0x24]
mov dword [eax + 0x30], ebx
mov dword [esi + 0x24], ebx
mov dword [ebx + 0x14], 1
call fcn.004fa870
mov dword [ebx], 0
jmp 0x4f596b
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov ecx, eax
sub ecx, 1
mov dword [edi + 0x30], ecx
mov ecx, dword [ebp - 0x30]
sbb edx, 0
dec ecx
mov dword [edi + 0x34], edx
mov dword [esi + 0x2c], ecx
mov edx, dword [edi + 0x80]
cmp dword [edx + 0x24], 4
jne 0x4f5b7b
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x30]
mov dword [ebx + 0x28], eax
mov edx, dword [esi + 0x20]
mov ecx, dword [ebp - 0x30]
mov eax, dword [edx + 0x10]
push ecx
push eax
lea ecx, [ebx + 0x2c]
push str._s_d
push ecx
call fcn.0057f8fb
add esp, 0x10
mov ecx, dword [edi + 0x64]
xor eax, eax
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], eax
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x1c]
push edx
mov edx, dword [ecx + 4]
push eax
push edx
mov eax, dword [ecx]
mov ecx, dword [edi + 0x34]
mov edx, dword [edi + 0x30]
push eax
mov eax, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x18]
push edx
mov edx, dword [ebp - 0x1c]
push eax
mov eax, dword [ebx]
push ecx
push edx
mov ecx, dword [eax + 0x24]
push ecx
lea ecx, [ebp - 0x1e8]
mov edx, dword [eax + 0x20]
mov eax, dword [ebx + 0x38]
push edx
push eax
push str.new_listitem_id_d__startpos_I64d__file__s___ndwnl_I64d__endpos_I64d__ttdwnl_I64d_nsttm_ld__etm_ld_n
push ecx
call fcn.0056b4da
add esp, 0x38
lea edx, [ebp - 0x1e8]
mov ecx, esi
push edx
call fcn.004f1060
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00582ef5
mov ecx, dword [esi + 0x24]
add esp, 4
mov edx, dword [ecx + 0x30]
mov dword [ebx + 0x30], edx
mov eax, dword [esi + 0x24]
mov dword [eax + 0x30], ebx
mov eax, dword [ebp - 0x48]
mov dword [edi + 0x60], ebx
cmp eax, 0xffffffff
mov dword [esi + 0x24], ebx
je 0x4f5c0b
push eax
push ebx
mov ecx, esi
call fcn.004f5dd0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4