Function at 0x4ca22a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
push ebx
push esi
xor esi, esi
push edi
mov edi, dword [ebp + 8]
push esi
lea eax, [esp + 0x18]
push eax
push 0x1b
mov eax, edi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x20], esi
call fcn.004b6aca
add esp, 0xc
mov dword [esp + 0xc], eax
cmp eax, esi
jne 0x4ca2e5
mov eax, dword [edi + 0xf8]
mov ecx, dword [esp + 0x14]
cdq
push edx
push eax
push 1
push ecx
call fcn.0048b02a
add esp, 0x10
mov edx, dword [esp + 0x14]
push edx
call fcn.004bd22a
add esp, 4
cmp eax, 0x64
jne 0x4ca2d6
mov eax, dword [esp + 0x14]
push 0
push eax
call fcn.004680ca
xor esi, esi
add esp, 8
mov ebx, eax
cmp dword [edi + 0xf8], esi
jle 0x4ca2cf
lea ecx, [esp + 0xc]
push ecx
push esi
push ebx
push edi
call fcn.004c8a3a
xor dword [esp + 0x60], eax
xor dword [esp + 0x64], edx
inc esi
add esp, 0x10
cmp esi, dword [edi + 0xf8]
jl 0x4ca2ae
cmp dword [esp + 0xc], 0
je 0x4ca281
mov edx, dword [esp + 0x14]
push edx
call fcn.004aad2a
add esp, 4
xor esi, esi
push esi
lea eax, [esp + 0x18]
push eax
push 0x1b
mov eax, edi
call fcn.004b6aca
mov ebx, eax
add esp, 0xc
cmp ebx, esi
jne 0x4ca336
mov eax, dword [edi + 0xd8]
mov ecx, dword [edi + 0x24]
mov edx, dword [ecx]
push eax
xor esi, esi
push 0x100b3688
mov dword [esp + 0x34], edx
mov dword [esp + 0x1c], esi
call fcn.0044eb8a
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
jne 0x4ca365
lea ebx, [esi + 7]
push esi
call fcn.004aea4a
add esp, 4
xor esi, esi
mov ecx, dword [esp + 0x48]
cmp dword [esp + 0x50], ecx
jne 0x4ca98a
mov edx, dword [esp + 0x4c]
cmp dword [esp + 0x54], edx
jne 0x4ca98a
mov ecx, dword [ebp + 0xc]
mov eax, 1
mov dword [ecx], eax
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x24]
mov eax, dword [edi + 0xc]
push 0
push 0
push 1
push 0xffffffffffffffff
push ecx
lea esi, [esp + 0x28]
call fcn.004b5f3a
mov edx, dword [esp + 0x38]
add esp, 0x14
mov ebx, eax
push edx
mov dword [esp + 0x10], ebx
call fcn.004391da
mov esi, dword [esp + 0x18]
add esp, 4
test ebx, ebx
jne 0x4ca32b
push esi
call fcn.004bd22a
add esp, 4
cmp eax, 0x64
jne 0x4ca32b
test esi, esi
je 0x4ca3f9
cmp dword [esi + 0x14], 0
je 0x4ca3d4
xor eax, eax
cmp ax, word [esi + 0x54]
jae 0x4ca3d4
mov ecx, dword [esi]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x4ca3cf
push eax
call dword [0x100b7064]
add esp, 4
mov ecx, dword [esi + 0x14]
jmp 0x4ca3fe
mov eax, dword [esi]
test eax, eax
je 0x4ca3f9
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4ca3eb
push eax
call dword [0x100b7064]
add esp, 4
mov ecx, dword [esi]
push 0
push 0x19
call fcn.0046152a
add esp, 8
mov ecx, 0x100aa4c0
call fcn.0043ca0a
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
test esi, esi
je 0x4ca45f
mov ebx, dword [esi]
mov ecx, dword [esi + 0x50]
test ebx, ebx
je 0x4ca442
cmp byte [ebx + 0x40], 0
jne 0x4ca426
cmp ecx, 0xc0a
jne 0x4ca43d
push 0
push 7
mov ecx, ebx
call fcn.0046152a
add esp, 8
mov byte [ebx + 0x40], 0
mov ecx, 7
mov eax, dword [ebx + 0x38]
jmp 0x4ca447
mov eax, 0xff
mov edx, dword [esi]
and eax, ecx
mov dword [esi + 0x50], eax
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4ca45f
push eax
call dword [0x100b706c]
add esp, 4
cmp dword [edi + 0x2c], 0
mov dword [esp + 0x1c], 0
je 0x4ca5e4
mov edi, dword [edi + 0x18]
inc edi
test esi, esi
je 0x4ca4ce
cmp dword [esi + 0x14], 0
je 0x4ca4a9
movzx eax, word [esi + 0x54]
cmp edi, eax
jge 0x4ca4a9
test edi, edi
js 0x4ca4a9
mov ecx, dword [esi]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x4ca49e
push eax
call dword [0x100b7064]
add esp, 4
mov eax, dword [esi + 0x14]
lea edx, [edi + edi*4]
lea ecx, [eax + edx*8]
jmp 0x4ca4d3
mov eax, dword [esi]
test eax, eax
je 0x4ca4ce
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4ca4c0
push eax
call dword [0x100b7064]
add esp, 4
mov ecx, dword [esi]
push 0
push 0x19
call fcn.0046152a
add esp, 8
mov ecx, 0x100aa4c0
movzx eax, word [ecx + 0x1c]
test al, 4
je 0x4ca4ea
mov ebx, dword [ecx + 0x10]
mov ecx, dword [ecx + 0x14]
mov dword [esp + 0x44], ecx
jmp 0x4ca58c
test al, 8
je 0x4ca553
fld qword [ecx + 8]
mov edx, 0x80000000
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], edx
fild qword [esp + 0x68]
fcomp st(1)
fnstsw ax
test ah, 1
jne 0x4ca51b
xor eax, eax
fstp st(0)
mov ebx, eax
mov dword [esp + 0x44], edx
jmp 0x4ca58c
mov edx, 0x7fffffff
mov dword [esp + 0x70], 0xffffffff
mov dword [esp + 0x74], edx
fild qword [esp + 0x70]
fcomp st(1)
fnstsw ax
test ah, 0x41
jp 0x4ca546
or eax, 0xffffffff
fstp st(0)
mov ebx, eax
mov dword [esp + 0x44], edx
jmp 0x4ca58c
call fcn.004ce850
mov ebx, eax
mov dword [esp + 0x44], edx
jmp 0x4ca58c
test al, 0x12
je 0x4ca586
mov edx, dword [ecx + 0x18]
xor eax, eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
lea eax, [esp + 0x60]
push edx
push eax
mov al, byte [ecx + 0x1e]
mov ecx, dword [ecx + 4]
call fcn.00438e6a
mov ecx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x68]
add esp, 8
mov dword [esp + 0x44], ecx
jmp 0x4ca58c
xor ebx, ebx
mov dword [esp + 0x44], ebx
test esi, esi
je 0x4ca5e0
mov edi, dword [esi]
mov ecx, dword [esi + 0x50]
test edi, edi
je 0x4ca5c3
cmp byte [edi + 0x40], 0
jne 0x4ca5a7
cmp ecx, 0xc0a
jne 0x4ca5be
push 0
push 7
mov ecx, edi
call fcn.0046152a
add esp, 8
mov byte [edi + 0x40], 0
mov ecx, 7
mov eax, dword [edi + 0x38]
jmp 0x4ca5c8
mov eax, 0xff
mov edx, dword [esi]
and eax, ecx
mov dword [esi + 0x50], eax
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4ca5e0
push eax
call dword [0x100b706c]
add esp, 4
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0x24], 0x28
lea ebx, [ebx]
mov eax, dword [esp + 0x10]
mov edi, dword [ebp + 8]
cmp eax, dword [edi + 0x18]
jge 0x4ca97d
mov ecx, dword [edi + 0x20]
cmp byte [eax + ecx], 0
jne 0x4ca95b
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x4ca749
cmp dword [ebx + 0x14], 0
je 0x4ca724
movzx edx, word [ebx + 0x54]
inc eax
cmp eax, edx
jge 0x4ca724
test eax, eax
js 0x4ca724
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4ca655
push eax
call dword [0x100b7064]
add esp, 4
mov edi, dword [ebx + 0x14]
add edi, dword [esp + 0x24]
test edi, edi
je 0x4ca76a
movzx ecx, word [edi + 0x1c]
test cl, 1
jne 0x4ca76a
mov eax, ecx
shr eax, 3
and eax, 2
or eax, ecx
mov word [edi + 0x1c], ax
test eax, 0x4000
je 0x4ca6c7
mov eax, dword [edi + 0x10]
add eax, dword [edi + 0x18]
test eax, eax
jg 0x4ca695
mov eax, 1
push 1
call fcn.0044e25a
add esp, 4
test eax, eax
jne 0x4ca6c7
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 4]
add ecx, dword [edi + 0x18]
push eax
push 0
push ecx
call fcn.004ce72a
mov edx, dword [edi + 0x10]
add dword [edi + 0x18], edx
mov eax, 0xbdff
add esp, 0xc
and word [edi + 0x1c], ax
test byte [edi + 0x1c], 2
je 0x4ca753
cmp byte [edi + 0x1e], 1
je 0x4ca6e2
push 1
push edi
call fcn.0045545a
add esp, 8
movzx eax, word [edi + 0x1c]
test eax, 0x200
jne 0x4ca75f
test al, 2
je 0x4ca75f
mov eax, dword [edi + 0x18]
push 1
add eax, 2
call fcn.0044e25a
add esp, 4
test eax, eax
jne 0x4ca75f
mov ecx, dword [edi + 4]
mov edx, dword [edi + 0x18]
mov byte [ecx + edx], al
mov eax, dword [edi + 4]
mov ecx, dword [edi + 0x18]
mov edx, 0x200
mov byte [eax + ecx + 1], 0
or word [edi + 0x1c], dx
jmp 0x4ca75f
mov eax, dword [ebx]
test eax, eax
je 0x4ca749
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4ca73b
push eax
call dword [0x100b7064]
add esp, 4
mov ecx, dword [ebx]
push 0
push 0x19
call fcn.0046152a
add esp, 8
mov edi, 0x100aa4c0
jmp 0x4ca664
mov esi, 1
mov eax, edi
call fcn.0046011a
cmp byte [edi + 0x1e], 1
jne 0x4ca76a
mov esi, dword [edi + 4]
jmp 0x4ca76c
xor esi, esi
test ebx, ebx
je 0x4ca7c0
mov edi, dword [ebx]
mov ecx, dword [ebx + 0x50]
test edi, edi
je 0x4ca7a3
cmp byte [edi + 0x40], 0
jne 0x4ca787
cmp ecx, 0xc0a
jne 0x4ca79e
push 0
push 7
mov ecx, edi
call fcn.0046152a
add esp, 8
mov byte [edi + 0x40], 0
mov ecx, 7
mov eax, dword [edi + 0x38]
jmp 0x4ca7a8
mov eax, 0xff
and eax, ecx
mov dword [ebx + 0x50], eax
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4ca7c0
push eax
call dword [0x100b706c]
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc eax
push eax
push ecx
call fcn.0047128a
mov edx, dword [ebp + 8]
mov edi, dword [edx + 0x24]
mov ebx, dword [edi]
lea ecx, [esp + 0x20]
push ecx
push eax
mov dword [esp + 0x28], 0
mov edx, dword [ebx + 0xc]
push esi
push edi
call edx
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x4ca82e
mov eax, dword [esp + 0x18]
mov dword [eax], edi
cmp dword [ebx], 1
jl 0x4ca82e
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, dword [ebx + 0x18]
push ecx
push edx
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x4ca82e
mov ecx, dword [esp + 0x18]
mov edx, dword [ebx + 0x10]
push ecx
call edx
add esp, 4
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x38], ebx
mov dword [esp + 0xc], esi
test esi, esi
jne 0x4ca939
jmp 0x4ca84a
mov ebx, dword [esp + 0x38]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [edx + 0x14]
lea ecx, [esp + 0x4c]
xor esi, esi
push ecx
push ebx
mov dword [esp + 0x38], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x40], esi
call eax
mov edi, eax
add esp, 0x18
mov dword [esp + 0xc], edi
cmp edi, esi
jne 0x4ca93d
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
mov ebx, dword [esp + 0x3c]
push edi
push ecx
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x2c]
push eax
push esi
push ecx
push edx
push ebx
call fcn.0042ad1a
xor dword [esp + 0x68], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xf8]
xor dword [esp + 0x6c], edx
mov esi, 1
add esp, 0x20
mov dword [esp + 0x40], eax
cmp eax, esi
jle 0x4ca84a
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0xfc]
add ecx, 0x18
mov dword [esp + 0xc], ecx
mov eax, dword [ecx]
cmp eax, dword [esp + 0x20]
jg 0x4ca926
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x5c]
push edi
push edx
mov edx, dword [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x28]
push edx
push esi
push ecx
push eax
push ebx
call fcn.0042ad1a
xor dword [esp + 0x68], eax
mov ecx, dword [esp + 0x2c]
add esp, 0x20
xor dword [esp + 0x4c], edx
inc esi
add ecx, 0x18
mov dword [esp + 0xc], ecx
cmp esi, dword [esp + 0x40]
jl 0x4ca8f2
jmp 0x4ca84a
mov edi, dword [esp + 0xc]
test ebx, ebx
je 0x4ca94e
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x10]
push ebx
call eax
add esp, 4
cmp edi, 0x65
jne 0x4ca95f
xor edi, edi
mov dword [esp + 0xc], edi
jmp 0x4ca95f
mov edi, dword [esp + 0xc]
inc dword [esp + 0x10]
add dword [esp + 0x24], 0x28
test edi, edi
je 0x4ca5fa
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0xc]
jmp 0x4ca32b
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0xc]
jmp 0x4ca39c
mov edx, dword [ebp + 0xc]
xor eax, eax
pop edi
mov dword [edx], eax
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret