Function at 0x6fa9e620
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
cmp dword [ebx + 0x240], 0x10
ja 0x6fa9e694
mov eax, dword [ebx + 0x234]
mov dword [esp], eax
call fcn.6fa1c580
test eax, eax
mov ebp, eax
jne 0x6fa9e699
mov edi, dword [ebx + 0x254]
mov esi, dword [ebx + 0x250]
mov eax, dword [ebx + 0x240]
shrd esi, edi, 3
cdq
shr edi, 3
add eax, esi
mov esi, dword [esp + 0x58]
adc edx, edi
xor edi, edi
add eax, esi
adc edx, edi
cmp edx, 0xf
ja 0x6fa9e694
jb 0x6fa9e67c
cmp eax, 0xffffffdf
ja 0x6fa9e694
mov eax, dword [ebx + 0x23c]
test eax, eax
je 0x6fa9e6a3
cmp eax, 1
je 0x6fa9e6d0
cmp eax, 2
je 0x6fa9e750
mov ebp, 0x10
add esp, 0x3c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.6fa9e2e0
test eax, eax
jne 0x6fa9e749
mov eax, dword [ebx + 0x23c]
jmp 0x6fa9e686
mov eax, dword [ebx + 0x240]
test eax, eax
je 0x6fa9e706
mov edi, eax
sar edi, 0x1f
mov edx, edi
shld edx, eax, 3
shl eax, 3
add dword [ebx + 0x248], eax
lea eax, [ebx + 0x1f4]
adc dword [ebx + 0x24c], edx
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6fa16190
lea eax, [ebx + 0x213]
lea ecx, [ebx + 0x20f]
movzx edi, byte [eax]
lea edx, [edi + 1]
test dl, dl
mov byte [eax], dl
jne 0x6fa9e725
sub eax, 1
cmp eax, ecx
jne 0x6fa9e712
lea eax, [ebx + 0x224]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebx + 0x204]
mov dword [esp], eax
call fcn.6fa14240
test eax, eax
je 0x6fa9e800
mov ebp, eax
jmp 0x6fa9e699
mov edi, dword [ebx + 0x240]
mov dword [esp + 0x14], 0
test edi, edi
je 0x6fa9e814
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x58], eax
jbe 0x6fa9e699
lea edx, [ebx + 0x1f4]
mov ecx, dword [esp + 0x54]
add ecx, dword [esp + 0x58]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x14], edx
lea edx, [ebx + 0x20f]
mov dword [esp + 0x1c], ebp
mov eax, dword [ebx + 0x240]
add edi, esi
mov dword [esp + 0x18], edx
add esi, dword [esp + 0x5c]
mov ebp, ecx
jmp 0x6fa9e7da
xor al, byte [edi]
mov ecx, eax
mov byte [esi], al
mov edx, dword [ebx + 0x240]
add edi, 1
add esi, 1
lea eax, [edx + 1]
mov dword [ebx + 0x240], eax
xor byte [ebx + edx + 0x1f4], cl
cmp ebp, edi
je 0x6fa9e990
cmp eax, 0x10
je 0x6fa9e920
mov edx, dword [esp + 0x60]
movzx eax, byte [ebx + eax + 0x224]
test edx, edx
je 0x6fa9e7b0
movzx ecx, byte [esi]
xor eax, ecx
mov byte [edi], al
jmp 0x6fa9e7b6
mov dword [ebx + 0x240], 0
mov dword [ebx + 0x23c], 2
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x60]
and eax, 0xfffffff0
test esi, esi
mov dword [esp + 0x1c], eax
je 0x6fa9e9a0
test eax, eax
je 0x6fa9ea82
lea eax, [ebx + 0x1f4]
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
lea eax, [ebx + 0x224]
mov dword [esp + 0x24], eax
lea eax, [ebx + 0x204]
mov dword [esp + 0x28], eax
lea eax, [ebx + 0x213]
mov dword [esp + 0x20], eax
lea eax, [ebx + 0x20f]
mov ebp, eax
mov esi, esi
lea edi, [edi]
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, dword [esi + eax]
xor dword [edx], ecx
add edx, 4
mov ecx, dword [esi + eax]
xor ecx, dword [edx + 0x2c]
mov dword [edi + eax], ecx
add eax, 4
cmp eax, 0x10
jne 0x6fa9e886
add dword [ebx + 0x250], 0x80
mov eax, dword [esp + 0x18]
adc dword [ebx + 0x254], 0
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6fa16190
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax]
lea edx, [ecx + 1]
test dl, dl
mov byte [eax], dl
jne 0x6fa9e8d7
sub eax, 1
cmp eax, ebp
jne 0x6fa9e8c4
mov eax, dword [esp + 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.6fa14240
test eax, eax
jne 0x6fa9e749
add dword [esp + 0x14], 0x10
add esi, 0x10
add edi, 0x10
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jb 0x6fa9e880
mov ebp, dword [esp + 0x2c]
jmp 0x6fa9e766
add dword [ebx + 0x250], 0x80
mov eax, dword [esp + 0x14]
adc dword [ebx + 0x254], 0
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6fa16190
mov ecx, dword [esp + 0x18]
lea eax, [ebx + 0x213]
add byte [eax], 1
jne 0x6fa9e957
sub eax, 1
cmp ecx, eax
jne 0x6fa9e94b
lea eax, [ebx + 0x224]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebx + 0x204]
mov dword [esp], eax
call fcn.6fa14240
test eax, eax
jne 0x6fa9e749
mov dword [ebx + 0x240], 0
jmp 0x6fa9e7e3
mov ebp, dword [esp + 0x1c]
jmp 0x6fa9e699
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x6fa9ea82
lea eax, [ebx + 0x1f4]
mov edi, dword [esp + 0x54]
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
lea eax, [ebx + 0x224]
mov dword [esp + 0x24], eax
lea eax, [ebx + 0x204]
mov dword [esp + 0x28], eax
lea eax, [ebx + 0x213]
mov dword [esp + 0x20], eax
lea eax, [ebx + 0x20f]
mov ebp, eax
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, dword [edi + eax]
xor ecx, dword [edx + 0x30]
mov dword [esi + eax], ecx
add eax, 4
xor dword [edx], ecx
add edx, 4
cmp eax, 0x10
jne 0x6fa9e9f6
add dword [ebx + 0x250], 0x80
adc dword [ebx + 0x254], 0
mov eax, dword [esp + 0x18]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6fa16190
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax]
lea edx, [ecx + 1]
test dl, dl
mov byte [eax], dl
jne 0x6fa9ea44
sub eax, 1
cmp ebp, eax
jne 0x6fa9ea31
mov eax, dword [esp + 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.6fa14240
test eax, eax
jne 0x6fa9e749
add dword [esp + 0x14], 0x10
add edi, 0x10
add esi, 0x10
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jb 0x6fa9e9f0
jmp 0x6fa9e910
mov dword [esp + 0x14], 0
jmp 0x6fa9e766