Function at 0x457640
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov ebp, dword [esp + 0x38]
mov ebx, dword [ebp]
mov edi, dword [ebp + 4]
mov eax, dword [ebp + 8]
mov dword [esp], eax
push 0
push 2
push ebx
call fcn.004143e0
add esp, 0xc
mov esi, eax
push edi
push ebx
push dword [ebp + 0x10]
push dword [esp + 0x40]
push eax
call fcn.00455d50
add esp, 0x14
movzx ebp, di
push 0
push ebp
push 0x10000
push 0
call fcn.0046efe0
mov ecx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], edi
shr edi, 1
mov dword [esp + 8], edi
lea ebx, [edi - 1]
mov eax, ebx
mov edx, 0x55555555
mul edx
test ecx, ecx
mov dword [esp + 4], ecx
je 0x45780b
imul eax, ebx, 0x5555
add edx, eax
shr edx, 0x10
lea eax, [edx + edx*2]
neg eax
mov edx, dword [esp + 8]
add eax, edx
add eax, 0xffffffff
mov ecx, 2
sub ecx, eax
shr ecx, 0xf
and ecx, 1
lea ecx, [ecx + ecx*2]
sub ecx, eax
add ecx, 3
movzx eax, cx
mov dword [esp + 0xc], eax
xor ecx, ecx
nop
nop
nop
movzx ebx, word [esi + ecx*2]
add ebx, dword [esp + 8]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mul ebx
imul edi, ebx
add edx, edi
shr edx, 0x10
imul edx, ebp
sub ebx, edx
mov eax, ebx
not eax
add eax, dword [esp + 0x18]
shr eax, 0xf
and eax, 1
imul eax, ebp
sub ebx, eax
movzx ebx, bx
add ebx, dword [esp + 0xc]
mov eax, ebx
mov edx, 0x55555555
mul edx
mov eax, ebx
mov edi, 0x5555
imul eax, edi
add edx, eax
shr edx, 0x10
lea eax, [edx + edx*2]
sub ebx, eax
mov eax, 2
sub eax, ebx
shr eax, 0xf
and eax, 1
lea eax, [eax + eax*2]
not eax
add eax, ebx
mov word [esi + ecx*2], ax
add ecx, 1
cmp dword [esp + 4], ecx
jne 0x4576f0
mov ecx, dword [esp + 4]
mov ebx, ecx
add ebx, 0xffffffff
je 0x457842
and ecx, 0xfffffffe
xor eax, eax
mov ebp, dword [esp + 0x30]
nop
movsx edx, word [esi + eax*2]
mov edi, edx
shr edi, 0xf
and edi, 3
add edi, edx
mov word [esi + eax*2], di
movsx edx, word [esi + eax*2 + 2]
mov edi, edx
shr edi, 0xf
and edi, 3
add edi, edx
mov word [esi + eax*2 + 2], di
add eax, 2
cmp ecx, eax
jne 0x457780
test byte [esp + 4], 1
je 0x4577c6
movsx ecx, word [esi + eax*2]
mov edx, ecx
shr edx, 0xf
and edx, 3
add edx, ecx
mov word [esi + eax*2], dx
push 3
mov edi, dword [esp + 8]
push edi
mov eax, dword [esp + 0x40]
push dword [eax + 0x14]
push esi
push ebp
call fcn.00455d50
add esp, 0x14
lea eax, [edi + edi]
push eax
push esi
call fcn.00432100
add esp, 8
push esi
call fcn.00414470
add esp, 4
test edi, edi
je 0x457858
mov eax, edi
and eax, 3
cmp ebx, 3
jae 0x457861
xor edx, edx
mov ecx, edi
jmp 0x4578ba
push 3
push ecx
mov eax, dword [esp + 0x40]
push dword [eax + 0x14]
push esi
mov ebp, dword [esp + 0x40]
push ebp
mov ebx, ecx
call fcn.00455d50
add esp, 0x14
lea eax, [ebx + ebx]
push eax
push esi
call fcn.00432100
add esp, 8
push esi
call fcn.00414470
add esp, 4
xor ecx, ecx
jmp 0x4578e9
xor eax, eax
mov ebp, dword [esp + 0x30]
test byte [esp + 4], 1
jne 0x4577b4
jmp 0x4577c6
xor ecx, ecx
mov ebx, edi
jmp 0x4578e9
mov ebx, edi
and ebx, 0xfffffffc
xor edx, edx
mov ecx, edi
nop
nop
nop
nop
nop
nop
movzx esi, word [ebp + edx*2]
add esi, 0xffff
shr esi, 0x10
add esi, ecx
movzx ecx, word [ebp + edx*2 + 2]
add ecx, 0xffff
shr ecx, 0x10
add ecx, esi
movzx esi, word [ebp + edx*2 + 4]
add esi, 0xffff
shr esi, 0x10
add esi, ecx
movzx ecx, word [ebp + edx*2 + 6]
add ecx, 0xffff
shr ecx, 0x10
add ecx, esi
add ecx, 0xfffffffc
add edx, 4
cmp ebx, edx
jne 0x457870
test eax, eax
mov ebx, dword [esp + 4]
je 0x4578e9
lea edx, [edx*2]
add edx, ebp
xor esi, esi
nop
nop
nop
movzx edi, word [edx + esi*2]
add edi, 0xffff
shr edi, 0x10
add ecx, edi
add ecx, 0xffffffff
add esi, 1
cmp eax, esi
jne 0x4578d0
mov edx, dword [esp]
xor ecx, edx
movzx eax, cx
add eax, 0xffff
shr eax, 0x10
neg eax
test edx, edx
je 0x457972
xor ecx, ecx
cmp edx, 1
je 0x45794d
mov edx, dword [esp]
and edx, 0xfffffffe
xor ecx, ecx
movsx esi, ax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebp + ecx*2]
mov ebx, edi
xor ebx, 1
and ebx, esi
xor ebx, edi
mov word [ebp + ecx*2], bx
movzx edi, word [ebp + ecx*2 + 2]
mov ebx, edi
xor ebx, 1
and ebx, esi
xor ebx, edi
mov word [ebp + ecx*2 + 2], bx
add ecx, 2
cmp edx, ecx
jne 0x457920
mov edx, dword [esp]
test dl, 1
mov ebx, dword [esp + 4]
je 0x457972
movzx edx, word [ebp + ecx*2]
mov esi, edx
xor esi, 1
movsx edi, ax
and edi, esi
xor edi, edx
mov edx, dword [esp]
mov word [ebp + ecx*2], di
mov ecx, ebx
sub ecx, edx
jbe 0x4579cb
not eax
not edx
add edx, ebx
and ecx, 3
je 0x4579d3
mov esi, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
and word [ebp + esi*2], ax
add esi, 1
add ecx, 0xffffffff
jne 0x457990
cmp edx, 3
jb 0x4579cb
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
and word [ebp + esi*2], ax
and word [ebp + esi*2 + 2], ax
and word [ebp + esi*2 + 4], ax
and word [ebp + esi*2 + 6], ax
add esi, 4
cmp ebx, esi
jne 0x4579b0
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [esp]
cmp edx, 3
jae 0x4579b0
jmp 0x4579cb