Function at 0x4a782b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x30
mov edx, 0x8000
push ebx
push esi
xor ebx, ebx
cmp eax, edx
push edi
cmova eax, edx
mov edi, ecx
push eax
push dword [ebp + 0xc]
push dword [edi + 0xe68c]
lea esi, [edi + 0xe680]
mov dword [esi + 4], ebx
mov dword [esi], ebx
call fcn.004b8db0
add esp, 0xc
cmp dword [edi + 0xe65c], ebx
jne 0x4a787b
push 0x40004
call fcn.004b7df5
pop ecx
mov dword [edi + 0xe65c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
test al, al
jns 0x4a78a2
mov ecx, esi
call fcn.004ad9ed
mov esi, eax
mov dword [ebp + 8], esi
test esi, esi
jne 0x4a789f
push ebx
mov ecx, edi
call fcn.004a82d4
jmp 0x4a78ab
dec esi
jmp 0x4a78a8
mov esi, dword [edi + 0xe6c0]
mov dword [ebp + 8], esi
mov eax, dword [edi + 0xe694]
mov dword [ebp - 0x1c], eax
cmp esi, eax
ja 0x4a7bbd
cmp esi, dword [edi + 0xe6b4]
ja 0x4a7bbd
push 0x38
mov dword [edi + 0xe6c0], esi
call fcn.004b7b0e
pop ecx
mov ecx, eax
mov dword [ebp + 0xc], ecx
mov dword [ecx + 0x34], ebx
mov dword [ecx + 0x10], ebx
cmp esi, dword [ebp - 0x1c]
jne 0x4a7941
cmp esi, 0x2000
ja 0x4a79c0
lea esi, [edi + 0xe690]
push ecx
mov ecx, esi
call fcn.004aa3a0
push 0x38
call fcn.004b7b0e
mov dword [ebp - 8], eax
mov dword [eax + 0x34], ebx
mov dword [eax + 0x10], ebx
mov ecx, dword [esi]
lea esi, [edi + 0xe6b0]
mov edx, dword [edi + 0xe694]
mov dword [ecx + edx*4 - 4], eax
mov ecx, dword [edi + 0xe694]
mov eax, dword [ebp + 0xc]
dec ecx
mov dword [eax + 0xc], ecx
mov ecx, esi
call fcn.004aa3a0
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov dword [eax + ecx*4 - 4], ebx
jmp 0x4a7950
mov eax, dword [edi + 0xe690]
mov eax, dword [eax + esi*4]
mov dword [ebp - 8], eax
mov dword [ecx + 0xc], esi
lea eax, [edi + 0xe6a0]
mov edx, ebx
mov ecx, ebx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], ecx
cmp dword [edi + 0xe6a4], ebx
jbe 0x4a79ce
sub ecx, dword [ebp - 0x14]
mov esi, edx
mov edx, dword [eax]
mov eax, dword [ebp - 0xc]
mov eax, dword [edx + eax*4]
mov dword [edx + ecx*4], eax
lea edx, [esi + 1]
mov eax, dword [edi + 0xe6a0]
mov ecx, dword [ebp - 0xc]
cmp dword [eax + ecx*4], ebx
lea eax, [edi + 0xe6a0]
cmovne edx, esi
mov dword [ebp - 0x14], edx
test edx, edx
je 0x4a79a0
mov esi, dword [edi + 0xe6a0]
mov dword [esi + ecx*4], ebx
mov esi, dword [edi + 0xe6a4]
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, esi
jb 0x4a7968
test edx, edx
jne 0x4a79df
mov dword [ebp - 0x18], eax
cmp esi, 0x2000
jbe 0x4a79d1
mov ecx, dword [ebp + 0xc]
push 0x38
push ecx
call fcn.004b788c
pop ecx
jmp 0x4a7bbc
mov dword [ebp - 0x18], eax
push ecx
mov ecx, eax
call fcn.004aa3a0
mov eax, dword [ebp - 0x18]
xor edx, edx
inc edx
mov ecx, dword [edi + 0xe6a4]
lea esi, [edi + 0xe680]
mov eax, dword [eax]
sub ecx, edx
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
mov ecx, esi
call fcn.004ad9ed
test byte [ebp - 0x10], 0x40
mov edx, dword [ebp + 0xc]
lea ecx, [eax + 0x102]
cmove ecx, eax
mov eax, dword [edi + 0x70]
add eax, ecx
mov dword [ebp - 0x18], ecx
and eax, dword [edi + 0xe6c8]
test byte [ebp - 0x10], 0x20
mov dword [edx], eax
je 0x4a7a40
mov ecx, esi
call fcn.004ad9ed
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], eax
mov edx, dword [ebp + 8]
mov ecx, dword [edi + 0xe6b0]
mov dword [ecx + edx*4], eax
mov edx, dword [ebp + 0xc]
jmp 0x4a7a5b
mov ecx, dword [ebp + 8]
cmp ecx, dword [edi + 0xe6b4]
jae 0x4a7a56
mov eax, dword [edi + 0xe6b0]
mov eax, dword [eax + ecx*4]
jmp 0x4a7a58
mov eax, ebx
mov dword [edx + 4], eax
mov eax, dword [edi + 0x74]
cmp eax, dword [edi + 0x70]
je 0x4a7a73
sub eax, dword [edi + 0x70]
and eax, dword [edi + 0xe6c8]
cmp eax, dword [ebp - 0x18]
mov al, 1
jbe 0x4a7a75
mov al, bl
test byte [ebp - 0x10], 0x10
mov byte [edx + 8], al
lea eax, [edx + 0x14]
mov dword [edx + 0x14], ebx
mov dword [edx + 0x18], ebx
mov dword [edx + 0x1c], ebx
mov dword [edx + 0x20], ebx
mov dword [edx + 0x28], ebx
mov dword [edx + 0x2c], ebx
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 4]
mov dword [edx + 0x24], eax
je 0x4a7ae1
mov ecx, esi
call fcn.004ad9d3
mov edx, dword [esi + 4]
mov edi, ebx
mov ebx, dword [ebp - 0x18]
add edx, 7
mov ecx, edx
shr eax, 9
shr ecx, 3
add dword [esi], ecx
and edx, 7
mov dword [ebp - 0x14], eax
mov dword [esi + 4], edx
xor eax, eax
mov ecx, edi
inc eax
shl eax, cl
test dword [ebp - 0x14], eax
je 0x4a7ad6
mov ecx, esi
call fcn.004ad9ed
mov dword [ebx], eax
inc edi
add ebx, 4
cmp edi, 7
jb 0x4a7ac1
xor ebx, ebx
mov eax, dword [ebp - 0x1c]
cmp dword [ebp + 8], eax
jne 0x4a7bda
mov ecx, esi
call fcn.004ad9ed
mov edi, eax
cmp edi, 0x10000
jae 0x4a7bbd
test edi, edi
je 0x4a7bbd
mov ecx, dword [esi]
add ecx, edi
cmp ecx, dword [ebp + 0x10]
ja 0x4a7bbd
push edi
lea ecx, [ebp - 0x2c]
call fcn.004987cd
mov edx, dword [ebp - 0x2c]
mov dword [ebp + 0x10], ebx
test edi, edi
je 0x4a7b67
mov eax, dword [esi]
add eax, 3
cmp eax, 0x8000
jae 0x4a7bb2
mov ecx, esi
call fcn.004ad9d3
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x2c]
shr eax, 8
mov byte [edx + ecx], al
mov ecx, dword [esi + 4]
add ecx, 8
mov eax, ecx
and ecx, 7
shr eax, 3
add dword [esi], eax
mov dword [esi + 4], ecx
mov ecx, dword [ebp + 0x10]
inc ecx
mov dword [ebp + 0x10], ecx
cmp ecx, edi
jb 0x4a7b2a
xor eax, eax
mov cl, bl
inc eax
cmp edi, eax
jbe 0x4a7b78
xor cl, byte [edx + eax]
inc eax
cmp eax, edi
jb 0x4a7b70
cmp cl, byte [edx]
jne 0x4a7ba6
push edi
or ecx, 0xffffffff
call fcn.004ac238
pop ecx
not eax
mov ecx, ebx
cmp dword [ecx + 0x51619c], eax
jne 0x4a7b9a
cmp dword [ecx + 0x516198], edi
je 0x4a7bc6
add ecx, 0xc
inc ebx
cmp ecx, 0x48
jb 0x4a7b8a
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 8]
push edx
call fcn.004c5e5a
pop ecx
jmp 0x4a7bdd
test edx, edx
je 0x4a7bbd
push edx
call fcn.004c5e5a
pop ecx
xor al, al
pop edi
pop esi
pop ebx
leave
ret 0xc
mov esi, dword [ebp - 8]
mov edx, dword [ebp - 0x2c]
imul eax, ebx, 0xc
mov eax, dword [eax + 0x5161a0]
mov dword [esi + 0x10], eax
jmp 0x4a7ba9
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0x10]
mov dword [eax + 0x10], ecx
mov al, 1
jmp 0x4a7bbf