Function at 0x7bf970
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, ecx
test edx, edx
jle 0x7bf9d2
mov al, byte [esi]
test al, al
je 0x7bf9d2
mov edi, edx
xor ebp, ebp
mov ecx, eax
add cl, 0xd0
cmp cl, 9
mov ecx, 0
ja 0x7bf9af
movsx eax, al
lea ecx, [ecx + ecx*4]
lea ecx, [eax + ecx*2 - 0x30]
movzx eax, byte [esi + 1]
inc esi
mov edx, eax
add dl, 0xd0
cmp dl, 0xa
jb 0x7bf996
xor edx, edx
mov ebx, esi
call fcn.007b2640
mov ecx, dword [esp + 0x20]
inc esi
mov word [ecx + ebp*2], ax
cmp byte [ebx], 0x20
cmovne esi, ebx
inc ebp
cmp ebp, edi
jge 0x7bf9d2
mov al, byte [esi]
test al, al
jne 0x7bf987
mov eax, dword [esp + 0x24]
and byte [eax + 0x38], 0xbb
cmp byte [esi], 0
je 0x7bfe34
mov ebx, fcn.007c77a0
mov edi, fcn.00796cf0
mov ebp, fcn.00796cf0
not ebx
xor ebp, 2
or edi, 2
and ebx, 1
mov eax, edi
movzx ecx, byte [0xbae7ef]
add eax, ebp
setne al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x7bfb06
mov al, byte [0xbae7ef]
mov ecx, edi
mov dl, 1
add ecx, ebp
setne cl
or cl, 4
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbae7ef], dl
jne 0x7bfa1e
mov ecx, edi
movzx eax, al
add ecx, ebp
setne cl
or cl, 4
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x7bfa70
mov eax, edi
movzx ecx, byte [0xbae7ef]
add eax, ebp
setne al
or al, 4
movzx eax, al
bt ecx, eax
jae 0x7bfa53
jmp 0x7bfb06
mov eax, edi
movzx ecx, byte [0xbae7ef]
add eax, ebp
setne al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x7bfaef
mov eax, edi
xor ecx, ecx
add eax, ebp
mov eax, dword [0xbae7e0]
sete cl
xor ecx, 0xad1a3d09
add ecx, 0x404
mov edx, ecx
xor eax, ecx
mov dword [esp], ecx
shr edx, 0x1f
mov dword [0xbae7e0], eax
not eax
or edx, ecx
mov ecx, dword [0xbae7e4]
imul edx, eax
lea eax, [edx + edx]
mov dword [esp + 4], eax
mov al, 1
xor ecx, edx
shr edx, 0x1e
or edx, dword [esp + 4]
mov dword [0xbae7e4], ecx
not ecx
imul ecx, edx
xor dword [str.YDf], ecx
mov ecx, dword [esp]
and cl, 7
shl al, cl
or byte [0xbae7ef], al
mov eax, edi
add eax, ebp
mov al, 0xfe
setne cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbae7ef], al
push esi
push 0xbae7e0
call fcn.00783b50
add esp, 8
test eax, eax
jne 0x7bfb25
mov eax, dword [esp + 0x24]
or byte [eax + 0x38], 4
jmp 0x7bfe15
mov ecx, ebx
xor eax, eax
movzx edx, byte [0xbae7ff]
add ecx, fcn.007c77a0
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x7bfc73
mov al, byte [0xbae7ff]
mov edx, ebx
xor ecx, ecx
add edx, fcn.007c77a0
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 2]
mov dl, 1
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbae7ff], dl
jne 0x7bfb50
mov edx, ebx
xor ecx, ecx
movzx eax, al
add edx, fcn.007c77a0
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 2]
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x7bfbc4
mov ecx, ebx
xor eax, eax
movzx edx, byte [0xbae7ff]
add ecx, fcn.007c77a0
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jae 0x7bfb9d
jmp 0x7bfc73
mov ecx, ebx
xor eax, eax
movzx edx, byte [0xbae7ff]
add ecx, fcn.007c77a0
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x7bfc50
mov ecx, ebx
xor eax, eax
add ecx, fcn.007c77a0
sete al
mov ecx, eax
not ecx
and ecx, 0x145
lea ecx, [eax + ecx*2 + 0x5d55f63a]
mov eax, dword [0xbae7f0]
mov edx, ecx
mov dword [esp + 4], ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
mov dword [0xbae7f0], eax
not eax
imul edx, eax
mov eax, dword [0xbae7f4]
lea ecx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbae7f4], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [esp + 4]
xor dword [str._IM], eax
mov al, 1
and cl, 7
shl al, cl
or byte [0xbae7ff], al
mov ecx, ebx
xor eax, eax
add ecx, fcn.007c77a0
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [eax + ecx*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbae7ff], al
push esi
push 0xbae7f0
call fcn.00783b50
add esp, 8
test eax, eax
jne 0x7bfcae
lea ecx, [esi + 3]
call fcn.007bea50
cmp eax, 1
mov ecx, 2
cmovle eax, ecx
xor edx, edx
mov ecx, eax
call fcn.007b2640
mov ecx, dword [esp + 0x24]
mov word [ecx + 0x30], ax
jmp 0x7bfe15
mov edx, fcn.007eee70
mov eax, fcn.007eee70
movzx ecx, byte [0xbae813]
and edx, 1
xor edx, eax
cmp edx, 0xffffffff
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x7bfdfb
mov al, byte [0xbae813]
cmp edx, 0xffffffff
mov ah, 1
sete cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbae813], ah
jne 0x7bfcdd
cmp edx, 0xffffffff
movzx eax, al
sete cl
or cl, 4
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x7bfd2c
cmp edx, 0xffffffff
movzx ecx, byte [0xbae813]
sete al
or al, 4
movzx eax, al
bt ecx, eax
jae 0x7bfd10
jmp 0x7bfdfb
cmp edx, 0xffffffff
movzx ecx, byte [0xbae813]
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x7bfde5
xor ecx, ecx
cmp edx, 0xffffffff
mov eax, dword [0xbae800]
sete cl
or ecx, 0xd8baafb8
add ecx, 0xc
mov dword [esp + 4], ecx
xor eax, ecx
mov ecx, dword [esp + 4]
mov dword [0xbae800], eax
not eax
shr ecx, 0x1f
or ecx, dword [esp + 4]
imul ecx, eax
mov eax, dword [0xbae804]
mov dword [esp + 8], ecx
xor eax, ecx
mov ecx, dword [esp + 8]
mov dword [0xbae804], eax
not eax
lea ecx, [ecx + ecx]
mov dword [esp], ecx
mov ecx, dword [esp + 8]
shr ecx, 0x1e
or dword [esp], ecx
mov ecx, dword [0xbae808]
imul eax, dword [esp]
xor ecx, eax
mov dword [esp + 8], ecx
mov dword [0xbae808], ecx
lea ecx, [eax*4]
shr eax, 0x1d
mov dword [esp], ecx
or dword [esp], eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
not eax
and cl, 7
imul eax, dword [esp]
xor dword [0xbae80c], eax
mov ah, 1
shl ah, cl
or byte [0xbae813], ah
cmp edx, 0xffffffff
mov al, 0xfe
sete cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbae813], al
push esi
push 0xbae800
call fcn.00783b50
add esp, 8
test eax, eax
jne 0x7bfe15
mov eax, dword [esp + 0x24]
or byte [eax + 0x38], 0x40
movzx eax, byte [esi]
test al, al
je 0x7bfe34
cmp al, 0x20
je 0x7bfe23
inc esi
jmp 0x7bfe15
movzx eax, byte [esi + 1]
inc esi
cmp al, 0x20
je 0x7bfe23
test al, al
jne 0x7bf9fd
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret