Function at 0x799ad0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, fcn.00833e10
xor esi, esi
not eax
and eax, 1
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
xor eax, eax
mov edi, dword [esi*4 + 0xb559d0]
mov ebp, dword [esi*4 + 0xb55b10]
mov dword [esp + 0x14], esi
add ecx, fcn.00833e10
sete al
mov ecx, eax
xor ecx, 0x1cfd9fdf
lea edx, [ecx + eax*2 + 0x40]
mov eax, 1
xor edx, dword [esi*4 + 0xb533d0]
mov ecx, edx
and cl, 7
movzx ebx, cl
shl eax, cl
xor cl, 7
mov dword [esp], ebx
mov ebx, 1
shl ebx, cl
movzx ecx, byte [edi + ebp - 1]
mov esi, dword [esp]
bt ecx, esi
jb 0x799bcb
mov dword [esp + 4], eax
mov al, byte [edi + ebp - 1]
mov ecx, eax
or cl, bl
lock cmpxchg byte [edi + ebp - 1], cl
jne 0x799b50
mov ecx, dword [esp + 4]
movzx eax, al
test ebx, eax
je 0x799b72
movzx eax, byte [edi + ebp - 1]
test ecx, eax
je 0x799b67
jmp 0x799bcb
mov dword [esp + 8], ebx
movzx eax, byte [edi + ebp - 1]
test ecx, eax
jne 0x799bc1
lea ecx, [ebp - 4]
shr ecx, 2
je 0x799bb9
xor eax, eax
mov ebx, edi
mov dword [esp + 0x10], ecx
mov esi, dword [ebx]
mov ecx, eax
mov dword [esp], edx
inc eax
shl dword [esp], cl
and cl, 0x1f
xor cl, 0x1f
xor esi, edx
shr edx, cl
mov ecx, dword [esp + 0x10]
or edx, dword [esp]
mov dword [ebx], esi
not esi
add ebx, 4
imul edx, esi
cmp eax, ecx
jne 0x799b8f
mov eax, dword [esp + 4]
or byte [edi + ebp - 1], al
mov eax, dword [esp + 8]
not al
and byte [edi + ebp - 1], al
mov esi, dword [esp + 0x14]
inc esi
cmp esi, 0x50
jne 0x799ae7
mov edi, dword [esp + 0x2c]
mov ecx, edi
call fcn.0079c5f0
push dword [edi + 8]
call dword [0xbb34a4]
test eax, eax
jne 0x799c10
xor esi, esi
inc esi
cmp esi, 2
ja 0x799c1e
push 0x64
call fcn.00783970
add esp, 4
push dword [edi + 8]
call dword [0xbb34a4]
test eax, eax
je 0x799bf3
mov dword [edi + 8], 0
xor esi, esi
jmp 0x799d97
mov edx, 0x7837c0
movzx ecx, byte [0xbb4737]
and edx, 1
inc edx
mov eax, edx
xor eax, 0x7837c0
sete al
xor al, 5
add al, 4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x799d6f
mov al, byte [0xbb4737]
mov ecx, edx
mov ah, 1
xor ecx, 0x7837c0
sete cl
xor cl, 5
add cl, 4
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb4737], ah
jne 0x799c4f
mov ecx, 0x7837c0
movzx eax, al
and ecx, 1
inc ecx
mov edx, ecx
xor edx, 0x7837c0
sete dl
xor dl, 5
add dl, 4
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x799cc5
mov eax, ecx
movzx edx, byte [0xbb4737]
xor eax, 0x7837c0
sete al
xor al, 5
add al, 4
and al, 7
movzx eax, al
bt edx, eax
jae 0x799ca1
jmp 0x799d6f
xor ecx, 0x7837c0
movzx ecx, byte [0xbb4737]
sete al
xor al, 5
add al, 4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x799d48
mov eax, 0x7837c0
xor ecx, ecx
and eax, 1
inc eax
xor eax, 0x7837c0
mov eax, dword [0xbb4728]
sete cl
xor ecx, 0x4ad914b5
add ecx, 0x404
xor eax, ecx
mov edx, ecx
mov dword [0xbb4728], eax
shr edx, 0x1f
not eax
mov ebx, dword [0xbb472c]
or edx, ecx
and cl, 7
imul edx, eax
lea esi, [edx + edx]
xor ebx, edx
shr edx, 0x1e
mov dword [0xbb472c], ebx
or esi, edx
not ebx
mov dl, 1
imul ebx, esi
shl dl, cl
xor dword [0xbb4730], ebx
or byte [0xbb4737], dl
mov eax, 0x7837c0
and eax, 1
inc eax
xor eax, 0x7837c0
mov al, 0xfe
sete cl
xor cl, 5
add cl, 4
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb4737], al
mov edi, dword [edi + 0x1c]
call dword [0xbb35b8]
mov esi, 0x100a
mov ecx, 0x100a
mov edx, eax
push 0x2cd4
push edi
push 0xbb4728
call fcn.0079cac0
add esp, 0xc
mov eax, esi
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret