Function at 0x4cac80
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov edi, edx
mov ebx, ecx
mov esi, dword [ecx + 8]
mov ecx, dword [ecx + 0x38]
lea eax, [ecx - 1]
mov dword [esp + 0x18], eax
mov dword [ebx + 0x38], eax
xor eax, eax
test byte [edx + 0x1c], 0x80
sete al
lea eax, [eax + eax*2]
add eax, 0x1b
mov dword [esp + 0x1c], eax
mov ebp, dword [esp + 0x44]
cmp byte [esp + 0x5c], 0
mov dword [esp + 0x28], ecx
jne 0x4cad45
mov edx, dword [esi + 0x6c]
cmp dword [esi + 0x70], edx
jle 0x4cad0b
lea ecx, [edx + 1]
mov dword [esi + 0x6c], ecx
mov eax, dword [esi + 0x68]
mov ecx, edx
mov dword [esp], edx
lea edx, [edx + edx*4]
mov ecx, dword [esp + 0x1c]
mov byte [eax + edx*4], cl
mov word [eax + edx*4 + 2], 0
mov dword [eax + edx*4 + 4], ebp
mov ebp, dword [esp + 0x18]
mov dword [eax + edx*4 + 8], ebp
mov ebp, dword [esp + 0x4c]
mov dword [eax + edx*4 + 0xc], ebp
mov dword [eax + edx*4 + 0x10], 0
mov byte [eax + edx*4 + 1], 0
jmp 0x4cad26
movzx edx, byte [esp + 0x1c]
mov ecx, esi
push dword [esp + 0x4c]
push dword [esp + 0x1c]
push ebp
call fcn.004747e0
add esp, 0xc
mov dword [esp], eax
mov ecx, dword [esi]
cmp byte [ecx + 0x57], 0
jne 0x4cad45
movsx ecx, word [esp + 0x50]
mov edx, dword [esi + 0x68]
mov eax, dword [esp]
lea eax, [eax + eax*4]
mov byte [edx + eax*4 + 1], 0xfd
mov dword [edx + eax*4 + 0x10], ecx
mov ecx, dword [esp + 0x60]
mov ebp, dword [esp + 0x40]
mov eax, dword [ebx]
test byte [eax + 0x21], 0x40
movzx edx, byte [esp + 0x58]
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [esp + 8], ebx
je 0x4cad6f
cmp byte [edi + 0x2b], 0
je 0x4cb1f3
test ebp, ebp
je 0x4cb1da
xor edi, edi
mov esi, ebp
mov dword [esp + 0x14], edx
jmp 0x4cad99
or ebx, dword [eax + 0x10]
nop word cs:[eax + eax]
mov edi, ebx
mov esi, dword [esi + 0x20]
test esi, esi
je 0x4cae15
mov ebx, edi
cmp byte [esi + 8], 0x80
jne 0x4cad90
test byte [esi + 9], 3
je 0x4cad90
mov edi, 0xffffffff
cmp byte [esi + 0xa], 0
jne 0x4cad92
mov ecx, dword [esp + 8]
mov eax, dword [ecx + 0x74]
test eax, eax
cmove eax, ecx
mov eax, dword [eax + 0x7c]
test eax, eax
mov ecx, dword [esp]
jne 0x4cae07
mov edi, dword [esp + 8]
mov eax, ecx
mov ecx, edi
mov edx, esi
push dword [esp + 0x14]
push eax
call fcn.004ccf40
mov edx, dword [esp + 0x1c]
add esp, 8
mov ecx, dword [edi]
mov dword [ecx + 0x44], 0xffffffff
test eax, eax
jne 0x4cad81
jmp 0x4cad90
mov eax, dword [eax + 4]
test eax, eax
je 0x4cadc8
cmp dword [eax], esi
jne 0x4cae00
cmp dword [eax + 0xc], edx
jne 0x4cae00
jmp 0x4cad81
mov dword [esp + 0x20], 0
mov esi, dword [esp + 4]
mov ebx, dword [esp + 8]
mov ecx, ebx
mov ebx, dword [esp]
mov edx, ebx
call fcn.004cbbc0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
mov ecx, dword [eax + 0x2c]
lea edx, [ecx + 1]
movsx eax, word [ebx + 0x22]
mov dword [esp + 0x24], ecx
lea eax, [ecx + eax + 1]
mov ecx, dword [esp + 8]
mov dword [ecx + 0x2c], eax
mov eax, dword [esi + 0x6c]
cmp dword [esi + 0x70], eax
mov ecx, esi
mov dword [esp + 0x10], edx
jle 0x4cae91
lea esi, [eax + 1]
mov dword [ecx + 0x6c], esi
mov ecx, dword [ecx + 0x68]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4], 0x50
mov ebx, dword [esp + 0x4c]
mov dword [ecx + eax*4 + 4], ebx
mov dword [ecx + eax*4 + 8], edx
mov dword [ecx + eax*4 + 0xc], 0
mov dword [ecx + eax*4 + 0x10], 0
jmp 0x4caea7
mov eax, edx
mov edx, 0x50
push 0
push eax
push dword [esp + 0x54]
call fcn.004747e0
add esp, 0xc
mov esi, dword [esp + 0xc]
mov eax, dword [esp]
movzx eax, word [eax + 0x22]
test ax, ax
jle 0x4cb0e2
or esi, edi
add dword [esp + 0x24], 2
xor ebx, ebx
pcmpeqd xmm7, xmm7
jmp 0x4caf01
mov edx, ebx
movsx eax, dx
add eax, dword [esp + 0x24]
mov ecx, dword [esp + 4]
mov edx, edi
push eax
push ebx
push dword [esp + 0x4c]
call fcn.00499720
add esp, 0xc
movzx eax, word [edi + 0x22]
pcmpeqd xmm7, xmm7
inc ebx
movsx ecx, ax
cmp ebx, ecx
jge 0x4cb0e2
cmp esi, 0xffffffff
mov edi, dword [esp]
je 0x4caf13
cmp ebx, 0x1f
ja 0x4caef5
bt esi, ebx
jae 0x4caef5
test bx, bx
js 0x4caed0
mov eax, dword [edi + 0x1c]
and eax, 0x20
je 0x4caed0
xor ecx, ecx
mov edi, dword [edi + 4]
test bx, bx
mov dword [esp + 0xc], edi
je 0x4cb0b5
mov edx, 0
cmp ebx, 0x11
jb 0x4cb08c
mov edx, ebx
and edx, 0xf
mov eax, 0x10
cmove edx, eax
mov ecx, ebx
sub ecx, edx
add edi, 0xbe
pxor xmm0, xmm0
pxor xmm1, xmm1
nop
movzx eax, word [edi - 0x60]
movd xmm2, eax
movzx eax, word [edi - 0x6c]
movd xmm4, eax
punpcklwd xmm4, xmm2
movzx eax, word [edi - 0x78]
movd xmm2, eax
movzx eax, word [edi - 0x84]
movd xmm3, eax
punpcklwd xmm3, xmm2
punpckldq xmm3, xmm4
movzx eax, word [edi - 0x90]
movd xmm2, eax
movzx eax, word [edi - 0x9c]
movd xmm4, eax
punpcklwd xmm4, xmm2
movzx eax, word [edi - 0xa8]
movd xmm5, eax
movzx eax, word [edi - 0xb4]
movd xmm2, eax
punpcklwd xmm2, xmm5
punpckldq xmm2, xmm4
punpcklqdq xmm2, xmm3
movzx eax, word [edi]
movd xmm3, eax
movzx eax, word [edi - 0xc]
movd xmm5, eax
punpcklwd xmm5, xmm3
movzx eax, word [edi - 0x18]
movd xmm3, eax
movzx eax, word [edi - 0x24]
movd xmm4, eax
punpcklwd xmm4, xmm3
punpckldq xmm4, xmm5
movzx eax, word [edi - 0x30]
movd xmm3, eax
movzx eax, word [edi - 0x3c]
movd xmm5, eax
punpcklwd xmm5, xmm3
movzx eax, word [edi - 0x48]
movd xmm6, eax
movzx eax, word [edi - 0x54]
movd xmm3, eax
punpcklwd xmm3, xmm6
punpckldq xmm3, xmm5
punpcklqdq xmm3, xmm4
movdqa xmm4, xmmword [0x529630]
pxor xmm2, xmm7
psrlw xmm2, 5
pand xmm2, xmm4
paddw xmm0, xmm2
pxor xmm3, xmm7
psrlw xmm3, 5
pand xmm3, xmm4
paddw xmm1, xmm3
add edi, 0xc0
add edx, 0x10
cmp ebx, edx
jne 0x4caf60
paddw xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddw xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddw xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
paddw xmm0, xmm1
movd edx, xmm0
mov edi, dword [esp + 0xc]
lea eax, [ecx + ecx*2]
lea edi, [edi + eax*4]
add edi, 0xa
nop word cs:[eax + eax]
movzx eax, word [edi]
bt eax, 5
sbb dx, 0xffff
inc ecx
add edi, 0xc
cmp ebx, ecx
jne 0x4cb0a0
jmp 0x4cb0b7
xor edx, edx
movsx eax, bx
lea eax, [eax + eax*2]
mov ecx, dword [esp + 0xc]
test byte [ecx + eax*4 + 0xa], 0x20
jne 0x4cb0d0
mov edi, dword [esp]
jmp 0x4caed2
mov eax, ebx
sub eax, edx
mov edi, dword [esp]
add ax, word [edi + 0x24]
mov edx, eax
jmp 0x4caed2
cmp byte [esp + 0x20], 0
je 0x4cb0f9
mov edi, dword [esp]
mov ebx, dword [esp + 8]
mov esi, dword [esp + 0x60]
jmp 0x4cb285
mov eax, dword [esp + 4]
mov edi, dword [eax + 0x6c]
mov esi, ebp
mov ebx, dword [esp + 8]
jmp 0x4cb137
mov ecx, ebx
mov edx, esi
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0xc]
call fcn.004cdcb0
add esp, 0x10
nop word cs:[eax + eax]
mov esi, dword [esi + 0x20]
test esi, esi
je 0x4cb165
cmp byte [esi + 8], 0x80
jne 0x4cb130
cmp byte [esi + 9], 1
jne 0x4cb130
cmp byte [esi + 0xa], 0
je 0x4cb108
cmp dword [ebx + 0x74], 0
jne 0x4cb130
mov ecx, ebx
mov edx, esi
push dword [esp + 0x10]
push dword [esp + 4]
call fcn.004cdd80
add esp, 8
jmp 0x4cb130
mov eax, dword [esp + 4]
mov edx, dword [eax + 0x6c]
cmp edi, edx
mov edi, dword [esp]
mov esi, dword [esp + 0x60]
jge 0x4cb285
mov ecx, dword [esp + 4]
cmp dword [ecx + 0x70], edx
jle 0x4cb23f
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
mov eax, dword [esp + 4]
mov eax, dword [eax + 0x68]
mov ecx, edx
mov dword [esp + 0xc], edx
lea edx, [edx + edx*4]
mov ecx, dword [esp + 0x1c]
mov byte [eax + edx*4], cl
mov word [eax + edx*4 + 2], 0
mov esi, dword [esp + 0x44]
mov dword [eax + edx*4 + 4], esi
mov esi, dword [esp + 0x18]
mov dword [eax + edx*4 + 8], esi
mov esi, dword [esp + 0x4c]
mov dword [eax + edx*4 + 0xc], esi
mov dword [eax + edx*4 + 0x10], 0
mov byte [eax + edx*4 + 1], 0
mov eax, dword [esp + 4]
jmp 0x4cb260
mov dword [esp + 0x10], 0
mov esi, ecx
cmp byte [edi + 0x2b], 2
jne 0x4cb2a5
jmp 0x4cb417
mov ecx, dword [edi]
mov esi, dword [edi + 0x3c]
mov edi, dword [esi + 0x44]
test edi, edi
mov dword [esp + 0x14], edx
je 0x4cb5a5
movzx ebx, byte [ecx]
test bl, bl
je 0x4cb5ad
lea edx, [ecx + 1]
xor eax, eax
nop word [eax + eax]
movzx ebx, bl
movzx ebx, byte [ebx + 0x52a853]
add ebx, eax
imul eax, ebx, 0x9e3779b1
movzx ebx, byte [edx]
inc edx
test bl, bl
jne 0x4cb220
jmp 0x4cb5af
movzx edx, byte [esp + 0x1c]
push dword [esp + 0x4c]
push dword [esp + 0x1c]
push dword [esp + 0x4c]
mov esi, ecx
call fcn.004747e0
add esp, 0xc
mov dword [esp + 0xc], eax
mov eax, esi
mov ecx, dword [eax]
mov esi, 0xffffffff
cmp byte [ecx + 0x57], 0
jne 0x4cb285
movsx ecx, word [esp + 0x50]
mov edx, dword [eax + 0x68]
mov eax, dword [esp + 0xc]
lea eax, [eax + eax*4]
mov byte [edx + eax*4 + 1], 0xfd
mov dword [edx + eax*4 + 0x10], ecx
mov ecx, ebx
mov edx, edi
push 0
push 0
push 0
push dword [esp + 0x1c]
call fcn.004cc120
add esp, 0x10
cmp byte [edi + 0x2b], 2
je 0x4cb417
mov ecx, ebx
mov edx, edi
mov dword [esp + 0xc], esi
push esi
push 0
push dword [esp + 0x50]
mov ebx, dword [esp + 0x50]
push ebx
call fcn.004ccac0
add esp, 0x10
xor eax, eax
cmp byte [esp + 0x54], 0
mov ecx, dword [esp + 4]
setne al
mov esi, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], esi
jle 0x4cb304
lea edx, [esi + 1]
mov dword [ecx + 0x6c], edx
mov edx, dword [ecx + 0x68]
lea ecx, [esi + esi*4]
mov dword [edx + ecx*4], 0x82
mov dword [edx + ecx*4 + 4], ebx
mov dword [edx + ecx*4 + 8], eax
mov dword [edx + ecx*4 + 0xc], 0
mov dword [edx + ecx*4 + 0x10], 0
jmp 0x4cb315
mov edx, 0x82
push 0
push eax
push ebx
call fcn.004747e0
add esp, 0xc
mov eax, dword [esp + 8]
cmp byte [eax + 0x12], 0
mov esi, dword [esp + 0xc]
je 0x4cb353
mov eax, dword [edi]
test eax, eax
je 0x4cb375
xor ecx, ecx
jmp 0x4cb340
movzx edx, byte [edx + 0x52a853]
cmp dl, byte [ebx + 0x52a853]
jne 0x4cb375
inc ecx
movzx edx, byte [eax + ecx]
movzx ebx, byte [ecx + str.sqlite_stat1]
cmp dl, bl
jne 0x4cb330
test edx, edx
jne 0x4cb33f
mov eax, dword [esp + 4]
mov eax, dword [eax]
cmp byte [eax + 0x57], 0
jne 0x4cb375
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x68]
mov ecx, dword [ecx + 0x6c]
lea ecx, [ecx + ecx*4]
mov byte [eax + ecx*4 - 0x13], 0xfb
mov dword [eax + ecx*4 - 4], edi
cmp byte [esp + 0x5c], 0
mov edx, dword [esp + 4]
je 0x4cb394
mov eax, dword [edx + 0x6c]
test eax, eax
jle 0x4cb394
mov ecx, dword [edx + 0x68]
lea eax, [eax + eax*4]
mov word [ecx + eax*4 - 0x12], 4
test esi, esi
mov ebx, dword [esp + 8]
js 0x4cb3f1
cmp esi, dword [esp + 0x44]
je 0x4cb3f1
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], eax
jle 0x4cb3df
lea edx, [eax + 1]
mov dword [ecx + 0x6c], edx
mov ecx, dword [ecx + 0x68]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4], 0x82
mov dword [ecx + eax*4 + 4], esi
mov dword [ecx + eax*4 + 8], 0
mov dword [ecx + eax*4 + 0xc], 0
mov dword [ecx + eax*4 + 0x10], 0
jmp 0x4cb3f1
mov edx, 0x82
push 0
push 0
push esi
call fcn.004747e0
add esp, 0xc
mov eax, dword [esp + 4]
mov eax, dword [eax + 0x6c]
test eax, eax
jle 0x4cb417
xor ecx, ecx
cmp byte [esp + 0x5c], 2
sete cl
add ecx, ecx
mov edx, dword [esp + 4]
mov edx, dword [edx + 0x68]
lea eax, [eax + eax*4]
mov word [edx + eax*4 - 0x12], cx
mov eax, dword [ebx]
test byte [eax + 0x21], 0x40
jne 0x4cb495
test ebp, ebp
je 0x4cb472
movzx esi, byte [esp + 0x58]
jmp 0x4cb447
mov ecx, ebx
mov edx, ebp
push dword [esp + 0x18]
push esi
push dword [esp + 0x18]
push edi
call fcn.004cdcb0
add esp, 0x10
mov ebp, dword [ebp + 0x20]
test ebp, ebp
je 0x4cb472
cmp byte [ebp + 8], 0x80
jne 0x4cb440
cmp byte [ebp + 9], 2
jne 0x4cb440
cmp byte [ebp + 0xa], 0
je 0x4cb42a
cmp dword [ebx + 0x74], 0
jne 0x4cb440
mov ecx, ebx
mov edx, ebp
push dword [esp + 0x10]
push edi
call fcn.004cdd80
add esp, 8
jmp 0x4cb440
mov edx, dword [esp + 4]
mov ecx, dword [edx + 0xc]
mov esi, dword [esp + 0x28]
neg esi
mov eax, dword [ecx + 0x38]
add eax, dword [ecx + 0x3c]
js 0x4cb4cc
mov eax, dword [edx + 0x6c]
mov ecx, dword [ecx + 0x40]
mov dword [ecx + esi*4], eax
add esp, 0x2c
jmp 0x4cb4d5
mov ecx, dword [edi]
mov esi, dword [edi + 0x3c]
mov edi, dword [esi + 0x44]
test edi, edi
je 0x4cb4da
movzx ebx, byte [ecx]
test bl, bl
je 0x4cb4e2
lea edx, [ecx + 1]
xor eax, eax
nop dword [eax]
movzx ebx, bl
movzx ebx, byte [ebx + 0x52a853]
add ebx, eax
imul eax, ebx, 0x9e3779b1
movzx ebx, byte [edx]
inc edx
test bl, bl
jne 0x4cb4b0
jmp 0x4cb4e4
push esi
call fcn.0049d4a0
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esi + 0x40]
add esi, 0x3c
jmp 0x4cb4f6
xor eax, eax
xor edx, edx
div dword [esi + 0x38]
lea esi, [edi + edx*8]
lea eax, [edi + edx*8]
add eax, 4
mov ebx, dword [esp + 8]
mov esi, dword [esi]
mov edx, 0x53e0d4
test esi, esi
je 0x4cb563
mov eax, dword [eax]
dec esi
mov dword [esp + 0xc], eax
mov edi, dword [eax + 0xc]
xor ebx, ebx
jmp 0x4cb520
movzx edx, byte [edx + 0x52a853]
cmp dl, byte [eax + 0x52a853]
jne 0x4cb540
inc ebx
movzx edx, byte [edi + ebx]
movzx eax, byte [ecx + ebx]
cmp dl, al
jne 0x4cb510
test edx, edx
jne 0x4cb51f
jmp 0x4cb556
test esi, esi
mov eax, dword [esp + 0xc]
jne 0x4cb501
mov edi, dword [esp]
mov ebx, dword [esp + 8]
mov edx, 0x53e0d4
jmp 0x4cb566
mov edx, dword [esp + 0xc]
mov edi, dword [esp]
mov ebx, dword [esp + 8]
jmp 0x4cb566
mov edi, dword [esp]
mov esi, dword [edx + 8]
jmp 0x4cb573
mov esi, dword [esi + 0xc]
test esi, esi
je 0x4cb41f
mov ecx, ebx
mov edx, edi
push 0
push esi
call fcn.004d0090
add esp, 8
test eax, eax
je 0x4cb570
mov ecx, ebx
mov edx, eax
push 0
push 2
push dword [esp + 0x18]
push edi
call fcn.004cdcb0
add esp, 0x10
jmp 0x4cb570
lea eax, [esi + 0x40]
add esi, 0x3c
jmp 0x4cb5c5
xor eax, eax
xor edx, edx
div dword [esi + 0x38]
lea esi, [edi + edx*8]
lea eax, [edi + edx*8]
add eax, 4
mov ebx, dword [esp + 8]
mov edx, dword [esp + 0x14]
mov esi, dword [esi]
mov edi, 0x53e0d4
test esi, esi
je 0x4cb625
mov eax, dword [eax]
dec esi
mov dword [esp + 0x10], eax
mov edi, dword [eax + 0xc]
xor ebx, ebx
jmp 0x4cb5f0
movzx edx, byte [edx + 0x52a853]
cmp dl, byte [eax + 0x52a853]
jne 0x4cb602
inc ebx
movzx edx, byte [edi + ebx]
movzx eax, byte [ecx + ebx]
cmp dl, al
jne 0x4cb5e0
test edx, edx
jne 0x4cb5ef
jmp 0x4cb619
test esi, esi
mov eax, dword [esp + 0x10]
jne 0x4cb5d0
mov ebx, dword [esp + 8]
mov edx, dword [esp + 0x14]
mov edi, 0x53e0d4
jmp 0x4cb625
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 8]
mov edx, dword [esp + 0x14]
cmp dword [edi + 8], 0
mov edi, dword [esp]
mov esi, dword [esp + 0x60]
jne 0x4cb639
mov eax, dword [edi + 0x30]
or eax, ebp
je 0x4cb652
test ebp, ebp
jne 0x4cad77
xor edi, edi
mov al, 1
mov dword [esp + 0x20], eax
mov esi, dword [esp + 4]
jmp 0x4cae25
mov dword [esp + 0x10], 0
cmp byte [edi + 0x2b], 2
jne 0x4cb2a5
jmp 0x4cb417