Function at 0x10150550
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov ecx, dword [ebp + 0x24]
push ebx
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 8]
cmp dword [edi], eax
mov edx, 0xd
sete al
mov dword [esp + 0x14], eax
lea eax, [ecx - 1]
test eax, eax
js 0x10150595
lea esp, [esp]
mov esi, dword [ebp + 0x20]
movzx esi, byte [eax + esi]
lea ebx, [edx*8]
xor esi, ebx
xor edx, esi
dec eax
jns 0x10150580
movzx esi, byte [ebp + 0x1c]
lea eax, [edx*8]
xor eax, esi
xor eax, edx
xor edx, edx
div dword [edi + 0xc]
mov dword [esp + 0x18], esi
lea eax, [edx*4]
mov dword [esp + 0x10], edx
mov edx, dword [edi + 0x14]
mov ebx, dword [eax + edx]
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x1015062e
mov al, byte [ebp + 0x1c]
cmp byte [ebx + 0x28], al
jne 0x10150628
cmp dword [ebx + 0x14], ecx
jne 0x10150628
mov esi, dword [ebp + 0x20]
mov eax, ecx
lea edi, [ebx + 0x29]
cmp ecx, 4
jb 0x101505f4
mov edx, dword [edi]
cmp edx, dword [esi]
jne 0x10150628
sub eax, 4
add esi, 4
add edi, 4
cmp eax, 4
jae 0x101505e0
test eax, eax
je 0x101507c2
mov dl, byte [esi]
cmp dl, byte [edi]
jne 0x10150628
cmp eax, 1
jbe 0x101507c2
mov dl, byte [esi + 1]
cmp dl, byte [edi + 1]
jne 0x10150628
cmp eax, 2
jbe 0x101507c2
mov al, byte [esi + 2]
cmp al, byte [edi + 2]
je 0x101507c2
mov ebx, dword [ebx]
test ebx, ebx
jne 0x101505c6
xor esi, esi
lea edi, [ecx + 0x6a]
jg 0x10150646
jl 0x1015063f
cmp edi, 0x80
jae 0x10150646
mov edi, 0x80
xor esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
add ecx, ecx
cmp ecx, dword [eax + 0xc]
jl 0x1015069e
push eax
call fcn.10149820
add esp, 4
test eax, eax
jne 0x10150a12
lea ecx, [eax + 0xd]
mov eax, dword [ebp + 0x24]
dec eax
js 0x10150685
lea ecx, [ecx]
mov edx, dword [ebp + 0x20]
movzx edx, byte [eax + edx]
lea ebx, [ecx*8]
xor edx, ebx
xor ecx, edx
dec eax
jns 0x10150670
lea eax, [ecx*8]
xor eax, dword [esp + 0x18]
xor edx, edx
xor eax, ecx
mov ecx, dword [ebp + 8]
div dword [ecx + 0xc]
mov dword [esp + 0x10], edx
call sym.SQLite.Interop.dll_sqlite3_initialize
test eax, eax
jne 0x101506c3
mov edx, edi
or edx, esi
je 0x101506bb
push esi
push edi
call fcn.10145440
add esp, 8
mov esi, eax
jmp 0x101506bd
xor esi, esi
mov ebx, esi
test esi, esi
jne 0x101506cf
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x20]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov al, byte [ebp + 0x1c]
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x24]
push edi
push ecx
lea edx, [esi + 0x29]
push edx
mov byte [esi + 0x28], al
call fcn.100ffb30
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 8]
mov dword [esi + 0x14], edi
mov byte [esi + edi + 0x29], 0
add eax, 0x2a
mov dword [esi + 0x10], eax
mov edx, dword [ecx + 0x14]
mov eax, dword [esp + 0x1c]
mov edx, dword [edx + eax*4]
lea edi, [esi + 0x10]
mov dword [esi], edx
mov edx, dword [ecx + 0x14]
mov dword [edx + eax*4], esi
inc dword [ecx + 8]
mov eax, dword [edi]
mov edx, dword [ebp + 0x10]
add esp, 0xc
add eax, esi
test edx, edx
ja 0x10150759
jb 0x10150747
cmp dword [ebp + 0xc], 0x7f
ja 0x10150756
mov dl, byte [ebp + 0xc]
and dl, 0x7f
mov byte [eax], dl
mov eax, 1
jmp 0x10150795
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
test edx, edx
ja 0x10150786
jb 0x1015076a
cmp ecx, 0x3fff
ja 0x10150786
shrd ecx, edx, 7
or cl, 0x80
mov byte [eax], cl
mov cl, byte [ebp + 0xc]
shr edx, 7
and cl, 0x7f
mov byte [eax + 1], cl
mov eax, 2
jmp 0x10150792
push edx
push ecx
mov ecx, eax
call fcn.10114cc0
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
add dword [edi], eax
mov eax, dword [edi]
mov dword [esi + 0x20], edx
mov edx, dword [ebp + 0x10]
mov dword [esi + 0x24], edx
mov dword [esi + 0xc], eax
cmp dword [ecx], 1
je 0x101507ba
inc eax
mov dword [edi], eax
mov eax, dword [ecx]
neg eax
sbb eax, eax
mov word [esi + 0x1a], ax
mov edx, dword [edi]
mov dword [esp + 0x10], edx
jmp 0x1015082b
mov eax, dword [ebx + 8]
mov ecx, eax
sub ecx, dword [ebx + 0x10]
cmp ecx, 0x16
jge 0x1015081c
add eax, eax
cdq
mov esi, eax
mov edi, edx
call sym.SQLite.Interop.dll_sqlite3_initialize
test eax, eax
jne 0x101506c3
push edi
push esi
push ebx
call fcn.10147760
add esp, 0xc
test eax, eax
je 0x101506c3
mov edx, dword [ebp + 8]
mov dword [eax + 8], esi
mov ecx, dword [edx + 0x14]
add ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
cmp edx, ebx
je 0x10150818
lea esp, [esp]
mov ecx, edx
mov edx, dword [ecx]
cmp edx, ebx
jne 0x10150810
mov dword [ecx], eax
mov ebx, eax
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp + 8]
lea edi, [ebx + 0x10]
neg eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebx + 0x20]
jne 0x1015083f
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebx + 0x24]
je 0x101508d8
push 0
push ecx
call fcn.10124510
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov ecx, dword [edi]
add esp, 8
sub eax, dword [ebx + 0x20]
sbb esi, dword [ebx + 0x24]
add ecx, ebx
test esi, esi
ja 0x10150897
jb 0x10150865
cmp eax, 0x7f
ja 0x10150870
and al, 0x7f
mov byte [ecx], al
mov eax, 1
jmp 0x101508a1
test esi, esi
ja 0x10150897
jb 0x1015087d
cmp eax, 0x3fff
ja 0x10150897
mov edx, eax
shrd edx, esi, 7
or dl, 0x80
shr esi, 7
and al, 0x7f
mov byte [ecx + 1], al
mov byte [ecx], dl
mov eax, 2
jmp 0x101508a1
push esi
push eax
call fcn.10114cc0
add esp, 8
mov ecx, dword [ebp + 0xc]
add dword [edi], eax
mov eax, dword [edi]
mov edx, dword [ebp + 0x10]
mov dword [ebx + 0x20], ecx
mov ecx, dword [ebp + 8]
mov dword [ebx + 0x24], edx
mov dword [ebx + 0xc], eax
cmp dword [ecx], 1
mov dword [esp + 0x14], 1
je 0x101508d8
inc eax
mov dword [edi], eax
mov eax, dword [ecx]
neg eax
sbb eax, eax
mov word [ebx + 0x1a], ax
mov dword [ebx + 0x1c], 0
mov eax, dword [ebp + 0x14]
test eax, eax
js 0x10150a01
mov edx, dword [ecx]
cmp edx, 1
jne 0x10150901
mov byte [ebx + 0x19], dl
mov edx, dword [edi]
add edx, dword [esp + 0x10]
mov ecx, dword [ecx + 4]
add dword [ecx], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx esi, word [ebx + 0x1a]
cmp eax, esi
je 0x10150939
test edx, edx
jne 0x10150988
mov ecx, dword [edi]
cdq
mov byte [ebx + ecx], 1
inc dword [edi]
mov esi, dword [edi]
push edx
push eax
lea esi, [esi + ebx]
call fcn.101237d0
mov dx, word [ebp + 0x14]
mov ecx, dword [ebp + 8]
add esp, 8
add dword [edi], eax
mov word [ebx + 0x1a], dx
mov dword [ebx + 0x1c], 0
cmp dword [esp + 0x14], 0
je 0x10150a05
mov eax, dword [ebp + 0x18]
sub eax, dword [ebx + 0x1c]
add eax, 2
cdq
mov esi, edx
mov edx, dword [edi]
add edx, ebx
mov dword [esp + 0x1c], edx
test esi, esi
ja 0x101509d6
jb 0x10150963
cmp eax, 0x7f
ja 0x10150991
and al, 0x7f
mov byte [edx], al
mov eax, 1
add dword [edi], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [edi]
add edx, dword [esp + 0x10]
mov dword [ebx + 0x1c], eax
mov ecx, dword [ecx + 4]
add dword [ecx], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp + 0x18], eax
mov word [ebx + 0x1a], ax
jmp 0x10150944
test esi, esi
ja 0x101509d6
jb 0x1015099e
cmp eax, 0x3fff
ja 0x101509d6
mov edx, eax
shrd edx, esi, 7
and al, 0x7f
shr esi, 7
mov esi, dword [esp + 0x1c]
mov byte [esi + 1], al
or dl, 0x80
mov byte [esi], dl
mov eax, 2
add dword [edi], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [edi]
add edx, dword [esp + 0x10]
mov dword [ebx + 0x1c], eax
mov ecx, dword [ecx + 4]
add dword [ecx], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push eax
mov ecx, edx
call fcn.10114cc0
add dword [edi], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [edi]
mov ecx, dword [ebp + 8]
add edx, dword [esp + 0x18]
mov dword [ebx + 0x1c], eax
mov ecx, dword [ecx + 4]
add dword [ecx], edx
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebx + 0x18], 1
mov edx, dword [edi]
add edx, dword [esp + 0x10]
mov ecx, dword [ecx + 4]
add dword [ecx], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret