Function at 0x4157d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 0x1f0]
mov edx, dword [esi + 0xdc]
mov ecx, dword [esi + 0xd0]
mov dword [ebp - 0x3c], ebx
mov ebx, eax
and eax, 3
shr ebx, 2
lea eax, [eax + ebx*4]
mov dword [ebp - 0x60], eax
shl eax, 4
mov dword [ebp - 0x50], edx
add edx, eax
mov eax, dword [edx]
mov eax, dword [ecx + eax*4]
push edi
mov edi, dword [esi + 0x1ec]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 0x3c]
push ecx
add eax, edi
mov dword [ebp - 0x48], edx
mov edx, dword [esi + 0x2acc4]
push eax
mov dword [ebp - 0x54], edi
call edx
movzx ebx, byte [esi + 0x31a]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0xcfac]
add esp, 8
xor edi, edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], eax
test ebx, ebx
jle 0x4158da
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
lea eax, [ebp - 0x198]
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
push edi
push ecx
call fcn.00414470
movzx edx, byte [esi + edi + 0x31b]
mov eax, dword [ebp - 0x18]
push 0
push edx
lea ebx, [ebp + edi*4 - 0x110]
push ebx
xor ecx, ecx
call fcn.00415710
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
sub edx, dword [ebp - 0x14]
mov ecx, dword [ebx]
shl edx, 6
add eax, edx
add dword [ebp - 4], 8
mov edx, eax
and edx, 0x3f
imul edx, dword [ebp - 8]
mov dword [ebp + edi*4 - 0xb0], eax
shr eax, 6
imul eax, dword [ebp - 8]
mov ebx, ecx
and ebx, 0x3f
lea edx, [edx + ebx + 0x20]
mov ebx, dword [ebp - 0xc]
shr edx, 6
add edx, eax
shr ecx, 6
add edx, ecx
mov dword [ebp + edi*4 - 0xe0], edx
inc edi
add esp, 0x14
cmp edi, ebx
jl 0x415861
mov ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x190]
add ecx, 4
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx + eax*4]
mov edx, dword [ebp - 0x3c]
add eax, dword [ebp - 0x54]
push edx
mov edx, dword [esi + 0x2acc4]
push eax
call edx
xor edi, edi
add esp, 8
mov dword [ebp - 0x24], edi
test ebx, ebx
jle 0x415b57
mov ecx, eax
sar ecx, 9
xor ebx, ebx
cmp ecx, 0x16
setg bl
mov edx, 0x16
sub edx, ecx
neg ebx
and ebx, edx
mov edx, dword [ebp - 0x10]
add ebx, ecx
mov ecx, ebx
shl ecx, 9
sub eax, ecx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 4]
add eax, 0xc
mov dword [ebp - 0x18], eax
add edx, 0x10
lea eax, [ebp - 0x134]
sub eax, 0xc
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x58], eax
jmp 0x41596b
mov edi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x80]
push edi
add eax, 0xfffffff8
push ecx
mov dword [ebp - 0x28], eax
call fcn.00414470
movzx eax, byte [esi + edi + 0x31b]
lea eax, [eax + eax*8]
shl eax, 4
add eax, ebx
add eax, eax
movsx esi, word [eax + eax + 0x4a9820]
movsx edi, word [eax + eax + 0x4a9822]
movsx ecx, word [eax + eax + 0x4a9824]
add eax, eax
movsx eax, word [eax + 0x4a9826]
sub eax, edi
imul eax, dword [ebp - 0x40]
sar eax, 9
lea edx, [eax + edi]
sub ecx, esi
xor ebx, ebx
add esp, 8
test edx, edx
sets bl
imul ecx, dword [ebp - 0x40]
neg ebx
and ebx, edx
sub eax, ebx
add eax, edi
mov ebx, eax
imul ebx, eax
xor edx, edx
mov eax, ecx
sar eax, 9
lea edi, [eax + esi]
shr ebx, 4
test edi, edi
sets dl
mov dword [ebp - 0x34], 1
neg edx
and edx, edi
mov edi, dword [ebp - 0x28]
sub eax, edx
mov edx, dword [ebp - 4]
mov ecx, dword [ebp + edx - 0x110]
add eax, esi
mov esi, dword [ebp - 0x80]
sub esi, dword [edi]
mov dword [ebp - 0x5c], eax
shl esi, 6
add esi, dword [ebp + edx - 0xb0]
add ecx, ebx
add esi, eax
mov eax, esi
and eax, 0x3f
imul eax, dword [ebp - 8]
mov edx, ecx
and edx, 0x3f
lea edi, [eax + edx + 0x20]
mov eax, esi
shr eax, 6
imul eax, dword [ebp - 8]
shr edi, 6
add edi, eax
mov edx, ecx
shr edx, 6
xor eax, eax
add edi, edx
cmp dword [ebp - 0xc], 1
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x28], eax
jle 0x415b07
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x78]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push ecx
call fcn.00414470
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp + ecx - 0x10c]
mov edx, dword [ebp - 0x20]
add eax, ebx
mov dword [ebp - 0x30], eax
mov eax, dword [edx]
mov edx, dword [ebp - 0x1c]
sub eax, dword [edx]
mov edx, dword [ebp - 0x30]
shl eax, 6
add eax, dword [ebp + ecx - 0xac]
and edx, 0x3f
add eax, dword [ebp - 0x5c]
add esp, 8
mov ecx, eax
and ecx, 0x3f
imul ecx, dword [ebp - 8]
lea ecx, [ecx + edx + 0x20]
mov edx, eax
shr edx, 6
imul edx, dword [ebp - 8]
shr ecx, 6
mov dword [ebp - 0x64], ecx
add ecx, edx
mov edx, dword [ebp - 0x30]
shr edx, 6
add ecx, edx
cmp ecx, edi
jae 0x415ae2
mov edx, dword [ebp - 0x34]
mov edi, ecx
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x44], ecx
mov esi, eax
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x34]
add dword [ebp - 0x2c], 4
mov ecx, 8
add dword [ebp - 0x1c], ecx
add dword [ebp - 0x20], ecx
inc eax
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0xc]
jl 0x415a69
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + eax*8 - 0x80]
mov ebx, dword [ebp - 0x14]
mov dword [ebx], edx
mov edx, dword [ebp + eax*8 - 0x7c]
mov dword [ebx + 4], edx
mov edx, dword [ebp - 0x18]
mov dword [ebp + edx - 0x110], ecx
mov ecx, dword [ebp - 0x58]
mov dword [ecx + edx], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp + edx - 0xb0], esi
mov esi, dword [ebp + 8]
inc eax
mov dword [ebp + edx - 0xe0], edi
add ebx, 8
add edx, 4
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edx
cmp eax, dword [ebp - 0xc]
jl 0x415965
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
add dword [ebp - 0x38], 4
add dword [ebp - 0x10], 0x18
add eax, 0xc
mov dword [ebp - 4], eax
cmp eax, 0x24
jl 0x4158f3
mov edi, dword [ebp - 0xbc]
xor ecx, ecx
lea eax, [ecx + 1]
mov dword [ebp + 8], edi
cmp ebx, eax
jle 0x415b9a
mov edx, dword [ebp + eax*4 - 0xbc]
cmp edx, edi
jae 0x415b92
mov edi, edx
mov ecx, eax
inc eax
cmp eax, ebx
jl 0x415b83
mov dword [ebp + 8], edi
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x50]
mov esi, dword [esi + 0xcc]
mov ebx, dword [ebp - 0x48]
add eax, eax
mov eax, dword [edx + eax*8 + 0xc]
lea edx, [ecx*4]
xor edx, dword [esi + eax*4]
mov edi, 9
and edx, 0xfc
xor dword [esi + eax*4], edx
add ebx, 0xc
lea ebx, [ebx]
mov edx, dword [ebx - 4]
sub edi, 3
lea eax, [edi + ecx]
mov ecx, dword [ebp + eax*4 - 0x134]
sub ebx, 4
lea eax, [ecx*4]
xor eax, dword [esi + edx*4]
and eax, 0xfc
xor dword [esi + edx*4], eax
test edi, edi
jg 0x415bd0
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret