Function at 0x40ead0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x150
mov dword [esp + 0x48], 0xbe1e
mov byte [esp + 0x4c], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 4
ja 0x40eb39
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x48]
add eax, 0xe1b7de81
xor eax, ecx
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0xbc]
add al, 0xc4
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x48], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 5
jb 0x40eb00
lea eax, [esp + 0x48]
push eax
push dword [ebp + 8]
call fcn.004032e0
add esp, 8
mov esi, eax
xor ecx, ecx
test eax, eax
sete cl
xor edi, edi
xor eax, eax
jmp dword [ecx*4 + 0x4453c4]
mov dword [esp + 0x3c], esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push esi
call fcn.004034f0
add esp, 4
xor ecx, ecx
cmp edi, eax
setb cl
mov al, 1
jmp dword [ecx*4 + 0x4453cc]
mov dword [esp + 0x134], edi
push edi
push esi
call fcn.00403500
add esp, 8
mov edi, eax
mov dword [esp + 0x48], 0xae3b
mov byte [esp + 0x4c], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 4
ja 0x40ebf9
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x48]
add eax, 0x8e19087e
xor eax, ecx
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0xbc]
add al, 0x2f
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x48], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 5
jb 0x40ebc0
push 3
lea eax, [esp + 0x4c]
push eax
push edi
call fcn.00403490
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
jmp dword [ecx*4 + 0x4453d4]
mov word [esp + 0x48], 0x61ee
lea eax, [esp + 0x4b]
mov byte [eax + 1], 0
mov word [eax - 1], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 4
ja 0x40ec79
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x48]
add eax, 0xfd7b19dd
xor eax, ecx
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0xbc]
add al, 0x41
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x48], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 5
jb 0x40ec40
lea eax, [esp + 0x48]
push eax
push edi
call fcn.00403270
add esp, 8
fnstcw word [esp + 0x112]
movzx eax, word [esp + 0x112]
or eax, 0xc00
mov word [esp + 0x12a], ax
fldcw word [esp + 0x12a]
fistp dword [esp + 0x148]
fldcw word [esp + 0x112]
mov eax, dword [esp + 0x148]
xor ecx, ecx
cmp eax, 2
setl cl
jmp dword [ecx*4 + 0x4453dc]
xor ecx, ecx
cmp eax, 3
setl cl
jmp dword [ecx*4 + 0x4453e4]
sete al
movzx eax, al
jmp dword [eax*4 + 0x4453ec]
xor ecx, ecx
test eax, eax
setle cl
jmp dword [ecx*4 + 0x4453f4]
mov dword [esp + 4], 0x7c8d
mov dword [esp + 0xbc], 0
mov eax, dword [esp + 0xbc]
cmp eax, 3
ja 0x40f15d
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0xbc]
mov ecx, dword [esp + 0xbc]
movzx ecx, byte [esp + ecx + 4]
mov edx, eax
and edx, 0x3d20583a
xor eax, 0x3d20583a
lea eax, [eax + edx*2]
xor eax, ecx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x48]
add al, 0xb9
mov ecx, dword [esp + 0xbc]
mov byte [esp + ecx + 4], al
inc dword [esp + 0xbc]
mov eax, dword [esp + 0xbc]
cmp eax, 4
jb 0x40f110
lea eax, [esp + 4]
push eax
push edi
call fcn.00403210
add esp, 8
mov dword [esp + 0x1c], eax
mov word [esp + 0x48], 0x1893
lea eax, [esp + 0x4b]
mov byte [eax + 3], 0
mov dword [eax - 1], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 6
ja 0x40f1d9
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x48]
add eax, 0x4832f110
xor eax, ecx
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0xbc]
add al, 0xf7
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x48], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 7
jb 0x40f1a0
lea eax, [esp + 0x48]
push eax
push edi
call fcn.00403210
add esp, 8
mov edi, dword [esp + 0x1c]
test edi, edi
sete dl
test eax, eax
sete cl
or cl, dl
movzx ecx, cl
jmp dword [ecx*4 + 0x445634]
mov ecx, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
inc ecx
cmp byte [esi], 0
jne 0x40f210
mov dword [esp + 0x18], eax
xor ebx, ebx
cmp esi, edi
jbe 0x40f257
cmp byte [edi], 0
je 0x40f257
xor ebx, ebx
mov edi, dword [esp + 0x1c]
nop
nop
nop
mov dword [esp + 0x48], 0
lea eax, [esp + 0x48]
push eax
push esi
push edi
call fcn.0040d600
add esp, 0xc
lea ecx, [edi + eax]
inc ebx
cmp ecx, esi
jae 0x40f257
cmp byte [edi + eax], 0
mov edi, ecx
jne 0x40f230
mov eax, ebx
inc eax
lea eax, [ebx + ebx + 2]
jns 0x40f265
mov eax, 0xffffffff
push eax
call fcn.00409a00
add esp, 4
mov dword [esp + 0x48], 0
lea ecx, [eax + ebx*2]
mov ebx, eax
mov dword [esp + 0x118], eax
mov dword [esp + 0x14], ecx
cmp eax, ecx
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
jae 0x40f5f9
mov ebx, dword [esp + 0x118]
cmp edi, esi
jae 0x40f5f9
mov ebx, dword [esp + 0x118]
nop
nop
nop
nop
cmp byte [edi], 0
je 0x40f5f9
lea eax, [esp + 0x48]
push eax
push esi
push edi
call fcn.0040d600
add esp, 0xc
movzx ecx, word [esp + 0x48]
mov word [ebx], cx
add ebx, 2
cmp ebx, dword [esp + 0x14]
jae 0x40f5f5
add edi, eax
cmp edi, esi
mov eax, dword [esp + 0x18]
jb 0x40f2b0
jmp 0x40f5f9
mov eax, dword [esp + 0x18]
mov word [ebx], 0
xor edi, edi
mov esi, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add esi, 2
cmp byte [eax + edi], 0
lea edi, [edi + 1]
jne 0x40f610
lea eax, [esi + 2]
test edi, edi
jns 0x40f628
mov eax, 0xffffffff
push eax
call fcn.00409a00
add esp, 4
mov dword [esp + 0x48], 0
add esi, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x40], eax
cmp eax, esi
mov ecx, dword [esp + 0x18]
jae 0x40f6a5
lea ebx, [ecx + edi]
dec ebx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14], eax
cmp ecx, ebx
jae 0x40f6a5
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14], eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp byte [ecx], 0
je 0x40f6a5
lea eax, [esp + 0x48]
push eax
push ebx
push ecx
mov edi, ecx
call fcn.0040d600
add esp, 0xc
movzx ecx, word [esp + 0x48]
mov edx, dword [esp + 0x14]
mov word [edx], cx
add edx, 2
mov dword [esp + 0x14], edx
cmp edx, esi
jae 0x40f6a5
add edi, eax
cmp edi, ebx
mov ecx, edi
jb 0x40f670
mov eax, dword [esp + 0x14]
mov word [eax], 0
mov word [esp + 0x48], 0xa3af
mov byte [esp + 0x4a], 0x1a
lea eax, [esp + 0x4b]
mov byte [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 7
ja 0x40f719
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x48]
add eax, 0x28410fbd
xor eax, ecx
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0xbc]
add al, 0x5b
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x48], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 8
jb 0x40f6e0
lea eax, [esp + 0x48]
push eax
push dword [ebp + 8]
call fcn.004032e0
add esp, 8
mov edi, eax
xor eax, eax
test edi, edi
setne al
mov dword [esp + 0x28], 0
mov dword [esp + 0x38], 0
jmp dword [eax*4 + 0x44563c]
push edi
call fcn.004034f0
add esp, 4
mov ecx, eax
mov dword [esp + 0x38], eax
mov ecx, 0xc
mul ecx
seto dl
mov ecx, 0xffffffff
mov esi, 0xffffffff
add eax, 4
jb 0x40f773
mov esi, eax
test dl, dl
jne 0x40f779
mov ecx, esi
push ecx
call fcn.00409a00
add esp, 4
mov ecx, dword [esp + 0x38]
mov dword [eax], ecx
add eax, 4
mov dword [esp + 0x28], eax
xor eax, eax
test ecx, ecx
sete al
jmp dword [eax*4 + 0x445644]
mov eax, dword [esp + 0x38]
lea eax, [eax + eax*2]
mov ecx, dword [esp + 0x28]
lea eax, [ecx + eax*4]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
add ecx, 0xc
xor edx, edx
cmp ecx, eax
sete dl
jmp dword [edx*4 + 0x44564c]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
add ecx, 0xc
xor edx, edx
cmp ecx, eax
sete dl
jmp dword [edx*4 + 0x44564c]
jmp dword [0x44565c]
lea esi, [esp + 0x48]
mov ecx, esi
push 3
call fcn.0040a210
push dword [esp + 0x38]
mov edi, dword [esp + 0x2c]
push edi
push dword [esp + 0x48]
push dword [esp + 0x124]
push esi
call fcn.004160e0
add esp, 0x14
mov ecx, esi
call fcn.0040aae0
xor eax, eax
test edi, edi
sete al
jmp dword [eax*4 + 0x44567c]
jmp dword [0x4456c0]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret