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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5caf53
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 0x50d292
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.00589e0a
add esp, 0xc
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.00507f30
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x48]
inc eax
mov dword [ebp - 0x5c], 0x10
push eax
push 0x65bfb0
push ecx
call fcn.00589e0a
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 0x50d292
mov eax, dword [ebp - 0x3c]
push 0x50
mov dword [ebp - 0x58], eax
call fcn.005a1be9
mov ecx, eax
add esp, 4
mov dword [ebp - 0x14], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x50d0c7
call fcn.0050e680
mov edi, eax
jmp 0x50d0c9
xor edi, edi
test edi, edi
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 0
je 0x50d292
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.00589432
lea edx, [eax + eax + 0x14]
push edx
call fcn.005a1be9
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [ebp - 0x18], ebx
jne 0x50d113
mov ecx, edi
call fcn.0050e6c0
push edi
jmp 0x50d28a
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
inc edx
mov eax, edx
mov dword [esi + 0x2c], edx
cmp ecx, eax
jge 0x50d126
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 0x674e40
push ebx
call fcn.0058a33e
add esp, 0x10
mov ecx, edi
push ebx
call fcn.0050e750
test eax, eax
jne 0x50d279
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 0x50d20a
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 0x50d1cb
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x50d1cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50d1cb
push eax
lea edx, [ebp - 0x1f8]
push str.Error_during_GetFileSize____errcode___ld._n
push edx
call fcn.00589e0a
add esp, 0xc
lea eax, [ebp - 0x1f8]
mov ecx, esi
push eax
call fcn.00507f30
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
jmp 0x50d1e7
mov ecx, dword [ebp - 0x74]
push 1
push 0
push 0
push ecx
call fcn.0058bcb0
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 0x50d23c
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
push edx
lea ecx, [ebx + 0x10]
mov dword [ebp - 0x14], ecx
call fcn.00513420
jmp 0x50d24e
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.00589e0a
add esp, 0x10
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.00507f30
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.005133d0
test eax, eax
je 0x50d2a7
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.00589e0a
add esp, 0x10
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.00507f30
mov ecx, edi
call fcn.0050e6c0
push edi
call fcn.005a1c12
add esp, 4
push ebx
call fcn.005a1c12
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]
mov eax, dword [eax + 0x24]
cmp eax, 4
je 0x50d2d4
cmp eax, 5
je 0x50d2d4
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
add ecx, edx
mov edx, dword [ebp - 0x34]
mov dword [ebx + 0x20], ecx
adc edx, eax
mov dword [ebx + 0x24], edx
jmp 0x50d2f1
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x34]
mov ecx, eax
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x20], edx
sar ecx, 0x1f
mov dword [ebx + 0x24], eax
mov eax, dword [ebp - 0x3c]
cmp eax, 0xffffffff
jne 0x50d3a7
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
mov eax, dword [edx + 0x24]
cmp eax, 4
je 0x50d321
cmp eax, 5
jne 0x50d365
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x2c]
push eax
push str._dkf
push ecx
call fcn.00589e0a
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 0x50d365
cmp dword [ebp - 0x64], 0xffffffff
jne 0x50d365
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 0x50d37e
mov edx, dword [ebx + 0x24]
cmp edx, ecx
je 0x50d396
mov dl, byte [ebp + 0xb]
test dl, dl
jne 0x50d396
sub eax, 1
sbb ecx, 0
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], ecx
jmp 0x50d65f
push str.The_last_chunk_is_full._n
mov ecx, esi
call fcn.00507f30
jmp 0x50d42c
push eax
lea ecx, [ebp - 0x48]
push 0x65bfb0
push ecx
call fcn.00589e0a
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 0x50d464
push eax
lea eax, [ebp - 0x1f8]
push str.error_reading_registry__d_n
push eax
call fcn.00589e0a
add esp, 0xc
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.00507f30
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 0x50d385
mov edx, dword [ebx + 0x24]
cmp edx, ecx
jne 0x50d385
mov eax, dword [ebp - 0x18]
push eax
call fcn.005a1c12
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.005133b0
mov dword [edi], 0
jmp 0x50d292
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x34]
mov edx, ecx
sub edx, 1
mov dword [ebx + 0x30], edx
mov edx, dword [ebp - 0x40]
sbb eax, 0
dec edx
mov dword [ebx + 0x34], eax
mov dword [esi + 0x2c], edx
mov eax, dword [ebx + 0x80]
mov eax, dword [eax + 0x24]
cmp eax, 4
je 0x50d496
cmp eax, 5
jne 0x50d65f
mov dword [edi + 0x20], ecx
mov ecx, dword [ebp - 0x40]
mov dword [edi + 0x28], ecx
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x238]
push 0xa
push edx
push eax
call fcn.0058aaa2
mov ecx, dword [esi + 0x20]
mov edx, 0x65bff8
add esp, 0xc
mov dword [ebp - 0x14], eax
mov ecx, dword [ecx + 0x10]
test edx, edx
mov dword [ebp + 8], ecx
je 0x50d65f
test ecx, ecx
je 0x50d65f
test eax, eax
je 0x50d65f
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, 0x65bff8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x50d545
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push eax
push 0xffffffffffffffff
push 0x65bff8
push eax
push eax
call edi
test eax, eax
mov dword [ebp - 0x28], eax
je 0x50d545
lea eax, [eax + eax + 2]
push eax
call fcn.005a1be9
add esp, 4
mov dword [ebp - 0x30], eax
test eax, eax
je 0x50d545
mov ecx, dword [ebp - 0x28]
push ecx
push eax
push 0xffffffffffffffff
push 0x65bff8
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 0x50d594
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 0x54]
cmp ecx, edi
mov edi, ecx
jne 0x50d5a0
lea edi, [ebp - 0x50]
mov edx, dword [ebp - 0x28]
push eax
mov dword [ebp + 8], edx
call fcn.00589432
mov edx, eax
push edi
mov dword [ebp - 0x14], edx
call fcn.00589432
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.005a1be9
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, 0x2c
add esp, 0xc
test edx, edx
mov dword [eax], edx
je 0x50d638
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 0x50d600
lea edx, [ebp - 0x50]
mov ecx, dword [ebp - 0x68]
test ecx, ecx
jne 0x50d60a
lea ecx, [ebp - 0x64]
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x50d614
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.005893c2
mov eax, dword [edi]
push eax
call fcn.00589432
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.00589e0a
add esp, 0x38
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.00507f30
mov edx, dword [ebp - 0x18]
push edx
call fcn.005a1c12
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 0x50d6ef
push eax
push edi
mov ecx, esi
call fcn.0050d8b0
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