Function at 0x7be6e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x68
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov ecx, fcn.00833120
mov esi, fcn.00833120
xor edx, edx
mov eax, dword [0xbd33e0]
and ecx, 1
xor ecx, esi
xor eax, esp
mov dword [esp + 0x64], eax
mov dword [esp + 0x14], ecx
xor eax, eax
cmp dword [esp + 0x14], 0xffffffff
mov ebp, dword [edx*4 + 0xb56690]
mov esi, dword [edx*4 + 0xb566b0]
mov dword [esp + 0x10], edx
sete al
mov ecx, eax
not ecx
and ecx, 0x803
lea ebx, [eax + ecx*2 + 0x7c85057c]
mov eax, 1
xor ebx, dword [edx*4 + 0xb566d0]
mov ecx, ebx
and cl, 7
movzx edx, cl
shl eax, cl
xor cl, 7
mov dword [esp], edx
mov edx, 1
shl edx, cl
movzx ecx, byte [ebp + esi - 1]
mov edi, dword [esp]
bt ecx, edi
jb 0x7be7f3
mov dword [esp + 0x18], eax
mov al, byte [ebp + esi - 1]
mov ecx, eax
or cl, dl
lock cmpxchg byte [ebp + esi - 1], cl
jne 0x7be778
mov ecx, dword [esp + 0x18]
movzx eax, al
test edx, eax
je 0x7be79a
movzx eax, byte [ebp + esi - 1]
test ecx, eax
je 0x7be78f
jmp 0x7be7f3
mov dword [esp + 0x1c], edx
movzx eax, byte [ebp + esi - 1]
test ecx, eax
jne 0x7be7e9
lea ecx, [esi - 4]
shr ecx, 2
je 0x7be7e1
xor eax, eax
mov edx, ebp
mov dword [esp + 4], ecx
mov edi, dword [edx]
mov ecx, eax
mov dword [esp], ebx
inc eax
shl dword [esp], cl
and cl, 0x1f
xor cl, 0x1f
xor edi, ebx
shr ebx, cl
mov ecx, dword [esp + 4]
or ebx, dword [esp]
mov dword [edx], edi
not edi
add edx, 4
imul ebx, edi
cmp eax, ecx
jne 0x7be7b7
mov eax, dword [esp + 0x18]
or byte [ebp + esi - 1], al
mov eax, dword [esp + 0x1c]
not al
and byte [ebp + esi - 1], al
mov edx, dword [esp + 0x10]
inc edx
cmp edx, 5
jne 0x7be70f
mov ecx, dword [esp + 0xc]
mov eax, str.Nwn__Z
mov esi, 0xbb5f00
mov ebx, dword [esp + 8]
cmp ecx, 1
mov byte [ebx + 0xa5], 1
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x4c], 0xbb5ecc
lea ecx, [esp + 0x20]
cmove esi, eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], 0xbb5f14
mov dword [esp + 0x5c], 0xbb5f20
mov dword [esp + 0x60], 0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], 0
lea eax, [esp + 0x4c]
push 0
push eax
push 5
push ecx
call fcn.007bf110
add esp, 0x10
mov ebp, dword [esp + 0x2c]
test ebp, ebp
jne 0x7bf0ae
mov eax, dword [esp + 0xc]
mov edi, dword [ebx + 0x10]
shl eax, 4
mov ecx, dword [edi + eax + 4]
test ecx, ecx
jne 0x7be8b6
mov eax, dword [edi + 0x1c]
xor ebp, ebp
or word [eax + 0x4e], 1
jmp 0x7bf0d1
mov dword [esp + 0x14], esi
mov dword [esp], eax
lea esi, [edi + eax + 4]
call fcn.00787c60
mov ebp, dword [esi]
mov ecx, ebp
call fcn.00787ca0
test eax, eax
je 0x7be8dd
mov dword [esp + 4], 0
jmp 0x7be8fd
mov ecx, ebp
xor edx, edx
push 0
call fcn.00787cb0
add esp, 4
test eax, eax
jne 0x7bf0ed
mov ebp, dword [esi]
mov dword [esp + 4], 1
lea eax, [esp + 0x38]
mov ecx, ebp
mov edx, 1
push eax
call fcn.007bcae0
add esp, 4
mov ecx, dword [esi]
lea eax, [esp + 0x3c]
mov edx, 2
push eax
call fcn.007bcae0
add esp, 4
mov ecx, dword [esi]
lea eax, [esp + 0x40]
mov edx, 3
push eax
call fcn.007bcae0
add esp, 4
mov ecx, dword [esi]
lea eax, [esp + 0x44]
mov edx, 4
push eax
call fcn.007bcae0
add esp, 4
mov ecx, dword [esi]
lea eax, [esp + 0x48]
mov edx, 5
push eax
call fcn.007bcae0
add esp, 4
test byte [ebx + 0x23], 2
mov dword [esp + 0x10], esi
je 0x7beaaf
mov ecx, dword [esp]
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov eax, dword [edi + ecx + 0xc]
lea ebp, [edi + ecx + 0xc]
mov dword [eax], 0
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + ecx + 0xc]
or word [eax + 0x4e], 4
mov al, byte [ebx + 0x4e]
mov ecx, dword [ebp]
mov byte [ecx + 0x4d], al
mov esi, dword [ebp]
cmp dword [esi + 0x50], 0
jne 0x7be9f0
mov ecx, dword [esp + 0x40]
call fcn.007acca0
test eax, eax
mov ecx, 0xfffff830
cmovne ecx, eax
mov dword [esi + 0x50], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp]
mov ecx, dword [ecx]
mov edx, dword [eax + 0x50]
call fcn.007c9d90
mov esi, dword [ebp]
mov eax, dword [esp + 0x3c]
mov byte [esi + 0x4c], al
mov edx, dword [ebp]
mov cl, byte [edx + 0x4c]
test cl, cl
jne 0x7bea0b
mov byte [edx + 0x4c], 1
mov ecx, dword [ebp]
mov cl, byte [ecx + 0x4c]
cmp cl, 5
jb 0x7bedd5
mov edx, fcn.00788700
mov esi, fcn.00788700
movzx ecx, byte [0xbb5fdf]
mov edi, dword [esp + 0x7c]
or edx, 2
xor esi, 2
mov eax, edx
add eax, esi
sete al
or al, 6
movzx eax, al
bt ecx, eax
jb 0x7bedb2
mov al, byte [0xbb5fdf]
mov ecx, edx
mov ah, 1
add ecx, esi
sete cl
or cl, 6
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb5fdf], ah
jne 0x7bea49
mov ecx, fcn.00788700
mov edx, fcn.00788700
or ecx, 2
xor edx, 2
mov esi, ecx
add esi, edx
sete ah
or ah, 6
xor ah, 7
movzx esi, ah
movzx eax, al
bt eax, esi
jae 0x7bec96
mov eax, ecx
movzx esi, byte [0xbb5fdf]
add eax, edx
sete al
or al, 6
movzx eax, al
bt esi, eax
jae 0x7bea92
jmp 0x7bedb2
mov edx, dword [esp]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
lea ebp, [edi + edx + 0xc]
mov edx, dword [edi + edx + 0xc]
test ecx, ecx
mov dword [edx], eax
jne 0x7bead0
mov ecx, dword [esp]
jmp 0x7be9a8
cmp dword [esp + 0xc], 0
jne 0x7beae8
and cl, 3
mov al, 1
je 0x7beae0
mov eax, ecx
mov byte [ebx + 0x4e], al
jmp 0x7be9b7
movzx eax, byte [ebx + 0x4e]
cmp ecx, eax
je 0x7be9b7
mov eax, 0x795400
mov edx, 3
movzx edi, byte [0xbb5fbb]
sub edx, eax
xor eax, eax
mov ecx, edx
xor ecx, 0x795400
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edi, eax
jb 0x7bec75
mov al, byte [0xbb5fbb]
mov ebp, esi
mov esi, edx
xor ecx, ecx
mov ah, 1
xor esi, 0x795400
sete cl
mov ebx, ecx
not ebx
lea ecx, [ebx + ecx*2]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb5fbb], ah
jne 0x7beb30
mov edx, 0x795400
mov ecx, 3
movzx eax, al
sub ecx, edx
xor edx, edx
mov esi, ecx
xor esi, 0x795400
sete dl
mov ebx, edx
not ebx
lea edx, [ebx + edx*2]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x7bebbb
mov ebx, dword [esp + 8]
mov esi, ebp
mov edx, ecx
xor eax, eax
movzx edi, byte [0xbb5fbb]
xor edx, 0x795400
sete al
mov edx, eax
not edx
lea eax, [edx + eax*2]
and al, 7
movzx eax, al
bt edi, eax
jae 0x7beb91
jmp 0x7bec75
xor eax, eax
xor ecx, 0x795400
movzx esi, byte [0xbb5fbb]
mov ebx, dword [esp + 8]
sete al
mov ecx, eax
xor ecx, 0xbe67a0e7
lea edx, [ecx + eax*2 + 0x1230]
mov eax, edx
and al, 7
movzx eax, al
bt esi, eax
mov esi, ebp
jb 0x7bec47
mov esi, 0xbb5f70
xor eax, eax
mov edi, dword [esi]
mov ecx, eax
mov ebx, edx
inc eax
shl ebx, cl
xor cl, 0x1f
xor edi, edx
shr edx, cl
mov dword [esi], edi
or edx, ebx
not edi
add esi, 4
imul edx, edi
cmp eax, 0x12
jne 0x7bebf5
mov eax, 0x795400
mov ecx, 3
mov esi, ebp
sub ecx, eax
xor eax, eax
xor ecx, 0x795400
sete al
mov ecx, eax
not ecx
lea ecx, [ecx + eax*2]
mov al, 1
and cl, 7
shl al, cl
or byte [0xbb5fbb], al
mov ebx, dword [esp + 8]
mov eax, 0x795400
mov ecx, 3
sub ecx, eax
xor eax, eax
xor ecx, 0x795400
sete al
mov ecx, eax
not ecx
lea ecx, [ecx + eax*2]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb5fbb], al
mov ecx, dword [esp + 0x7c]
mov edx, ebx
push 0xbb5f70
call fcn.007c9d60
add esp, 4
mov ecx, dword [esp + 4]
mov ebp, 1
jmp 0x7bf09c
add ecx, edx
movzx ecx, byte [0xbb5fdf]
sete al
or al, 6
movzx eax, al
bt ecx, eax
jb 0x7bed8d
mov eax, fcn.00788700
mov edx, fcn.00788700
xor ecx, ecx
xor edx, 2
or eax, 2
add eax, edx
mov eax, dword [0xbb5fc0]
sete cl
or ecx, 0xe9541cbe
add ecx, 0x600
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbb5fc0], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
mov eax, dword [0xbb5fc4]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb5fc4], eax
or esi, edx
not eax
mov edx, dword [0xbb5fc8]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb5fc8], edx
or esi, eax
not edx
mov eax, dword [0xbb5fcc]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb5fcc], eax
or esi, edx
not eax
mov edx, dword [0xbb5fd0]
imul eax, esi
mov esi, eax
shl esi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb5fd0], edx
or eax, esi
not edx
mov ebp, dword [0xbb5fd4]
imul edx, eax
mov esi, edx
shl esi, 5
xor ebp, edx
shr edx, 0x1a
mov dword [0xbb5fd4], ebp
or edx, esi
not ebp
imul ebp, edx
mov dl, 1
xor dword [0xbb5fd8], ebp
shl dl, cl
or byte [0xbb5fdf], dl
mov eax, fcn.00788700
mov ecx, fcn.00788700
xor ecx, 2
or eax, 2
add eax, ecx
mov al, 0xfe
sete cl
or cl, 6
xor cl, 7
rol al, cl
and byte [0xbb5fdf], al
mov ecx, edi
mov edx, ebx
push 0xbb5fc0
call fcn.007c9d60
add esp, 4
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 4]
mov ebp, 1
jmp 0x7bf09c
cmp dword [esp + 0xc], 0
jne 0x7bede5
cmp eax, 4
jl 0x7bede5
and byte [ebx + 0x20], 0xfd
mov edx, fcn.00829b50
mov esi, fcn.00829b50
xor eax, eax
movzx edi, byte [0xbb6007]
or edx, 2
xor esi, 2
mov ecx, edx
add ecx, esi
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edi, eax
jb 0x7befed
mov al, byte [0xbb6007]
mov edi, edx
xor ebx, ebx
mov ah, 1
add edi, esi
sete bl
mov ecx, ebx
xor ecx, 3
lea ecx, [ecx + ebx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb6007], ah
jne 0x7bee1b
mov ecx, fcn.00829b50
mov edx, fcn.00829b50
xor ebx, ebx
movzx eax, al
or ecx, 2
xor edx, 2
mov esi, ecx
add esi, edx
sete bl
mov esi, ebx
xor ebx, 3
lea ebx, [ebx + esi*2]
xor bl, 7
movzx esi, bl
bt eax, esi
jae 0x7bee90
mov esi, ecx
xor eax, eax
add esi, edx
movzx esi, byte [0xbb6007]
sete al
mov ebx, eax
xor ebx, 3
lea eax, [ebx + eax*2]
bt esi, eax
jae 0x7bee6e
jmp 0x7befed
xor eax, eax
add ecx, edx
movzx edx, byte [0xbb6007]
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x7befc1
mov eax, fcn.00829b50
mov ecx, fcn.00829b50
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
xor eax, 0x30f67993
lea ecx, [eax + edx*2 + 0xc18]
mov eax, dword [0xbb5fe0]
xor eax, ecx
mov dword [0xbb5fe0], eax
not eax
mov edx, dword [0xbb5fe4]
imul eax, ecx
and cl, 7
lea esi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb5fe4], edx
or esi, eax
not edx
mov eax, dword [0xbb5fe8]
imul edx, esi
lea esi, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbb5fe8], eax
or esi, edx
not eax
mov edx, dword [0xbb5fec]
imul eax, esi
lea esi, [eax*8]
xor edx, eax
shr eax, 0x1c
mov dword [0xbb5fec], edx
or esi, eax
not edx
mov eax, dword [0xbb5ff0]
imul edx, esi
mov esi, edx
shl esi, 4
xor eax, edx
shr edx, 0x1b
mov dword [0xbb5ff0], eax
or edx, esi
not eax
imul eax, edx
mov edx, dword [0xbb5ff4]
mov esi, eax
shl esi, 5
xor edx, eax
shr eax, 0x1a
mov dword [0xbb5ff4], edx
or eax, esi
not edx
mov edi, dword [0xbb5ff8]
imul edx, eax
mov esi, edx
shl esi, 6
xor edi, edx
shr edx, 0x19
mov dword [0xbb5ff8], edi
or edx, esi
not edi
imul edi, edx
mov edx, dword [0xbb5ffc]
mov esi, edi
shl esi, 7
xor edx, edi
shr edi, 0x18
mov dword [0xbb5ffc], edx
or edi, esi
not edx
imul edx, edi
xor dword [0xbb6000], edx
mov dl, 1
shl dl, cl
or byte [0xbb6007], dl
mov eax, fcn.00829b50
mov ecx, fcn.00829b50
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
xor eax, 3
lea ecx, [eax + edx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb6007], al
mov edi, dword [esp + 8]
mov eax, dword [edi + 0x10]
push dword [esp + 0x14]
mov ecx, dword [esp + 4]
push dword [eax + ecx]
push 0xbb5fe0
push edi
call fcn.0078df10
add esp, 0x10
mov esi, dword [edi + 0x150]
mov ebx, eax
mov dword [edi + 0x150], 0
push 0
lea eax, [esp + 0x24]
push eax
push fcn.007bf110
push ebx
push edi
call fcn.0078f880
add esp, 0x14
mov ebp, eax
test eax, eax
mov dword [edi + 0x150], esi
jne 0x7bf045
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 8]
mov edx, ebx
mov ebx, ecx
call fcn.00780810
mov esi, dword [esp + 0x10]
test ebp, ebp
jne 0x7bf065
mov edx, dword [esp + 0xc]
mov ecx, ebx
call fcn.007bf770
cmp byte [ebx + 0x51], 0
je 0x7bf07d
mov ecx, ebx
call fcn.00788280
mov ecx, dword [esp + 4]
mov ebp, 7
jmp 0x7bf085
mov ecx, dword [esp + 4]
test ebp, ebp
je 0x7bf08b
test byte [ebx + 0x23], 8
je 0x7bf09c
mov eax, dword [ebx + 0x10]
mov edx, dword [esp]
xor ebp, ebp
mov eax, dword [eax + edx + 0xc]
or word [eax + 0x4e], 1
test ecx, ecx
je 0x7bf0a7
mov ecx, dword [esi]
call fcn.007c9dc0
mov ecx, dword [esi]
call fcn.00788700
test ebp, ebp
je 0x7bf0d1
cmp ebp, 0xc0a
je 0x7bf0bf
cmp ebp, 7
jne 0x7bf0c6
mov ecx, ebx
call fcn.0078a090
mov edx, dword [esp + 0xc]
mov ecx, ebx
call fcn.007bca80
mov byte [ebx + 0xa5], 0
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00989fe9
mov eax, ebp
add esp, 0x68
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, eax
mov ebp, eax
call fcn.00789c30
mov ecx, dword [esp + 0x7c]
mov edx, ebx
push eax
call fcn.007c9d60
add esp, 4
jmp 0x7bf0a7