Function at 0x81a3e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov esi, dword [edx + 0x3c]
mov ebx, ecx
xor ecx, ecx
mov edi, edx
mov eax, 0xffffffff
test esi, esi
sete dl
cmp dword [edi + 0x44], 0
jne 0x81a757
mov cl, dl
mov ebp, 1
mov edx, dword [edi + 0x34]
test edx, edx
je 0x81a421
add ebp, ecx
cmp dword [edx + 0x44], 0
mov edi, edx
je 0x81a40b
jmp 0x81a757
mov edx, 0x83e3a0
xor eax, eax
mov dword [esp + 4], esi
and edx, 1
movzx esi, byte [0xbb9b23]
inc edx
mov ecx, edx
xor ecx, 0x83e3a0
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jb 0x81a574
mov al, byte [0xbb9b23]
mov dword [esp], ebx
mov esi, edx
xor ebx, ebx
mov ah, 1
xor esi, 0x83e3a0
sete bl
mov ecx, ebx
xor ecx, 5
lea ecx, [ecx + ebx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb9b23], ah
jne 0x81a461
mov ecx, 0x83e3a0
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov esi, ecx
xor esi, 0x83e3a0
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 0x81a4ec
mov ebx, dword [esp]
mov edx, ecx
xor eax, eax
movzx esi, byte [0xbb9b23]
xor edx, 0x83e3a0
sete al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jae 0x81a4c0
jmp 0x81a574
xor eax, eax
xor ecx, 0x83e3a0
movzx edx, byte [0xbb9b23]
mov ebx, dword [esp]
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x81a548
mov eax, 0x83e3a0
xor ecx, ecx
and eax, 1
inc eax
xor eax, 0x83e3a0
sete cl
mov eax, ecx
xor eax, 0x6a2e1035
lea ecx, [eax + ecx*2 + 0xb14]
mov al, 1
xor dword [0xbb9b1c], ecx
and cl, 7
shl al, cl
or byte [0xbb9b23], al
mov eax, 0x83e3a0
xor ecx, ecx
and eax, 1
inc eax
xor eax, 0x83e3a0
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 [0xbb9b23], al
mov edx, fcn.007d7740
mov esi, fcn.007d7740
movzx ecx, byte [0xbb9b4b]
or edx, 2
xor esi, 2
mov eax, edx
add eax, esi
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x81a706
mov al, byte [0xbb9b4b]
mov ecx, edx
mov ah, 1
add ecx, esi
sete cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb9b4b], ah
jne 0x81a5a5
mov ecx, fcn.007d7740
mov edx, fcn.007d7740
or ecx, 2
xor edx, 2
mov esi, ecx
add esi, edx
sete ah
or ah, 4
xor ah, 7
movzx esi, ah
movzx eax, al
bt eax, esi
jae 0x81a607
mov eax, ecx
movzx esi, byte [0xbb9b4b]
add eax, edx
sete al
or al, 4
movzx eax, al
bt esi, eax
jae 0x81a5ea
jmp 0x81a706
add ecx, edx
movzx ecx, byte [0xbb9b4b]
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x81a6e1
mov eax, fcn.007d7740
mov edx, fcn.007d7740
xor ecx, ecx
xor edx, 2
or eax, 2
add eax, edx
mov eax, dword [0xbb9b30]
sete cl
or ecx, 0x79e01238
add ecx, 0x1084
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbb9b30], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
mov eax, dword [0xbb9b34]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb9b34], eax
or esi, edx
not eax
mov edx, dword [0xbb9b38]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb9b38], edx
or esi, eax
not edx
mov eax, dword [0xbb9b3c]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb9b3c], eax
or esi, edx
not eax
mov edx, dword [0xbb9b40]
imul eax, esi
mov esi, eax
shl esi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb9b40], edx
or eax, esi
not edx
imul edx, eax
xor dword [0xbb9b44], edx
mov dl, 1
shl dl, cl
or byte [0xbb9b4b], dl
mov eax, fcn.007d7740
mov ecx, fcn.007d7740
xor ecx, 2
or eax, 2
add eax, ecx
mov al, 0xfe
sete cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbb9b4b], al
cmp ebp, 1
mov eax, 0xc26bbc
mov ecx, 0xbb9b1c
cmove ecx, eax
push ecx
push ebp
push 0xbb9b30
push 0
push ebx
call fcn.007fdcc0
add esp, 0x14
mov esi, dword [esp + 4]
mov ecx, ebx
mov edx, edi
push 1
push 1
push dword [esp + 0x24]
push 0
push 0
push 0xffffffffffffffff
call fcn.00817600
add esp, 0x18
xor eax, eax
test esi, esi
jne 0x81a757
mov word [edi + 2], bp
mov edi, dword [edi + 0x38]
test edi, edi
jne 0x81a72c
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret