Function at 0x5104ec
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdc0
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov word [ebp - 6], dx
mov dword [ebp - 4], eax
mov dl, 1
mov eax, dword [0x6801b4]
call fcn.00699c4c
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x51162a
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov dx, word [ebp - 6]
mov word [eax + 0x21e0], dx
mov eax, dword [ebp - 4]
add eax, 0x11e0
xor ecx, ecx
mov edx, 0x1000
call fcn.0069985c
mov eax, dword [ebp - 4]
movzx esi, word [eax + 0x21e0]
test esi, esi
jle 0x510588
mov ebx, 1
mov edi, dword [ebp - 0xc]
mov eax, 0x300
call fcn.00690ca0
mov edx, dword [ebp - 4]
mov dword [edx + ebx*4 + 0x11dc], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*4 + 0x11dc]
mov eax, dword [edi]
mov ecx, 0x300
call fcn.00699420
inc ebx
add edi, 4
dec esi
jne 0x510557
mov eax, dword [ebp - 4]
mov dl, byte [ebp + 0x2c]
mov byte [eax + 0x21e2], dl
mov eax, dword [ebp - 4]
mov word [eax + 0x21e4], 0
mov eax, dword [ebp - 4]
movzx esi, word [eax + 0x21e0]
test esi, esi
jle 0x5105d6
mov ebx, 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + ebx*4 + 0x11dc]
call sym.MassSender.exe__Dbisamen_GetIndexedSize_qqrrx25Dbisamcn_TFieldDefinition
and eax, 0xff
inc eax
mov edx, dword [ebp - 4]
add word [edx + 0x21e4], ax
inc ebx
dec esi
jne 0x5105b3
mov eax, dword [ebp - 4]
add word [eax + 0x21e4], 4
xor edx, edx
push ebp
push 0x5115ad
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [ebp - 0x14], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x149]
sub eax, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x11c4]
cmp eax, dword [edx + 8]
je 0x51101b
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_FlushRecordBuffers_qqrv
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_FreeRecordBuffers_qqrv
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
xor edx, edx
call fcn.00682074
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
push eax
mov eax, 0x100000
pop edx
mov ecx, edx
xor edx, edx
div ecx
mov edx, eax
mov eax, 0x2000
call sym.MassSender.exe__Dbisamlb_MinimumInteger_qqrii
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00682038
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x10]
call fcn.00682038
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x153]
shl eax, 8
lea eax, [eax + eax*2]
add eax, 0x7f
xor edx, edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
push dword [ebp - 0x24]
push dword [ebp - 0x28]
xor edx, edx
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamlb_TFileHandler_Seek_qqrjus
jmp 0x5108bf
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_FreeSortRecordBuffers_qqrv
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x149]
sub edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov eax, dword [eax + 0xc]
call sym.MassSender.exe__Dbisamlb_MinimumInteger_qqrii
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
movzx edx, word [eax + 0x151]
imul edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_ResizeReadBuffer_qqri
push 0
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x151]
imul ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x11c]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x20]
xor ebx, ebx
mov esi, dword [ebp - 0x18]
test esi, esi
jle 0x510758
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_GetNewRecordInstance_qqrv
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681ca8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681f3c
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x11c]
add edx, ebx
call sym.MassSender.exe__Dbisamen_TRecord_Read_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add ebx, eax
dec esi
jne 0x510713
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_GenerateRecordBufferSortKeys_qqrv
mov edx, sym.MassSender.exe__Dbisamen_CompareSortedRecordBuffers_qqrpvt1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00682168
mov eax, 0xc
call fcn.00690ca0
mov edx, eax
mov eax, dword [ebp - 0x10]
call fcn.00681ca8
mov eax, dword [ebp - 0x10]
call fcn.00681f3c
mov ebx, eax
mov ecx, dword [ebp - 4]
mov dl, 1
mov eax, dword [sym.MassSender.exe__Dbisamlb_TFileHandler_]
call sym.MassSender.exe__Dbisamlb_TFileHandler__bctr_qqrp14System_TObject
mov dword [ebx], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov eax, dword [eax + 8]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x10]
call fcn.00681f3c
mov edi, dword [eax]
lea eax, [ebp - 0x140]
push eax
lea edx, [ebp - 0x240]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x118]
mov eax, dword [eax + 4]
mov eax, dword [eax + 4]
call sym.MassSender.exe__Dbisamen_TDataSession_GetPrivateDirectory_qqrv
lea eax, [ebp - 0x240]
mov edx, dword [ebp - 4]
mov cl, byte [edx + 4]
mov edx, 0x51163c
call sym.MassSender.exe__Dbisamlb_GetTempFileName_qqrrx28System__SmallString_iuc_255_t1o
lea edx, [ebp - 0x140]
lea eax, [edi + 0xc]
call fcn.0069971c
mov byte [edi + 0x110], 1
mov eax, dword [ebp - 4]
mov al, byte [eax + 4]
mov byte [edi + 4], al
mov eax, edi
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
imul edx, eax
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_ResizeWriteBuffer_qqri
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov esi, dword [eax + 8]
dec esi
test esi, esi
jl 0x510883
inc esi
xor ebx, ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov edx, ebx
call fcn.00681e54
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x130]
add edx, dword [ebp - 0x1c]
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc ebx
dec esi
jne 0x510851
push 0
push 0
xor edx, edx
mov eax, edi
call sym.MassSender.exe__Dbisamlb_TFileHandler_Seek_qqrjus
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov ecx, dword [eax + 8]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
imul ecx, eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
mov eax, edi
mov ebx, dword [eax]
call dword [ebx + 0x24]
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x149]
cmp eax, dword [ebp - 0x14]
jg 0x5106ab
mov eax, dword [ebp - 0x10]
mov esi, dword [eax + 8]
dec esi
test esi, esi
jl 0x510903
inc esi
xor ebx, ebx
mov edx, ebx
mov eax, dword [ebp - 0x10]
call fcn.00681e54
mov edi, eax
push 0
push 0
mov eax, dword [edi]
xor edx, edx
call sym.MassSender.exe__Dbisamlb_TFileHandler_Seek_qqrjus
mov dword [edi + 4], 1
inc ebx
dec esi
jne 0x5108df
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_FreeSortRecordBuffers_qqrv
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00682038
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x153]
shl eax, 8
lea eax, [eax + eax*2]
add eax, 0x7f
xor edx, edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
push dword [ebp - 0x24]
push dword [ebp - 0x28]
xor edx, edx
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamlb_TFileHandler_Seek_qqrjus
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
imul edx, eax
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_ResizeWriteBuffer_qqri
mov eax, dword [ebp - 4]
movzx edx, word [eax + 0x151]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_ResizeReadBuffer_qqri
mov eax, dword [ebp - 0x10]
mov esi, dword [eax + 8]
dec esi
test esi, esi
jl 0x510a2f
inc esi
xor ebx, ebx
mov edx, ebx
mov eax, dword [ebp - 0x10]
call fcn.00681e54
mov dword [ebp - 0x3c], eax
push 0
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x151]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x11c]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
mov edi, dword [eax]
call dword [edi + 0x20]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_GetNewRecordInstance_qqrv
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681ca8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681f3c
mov edi, eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x11c]
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_Read_qqrpc
mov dword [edi + 0x30], ebx
mov eax, dword [ebp - 4]
mov dx, word [eax + 0x21e4]
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_SetSortKeySize_qqrus
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
push eax
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
mov edx, eax
mov eax, dword [ebp - 4]
pop ecx
call sym.MassSender.exe__Dbisamen_TDataFile_GetSortKeyValues_qqrpct1
mov eax, dword [ebp - 0x3c]
inc dword [eax + 4]
inc ebx
dec esi
jne 0x51098f
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x21e4]
call fcn.00690ca0
mov dword [ebp - 0x34], eax
xor eax, eax
push ebp
push 0x511014
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x38], eax
mov edx, sym.MassSender.exe__Dbisamen_CompareSortedRecordBuffers_qqrpvt1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00682168
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681e4c
mov ebx, dword [eax + 0x30]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681e4c
mov esi, eax
cmp byte [ebp + 0x28], 0
je 0x510b71
cmp dword [ebp - 0x1c], 0
jle 0x510b25
push 0
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov ecx, eax
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_CompareSortKeys_qqrpct1o
test eax, eax
je 0x510b53
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
movzx edx, word [edx + 0x151]
imul edx
cmp eax, dword [ebp - 0x1c]
jne 0x510af5
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x24]
xor eax, eax
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x38]
inc edx
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
jmp 0x510b53
mov edx, dword [ebp - 0x38]
inc edx
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 0x21e4]
mov edx, dword [ebp - 0x34]
call fcn.00699420
jmp 0x510daa
cmp byte [ebp + 0x20], 0
je 0x510d51
cmp dword [ebp - 0x1c], 0
jle 0x510cef
push 0
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov ecx, eax
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_CompareSortKeys_qqrpct1o
test eax, eax
je 0x510cc3
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
mov dl, 1
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x1c]
cmp byte [ebp + 0x18], 0
je 0x510c0a
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x14]
cmp byte [ebp + 0x10], 0
je 0x510c5d
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0xc]
test al, al
jne 0x510c5d
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
sub dword [ebp - 0x1c], eax
dec dword [ebp - 0x38]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
movzx edx, word [edx + 0x151]
imul edx
cmp eax, dword [ebp - 0x1c]
jne 0x510c93
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x24]
xor eax, eax
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x38]
inc edx
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
jmp 0x510d36
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
mov ecx, eax
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x1c]
jmp 0x510d36
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
push eax
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
mov ecx, eax
mov dl, 1
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x1c]
mov edx, dword [ebp - 0x38]
inc edx
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 0x21e4]
mov edx, dword [ebp - 0x34]
call fcn.00699420
jmp 0x510daa
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
movzx edx, word [edx + 0x151]
imul edx
cmp eax, dword [ebp - 0x1c]
jne 0x510d87
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x24]
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, esi
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681e4c
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_ReturnRecordInstance_qqrrp16Dbisamen_TRecord
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
xor edx, edx
call fcn.00681cf4
cmp dword [ebp + 8], 0
jl 0x510e39
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp + 8]
jl 0x510e39
cmp dword [ebp - 0x1c], 0
jle 0x510f05
cmp byte [ebp + 0x10], 0
je 0x510f05
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0xc]
test al, al
jne 0x510f05
mov edx, ebx
mov eax, dword [ebp - 0x10]
call fcn.00681e54
mov esi, dword [eax + 4]
mov edx, ebx
mov eax, dword [ebp - 0x10]
call fcn.00681e54
cmp esi, dword [eax + 8]
jle 0x510e6d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
cmp dword [eax + 8], 0
je 0x510f05
jmp 0x510a59
mov edx, ebx
mov eax, dword [ebp - 0x10]
call fcn.00681e54
mov esi, eax
push 0
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x151]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x11c]
mov eax, dword [esi]
mov edi, dword [eax]
call dword [edi + 0x20]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_GetNewRecordInstance_qqrv
mov ecx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
xor edx, edx
call fcn.00681ed0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00681e4c
mov edi, eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x11c]
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_Read_qqrpc
mov dword [edi + 0x30], ebx
mov eax, dword [ebp - 4]
mov dx, word [eax + 0x21e4]
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_SetSortKeySize_qqrus
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
push eax
mov eax, edi
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
mov edx, eax
mov eax, dword [ebp - 4]
pop ecx
call sym.MassSender.exe__Dbisamen_TDataFile_GetSortKeyValues_qqrpct1
inc dword [esi + 4]
jmp 0x510a59
cmp dword [ebp - 0x1c], 0
jle 0x510fa1
cmp byte [ebp + 0x18], 0
je 0x510f4e
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x14]
cmp byte [ebp + 0x10], 0
je 0x510fa1
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0xc]
test al, al
jne 0x510fa1
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
sub dword [ebp - 0x1c], eax
dec dword [ebp - 0x38]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x24]
mov al, byte [ebp + 0x28]
or al, byte [ebp + 0x20]
jne 0x510fc3
cmp dword [ebp + 8], 0
jl 0x510ffe
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
xor ecx, ecx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x24]
mov eax, dword [ebp - 0x38]
inc eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x149], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x1ab], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x118]
mov edx, dword [ebp - 0x38]
call sym.MassSender.exe__Dbisamen_TDataTable_SetActualRecordCount_qqri
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51152e
lea eax, [ebp - 0x34]
call sym.MassSender.exe__Dbisamlb_DeAllocMem_qqrpv
ret
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x21e8]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x11c4]
call sym.MassSender.exe__Dbisamlb_CopyList_qqrp13Classes_TListt1
xor eax, eax
push ebp
push 0x511527
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_GenerateRecordBufferSortKeys_qqrv
mov edx, sym.MassSender.exe__Dbisamen_CompareSortedRecordBuffers_qqrpvt1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
call fcn.00682168
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
imul edx, eax
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_ResizeWriteBuffer_qqri
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x21e4]
call fcn.00690ca0
mov dword [ebp - 0x34], eax
xor eax, eax
push ebp
push 0x5114fa
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov esi, dword [eax + 8]
dec esi
test esi, esi
jl 0x5113c0
inc esi
xor ebx, ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x21e8]
mov edx, ebx
call fcn.00681e54
mov dword [ebp - 0x40], eax
cmp byte [ebp + 0x28], 0
je 0x51117d
cmp dword [ebp - 0x1c], 0
jle 0x51112e
push 0
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov ecx, eax
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_CompareSortKeys_qqrpct1o
test eax, eax
je 0x51115e
mov edx, dword [ebp - 0x38]
inc edx
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
jmp 0x51115e
mov edx, dword [ebp - 0x38]
inc edx
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 0x21e4]
mov edx, dword [ebp - 0x34]
call fcn.00699420
jmp 0x511361
cmp byte [ebp + 0x20], 0
je 0x511331
cmp dword [ebp - 0x1c], 0
jle 0x5112ca
push 0
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov ecx, eax
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamen_TDataFile_CompareSortKeys_qqrpct1o
test eax, eax
je 0x51129d
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
mov dl, 1
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x1c]
cmp byte [ebp + 0x18], 0
je 0x511218
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x14]
cmp byte [ebp + 0x10], 0
je 0x51126b
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0xc]
test al, al
jne 0x51126b
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
sub dword [ebp - 0x1c], eax
dec dword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
inc edx
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
jmp 0x511315
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
mov ecx, eax
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x1c]
jmp 0x511315
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
push eax
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetRecordBufferPtr_qqrv
mov ecx, eax
mov dl, 1
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x1c]
mov edx, dword [ebp - 0x38]
inc edx
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_GetSortKeyBufferPtr_qqrv
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 0x21e4]
mov edx, dword [ebp - 0x34]
call fcn.00699420
jmp 0x511361
mov edx, dword [ebp - 0x38]
inc edx
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_SetRecordNumber_qqri
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x40]
call sym.MassSender.exe__Dbisamen_TRecord_Write_qqrpc
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
add dword [ebp - 0x1c], eax
inc dword [ebp - 0x38]
cmp dword [ebp + 8], 0
jl 0x5113b8
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp + 8]
jl 0x5113b8
cmp dword [ebp - 0x1c], 0
jle 0x5113c0
cmp byte [ebp + 0x10], 0
je 0x5113c0
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0xc]
test al, al
jne 0x5113c0
inc ebx
dec esi
jne 0x5110be
cmp dword [ebp - 0x1c], 0
jle 0x51145c
cmp byte [ebp + 0x18], 0
je 0x511409
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0x14]
cmp byte [ebp + 0x10], 0
je 0x51145c
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x130]
push edx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x130]
xor edx, edx
mov eax, dword [ebp + 0x24]
call dword [ebp + 0xc]
test al, al
jne 0x51145c
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x151]
sub dword [ebp - 0x1c], eax
dec dword [ebp - 0x38]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x153]
shl eax, 8
lea eax, [eax + eax*2]
add eax, 0x7f
xor edx, edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
push dword [ebp - 0x24]
push dword [ebp - 0x28]
xor edx, edx
mov eax, dword [ebp - 4]
call sym.MassSender.exe__Dbisamlb_TFileHandler_Seek_qqrjus
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x24]
mov al, byte [ebp + 0x28]
or al, byte [ebp + 0x20]
jne 0x5114a9
cmp dword [ebp + 8], 0
jl 0x5114e4
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
xor ecx, ecx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x24]
mov eax, dword [ebp - 0x38]
inc eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x149], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x1ab], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x118]
mov edx, dword [ebp - 0x38]
call sym.MassSender.exe__Dbisamen_TDataTable_SetActualRecordCount_qqri
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x511501
lea eax, [ebp - 0x34]
call sym.MassSender.exe__Dbisamlb_DeAllocMem_qqrpv
ret