Function at 0x40f8a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push edi
mov edi, ecx
mov dword [ebp - 0x28], edi
cmp dword [edi + 0x10], 1
jne 0x40f8bf
cmp dword [edi + 0x5c], 7
jne 0x40f8bf
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x8874], 0
push ebx
push esi
jne 0x40fa4f
mov eax, dword [edi + 0x8870]
test eax, eax
je 0x40fa4f
mov ecx, dword [edi + 0x8614]
mov ebx, 0x10
mov esi, dword [edi + 0x85b8]
mov edx, dword [edi + 0x855c]
neg edx
lea ecx, [ecx - 1]
mov eax, dword [esi + 0x24]
sbb edx, edx
shl ecx, 4
and edx, 3
sub eax, ecx
mov dword [ebp - 0x18], edx
inc eax
cmp eax, ebx
cmovb ebx, eax
mov dword [ebp - 0x10], ebx
mov ebx, dword [esi + 0x1c]
mov esi, dword [esi + 0x20]
inc ebx
cmp ecx, esi
jbe 0x40f920
xor esi, esi
jmp 0x40f923
and esi, 0xf
mov ecx, dword [edi + 0x85b8]
mov dword [ebp - 0xc], esi
mov eax, dword [ecx + 0x18]
mov dword [ebp - 8], eax
xor eax, eax
cmp dword [edi + 0xc], 4
sete al
add eax, 3
add eax, dword [edi + 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x8870]
mov eax, dword [eax + 0x86dc]
mov dword [ebp - 0x1c], eax
mov al, byte [edi + 0x808c]
mov byte [ebp - 0x2c], al
mov al, byte [edi + 0x808d]
mov byte [ebp - 1], al
mov eax, dword [ecx + 0x28]
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 0x8614]
shl eax, 6
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 0x2c]
mov ecx, dword [ebp - 0x34]
add ecx, 0xffffffc0
add eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0xc]
cmp eax, 7
je 0x40f996
cmp eax, 4
jne 0x40fe43
mov eax, dword [edi + 0x10]
cmp eax, 1
jne 0x40fa58
test edx, edx
jne 0x40f9aa
xor edi, edi
jmp 0x40f9b1
lea ecx, [edx - 1]
mov edi, eax
shl edi, cl
lea ecx, [edx + 7]
shl eax, cl
add eax, edi
mov dword [ebp - 0x30], eax
cmp esi, dword [ebp - 0x10]
jae 0x40fa4f
mov edx, dword [ebp - 8]
mov ecx, esi
shl ecx, 4
mov dword [ebp - 0x2c], ecx
nop
mov eax, dword [ebp - 0x14]
mov edi, edx
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x34], eax
cmp edx, ebx
jae 0x40fa40
mov esi, dword [ebp - 0x28]
mov eax, edi
and eax, 0xf
movzx ecx, byte [eax + ecx + 0x629b70]
mov eax, edi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
sar edx, cl
test edx, edx
jns 0x40fa0f
xor edx, edx
jmp 0x40fa1d
cmp edx, 0xff
mov eax, 0xff
cmovg edx, eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov eax, dword [eax + edi*4]
inc edi
add eax, dword [esi + 0x80a8]
add eax, dword [ebp - 0x34]
mov byte [eax + ecx], dl
mov ecx, dword [ebp - 0x2c]
cmp edi, ebx
jb 0x40f9e2
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
inc esi
add ecx, 0x10
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x2c], ecx
cmp esi, dword [ebp - 0x10]
jb 0x40f9d0
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40fb30
mov eax, 1
test edx, edx
jne 0x40fa6e
xor edi, edi
jmp 0x40fa75
lea ecx, [edx - 1]
mov edi, eax
shl edi, cl
lea ecx, [edx + 0xf]
shl eax, cl
add eax, edi
mov dword [ebp - 0x30], eax
cmp esi, dword [ebp - 0x10]
jae 0x40fa4f
movzx eax, byte [ebp - 0x2c]
mov ecx, esi
mov edx, dword [ebp - 8]
shl ecx, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x14]
mov edi, edx
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x38], eax
cmp edx, ebx
jae 0x40fb14
mov esi, dword [ebp - 0x28]
jmp 0x40fab0
mov eax, edi
and eax, 0xf
movzx ecx, byte [eax + ecx + 0x629b70]
mov eax, edi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
sar edx, cl
mov ecx, dword [ebp - 0x34]
shl edx, cl
test edx, edx
jns 0x40fae2
xor edx, edx
jmp 0x40faf0
cmp edx, 0xffff
mov eax, 0xffff
cmovg edx, eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + edi*4]
inc edi
add ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x24]
mov eax, dword [esi + 0x80a8]
mov word [eax + ecx*2], dx
mov ecx, dword [ebp - 0x2c]
cmp edi, ebx
jb 0x40fab0
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
inc esi
add ecx, 0x10
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x2c], ecx
cmp esi, dword [ebp - 0x10]
jb 0x40fa96
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x40fc09
test edx, edx
jne 0x40fb42
mov dword [ebp - 0x34], edx
jmp 0x40fb4f
lea ecx, [edx - 1]
mov eax, 1
shl eax, cl
mov dword [ebp - 0x34], eax
cmp esi, dword [ebp - 0x10]
jae 0x40fa4f
movzx eax, byte [ebp - 0x2c]
mov ecx, esi
mov edx, dword [ebp - 8]
shl ecx, 4
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], ecx
lea ebx, [ebx]
mov eax, dword [ebp - 0x14]
mov edi, edx
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x2c], eax
cmp edx, ebx
jae 0x40fbed
mov esi, dword [ebp - 0x28]
mov eax, edi
and eax, 0xf
movzx ecx, byte [eax + ecx + 0x629b70]
mov eax, edi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x18]
sar edx, cl
mov ecx, dword [ebp - 0x38]
shl edx, cl
cmp edx, 0xffff8000
jge 0x40fbbb
mov edx, 0xffff8000
jmp 0x40fbc9
cmp edx, 0x7fff
mov eax, 0x7fff
cmovg edx, eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + edi*4]
inc edi
add ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x24]
mov eax, dword [esi + 0x80a8]
mov word [eax + ecx*2], dx
mov ecx, dword [ebp - 0x30]
cmp edi, ebx
jb 0x40fb82
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
inc esi
add ecx, 0x10
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x30], ecx
cmp esi, dword [ebp - 0x10]
jb 0x40fb70
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
cmp eax, 4
jne 0x40fcc2
test edx, edx
jne 0x40fc1b
mov dword [ebp - 0x34], edx
jmp 0x40fc28
lea ecx, [edx - 1]
mov eax, 1
shl eax, cl
mov dword [ebp - 0x34], eax
cmp esi, dword [ebp - 0x10]
jae 0x40fa4f
mov edx, dword [ebp - 8]
mov ecx, esi
shl ecx, 4
mov dword [ebp - 0x30], ecx
lea esp, [esp]
mov eax, dword [ebp - 0x14]
mov edi, edx
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x38], eax
cmp edx, ebx
jae 0x40fcaa
mov esi, dword [ebp - 0x28]
mov eax, edi
and eax, 0xf
movzx ecx, byte [eax + ecx + 0x629b70]
mov eax, edi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x18]
sar edx, cl
mov eax, edx
and edx, 0x7fff
sar eax, 0x1f
xor edx, eax
sub edx, eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + edi*4]
inc edi
add ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x24]
mov eax, dword [esi + 0x80a8]
mov word [eax + ecx*2], dx
mov ecx, dword [ebp - 0x30]
cmp edi, ebx
jb 0x40fc52
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
inc esi
add ecx, 0x10
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x30], ecx
cmp esi, dword [ebp - 0x10]
jb 0x40fc40
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
cmp eax, 6
jne 0x40fd77
test edx, edx
jne 0x40fcd4
mov dword [ebp - 0x34], edx
jmp 0x40fce1
lea ecx, [edx - 1]
mov eax, 1
shl eax, cl
mov dword [ebp - 0x34], eax
cmp esi, dword [ebp - 0x10]
jae 0x40fa4f
movzx eax, byte [ebp - 0x2c]
mov ecx, esi
mov edx, dword [ebp - 8]
shl ecx, 4
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], ecx
lea esp, [esp]
mov eax, dword [ebp - 0x14]
mov edi, edx
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x2c], eax
cmp edx, ebx
jae 0x40fd5f
mov esi, dword [ebp - 0x28]
mov eax, edi
and eax, 0xf
movzx ecx, byte [eax + ecx + 0x629b70]
mov eax, edi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
sar edx, cl
mov ecx, dword [ebp - 0x38]
shl edx, cl
mov ecx, dword [eax + edi*4]
inc edi
add ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x24]
mov eax, dword [esi + 0x80a8]
mov dword [eax + ecx*4], edx
mov ecx, dword [ebp - 0x30]
cmp edi, ebx
jb 0x40fd12
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
inc esi
add ecx, 0x10
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x30], ecx
cmp esi, dword [ebp - 0x10]
jb 0x40fd00
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
cmp eax, 7
jne 0x40fe43
test edx, edx
jne 0x40fd89
mov dword [ebp - 0x34], edx
jmp 0x40fd96
lea ecx, [edx - 1]
mov eax, 1
shl eax, cl
mov dword [ebp - 0x34], eax
cmp esi, dword [ebp - 0x10]
jae 0x40fa4f
mov eax, dword [ebp - 8]
mov ecx, esi
shl ecx, 4
mov dword [ebp - 0x30], ecx
lea ebx, [ebx]
mov edx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], edx
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 8]
cmp eax, ebx
jae 0x40fe27
mov esi, dword [ebp - 0x18]
push dword [ebp - 0x2c]
mov eax, edx
and eax, 0xf
movzx ecx, byte [eax + ecx + 0x629b70]
mov eax, edx
mov dl, byte [ebp - 1]
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + ecx*4]
mov ecx, esi
add eax, dword [ebp - 0x34]
sar eax, cl
mov ecx, eax
call fcn.0040ecc0
mov edx, dword [ebp - 0x28]
add esp, 4
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + edx*4]
inc edx
add ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x24]
mov eax, dword [edi + 0x80a8]
mov dword [ebp - 0x28], edx
movss dword [eax + ecx*4], xmm0
mov ecx, dword [ebp - 0x30]
cmp edx, ebx
jb 0x40fdc8
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
inc esi
add ecx, 0x10
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x30], ecx
cmp esi, dword [ebp - 0x10]
jb 0x40fdb0
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
pop esi
pop ebx
or eax, 0xffffffff
pop edi
mov esp, ebp
pop ebp
ret