Function at 0x46a7490
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
add eax, esi
sub eax, dword [esp + 0x4c]
mov dword [edi + 8], 0
mov dword [edi + 4], 0
mov dword [edi], 0
mov dword [esp + 0x24], eax
cmp eax, esi
jbe 0x46a77bc
mov ebp, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov eax, ecx
xor eax, 1
and ecx, 0xfffffffe
add ecx, ecx
sub ecx, eax
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov dword [esp], 0
mov dword [esp + 0xc], 0
jmp 0x46a752d
mov ecx, dword [esp + 8]
mov ebx, ecx
mov eax, dword [esp]
sub ebx, eax
cmp ecx, dword [esp + 0xc]
je 0x46a7629
mov dword [eax + ebx], esi
add ecx, 4
mov dword [edi + 4], ecx
add esi, dword [esp + 0x20]
inc esi
cmp esi, dword [esp + 0x24]
jae 0x46a77bc
mov dword [esp + 8], ecx
test ebp, ebp
je 0x46a759a
movzx ecx, byte [ebp]
mov byte [esp + 0x10], 0x37
lea eax, [esp + 0x11]
mov byte [eax + 4], 0
mov dword [eax], 0
xor edx, edx
nop
nop
movzx eax, byte [esp + edx + 0x10]
mov ebx, 0xb9763fd3
sub ebx, edx
or ebx, eax
mov edi, 0xd3
sub edi, edx
and edi, eax
not ebx
or ebx, edi
add ebx, 0x9f4f3f23
mov eax, ebx
and eax, 1
xor ebx, 1
lea eax, [ebx + eax*2]
mov byte [esp + edx + 0x10], al
mov eax, edx
and eax, 1
xor edx, 1
lea edx, [edx + eax*2]
cmp edx, 6
jb 0x46a7550
cmp cl, byte [esp + 0x10]
mov edi, dword [esp + 0x3c]
je 0x46a75a5
movzx eax, byte [esi]
mov ecx, dword [esp + 0x48]
cmp al, byte [ecx]
jne 0x46a7620
cmp dword [esp + 0x4c], 2
jb 0x46a7500
mov ecx, 1
jmp 0x46a75dc
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x48]
cmp al, byte [edx + ecx]
jne 0x46a772f
inc ecx
cmp ecx, dword [esp + 0x4c]
je 0x46a7500
test ebp, ebp
je 0x46a75c0
movzx edx, byte [ebp + ecx]
mov byte [esp + 0x10], 0x3d
lea eax, [esp + 0x11]
mov dword [eax + 3], 0
mov dword [eax], 0
xor ebx, ebx
nop
nop
nop
mov eax, ebx
add al, 0x2b
xor al, byte [esp + ebx + 0x10]
add al, 0x29
mov byte [esp + ebx + 0x10], al
inc ebx
cmp ebx, 8
jne 0x46a7600
cmp dl, byte [esp + 0x10]
jne 0x46a75c0
jmp 0x46a75d1
mov ecx, dword [esp + 8]
jmp 0x46a7522
mov eax, ebx
sar eax, 2
mov ecx, ebx
shr ecx, 1
mov dword [esp + 0x1c], ecx
and ecx, 2
mov edx, eax
shr edx, 1
add edx, eax
xor eax, 1
add eax, ecx
cmp edx, eax
ja 0x46a764a
mov edx, eax
mov dword [esp + 0xc], edx
lea eax, [edx*4]
push eax
call fcn.046782d0
add esp, 4
mov ebp, eax
mov edx, dword [esp]
test edx, edx
je 0x46a7794
cmp ebp, edx
mov eax, dword [esp + 8]
mov dword [esp + 4], ebx
mov dword [esp + 0x18], ebp
jbe 0x46a773b
cmp eax, ebp
jbe 0x46a773b
test ebx, ebx
je 0x46a777d
mov eax, dword [esp]
mov edx, dword [esp + 4]
add eax, edx
dec eax
mov ecx, dword [esp + 0x18]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x46a76c4
neg edi
xor edx, edx
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp edi, edx
jne 0x46a76b0
add eax, edx
add ecx, edx
add edx, dword [esp + 4]
mov edi, dword [esp]
sub edi, dword [esp + 8]
cmp edi, 0xfffffff8
ja 0x46a777d
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
movzx ebx, byte [eax + edi - 1]
mov byte [ecx + edi - 1], bl
movzx ebx, byte [eax + edi - 2]
mov byte [ecx + edi - 2], bl
movzx ebx, byte [eax + edi - 3]
mov byte [ecx + edi - 3], bl
movzx ebx, byte [eax + edi - 4]
mov byte [ecx + edi - 4], bl
movzx ebx, byte [eax + edi - 5]
mov byte [ecx + edi - 5], bl
movzx ebx, byte [eax + edi - 6]
mov byte [ecx + edi - 6], bl
movzx ebx, byte [eax + edi - 7]
mov byte [ecx + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x46a76e0
jmp 0x46a777d
add esi, ecx
dec esi
mov ecx, dword [esp + 8]
jmp 0x46a7522
mov ecx, ebx
shr ecx, 2
mov eax, edx
mov dword [esp], edx
mov edi, ebp
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov edx, ebx
and edx, 0xfffffffc
lea eax, [edx + ebp]
add edx, dword [esp]
mov ecx, dword [esp + 0x1c]
and ecx, 1
mov ebx, edx
mov edi, eax
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test byte [esp + 4], 1
je 0x46a777d
mov ecx, dword [esp + 4]
and ecx, 2
movzx edx, byte [edx + ecx]
mov byte [eax + ecx], dl
push dword [esp]
call fcn.046782e0
add esp, 4
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 4]
mov ebp, dword [esp + 0x18]
mov dword [edi], ebp
mov eax, dword [esp + 0xc]
lea eax, [eax*4]
add eax, ebp
mov ecx, ebp
add ecx, ebx
mov dword [esp + 0xc], eax
mov dword [edi + 8], eax
mov eax, ebp
mov dword [esp], ebp
mov ebp, dword [esp + 0x50]
jmp 0x46a7515
mov eax, edi
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret