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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d3733
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 0x5116e2
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.005920ea
add esp, 0xc
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.0050c380
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x48]
inc eax
mov dword [ebp - 0x5c], 0x10
push eax
push 0x665fac
push ecx
call fcn.005920ea
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 0x5116e2
mov eax, dword [ebp - 0x3c]
push 0x50
mov dword [ebp - 0x58], eax
call fcn.005a9fe9
mov ecx, eax
add esp, 4
mov dword [ebp - 0x14], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x511517
call fcn.00512ae0
mov edi, eax
jmp 0x511519
xor edi, edi
test edi, edi
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 0
je 0x5116e2
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.00591712
lea edx, [eax + eax + 0x14]
push edx
call fcn.005a9fe9
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [ebp - 0x18], ebx
jne 0x511563
mov ecx, edi
call fcn.00512b20
push edi
jmp 0x5116da
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
inc edx
mov eax, edx
mov dword [esi + 0x2c], edx
cmp ecx, eax
jge 0x511576
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 0x67ed74
push ebx
call fcn.0059261e
add esp, 0x10
mov ecx, edi
push ebx
call fcn.00512bb0
test eax, eax
jne 0x5116c9
push eax
push eax
push 3
push eax
push 1
push accept
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x51165a
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 0x51161b
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x51161b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x51161b
push eax
lea edx, [ebp - 0x1f8]
push str.Error_during_GetFileSize____errcode___ld._n
push edx
call fcn.005920ea
add esp, 0xc
lea eax, [ebp - 0x1f8]
mov ecx, esi
push eax
call fcn.0050c380
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
jmp 0x511637
mov ecx, dword [ebp - 0x74]
push 1
push 0
push 0
push ecx
call fcn.00593f90
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 0x51168c
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
push edx
lea ecx, [ebx + 0x10]
mov dword [ebp - 0x14], ecx
call fcn.005185e0
jmp 0x51169e
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.005920ea
add esp, 0x10
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.0050c380
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.00518590
test eax, eax
je 0x5116f7
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.005920ea
add esp, 0x10
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.0050c380
mov ecx, edi
call fcn.00512b20
push edi
call fcn.005aa012
add esp, 4
push ebx
call fcn.005aa012
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 + 0xa0]
mov eax, dword [eax + 0x24]
cmp eax, 4
je 0x511724
cmp eax, 5
je 0x511724
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 + 0x40], ecx
adc edx, eax
mov dword [ebx + 0x44], edx
jmp 0x511741
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 + 0x40], edx
sar ecx, 0x1f
mov dword [ebx + 0x44], eax
mov eax, dword [ebp - 0x3c]
cmp eax, 0xffffffff
jne 0x5117f7
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x64], 0
mov dword [esi + 0x2c], ecx
mov edx, dword [ebx + 0xa0]
mov byte [ebp + 0xb], 0
mov eax, dword [edx + 0x24]
cmp eax, 4
je 0x511771
cmp eax, 5
jne 0x5117b5
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x2c]
push eax
push str._dkf
push ecx
call fcn.005920ea
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 0x5117b5
cmp dword [ebp - 0x64], 0xffffffff
jne 0x5117b5
mov byte [ebp + 0xb], 1
mov eax, dword [esi + 0x20]
mov edx, dword [ebx + 0x40]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x38]
cmp edx, eax
mov ecx, dword [ecx + 0x3c]
jne 0x5117ce
mov edx, dword [ebx + 0x44]
cmp edx, ecx
je 0x5117e6
mov dl, byte [ebp + 0xb]
test dl, dl
jne 0x5117e6
sub eax, 1
sbb ecx, 0
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x54], ecx
jmp 0x511aaf
push str.The_last_chunk_is_full._n
mov ecx, esi
call fcn.0050c380
jmp 0x51187c
push eax
lea ecx, [ebp - 0x48]
push 0x665fac
push ecx
call fcn.005920ea
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 0x5118b4
push eax
lea eax, [ebp - 0x1f8]
push str.error_reading_registry__d_n
push eax
call fcn.005920ea
add esp, 0xc
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.0050c380
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 + 0x40]
mov eax, dword [ecx + 0x38]
cmp edx, eax
mov ecx, dword [ecx + 0x3c]
jne 0x5117d5
mov edx, dword [ebx + 0x44]
cmp edx, ecx
jne 0x5117d5
mov eax, dword [ebp - 0x18]
push eax
call fcn.005aa012
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.00518570
mov dword [edi], 0
jmp 0x5116e2
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x34]
mov edx, ecx
sub edx, 1
mov dword [ebx + 0x50], edx
mov edx, dword [ebp - 0x40]
sbb eax, 0
dec edx
mov dword [ebx + 0x54], eax
mov dword [esi + 0x2c], edx
mov eax, dword [ebx + 0xa0]
mov eax, dword [eax + 0x24]
cmp eax, 4
je 0x5118e6
cmp eax, 5
jne 0x511aaf
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.00592d82
mov ecx, dword [esi + 0x20]
mov edx, 0x665ff4
add esp, 0xc
mov dword [ebp - 0x14], eax
mov ecx, dword [ecx + 0x10]
test edx, edx
mov dword [ebp + 8], ecx
je 0x511aaf
test ecx, ecx
je 0x511aaf
test eax, eax
je 0x511aaf
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, 0x665ff4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x511995
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push eax
push 0xffffffffffffffff
push 0x665ff4
push eax
push eax
call edi
test eax, eax
mov dword [ebp - 0x28], eax
je 0x511995
lea eax, [eax + eax + 2]
push eax
call fcn.005a9fe9
add esp, 4
mov dword [ebp - 0x30], eax
test eax, eax
je 0x511995
mov ecx, dword [ebp - 0x28]
push ecx
push eax
push 0xffffffffffffffff
push 0x665ff4
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 0x5119e4
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 0x54]
cmp ecx, edi
mov edi, ecx
jne 0x5119f0
lea edi, [ebp - 0x50]
mov edx, dword [ebp - 0x28]
push eax
mov dword [ebp + 8], edx
call fcn.00591712
mov edx, eax
push edi
mov dword [ebp - 0x14], edx
call fcn.00591712
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.005a9fe9
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, 0x2c
add esp, 0xc
test edx, edx
mov dword [eax], edx
je 0x511a88
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 0x511a50
lea edx, [ebp - 0x50]
mov ecx, dword [ebp - 0x68]
test ecx, ecx
jne 0x511a5a
lea ecx, [ebp - 0x64]
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x511a64
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.005916a2
mov eax, dword [edi]
push eax
call fcn.00591712
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 + 0x58], eax
mov dword [ebx + 0x5c], eax
mov ecx, dword [edi + 0x20]
mov eax, dword [ebx + 0x84]
mov edx, dword [edi + 0x1c]
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
mov ecx, dword [ebx + 0x50]
mov edx, dword [eax]
mov eax, dword [ebx + 0x54]
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 + 0x44]
push eax
lea eax, [ebp - 0x1f8]
mov ecx, dword [edx + 0x40]
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.005920ea
add esp, 0x38
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.0050c380
mov edx, dword [ebp - 0x18]
push edx
call fcn.005aa012
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 + 0x80], edi
mov dword [esi + 0x24], edi
je 0x511b45
push eax
push edi
mov ecx, esi
call fcn.00511d00
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