Function at 0x820320
Capabilities:
Encode data using xor
Terminate process

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov ecx, dword [ecx]
mov esi, edx
mov dword [esp + 0x10], ecx
call fcn.007ebd10
test esi, esi
mov dword [esp + 0x18], esi
je 0x820856
mov esi, dword [esp + 0x44]
mov ecx, 1
mov ebx, dword [esp + 0x48]
mov edi, fcn.00805470
mov edx, 0x99
mov ebp, eax
not edi
mov dword [esp + 4], ebp
sub ecx, esi
cmp esi, 1
mov esi, dword [esp + 0x18]
adc edx, 0
mov dword [esp + 0x24], ecx
lea ecx, [ebx + 1]
and edi, 1
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], ecx
mov eax, dword [esi + 0x2c]
xor ecx, ecx
cmp byte [esi + 0x60], 0
mov dword [esp], esi
mov dword [esp + 0xc], eax
jne 0x820578
mov ecx, esi
call fcn.0081ffc0
mov ecx, eax
test eax, eax
jg 0x8203a8
mov esi, dword [esp]
jmp 0x820578
mov esi, dword [esp]
xor ebp, ebp
mov dword [esp + 8], ecx
cmp ebp, 1
jne 0x820524
mov ecx, edi
xor eax, eax
movzx edx, byte [0xbb22d3]
add ecx, fcn.00805470
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x820517
mov al, byte [0xbb22d3]
mov edx, edi
xor ecx, ecx
add edx, fcn.00805470
sete cl
mov edx, ecx
not edx
lea ecx, [ecx + edx*2 + 4]
mov dl, 1
and cl, 7
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbb22d3], dl
jne 0x8203e9
mov edx, edi
xor ecx, ecx
mov esi, dword [esp]
movzx eax, al
add edx, fcn.00805470
sete cl
mov edx, ecx
not edx
lea ecx, [ecx + edx*2 + 4]
and cl, 7
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x820468
mov ecx, edi
xor eax, eax
movzx edx, byte [0xbb22d3]
add ecx, fcn.00805470
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jae 0x82043d
jmp 0x820517
mov ecx, edi
xor eax, eax
movzx edx, byte [0xbb22d3]
add ecx, fcn.00805470
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x8204f2
mov ecx, edi
xor eax, eax
mov esi, dword [esp]
add ecx, fcn.00805470
sete al
mov ecx, eax
not ecx
and ecx, 0x283
lea ecx, [eax + ecx*2 + 0x2b14ac6c]
mov eax, dword [0xbb22c4]
xor eax, ecx
mov dword [0xbb22c4], eax
not eax
mov edx, dword [0xbb22c8]
imul eax, ecx
and cl, 7
lea ebx, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb22c8], edx
or ebx, eax
not edx
mov al, 1
imul edx, ebx
mov ebx, dword [esp + 0x48]
shl al, cl
xor dword [0xbb22cc], edx
or byte [0xbb22d3], al
mov ecx, edi
xor eax, eax
add ecx, fcn.00805470
sete al
mov ecx, eax
not ecx
lea ecx, [eax + ecx*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb22d3], al
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x20], 0xbb22c4
je 0x820542
lea eax, [ebp + ebx]
mov ebx, dword [esi + 0x50]
mov ecx, dword [esp + 4]
mov edx, 0x59
add ebx, ebp
push eax
push ebx
mov ebx, dword [esp + 0x50]
push dword [esp + 0x48]
jmp 0x82055b
mov eax, dword [esi + 0x50]
mov ecx, dword [esp + 4]
mov edx, 0x59
inc eax
push dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x20]
push dword [eax + 0x30]
call fcn.007c5800
mov esi, dword [esp + 0xc]
add esp, 0xc
mov ecx, dword [esp + 8]
inc ebp
cmp ebp, ecx
jne 0x8203b1
mov ebp, dword [esp + 4]
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x58], 0
jne 0x820675
mov eax, dword [esp + 0xc]
test byte [eax + 5], 0x10
je 0x820675
cmp byte [esi + 0x11], 0x5a
je 0x820675
mov ecx, ebp
mov edx, 0x32
push ebx
call fcn.007edd80
add esp, 4
cmp dword [esp + 0x44], 0
jne 0x820623
mov esi, dword [esp]
mov dword [esp + 8], eax
mov edx, 0x52
mov ecx, ebp
mov eax, dword [esi + 0x40]
inc eax
push 1
push eax
call fcn.007c57e0
add esp, 8
mov edx, 0x4e
mov ecx, ebp
push dword [esi + 0x40]
push ebx
call fcn.007c57e0
add esp, 8
mov eax, dword [esi + 0x40]
mov ecx, dword [esp + 4]
mov edx, 0x5b
lea ebp, [eax + 2]
push ebp
mov ebp, dword [esp + 8]
push 2
push eax
call fcn.007c5800
add esp, 0xc
mov eax, dword [esi + 0x40]
mov edx, 0x83
mov ecx, ebp
add eax, 2
push eax
push dword [esi + 0x3c]
call fcn.007c57e0
mov edx, dword [esp + 0x10]
add esp, 8
jmp 0x820665
mov edx, 0x18
mov ecx, ebp
push 1
push ebx
push 0
mov esi, dword [esp + 0xc]
push dword [esi + 0x3c]
mov ebx, eax
call fcn.007826e0
add esp, 0x10
mov edx, 0x7a
mov ecx, ebp
push dword [esi + 0x3c]
call fcn.007edd80
add esp, 4
mov ecx, ebp
call fcn.007f2430
lea edx, [eax - 2]
mov ecx, ebp
call fcn.007ebd40
mov edx, ebx
mov ecx, ebp
call fcn.007ebd40
mov ebx, dword [esp + 0x48]
jmp 0x820848
mov eax, dword [esi + 0x40]
test eax, eax
je 0x82069b
add eax, dword [esp + 0x24]
mov ecx, ebp
mov edx, 0x52
push 1
push eax
call fcn.007c57e0
mov esi, dword [esp + 8]
add esp, 8
jmp 0x82084b
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x10], 0x74bb70
je 0x82084b
cmp dword [esi + 0x28], 0
mov dword [esp + 8], ecx
jne 0x8206c0
mov dword [esp + 0x1c], 0
jmp 0x82071c
mov ebx, dword [esp + 0x10]
mov esi, ecx
mov ecx, ebx
call fcn.007f1720
mov ebp, eax
mov eax, dword [esp]
mov ecx, dword [esp + 4]
mov edx, 0x59
mov eax, dword [eax + 0x50]
add eax, esi
push ebp
push eax
push dword [esp + 0x48]
call fcn.007c5800
add esp, 0xc
mov ecx, dword [esp + 4]
mov edx, 0x14
push 1
push 0
push ebp
call fcn.007c5800
add esp, 0xc
mov ecx, ebx
mov edx, ebp
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 4]
mov dword [esp + 0x1c], eax
call fcn.007f0bc0
mov esi, dword [esp]
cmp byte [esi + 0x60], 0
mov eax, ebx
je 0x82079e
mov ecx, ebp
call fcn.007f2430
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x48]
mov ebx, dword [esp + 0x10]
mov eax, dword [eax + 0x14]
mov ecx, ebx
mov edx, dword [eax]
mov dword [esp + 8], edx
call fcn.007eee80
mov ecx, dword [esi + 0x48]
mov edx, dword [ecx + 0x14]
mov ecx, ebx
push 0
push 0
mov esi, eax
push eax
call fcn.007eeeb0
add esp, 0xc
mov ecx, ebp
mov edx, 0xffffffff
call fcn.007ebf40
mov edx, dword [esp + 0x14]
mov ecx, ebp
mov ebp, eax
call fcn.007ebf40
mov ebx, dword [esp + 0x48]
cmp eax, ebp
ja 0x82079c
mov edx, dword [esp]
cmp byte [eax], 0x59
jne 0x820795
mov ecx, dword [eax + 4]
cmp ecx, dword [edx + 0x30]
jne 0x820795
mov ecx, dword [esp + 0x40]
mov dword [eax + 4], ecx
add eax, 0x14
cmp eax, ebp
jbe 0x820781
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x14], eax
test byte [ecx + 4], 0x20
je 0x8207db
mov eax, dword [esp]
mov ecx, dword [esp + 0x10]
mov eax, dword [eax + 0x48]
mov eax, dword [eax + 0x14]
mov edx, dword [eax + 4]
call fcn.00810f90
mov ecx, dword [esp + 4]
mov edx, 0x51
push 0xfffffffffffffffe
push eax
push 0
push 0
push 0
call fcn.007ebd50
add esp, 0x14
mov ebp, dword [esp + 4]
mov esi, dword [esp]
mov edx, dword [esp + 0x20]
mov ecx, ebp
push dword [esi + 0x34]
push dword [esp + 0x18]
push dword [esp + 0x4c]
call fcn.007c5800
add esp, 0xc
mov edx, dword [esp + 0xc]
mov ecx, ebp
push 0xfffffffffffffff8
call fcn.007ec2f0
add esp, 4
movzx edx, byte [esp + 8]
mov ecx, ebp
call fcn.00782720
cmp byte [esi + 0x60], 0
je 0x820835
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push dword [esp + 8]
call fcn.007ef1d0
mov esi, dword [esp + 4]
add esp, 4
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 4]
test edx, edx
je 0x82084b
mov ecx, ebp
call fcn.007ebd40
mov esi, dword [esp]
mov esi, dword [esi + 0x24]
test esi, esi
jne 0x82037d
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret