Function at 0x40c0b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.0040cae0
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.0040cc00
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x1c], ebx
je 0x40c175
test esi, esi
jle 0x40c8f3
xor eax, eax
cmp dword [esp + 0x15c4], 1
je 0x40c148
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x2c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x2c]
add eax, 2
cmp ecx, eax
jne 0x40c130
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x40c8f3
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x2c]
jmp 0x40c8f3
lea eax, [ebx + ebx*8]
mov dword [esp + 0x18], eax
mov ebp, eax
shl ebp, 6
test esi, esi
mov dword [esp + 0x14], edi
jle 0x40c269
cmp esi, 1
jne 0x40c747
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x40c1c9
lea ecx, [edi + ebp]
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40c1c9
mov word [esp + ebx*4 + 0xb0], cx
mov word [esp + ebx*4 + 0xb2], ax
inc ebx
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.0040cc00
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x40c280
xor eax, eax
cmp ebx, 1
je 0x40c23f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x530]
shr edx, 8
inc dword [esp + edx*4 + 0x930]
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x530]
shr edx, 8
inc dword [esp + edx*4 + 0x930]
add eax, 2
cmp ecx, eax
jne 0x40c200
test bl, 1
je 0x40c260
movzx eax, word [esp + eax*4 + 0xb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x530]
shr eax, 8
inc dword [esp + eax*4 + 0x930]
mov eax, dword [esp + 0x930]
jmp 0x40c289
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.0040cc00
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x24], ebp
xor ecx, ecx
cmp eax, ebx
setne cl
inc ecx
mov dword [esp + 0x28], ecx
lea eax, [ebx - 1]
mov dword [esp + 0x20], eax
mov dword [esp + 8], ebx
mov edx, ebx
and edx, 0xfffffffe
lea eax, [esp + 0xb0]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x1130]
xor ecx, ecx
xor esi, esi
mov dword [esp], edx
jmp 0x40c2e4
mov esi, dword [esp + 0xc]
inc esi
add ecx, 8
mov eax, edi
cmp esi, dword [esp + 0x28]
je 0x40c3cf
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov eax, esi
shl eax, 0xa
add eax, esp
add eax, 0x530
xor ebp, ebp
xor edx, edx
mov dword [esp + edx*4 + 0xd30], ebp
add ebp, dword [eax + edx*4]
mov ebx, edx
xor ebx, 1
and edx, 1
lea edx, [ebx + edx*2]
cmp edx, 0x100
jb 0x40c300
cmp byte [esp + 7], 0
jne 0x40c2d0
cmp dword [esp + 0x20], 0
je 0x40c399
xor eax, eax
mov esi, dword [esp + 0x10]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xd30]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xd30], ebp
mov edx, dword [edi + eax*4]
mov dword [esi + ebx*4], edx
movzx edx, word [edi + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xd30]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xd30], ebp
mov edx, dword [edi + eax*4 + 4]
mov dword [esi + ebx*4], edx
mov edx, dword [esp]
add eax, 2
cmp edx, eax
jne 0x40c340
test byte [esp + 8], 1
je 0x40c2d0
jmp 0x40c3a6
xor eax, eax
test byte [esp + 8], 1
je 0x40c2d0
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xd30]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xd30], ebp
mov eax, dword [edi + eax*4]
mov esi, dword [esp + 0x10]
mov dword [esi + ebx*4], eax
jmp 0x40c2d0
mov ebx, dword [esp + 8]
test ebx, ebx
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
je 0x40c7b5
cmp ebx, 1
jne 0x40c3f2
mov word [esi], 1
jmp 0x40c62b
movzx eax, word [esi + 4]
add word [esi], ax
cmp ebx, 3
jl 0x40c49d
mov eax, 2
mov ecx, 2
sub ecx, dword [esp + 8]
mov dword [esp], ecx
xor edx, edx
mov edi, 1
jmp 0x40c435
movzx ebp, word [esi + eax*4]
inc eax
add word [esi + edi*4], bp
mov ecx, dword [esp]
add ecx, edi
inc ecx
inc edi
cmp ecx, 1
je 0x40c49d
movzx ebx, word [esi + edx*4]
cmp eax, dword [esp + 8]
jge 0x40c448
movzx ebp, word [esi + eax*4]
cmp bx, bp
jae 0x40c470
mov word [esi + edi*4], bx
mov word [esi + edx*4], di
inc edx
cmp eax, dword [esp + 8]
jge 0x40c47b
cmp edx, edi
jge 0x40c420
movzx ebx, word [esi + edx*4]
movzx ebp, word [esi + eax*4]
cmp bx, bp
jae 0x40c424
jmp 0x40c47f
mov word [esi + edi*4], bp
inc eax
cmp eax, dword [esp + 8]
jl 0x40c457
movzx ebx, word [esi + edx*4]
movzx ebp, word [esi + edi*4]
mov ecx, ebp
and ecx, ebx
xor ebp, ebx
lea ecx, [ecx*2]
add ecx, ebp
mov word [esi + edi*4], cx
mov word [esi + edx*4], di
inc edx
jmp 0x40c429
mov ebx, dword [esp + 8]
mov eax, ebx
not eax
mov word [esi + ebx*4 - 8], 0
and eax, 3
mov ecx, ebx
and ecx, 0xfffffffc
sub ecx, eax
mov ebp, dword [esp + 0x18]
js 0x40c531
mov edx, 1
sub edx, eax
mov eax, ecx
and edx, 3
je 0x40c4e1
mov eax, ecx
nop
nop
nop
nop
movzx edi, word [esi + eax*4]
movzx edi, word [esi + edi*4]
inc edi
mov word [esi + eax*4], di
dec eax
dec edx
jne 0x40c4d0
cmp ecx, 3
jb 0x40c531
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esi + eax*4 - 4]
movzx ecx, word [esi + ecx*4]
inc ecx
mov word [esi + eax*4 - 4], cx
movzx ecx, word [esi + eax*4 - 8]
movzx ecx, word [esi + ecx*4]
inc ecx
mov word [esi + eax*4 - 8], cx
movzx ecx, word [esi + eax*4 - 0xc]
movzx ecx, word [esi + ecx*4]
inc ecx
mov word [esi + eax*4 - 0xc], cx
movzx ecx, word [esi + eax*4 - 0x10]
movzx ecx, word [esi + ecx*4]
inc ecx
mov word [esi + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x40c4f0
lea ecx, [ebx - 2]
mov edi, 1
xor edx, edx
mov eax, dword [esp + 0x20]
jmp 0x40c560
mov edi, dword [esp]
add edi, edi
inc edx
cmp dword [esp], 0
je 0x40c623
test ecx, ecx
mov dword [esp + 0xc], edi
js 0x40c590
lea edi, [ecx + 1]
mov dword [esp], edi
xor edi, edi
movzx ebx, word [esi + ecx*4]
cmp edx, ebx
jne 0x40c5a0
inc edi
dec ecx
cmp dword [esp], edi
jne 0x40c570
mov ecx, 0xffffffff
jmp 0x40c5a3
mov dword [esp], 0
sub edi, dword [esp]
jle 0x40c550
jmp 0x40c5b0
mov dword [esp], edi
mov ebx, dword [esp + 8]
mov edi, dword [esp + 0xc]
sub edi, dword [esp]
jle 0x40c550
and edi, 3
je 0x40c5da
lea ebp, [esi + eax*4]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
mov word [ebp], dx
inc ebx
add ebp, 0xfffffffc
cmp edi, ebx
jne 0x40c5c0
mov edi, dword [esp + 0xc]
sub edi, ebx
sub eax, ebx
mov ebp, dword [esp + 0x18]
jmp 0x40c5de
mov edi, dword [esp + 0xc]
mov ebx, dword [esp]
sub ebx, dword [esp + 0xc]
cmp ebx, 0xfffffffc
mov ebx, dword [esp + 8]
ja 0x40c550
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi + eax*4], dx
mov word [esi + eax*4 - 4], dx
mov word [esi + eax*4 - 8], dx
mov word [esi + eax*4 - 0xc], dx
add eax, 0xfffffffc
add edi, 0xfffffffc
cmp edi, dword [esp]
jg 0x40c600
jmp 0x40c550
test ebx, ebx
jle 0x40c7b5
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x20], 3
jb 0x40c66a
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
movzx edi, word [esi + ecx*4]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 4]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 8]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 0xc]
inc dword [esp + edi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x40c640
test eax, eax
je 0x40c68d
lea ecx, [esi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ecx + edx*4]
inc dword [esp + edi*4 + 0x2c]
inc edx
cmp eax, edx
jne 0x40c680
cmp ebx, 2
jl 0x40c7b5
mov edx, dword [esp + 0x15c8]
cmp edx, 0x20
jge 0x40c710
mov eax, dword [esp + edx*4 + 0x2c]
mov edi, edx
neg edx
mov ecx, edi
and edx, 3
je 0x40c6cc
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + edi*4 + 0x2c], eax
dec edx
jne 0x40c6c0
lea edx, [edi - 0x1d]
cmp edx, 3
mov edx, edi
jb 0x40c708
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x3c]
add ecx, 4
mov dword [esp + edx*4 + 0x2c], eax
cmp ecx, 0x20
jne 0x40c6e0
test edx, edx
jle 0x40c7a5
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + edx*4 + 0x28]
shl edi, cl
add eax, edi
dec edx
inc ecx
cmp edx, 1
ja 0x40c720
mov edx, 1
mov ecx, dword [esp + 0x15c8]
shl edx, cl
cmp eax, edx
jne 0x40ca3d
jmp 0x40c7b5
mov ecx, esi
and ecx, 0x7ffffffe
lea edx, [edi + ebp]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x40c76b
add eax, 2
cmp ecx, eax
je 0x40c19a
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x40c786
mov word [esp + ebx*4 + 0xb0], si
mov word [esp + ebx*4 + 0xb2], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x40c760
mov word [esp + ebx*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0xb2], si
inc ebx
jmp 0x40c760
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x40ca3d
shl ebp, 5
mov edi, dword [esp + 0x14]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040cc00
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040cc00
add esp, 0xc
cmp dword [esp + 0x15c8], 0
jle 0x40c8ef
mov eax, dword [esp + 0x15c8]
lea edx, [eax + 1]
cmp edx, 3
jge 0x40c811
mov edx, 2
add esi, 0xfffffffe
mov ecx, 1
add ebp, dword [esp + 0x14]
mov dword [esp + 0xc], edx
jmp 0x40c839
inc ecx
cmp ecx, edx
je 0x40c8ef
mov eax, dword [esp + ecx*4 + 0x2c]
test eax, eax
jle 0x40c830
mov edi, eax
and edi, 3
je 0x40c8a0
mov dword [esp], eax
mov edx, ebp
mov dword [esp + 8], ebx
lea ebp, [esi + ebx*4]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp]
mov byte [eax + edx + 0x8f12], cl
inc ebx
add ebp, 0xfffffffc
cmp edi, ebx
jne 0x40c860
mov eax, dword [esp + 8]
sub eax, ebx
mov ebp, dword [esp]
mov edi, ebp
sub edi, ebx
mov ebx, eax
mov eax, ebp
mov ebp, edx
mov edx, dword [esp + 0xc]
cmp eax, 4
jb 0x40c830
jmp 0x40c8a7
mov edi, eax
cmp eax, 4
jb 0x40c830
dec edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [esi + ebx*4]
mov byte [eax + ebp + 0x8f12], cl
movzx eax, word [esi + ebx*4 - 4]
mov byte [eax + ebp + 0x8f12], cl
movzx eax, word [esi + ebx*4 - 8]
mov byte [eax + ebp + 0x8f12], cl
movzx eax, word [esi + ebx*4 - 0xc]
add ebx, 0xfffffffc
mov byte [eax + ebp + 0x8f12], cl
add edi, 0xfffffffc
cmp edi, 0xfffffffe
jb 0x40c8b0
jmp 0x40c830
mov edi, dword [esp + 0x14]
mov dword [esp + 0x534], 0
mov esi, dword [esp + 0x15c8]
cmp esi, 2
jl 0x40c965
inc esi
xor eax, eax
cmp esi, 4
jge 0x40c917
mov esi, 3
mov ecx, 2
jl 0x40c951
mov edx, esi
and edx, 0x7ffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x28]
add eax, eax
mov dword [esp + ecx*4 + 0x530], eax
add eax, dword [esp + ecx*4 + 0x2c]
add eax, eax
mov dword [esp + ecx*4 + 0x534], eax
add ecx, 2
cmp edx, ecx
jne 0x40c930
mov edx, esi
test dl, 1
je 0x40c965
add eax, dword [esp + ecx*4 + 0x28]
add eax, eax
mov dword [esp + ecx*4 + 0x530], eax
mov ecx, dword [esp + 0x15c4]
test ecx, ecx
jle 0x40ca32
xor eax, eax
mov edx, dword [esp + 0x1c]
lea esi, [edx + edx*8]
mov edx, esi
shl edx, 5
add edx, edi
shl esi, 6
add esi, edi
mov dword [esp], esi
jmp 0x40c9ab
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x40ca32
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x40c9a2
mov ecx, dword [esp + ebx*4 + 0x530]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x530], edi
xor edi, edi
cmp bl, 4
jb 0x40ca0f
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, ecx
and edi, 2
or edi, esi
mov esi, ecx
shr esi, 2
and esi, 1
or esi, edi
mov edi, ecx
shr edi, 3
and edi, 1
lea edi, [edi + esi*2]
shr ecx, 4
add ebp, 0xfffffffc
jne 0x40c9e0
and ebx, 3
je 0x40c990
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
lea edi, [esi + edi*2]
shr ecx, 1
dec ebx
jne 0x40ca20
jmp 0x40c990
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15c8]
dec dword [esp + ecx*4 + 0x2c]
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x40ca68
mov edi, dword [esp + ecx*4 + 0x28]
dec ecx
test edi, edi
je 0x40ca50
dec edi
mov dword [esp + ecx*4 + 0x2c], edi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x40ca3d
jmp 0x40c7b5