Function at 0x801210
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [0xbd33e0]
mov ebx, edx
mov edi, ecx
xor eax, esp
mov dword [esp + 0x1c], eax
mov eax, dword [ecx]
mov ebp, dword [ecx + 8]
test byte [eax + 0xa8], 2
mov dword [esp + 0xc], eax
jne 0x801265
movzx eax, word [ebx + 0x2a]
test ax, ax
jle 0x801261
xor ecx, ecx
mov edx, dword [ebx + 4]
lea esi, [ecx + ecx*4]
test byte [edx + esi*4 + 0x10], 1
je 0x801259
mov byte [edx + esi*4 + 0xc], 2
movzx eax, word [ebx + 0x2a]
inc ecx
movsx edx, ax
cmp ecx, edx
jl 0x801243
or byte [ebx + 0x25], 8
mov edx, dword [edi + 0x80]
test edx, edx
je 0x80127b
mov ecx, ebp
push 2
call fcn.007fbff0
add esp, 4
movsx eax, word [ebx + 0x28]
mov dword [esp + 8], ebx
test eax, eax
js 0x801342
mov ecx, dword [ebx + 4]
lea eax, [eax + eax*4]
lea esi, [esp + 0x14]
mov edx, dword [ecx + eax*4]
mov ecx, esi
call fcn.008022d0
mov ecx, dword [esp + 0xc]
mov edx, 0x3b
push 0
push esi
call fcn.007e4510
add esp, 8
mov ecx, edi
xor edx, edx
push eax
call fcn.007e4370
add esp, 4
test eax, eax
je 0x801723
cmp byte [edi + 0xc8], 2
mov ebx, eax
jb 0x8012e8
mov eax, dword [esp + 8]
mov edx, dword [ebx + 4]
mov ecx, edi
lea eax, [eax + 0x28]
push eax
call fcn.008022f0
add esp, 4
mov al, byte [edi + 0xc6]
mov ecx, edi
xor edx, edx
mov byte [ebx + 0xc], al
mov eax, dword [esp + 8]
mov word [eax + 0x28], 0xffff
movzx eax, byte [eax + 0x32]
push 2
push 0
push 0
push 0
push 0
push eax
push ebx
push 0
push 0
call fcn.007dc100
add esp, 0x24
mov eax, dword [esp + 0xc]
cmp byte [eax + 0x51], 0
jne 0x801723
cmp dword [edi + 0x24], 0
jne 0x801723
mov esi, dword [esp + 8]
mov ecx, esi
call fcn.00792930
mov edi, eax
jmp 0x8013b5
mov ecx, ebx
mov dword [esp], ebp
call fcn.00792930
movzx ebp, word [eax + 0x32]
mov edi, eax
mov ebx, 1
cmp bp, 2
jb 0x8013aa
mov ebx, 1
mov esi, 1
mov ecx, edi
mov edx, ebx
push esi
push edi
call fcn.00802310
add esp, 8
test eax, eax
je 0x80137f
dec word [edi + 0x34]
jmp 0x8013a2
mov eax, dword [edi + 0x20]
mov ecx, dword [eax + esi*4]
mov dword [eax + ebx*4], ecx
mov eax, dword [edi + 0x1c]
movzx ecx, byte [eax + esi]
mov byte [eax + ebx], cl
mov eax, dword [edi + 4]
movzx ecx, word [eax + esi*2]
mov word [eax + ebx*2], cx
inc ebx
movzx ebp, word [edi + 0x32]
inc esi
movzx eax, bp
cmp esi, eax
jb 0x801367
mov esi, dword [esp + 8]
mov ebp, dword [esp]
mov word [edi + 0x32], bx
mov eax, dword [edi + 0x38]
mov edx, dword [esp + 0xc]
mov ecx, eax
or ecx, 0x20
mov dword [edi + 0x38], ecx
test byte [edx + 0xa8], 2
jne 0x8013d3
or eax, 0x28
mov dword [edi + 0x38], eax
movzx eax, word [edi + 0x32]
test ebp, ebp
mov dword [esp], eax
mov word [edi + 0x34], ax
je 0x8013f5
mov edx, dword [edi + 0x2c]
test edx, edx
jle 0x8013f5
mov ecx, ebp
push 0xb
call fcn.00802370
add esp, 4
mov eax, dword [esi + 0x1c]
mov edx, dword [esp]
mov dword [edi + 0x2c], eax
mov ebp, dword [esi + 8]
test ebp, ebp
jne 0x801422
mov eax, dword [esp + 8]
movsx ebx, word [eax + 0x2a]
test ebx, ebx
jg 0x8014ee
mov dword [esp + 4], 0
jmp 0x80152c
mov eax, dword [ebp + 0x38]
and eax, 3
cmp eax, 2
je 0x80147a
movzx eax, word [ebp + 0x32]
test dx, dx
je 0x801476
mov word [esp + 0x12], ax
movzx eax, ax
mov esi, edi
xor ebx, ebx
xor edi, edi
mov dword [esp + 4], eax
mov edx, dword [esp + 4]
mov ecx, ebp
push edi
push esi
call fcn.00802310
mov edx, dword [esp + 8]
add esp, 8
cmp eax, 1
adc ebx, 0
inc edi
cmp edi, edx
jne 0x801448
mov ecx, dword [esp + 4]
movzx eax, word [esp + 0x12]
test ebx, ebx
mov edi, esi
jne 0x801483
mov word [ebp + 0x34], ax
mov ebp, dword [ebp + 0x14]
test ebp, ebp
je 0x801405
jmp 0x801422
add ebx, ecx
mov ecx, dword [esp + 0xc]
mov edx, ebp
push ebx
call fcn.00802380
add esp, 4
test eax, eax
jne 0x801723
movzx eax, word [ebp + 0x32]
xor ebx, ebx
movzx esi, ax
movzx edx, ax
mov ecx, ebp
push ebx
push edi
call fcn.00802310
add esp, 8
test eax, eax
jne 0x8014e0
mov eax, dword [edi + 4]
mov ecx, dword [ebp + 4]
movzx eax, word [eax + ebx*2]
mov word [ecx + esi*2], ax
mov eax, dword [edi + 0x20]
mov ecx, dword [ebp + 0x20]
mov eax, dword [eax + ebx*4]
mov dword [ecx + esi*4], eax
mov eax, dword [edi + 0x1c]
cmp byte [eax + ebx], 0
je 0x8014df
or byte [ebp + 0x39], 2
inc esi
mov edx, dword [esp]
inc ebx
cmp ebx, edx
je 0x80147a
movzx eax, word [ebp + 0x32]
jmp 0x8014a5
mov ebp, dword [edi + 4]
xor esi, esi
mov dword [esp + 4], 0
mov ecx, ebp
push esi
call fcn.00802410
add esp, 4
test eax, eax
jne 0x801524
mov eax, dword [esp + 8]
lea ecx, [esi + esi*4]
mov eax, dword [eax + 4]
mov eax, dword [eax + ecx*4 + 0x10]
shr eax, 5
not eax
and eax, 1
add dword [esp + 4], eax
mov edx, dword [esp]
inc esi
cmp esi, ebx
jne 0x8014fb
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
add eax, edx
mov edx, edi
push eax
call fcn.00802380
add esp, 4
test eax, eax
jne 0x801723
mov eax, dword [esp + 8]
mov edx, dword [esp]
mov dword [esp + 4], edi
movzx eax, word [eax + 0x2a]
test ax, ax
jle 0x80171a
mov ebp, fcn.0082f910
mov edi, eax
xor esi, esi
not ebp
and ebp, 1
mov eax, dword [esp + 4]
mov dword [esp], edx
mov ebx, dword [eax + 4]
mov ecx, ebx
push esi
call fcn.00802410
add esp, 4
test eax, eax
je 0x801590
mov edx, dword [esp]
jmp 0x80170e
mov eax, dword [esp + 8]
lea ecx, [esi + esi*4]
mov eax, dword [eax + 4]
test byte [eax + ecx*4 + 0x10], 0x20
je 0x8015a9
mov edx, dword [esp]
jmp 0x80170e
mov ecx, ebp
xor eax, eax
movzx edx, byte [0xbb3b93]
add ecx, fcn.0082f910
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jb 0x8016f0
mov al, byte [0xbb3b93]
mov edx, ebp
xor ecx, ecx
add edx, fcn.0082f910
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 6]
mov dl, 1
and cl, 7
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbb3b93], dl
jne 0x8015d9
mov edx, ebp
xor ecx, ecx
movzx eax, al
add edx, fcn.0082f910
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 6]
and cl, 7
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x801658
mov ecx, ebp
xor eax, eax
movzx edx, byte [0xbb3b93]
add ecx, fcn.0082f910
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jae 0x80162c
jmp 0x8016f0
mov ecx, ebp
xor eax, eax
movzx edx, byte [0xbb3b93]
add ecx, fcn.0082f910
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jb 0x8016ca
mov ecx, ebp
xor eax, eax
mov edi, dword [str.2_p0]
add ecx, fcn.0082f910
sete al
mov ecx, eax
not ecx
and ecx, 0x91
lea ecx, [eax + ecx*2 + 0x713e5f4e]
mov edx, ecx
xor edi, ecx
shr edx, 0x1f
mov dword [str.2_p0], edi
not edi
or edx, ecx
and cl, 7
imul edx, edi
xor dword [0xbb3b8c], edx
mov dl, 1
shl dl, cl
or byte [0xbb3b93], dl
mov ecx, ebp
xor eax, eax
add ecx, fcn.0082f910
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [eax + ecx*2 + 6]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb3b93], al
mov edx, dword [esp]
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov word [ebx + edx*2], si
mov eax, dword [eax + 0x20]
mov dword [eax + edx*4], str.2_p0
inc edx
movzx edi, word [ecx + 0x2a]
inc esi
movsx eax, di
cmp esi, eax
jl 0x80156f
mov ecx, dword [esp + 4]
call fcn.00802430
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.00989fe9
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret