Function at 0x77f500
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov ebx, edx
mov esi, ecx
call fcn.0077e900
test eax, eax
je 0x77f525
mov ecx, 0x4d29
call fcn.00774740
mov edi, 0x15
jmp 0x77f804
mov eax, dword [esi]
push dword [eax + 0xc]
call fcn.007748d0
add esp, 4
cmp dword [esi + 0x14], 0x2df20da3
jne 0x77f545
cmp dword [esi + 0x24], 0
js 0x77f783
mov edx, fcn.007f4190
movzx ecx, byte [0xbaf05f]
xor eax, eax
imul edx, edx
and edx, 3
cmp edx, 2
sete al
bt ecx, eax
jb 0x77f741
mov al, byte [0xbaf05f]
cmp edx, 2
mov ah, 1
sete cl
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbaf05f], ah
jne 0x77f56d
mov ecx, fcn.007f4190
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x77f5be
movzx edx, byte [0xbaf05f]
xor eax, eax
cmp ecx, 2
sete al
bt edx, eax
jae 0x77f5a5
jmp 0x77f741
movzx edx, byte [0xbaf05f]
xor eax, eax
cmp ecx, 2
sete al
bt edx, eax
jb 0x77f723
mov eax, fcn.007f4190
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
mov eax, dword [0xbaf030]
sete cl
or ecx, 0xf1ba6a90
add ecx, 0x898
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbaf030], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
mov eax, dword [0xbaf034]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbaf034], eax
or edi, edx
not eax
mov edx, dword [0xbaf038]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbaf038], edx
or edi, eax
not edx
mov eax, dword [0xbaf03c]
imul edx, edi
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbaf03c], eax
or edi, edx
not eax
mov edx, dword [0xbaf040]
imul eax, edi
mov edi, eax
shl edi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbaf040], edx
or eax, edi
not edx
mov ebx, dword [0xbaf044]
imul edx, eax
mov edi, edx
shl edi, 5
xor ebx, edx
shr edx, 0x1a
mov dword [0xbaf044], ebx
or edx, edi
not ebx
imul ebx, edx
mov edx, dword [0xbaf048]
mov edi, ebx
shl edi, 6
xor edx, ebx
shr ebx, 0x19
mov dword [0xbaf048], edx
or ebx, edi
not edx
mov ebp, dword [0xbaf04c]
imul edx, ebx
mov edi, edx
shl edi, 7
xor ebp, edx
shr edx, 0x18
mov dword [0xbaf04c], ebp
or edx, edi
not ebp
imul ebp, edx
mov edx, dword [0xbaf050]
mov edi, ebp
shl edi, 8
xor edx, ebp
shr ebp, 0x17
mov dword [0xbaf050], edx
or ebp, edi
not edx
mov ebx, dword [0xbaf054]
imul edx, ebp
mov edi, edx
shl edi, 9
xor ebx, edx
shr edx, 0x16
mov dword [0xbaf054], ebx
or edx, edi
not ebx
imul ebx, edx
mov dl, 1
xor dword [0xbaf058], ebx
shl dl, cl
or byte [0xbaf05f], dl
mov eax, fcn.007f4190
imul eax, eax
and eax, 3
cmp eax, 2
mov al, 0xfe
sete cl
xor cl, 7
rol al, cl
and byte [0xbaf05f], al
mov ecx, dword [esi]
mov edx, 0x15
mov edi, 0x15
call fcn.0077b7d0
mov eax, dword [esi]
push dword [eax + 0xc]
call fcn.007748e0
add esp, 4
push dword [esi + 0xc0]
push 0xbaf030
push 0x15
call fcn.00777b70
add esp, 0xc
mov ecx, 0x4d31
call fcn.00774740
jmp 0x77f804
test ebx, ebx
jle 0x77f78f
movsx eax, word [esi + 0x10]
cmp eax, ebx
jge 0x77f7af
mov ecx, dword [esi]
mov edx, 0x19
mov edi, 0x19
call fcn.0077b7d0
mov eax, dword [esi]
push dword [eax + 0xc]
call fcn.007748e0
add esp, 4
jmp 0x77f804
mov edi, dword [esi + 0x64]
dec ebx
lea ebp, [ebx + ebx*4]
lea ecx, [edi + ebp*8]
call fcn.0077d900
mov word [edi + ebp*8 + 8], 1
xor edi, edi
mov eax, dword [esi]
mov dword [eax + 0x40], 0
mov eax, dword [esi + 0xd4]
test eax, eax
je 0x77f804
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp ebx, 0x1e
mov ebx, 0x80000000
cmovle ebx, edx
test eax, ebx
je 0x77f804
mov eax, dword [esi + 0x98]
and eax, 0xfffffffc
or eax, 1
mov dword [esi + 0x98], eax
mov eax, edi
pop esi
pop edi
pop ebx
pop ebp
ret