Function at 0x819a40
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [edx + 0xc]
xor ebx, ebx
mov esi, 0
mov dword [esp], ecx
mov dword [esp + 0xc], edx
test eax, eax
jle 0x819aa0
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x40]
xor edi, edi
xor esi, esi
mov ecx, dword [ecx + 0x14]
mov edx, dword [edx + 0x2c]
cmp dword [ecx + 0x14], edx
jne 0x819a98
mov ebx, dword [ecx + 0x20]
mov ebp, dword [ecx + 0x24]
and ebx, dword [esp + 0x38]
and ebp, dword [esp + 0x3c]
or ebp, ebx
jne 0x819a96
movzx ebx, word [ecx + 0xc]
and ebx, 0xf7ff
cmp bx, 1
sbb esi, 0xffffffff
xor ebx, ebx
inc edi
add ecx, 0x30
cmp edi, eax
jne 0x819a6e
cmp dword [esp + 0x44], 0
je 0x819aeb
mov eax, dword [esp + 0x44]
xor ebx, ebx
mov ecx, 0
mov eax, dword [eax]
test eax, eax
jle 0x819ae6
xor ecx, ecx
mov edi, dword [esp + 0x44]
lea edx, [ecx + ecx*4]
mov edi, dword [edi + edx*4 + 4]
cmp byte [edi], 0xa4
jne 0x819ae6
mov edi, dword [edi + 0x1c]
mov ebp, dword [esp + 0x40]
cmp edi, dword [ebp + 0x2c]
jne 0x819ae6
mov edi, dword [esp + 0x44]
test byte [edi + edx*4 + 0xc], 2
jne 0x819ae6
inc ecx
cmp ecx, eax
jl 0x819aba
cmp ecx, eax
cmove ebx, eax
mov edi, dword [esp]
lea eax, [esi + esi*4]
lea ecx, [ebx*8]
lea edx, [ecx + eax*4 + 0x50]
mov ecx, dword [edi]
push 0
call fcn.0077efb0
add esp, 4
test eax, eax
jne 0x819cab
mov edx, 0x8315d0
xor eax, eax
movzx esi, byte [0xbb2433]
and edx, 1
inc edx
mov ecx, edx
xor ecx, 0x8315d0
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt esi, eax
jb 0x819c96
mov al, byte [0xbb2433]
mov esi, edx
xor ecx, ecx
mov ah, 1
xor esi, 0x8315d0
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2 + 2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb2433], ah
jne 0x819b44
mov ecx, 0x8315d0
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov esi, ecx
xor esi, 0x8315d0
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2 + 2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x819bc1
mov edx, ecx
xor eax, eax
movzx esi, byte [0xbb2433]
xor edx, 0x8315d0
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2 + 2]
bt esi, eax
jae 0x819b9a
jmp 0x819c96
xor eax, eax
xor ecx, 0x8315d0
movzx edx, byte [0xbb2433]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x819c6d
mov ecx, 0x8315d0
xor eax, eax
and ecx, 1
inc ecx
xor ecx, 0x8315d0
sete al
mov ecx, eax
not ecx
and ecx, 0x511
lea ecx, [eax + ecx*2 + 0x70894aea]
mov eax, dword [0xbb2420]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb2420], eax
not eax
imul edx, eax
mov eax, dword [0xbb2424]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb2424], eax
or esi, edx
not eax
mov edx, dword [str.wCcZ]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [str.wCcZ], edx
or esi, eax
not edx
mov al, 1
imul edx, esi
shl al, cl
xor dword [0xbb242c], edx
or byte [0xbb2433], al
mov eax, 0x8315d0
xor ecx, ecx
and eax, 1
inc eax
xor eax, 0x8315d0
sete cl
mov eax, ecx
xor eax, 1
lea ecx, [ecx + eax*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb2433], al
push 0xbb2420
push edi
call fcn.00782570
add esp, 8
xor eax, eax
jmp 0x819e8d
lea edx, [esi + esi*2]
mov esi, eax
mov ecx, edi
mov dword [eax + 8], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], ebx
lea edi, [eax + edx*4 + 0x50]
add esi, 0x50
lea edx, [edi + ebx*8]
mov dword [eax + 4], esi
mov dword [eax + 0xc], edi
xor ebx, ebx
mov dword [esp + 0x10], esi
mov dword [eax + 0x10], edx
mov edx, dword [esp + 0xc]
mov dword [eax + 0x48], edx
mov dword [eax + 0x4c], ecx
mov eax, dword [edx + 0xc]
test eax, eax
jg 0x819cfb
mov dword [esp + 8], 0
mov dword [esp], 0
jmp 0x819e4a
mov ebp, dword [edx + 0x14]
xor esi, esi
mov dword [esp], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov ecx, dword [ebp + 0x14]
mov edx, dword [esp + 0x40]
cmp ecx, dword [edx + 0x2c]
jne 0x819e3e
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
and ecx, dword [esp + 0x38]
and edx, dword [esp + 0x3c]
or edx, ecx
jne 0x819e3e
movzx ecx, word [ebp + 0xc]
test ecx, 0xf7ff
je 0x819e3e
mov ecx, dword [esp + 0x40]
test byte [ecx + 0x24], 8
je 0x819d60
mov ecx, dword [ebp]
test byte [ecx + 4], 1
je 0x819e3e
mov ecx, dword [esp]
mov eax, dword [ebp + 0x1c]
mov edi, dword [esp + 0x10]
lea ecx, [ecx + ecx*2]
mov dword [edi + ecx*4], eax
mov dword [edi + ecx*4 + 8], esi
mov eax, 2
movzx edx, word [ebp + 0xc]
and edx, 0x1fff
cmp dx, 1
cmove edx, eax
cmp dx, 0x40
jne 0x819da1
movzx eax, byte [ebp + 0xf]
mov byte [edi + ecx*4 + 4], al
mov edi, dword [esp + 4]
jmp 0x819e34
test edx, 0x180
je 0x819dc7
cmp edx, 0x100
lea eax, [edi + ecx*4 + 4]
jne 0x819dbe
mov edi, dword [esp + 4]
mov byte [eax], 0x47
jmp 0x819e34
mov edi, dword [esp + 4]
mov byte [eax], 0x48
jmp 0x819e34
test dl, 0x3c
mov byte [edi + ecx*4 + 4], dl
jne 0x819dd6
mov edi, dword [esp + 4]
jmp 0x819e34
mov eax, dword [ebp]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
mov ecx, dword [eax + 0x10]
call fcn.007ee5a0
mov edi, dword [esp + 4]
test eax, eax
je 0x819e34
mov ecx, dword [esp]
mov eax, 1
mov edx, dword [esp + 0x1c]
shl eax, cl
cmp ecx, 0x10
mov ecx, 0
cmovge eax, ecx
mov ecx, dword [esp + 8]
or ecx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 8], ecx
lea eax, [eax + edx*4 + 4]
mov edx, dword [esp + 0x18]
cmp dx, 4
je 0x819e31
cmp dx, 0x10
jne 0x819e34
mov byte [eax], 8
jmp 0x819e34
mov byte [eax], 0x20
mov eax, dword [esp + 0xc]
inc dword [esp]
mov eax, dword [eax + 0xc]
inc esi
add ebp, 0x30
cmp esi, eax
jl 0x819d13
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp]
mov esi, dword [esp + 0x44]
test ebp, ebp
mov dword [ecx], edx
jle 0x819e82
lea ecx, [ebx + ebx*4]
mov edx, dword [esi + ecx*4 + 4]
movsx edx, word [edx + 0x20]
mov dword [edi + ebx*8], edx
movzx ecx, byte [esi + ecx*4 + 0xc]
and cl, 1
mov byte [edi + ebx*8 + 4], cl
inc ebx
cmp ebx, ebp
jne 0x819e63
mov ecx, dword [esp + 8]
mov word [eax], cx
mov eax, dword [esp + 0x14]
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret