Function at 0x846c90
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov dword [esp + 4], ecx
mov eax, dword [0xbd33e0]
xor eax, esp
mov dword [esp + 0xc], eax
cmp dword [0xc26ccc], 0
je 0x846f4d
mov eax, fcn.00817600
mov esi, 1
xor ebx, ebx
imul eax, eax
and eax, 3
mov dword [esp], eax
mov ecx, 2
call fcn.00780a40
mov edi, eax
push eax
call fcn.007801d0
add esp, 4
cmp ebx, dword [0xc26ccc]
jb 0x846cfb
push edi
call fcn.007801e0
add esp, 4
mov dword [esp + 8], 0
jmp 0x846f36
mov eax, dword [0xc26cd0]
mov ebp, dword [eax + ebx*4]
push edi
call fcn.007801e0
add esp, 4
test ebp, ebp
mov dword [esp + 8], 0
je 0x846f38
push 0xb4d2a4
lea eax, [esp + 0xc]
push eax
push dword [esp + 0xc]
call ebp
add esp, 0xc
test eax, eax
je 0x846f38
mov esi, dword [esp]
mov edx, eax
movzx ecx, byte [0xbbdfbb]
cmp esi, 3
sete al
or al, 4
add al, 4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x846f20
mov al, byte [0xbbdfbb]
cmp esi, 3
mov ah, 1
sete cl
or cl, 4
add cl, 4
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbbdfbb], ah
jne 0x846d60
cmp esi, 3
movzx eax, al
sete cl
or cl, 4
add cl, 4
and cl, 7
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x846dbf
cmp esi, 3
movzx ecx, byte [0xbbdfbb]
sete al
or al, 4
add al, 4
and al, 7
movzx eax, al
bt ecx, eax
jae 0x846d9f
jmp 0x846f20
cmp esi, 3
movzx ecx, byte [0xbbdfbb]
sete al
or al, 4
add al, 4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x846f04
xor ecx, ecx
cmp esi, 3
mov eax, dword [0xbbdf90]
sete cl
or ecx, 0xb587a4f4
add ecx, 0x604
xor eax, ecx
mov esi, ecx
mov dword [0xbbdf90], eax
shr esi, 0x1f
not eax
mov ebp, dword [0xbbdf94]
or esi, ecx
and cl, 7
imul esi, eax
mov eax, esi
lea edi, [esi + esi]
shr eax, 0x1e
xor ebp, esi
or edi, eax
mov dword [0xbbdf94], ebp
not ebp
mov eax, dword [0xbbdf98]
imul ebp, edi
lea esi, [ebp*4]
xor eax, ebp
shr ebp, 0x1d
mov dword [0xbbdf98], eax
or esi, ebp
not eax
imul eax, esi
mov esi, dword [0xbbdf9c]
lea edi, [eax*8]
xor esi, eax
shr eax, 0x1c
mov dword [0xbbdf9c], esi
or edi, eax
not esi
mov eax, dword [0xbbdfa0]
imul esi, edi
mov edi, esi
shl edi, 4
xor eax, esi
shr esi, 0x1b
mov dword [0xbbdfa0], eax
or esi, edi
not eax
imul eax, esi
mov esi, dword [0xbbdfa4]
mov edi, eax
shl edi, 5
xor esi, eax
shr eax, 0x1a
mov dword [0xbbdfa4], esi
or eax, edi
not esi
imul esi, eax
mov eax, dword [0xbbdfa8]
mov edi, esi
shl edi, 6
xor eax, esi
shr esi, 0x19
mov dword [0xbbdfa8], eax
or esi, edi
not eax
imul eax, esi
mov esi, dword [0xbbdfac]
mov edi, eax
shl edi, 7
xor esi, eax
shr eax, 0x18
mov dword [0xbbdfac], esi
or eax, edi
not esi
imul esi, eax
mov eax, dword [0xbbdfb0]
mov edi, esi
shl edi, 8
xor eax, esi
shr esi, 0x17
mov dword [0xbbdfb0], eax
or esi, edi
not eax
imul eax, esi
mov esi, dword [esp]
xor dword [0xbbdfb4], eax
mov ah, 1
shl ah, cl
or byte [0xbbdfbb], ah
cmp esi, 3
mov al, 0xfe
sete cl
or cl, 4
add cl, 4
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbbdfbb], al
push dword [esp + 8]
push 0xbbdf90
push edx
push dword [esp + 0x10]
call fcn.00787000
add esp, 0x10
xor esi, esi
push dword [esp + 8]
call fcn.00780f60
add esp, 4
inc ebx
test esi, esi
jne 0x846cc8
mov ecx, dword [esp + 0xc]
xor ecx, esp
call fcn.00989fe9
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret