Function at 0x40eba0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
mov eax, ebx
push ebp
and eax, 0x11000
mov byte [esp + 0x24], bl
mov dword [esp + 0x28], eax
push esi
push edi
mov edi, dword [esp + 0x38]
cmp eax, 0x1000
jne 0x40ec2b
xor edx, edx
movzx eax, bl
movzx ecx, dl
imul ecx, eax
mov al, byte [edx + edi]
sub al, cl
xor al, bl
mov byte [edx + edi], al
inc edx
cmp edx, 0x40
jb 0x40ebc7
mov eax, dword [edi + 0x3c]
lea esi, [eax + 0x108]
cmp edx, esi
jae 0x40ec0b
lea ecx, [ecx]
movzx eax, bl
movzx ecx, dl
imul ecx, eax
mov al, byte [edx + edi]
sub al, cl
xor al, bl
mov byte [edx + edi], al
inc edx
cmp edx, esi
jb 0x40ebf0
mov eax, dword [edi + 0x3c]
mov esi, dword [eax + edi + 0x54]
cmp edx, esi
jae 0x40ec2b
movzx eax, bl
movzx ecx, dl
imul ecx, eax
mov al, byte [edx + edi]
sub al, cl
xor al, bl
mov byte [edx + edi], al
inc edx
cmp edx, esi
jb 0x40ec13
mov ecx, dword [edi + 0x3c]
lea esi, [ecx + edi]
mov dword [esp + 0x3c], esi
test ebx, 0x2000
je 0x40ef91
mov edx, dword [esi + 0x90]
test edx, edx
je 0x40ef91
cmp byte [esp + 0x40], 0
je 0x40eca6
movzx eax, word [esi + 0x14]
movzx ebp, word [esi + 6]
add eax, ecx
lea ecx, [edi + 0x18]
xor edi, edi
add ecx, eax
test ebp, ebp
je 0x40ec88
jmp 0x40ec70
mov esi, dword [ecx + 0xc]
cmp esi, edx
ja 0x40ec80
mov eax, dword [ecx + 8]
add eax, esi
cmp eax, edx
ja 0x40ec90
inc edi
add ecx, 0x28
cmp edi, ebp
jl 0x40ec70
mov edi, dword [esp + 0x38]
xor eax, eax
jmp 0x40eca8
mov edi, dword [esp + 0x38]
sub edx, esi
cmp edx, dword [ecx + 0x10]
jb 0x40ec9f
xor eax, eax
jmp 0x40eca8
mov eax, dword [ecx + 0x14]
add eax, edx
jmp 0x40eca8
mov eax, edx
add eax, edi
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], eax
cmp dword [eax + 0x10], 0
je 0x40ef91
mov ecx, ebx
mov dword [esp + 0x14], eax
and ecx, 0x10000
mov edi, eax
mov dword [esp + 0x10], ecx
cmp byte [esp + 0x40], 0
mov esi, dword [edi + 0xc]
je 0x40ed3e
mov ebp, dword [esp + 0x38]
xor edi, edi
mov ecx, dword [ebp + 0x3c]
lea edx, [ebp + 0x18]
movzx eax, word [ecx + ebp + 0x14]
movzx ebp, word [ecx + ebp + 6]
add eax, ecx
add edx, eax
test ebp, ebp
je 0x40ed18
lea ebx, [ebx]
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40ed10
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, esi
ja 0x40ed24
inc edi
add edx, 0x28
cmp edi, ebp
jl 0x40ed00
mov edi, dword [esp + 0x14]
xor eax, eax
mov ecx, dword [esp + 0x10]
jmp 0x40ed40
mov edi, dword [esp + 0x14]
sub esi, ecx
mov ecx, dword [esp + 0x10]
cmp esi, dword [edx + 0x10]
jb 0x40ed37
xor eax, eax
jmp 0x40ed40
mov eax, dword [edx + 0x14]
add eax, esi
jmp 0x40ed40
mov eax, esi
mov edx, dword [esp + 0x38]
lea esi, [eax + edx]
test esi, esi
je 0x40edc5
test ecx, ecx
je 0x40eda0
test bl, bl
je 0x40edc5
xor ecx, ecx
mov dword [esp + 0x14], ecx
cmp byte [esi], cl
je 0x40ed87
lea ecx, [ecx]
cmp ecx, 0xffffffff
jae 0x40ed87
mov dl, byte [ecx + esi]
movsx ecx, cl
xor dl, bl
movsx eax, bl
imul ecx, eax
add dl, cl
mov ecx, dword [esp + 0x14]
mov byte [ecx + esi], dl
inc ecx
mov dword [esp + 0x14], ecx
cmp byte [ecx + esi], 0
jne 0x40ed60
mov dl, byte [ecx + esi]
movsx eax, bl
xor dl, bl
movsx ecx, cl
imul ecx, eax
mov eax, dword [esp + 0x14]
add dl, cl
mov byte [eax + esi], dl
jmp 0x40edc1
test bl, bl
je 0x40edc5
xor edx, edx
movsx eax, bl
movsx ecx, dl
imul ecx, eax
mov al, byte [edx + esi]
sub al, cl
xor al, bl
mov byte [edx + esi], al
je 0x40edc1
inc edx
cmp edx, 0xffffffff
jb 0x40eda6
mov edx, dword [esp + 0x38]
cmp byte [esp + 0x40], 0
mov esi, dword [edi]
je 0x40ee1e
mov ecx, dword [edx + 0x3c]
xor edi, edi
movzx eax, word [ecx + edx + 0x14]
add eax, 0x18
add eax, ecx
add edx, eax
mov eax, dword [esp + 0x38]
movzx ebp, word [ecx + eax + 6]
test ebp, ebp
je 0x40ee13
lea esp, [esp]
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40ee00
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, esi
ja 0x40ee0c
inc edi
add edx, 0x28
cmp edi, ebp
jl 0x40edf0
xor eax, eax
jmp 0x40ee20
sub esi, ecx
cmp esi, dword [edx + 0x10]
jb 0x40ee17
xor eax, eax
jmp 0x40ee20
mov eax, dword [edx + 0x14]
add eax, esi
jmp 0x40ee20
mov eax, esi
mov ecx, dword [esp + 0x38]
xor ebp, ebp
add ecx, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ecx
mov edx, dword [ecx]
mov eax, edx
mov esi, dword [ecx + 4]
or eax, esi
je 0x40ef67
nop
mov eax, dword [ecx + 4]
mov edi, dword [ecx]
mov dword [esp + 0x18], eax
test esi, esi
jl 0x40ef4b
jg 0x40ee5b
test edx, edx
jb 0x40ef4b
cmp byte [esp + 0x40], 0
je 0x40eebe
mov ebp, dword [esp + 0x38]
xor esi, esi
mov ecx, dword [ebp + 0x3c]
lea edx, [ebp + 0x18]
movzx eax, word [ecx + ebp + 0x14]
movzx ebp, word [ecx + ebp + 6]
add eax, ecx
add edx, eax
test ebp, ebp
je 0x40ee98
mov ecx, dword [edx + 0xc]
cmp ecx, edi
ja 0x40ee90
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, edi
ja 0x40eea4
inc esi
add edx, 0x28
cmp esi, ebp
jl 0x40ee80
mov ebp, dword [esp + 0x1c]
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x40eec4
sub edi, ecx
cmp edi, dword [edx + 0x10]
jae 0x40ee98
mov eax, dword [edx + 0x14]
mov ebp, dword [esp + 0x1c]
add eax, edi
mov dword [esp + 0x18], 0
jmp 0x40eec4
mov eax, edx
mov dword [esp + 0x18], esi
mov edi, dword [esp + 0x38]
add edi, 2
add edi, eax
cmp dword [esp + 0x10], 0
je 0x40ef26
test edi, edi
je 0x40ef4b
test bl, bl
je 0x40ef4b
xor edx, edx
mov dword [esp + 0x14], edx
cmp byte [edi], dl
je 0x40ef09
mov esi, edi
cmp edx, 0xffffffff
jae 0x40ef05
movsx eax, bl
movsx ecx, dl
inc edx
imul ecx, eax
mov al, byte [esi]
xor al, bl
add cl, al
mov byte [esi], cl
inc esi
cmp byte [esi], 0
jne 0x40eee8
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x14]
mov dl, byte [edx + edi]
movsx eax, bl
xor dl, bl
movsx ecx, cl
imul ecx, eax
mov eax, dword [esp + 0x14]
add dl, cl
mov byte [eax + edi], dl
jmp 0x40ef4b
test edi, edi
je 0x40ef4b
test bl, bl
je 0x40ef4b
xor eax, eax
movsx ecx, bl
movsx edx, al
imul edx, ecx
mov cl, byte [eax + edi]
sub cl, dl
xor cl, bl
mov byte [eax + edi], cl
je 0x40ef4b
inc eax
cmp eax, 0xffffffff
jb 0x40ef30
mov eax, dword [esp + 0x24]
inc ebp
mov edx, dword [eax + ebp*8]
lea ecx, [eax + ebp*8]
mov esi, dword [ecx + 4]
mov eax, edx
or eax, esi
mov dword [esp + 0x1c], ebp
jne 0x40ee40
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
inc edx
mov dword [esp + 0x20], edx
lea eax, [edx + edx*4]
cmp dword [ecx + eax*4 + 0x10], 0
lea edi, [ecx + eax*4]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], edi
jne 0x40ecd2
mov edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
test ebx, 0x4000
je 0x40f247
mov esi, dword [ebp + 0x88]
test esi, esi
je 0x40f247
cmp byte [esp + 0x40], 0
je 0x40f00a
mov ecx, dword [edi + 0x3c]
lea edx, [edi + 0x18]
movzx eax, word [ecx + edi + 0x14]
xor edi, edi
add eax, ecx
add edx, eax
mov eax, dword [esp + 0x38]
movzx ebp, word [ecx + eax + 6]
test ebp, ebp
je 0x40efec
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40efe4
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, esi
ja 0x40eff4
inc edi
add edx, 0x28
cmp edi, ebp
jl 0x40efd4
mov edi, dword [esp + 0x38]
xor eax, eax
jmp 0x40f00c
mov edi, dword [esp + 0x38]
sub esi, ecx
cmp esi, dword [edx + 0x10]
jb 0x40f003
xor eax, eax
jmp 0x40f00c
mov eax, dword [edx + 0x14]
add eax, esi
jmp 0x40f00c
mov eax, esi
cmp byte [esp + 0x40], 0
lea ebp, [eax + edi]
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x14], ebp
je 0x40f07e
mov ecx, dword [edi + 0x3c]
lea edx, [edi + 0x18]
movzx eax, word [ecx + edi + 0x14]
xor edi, edi
add eax, ecx
add edx, eax
mov eax, dword [esp + 0x38]
movzx ebp, word [ecx + eax + 6]
test ebp, ebp
je 0x40f058
jmp 0x40f040
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40f050
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, esi
ja 0x40f064
inc edi
add edx, 0x28
cmp edi, ebp
jl 0x40f040
mov ebp, dword [esp + 0x14]
xor eax, eax
mov edi, dword [esp + 0x38]
jmp 0x40f080
mov ebp, dword [esp + 0x14]
sub esi, ecx
mov edi, dword [esp + 0x38]
cmp esi, dword [edx + 0x10]
jb 0x40f077
xor eax, eax
jmp 0x40f080
mov eax, dword [edx + 0x14]
add eax, esi
jmp 0x40f080
mov eax, esi
lea esi, [eax + edi]
mov eax, ebx
and eax, 0x10000
mov dword [esp + 0x28], eax
je 0x40f09f
push 0
push dword [esp + 0x30]
push esi
push esi
call fcn.004114d0
jmp 0x40f0cb
test esi, esi
je 0x40f0cb
test bl, bl
je 0x40f0cb
xor edx, edx
lea esp, [esp]
movsx eax, bl
movsx ecx, dl
imul ecx, eax
mov al, byte [edx + esi]
sub al, cl
xor al, bl
mov byte [edx + esi], al
je 0x40f0cb
inc edx
cmp edx, 0xffffffff
jb 0x40f0b0
cmp dword [ebp + 0x18], 0
mov dword [esp + 0x1c], 0
jbe 0x40f243
lea ecx, [ecx]
cmp byte [esp + 0x40], 0
mov esi, dword [ebp + 0x20]
je 0x40f13e
mov ecx, dword [edi + 0x3c]
lea edx, [edi + 0x18]
movzx eax, word [ecx + edi + 0x14]
xor edi, edi
add eax, ecx
add edx, eax
mov eax, dword [esp + 0x38]
movzx ebp, word [ecx + eax + 6]
test ebp, ebp
je 0x40f120
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40f118
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, esi
ja 0x40f128
inc edi
add edx, 0x28
cmp edi, ebp
jl 0x40f108
mov edi, dword [esp + 0x38]
xor eax, eax
jmp 0x40f140
mov edi, dword [esp + 0x38]
sub esi, ecx
cmp esi, dword [edx + 0x10]
jb 0x40f137
xor eax, eax
jmp 0x40f140
mov eax, dword [edx + 0x14]
add eax, esi
jmp 0x40f140
mov eax, esi
cmp byte [esp + 0x40], 0
mov ecx, dword [esp + 0x1c]
lea eax, [eax + ecx*4]
mov esi, dword [eax + edi]
je 0x40f1a6
mov ecx, dword [edi + 0x3c]
lea edx, [edi + 0x18]
movzx eax, word [ecx + edi + 0x14]
xor edi, edi
add eax, ecx
add edx, eax
mov eax, dword [esp + 0x38]
movzx ebp, word [ecx + eax + 6]
test ebp, ebp
je 0x40f188
nop
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40f180
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, esi
ja 0x40f190
inc edi
add edx, 0x28
cmp edi, ebp
jl 0x40f170
mov edi, dword [esp + 0x38]
xor eax, eax
jmp 0x40f1a8
mov edi, dword [esp + 0x38]
sub esi, ecx
cmp esi, dword [edx + 0x10]
jb 0x40f19f
xor eax, eax
jmp 0x40f1a8
mov eax, dword [edx + 0x14]
add eax, esi
jmp 0x40f1a8
mov eax, esi
cmp dword [esp + 0x28], 0
lea esi, [eax + edi]
je 0x40f208
test esi, esi
je 0x40f22d
test bl, bl
je 0x40f22d
xor ecx, ecx
mov dword [esp + 0x10], ecx
cmp byte [esi], cl
je 0x40f1ef
cmp ecx, 0xffffffff
jae 0x40f1ef
mov dl, byte [ecx + esi]
movsx ecx, cl
xor dl, bl
movsx eax, bl
imul ecx, eax
add dl, cl
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi], dl
inc ecx
mov dword [esp + 0x10], ecx
cmp byte [ecx + esi], 0
jne 0x40f1c8
mov dl, byte [ecx + esi]
movsx eax, bl
xor dl, bl
movsx ecx, cl
imul ecx, eax
mov eax, dword [esp + 0x10]
add dl, cl
mov byte [eax + esi], dl
jmp 0x40f22d
test esi, esi
je 0x40f22d
test bl, bl
je 0x40f22d
xor edx, edx
movsx eax, bl
movsx ecx, dl
imul ecx, eax
mov al, byte [edx + esi]
sub al, cl
xor al, bl
mov byte [edx + esi], al
je 0x40f22d
inc edx
cmp edx, 0xffffffff
jb 0x40f212
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [ebp + 0x18]
jb 0x40f0e0
mov ebp, dword [esp + 0x3c]
test ebx, 0x8000
je 0x40f31e
mov esi, dword [ebp + 0x98]
test esi, esi
je 0x40f31e
cmp byte [esp + 0x40], 0
je 0x40f2c4
mov ecx, dword [edi + 0x3c]
lea edx, [edi + 0x18]
movzx eax, word [ecx + edi + 0x14]
xor edi, edi
add eax, ecx
add edx, eax
mov eax, dword [esp + 0x38]
movzx ebp, word [ecx + eax + 6]
test ebp, ebp
je 0x40f29e
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x40f296
mov eax, dword [edx + 8]
add eax, ecx
cmp eax, esi
ja 0x40f2aa
inc edi
add edx, 0x28
cmp edi, ebp
jl 0x40f286
mov edi, dword [esp + 0x38]
xor eax, eax
mov ebp, dword [esp + 0x3c]
jmp 0x40f2c6
mov edi, dword [esp + 0x38]
sub esi, ecx
mov ebp, dword [esp + 0x3c]
cmp esi, dword [edx + 0x10]
jb 0x40f2bd
xor eax, eax
jmp 0x40f2c6
mov eax, dword [edx + 0x14]
add eax, esi
jmp 0x40f2c6
mov eax, esi
xor edx, edx
lea esi, [eax + edi]
mov eax, dword [ebp + 0x9c]
test ebx, 0x10000
je 0x40f2fe
test eax, eax
je 0x40f31e
lea ecx, [ecx]
movzx eax, bl
movzx ecx, dl
imul ecx, eax
mov al, byte [edx + esi]
xor al, bl
add cl, al
mov byte [edx + esi], cl
inc edx
cmp edx, dword [ebp + 0x9c]
jb 0x40f2e0
jmp 0x40f31e
test eax, eax
je 0x40f31e
movzx eax, bl
movzx ecx, dl
imul ecx, eax
mov al, byte [edx + esi]
sub al, cl
xor al, bl
mov byte [edx + esi], al
inc edx
cmp edx, dword [ebp + 0x9c]
jb 0x40f302
cmp dword [esp + 0x30], 0x11000
jne 0x40f355
mov esi, dword [ebp + 0x54]
xor ecx, ecx
mov dword [esp + 0x40], ecx
test esi, esi
je 0x40f355
mov dl, byte [ecx + edi]
movzx ecx, cl
xor dl, bl
movzx eax, bl
imul ecx, eax
add dl, cl
mov ecx, dword [esp + 0x40]
mov byte [ecx + edi], dl
inc ecx
mov dword [esp + 0x40], ecx
cmp ecx, esi
jb 0x40f335
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0xc