Function at 0x404c30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov eax, edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], eax
push esi
xor esi, esi
lea edx, [eax - 0xb]
mov dword [ebp - 8], esi
mov eax, dword [ebp + 0xc]
cmp eax, edx
mov dword [ebp - 0x18], edx
cmova eax, edx
mov edx, dword [0x494104]
mov dword [ebp - 0x10], eax
movzx eax, byte [ecx]
xor edx, eax
movzx eax, byte [ecx + 1]
mov ecx, dword [0x494104]
xor ecx, eax
mov eax, dword [0x494104]
xor eax, ecx
mov ecx, dword [0x494104]
xor eax, 2
xor ecx, eax
mov eax, edx
shr eax, 1
mov ebx, ecx
shr ebx, 1
neg eax
neg ebx
neg ecx
or ebx, ecx
neg edx
or eax, edx
shr ebx, 0x1f
shr eax, 0x1f
neg ebx
neg eax
or ebx, eax
mov eax, 2
push edi
mov edi, dword [0x494104]
mov dword [ebp - 0x14], ebx
cmp dword [ebp - 4], eax
jbe 0x404d01
mov ebx, dword [ebp - 0xc]
nop word [eax + eax]
movzx ecx, byte [eax + ebx]
inc eax
mov edx, dword [0x494104]
xor edx, ecx
mov ecx, dword [0x494104]
xor ecx, edx
mov edx, dword [0x494104]
xor edx, ecx
mov ecx, edx
neg edx
shr ecx, 1
neg ecx
or ecx, edx
shr ecx, 0x1f
dec ecx
or edi, ecx
mov ecx, edi
not ecx
and ecx, 1
add esi, ecx
cmp eax, dword [ebp - 4]
jb 0x404cc0
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 8], esi
mov esi, dword [0x494104]
not edi
xor esi, dword [ebp - 8]
mov edx, dword [0x494104]
xor edx, 8
mov eax, edx
xor eax, esi
sub esi, edx
shr eax, 0x1f
xor eax, dword [0x494104]
mov ecx, eax
neg eax
shr ecx, 1
neg ecx
or ecx, eax
mov eax, dword [0x494104]
shr ecx, 0x1f
neg ecx
xor eax, ecx
and ecx, edx
not eax
and esi, eax
mov eax, dword [0x494104]
or esi, ecx
shr esi, 0x1f
xor eax, esi
mov ecx, eax
neg eax
shr ecx, 1
neg ecx
or ecx, eax
mov eax, dword [0x494104]
mov esi, dword [0x494104]
xor esi, dword [ebp - 0x10]
mov edx, dword [0x494104]
shr ecx, 0x1f
neg ecx
or ecx, edi
mov edi, dword [ebp - 4]
sub edi, dword [ebp - 8]
or ebx, ecx
xor eax, ebx
sub edi, 3
not eax
and edi, eax
mov eax, ebx
and eax, dword [ebp - 0x10]
or edi, eax
xor edx, edi
mov eax, edx
xor eax, esi
sub esi, edx
shr eax, 0x1f
xor eax, dword [0x494104]
mov ecx, eax
neg eax
shr ecx, 1
neg ecx
or ecx, eax
mov eax, dword [0x494104]
shr ecx, 0x1f
neg ecx
xor eax, ecx
and ecx, edx
not eax
and esi, eax
mov eax, dword [0x494104]
or esi, ecx
mov ecx, dword [0x494104]
shr esi, 0x1f
xor ecx, ebx
xor eax, esi
not ecx
mov esi, eax
neg eax
shr esi, 1
neg esi
or esi, eax
shr esi, 0x1f
neg esi
and ecx, esi
mov edx, dword [ebp - 0xc]
and ecx, 0x4400
push dword [ebp - 0x18]
mov eax, ebx
and eax, 0x4100
or ecx, eax
lea edx, [edx + 0xb]
neg ecx
mov dword [ebp - 8], ecx
mov ecx, esi
or ecx, ebx
call fcn.0040a960
mov edx, dword [0x494104]
mov ebx, dword [ebp - 0x10]
xor edx, esi
not edx
and esi, ebx
and edx, edi
mov eax, ebx
or edx, esi
mov esi, dword [ebp - 0xc]
sub esi, ebx
mov dword [ebp - 0x10], edx
add esi, dword [ebp - 4]
sub eax, edx
push eax
mov edx, ebx
mov ecx, esi
call fcn.0040a6f0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x404e57
push ebx
push esi
push dword [ebp + 8]
call fcn.00447690
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
pop edi
pop esi
mov dword [ecx], edx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 0x10]
pop edi
pop esi
mov dword [eax], edx
mov eax, dword [ebp - 8]
pop ebx
mov esp, ebp
pop ebp
ret