Function at 0x784260
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
test ecx, ecx
jne 0x7843cc
mov edx, 0x824bf0
xor eax, eax
movzx esi, byte [0xbafd77]
not edx
and edx, 1
mov ecx, edx
add ecx, 0x824bf0
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt esi, eax
jb 0x7843bb
mov al, byte [0xbafd77]
mov esi, edx
xor ecx, ecx
mov ah, 1
add esi, 0x824bf0
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2 + 2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbafd77], ah
jne 0x7842a0
mov ecx, 0x824bf0
xor edx, edx
movzx eax, al
not ecx
and ecx, 1
mov esi, ecx
add esi, 0x824bf0
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2 + 2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x78431e
mov edx, ecx
xor eax, eax
movzx esi, byte [0xbafd77]
add edx, 0x824bf0
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2 + 2]
bt esi, eax
jae 0x7842f7
jmp 0x7843bb
xor eax, eax
add ecx, 0x824bf0
movzx edx, byte [0xbafd77]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x784391
mov ecx, 0x824bf0
xor eax, eax
mov esi, dword [0xbafd6c]
not ecx
and ecx, 1
add ecx, 0x824bf0
sete al
mov ecx, eax
not ecx
and ecx, 0x111
lea ecx, [eax + ecx*2 - 0x250c5396]
mov edx, ecx
xor esi, ecx
shr edx, 0x1f
mov dword [0xbafd6c], esi
not esi
or edx, ecx
and cl, 7
imul edx, esi
xor dword [0xbafd70], edx
mov dl, 1
shl dl, cl
or byte [0xbafd77], dl
mov eax, 0x824bf0
xor ecx, ecx
not eax
and eax, 1
add eax, 0x824bf0
sete cl
mov eax, ecx
xor eax, 1
lea ecx, [ecx + eax*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbafd77], al
mov ecx, 0xbafd6c
call fcn.007c7b20
xor esi, esi
jmp 0x784535
cmp dword [ecx + 0x60], 0xa029a697
mov esi, 1
je 0x784535
call fcn.0078a030
xor esi, esi
test eax, eax
je 0x784535
mov edx, fcn.00804340
mov eax, fcn.00804340
movzx ecx, byte [0xbafd87]
and edx, 1
xor edx, eax
cmp edx, 0xffffffff
sete al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x78452b
mov al, byte [0xbafd87]
cmp edx, 0xffffffff
mov ah, 1
sete cl
not cl
and cl, 3
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbafd87], ah
jne 0x78441e
mov ecx, fcn.00804340
mov edx, fcn.00804340
movzx eax, al
and ecx, 1
xor ecx, edx
cmp ecx, 0xffffffff
sete dl
not dl
and dl, 3
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x784482
cmp ecx, 0xffffffff
movzx edx, byte [0xbafd87]
sete al
not al
and al, 3
movzx eax, al
bt edx, eax
jae 0x784464
jmp 0x78452b
cmp ecx, 0xffffffff
movzx ecx, byte [0xbafd87]
sete al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x784504
mov edx, fcn.00804340
mov eax, fcn.00804340
xor ecx, ecx
and edx, 1
xor edx, eax
mov eax, dword [0xbafd78]
cmp edx, 0xffffffff
sete cl
xor ecx, 0x4497790b
add ecx, 0x8a0
xor eax, ecx
mov edx, ecx
mov dword [0xbafd78], eax
shr edx, 0x1f
not eax
mov ebx, dword [0xbafd7c]
or edx, ecx
and cl, 7
imul edx, eax
lea edi, [edx + edx]
xor ebx, edx
shr edx, 0x1e
mov dword [0xbafd7c], ebx
or edi, edx
not ebx
mov dl, 1
imul ebx, edi
shl dl, cl
xor dword [0xbafd80], ebx
or byte [0xbafd87], dl
mov ecx, fcn.00804340
mov eax, fcn.00804340
and ecx, 1
xor ecx, eax
mov al, 0xfe
cmp ecx, 0xffffffff
sete cl
not cl
and cl, 3
xor cl, 7
rol al, cl
and byte [0xbafd87], al
mov ecx, 0xbafd78
call fcn.007c7b20
mov eax, esi
pop esi
pop edi
pop ebx
ret