Function at 0x418740
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, ecx
sar edx, 1
push ebx
lea ebx, [eax + edx*4]
mov edx, dword [ebp + 8]
push esi
xor ecx, ecx
push edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
cmp edx, 4
jl 0x418770
mov eax, edx
sar eax, 1
lea edi, [eax*4 + 0x5c4eb8]
jmp 0x418775
mov edi, 0x5c3eb8
lea eax, [edi + 0x1000]
mov dword [ebp - 0x44], eax
lea eax, [edx*4]
mov dword [ebp + 8], edi
mov dword [ebp - 0x14], eax
jmp 0x418796
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0x10]
mov eax, ecx
sar eax, 4
and eax, 0xf
mov esi, dword [ebp + 0xc]
movzx edx, byte [eax + 0x5eb068]
mov eax, ecx
and eax, 0xf
movzx eax, byte [eax + 0x5eb068]
shl eax, 4
or edx, eax
mov eax, ecx
sar eax, 8
shl edx, 4
movzx eax, byte [eax + 0x5eb068]
or edx, eax
inc ecx
mov eax, edx
xor eax, 0xfff
mov dword [ebp - 8], ecx
mov ecx, esi
sar eax, cl
sar edx, cl
mov esi, dword [ebx + eax*4 - 4]
mov ecx, dword [ebx + edx*4]
mov eax, dword [ebx + eax*4]
mov edx, dword [ebx + edx*4 + 4]
mov dword [ebp - 0x40], ecx
add ecx, esi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], esi
mov esi, edx
sub esi, eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x38], edx
cdq
mov edi, eax
mov ebx, edx
mov eax, ecx
cdq
push ebx
mov ecx, eax
mov eax, edx
push edi
push eax
push ecx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
call fcn.0057d2a0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov edi, edx
mov eax, dword [eax]
cdq
mov dword [ebp - 0x18], eax
mov ecx, edx
mov eax, esi
push ecx
push dword [ebp - 0x18]
cdq
mov esi, edx
mov ebx, eax
push esi
push ebx
mov dword [ebp - 0x2c], ecx
call fcn.0057d2a0
mov dword [ebp - 0x4c], eax
push dword [ebp - 0x1c]
add edi, edx
push dword [ebp - 0x20]
push esi
push ebx
call fcn.0057d2a0
push dword [ebp - 0x24]
mov dword [ebp - 0x4c], eax
push dword [ebp - 0x28]
mov esi, edx
push dword [ebp - 0x2c]
push dword [ebp - 0x18]
call fcn.0057d2a0
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x34]
mov ebx, dword [ebp + 8]
add ebx, dword [ebp - 0x14]
sub dword [ebp - 4], 0x10
mov dword [ebp - 0x4c], eax
sub esi, edx
mov edx, dword [ebp - 0x3c]
sub edx, dword [ebp - 0x40]
sar ecx, 1
sar edx, 1
lea eax, [edi + ecx]
mov dword [ebp + 8], ebx
mov ebx, dword [ebp - 0xc]
sub ecx, edi
mov dword [ebx], eax
lea eax, [edx + esi]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 4]
sub esi, edx
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 8]
mov dword [eax + 0xc], esi
mov eax, ecx
sar eax, 4
and eax, 0xf
mov edi, dword [ebp - 0x10]
movzx edx, byte [eax + 0x5eb068]
mov eax, ecx
and eax, 0xf
mov ebx, dword [ebp + 8]
movzx eax, byte [eax + 0x5eb068]
shl eax, 4
or edx, eax
mov eax, ecx
sar eax, 8
shl edx, 4
movzx eax, byte [eax + 0x5eb068]
or edx, eax
inc ecx
mov eax, edx
xor eax, 0xfff
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0xc]
sar eax, cl
sar edx, cl
mov esi, dword [edi + eax*4 - 4]
mov ecx, dword [edi + edx*4]
mov eax, dword [edi + eax*4]
mov edx, dword [edi + edx*4 + 4]
mov dword [ebp - 0x1c], ecx
add ecx, esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], esi
mov esi, edx
sub esi, eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x24], edx
cdq
mov edi, eax
mov ebx, edx
mov eax, ecx
cdq
mov ecx, eax
mov eax, edx
push eax
push ecx
push ebx
push edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], eax
call fcn.0057d2a0
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 8]
mov ebx, edx
mov eax, dword [eax]
cdq
mov dword [ebp - 0x18], eax
mov ecx, edx
mov eax, esi
cdq
mov esi, edx
push esi
mov edi, eax
push edi
push ecx
push dword [ebp - 0x18]
mov dword [ebp - 0x2c], ecx
call fcn.0057d2a0
mov dword [ebp - 0x4c], eax
push esi
push edi
push dword [ebp - 0x40]
add ebx, edx
push dword [ebp - 0x3c]
call fcn.0057d2a0
push dword [ebp - 0x38]
mov dword [ebp - 0x4c], eax
push dword [ebp - 0x34]
mov esi, edx
push dword [ebp - 0x2c]
push dword [ebp - 0x18]
call fcn.0057d2a0
mov edi, dword [ebp + 8]
add edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x28]
sub esi, edx
mov edx, dword [ebp - 0x20]
sub edx, dword [ebp - 0x1c]
sar ecx, 1
mov dword [ebp - 0x4c], eax
mov dword [ebp + 8], edi
mov edi, dword [ebp - 0xc]
add dword [ebp - 0xc], 0x10
sar edx, 1
lea eax, [ebx + ecx]
mov dword [edi + 8], eax
lea eax, [edx + esi]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 4]
mov edi, dword [ebp + 8]
sub ecx, ebx
sub esi, edx
mov dword [eax], ecx
mov dword [eax + 4], esi
cmp edi, dword [ebp - 0x44]
jb 0x418790
nop
mov ecx, dword [ebp - 8]
mov eax, ecx
sar eax, 4
and eax, 0xf
mov ebx, dword [ebp - 0x10]
movzx edx, byte [eax + 0x5eb068]
mov eax, ecx
and eax, 0xf
sub edi, dword [ebp - 0x14]
movzx eax, byte [eax + 0x5eb068]
shl eax, 4
or edx, eax
mov eax, ecx
sar eax, 8
shl edx, 4
movzx eax, byte [eax + 0x5eb068]
or edx, eax
inc ecx
mov eax, edx
xor eax, 0xfff
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0xc]
sar eax, cl
sar edx, cl
mov dword [ebp + 8], edi
mov esi, dword [ebx + eax*4 - 4]
mov ecx, dword [ebx + edx*4]
mov eax, dword [ebx + eax*4]
mov edx, dword [ebx + edx*4 + 4]
mov dword [ebp - 0x20], ecx
add ecx, esi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], esi
mov esi, edx
sub esi, eax
mov eax, dword [edi]
mov dword [ebp - 0x28], edx
cdq
mov edi, eax
mov ebx, edx
mov eax, ecx
cdq
push ebx
mov ecx, eax
mov eax, edx
push edi
push eax
push ecx
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x3c], eax
call fcn.0057d2a0
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 8]
mov edi, edx
mov eax, dword [eax + 4]
cdq
mov dword [ebp - 0x18], eax
mov ecx, edx
mov eax, esi
push ecx
push dword [ebp - 0x18]
cdq
mov esi, edx
mov ebx, eax
push esi
push ebx
mov dword [ebp - 0x34], ecx
call fcn.0057d2a0
mov dword [ebp - 0x4c], eax
push dword [ebp - 0x44]
add edi, edx
push dword [ebp - 0x40]
push esi
push ebx
call fcn.0057d2a0
push dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
push dword [ebp - 0x38]
mov esi, edx
push dword [ebp - 0x34]
push dword [ebp - 0x18]
call fcn.0057d2a0
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0xc]
sub dword [ebp - 4], 0x10
mov dword [ebp - 0x4c], eax
sub esi, edx
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x20]
sar ecx, 1
sar edx, 1
lea eax, [ecx + edi]
mov dword [ebx], eax
lea eax, [edx + esi]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 4]
sub esi, edx
mov dword [eax + 0xc], esi
sub ecx, edi
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 8]
mov eax, ecx
sar eax, 4
and eax, 0xf
mov ebx, dword [ebp - 0x10]
movzx edx, byte [eax + 0x5eb068]
mov eax, ecx
and eax, 0xf
movzx eax, byte [eax + 0x5eb068]
shl eax, 4
or edx, eax
mov eax, ecx
sar eax, 8
shl edx, 4
movzx eax, byte [eax + 0x5eb068]
or edx, eax
inc ecx
mov eax, edx
xor eax, 0xfff
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0xc]
sar eax, cl
sar edx, cl
mov esi, dword [ebx + eax*4 - 4]
mov ecx, dword [ebx + edx*4]
mov eax, dword [ebx + eax*4]
mov edx, dword [ebx + edx*4 + 4]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], ecx
add ecx, esi
mov dword [ebp - 0x24], esi
mov esi, edx
sub esi, eax
mov eax, dword [ebp + 8]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], edx
mov dword [ebp + 8], eax
mov eax, dword [eax]
cdq
mov edi, eax
mov ebx, edx
mov eax, ecx
cdq
mov ecx, eax
mov eax, edx
push eax
push ecx
push ebx
push edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x3c], eax
call fcn.0057d2a0
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 8]
mov ebx, edx
mov eax, dword [eax + 4]
cdq
mov dword [ebp - 0x18], eax
mov ecx, edx
mov eax, esi
cdq
mov esi, edx
push esi
mov edi, eax
push edi
push ecx
push dword [ebp - 0x18]
mov dword [ebp - 0x34], ecx
call fcn.0057d2a0
mov dword [ebp - 0x4c], eax
push esi
push edi
push dword [ebp - 0x44]
add ebx, edx
push dword [ebp - 0x40]
call fcn.0057d2a0
push dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
push dword [ebp - 0x38]
mov esi, edx
push dword [ebp - 0x34]
push dword [ebp - 0x18]
call fcn.0057d2a0
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0xc]
sub esi, edx
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x20]
sar ecx, 1
mov dword [ebp - 0x4c], eax
sar edx, 1
lea eax, [ecx + ebx]
mov dword [edi + 8], eax
lea eax, [edx + esi]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 4]
add edi, 0x10
sub ecx, ebx
sub esi, edx
mov dword [ebp - 0xc], edi
cmp edi, eax
mov edi, dword [ebp + 8]
mov dword [eax], ecx
mov dword [eax + 4], esi
jb 0x4189d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret