Function at 0x416040
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a8
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], edi
mov eax, dword [edi + 0xd0]
mov ebx, dword [edi + 0xdc]
mov dword [ebp - 0x30], eax
mov eax, esi
mov ecx, dword [edi + 0x1ec]
and esi, 3
mov edx, dword [edi + 0x1f0]
shr eax, 2
push edx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x64], ecx
lea eax, [esi + eax*4]
mov dword [ebp - 0x54], edx
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x58], eax
shl eax, 4
add eax, ebx
mov dword [ebp - 0x48], eax
mov eax, dword [eax]
mov eax, dword [esi + eax*4]
add eax, ecx
push eax
mov eax, dword [edi + 0x2acc4]
call eax
movzx ebx, byte [edi + 0x31a]
add esp, 8
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0xcfac]
xor edi, edi
mov dword [ebp - 0x44], ebx
mov dword [ebp + 8], eax
test ebx, ebx
jle 0x416168
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1a4]
mov dword [ebp - 8], eax
lea esp, [esp]
mov edx, ecx
mov ecx, eax
push edi
call fcn.00414db0
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
lea esi, [ebp - 0x11c]
lea esi, [esi + edi*4]
push 0
push 0
movzx edx, byte [eax + edi + 0x31b]
mov ecx, esi
call fcn.00415f80
mov ecx, dword [ebp - 8]
add esp, 0x10
mov esi, dword [esi]
mov edx, dword [ecx]
sub edx, dword [ebp - 0x1c]
shl edx, 6
add edx, eax
mov eax, esi
mov ecx, edx
mov dword [ebp + edi*4 - 0xbc], edx
and ecx, 0x3f
shr edx, 6
imul ecx, dword [ebp + 8]
and eax, 0x3f
imul edx, dword [ebp + 8]
shr esi, 6
add ecx, 0x20
add eax, ecx
mov ecx, dword [ebp - 0xc]
shr eax, 6
add eax, edx
add eax, esi
mov dword [ebp + edi*4 - 0xec], eax
inc edi
mov eax, dword [ebp - 8]
add eax, 8
mov dword [ebp - 8], eax
cmp edi, ebx
jl 0x4160e0
mov esi, dword [ebp - 0x30]
lea eax, [ebp - 0x19c]
xor edi, edi
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x48]
add eax, 4
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], eax
nop
mov eax, dword [eax]
push dword [ebp - 0x54]
mov eax, dword [esi + eax*4]
add eax, dword [ebp - 0x64]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x2acc4]
call eax
xor esi, esi
mov dword [ebp - 0x6c], eax
add esp, 8
mov dword [ebp - 0x34], esi
test ebx, ebx
jle 0x416378
lea eax, [ebp - 0x11c]
add eax, edi
lea edx, [ebp - 0xbc]
mov dword [ebp - 0x74], eax
add edx, edi
mov eax, dword [ebp - 8]
add edi, 0xc
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x4c], edi
lea ecx, [eax - 8]
add eax, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x140]
sub eax, 0xc
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
add eax, 0x31b
mov dword [ebp - 0x60], eax
lea esp, [esp]
mov edx, ecx
lea ecx, [ebp - 0x8c]
push esi
call fcn.00414db0
push dword [ebp - 0x6c]
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x3c]
push 0
push 0
movzx edx, byte [eax + esi]
call fcn.00415f80
mov ecx, dword [ebp - 0x74]
add esp, 0x10
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0x70], eax
mov esi, dword [ecx]
mov ecx, dword [ebp - 0x1c]
add esi, dword [ebp - 0x3c]
mov dword [ebp - 0x50], esi
sub edx, dword [ecx]
mov ecx, dword [ebp - 0x68]
shl edx, 6
add edx, dword [ecx]
add edx, eax
mov eax, esi
and eax, 0x3f
mov dword [ebp - 0x40], edx
mov ecx, edx
add eax, 0x20
and ecx, 0x3f
imul ecx, dword [ebp + 8]
add ecx, eax
mov eax, edx
shr eax, 6
imul eax, dword [ebp + 8]
shr ecx, 6
add ecx, eax
mov eax, esi
shr eax, 6
add ecx, eax
xor eax, eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x2c], eax
lea esi, [eax + 1]
cmp ebx, esi
jle 0x41631c
mov eax, dword [ebp - 0xc]
lea edi, [ebp - 0x84]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x34]
mov edx, ebx
mov ecx, edi
call fcn.00414db0
mov ecx, dword [ebp - 0x28]
add esp, 4
mov eax, dword [ebp + ecx - 0x118]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0x20], eax
mov eax, dword [edi]
sub eax, dword [ebx]
shl eax, 6
add eax, dword [ebp + ecx - 0xb8]
add eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x20]
mov edx, eax
and edx, 0x3f
and ecx, 0x3f
imul edx, dword [ebp + 8]
add ecx, 0x20
add edx, ecx
mov ecx, eax
shr ecx, 6
imul ecx, dword [ebp + 8]
shr edx, 6
add edx, ecx
mov ecx, dword [ebp - 0x20]
shr ecx, 6
add edx, ecx
mov ecx, dword [ebp - 0x38]
cmp edx, ecx
jae 0x4162ff
mov ecx, edx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x50], edx
mov edx, eax
mov eax, esi
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x2c], eax
jmp 0x416305
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x28], 4
inc esi
add ebx, 8
add edi, 8
cmp esi, dword [ebp - 0x44]
jl 0x416287
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp + eax*8 - 0x8c]
mov ebx, dword [ebp - 0x18]
add dword [ebp - 0x18], 8
mov dword [esi], eax
mov esi, dword [ebp - 0x2c]
mov dword [ebp + edi - 0xec], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp + edi - 0xbc], edx
mov eax, dword [ebp + esi*8 - 0x88]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x44]
mov dword [ebp + edi - 0x11c], eax
mov eax, dword [ebp - 0x24]
mov dword [eax + edi], esi
add edi, 4
mov esi, dword [ebp - 0x34]
inc esi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x34], esi
cmp esi, ebx
jl 0x4161f0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
add edi, 0xc
add dword [ebp - 8], 0x18
add eax, 4
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edi
cmp edi, 0x24
jl 0x416180
mov edx, dword [ebp - 0xc8]
xor esi, esi
mov dword [ebp + 8], edx
lea eax, [esi + 1]
cmp ebx, eax
jle 0x4163c7
lea esp, [esp]
mov ecx, dword [ebp + eax*4 - 0xc8]
cmp ecx, edx
jae 0x4163bf
mov edx, ecx
mov esi, eax
inc eax
cmp eax, ebx
jl 0x4163b0
mov dword [ebp + 8], edx
mov eax, dword [ebp - 0x14]
mov edi, 9
mov ecx, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x48]
mov edx, dword [eax + 0xcc]
mov eax, dword [ebp - 0x58]
add eax, eax
mov dword [ebp - 0x24], edx
mov eax, dword [ecx + eax*8 + 0xc]
lea ecx, [edx + eax*4]
lea eax, [esi*4]
xor eax, dword [ecx]
and eax, 0xfc
xor dword [ecx], eax
add ebx, 0xc
lea ecx, [ecx]
mov ecx, dword [ebx - 4]
lea ebx, [ebx - 4]
sub edi, 3
lea edx, [edx + ecx*4]
lea eax, [edi + esi]
mov esi, dword [ebp + eax*4 - 0x140]
lea ecx, [esi*4]
xor ecx, dword [edx]
and ecx, 0xfc
xor dword [edx], ecx
mov edx, dword [ebp - 0x24]
test edi, edi
jg 0x416400
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret