Function at 0x82aa20
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 8]
mov dword [esp + 0x24], ecx
cmp dword [eax + 0x58], 0
mov dword [esp + 0x10], edx
je 0x82aa45
call fcn.0082b810
jmp 0x82b191
test eax, eax
mov dword [esp + 0x1c], eax
je 0x82b191
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edi, fcn.0078e190
mov edx, fcn.00846610
mov ebx, 3
imul edi, edi
sub ebx, edx
and edi, 3
mov dword [esp + 4], ebx
mov dword [esp + 0x2c], edi
mov ebp, dword [eax]
mov dword [esp], ecx
mov dword [esp + 8], ebp
cmp edi, 1
movzx ecx, byte [0xbb9c33]
seta al
or al, 2
movzx eax, al
bt ecx, eax
jb 0x82ab74
mov al, byte [0xbb9c33]
cmp edi, 1
mov dl, 1
seta cl
or cl, 2
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbb9c33], dl
jne 0x82aaa1
cmp edi, 1
movzx eax, al
seta cl
or cl, 2
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x82aaf0
cmp edi, 1
movzx ecx, byte [0xbb9c33]
seta al
or al, 2
movzx eax, al
bt ecx, eax
jae 0x82aad4
jmp 0x82ab74
cmp edi, 1
movzx ecx, byte [0xbb9c33]
seta al
or al, 2
movzx eax, al
bt ecx, eax
jb 0x82ab5e
xor ecx, ecx
cmp edi, 1
mov eax, dword [0xbb9c24]
seta cl
or ecx, 0x2b14ad6a
add ecx, 0x408
xor eax, ecx
mov dword [0xbb9c24], eax
not eax
mov edx, dword [0xbb9c28]
imul eax, ecx
and cl, 7
lea ebp, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb9c28], edx
or ebp, eax
not edx
mov al, 1
imul edx, ebp
mov ebp, dword [esp + 8]
shl al, cl
xor dword [0xbb9c2c], edx
or byte [0xbb9c33], al
cmp edi, 1
mov al, 0xfe
seta cl
or cl, 2
xor cl, 7
rol al, cl
and byte [0xbb9c33], al
mov edx, fcn.007e5180
mov eax, fcn.007e5180
movzx esi, byte [0xbb9c53]
and edx, 1
xor edx, eax
xor eax, eax
cmp edx, 0xffffffff
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt esi, eax
jb 0x82acd2
mov al, byte [0xbb9c53]
xor ebx, ebx
cmp edx, 0xffffffff
mov ah, 1
sete bl
mov ecx, ebx
xor ecx, 1
lea ecx, [ebx + ecx*2 + 2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb9c53], ah
jne 0x82aba9
xor ecx, ecx
cmp edx, 0xffffffff
movzx eax, al
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2 + 2]
mov ebx, dword [esp + 4]
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x82ac12
xor eax, eax
cmp edx, 0xffffffff
movzx esi, byte [0xbb9c53]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt esi, eax
jae 0x82abf0
jmp 0x82acd2
xor eax, eax
cmp edx, 0xffffffff
movzx esi, byte [0xbb9c53]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt esi, eax
jb 0x82acb4
xor eax, eax
cmp edx, 0xffffffff
sete al
mov ecx, eax
not ecx
and ecx, 0x15
lea ecx, [eax + ecx*2 - 0x2ec18896]
mov eax, dword [0xbb9c40]
mov ebx, ecx
shr ebx, 0x1f
or ebx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb9c40], eax
not eax
imul ebx, eax
mov eax, dword [0xbb9c44]
lea ebp, [ebx + ebx]
xor eax, ebx
shr ebx, 0x1e
mov dword [0xbb9c44], eax
or ebp, ebx
not eax
mov ebx, dword [0xbb9c48]
imul eax, ebp
lea ebp, [eax*4]
xor ebx, eax
shr eax, 0x1d
mov dword [0xbb9c48], ebx
or ebp, eax
not ebx
mov al, 1
imul ebx, ebp
mov ebp, dword [esp + 8]
shl al, cl
xor dword [0xbb9c4c], ebx
mov ebx, dword [esp + 4]
or byte [0xbb9c53], al
xor eax, eax
cmp edx, 0xffffffff
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [eax + ecx*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb9c53], al
mov eax, dword [esp]
mov esi, dword [eax + 0x2c]
mov edx, dword [esi + 0x20]
cmp edx, 0xbb9c24
je 0x82acef
cmp edx, 0xbb9c40
jne 0x82adf9
mov edi, dword [esp]
mov ecx, dword [edi + 0x3c]
mov dword [esp + 0x14], ecx
mov ecx, ebp
call fcn.007fb640
mov ecx, ebp
mov dword [esp + 0xc], eax
call fcn.007fcfa0
mov ebx, dword [esp + 0x10]
mov ebp, eax
mov edx, 0x48
mov dword [esp], edi
mov ecx, ebx
push dword [edi + 0x38]
push 0
call fcn.007d10d0
add esp, 8
cmp dword [esi + 0x20], 0xbb9c24
jne 0x82ad62
mov eax, dword [esp]
mov ecx, ebx
mov edx, 0x59
mov eax, dword [eax + 0x50]
inc eax
push ebp
push eax
mov eax, dword [esp + 0x24]
push dword [eax + 0x30]
call fcn.007d10f0
add esp, 0xc
mov ecx, dword [esp + 8]
mov edx, ebp
push 2
call fcn.0082a6d0
add esp, 4
jmp 0x82ad74
mov ecx, ebx
mov edx, 0x45
push ebp
push 1
call fcn.007d10d0
add esp, 8
mov ecx, ebx
mov edx, 0x69
push ebp
mov esi, dword [esp + 4]
push dword [esi + 0x40]
push ebp
call fcn.007d10f0
add esp, 0xc
mov eax, dword [esi + 0x40]
mov ecx, ebx
mov edx, 0x36
inc eax
push ebp
push dword [esp + 0x10]
push eax
call fcn.007d10f0
add esp, 0xc
mov ecx, ebx
mov edx, 0x1f
push ebp
push 0
mov edi, dword [esp + 0x1c]
push edi
call fcn.007d10f0
add esp, 0xc
mov ecx, ebx
mov edx, 0x59
push dword [esi + 0x38]
push dword [esi + 0x50]
push edi
call fcn.007d10f0
add esp, 0xc
mov edx, dword [esp + 0xc]
mov ecx, ebx
call fcn.007fbd70
mov esi, dword [esp + 8]
mov edx, ebp
mov ecx, esi
call fcn.007fc440
mov ebx, dword [esp + 4]
mov edi, dword [esp + 0x2c]
mov ebp, esi
jmp 0x82b180
mov ebp, fcn.008358d0
mov dword [esp + 0xc], esi
imul ebp, ebp
movzx ecx, byte [0xbb87eb]
and ebp, 3
cmp ebp, 1
seta al
or al, 4
add al, 0x84
and al, 7
movzx eax, al
bt ecx, eax
jb 0x82af02
mov al, byte [0xbb87eb]
cmp ebp, 1
mov ah, 1
seta cl
or cl, 4
add cl, 0x84
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb87eb], ah
jne 0x82ae2c
cmp ebp, 1
movzx eax, al
seta cl
or cl, 4
add cl, 0x84
and cl, 7
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x82ae88
cmp ebp, 1
movzx ecx, byte [0xbb87eb]
seta al
or al, 4
add al, 0x84
and al, 7
movzx eax, al
bt ecx, eax
jae 0x82ae6b
jmp 0x82af02
cmp ebp, 1
movzx ecx, byte [0xbb87eb]
seta al
or al, 4
add al, 0x84
and al, 7
movzx eax, al
bt ecx, eax
jb 0x82aee6
xor ecx, ecx
cmp ebp, 1
mov eax, dword [0xbb87e0]
seta cl
or ecx, 0x59d04c8c
add ecx, 0x684
mov ebx, ecx
xor eax, ecx
shr ebx, 0x1f
mov dword [0xbb87e0], eax
not eax
or ebx, ecx
and cl, 7
imul ebx, eax
mov ah, 1
xor dword [0xbb87e4], ebx
mov ebx, dword [esp + 4]
shl ah, cl
or byte [0xbb87eb], ah
cmp ebp, 1
mov al, 0xfe
seta cl
or cl, 4
add cl, 0x84
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb87eb], al
mov eax, ebx
movzx ecx, byte [0xbb87f7]
mov ebp, dword [esp + 8]
xor eax, fcn.00846610
sete al
or al, 2
movzx eax, al
bt ecx, eax
jb 0x82affe
mov al, byte [0xbb87f7]
mov ecx, ebx
mov ah, 1
xor ecx, fcn.00846610
sete cl
or cl, 2
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb87f7], ah
jne 0x82af2a
mov ecx, ebx
movzx eax, al
xor ecx, fcn.00846610
sete cl
or cl, 2
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x82af84
mov eax, ebx
movzx ecx, byte [0xbb87f7]
xor eax, fcn.00846610
sete al
or al, 2
movzx eax, al
bt ecx, eax
jae 0x82af67
jmp 0x82affe
mov eax, ebx
movzx ecx, byte [0xbb87f7]
xor eax, fcn.00846610
sete al
or al, 2
movzx eax, al
bt ecx, eax
jb 0x82afe4
mov ebx, dword [esp + 4]
mov eax, dword [0xbb87ec]
xor ecx, ecx
xor ebx, fcn.00846610
mov ebx, eax
sete cl
xor ebx, ecx
or ecx, 0x2e80b792
xor ebx, 0xd17f486d
xor eax, ecx
mov dword [0xbb87ec], eax
imul ebx, ecx
mov ah, 1
and cl, 3
xor dword [0xbb87f0], ebx
mov ebx, dword [esp + 4]
shl ah, cl
or byte [0xbb87f7], ah
mov eax, ebx
xor eax, fcn.00846610
mov al, 0xfe
sete cl
or cl, 2
xor cl, 7
rol al, cl
and byte [0xbb87f7], al
cmp edx, 0xbb87e0
je 0x82b012
cmp edx, 0xbb87ec
jne 0x82b180
mov esi, dword [esp]
mov ebx, ebp
mov ecx, ebx
mov eax, dword [esi + 0x3c]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x48]
mov eax, dword [eax + 0x14]
mov ebp, dword [eax]
call fcn.007fb640
mov ecx, ebx
mov dword [esp + 0x14], eax
call fcn.007fcfa0
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
cmp ebp, 2
mov dword [esp + 0x18], ebp
mov ecx, dword [eax + 0x30]
mov eax, dword [esi + 0x38]
jg 0x82b069
mov ebx, dword [esp + 0x10]
mov ebp, ecx
mov edx, 0x48
mov ecx, ebx
push eax
push 0
call fcn.007d10d0
add esp, 8
jmp 0x82b08c
mov ebp, ecx
mov ecx, dword [esp]
mov edx, 0x59
mov ebx, dword [ecx + 0x50]
mov ecx, dword [esp + 0x10]
add ebx, 2
push eax
push ebx
mov ebx, dword [esp + 0x18]
push ebp
call fcn.007d10f0
add esp, 0xc
mov esi, dword [esp + 0x20]
mov ecx, ebx
mov edx, 0x7f
push esi
push ebp
call fcn.007d10d0
add esp, 8
mov eax, dword [esp + 0xc]
cmp dword [esp + 0x18], 1
mov eax, dword [eax + 0x20]
jg 0x82b0d2
xor ecx, ecx
cmp eax, 0xbb87e0
mov edx, 0x52
sete cl
lea eax, [ecx + ecx - 1]
mov ecx, ebx
push eax
push esi
call fcn.007d10d0
add esp, 8
mov ebp, ebx
jmp 0x82b130
xor ecx, ecx
cmp eax, 0xbb87e0
mov eax, 0x6a
mov dword [esp + 0x18], ebp
mov ebp, ebx
sete cl
sub eax, ecx
mov ecx, dword [esp + 8]
mov dword [esp + 0xc], eax
call fcn.007fcfa0
mov ebx, eax
mov eax, dword [esp]
mov ecx, ebp
mov edx, 0x59
mov eax, dword [eax + 0x50]
inc eax
push ebx
push eax
push dword [esp + 0x20]
call fcn.007d10f0
add esp, 0xc
mov edx, dword [esp + 0xc]
mov ecx, ebp
push esi
push esi
push ebx
call fcn.007d10f0
add esp, 0xc
mov ecx, dword [esp + 8]
mov edx, ebx
call fcn.007fc440
mov ebx, dword [esp + 4]
mov ecx, ebp
mov edx, 0x1f
push esi
push dword [esp + 0x18]
mov esi, dword [esp + 0x30]
push esi
call fcn.007d10f0
add esp, 0xc
mov eax, dword [esp]
mov ecx, ebp
mov edx, 0x59
push dword [eax + 0x38]
push dword [eax + 0x50]
push esi
call fcn.007d10f0
add esp, 0xc
mov edx, dword [esp + 0x14]
mov ecx, ebp
call fcn.007fbd70
mov ebp, dword [esp + 8]
mov edx, dword [esp + 0x20]
mov ecx, ebp
call fcn.007fc440
mov eax, dword [esp]
mov eax, dword [eax + 0x24]
test eax, eax
mov dword [esp], eax
jne 0x82aa81
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov edx, 0xc
push dword [eax + 0xc]
push dword [eax + 0x10]
call fcn.007d10d0
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret