Function at 0x40bc90
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.0040c650
mov edi, edx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15c4]
mov esi, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.0040c880
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x1c], edi
je 0x40bd5e
test esi, esi
mov ecx, esi
jle 0x40c436
xor eax, eax
cmp ecx, 1
je 0x40bd28
mov ecx, dword [esp + 0x15c0]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x28]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x28]
add eax, 2
cmp ecx, eax
jne 0x40bd10
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x40c436
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c0]
inc dword [esp + eax*4 + 0x28]
jmp 0x40c436
lea ebp, [edi + edi*8]
mov eax, ebp
shl eax, 6
mov dword [esp + 0x18], eax
test esi, esi
jle 0x40be15
cmp esi, 1
jne 0x40c065
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x40bdb9
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x18]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40bdb9
mov edx, edi
mov word [esp + edi*4 + 0x4ac], cx
mov word [esp + edi*4 + 0x4ae], ax
inc edx
mov edi, edx
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.0040c880
add esp, 0xc
mov eax, edi
test edi, edi
sete byte [esp + 0x14]
je 0x40be2c
xor eax, eax
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4ac]
mov edx, ecx
not edx
or edx, 0xff
add edx, ecx
inc dword [esp + edx*4 + 0x930]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd2c]
inc eax
cmp edi, eax
jne 0x40bde0
mov edx, edi
mov eax, dword [esp + 0xd2c]
jmp 0x40be35
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.0040c880
add esp, 0xc
xor edx, edx
mov byte [esp + 0x14], 1
xor eax, eax
xor ecx, ecx
cmp eax, edx
setne cl
inc ecx
mov dword [esp + 0x24], ecx
mov dword [esp], edx
and edx, 0xfffffffe
mov dword [esp + 8], edx
lea eax, [esp + 0x4ac]
mov dword [esp + 4], eax
lea eax, [esp + 0x112c]
xor ecx, ecx
lea esi, [esp + 0x92c]
xor edx, edx
mov dword [esp + 0x20], ebp
jmp 0x40be88
inc eax
add ecx, 8
add esi, 0x400
mov edx, eax
mov eax, edi
cmp edx, dword [esp + 0x24]
je 0x40bf9d
mov dword [esp + 0x10], edx
mov edi, dword [esp + 4]
mov dword [esp + 4], eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa0], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xa4], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xa8], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x40bea0
cmp byte [esp + 0x14], 0
mov eax, dword [esp + 0x10]
jne 0x40be70
xor edx, edx
cmp dword [esp], 1
mov ebp, edi
je 0x40bf4a
xor edx, edx
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, ebp
mov ebp, dword [esp + eax*4 + 0xac]
lea ebx, [ebp + 1]
mov dword [esp + eax*4 + 0xac], ebx
mov eax, dword [edi + edx*4]
mov ebx, dword [esp + 4]
mov dword [ebx + ebp*4], eax
movzx eax, word [edi + edx*4 + 4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xac]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xac], ebp
mov ebp, edi
mov eax, dword [edi + edx*4 + 4]
mov edi, dword [esp + 4]
mov dword [edi + ebx*4], eax
mov edi, dword [esp + 8]
add edx, 2
cmp edi, edx
jne 0x40bef0
test byte [esp], 1
mov ebx, dword [esp + 0x15c4]
mov edi, ebp
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
je 0x40be70
movzx eax, word [edi + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xac]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xac], ebp
mov ebp, dword [esp + 0x20]
mov eax, dword [edi + edx*4]
mov edx, dword [esp + 4]
mov dword [edx + ebx*4], eax
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x15c4]
jmp 0x40be70
cmp dword [esp], 0
je 0x40c320
mov ecx, dword [esp]
cmp ecx, 1
jne 0x40bfbd
mov eax, dword [esp + 4]
mov word [eax], 1
jmp 0x40c253
mov edi, dword [esp + 4]
movzx eax, word [edi + 4]
add word [edi], ax
cmp ecx, 3
jl 0x40c0d5
mov eax, 2
mov edx, 2
sub edx, ecx
mov dword [esp + 8], edx
xor edx, edx
mov esi, 1
jmp 0x40c00a
movzx ebx, word [edi + eax*4]
inc eax
add word [edi + esi*4], bx
mov ecx, dword [esp + 8]
add ecx, esi
inc ecx
inc esi
cmp ecx, 1
je 0x40c0e4
cmp eax, dword [esp]
jge 0x40c040
movzx ebx, word [edi + eax*4]
movzx ecx, word [edi + edx*4]
cmp cx, bx
jb 0x40c044
inc eax
mov word [edi + esi*4], bx
cmp eax, dword [esp]
jl 0x40c052
movzx ecx, word [edi + edx*4]
add word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
jmp 0x40bff9
movzx ecx, word [edi + edx*4]
mov word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
cmp eax, dword [esp]
jge 0x40c026
cmp edx, esi
jge 0x40bff0
movzx ecx, word [edi + edx*4]
movzx ebx, word [edi + eax*4]
cmp cx, bx
jae 0x40bff4
jmp 0x40c02a
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x18]
add edx, eax
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40c09b
add eax, 2
cmp ecx, eax
je 0x40bd7f
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x40c0b6
mov word [esp + edi*4 + 0x4ac], si
mov word [esp + edi*4 + 0x4ae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x40c090
mov word [esp + edi*4 + 0x4ac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0x4ae], si
inc edi
jmp 0x40c090
lea eax, [ecx - 2]
mov word [edi + ecx*4 - 8], 0
jmp 0x40c164
mov eax, dword [esp]
mov word [edi + eax*4 - 8], 0
lea edx, [eax - 3]
and eax, 3
xor eax, 2
mov ecx, edx
je 0x40c111
mov ecx, edx
nop
nop
nop
movzx esi, word [edi + ecx*4]
movzx esi, word [edi + esi*4]
inc esi
mov word [edi + ecx*4], si
dec ecx
dec eax
jne 0x40c100
mov eax, dword [esp]
add eax, 0xfffffffe
cmp edx, 3
jb 0x40c161
inc ecx
nop
nop
nop
movzx edx, word [edi + ecx*4 - 4]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 4], dx
movzx edx, word [edi + ecx*4 - 8]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 8], dx
movzx edx, word [edi + ecx*4 - 0xc]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 0xc], dx
movzx edx, word [edi + ecx*4 - 0x10]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 0x10], dx
add ecx, 0xfffffffc
jne 0x40c120
mov ecx, dword [esp]
dec ecx
mov edi, 1
xor edx, edx
jmp 0x40c180
mov ebx, dword [esp + 0x10]
lea edi, [ebx + ebx]
inc edx
test ebx, ebx
jle 0x40c242
test eax, eax
mov dword [esp + 8], edi
js 0x40c1b0
lea esi, [eax + 1]
xor edi, edi
nop
nop
nop
mov ebx, esi
mov esi, dword [esp + 4]
movzx esi, word [esi + eax*4]
cmp edx, esi
jne 0x40c1c0
inc edi
dec eax
mov esi, ebx
cmp ebx, edi
jne 0x40c190
mov eax, 0xffffffff
jmp 0x40c1c2
xor esi, esi
jmp 0x40c1c6
mov esi, edi
mov edi, dword [esp + 8]
mov ebx, edi
mov dword [esp + 0x10], esi
sub edi, esi
jle 0x40c170
and edi, 3
mov dword [esp + 0x14], edi
mov esi, dword [esp + 4]
je 0x40c205
lea edi, [esi + ecx*4]
xor esi, esi
mov ebx, dword [esp + 0x14]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], dx
inc esi
add edi, 0xfffffffc
cmp ebx, esi
jne 0x40c1f0
mov edi, dword [esp + 8]
sub edi, esi
sub ecx, esi
jmp 0x40c207
mov edi, ebx
mov ebx, dword [esp + 0x10]
mov esi, ebx
sub esi, dword [esp + 8]
cmp esi, 0xfffffffc
mov esi, dword [esp + 4]
ja 0x40c174
nop
nop
mov word [esi + ecx*4], dx
mov word [esi + ecx*4 - 4], dx
mov word [esi + ecx*4 - 8], dx
mov word [esi + ecx*4 - 0xc], dx
add ecx, 0xfffffffc
add edi, 0xfffffffc
cmp edi, ebx
jg 0x40c220
jmp 0x40c174
cmp dword [esp], 0
mov ebx, dword [esp + 0x15c4]
jle 0x40c320
xor eax, eax
mov edx, dword [esp]
mov esi, dword [esp + 4]
nop
nop
nop
nop
movzx ecx, word [esi + eax*4]
inc dword [esp + ecx*4 + 0x28]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, edx
jl 0x40c260
cmp edx, 2
jl 0x40c320
cmp ebx, 0x20
jge 0x40c2f0
mov eax, dword [esp + ebx*4 + 0x28]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x40c2ac
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
inc ecx
mov dword [esp + ebx*4 + 0x28], eax
dec edx
jne 0x40c2a0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x40c2e8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x38]
add ecx, 4
mov dword [esp + ebx*4 + 0x28], eax
cmp ecx, 0x20
jne 0x40c2c0
test ebx, ebx
jle 0x40c574
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x24]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x40c300
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x40c57f
shl ebp, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040c880
add esp, 0xc
mov eax, dword [esp + 0x18]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040c880
add esp, 0xc
test ebx, ebx
mov edi, dword [esp + 4]
jle 0x40c42f
add edi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0xc]
mov dword [esp + 4], edi
jmp 0x40c393
mov esi, dword [esp]
mov dword [esp], esi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x40c42f
mov ecx, dword [esp + eax*4 + 0x28]
test ecx, ecx
jle 0x40c380
mov edx, ecx
and edx, 3
je 0x40c3e0
mov esi, dword [esp]
lea edi, [edi + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x40c3b0
sub dword [esp], esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp + 0x15c4]
mov edi, dword [esp + 4]
jmp 0x40c3e2
mov edx, ecx
cmp ecx, 4
mov esi, dword [esp]
jb 0x40c383
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [edi + esi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 0xc]
add esi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x40c3f0
jmp 0x40c383
mov ecx, dword [esp + 0x15c0]
mov dword [esp + 0x930], 0
cmp ebx, 2
jl 0x40c49d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x40c457
xor eax, eax
mov edx, 2
jmp 0x40c484
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x938], eax
add edx, 2
cmp ebx, edx
jne 0x40c460
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c0]
je 0x40c49d
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x92c], eax
test ecx, ecx
jle 0x40c569
xor eax, eax
mov edx, dword [esp + 0x1c]
lea esi, [edx + edx*8]
mov edi, esi
shl edi, 5
mov edx, dword [esp + 0xc]
add edi, edx
mov dword [esp + 4], edi
shl esi, 6
add esi, edx
mov dword [esp + 8], esi
jmp 0x40c4ec
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c0]
inc eax
cmp eax, ecx
je 0x40c569
mov edx, dword [esp + 4]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x40c4e3
mov edx, dword [esp + ebx*4 + 0x92c]
lea edi, [edx + 1]
mov dword [esp + ebx*4 + 0x92c], edi
xor edi, edi
cmp ebx, 1
je 0x40c54d
mov ebp, ebx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
mov esi, edx
not esi
or esi, 1
add esi, edx
mov ecx, edx
shr ecx, 1
shl edi, 2
lea esi, [esi*2 + 2]
or esi, edi
mov edi, ecx
not edi
or edi, 1
add edi, ecx
inc edi
or edi, esi
shr edx, 2
add ebp, 0xfffffffe
jne 0x40c520
test bl, 1
je 0x40c4d0
add edi, edi
mov ecx, edx
not ecx
or ecx, 1
add ecx, edx
inc ecx
or edi, ecx
jmp 0x40c4d0
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
mov esi, ebx
not esi
and esi, 1
mov ecx, ebx
and ecx, 0xfffffffe
sub ecx, esi
lea esi, [ecx + 1]
mov dword [esp + 8], esi
jmp 0x40c5b3
dec esi
mov dword [esp + edi*4 + 0x24], esi
add dword [esp + edi*4 + 0x28], 2
dec eax
cmp eax, edx
je 0x40c320
dec dword [esp + ebx*4 + 0x28]
test ecx, ecx
jle 0x40c5aa
mov edi, dword [esp + 8]
nop
mov esi, dword [esp + edi*4 + 0x24]
test esi, esi
jne 0x40c5a0
dec edi
cmp edi, 1
jg 0x40c5c0
jmp 0x40c5aa