Function at 0x40bb20
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b8
call fcn.0040c5b0
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15cc]
lea eax, [esp + 0x34]
push 0x84
push 0
push eax
call fcn.0040c760
add esp, 0xc
cmp dword [esp + 0x15d4], 0
mov dword [esp + 0x14], ebx
je 0x40bbe5
test esi, esi
mov ebx, dword [esp + 0x15d0]
jle 0x40c3a6
xor eax, eax
cmp esi, 1
je 0x40bbb8
mov ecx, dword [esp + 0x15cc]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x14]
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
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x34]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x34]
add eax, 2
cmp ecx, eax
jne 0x40bba0
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x40c3a6
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x34]
jmp 0x40c3a6
lea eax, [ebx + ebx*8]
mov dword [esp + 0x24], eax
shl eax, 6
mov dword [esp + 0x10], eax
test esi, esi
mov dword [esp + 0xc], edi
jle 0x40bcee
cmp esi, 1
jne 0x40bd17
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15d0]
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x40bc45
mov ecx, dword [esp + 0x10]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40bc45
mov word [esp + ebp*4 + 0x4b8], cx
mov word [esp + ebp*4 + 0x4ba], ax
inc ebp
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.0040c760
add esp, 0xc
test ebp, ebp
sete byte [esp + 7]
je 0x40bd85
mov ecx, ebp
xor eax, eax
cmp ebp, 1
je 0x40bcbf
mov ecx, ebp
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4b8]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
movzx edx, word [esp + eax*4 + 0x4bc]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
add eax, 2
cmp ecx, eax
jne 0x40bc80
mov ecx, ebp
test cl, 1
je 0x40bce2
movzx eax, word [esp + eax*4 + 0x4b8]
movzx ecx, al
inc dword [esp + ecx*4 + 0x938]
shr eax, 8
inc dword [esp + eax*4 + 0xd38]
mov eax, dword [esp + 0xd38]
jmp 0x40bd8e
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.0040c760
add esp, 0xc
xor ebp, ebp
mov byte [esp + 7], 1
xor eax, eax
mov ebx, dword [esp + 0x15d0]
jmp 0x40bd8e
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x10]
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15d0]
jmp 0x40bd4b
add eax, 2
cmp ecx, eax
je 0x40bc13
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x40bd66
mov word [esp + ebp*4 + 0x4b8], si
mov word [esp + ebp*4 + 0x4ba], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x40bd40
mov word [esp + ebp*4 + 0x4b8], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0x4ba], si
inc ebp
jmp 0x40bd40
xor ebp, ebp
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebp
setne cl
inc ecx
mov dword [esp + 0x2c], ecx
lea eax, [ebp - 1]
mov dword [esp + 0x18], eax
mov dword [esp + 8], ebp
mov edx, ebp
and edx, 0xfffffffe
lea ebp, [esp + 0x4b8]
lea eax, [esp + 0x1138]
xor ecx, ecx
lea esi, [esp + 0x938]
xor edi, edi
mov dword [esp + 0x30], edx
jmp 0x40bde7
add ecx, 8
inc edi
add esi, 0x400
mov eax, dword [esp]
cmp edi, dword [esp + 0x2c]
je 0x40bf08
mov dword [esp + 0x20], edi
mov dword [esp], ebp
mov ebp, eax
mov eax, 3
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0xac], edx
add edx, dword [esi + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xb0], edx
add edx, dword [esi + eax*4 - 8]
mov dword [esp + eax*4 + 0xb4], edx
add edx, dword [esi + eax*4 - 4]
mov dword [esp + eax*4 + 0xb8], edx
add edx, dword [esi + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x40be00
cmp byte [esp + 7], 0
mov edi, dword [esp + 0x20]
jne 0x40bdd0
cmp dword [esp + 0x18], 0
je 0x40bead
xor eax, eax
mov edi, dword [esp]
nop
nop
nop
nop
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov edi, ebp
mov ebp, dword [esp + edx*4 + 0xb8]
lea ebx, [ebp + 1]
mov dword [esp + edx*4 + 0xb8], ebx
mov edx, dword [esp]
mov edx, dword [edx + eax*4]
mov dword [edi + ebp*4], edx
mov edx, dword [esp]
movzx edx, word [edx + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb8]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb8], ebp
mov ebp, edi
mov edi, dword [esp]
mov edx, dword [edi + eax*4 + 4]
mov dword [ebp + ebx*4], edx
mov edx, dword [esp + 0x30]
add eax, 2
cmp edx, eax
jne 0x40be50
jmp 0x40beaf
xor eax, eax
test byte [esp + 8], 1
mov ebx, dword [esp + 0x15d0]
mov edi, dword [esp + 0x20]
je 0x40bdd0
mov edx, dword [esp]
movzx edx, word [edx + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb8]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ebp
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb8], ebp
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp]
mov eax, dword [ebx + eax*4]
mov ebx, dword [esp + 0x28]
mov dword [ebp + ebx*4], eax
mov ebx, dword [esp + 0x15d0]
jmp 0x40bdd0
cmp dword [esp + 8], 0
mov eax, dword [esp + 0xc]
je 0x40c2c8
mov ecx, dword [esp + 8]
cmp ecx, 1
jne 0x40bf2b
mov word [ebp], 1
jmp 0x40c189
movzx eax, word [ebp + 4]
add word [ebp], ax
cmp ecx, 3
mov ebx, ecx
jl 0x40bfde
mov eax, 2
mov ecx, 2
sub ecx, ebx
xor edx, edx
mov esi, 1
jmp 0x40bf79
movzx edi, word [ebp + eax*4]
inc eax
add word [ebp + esi*4], di
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov ebx, dword [esp + 8]
je 0x40bfed
movzx edi, word [ebp + edx*4]
cmp eax, ebx
jge 0x40bf8c
movzx ebx, word [ebp + eax*4]
cmp di, bx
jae 0x40bfc0
mov word [ebp + esi*4], di
mov word [ebp + edx*4], si
inc edx
cmp eax, dword [esp + 8]
jge 0x40bfcc
cmp edx, esi
jge 0x40bf60
movzx ebx, word [ebp + edx*4]
movzx edi, word [ebp + eax*4]
cmp bx, di
jae 0x40bf65
jmp 0x40bfd1
inc eax
mov word [ebp + esi*4], bx
cmp eax, dword [esp + 8]
jl 0x40bf9d
movzx ebx, word [ebp + edx*4]
add word [ebp + esi*4], bx
mov word [ebp + edx*4], si
inc edx
jmp 0x40bf6b
lea ecx, [ebx - 2]
mov word [ebp + ebx*4 - 8], 0
jmp 0x40c075
mov word [ebp + ebx*4 - 8], 0
lea edx, [ebx - 3]
mov ecx, ebx
and ecx, 3
xor ecx, 2
mov eax, edx
je 0x40c024
mov eax, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebp + eax*4]
movzx esi, word [ebp + esi*4]
inc esi
mov word [ebp + eax*4], si
dec eax
dec ecx
jne 0x40c010
lea ecx, [ebx - 2]
cmp edx, 3
jb 0x40c075
inc eax
nop
nop
nop
movzx edx, word [ebp + eax*4 - 4]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 4], dx
movzx edx, word [ebp + eax*4 - 8]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 8], dx
movzx edx, word [ebp + eax*4 - 0xc]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 0xc], dx
movzx edx, word [ebp + eax*4 - 0x10]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x40c030
mov esi, 1
xor edx, edx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
jmp 0x40c0b6
mov esi, ebx
and esi, 2
mov edi, ebx
or ebx, 2
imul ebx, esi
xor esi, 2
and edi, 0x7ffffffd
imul edi, esi
add ebx, edi
inc edx
mov esi, ebx
test ebx, ebx
jle 0x40c173
test ecx, ecx
mov dword [esp], esi
js 0x40c0f0
lea ebx, [ecx + 1]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebp + ecx*4]
cmp edx, esi
jne 0x40c100
inc edi
dec ecx
cmp ebx, edi
jne 0x40c0d0
mov ecx, 0xffffffff
jmp 0x40c102
xor ebx, ebx
jmp 0x40c105
mov ebx, edi
mov esi, dword [esp]
mov edi, esi
sub edi, ebx
jle 0x40c090
and edi, 3
je 0x40c139
lea ebp, [ebp + eax*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], dx
inc esi
add ebp, 0xfffffffc
cmp edi, esi
jne 0x40c120
mov edi, dword [esp]
sub edi, esi
sub eax, esi
mov ebp, dword [esp + 0x1c]
jmp 0x40c13b
mov edi, esi
mov esi, ebx
sub esi, dword [esp]
cmp esi, 0xfffffffc
ja 0x40c090
nop
nop
nop
nop
nop
nop
nop
mov word [ebp + eax*4], dx
mov word [ebp + eax*4 - 4], dx
mov word [ebp + eax*4 - 8], dx
mov word [ebp + eax*4 - 0xc], dx
add eax, 0xfffffffc
add edi, 0xfffffffc
cmp edi, ebx
jg 0x40c150
jmp 0x40c090
cmp dword [esp + 8], 0
mov eax, dword [esp + 0xc]
mov ebx, dword [esp + 0x15d0]
jle 0x40c2c8
mov edi, eax
mov eax, dword [esp + 8]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
jb 0x40c1db
mov edx, dword [esp + 8]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebp + ecx*4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebp + ecx*4 + 4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebp + ecx*4 + 8]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebp + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x34]
add ecx, 4
cmp edx, ecx
jne 0x40c1b0
test eax, eax
je 0x40c1fd
lea ecx, [ecx*4]
add ecx, ebp
xor edx, edx
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x34]
inc edx
cmp eax, edx
jne 0x40c1f0
cmp dword [esp + 8], 2
mov eax, edi
jl 0x40c2c8
cmp ebx, 0x20
jge 0x40c270
mov eax, dword [esp + ebx*4 + 0x34]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x40c22c
nop
nop
add eax, dword [esp + ecx*4 + 0x38]
inc ecx
mov dword [esp + ebx*4 + 0x34], eax
dec edx
jne 0x40c220
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x40c268
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + ebx*4 + 0x34], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + ebx*4 + 0x34], eax
add eax, dword [esp + ecx*4 + 0x40]
mov dword [esp + ebx*4 + 0x34], eax
add eax, dword [esp + ecx*4 + 0x44]
add ecx, 4
mov dword [esp + ebx*4 + 0x34], eax
cmp ecx, 0x20
jne 0x40c240
test ebx, ebx
jle 0x40c4ed
mov edx, ebx
not edx
xor edi, edi
mov esi, ebx
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + esi*4 + 0x34]
mov dword [esp], eax
mov ebx, esi
mov eax, dword [esp + 0x15d0]
xor ebx, eax
mov ecx, edx
and ecx, eax
add ecx, ecx
sub ecx, ebx
mov eax, dword [esp]
shl eax, cl
add edi, eax
lea ecx, [esi - 1]
inc edx
cmp esi, 1
mov esi, ecx
ja 0x40c280
mov edx, 1
mov ebx, dword [esp + 0x15d0]
mov ecx, ebx
shl edx, cl
cmp edi, edx
mov eax, dword [esp + 0xc]
jne 0x40c513
mov esi, dword [esp + 0x24]
shl esi, 5
mov edi, eax
add eax, esi
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040c760
add esp, 0xc
mov eax, dword [esp + 0x10]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040c760
add esp, 0xc
test ebx, ebx
jle 0x40c3a2
mov eax, 1
add esi, dword [esp + 0xc]
jmp 0x40c333
mov ebp, dword [esp + 8]
mov dword [esp + 8], ebp
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
mov ebp, edi
je 0x40c3a2
mov edx, dword [esp + eax*4 + 0x34]
mov edi, ebp
test edx, edx
jle 0x40c320
test dl, 1
jne 0x40c350
mov ecx, edx
jmp 0x40c36e
mov ebp, dword [esp + 8]
mov ecx, ebp
not ecx
lea ebp, [ecx + ebp*2]
mov dword [esp + 8], ebp
movzx ecx, word [edi + ebp*4 + 2]
mov byte [ecx + esi + 0x8f12], al
lea ecx, [edx - 1]
cmp edx, 1
mov ebp, dword [esp + 8]
je 0x40c324
dec ecx
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + ebp*4 - 2]
mov byte [edx + esi + 0x8f12], al
movzx edx, word [edi + ebp*4 - 6]
mov byte [edx + esi + 0x8f12], al
add ebp, 0xfffffffe
add ecx, 0xfffffffe
jb 0x40c380
jmp 0x40c324
mov edi, dword [esp + 0xc]
mov dword [esp + 0x93c], 0
cmp ebx, 2
jl 0x40c413
inc ebx
xor eax, eax
cmp ebx, 4
jge 0x40c3c3
mov ebx, 3
mov ecx, 2
jl 0x40c401
mov edx, ebx
and edx, 0x7ffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
add eax, eax
mov dword [esp + ecx*4 + 0x938], eax
add eax, dword [esp + ecx*4 + 0x34]
add eax, eax
mov dword [esp + ecx*4 + 0x93c], eax
add ecx, 2
cmp edx, ecx
jne 0x40c3e0
test bl, 1
je 0x40c413
add eax, dword [esp + ecx*4 + 0x30]
add eax, eax
mov dword [esp + ecx*4 + 0x938], eax
mov ecx, dword [esp + 0x15cc]
test ecx, ecx
jle 0x40c4e2
xor eax, eax
mov edx, dword [esp + 0x14]
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 0x40c45b
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15cc]
inc eax
cmp eax, ecx
je 0x40c4e2
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x40c452
mov ecx, dword [esp + ebx*4 + 0x938]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x938], edi
xor edi, edi
cmp bl, 4
jb 0x40c4bf
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 0x40c490
and ebx, 3
je 0x40c440
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 0x40c4d0
jmp 0x40c440
add esp, 0x15b8
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, edi
mov edx, 1
mov ecx, ebx
shl edx, cl
xor edi, edi
jmp 0x40c513
dec esi
mov dword [esp + ecx*4 + 0x34], esi
add dword [esp + ecx*4 + 0x38], 2
dec edi
cmp edi, edx
je 0x40c2c8
dec dword [esp + ebx*4 + 0x34]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x40c50a
mov esi, dword [esp + ecx*4 + 0x30]
dec ecx
test esi, esi
je 0x40c520
jmp 0x40c500