Function at 0x446680
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [esp + 0x30]
xor ecx, ecx
test eax, eax
je 0x4466b3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [eax + ecx], 0
lea ecx, [ecx + 2]
jne 0x4466a0
add ecx, 0xfffffffe
and ecx, 0xfffe
mov word [esp + 0xc], cx
mov edx, eax
test eax, eax
je 0x4466c3
add ecx, 2
mov edx, ecx
mov esi, dword [esp + 0x2c]
mov word [esp + 0xe], dx
mov dword [esp + 0x10], eax
mov dword [esp], 0x34353637
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax]
mov edx, ecx
and edx, 0xffffffd3
or edx, 0x82104
and ecx, 0x2c
xor ecx, edx
xor ecx, 0xe7ae3fd7
mov edx, eax
xor edx, 0xe186c027
mov edi, ecx
and edi, edx
add edx, ecx
add edi, edi
sub edx, edi
add dl, 0x3c
mov byte [esp + eax], dl
inc eax
cmp eax, 4
jne 0x4466e0
mov ebx, dword [esp]
mov eax, dword [0x451fbc]
test eax, eax
je 0x44676c
xor ecx, ecx
mov edx, dword [0x451fc0]
nop
nop
nop
nop
cmp dword [edx + ecx*8], 0xbbe848dd
je 0x446740
inc ecx
cmp eax, ecx
jne 0x446730
jmp 0x44676c
mov eax, dword [edx + ecx*8 + 4]
cmp eax, ebx
je 0x44676c
lea ecx, [esp + 8]
lea edx, [esp + 0xc]
push ecx
push 0
push 0
push 2
push edx
push esi
push 6
push dword [0x451fc4]
push eax
call fcn.004426e0
add esp, 0x24
mov ebx, eax
mov dword [esp], 0xb97a7b61
mov byte [esp + 4], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax]
mov edx, eax
and edx, 5
mov edi, eax
and edi, 2
mov ebp, eax
or ebp, 2
imul ebp, edi
xor edi, 2
imul edi, edx
mov edx, eax
xor edx, 0x9e57f4bf
add edx, ebp
add edx, edi
xor edx, ecx
mov ecx, 0x76
sub ecx, edx
add edx, 0x89
and ecx, 0x45
and edx, 0xba
sub edx, ecx
inc dl
mov byte [esp + eax], dl
lea ecx, [eax + 1]
mov eax, ecx
cmp ecx, 5
jne 0x446780
cmp ebx, dword [esp]
jne 0x446913
push dword [esp + 8]
call fcn.0043f830
add esp, 4
mov ecx, dword [esp + 8]
mov dword [esp], 0x34353637
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [esp + edi]
mov edx, ebx
and edx, 0xffffffd3
or edx, 0x82104
and ebx, 0x2c
xor ebx, edx
xor ebx, 0xe7ae3fd7
mov edx, edi
xor edx, 0xe186c027
mov ebp, ebx
and ebp, edx
add edx, ebx
add ebp, ebp
sub edx, ebp
add dl, 0x3c
mov byte [esp + edi], dl
inc edi
cmp edi, 4
jne 0x446800
mov ebx, dword [esp]
mov edx, dword [0x451fbc]
test edx, edx
je 0x44688e
xor ebp, ebp
mov edi, dword [0x451fc0]
nop
nop
nop
cmp dword [edi + ebp*8], 0xbbe848dd
je 0x446860
inc ebp
cmp edx, ebp
jne 0x446850
jmp 0x44688e
mov edx, dword [edi + ebp*8 + 4]
cmp edx, ebx
je 0x44688e
lea edi, [esp + 8]
lea ebx, [esp + 0xc]
push edi
push ecx
push eax
push 2
push ebx
push esi
push 6
push dword [0x451fc4]
push edx
mov edi, eax
call fcn.004426e0
add esp, 0x24
mov ebx, eax
mov eax, edi
test ebx, ebx
js 0x44690a
mov edx, dword [esp + 0x34]
test edx, edx
je 0x44689f
mov ecx, dword [eax + 4]
mov dword [edx], ecx
cmp dword [esp + 0x3c], 0
je 0x44690a
mov esi, dword [esp + 0x38]
test esi, esi
je 0x446901
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx]
mov ecx, dword [eax + 8]
cmp edx, ecx
jb 0x4468bd
mov edx, ecx
lea ebp, [eax + 0xc]
mov ecx, edx
shr ecx, 2
mov edi, esi
xchg esi, ebp
rep movsd dword es:[edi], dword [esi]
xchg esi, ebp
mov ecx, edx
and ecx, 0xfffffffc
add esi, ecx
lea ebp, [eax + ecx]
add ebp, 0xc
mov ecx, edx
shr ecx, 1
and ecx, 1
mov dword [esp + 0x14], ebp
mov edi, esi
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
test dl, 1
je 0x446901
and edx, 2
mov ecx, dword [esp + 0x14]
movzx ecx, byte [ecx + edx]
mov byte [esi + edx], cl
mov ecx, dword [eax + 8]
mov edx, dword [esp + 0x3c]
mov dword [edx], ecx
push eax
call fcn.0043f8b0
add esp, 4
mov eax, ebx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret