Function at 0x949a20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x138
mov eax, dword [0xbcbae0]
mov esi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x24]
xor eax, ebp
mov dword [esp + 0x130], eax
mov dword [ecx], 0
push esi
call fcn.00948e30
add esp, 4
mov ebx, eax
test eax, eax
jne 0x949d35
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
mov ebx, 0x20012
mov eax, ecx
and ecx, 7
shr eax, 3
cmp ecx, 1
sbb eax, 0xffffffff
cmp eax, edx
jb 0x949d35
cmp eax, dword [ebp + 0x14]
jne 0x949d35
imul edi, esi, 0x64
mov ecx, edx
mov edx, dword [edi + 0xc20394]
mov dword [esp + 0x10], edi
lea ecx, [ecx + edx + 2]
cmp eax, ecx
jb 0x949d35
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x14], edx
push edi
call fcn.004eafd7
add esp, 4
mov ebx, eax
push edi
call fcn.004eafd7
add esp, 4
mov dword [esp + 4], eax
push edi
call fcn.004eafd7
add esp, 4
mov dword [esp + 0x18], eax
push edi
call fcn.004eafd7
add esp, 4
test ebx, ebx
je 0x949aec
cmp dword [esp + 4], 0
je 0x949aec
cmp dword [esp + 0x18], 0
je 0x949aec
test eax, eax
jne 0x949b30
mov edi, eax
test ebx, ebx
je 0x949afb
push ebx
call fcn.004eb998
add esp, 4
mov eax, dword [esp + 4]
mov esi, dword [esp + 0x18]
test eax, eax
je 0x949b10
push eax
call fcn.004eb998
add esp, 4
test esi, esi
je 0x949b1d
push esi
call fcn.004eb998
add esp, 4
mov ebx, 0xc
test edi, edi
je 0x949d35
push edi
jmp 0x949d2d
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0xc], ebx
cmp byte [ecx + edi - 1], 0xbc
je 0x949b48
mov ebx, 0x20005
jmp 0x949d08
mov ebx, dword [esp + 0x14]
not ebx
add ebx, edi
push ebx
push ecx
push dword [esp + 0x14]
mov dword [esp + 0xc], eax
call fcn.0097cbc0
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], ebx
lea eax, [eax + ebx]
mov ebx, dword [esp + 0x14]
push ebx
push eax
push dword [esp + 8]
call fcn.0097cbc0
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov ecx, 1
mov edx, 0xffffff00
sub ecx, dword [ebp + 0x20]
movzx eax, byte [eax]
lea ecx, [ecx + edi*8]
mov edi, 0xff
shr edi, cl
sar edx, cl
test edx, eax
je 0x949bab
mov ebx, 0x20005
jmp 0x949d05
mov dword [esp + 0x1c], edi
push dword [esp + 8]
push dword [esp + 8]
push ebx
mov edi, dword [esp + 0xc]
push edi
push esi
call fcn.0094cf40
add esp, 0x14
mov ebx, eax
test eax, eax
mov eax, edi
jne 0x949d08
mov ebx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov esi, dword [esp + 4]
test ebx, ebx
je 0x949bf0
xor eax, eax
movzx ecx, byte [esi + eax]
xor byte [edx + eax], cl
inc eax
cmp eax, ebx
jne 0x949be4
mov eax, 0xfffffffe
mov ebx, dword [esp + 0x1c]
sub eax, dword [ebp + 0x18]
and bl, byte [edx]
add eax, dword [ebp + 0x14]
mov byte [edx], bl
sub eax, dword [esp + 0x14]
jne 0x949c10
mov esi, 1
jmp 0x949c31
test bl, bl
jne 0x949ba1
xor esi, esi
movzx ebx, byte [edx + esi + 1]
lea ecx, [esi + 1]
cmp ecx, eax
jae 0x949c2e
test bl, bl
mov esi, ecx
jne 0x949ba1
jmp 0x949c16
add esi, 2
mov eax, dword [esp]
cmp bl, 1
mov ebx, 0x20005
jne 0x949d08
lea edi, [esp + 0x20]
push edi
mov eax, dword [esp + 0x14]
call dword [eax + 0xc203e0]
add esp, 4
mov ebx, eax
mov eax, dword [esp]
test ebx, ebx
jne 0x949d08
push 8
mov ebx, dword [esp + 8]
push ebx
call fcn.0097f670
add esp, 8
push 8
push ebx
push edi
mov eax, dword [esp + 0x1c]
call dword [eax + 0xc203e4]
add esp, 0xc
mov ebx, eax
mov eax, dword [esp]
test ebx, ebx
jne 0x949d08
mov eax, dword [esp + 0x10]
lea eax, [eax + 0xc203e4]
push dword [ebp + 0xc]
push dword [ebp + 8]
push edi
mov dword [esp + 0x14], eax
call dword [eax]
add esp, 0xc
mov ebx, eax
mov eax, dword [esp]
test ebx, ebx
jne 0x949d08
mov eax, dword [esp + 0xc]
add eax, esi
push dword [ebp + 0x18]
push eax
push edi
mov eax, dword [esp + 0x14]
call dword [eax]
add esp, 0xc
mov ebx, eax
mov eax, dword [esp]
test ebx, ebx
jne 0x949d08
push dword [esp + 4]
push edi
mov eax, dword [esp + 0x18]
call dword [eax + 0xc203e8]
add esp, 8
mov ebx, eax
mov eax, dword [esp]
test ebx, ebx
jne 0x949d08
push dword [esp + 0x14]
push eax
push dword [esp + 0xc]
call fcn.0097f460
add esp, 0xc
xor ebx, ebx
test eax, eax
jne 0x949d05
mov eax, dword [ebp + 0x24]
mov dword [eax], 1
mov eax, dword [esp]
push eax
call fcn.004eb998
add esp, 4
push dword [esp + 0x18]
call fcn.004eb998
add esp, 4
push dword [esp + 4]
call fcn.004eb998
add esp, 4
push dword [esp + 0xc]
call fcn.004eb998
add esp, 4
mov ecx, dword [esp + 0x130]
xor ecx, ebp
call fcn.00980459
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret