Function at 0x7bea90
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x120
mov dword [esp], edx
mov ebx, dword [esp + 0x138]
mov ebp, dword [esp + 0x13c]
mov esi, ecx
mov eax, dword [0xbcbae0]
xor eax, esp
mov dword [esp + 0x11c], eax
mov dword [esp + 4], 0
lea eax, [esp + 8]
push 0x94
push 0
push eax
call fcn.00980a60
add esp, 0xc
xor eax, eax
test bl, 1
lea edi, [esp + 0xc4]
mov ecx, 0x16
rep stosd dword es:[edi], eax
mov dword [esp + 0xe4], ebp
je 0x7beb07
mov byte [esp + 0x20], 1
inc dword [esi + 0x118]
mov word [esi + 0x11c], 0
mov eax, dword [esp + 0x138]
shr al, 2
and al, 1
mov byte [esp + 0x21], al
cmp byte [esi + 0x59], 0
jne 0x7beb4b
mov eax, dword [esi + 0x14]
test eax, eax
jle 0x7beb4b
xor ebp, ebp
mov ecx, dword [esi + 0x10]
mov ebx, ebp
shl ebx, 4
mov ecx, dword [ecx + ebx + 4]
test ecx, ecx
je 0x7beb46
call fcn.007bf540
test eax, eax
jne 0x7bebce
mov eax, dword [esi + 0x14]
inc ebp
cmp ebp, eax
jl 0x7beb26
mov ebp, dword [esp + 0x134]
mov ecx, esi
call fcn.007bf570
mov ebx, dword [esp]
test ebp, ebp
mov dword [esp + 8], esi
js 0x7befb8
je 0x7beb75
cmp byte [ebx + ebp - 1], 0
je 0x7befb8
cmp dword [esi + 0x70], ebp
jl 0x7bedee
mov eax, ebp
mov ecx, esi
mov edx, ebx
sar eax, 0x1f
push eax
push ebp
call fcn.007bf5a0
add esp, 8
test eax, eax
je 0x7bede0
mov edi, eax
lea eax, [esp + 4]
lea ecx, [esp + 8]
mov edx, edi
push eax
call fcn.007868a0
add esp, 4
mov eax, dword [esp + 0xe8]
mov ecx, esi
mov edx, edi
sub eax, edi
add eax, ebx
mov dword [esp + 0xe8], eax
call fcn.00774f10
jmp 0x7befcb
mov ebp, fcn.00775860
mov edi, eax
xor eax, eax
movzx edx, byte [0xbae763]
imul ebp, ebp
and ebp, 3
cmp ebp, 3
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x7bedc6
mov al, byte [0xbae763]
xor edx, edx
cmp ebp, 3
sete dl
mov ecx, edx
not ecx
lea ecx, [edx + ecx*2 + 4]
mov dl, 1
and cl, 7
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbae763], dl
jne 0x7bec05
mov ecx, fcn.00775860
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebp, edx
not edx
lea edx, [ebp + edx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x7bec7d
xor eax, eax
cmp ecx, 3
movzx ebp, byte [0xbae763]
sete al
mov edx, eax
not edx
lea eax, [eax + edx*2 + 4]
and al, 7
movzx eax, al
bt ebp, eax
jae 0x7bec57
jmp 0x7bedc6
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbae763]
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x7bed9b
mov ecx, fcn.00775860
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete al
mov ecx, eax
not ecx
and ecx, 0x14b
lea ecx, [eax + ecx*2 + 0x51678e34]
mov eax, dword [0xbae740]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbae740], eax
not eax
imul edx, eax
mov eax, dword [0xbae744]
lea ebp, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbae744], eax
or edx, ebp
not eax
imul eax, edx
mov edx, dword [0xbae748]
lea ebp, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbae748], edx
or eax, ebp
not edx
imul edx, eax
mov eax, dword [0xbae74c]
lea ebp, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbae74c], eax
or edx, ebp
not eax
imul eax, edx
mov edx, dword [0xbae750]
mov ebp, eax
shl ebp, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbae750], edx
or eax, ebp
not edx
imul edx, eax
mov eax, dword [0xbae754]
mov ebp, edx
shl ebp, 5
xor eax, edx
shr edx, 0x1a
mov dword [0xbae754], eax
or edx, ebp
not eax
imul eax, edx
mov edx, dword [0xbae758]
mov ebp, eax
shl ebp, 6
xor edx, eax
shr eax, 0x19
mov dword [0xbae758], edx
or eax, ebp
not edx
imul edx, eax
xor dword [0xbae75c], edx
mov dl, 1
shl dl, cl
or byte [0xbae763], dl
mov eax, fcn.00775860
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
not eax
lea ecx, [ecx + eax*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbae763], al
mov eax, dword [esi + 0x10]
push dword [eax + ebx]
push 0xbae740
push edi
push esi
call fcn.0077b710
add esp, 0x10
jmp 0x7bf1e0
add ebp, ebx
mov dword [esp + 0xe8], ebp
jmp 0x7befcb
mov edx, 0x778860
xor eax, eax
movzx edi, byte [0xbae787]
imul edx, edx
and edx, 3
cmp edx, 1
seta al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edi, eax
jb 0x7bef95
mov al, byte [0xbae787]
xor ecx, ecx
cmp edx, 1
mov ah, 1
seta cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2 + 6]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbae787], ah
jne 0x7bee24
mov ecx, 0x778860
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, [edx + ebx*2 + 6]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x7bee9f
xor eax, eax
cmp ecx, 1
movzx edi, byte [0xbae787]
seta al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2 + 6]
and al, 7
movzx eax, al
bt edi, eax
jae 0x7bee78
jmp 0x7bef95
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbae787]
seta al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jb 0x7bef69
mov ecx, 0x778860
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta al
mov ecx, eax
not ecx
and ecx, 0x951
lea ecx, [eax + ecx*2 + 0x560290ae]
mov eax, dword [0xbae770]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbae770], eax
not eax
imul edx, eax
mov eax, dword [0xbae774]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbae774], eax
or edi, edx
not eax
mov edx, dword [0xbae778]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbae778], edx
or edi, eax
not edx
mov eax, dword [0xbae77c]
imul edx, edi
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbae77c], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
shl dl, cl
xor dword [0xbae780], eax
or byte [0xbae787], dl
mov eax, 0x778860
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 1
lea ecx, [ecx + eax*2 + 6]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbae787], al
push 0xbae770
push 0x12
push esi
call fcn.0077b710
add esp, 0xc
mov ecx, esi
mov edx, 0x12
call fcn.0077d5b0
mov edi, eax
jmp 0x7bf1e0
lea eax, [esp + 4]
lea ecx, [esp + 8]
mov edx, ebx
push eax
call fcn.007868a0
add esp, 4
cmp dword [esp + 0x14], 0x65
jne 0x7befda
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x144]
cmp byte [esp + 0x19], 0
je 0x7beff1
lea ecx, [esp + 8]
call fcn.007bf5f0
test edi, edi
je 0x7beffe
mov eax, dword [esp + 0xe8]
mov dword [edi], eax
cmp byte [esi + 0xa5], 0
jne 0x7bf02a
mov edx, dword [esp + 0x138]
mov eax, dword [esp + 0xe8]
mov ecx, dword [esp + 0x10]
movzx edi, dl
sub eax, ebx
mov edx, ebx
push edi
push eax
call fcn.007bf6e0
add esp, 8
cmp byte [esi + 0x51], 0
je 0x7bf043
mov dword [esp + 0x14], 7
mov edi, 7
mov ecx, dword [esp + 0x10]
jmp 0x7bf04f
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
test edi, edi
je 0x7bf05a
test ecx, ecx
je 0x7bf065
call fcn.0077d580
jmp 0x7bf065
mov eax, dword [esp + 0x140]
xor edi, edi
mov dword [eax], ecx
mov ebp, dword [esp + 4]
test ebp, ebp
je 0x7bf1b9
mov edx, fcn.00792e10
xor eax, eax
movzx ebx, byte [0xbae78f]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
or al, 4
movzx eax, al
bt ebx, eax
jb 0x7bf1a3
mov al, byte [0xbae78f]
xor ebx, ebx
cmp edx, 3
mov ah, 1
sete bl
mov ecx, ebx
xor ecx, 1
lea ebx, [ebx + ecx*2]
mov cl, 7
or bl, 4
sub cl, bl
shl ah, cl
or ah, al
lock cmpxchg byte [0xbae78f], ah
jne 0x7bf0a6
mov ecx, fcn.00792e10
xor edx, edx
mov ah, 7
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2]
or dl, 4
sub ah, dl
movzx edx, ah
movzx eax, al
bt eax, edx
jae 0x7bf120
xor eax, eax
cmp ecx, 3
movzx ebx, byte [0xbae78f]
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2]
or al, 4
movzx eax, al
bt ebx, eax
jae 0x7bf0fa
jmp 0x7bf1a3
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbae78f]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x7bf178
mov ecx, fcn.00792e10
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete al
mov ecx, eax
not ecx
and ecx, 0x211
lea ecx, [eax + ecx*2 - 0x5e62a3b4]
mov al, 1
xor dword [0xbae788], ecx
and cl, 7
shl al, cl
or byte [0xbae78f], al
mov eax, fcn.00792e10
xor ecx, ecx
mov dl, 0xfe
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
xor eax, 1
lea eax, [ecx + eax*2]
mov cl, 7
or al, 4
sub cl, al
rol dl, cl
and byte [0xbae78f], dl
push ebp
push 0xbae788
push edi
push esi
call fcn.0077b710
add esp, 0x10
mov ecx, esi
mov edx, ebp
jmp 0x7bf1d0
mov ecx, esi
mov edx, edi
call fcn.0077b7d0
jmp 0x7bf1d5
mov eax, dword [edx + 4]
mov ecx, esi
mov dword [esp + 0x10c], eax
call fcn.00774f10
mov edx, dword [esp + 0x10c]
test edx, edx
jne 0x7bf1c4
lea ecx, [esp + 8]
call fcn.00783660
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.00980459
mov eax, edi
add esp, 0x120
pop esi
pop edi
pop ebx
pop ebp
ret