Function at 0x78f760
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [0xbcbae0]
mov edx, fcn.007b2a20
xor ecx, ecx
not edx
and edx, 1
xor eax, esp
mov dword [esp + 0x1c], eax
mov dword [esp + 8], edx
mov eax, dword [esp + 8]
xor ebx, ebx
mov ebp, dword [ecx*4 + 0xb4d370]
mov edi, dword [ecx*4 + 0xb4d4b0]
mov dword [esp + 0x10], ecx
add eax, fcn.007b2a20
mov eax, 1
sete bl
xor ebx, 0x2bb3e261
add ebx, 0xa3c
xor ebx, dword [ecx*4 + 0xb4b3b0]
mov ecx, ebx
and cl, 7
movzx edx, cl
shl eax, cl
xor cl, 7
mov dword [esp], edx
mov edx, 1
shl edx, cl
movzx ecx, byte [ebp + edi - 1]
mov esi, dword [esp]
bt ecx, esi
jb 0x78f867
mov dword [esp + 4], eax
mov al, byte [ebp + edi - 1]
mov ecx, eax
or cl, dl
lock cmpxchg byte [ebp + edi - 1], cl
jne 0x78f7ea
mov ecx, dword [esp + 4]
movzx eax, al
test edx, eax
je 0x78f80c
movzx eax, byte [ebp + edi - 1]
test ecx, eax
je 0x78f801
jmp 0x78f867
movzx eax, byte [ebp + edi - 1]
test ecx, eax
jne 0x78f861
lea ecx, [edi - 4]
shr ecx, 2
je 0x78f859
xor eax, eax
mov esi, ebp
mov dword [esp + 0xc], ecx
mov ecx, esi
mov dword [esp + 0x14], esi
mov esi, dword [esi]
mov dword [esp], ebx
xor esi, ebx
mov dword [ecx], esi
mov ecx, eax
not esi
inc eax
shl dword [esp], cl
and cl, 0x1f
xor cl, 0x1f
shr ebx, cl
mov ecx, dword [esp + 0xc]
or ebx, dword [esp]
imul ebx, esi
mov esi, dword [esp + 0x14]
add esi, 4
cmp eax, ecx
jne 0x78f825
mov eax, dword [esp + 4]
or byte [ebp + edi - 1], al
not dl
and byte [ebp + edi - 1], dl
mov ecx, dword [esp + 0x10]
inc ecx
cmp ecx, 0x50
jne 0x78f782
lea eax, [esp + 0x18]
push eax
mov ebp, dword [esp + 0x38]
push dword [ebp + 8]
call dword [0xbabc34]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
xor esi, esi
cmp eax, 0xffffffff
mov dword [edx + 4], ecx
mov dword [edx], eax
jne 0x78fa56
call dword [0xbabc58]
test eax, eax
je 0x78fa56
mov esi, fcn.007c7b20
mov edi, eax
xor eax, eax
movzx edx, byte [0xbacfc3]
imul esi, esi
and esi, 3
cmp esi, 1
seta al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x78fa32
mov al, byte [0xbacfc3]
xor ecx, ecx
cmp esi, 1
mov ah, 1
seta cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ebx + ecx*2]
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbacfc3], ah
jne 0x78f8e4
mov ecx, fcn.007c7b20
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
mov ebx, edx
xor ebx, 1
lea edx, [ebx + edx*2]
or dl, 4
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x78f95c
xor eax, eax
cmp ecx, 1
movzx esi, byte [0xbacfc3]
seta al
mov edx, eax
xor edx, 1
lea eax, [edx + eax*2]
or al, 4
movzx eax, al
bt esi, eax
jae 0x78f936
jmp 0x78fa32
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbacfc3]
seta al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x78fa07
mov eax, fcn.007c7b20
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 0xd8076411
lea edx, [eax + ecx*2]
lea ecx, [eax + ecx*2 + 0x128c]
mov eax, dword [0xbacfb0]
or edx, 0x128d
xor eax, ecx
and cl, 7
mov dword [0xbacfb0], eax
not eax
imul edx, eax
mov eax, dword [0xbacfb4]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbacfb4], eax
or esi, edx
not eax
mov edx, dword [0xbacfb8]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbacfb8], edx
or esi, eax
not edx
mov al, 1
imul edx, esi
shl al, cl
xor dword [0xbacfbc], edx
or byte [0xbacfc3], al
mov eax, fcn.007c7b20
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 1
lea ecx, [eax + ecx*2]
mov al, 0xfe
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbacfc3], al
mov esi, 0x70a
mov dword [ebp + 0x14], edi
mov ecx, 0x70a
mov edx, edi
push 0x2e68
push dword [ebp + 0x1c]
push 0xbacfb0
call fcn.007911b0
add esp, 0xc
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret