Function at 0x4af8e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc40
mov eax, dword [0x7c6ee4]
xor eax, esp
mov dword [esp + 0xc3c], eax
mov al, byte [esp + 0xc44]
xorps xmm0, xmm0
push ebx
mov byte [esp + 7], al
mov byte [esp + 0x14], al
xor eax, eax
push ebp
mov word [esp + 0xd], ax
mov ebp, ecx
mov ecx, dword [0x7c81bc]
mov byte [esp + 0xf], al
mov byte [esp + 0x42c], al
mov dword [esp + 0x42d], eax
mov word [esp + 0x431], ax
mov byte [esp + 0x14], al
mov word [esp + 0x15], ax
mov byte [esp + 0x17], al
mov byte [esp + 0x434], al
mov dword [esp + 0x43d], eax
mov word [esp + 0x441], ax
mov byte [esp + 0x443], al
lea eax, [esp + 0x444]
push esi
push eax
mov byte [esp + 0x14], 0
movq qword [esp + 0x43d], xmm0
mov dword [esp + 0x424], 0x494d4e4f
mov word [esp + 0x428], 0x524b
call fcn.004a7020
mov ecx, dword [0x7c81bc]
lea eax, [esp + 0x448]
push eax
call fcn.004a7670
test al, al
jne 0x4af9ad
mov ebx, 0xe002
jmp 0x4afce9
push edi
push 0x3e8
call dword [0x530340]
add esp, 4
mov ecx, ebp
call fcn.004b3ed0
mov ebx, eax
cmp ebx, 0x9000
jne 0x4afca2
mov eax, dword [esp + 0xc58]
cmp eax, 0xca31
je 0x4afa14
cmp eax, 0xca32
je 0x4afa14
cmp eax, 0xca30
jne 0x4afa0a
movzx ebx, byte [esp + 0x13]
mov esi, dword [0x7c90fc]
lea eax, [ebx*4]
add eax, ebp
mov esi, dword [eax + esi + 0x102b0]
jmp 0x4afa5a
mov ebx, 0xe02e
jmp 0x4afce8
movzx ebx, byte [esp + 0x13]
lea esi, [esp + 0x1d]
mov edx, dword [esp + 0xc5c]
mov edi, dword [0x7c90fc]
add edi, 0x102b1
lea ecx, [ebx*4]
sub ecx, edx
add ecx, ebp
add edi, ecx
sub esi, edx
mov ecx, 3
mov al, byte [edi + edx]
lea edx, [edx + 1]
xor al, byte [edx - 1]
mov byte [esi + edx - 1], al
sub ecx, 1
jne 0x4afa44
mov esi, dword [esp + 0x1c]
mov eax, dword [0x7c90e8]
lea ecx, [ebx*2]
add ecx, ebp
lea edx, [ebx*4]
add edx, ebp
mov di, word [ecx + eax + 0x102b0]
mov eax, dword [0x7c90e4]
mov word [esp + 0x434], di
mov eax, dword [edx + eax + 0x102b0]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x436], eax
mov eax, dword [0x7c90ec]
movzx eax, word [ecx + eax + 0x102b0]
mov word [esp + 0x43c], ax
mov eax, dword [0x7c90f0]
movzx eax, word [ecx + eax + 0x102b0]
mov ecx, ebp
mov word [esp + 0x43e], ax
mov eax, dword [0x7c90f4]
mov eax, dword [edx + eax + 0x102b0]
mov dword [esp + 0x440], eax
mov eax, dword [0x7c90f8]
mov eax, dword [edx + eax + 0x102b0]
mov dword [esp + 0x444], eax
lea eax, [ebp + 0x212f6]
push eax
call fcn.004b4950
mov ebx, eax
cmp ebx, 0x9000
jne 0x4afca2
mov ecx, ebp
call fcn.004b2850
mov ebx, eax
cmp ebx, 0xe02b
jne 0x4afb1d
lea ebx, [eax - 0xa]
jmp 0x4afca2
cmp ebx, 0xe02c
mov eax, 0xe023
cmove ebx, eax
cmp ebx, 0x9000
jne 0x4afca2
lea eax, [esp + 0x43c]
mov ecx, ebp
push eax
call fcn.004b74a0
mov ebx, eax
cmp ebx, 0x9000
jne 0x4afca2
push dword [ebp + 0x220]
mov eax, dword [esp + 0x20]
mov ecx, ebp
mov dword [esp + 0x18], eax
lea eax, [esp + 0x428]
push eax
lea eax, [esp + 0x1c]
push eax
push 1
call fcn.004b6600
mov ebx, eax
cmp ebx, 0x9000
jne 0x4afca2
mov eax, dword [esp + 0x424]
mov ecx, ebp
push dword [ebp + 0x220]
mov dword [esp + 0x430], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x432], eax
lea eax, [esp + 0x430]
push eax
lea eax, [esp + 0x1c]
mov word [esp + 0x1c], 0
push eax
push 2
mov word [esp + 0x26], di
call fcn.004b6600
mov ebx, eax
cmp ebx, 0x9000
jne 0x4afca2
mov eax, dword [esp + 0x434]
mov dword [esp + 0x42c], eax
mov ax, word [esp + 0x438]
mov word [esp + 0x430], ax
mov al, byte [ebp + 0x212f9]
and al, 0xf0
mov dword [esp + 0x14], esi
cmp al, 0x10
jne 0x4afc0a
mov byte [esp + 0x14], 0xe
jmp 0x4afc23
cmp byte [esp + 0xc60], 0
mov eax, 8
mov ecx, 0xc8
cmovne eax, ecx
mov byte [esp + 0x14], al
push dword [ebp + 0x220]
lea eax, [esp + 0x430]
mov ecx, ebp
push eax
lea eax, [esp + 0x1c]
push eax
push 3
call fcn.004b6600
mov ebx, eax
cmp ebx, 0x9000
jne 0x4afca2
cmp byte [esp + 0xc60], 1
jne 0x4afc5e
mov al, byte [esp + 0x13]
shl al, 4
or al, 5
jmp 0x4afc84
mov al, byte [ebp + 0x212f9]
and al, 0xf0
cmp al, 0x10
mov al, byte [esp + 0x13]
jne 0x4afc7f
shl al, 4
or al, 2
mov dword [ebp + 0x220], 1
jmp 0x4afc84
shl al, 4
or al, 4
mov byte [esp + 0x14], al
mov ecx, ebp
push 1
lea eax, [esp + 0x430]
push eax
lea eax, [esp + 0x1c]
push eax
push 4
call fcn.004b6600
mov ebx, eax
cmp ebx, 0xe02b
jne 0x4afcb1
mov ebx, 0xe021
jmp 0x4afce8
cmp ebx, 0xe02c
jne 0x4afcc0
mov ebx, 0xe026
jmp 0x4afce8
cmp ebx, 0x9000
jne 0x4afce8
push dword [esp + 0xc60]
lea eax, [ebp + 0x102b0]
mov ecx, ebp
push eax
push dword [esp + 0x28]
lea eax, [ebp + 0x212f6]
push eax
call fcn.004b5740
pop edi
push 0x3ff
lea eax, [esp + 0x84d]
push 0
push eax
call fcn.0050c5b0
push 0x400
lea eax, [esp + 0x458]
push 0
push eax
call fcn.0050c5b0
add esp, 0x18
mov dword [esp + 0x18], 0
cmp dword [ebp + 0x212bc], 2
mov byte [esp + 0x848], 2
jne 0x4afd3e
push 2
call fcn.00433040
add esp, 4
mov byte [esp + 0x848], al
mov ecx, dword [0x7c81bc]
lea eax, [esp + 0x18]
push 0x384
push eax
push 1
lea eax, [esp + 0x454]
push eax
push 1
lea eax, [esp + 0x85c]
push eax
call fcn.004a6b10
cmp dword [ebp + 0x212bc], 2
jne 0x4afd9f
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4afd9f
xor esi, esi
test eax, eax
jle 0x4afd9f
nop
movzx eax, byte [esp + esi + 0x448]
push eax
call fcn.00432f40
mov byte [esp + esi + 0x44c], al
add esp, 4
inc esi
cmp esi, dword [esp + 0x18]
jl 0x4afd80
mov ecx, dword [0x7c81bc]
lea eax, [esp + 0x20]
push eax
call fcn.004a6f90
mov ecx, dword [0x7c81bc]
lea eax, [esp + 0x20]
push eax
call fcn.004a7670
mov ecx, dword [esp + 0xc48]
mov eax, ebx
pop esi
mov dword [ebp + 0x212bc], 0
pop ebp
pop ebx
xor ecx, esp
call fcn.0050b38b
add esp, 0xc40
ret 0x10