Function at 0x7791a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [0xbcbae0]
mov ecx, dword [esp + 0x40]
xor eax, esp
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
call fcn.00794d00
test eax, eax
jne 0x7791d9
mov ebx, 0xc0a
jmp 0x7794d9
mov ecx, fcn.0079f3c0
xor esi, esi
mov dword [esp + 4], eax
and ecx, 1
inc ecx
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0xc]
xor eax, eax
mov ebp, dword [esi*4 + 0xb4d370]
mov edi, dword [esi*4 + 0xb4d4b0]
mov dword [esp + 0x14], esi
xor ecx, fcn.0079f3c0
sete al
mov ecx, eax
not ecx
and ecx, 0x405
lea edx, [eax + ecx*2 - 0x1ff54430]
mov eax, 1
xor edx, dword [esi*4 + 0xb49520]
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 [ebp + edi - 1]
mov esi, dword [esp]
bt ecx, esi
jb 0x7792d7
mov dword [esp + 8], eax
mov al, byte [ebp + edi - 1]
mov ecx, eax
or cl, bl
lock cmpxchg byte [ebp + edi - 1], cl
jne 0x77925a
mov ecx, dword [esp + 8]
movzx eax, al
test ebx, eax
je 0x77927c
movzx eax, byte [ebp + edi - 1]
test ecx, eax
je 0x779271
jmp 0x7792d7
movzx eax, byte [ebp + edi - 1]
test ecx, eax
jne 0x7792d1
lea ecx, [edi - 4]
shr ecx, 2
je 0x7792c9
xor eax, eax
mov esi, ebp
mov dword [esp + 0x10], ecx
mov ecx, esi
mov dword [esp + 0x18], esi
mov esi, dword [esi]
mov dword [esp], edx
xor esi, edx
mov dword [ecx], esi
mov ecx, eax
not esi
inc eax
shl dword [esp], cl
and cl, 0x1f
xor cl, 0x1f
shr edx, cl
mov ecx, dword [esp + 0x10]
or edx, dword [esp]
imul edx, esi
mov esi, dword [esp + 0x18]
add esi, 4
cmp eax, ecx
jne 0x779295
mov eax, dword [esp + 8]
or byte [ebp + edi - 1], al
not bl
and byte [ebp + edi - 1], bl
mov esi, dword [esp + 0x14]
inc esi
cmp esi, 0x50
jne 0x7791ec
mov eax, dword [0xc1f184]
cmp eax, 2
je 0x779327
call fcn.007781a0
test eax, eax
jne 0x779327
mov edi, dword [esp + 4]
lea ebx, [esp + 0x20]
lea ebp, [esp + 0x1c]
push edi
call dword [0xbabc10]
cmp eax, 0xffffffff
je 0x77933f
test al, 0x10
jne 0x77939c
push edi
call dword [0xbabb8c]
test eax, eax
je 0x77938b
xor ebx, ebx
jmp 0x779356
mov edi, dword [esp + 4]
lea ebx, [esp + 0x20]
lea ebp, [esp + 0x1c]
push edi
call dword [0xbabc1c]
cmp eax, 0xffffffff
jne 0x779369
call dword [0xbabc58]
mov dword [esp + 0x1c], eax
or eax, 1
mov ebx, 0x170a
cmp eax, 3
jne 0x77939c
mov ecx, dword [esp + 0x20]
mov edx, 0x375b
call fcn.00791ae0
jmp 0x7794d0
test al, 0x10
jne 0x77939c
push edi
call dword [0xbabb98]
test eax, eax
je 0x77937c
xor ebx, ebx
jmp 0x779356
mov ecx, ebx
mov edx, ebp
call fcn.00791950
test eax, eax
jne 0x779333
jmp 0x77939c
mov ecx, ebx
mov edx, ebp
call fcn.00791950
test eax, eax
jne 0x779304
mov edx, fcn.007d8be0
movzx ecx, byte [0xbad20f]
xor eax, eax
imul edx, edx
and edx, 3
cmp edx, 3
setne al
bt ecx, eax
jb 0x7794ac
mov al, byte [0xbad20f]
cmp edx, 3
mov ah, 1
setne cl
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbad20f], ah
jne 0x7793c4
mov ecx, fcn.007d8be0
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
setne dl
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x779415
movzx edx, byte [0xbad20f]
xor eax, eax
cmp ecx, 3
setne al
bt edx, eax
jae 0x7793fc
jmp 0x7794ac
movzx edx, byte [0xbad20f]
xor eax, eax
cmp ecx, 3
setne al
bt edx, eax
jb 0x77948e
mov eax, fcn.007d8be0
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
mov eax, dword [0xbad200]
sete cl
xor ecx, 0xdabca049
add ecx, 0xf08
xor eax, ecx
mov edx, ecx
mov dword [0xbad200], eax
shr edx, 0x1f
not eax
mov ebx, dword [0xbad204]
or edx, ecx
and cl, 7
imul edx, eax
lea esi, [edx + edx]
xor ebx, edx
shr edx, 0x1e
mov dword [0xbad204], ebx
or esi, edx
not ebx
mov dl, 1
imul ebx, esi
shl dl, cl
xor dword [0xbad208], ebx
or byte [0xbad20f], dl
mov eax, fcn.007d8be0
imul eax, eax
and eax, 3
cmp eax, 3
mov al, 0xfe
setne cl
xor cl, 7
rol al, cl
and byte [0xbad20f], al
mov edx, dword [esp + 0x1c]
mov ebx, 0xa0a
mov ecx, 0xa0a
push 0x3759
push dword [esp + 0x44]
push 0xbad200
call fcn.007911b0
add esp, 0xc
push edi
call fcn.00775660
add esp, 4
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00980459
mov eax, ebx
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret