Function at 0x7794f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x4c
mov eax, dword [0xbcbae0]
mov ecx, dword [esp + 0x64]
xor eax, esp
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], 0
call fcn.00794d00
test eax, eax
mov dword [esp], eax
jne 0x779524
mov esi, 0xc0a
jmp 0x77990b
mov eax, fcn.00778630
mov ecx, 3
xor esi, esi
sub ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x10]
xor eax, eax
mov edi, dword [esi*4 + 0xb4d370]
mov ebp, dword [esi*4 + 0xb4d4b0]
mov dword [esp + 0x18], esi
xor ecx, fcn.00778630
sete al
mov ecx, eax
not ecx
and ecx, 0x407
lea edx, [eax + ecx*2 - 0x12375420]
mov eax, 1
xor edx, dword [esi*4 + 0xb49660]
mov ecx, edx
and cl, 7
movzx ebx, cl
shl eax, cl
xor cl, 7
mov dword [esp + 4], ebx
mov ebx, 1
shl ebx, cl
movzx ecx, byte [edi + ebp - 1]
mov esi, dword [esp + 4]
bt ecx, esi
jb 0x779624
mov dword [esp + 8], eax
mov al, byte [edi + ebp - 1]
mov ecx, eax
or cl, bl
lock cmpxchg byte [edi + ebp - 1], cl
jne 0x7795a6
mov ecx, dword [esp + 8]
movzx eax, al
test ebx, eax
je 0x7795c8
movzx eax, byte [edi + ebp - 1]
test ecx, eax
je 0x7795bd
jmp 0x779624
mov dword [esp + 0xc], ebx
movzx eax, byte [edi + ebp - 1]
test ecx, eax
jne 0x77961a
lea ecx, [ebp - 4]
shr ecx, 2
je 0x779612
xor eax, eax
mov ebx, edi
mov dword [esp + 0x14], ecx
mov esi, dword [ebx]
mov ecx, eax
mov dword [esp + 4], edx
inc eax
shl dword [esp + 4], cl
and cl, 0x1f
xor cl, 0x1f
xor esi, edx
shr edx, cl
mov ecx, dword [esp + 0x14]
or edx, dword [esp + 4]
mov dword [ebx], esi
not esi
add ebx, 4
imul edx, esi
cmp eax, ecx
jne 0x7795e5
mov eax, dword [esp + 8]
or byte [edi + ebp - 1], al
mov eax, dword [esp + 0xc]
not al
and byte [edi + ebp - 1], al
mov esi, dword [esp + 0x18]
inc esi
cmp esi, 0x50
jne 0x779536
mov eax, dword [0xc1f184]
cmp eax, 2
je 0x779649
call fcn.007781a0
test eax, eax
je 0x7798c0
lea esi, [esp + 0x1c]
lea ebp, [esp + 0x40]
lea edi, [esp + 0x44]
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
push esi
push 0
push dword [esp + 8]
call dword [0xbabc28]
test eax, eax
jne 0x7796e9
mov ecx, ebp
mov edx, edi
call fcn.00791950
test eax, eax
jne 0x7796a5
mov ecx, dword [esp + 0x40]
mov edx, 0x378d
call fcn.00791ae0
mov eax, dword [esp + 0x44]
or eax, 1
cmp eax, 3
jne 0x779727
xor ebx, ebx
mov edi, 0xffffffff
jmp 0x7798cd
mov ebp, dword [esp + 0x68]
mov ebx, eax
test ebp, ebp
jne 0x77971a
cmp dword [esp + 0x38], 0
jne 0x77971a
cmp dword [esp + 0x3c], 0
jne 0x77971a
push dword [esp]
call fcn.00775660
add esp, 4
mov esi, dword [esp + 0x6c]
mov edi, 0xffffffff
jmp 0x7798ee
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x6c]
jmp 0x7798d5
mov eax, fcn.007fca40
mov edx, 3
movzx esi, byte [0xbad21f]
sub edx, eax
xor eax, eax
mov ecx, edx
xor ecx, fcn.007fca40
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt esi, eax
jb 0x77988f
mov al, byte [0xbad21f]
mov esi, edx
xor ecx, ecx
mov ah, 1
xor esi, fcn.007fca40
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 [0xbad21f], ah
jne 0x77975d
mov edx, fcn.007fca40
mov ecx, 3
movzx eax, al
sub ecx, edx
xor edx, edx
mov esi, ecx
xor esi, fcn.007fca40
sete dl
mov ebx, edx
xor ebx, 3
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x7797da
mov edx, ecx
xor eax, eax
movzx esi, byte [0xbad21f]
xor edx, fcn.007fca40
sete al
mov edx, eax
xor edx, 3
lea eax, [edx + eax*2]
bt esi, eax
jae 0x7797b4
jmp 0x77988f
xor eax, eax
xor ecx, fcn.007fca40
movzx edx, byte [0xbad21f]
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x779863
mov eax, fcn.007fca40
mov ecx, 3
mov esi, dword [0xbad210]
sub ecx, eax
xor eax, eax
xor ecx, fcn.007fca40
sete al
mov ecx, eax
xor ecx, 0xcf8dbffb
lea ecx, [ecx + eax*2]
xor esi, ecx
mov edx, ecx
mov dword [0xbad210], esi
shr edx, 0x1f
not esi
mov edi, dword [0xbad214]
or edx, ecx
and cl, 7
imul edx, esi
lea esi, [edx + edx]
xor edi, edx
shr edx, 0x1e
mov dword [0xbad214], edi
or esi, edx
not edi
mov dl, 1
imul edi, esi
shl dl, cl
xor dword [0xbad218], edi
or byte [0xbad21f], dl
mov eax, fcn.007fca40
mov ecx, 3
sub ecx, eax
xor eax, eax
xor ecx, fcn.007fca40
sete al
mov ecx, eax
xor ecx, 3
lea ecx, [ecx + eax*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbad21f], al
push dword [esp]
call fcn.00775660
add esp, 4
mov edx, dword [esp + 0x44]
mov esi, 0xd0a
mov ecx, 0xd0a
push 0x3791
push dword [esp + 0x68]
push 0xbad210
call fcn.007911b0
add esp, 0xc
jmp 0x77990b
xor ebx, ebx
push dword [esp]
call dword [0xbabc10]
mov edi, eax
mov esi, dword [esp + 0x6c]
mov ebp, dword [esp + 0x68]
push dword [esp]
call fcn.00775660
add esp, 4
cmp ebp, 2
je 0x7798ee
cmp ebp, 1
je 0x7798f8
test ebp, ebp
jne 0x779907
xor ebx, ebx
cmp edi, 0xffffffff
setne bl
jmp 0x779907
mov eax, edi
xor ebx, ebx
not eax
and eax, 1
cmp edi, 0xffffffff
cmovne ebx, eax
mov dword [esi], ebx
xor esi, esi
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret