Function at 0x818cb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov eax, dword [edx + 0x2c]
mov dword [esp], ecx
mov dword [esp + 4], edx
add eax, dword [edx + 0x20]
je 0x818fdf
mov eax, dword [esp]
mov esi, dword [esp + 4]
mov edx, 0x48
mov ecx, dword [eax + 8]
mov dword [esp + 0xc], ecx
push dword [esi + 0x14]
push dword [esi + 0x10]
push 0
call fcn.007d10f0
add esp, 0xc
cmp dword [esi + 0x2c], 0
jle 0x818fdf
mov eax, dword [esp + 4]
mov edi, 0x788a70
mov esi, 0x788a70
xor ebx, ebx
xor esi, 2
or edi, 2
mov ebp, dword [eax + 0x28]
cmp dword [ebp + 0xc], 0
js 0x818fce
mov eax, dword [ebp]
mov edx, dword [eax + 0x14]
test edx, edx
je 0x818d2d
cmp dword [edx], 1
je 0x818fa4
mov ecx, edi
xor eax, eax
movzx edx, byte [0xbba257]
add ecx, esi
sete al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x818f8a
mov al, byte [0xbba257]
mov edx, edi
xor ecx, ecx
add edx, esi
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [edx + ecx*2]
mov dl, 1
or cl, 4
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbba257], dl
jne 0x818d58
mov edx, edi
xor ecx, ecx
movzx eax, al
add edx, esi
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [edx + ecx*2]
or cl, 4
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x818dc8
mov ecx, edi
xor eax, eax
movzx edx, byte [0xbba257]
add ecx, esi
sete al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
or al, 4
movzx eax, al
bt edx, eax
jae 0x818da1
jmp 0x818f8a
mov ecx, edi
xor eax, eax
movzx edx, byte [0xbba257]
add ecx, esi
sete al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x818f69
mov ecx, edi
xor eax, eax
add ecx, esi
sete al
mov ecx, eax
xor ecx, 0x317d1661
lea ecx, [ecx + eax*2 + 0x121c]
mov eax, dword [str.9a.e]
mov dword [esp + 8], ecx
xor eax, ecx
mov dword [str.9a.e], eax
not eax
mov edx, dword [0xbba224]
imul eax, ecx
lea ecx, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbba224], edx
or ecx, eax
not edx
mov eax, dword [0xbba228]
imul edx, ecx
lea ecx, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbba228], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbba22c]
lea edx, [eax*8]
xor ecx, eax
shr eax, 0x1c
mov dword [0xbba22c], ecx
or edx, eax
not ecx
mov eax, dword [0xbba230]
imul ecx, edx
mov edx, ecx
shl edx, 4
xor eax, ecx
shr ecx, 0x1b
mov dword [0xbba230], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbba234]
mov edx, eax
shl edx, 5
xor ecx, eax
shr eax, 0x1a
mov dword [0xbba234], ecx
or eax, edx
not ecx
imul ecx, eax
mov eax, dword [0xbba238]
mov edx, ecx
shl edx, 6
xor eax, ecx
shr ecx, 0x19
mov dword [0xbba238], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbba23c]
mov edx, eax
shl edx, 7
xor ecx, eax
shr eax, 0x18
mov dword [0xbba23c], ecx
or eax, edx
not ecx
imul ecx, eax
mov eax, dword [0xbba240]
mov edx, ecx
shl edx, 8
xor eax, ecx
shr ecx, 0x17
mov dword [0xbba240], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbba244]
mov edx, eax
shl edx, 9
xor ecx, eax
shr eax, 0x16
mov dword [0xbba244], ecx
or eax, edx
not ecx
imul ecx, eax
mov eax, dword [0xbba248]
mov edx, ecx
shl edx, 0xa
xor eax, ecx
shr ecx, 0x15
mov dword [0xbba248], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbba24c]
mov edx, eax
shl edx, 0xb
xor ecx, eax
shr eax, 0x14
mov dword [0xbba24c], ecx
or eax, edx
not ecx
imul ecx, eax
mov al, 1
xor dword [0xbba250], ecx
mov ecx, dword [esp + 8]
and cl, 7
shl al, cl
or byte [0xbba257], al
mov ecx, edi
xor eax, eax
add ecx, esi
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [ecx + eax*2]
mov al, 0xfe
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbba257], al
push str.9a.e
push dword [esp + 4]
call fcn.0078de60
add esp, 8
mov dword [ebp + 0xc], 0xffffffff
jmp 0x818fce
mov ecx, dword [esp]
push 0
push 0
call fcn.008152a0
add esp, 8
mov ecx, dword [esp + 0xc]
mov edx, 0x64
push 0xfffffffffffffff7
push eax
push 0
push 0
push dword [ebp + 0xc]
call fcn.007f75d0
add esp, 0x14
mov eax, dword [esp + 4]
inc ebx
add ebp, 0x10
cmp ebx, dword [eax + 0x2c]
jl 0x818d10
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret