Function at 0x40bab0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.0040c470
mov ebp, edx
mov edi, ecx
mov ebx, dword [esp + 0x15c4]
mov esi, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.0040c720
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0xc], edi
je 0x40bb80
test esi, esi
mov ecx, esi
jle 0x40c27f
xor eax, eax
cmp ecx, 1
je 0x40bb48
mov ecx, dword [esp + 0x15c0]
and ecx, 0x7ffffffe
lea eax, [ebp*8]
add eax, ebp
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 0x40bb30
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x40c27f
lea ecx, [ebp*8]
add ecx, ebp
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 0x40c27f
lea eax, [ebp*8]
add eax, ebp
mov dword [esp + 0x14], eax
mov ebx, eax
shl ebx, 6
test esi, esi
mov dword [esp + 0x18], ebp
jle 0x40bc8b
cmp esi, 1
jne 0x40c130
mov ebp, edi
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x40bbdc
lea ecx, [ebx + ebp]
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40bbdc
mov word [esp + edi*4 + 0xac], cx
mov word [esp + edi*4 + 0xae], ax
inc edi
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.0040c720
add esp, 0xc
test edi, edi
sete byte [esp + 8]
je 0x40bca2
mov eax, edi
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x40bc5f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xac]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
add eax, 2
cmp ecx, eax
jne 0x40bc20
mov ecx, edi
test cl, 1
je 0x40bc82
movzx eax, word [esp + eax*4 + 0xac]
movzx ecx, al
inc dword [esp + ecx*4 + 0x52c]
shr eax, 8
inc dword [esp + eax*4 + 0x92c]
mov eax, dword [esp + 0x92c]
jmp 0x40bcab
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.0040c720
add esp, 0xc
xor edi, edi
mov byte [esp + 8], 1
xor eax, eax
mov dword [esp + 0x10], ebx
xor ecx, ecx
cmp eax, edi
setne cl
inc ecx
mov dword [esp + 0x24], ecx
mov dword [esp], edi
and edi, 0xfffffffe
mov dword [esp + 0x1c], edi
lea ebx, [esp + 0xac]
lea eax, [esp + 0x112c]
xor ecx, ecx
xor edx, edx
jmp 0x40bcf0
inc edx
add ecx, 8
mov eax, esi
cmp edx, dword [esp + 0x24]
je 0x40bdd8
mov esi, ebx
mov dword [esp + 4], eax
mov eax, edx
shl eax, 0xa
lea ebx, [esp + eax]
add ebx, 0x52c
xor ebp, ebp
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0xd2c], ebp
add ebp, dword [ebx + eax*4]
mov edi, eax
and edi, 1
xor eax, 1
lea eax, [eax + edi*2]
cmp eax, 0x100
jb 0x40bd10
cmp byte [esp + 8], 0
mov ebx, dword [esp + 4]
jne 0x40bce0
mov dword [esp + 0x20], edx
xor ebp, ebp
cmp dword [esp], 1
mov edx, dword [esp + 0x1c]
je 0x40bda1
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [esi + ebp*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xd2c]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xd2c], ebx
mov eax, dword [esi + ebp*4]
mov ebx, dword [esp + 4]
mov dword [ebx + edi*4], eax
movzx eax, word [esi + ebp*4 + 4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xd2c]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xd2c], ebx
mov ebx, dword [esp + 4]
mov eax, dword [esi + ebp*4 + 4]
mov dword [ebx + edi*4], eax
add ebp, 2
cmp edx, ebp
jne 0x40bd50
test byte [esp], 1
mov edx, dword [esp + 0x20]
je 0x40bce0
movzx eax, word [esi + ebp*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xd2c]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xd2c], ebx
mov ebx, dword [esp + 4]
mov eax, dword [esi + ebp*4]
mov dword [ebx + edi*4], eax
jmp 0x40bce0
cmp dword [esp], 0
mov ebx, dword [esp + 0x15c4]
je 0x40c1a5
mov ecx, dword [esp]
cmp ecx, 1
jne 0x40bdff
mov eax, dword [esp + 4]
mov word [eax], 1
jmp 0x40c03c
mov ebx, dword [esp + 4]
movzx eax, word [ebx + 4]
add word [ebx], ax
cmp ecx, 3
jl 0x40bead
mov eax, 2
mov ecx, 2
sub ecx, dword [esp]
xor edx, edx
mov esi, 1
jmp 0x40be47
movzx edi, word [ebp + eax*4]
inc eax
add word [ebp + esi*4], di
mov ebx, ebp
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
je 0x40bead
movzx edi, word [ebx + edx*4]
cmp eax, dword [esp]
mov ebp, ebx
jge 0x40be5c
movzx ebx, word [ebp + eax*4]
cmp di, bx
jae 0x40be90
mov word [ebp + esi*4], di
mov word [ebp + edx*4], si
inc edx
cmp eax, dword [esp]
jge 0x40be9b
cmp edx, esi
jge 0x40be30
movzx ebx, word [ebp + edx*4]
movzx edi, word [ebp + eax*4]
cmp bx, di
jae 0x40be35
jmp 0x40bea0
inc eax
mov word [ebp + esi*4], bx
cmp eax, dword [esp]
jl 0x40be6c
movzx ebx, word [ebp + edx*4]
add word [ebp + esi*4], bx
mov word [ebp + edx*4], si
inc edx
jmp 0x40be3b
mov edx, dword [esp]
mov ecx, edx
not ecx
and ecx, 2
mov eax, edx
and eax, 0xfffffffd
sub eax, ecx
mov word [ebx + eax*4], 0
add edx, 0xfffffffd
js 0x40bf41
mov esi, dword [esp]
and esi, 3
xor esi, 2
mov ecx, edx
je 0x40bef1
mov ecx, edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebx + ecx*4]
movzx edi, word [ebx + edi*4]
inc edi
mov word [ebx + ecx*4], di
dec ecx
dec esi
jne 0x40bee0
cmp edx, 3
jb 0x40bf41
inc ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [ebx + ecx*4 - 4]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 4], dx
movzx edx, word [ebx + ecx*4 - 8]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 8], dx
movzx edx, word [ebx + ecx*4 - 0xc]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 0xc], dx
movzx edx, word [ebx + ecx*4 - 0x10]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 0x10], dx
add ecx, 0xfffffffc
jne 0x40bf00
mov ecx, dword [esp]
dec ecx
mov edi, 1
xor edx, edx
jmp 0x40bf7d
mov edi, esi
and edi, 0x7ffffffd
mov ebx, esi
and ebx, 2
or esi, 2
imul esi, ebx
xor ebx, 2
imul ebx, edi
add esi, ebx
inc edx
mov edi, esi
test esi, esi
mov ebx, dword [esp + 0x15c4]
jle 0x40c032
test eax, eax
mov dword [esp + 8], edi
js 0x40bfb0
lea esi, [eax + 1]
xor ebp, ebp
mov ebx, dword [esp + 4]
nop
nop
movzx edi, word [ebx + eax*4]
cmp edx, edi
jne 0x40bfc0
inc ebp
dec eax
cmp esi, ebp
jne 0x40bf90
mov eax, 0xffffffff
jmp 0x40bfc2
xor esi, esi
mov ebx, dword [esp + 4]
jmp 0x40bfc6
mov esi, ebp
mov edi, dword [esp + 8]
mov ebp, edi
sub ebp, esi
jle 0x40bf50
and ebp, 3
je 0x40bff9
lea edi, [ebx + ecx*4]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], dx
inc ebx
add edi, 0xfffffffc
cmp ebp, ebx
jne 0x40bfe0
mov ebp, dword [esp + 8]
sub ebp, ebx
sub ecx, ebx
mov ebx, dword [esp + 4]
jmp 0x40bffb
mov ebp, edi
mov edi, esi
sub edi, dword [esp + 8]
cmp edi, 0xfffffffc
ja 0x40bf50
nop
nop
nop
nop
nop
nop
mov word [ebx + ecx*4], dx
mov word [ebx + ecx*4 - 4], dx
mov word [ebx + ecx*4 - 8], dx
mov word [ebx + ecx*4 - 0xc], dx
add ecx, 0xfffffffc
add ebp, 0xfffffffc
cmp ebp, esi
jg 0x40c010
jmp 0x40bf50
cmp dword [esp], 0
jle 0x40c1a5
xor eax, eax
mov edx, dword [esp]
mov esi, dword [esp + 4]
nop
nop
nop
nop
nop
nop
nop
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 0x40c050
cmp edx, 2
jl 0x40c1a5
cmp ebx, 0x20
jge 0x40c0e0
mov eax, dword [esp + ebx*4 + 0x28]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x40c09c
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 0x40c090
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x40c0d8
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 0x40c0b0
test ebx, ebx
jle 0x40c195
mov edx, ebx
not edx
xor eax, eax
mov esi, ebx
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + esi*4 + 0x28]
mov ebx, esi
mov ebp, dword [esp + 0x15c4]
xor ebx, ebp
mov ecx, edx
and ecx, ebp
add ecx, ecx
sub ecx, ebx
shl edi, cl
add eax, edi
lea ecx, [esi - 1]
inc edx
cmp esi, 1
mov esi, ecx
ja 0x40c0f0
mov edx, 1
mov ebx, dword [esp + 0x15c4]
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x40c3cd
jmp 0x40c1a5
mov ecx, esi
and ecx, 0x7ffffffe
mov ebp, edi
lea edx, [ebx + edi]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40c15b
add eax, 2
cmp ecx, eax
je 0x40bbad
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x40c176
mov word [esp + edi*4 + 0xac], si
mov word [esp + edi*4 + 0xae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x40c150
mov word [esp + edi*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xae], si
inc edi
jmp 0x40c150
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x40c3cd
mov esi, dword [esp + 0x14]
shl esi, 5
mov edi, dword [esp + 0xc]
lea eax, [edi + esi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040c720
add esp, 0xc
mov eax, dword [esp + 0x10]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040c720
add esp, 0xc
test ebx, ebx
jle 0x40c274
mov eax, 1
add esi, dword [esp + 0xc]
mov ebp, dword [esp + 4]
jmp 0x40c20f
mov edi, dword [esp]
mov dword [esp], edi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x40c274
mov edx, dword [esp + eax*4 + 0x28]
test edx, edx
jle 0x40c200
test dl, 1
jne 0x40c220
mov ecx, edx
jmp 0x40c244
mov edi, dword [esp]
mov ecx, edi
not ecx
lea edi, [ecx + edi*2]
mov dword [esp], edi
mov ecx, dword [esp + 4]
movzx ecx, word [ecx + edi*4 + 2]
mov byte [ecx + esi + 0x8f12], al
mov ecx, edx
not ecx
lea ecx, [ecx + edx*2]
cmp edx, 1
mov edi, dword [esp]
je 0x40c203
nop
nop
nop
nop
movzx edx, word [ebp + edi*4 - 2]
mov byte [edx + esi + 0x8f12], al
movzx edx, word [ebp + edi*4 - 6]
mov byte [edx + esi + 0x8f12], al
add edi, 0xfffffffe
add ecx, 0xfffffffe
test ecx, ecx
jg 0x40c250
jmp 0x40c203
mov ecx, dword [esp + 0x15c0]
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x530], 0
cmp ebx, 2
jl 0x40c2ed
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x40c2a0
xor eax, eax
mov edx, 2
jmp 0x40c2d4
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x534], eax
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x538], eax
add edx, 2
cmp ebx, edx
jne 0x40c2b0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c0]
je 0x40c2ed
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x52c], eax
test ecx, ecx
jle 0x40c3c2
xor eax, eax
lea edi, [ebp*8]
add edi, ebp
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0xc]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 4], edi
jmp 0x40c33c
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c0]
inc eax
cmp eax, ecx
je 0x40c3c2
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x40c333
mov ecx, dword [esp + ebx*4 + 0x52c]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x52c], edi
xor edi, edi
cmp bl, 4
jb 0x40c39f
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
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 0x40c370
and ebx, 3
je 0x40c320
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 0x40c3b0
jmp 0x40c320
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x28]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x40c3f8
mov esi, dword [esp + ecx*4 + 0x24]
dec ecx
test esi, esi
je 0x40c3e0
dec esi
mov dword [esp + ecx*4 + 0x28], esi
add dword [esp + ecx*4 + 0x2c], 2
dec eax
cmp eax, edx
jne 0x40c3cd
jmp 0x40c1a5