Function at 0x40a040
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x5c]
push ebx
push esi
push edi
mov bl, al
mov byte [ebp - 0x5c], dl
mov byte [ebp - 0x58], cl
mov al, byte [ebp + 0x24]
mov byte [ebp - 0x54], al
mov esi, dword [ebp + 0x20]
mov al, byte [ebp + 0x1c]
mov byte [ebp - 0x40], al
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0
xor eax, eax
push fcn.0040a010
push ebp
push 0x459540
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x3c]
xor edx, edx
call fcn.0044ce80
movzx eax, bl
shl eax, 7
mov bl, al
movzx eax, byte [ebp - 0x5c]
shl eax, 6
movzx edx, bl
add eax, edx
mov bl, al
movzx eax, byte [ebp - 0x58]
shl eax, 5
movzx edx, bl
add eax, edx
mov bl, al
movzx eax, byte [ebp - 0x54]
shl eax, 4
movzx edx, bl
add eax, edx
mov bl, al
and eax, 0xff
add eax, esi
mov bl, al
push 0
mov al, bl
lea ecx, [ebp - 8]
xor dx, dx
call fcn.0044d780
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x3c]
call fcn.0044cf80
movzx eax, byte [ebp - 0x40]
shl eax, 7
mov bl, al
mov ecx, dword [ebp - 0x4c]
mov esi, ecx
sar esi, 0x1f
mov edx, dword [ebp - 0x44]
mov eax, edx
sar eax, 0x1f
add ecx, edx
adc esi, eax
mov edi, ecx
test esi, esi
jl 0x40a143
jg 0x40a153
cmp edi, 0x7e
jae 0x40a153
movzx eax, bl
mov edx, 0
add eax, edi
adc edx, esi
mov bl, al
jmp 0x40a173
test esi, esi
jl 0x40a161
jg 0x40a16b
cmp edi, 0x10000
jae 0x40a16b
movzx eax, bl
add eax, 0x7e
mov bl, al
jmp 0x40a173
movzx eax, bl
add eax, 0x7f
mov bl, al
push 0
mov al, bl
lea ecx, [ebp - 8]
xor dx, dx
call fcn.0044d780
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x3c]
call fcn.0044cf80
test esi, esi
jg 0x40a1a5
jl 0x40a2a4
cmp edi, 0x7e
jb 0x40a2a4
test esi, esi
jl 0x40a1b3
jg 0x40a20d
cmp edi, 0x10000
jae 0x40a20d
push 0
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx]
mov dword [ebp - 0x14], eax
mov edx, edi
mov eax, esi
shrd edx, eax, 8
shr eax, 8
mov eax, edx
and eax, 0xff
lea ecx, [ebp - 0x18]
xor dx, dx
call fcn.0044d780
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov eax, edi
and eax, 0xff
lea ecx, [ebp - 0x1c]
xor dx, dx
call fcn.0044d780
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0x3c]
mov ecx, 2
call fcn.0044d210
jmp 0x40a2a4
push 0
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov dword [ebp - 0x30], edx
mov eax, edi
mov edx, esi
shrd eax, edx, 0x18
shr edx, 0x18
and eax, 0xff
lea ecx, [ebp - 0x1c]
xor dx, dx
call fcn.0044d780
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
mov eax, edi
mov edx, esi
shrd eax, edx, 0x10
shr edx, 0x10
and eax, 0xff
lea ecx, [ebp - 0x18]
xor dx, dx
call fcn.0044d780
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
mov edx, edi
mov eax, esi
shrd edx, eax, 8
shr eax, 8
mov eax, edx
and eax, 0xff
lea ecx, [ebp - 0x34]
xor dx, dx
call fcn.0044d780
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x24], eax
mov eax, edi
and eax, 0xff
lea ecx, [ebp - 0x38]
xor dx, dx
call fcn.0044d780
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x20], eax
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 0x3c]
mov ecx, 4
call fcn.0044d210
mov al, byte [ebp - 0x40]
test al, al
je 0x40a364
mov eax, 0x100
call fcn.004534b0
mov byte [ebp - 4], al
mov eax, 0x100
call fcn.004534b0
mov byte [ebp - 3], al
mov eax, 0x100
call fcn.004534b0
mov byte [ebp - 2], al
mov eax, 0x100
call fcn.004534b0
mov byte [ebp - 1], al
push 0
mov al, byte [ebp - 4]
lea ecx, [ebp - 8]
xor dx, dx
call fcn.0044d780
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x3c]
call fcn.0044cf80
push 0
mov al, byte [ebp - 3]
lea ecx, [ebp - 8]
xor dx, dx
call fcn.0044d780
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x3c]
call fcn.0044cf80
push 0
mov al, byte [ebp - 2]
lea ecx, [ebp - 8]
xor dx, dx
call fcn.0044d780
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x3c]
call fcn.0044cf80
push 0
mov al, byte [ebp - 1]
lea ecx, [ebp - 8]
xor dx, dx
call fcn.0044d780
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x3c]
call fcn.0044cf80
nop
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx]
test eax, eax
je 0x40a370
mov eax, dword [eax - 4]
mov edi, eax
mov eax, dword [ebp - 0x4c]
lea ecx, [edi + eax]
mov edx, dword [ebp - 0x44]
add edx, ecx
mov eax, dword [ebp - 0x3c]
xor cx, cx
call fcn.0044dae0
mov eax, dword [ebp - 0x3c]
call fcn.004481e0
lea edx, [edi + 1]
lea edx, [eax + edx - 1]
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x4c]
call fcn.00447cd0
mov eax, dword [ebp - 0x3c]
call fcn.004481e0
mov edx, dword [ebp - 0x4c]
lea ecx, [edi + edx]
lea edx, [ecx + 1]
lea edx, [eax + edx - 1]
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
call fcn.00447cd0
mov al, byte [ebp - 0x40]
test al, al
je 0x40a408
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
lea eax, [edi + 1]
lea esi, [edx + eax - 1]
mov eax, dword [ebp - 0x3c]
mov ebx, dword [eax]
test ebx, ebx
je 0x40a3e1
mov ebx, dword [ebx - 4]
sub ebx, edi
sub ebx, 1
test ebx, ebx
jl 0x40a408
mov ecx, 0xffffffff
nop
add ecx, 1
mov eax, ecx
and eax, 3
mov dl, byte [ebp + eax - 4]
xor byte [esi], dl
add esi, 1
cmp ebx, ecx
jg 0x40a3f0
lea esi, [esi]
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.0040a010
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20