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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c6263
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x70], esi
mov eax, dword [esi + 0x74]
test eax, eax
je 0x50c3b2
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x1f8]
inc eax
mov dword [ebp - 4], 0
push eax
push str.insert_from_reg__ID___d_n
push ecx
call fcn.005851fa
add esp, 0xc
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.005070a0
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x48]
inc eax
mov dword [ebp - 0x5c], 0x10
push eax
push 0x656fa0
push ecx
call fcn.005851fa
add esp, 0xc
lea edx, [ebp - 0x5c]
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x48]
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 0x50c3b2
mov eax, dword [ebp - 0x3c]
push 0x50
mov dword [ebp - 0x58], eax
call fcn.0059cff9
mov ecx, eax
add esp, 4
mov dword [ebp - 0x14], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x50c1e7
call fcn.0050d790
mov edi, eax
jmp 0x50c1e9
xor edi, edi
test edi, edi
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 0
je 0x50c3b2
mov ecx, dword [esi + 0x6c]
mov dword [edi + 0x44], ecx
mov edx, dword [esi + 0x74]
mov dword [edi + 0x48], edx
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0x10]
push ecx
call fcn.00584816
lea edx, [eax + eax + 0x14]
push edx
call fcn.0059cff9
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [ebp - 0x18], ebx
jne 0x50c233
mov ecx, edi
call fcn.0050d7d0
push edi
jmp 0x50c3aa
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
inc edx
mov eax, edx
mov dword [esi + 0x2c], edx
cmp ecx, eax
jge 0x50c246
mov dword [esi + 0x30], eax
mov dword [edi + 0x40], eax
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x2c]
mov edx, dword [ecx + 0x10]
push eax
push edx
push 0x66fe28
push ebx
call fcn.0058572e
add esp, 0x10
mov ecx, edi
push ebx
call fcn.0050d860
test eax, eax
jne 0x50c399
push eax
push eax
push 3
push eax
push 1
push closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x50c32a
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x74]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x20], 0
cmp ebx, 0xffffffff
jne 0x50c2eb
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x50c2eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50c2eb
push eax
lea edx, [ebp - 0x1f8]
push str.Error_during_GetFileSize____errcode___ld._n
push edx
call fcn.005851fa
add esp, 0xc
lea eax, [ebp - 0x1f8]
mov ecx, esi
push eax
call fcn.005070a0
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
jmp 0x50c307
mov ecx, dword [ebp - 0x74]
push 1
push 0
push 0
push ecx
call fcn.005870a0
add ebx, eax
mov eax, dword [ebp - 0x20]
adc eax, edx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or ebx, dword [ebp - 0x20]
je 0x50c35c
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
push edx
lea ecx, [ebx + 0x10]
mov dword [ebp - 0x14], ecx
call fcn.005115c0
jmp 0x50c36e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
lea eax, [ebp - 0x1f8]
push str.Error_opening_file__s_to_get_size__errcode___ld._n
push eax
call fcn.005851fa
add esp, 0x10
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.005070a0
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebx + 0x10]
mov dword [ebp - 0x14], ecx
call fcn.00511570
test eax, eax
je 0x50c3c7
mov ebx, dword [ebp - 0x18]
push eax
push ebx
lea ecx, [ebp - 0x1f8]
push str.Error_opening_file__s__errcode___ld._n
push ecx
call fcn.005851fa
add esp, 0x10
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.005070a0
mov ecx, edi
call fcn.0050d7d0
push edi
call fcn.0059d022
add esp, 4
push ebx
call fcn.0059d022
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 [edi], ebx
mov eax, dword [ebx + 0x80]
cmp dword [eax + 0x24], 4
jne 0x50c3f4
mov ecx, dword [ebp - 0x38]
mov dword [edi + 0x1c], ecx
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
mov edx, eax
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], ecx
sar edx, 0x1f
jmp 0x50c40a
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
add edx, eax
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0x20], edx
adc eax, ecx
mov dword [ebx + 0x24], eax
mov eax, dword [ebp - 0x3c]
cmp eax, 0xffffffff
jne 0x50c4b9
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x64], 0
mov dword [esi + 0x2c], ecx
mov edx, dword [ebx + 0x80]
mov byte [ebp + 0xb], 0
cmp dword [edx + 0x24], 4
jne 0x50c477
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x2c]
push eax
push str._dkf
push ecx
call fcn.005851fa
add esp, 0xc
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x6c]
lea ecx, [ebp - 0x2c]
push edx
mov edx, dword [esi + 0x74]
push eax
push 0
push 0
push ecx
push edx
mov dword [ebp - 0x1c], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x50c477
cmp dword [ebp - 0x64], 0xffffffff
jne 0x50c477
mov byte [ebp + 0xb], 1
mov eax, dword [esi + 0x20]
mov edx, dword [ebx + 0x20]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x50c490
mov edx, dword [ebx + 0x24]
cmp edx, ecx
je 0x50c4a8
mov dl, byte [ebp + 0xb]
test dl, dl
jne 0x50c4a8
sub eax, 1
sbb ecx, 0
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], ecx
jmp 0x50c76a
push str.The_last_chunk_is_full._n
mov ecx, esi
call fcn.005070a0
jmp 0x50c53e
push eax
lea ecx, [ebp - 0x48]
push 0x656fa0
push ecx
call fcn.005851fa
add esp, 0xc
lea edx, [ebp - 0x5c]
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x48]
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 0x50c576
push eax
lea eax, [ebp - 0x1f8]
push str.error_reading_registry__d_n
push eax
call fcn.005851fa
add esp, 0xc
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.005070a0
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 [ebx + 0x20]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x50c497
mov edx, dword [ebx + 0x24]
cmp edx, ecx
jne 0x50c497
mov eax, dword [ebp - 0x18]
push eax
call fcn.0059d022
mov ecx, dword [esi + 0x24]
add esp, 4
mov edx, dword [ecx + 0x38]
mov ecx, dword [ebp - 0x14]
mov dword [edi + 0x38], edx
mov eax, dword [esi + 0x24]
mov dword [eax + 0x38], edi
mov dword [esi + 0x24], edi
mov dword [edi + 0x14], 1
call fcn.00511550
mov dword [edi], 0
jmp 0x50c3b2
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov ecx, eax
sub ecx, 1
mov dword [ebx + 0x30], ecx
mov ecx, dword [ebp - 0x40]
sbb edx, 0
dec ecx
mov dword [ebx + 0x34], edx
mov dword [esi + 0x2c], ecx
mov edx, dword [ebx + 0x80]
cmp dword [edx + 0x24], 4
jne 0x50c76a
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x40]
mov dword [edi + 0x28], eax
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x238]
push 0xa
push ecx
push edx
call fcn.00585e92
mov ecx, dword [esi + 0x20]
mov edx, 0x656fdc
add esp, 0xc
mov dword [ebp - 0x14], eax
mov ecx, dword [ecx + 0x10]
test edx, edx
mov dword [ebp + 8], ecx
je 0x50c76a
test ecx, ecx
je 0x50c76a
test eax, eax
je 0x50c76a
xor eax, eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], eax
mov word [ebp - 0x2c], ax
call fcn.00401070
mov edi, 0x656fdc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x50c650
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push eax
push 0xffffffffffffffff
push 0x656fdc
push eax
push eax
call edi
test eax, eax
mov dword [ebp - 0x28], eax
je 0x50c650
lea eax, [eax + eax + 2]
push eax
call fcn.0059cff9
add esp, 4
mov dword [ebp - 0x30], eax
test eax, eax
je 0x50c650
mov ecx, dword [ebp - 0x28]
push ecx
push eax
push 0xffffffffffffffff
push 0x656fdc
push 0
push 0
call edi
mov dword [ebp - 0x28], eax
xor edi, edi
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x68]
push edx
mov byte [ebp - 4], 2
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x60], edi
mov word [ebp - 0x64], di
call fcn.00401ee0
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x54]
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x4c], edi
mov word [ebp - 0x50], di
call fcn.00401ee0
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 4
add ecx, 0x2c
call fcn.00401070
mov eax, dword [ebp - 0x68]
cmp eax, edi
jne 0x50c69f
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 0x54]
cmp ecx, edi
mov edi, ecx
jne 0x50c6ab
lea edi, [ebp - 0x50]
mov edx, dword [ebp - 0x28]
push eax
mov dword [ebp + 8], edx
call fcn.00584816
mov edx, eax
push edi
mov dword [ebp - 0x14], edx
call fcn.00584816
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
add ecx, edx
lea eax, [eax + ecx + 3]
mov dword [ebp + 8], eax
lea edi, [eax + eax]
push edi
call fcn.0059cff9
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, 0x2c
add esp, 0xc
test edx, edx
mov dword [eax], edx
je 0x50c743
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 - 0x54]
test eax, eax
mov edx, eax
jne 0x50c70b
lea edx, [ebp - 0x50]
mov ecx, dword [ebp - 0x68]
test ecx, ecx
jne 0x50c715
lea ecx, [ebp - 0x64]
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x50c71f
lea eax, [ebp - 0x2c]
push edx
push ecx
mov ecx, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
mov edx, dword [ecx + 0x2c]
lea edi, [ecx + 0x2c]
push eax
push edx
call fcn.005847a6
mov eax, dword [edi]
push eax
call fcn.00584816
add esp, 0x18
mov dword [edi + 8], eax
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.00401070
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 2
call fcn.00401070
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00401070
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], eax
mov ecx, dword [edi + 0x20]
mov eax, dword [ebx + 0x64]
mov edx, dword [edi + 0x1c]
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
mov ecx, dword [ebx + 0x30]
mov edx, dword [eax]
mov eax, dword [ebx + 0x34]
push edx
mov edx, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x18]
push edx
mov edx, dword [edi]
push eax
push ecx
mov eax, dword [edx + 0x24]
push eax
lea eax, [ebp - 0x1f8]
mov ecx, dword [edx + 0x20]
mov edx, dword [edi + 0x40]
push ecx
push edx
push str.new_listitem_id_d__startpos_I64d__file__ls___ndwnl_I64d__endpos_I64d__ttdwnl_I64d_nsttm_ld__etm_ld_n
push eax
call fcn.005851fa
add esp, 0x38
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.005070a0
mov edx, dword [ebp - 0x18]
push edx
call fcn.0059d022
mov eax, dword [esi + 0x24]
add esp, 4
mov ecx, dword [eax + 0x38]
mov eax, dword [ebp - 0x58]
mov dword [edi + 0x38], ecx
mov edx, dword [esi + 0x24]
cmp eax, 0xffffffff
mov dword [edx + 0x38], edi
mov dword [ebx + 0x60], edi
mov dword [esi + 0x24], edi
je 0x50c7fa
push eax
push edi
mov ecx, esi
call fcn.0050c9c0
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