Function at 0x7e7eb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov edi, ecx
mov ecx, dword [ecx]
mov esi, edx
cmp byte [ecx + 0x51], 0
jne 0x7e816a
mov ebx, dword [esp + 0x2c]
mov dword [esp], ecx
mov ecx, edi
call fcn.007c5c50
mov ecx, dword [esp]
test eax, eax
jne 0x7e816a
mov dword [esp + 0x10], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov eax, dword [esi + 0xc]
mov esi, dword [ecx + 0x14]
test esi, esi
mov dword [esp + 0xc], eax
jle 0x7e7f5a
mov eax, dword [esp + 4]
xor edi, edi
mov eax, dword [eax + 0x10]
mov dword [esp + 0x14], eax
xor ebx, ebx
cmp edi, 2
mov ebp, dword [ecx + 0x10]
setb bl
xor ebx, edi
cmp dword [esp + 0xc], 0
je 0x7e7f34
mov eax, ebx
mov edx, dword [esp + 0xc]
shl eax, 4
mov ecx, dword [ebp + eax]
call fcn.00777e20
mov ecx, dword [esp]
test eax, eax
jne 0x7e7f55
shl ebx, 4
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + ebx + 0xc]
add ecx, 0x28
call fcn.007bf720
test eax, eax
jne 0x7e8158
mov ecx, dword [esp]
mov esi, dword [ecx + 0x14]
inc edi
cmp edi, esi
jl 0x7e7f07
cmp dword [esp + 0x10], 0
jne 0x7e813c
mov edx, 0x785a00
mov esi, 0x785a00
xor eax, eax
movzx edi, byte [0xbb385b]
or edx, 2
xor esi, 2
mov ecx, edx
add ecx, esi
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edi, eax
jb 0x7e811d
mov al, byte [0xbb385b]
mov edi, edx
xor ecx, ecx
mov ah, 1
add edi, esi
sete cl
mov ebx, ecx
xor ebx, 3
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb385b], ah
jne 0x7e7f9b
mov ecx, 0x785a00
mov edx, 0x785a00
xor ebx, ebx
movzx eax, al
or ecx, 2
xor edx, 2
mov esi, ecx
add esi, edx
sete bl
mov esi, ebx
xor ebx, 3
lea ebx, [ebx + esi*2]
xor bl, 7
movzx esi, bl
bt eax, esi
jae 0x7e8010
mov esi, ecx
xor eax, eax
add esi, edx
movzx esi, byte [0xbb385b]
sete al
mov ebx, eax
xor ebx, 3
lea eax, [ebx + eax*2]
bt esi, eax
jae 0x7e7fee
jmp 0x7e811d
xor eax, eax
add ecx, edx
movzx edx, byte [0xbb385b]
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x7e80f1
mov eax, 0x785a00
mov ecx, 0x785a00
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
xor eax, 0xd85a4043
lea ecx, [eax + edx*2 + 0x1000]
mov eax, dword [0xbb3840]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb3840], eax
not eax
imul edx, eax
mov eax, dword [0xbb3844]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb3844], eax
or esi, edx
not eax
mov edx, dword [0xbb3848]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb3848], edx
or esi, eax
not edx
mov eax, dword [0xbb384c]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb384c], eax
or esi, edx
not eax
mov edx, dword [0xbb3850]
imul eax, esi
mov esi, eax
shl esi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb3850], edx
or eax, esi
not edx
imul edx, eax
xor dword [0xbb3854], edx
mov dl, 1
shl dl, cl
or byte [0xbb385b], dl
mov eax, 0x785a00
mov ecx, 0x785a00
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
xor eax, 3
lea ecx, [eax + edx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb385b], al
push 0
mov esi, dword [esp + 8]
push esi
push 0xbb3840
mov edi, dword [esp + 0x14]
push edi
call fcn.00782570
add esp, 0x10
mov byte [edi + 0x11], 1
jmp 0x7e8167
mov esi, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, esi
call fcn.008055d0
mov byte [esi + 0x11], 1
mov ecx, dword [esp]
mov esi, dword [esp + 4]
jmp 0x7e816a
mov ecx, dword [esp + 8]
mov edx, eax
call fcn.00806650
mov esi, dword [esp + 4]
mov ecx, dword [esp]
mov edx, esi
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.007c0320