Function at 0x977f10
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, 0x9776f0
mov edx, 3
mov esi, ecx
movzx edi, byte [0xbd1db7]
sub edx, eax
xor eax, eax
mov ecx, edx
xor ecx, 0x9776f0
sete al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
bt edi, eax
jb 0x97807c
mov al, byte [0xbd1db7]
mov edi, edx
xor ecx, ecx
mov ah, 1
xor edi, 0x9776f0
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbd1db7], ah
jne 0x977f4f
mov edx, 0x9776f0
mov ecx, 3
movzx eax, al
sub ecx, edx
xor edx, edx
mov edi, ecx
xor edi, 0x9776f0
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x977fcc
mov edx, ecx
xor eax, eax
movzx edi, byte [0xbd1db7]
xor edx, 0x9776f0
sete al
mov edx, eax
xor edx, 1
lea eax, [edx + eax*2]
bt edi, eax
jae 0x977fa6
jmp 0x97807c
xor eax, eax
xor ecx, 0x9776f0
movzx edx, byte [0xbd1db7]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x978050
mov eax, 0x9776f0
mov ecx, 3
sub ecx, eax
xor eax, eax
xor ecx, 0x9776f0
sete al
mov ecx, eax
xor ecx, 0x31465611
lea ecx, [ecx + eax*2 + 0x388]
mov eax, dword [0xbd1da8]
xor eax, ecx
mov dword [0xbd1da8], eax
not eax
mov edx, dword [0xbd1dac]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbd1dac], edx
or eax, edi
not edx
imul edx, eax
xor dword [0xbd1db0], edx
mov dl, 1
shl dl, cl
or byte [0xbd1db7], dl
mov eax, 0x9776f0
mov ecx, 3
sub ecx, eax
xor eax, eax
xor ecx, 0x9776f0
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [ecx + eax*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbd1db7], al
mov edx, fcn.00988e30
mov edi, fcn.00988e30
movzx ecx, byte [0xbd1def]
or edx, 2
xor edi, 2
mov eax, edx
add eax, edi
sete al
or al, 4
add al, 0x84
and al, 7
movzx eax, al
bt ecx, eax
jb 0x9781ca
mov al, byte [0xbd1def]
mov ecx, edx
mov ah, 1
add ecx, edi
sete cl
or cl, 4
add cl, 0x84
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbd1def], ah
jne 0x9780b1
mov ecx, fcn.00988e30
mov edx, fcn.00988e30
or ecx, 2
xor edx, 2
mov edi, ecx
add edi, edx
sete ah
or ah, 4
add ah, 0x84
and ah, 7
xor ah, 7
movzx edi, ah
movzx eax, al
bt eax, edi
jae 0x978123
mov eax, ecx
movzx edi, byte [0xbd1def]
add eax, edx
sete al
or al, 4
add al, 0x84
and al, 7
movzx eax, al
bt edi, eax
jae 0x978102
jmp 0x9781ca
add ecx, edx
movzx ecx, byte [0xbd1def]
sete al
or al, 4
add al, 0x84
and al, 7
movzx eax, al
bt ecx, eax
jb 0x97819f
mov eax, fcn.00988e30
mov edx, fcn.00988e30
xor ecx, ecx
xor edx, 2
or eax, 2
add eax, edx
mov eax, dword [0xbd1de0]
sete cl
or ecx, 0x9ba393c
add ecx, 0x84
xor eax, ecx
mov dword [0xbd1de0], eax
not eax
mov edx, dword [0xbd1de4]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbd1de4], edx
or edi, eax
not edx
mov al, 1
imul edx, edi
shl al, cl
xor dword [0xbd1de8], edx
or byte [0xbd1def], al
mov eax, fcn.00988e30
mov ecx, fcn.00988e30
xor ecx, 2
or eax, 2
add eax, ecx
mov al, 0xfe
sete cl
or cl, 4
add cl, 0x84
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbd1def], al
mov edx, 0x9791b0
xor eax, eax
movzx edi, byte [0xbd1e2f]
and edx, 1
inc edx
mov ecx, edx
xor ecx, 0x9791b0
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt edi, eax
jb 0x978320
mov al, byte [0xbd1e2f]
mov edi, edx
xor ecx, ecx
mov ah, 1
xor edi, 0x9791b0
sete cl
mov ebx, ecx
xor ebx, 5
lea ecx, [ebx + ecx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbd1e2f], ah
jne 0x978203
mov ecx, 0x9791b0
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov edi, ecx
xor edi, 0x9791b0
sete dl
mov ebx, edx
xor ebx, 5
lea edx, [ebx + edx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x97828b
mov edx, ecx
xor eax, eax
movzx edi, byte [0xbd1e2f]
xor edx, 0x9791b0
sete al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2 + 4]
and al, 7
movzx eax, al
bt edi, eax
jae 0x97825f
jmp 0x978320
xor eax, eax
xor ecx, 0x9791b0
movzx edx, byte [0xbd1e2f]
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x9782f4
mov eax, 0x9791b0
xor ecx, ecx
mov edi, dword [0xbd1e24]
mov dl, 1
and eax, 1
inc eax
xor eax, 0x9791b0
sete cl
mov eax, ecx
xor eax, 0x3b620565
lea ecx, [eax + ecx*2 + 0x34]
xor edi, ecx
mov dword [0xbd1e24], edi
not edi
imul edi, ecx
and cl, 7
shl dl, cl
xor dword [0xbd1e28], edi
or byte [0xbd1e2f], dl
mov eax, 0x9791b0
xor ecx, ecx
and eax, 1
inc eax
xor eax, 0x9791b0
sete cl
mov eax, ecx
xor eax, 5
lea ecx, [eax + ecx*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbd1e2f], al
xor edi, edi
test esi, esi
mov eax, 0
je 0x978356
mov eax, dword [esi + 4]
cmp eax, 9
jne 0x9783ee
push 9
push dword [esi + 8]
push 0xbd1da8
call fcn.00988e30
add esp, 0xc
test eax, eax
jne 0x9783eb
mov eax, 0xb6b660
mov ecx, fcn.00977250
mov dword [esp + 8], eax
mov eax, fcn.00977250
and ecx, 1
xor ecx, eax
mov dword [esp + 0x10], ecx
xor edx, edx
cmp dword [esp + 0x10], 0xffffffff
mov esi, dword [edi*4 + 0xb6c3b0]
mov ebp, dword [edi*4 + 0xb6c3d0]
mov eax, 1
mov dword [esp + 0x18], edi
mov ebx, 1
sete dl
xor edx, 0xd0077959
add edx, 0xc
xor edx, dword [edi*4 + 0xb6c3f0]
mov ecx, edx
and cl, 7
shl eax, cl
movzx edi, cl
xor cl, 7
shl ebx, cl
movzx ecx, byte [esi + ebp - 1]
bt ecx, edi
jb 0x978472
mov dword [esp], eax
mov al, byte [esi + ebp - 1]
mov ecx, eax
or cl, bl
lock cmpxchg byte [esi + ebp - 1], cl
jne 0x9783c7
mov ecx, dword [esp]
movzx eax, al
test ebx, eax
je 0x978417
movzx eax, byte [esi + ebp - 1]
test ecx, eax
je 0x9783dd
jmp 0x978472
mov eax, dword [esi + 4]
cmp eax, 7
jne 0x97848f
push 7
push dword [esi + 8]
push 0xbd1de0
call fcn.00988e30
add esp, 0xc
test eax, eax
jne 0x97848c
mov eax, 0xb6b674
jmp 0x978356
mov dword [esp + 0xc], ebx
movzx eax, byte [esi + ebp - 1]
test ecx, eax
jne 0x978468
lea ecx, [ebp - 4]
shr ecx, 2
je 0x978461
xor eax, eax
mov ebx, esi
mov dword [esp + 0x14], ecx
mov edi, dword [ebx]
mov ecx, eax
mov dword [esp + 4], edx
inc eax
shl dword [esp + 4], cl
and cl, 0x1f
xor cl, 0x1f
xor edi, edx
shr edx, cl
mov ecx, dword [esp + 0x14]
or edx, dword [esp + 4]
mov dword [ebx], edi
not edi
add ebx, 4
imul edx, edi
cmp eax, ecx
jne 0x978434
mov eax, dword [esp]
or byte [esi + ebp - 1], al
mov eax, dword [esp + 0xc]
not al
and byte [esi + ebp - 1], al
mov edi, dword [esp + 0x18]
inc edi
cmp edi, 6
jne 0x97836d
mov eax, dword [esp + 8]
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esi + 4]
cmp eax, 5
jne 0x9784b4
push 5
push dword [esi + 8]
push 0xbd1e24
call fcn.00988e30
add esp, 0xc
test eax, eax
jne 0x9784b4
mov eax, 0xb6b688
jmp 0x978356
xor eax, eax
jmp 0x978356