Function at 0x40bb50
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.0040c5f0
mov edi, edx
mov dword [esp + 0xc], ecx
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.0040c710
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x18], edi
je 0x40bc1e
test esi, esi
mov ecx, esi
jle 0x40c3d6
xor eax, eax
cmp ecx, 1
je 0x40bbe8
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
add edx, eax
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 + 0x2c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x2c]
add eax, 2
cmp ecx, eax
jne 0x40bbd0
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x40c3d6
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x40c3d6
lea eax, [edi + edi*8]
mov dword [esp + 0x20], eax
mov ebp, eax
shl ebp, 6
test esi, esi
jle 0x40bd19
cmp esi, 1
jne 0x40bf8d
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x40bc71
mov ecx, dword [esp + 0xc]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40bc71
mov word [esp + ebx*4 + 0x4b0], cx
mov word [esp + ebx*4 + 0x4b2], ax
inc ebx
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.0040c710
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x40bd30
xor eax, eax
cmp ebx, 1
je 0x40bcef
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4b0]
movzx esi, dl
inc dword [esp + esi*4 + 0x930]
shr edx, 8
inc dword [esp + edx*4 + 0xd30]
movzx edx, word [esp + eax*4 + 0x4b4]
movzx esi, dl
inc dword [esp + esi*4 + 0x930]
shr edx, 8
inc dword [esp + edx*4 + 0xd30]
add eax, 2
cmp ecx, eax
jne 0x40bcb0
test bl, 1
je 0x40bd10
movzx eax, word [esp + eax*4 + 0x4b0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x930]
shr eax, 8
inc dword [esp + eax*4 + 0xd30]
mov eax, dword [esp + 0xd30]
jmp 0x40bd39
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.0040c710
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 + 0x1c], eax
mov dword [esp + 8], ebx
and ebx, 0xfffffffe
lea eax, [esp + 0x4b0]
mov dword [esp], eax
lea edx, [esp + 0x1130]
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x10], ebx
jmp 0x40bd9a
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
add ecx, 8
mov edx, edi
cmp eax, dword [esp + 0x28]
jae 0x40bec3
mov edi, dword [esp]
mov dword [esp], edx
mov edx, eax
shl edx, 0xa
lea ebp, [esp + edx]
add ebp, 0x930
mov edx, 3
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa4], ebx
add ebx, dword [ebp + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xa8], ebx
add ebx, dword [ebp + edx*4 - 8]
mov dword [esp + edx*4 + 0xac], ebx
add ebx, dword [ebp + edx*4 - 4]
mov dword [esp + edx*4 + 0xb0], ebx
add ebx, dword [ebp + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x40bdc0
cmp byte [esp + 7], 0
jne 0x40bd80
mov dword [esp + 0x14], eax
cmp dword [esp + 0x1c], 0
je 0x40be79
xor ebp, ebp
mov eax, dword [esp]
nop
nop
movzx edx, word [edi + ebp*4]
shr edx, cl
mov ebx, edx
xor ebx, 0x3fffff00
or edx, 0xff
and edx, ebx
mov ebx, dword [esp + edx*4 + 0xb0]
mov esi, dword [edi + ebp*4]
mov dword [eax + ebx*4], esi
lea esi, [ebx + 1]
movzx ebx, word [edi + ebp*4 + 4]
shr ebx, cl
mov dword [esp + edx*4 + 0xb0], esi
mov edx, ebx
xor edx, 0x3fffff00
or ebx, 0xff
and ebx, edx
mov edx, dword [esp + ebx*4 + 0xb0]
lea esi, [edx + 1]
mov dword [esp + ebx*4 + 0xb0], esi
mov ebx, dword [esp + 0x10]
mov esi, dword [edi + ebp*4 + 4]
mov dword [eax + edx*4], esi
add ebp, 2
cmp ebx, ebp
jne 0x40be10
jmp 0x40be7b
xor ebp, ebp
test byte [esp + 8], 1
mov eax, dword [esp + 0x14]
je 0x40bd80
movzx edx, word [edi + ebp*4]
shr edx, cl
mov esi, edx
xor esi, 0x3fffff00
or edx, 0xff
and edx, esi
mov esi, dword [esp + edx*4 + 0xb0]
lea ebx, [esi + 1]
mov dword [esp + edx*4 + 0xb0], ebx
mov edx, dword [edi + ebp*4]
mov eax, dword [esp]
mov dword [eax + esi*4], edx
mov eax, dword [esp + 0x14]
jmp 0x40bd80
mov ebx, dword [esp + 8]
test ebx, ebx
mov ebp, dword [esp + 0x20]
je 0x40c2b7
cmp ebx, 1
jne 0x40bee5
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40c17a
mov edx, dword [esp]
movzx eax, word [edx + 4]
add word [edx], ax
cmp ebx, 3
jl 0x40bff5
mov eax, 2
mov ecx, 2
sub ecx, ebx
xor edx, edx
mov edi, 1
jmp 0x40bf2a
mov esi, dword [esp]
movzx ebx, word [esi + eax*4]
inc eax
add word [esi + edi*4], bx
lea esi, [ecx + edi]
inc esi
inc edi
cmp esi, 1
je 0x40c004
mov esi, dword [esp]
movzx ebx, word [esi + edx*4]
cmp eax, dword [esp + 8]
jge 0x40bf40
movzx ebp, word [esi + eax*4]
cmp bx, bp
jae 0x40bf70
mov word [esi + edi*4], bx
mov word [esi + edx*4], di
inc edx
cmp eax, dword [esp + 8]
jge 0x40bf7b
cmp edx, edi
jge 0x40bf10
mov esi, dword [esp]
movzx ebp, word [esi + edx*4]
movzx ebx, word [esi + eax*4]
cmp bp, bx
jae 0x40bf17
jmp 0x40bf82
inc eax
mov word [esi + edi*4], bp
cmp eax, dword [esp + 8]
jl 0x40bf4f
mov esi, dword [esp]
movzx ebp, word [esi + edx*4]
add word [esi + edi*4], bp
mov word [esi + edx*4], di
inc edx
jmp 0x40bf1c
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x40bfbb
add eax, 2
cmp ecx, eax
je 0x40bc3f
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x40bfd6
mov word [esp + ebx*4 + 0x4b0], si
mov word [esp + ebx*4 + 0x4b2], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x40bfb0
mov word [esp + ebx*4 + 0x4b0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b2], si
inc ebx
jmp 0x40bfb0
lea ecx, [ebx - 2]
mov word [edx + ebx*4 - 8], 0
jmp 0x40c091
mov ebx, dword [esp + 8]
mov edi, dword [esp]
mov word [edi + ebx*4 - 8], 0
lea edx, [ebx - 3]
mov ecx, ebx
and ecx, 3
xor ecx, 2
mov eax, edx
je 0x40c041
mov eax, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + eax*4]
movzx esi, word [edi + esi*4]
inc esi
mov word [edi + eax*4], si
dec eax
dec ecx
jne 0x40c030
lea ecx, [ebx - 2]
cmp edx, 3
jb 0x40c091
inc eax
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + eax*4 - 4]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 4], dx
movzx edx, word [edi + eax*4 - 8]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 8], dx
movzx edx, word [edi + eax*4 - 0xc]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 0xc], dx
movzx edx, word [edi + eax*4 - 0x10]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x40c050
mov esi, 1
xor eax, eax
mov edx, dword [esp + 0x1c]
jmp 0x40c0b0
lea esi, [edi + edi]
inc eax
test edi, edi
mov ebp, dword [esp + 0x20]
jle 0x40c172
test ecx, ecx
js 0x40c0f0
mov ebp, esi
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp]
movzx esi, word [esi + ecx*4]
cmp eax, esi
jne 0x40c0e8
lea esi, [ecx - 1]
mov ebx, edi
xor ebx, 1
and edi, 1
lea edi, [ebx + edi*2]
mov ebx, dword [esp + 8]
test ecx, ecx
mov ecx, esi
jg 0x40c0c0
mov ecx, 0xffffffff
mov esi, ebp
jmp 0x40c0f2
xor edi, edi
mov ebp, esi
sub ebp, edi
jle 0x40c0a0
and ebp, 3
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], esi
je 0x40c13a
mov esi, dword [esp]
lea ebp, [esi + edx*4]
xor ebx, ebx
mov esi, dword [esp + 0x14]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], ax
inc ebx
add ebp, 0xfffffffc
cmp esi, ebx
jne 0x40c120
mov ebp, dword [esp + 0x10]
sub ebp, ebx
sub edx, ebx
mov ebx, dword [esp + 8]
jmp 0x40c13c
mov ebp, esi
mov esi, edi
sub esi, dword [esp + 0x10]
cmp esi, 0xfffffffc
mov esi, dword [esp]
ja 0x40c0a0
nop
nop
mov word [esi + edx*4], ax
mov word [esi + edx*4 - 4], ax
mov word [esi + edx*4 - 8], ax
mov word [esi + edx*4 - 0xc], ax
add edx, 0xfffffffc
add ebp, 0xfffffffc
cmp ebp, edi
jg 0x40c150
jmp 0x40c0a0
test ebx, ebx
jle 0x40c2b7
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x1c], 3
mov edi, dword [esp]
jb 0x40c1ca
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x40c1a0
test eax, eax
je 0x40c1ed
lea ecx, [edi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x2c]
inc edx
cmp eax, edx
jne 0x40c1e0
cmp ebx, 2
jl 0x40c2b7
mov edx, dword [esp + 0x15c8]
cmp edx, 0x20
jge 0x40c26c
mov eax, dword [esp + edx*4 + 0x2c]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x40c22c
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 + esi*4 + 0x2c], eax
dec edx
jne 0x40c220
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x40c268
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 0x40c240
test edx, edx
jle 0x40c2a7
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x28]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x40c280
mov edx, 1
mov ecx, dword [esp + 0x15c8]
shl edx, cl
cmp eax, edx
jne 0x40c52d
jmp 0x40c2b7
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x40c52d
shl ebp, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040c710
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040c710
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov esi, dword [esp]
jle 0x40c3cf
add esi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0xc]
mov dword [esp], esi
jmp 0x40c332
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c8]
mov eax, ecx
je 0x40c3cf
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x40c320
mov edx, ecx
and edx, 3
je 0x40c380
mov dword [esp + 8], ebx
lea ebx, [esi + ebx*4]
xor edi, edi
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx]
mov byte [esi + ebp + 0x8f12], al
inc edi
add ebx, 0xfffffffc
cmp edx, edi
jne 0x40c350
mov ebx, dword [esp + 8]
sub ebx, edi
mov edx, ecx
sub edx, edi
mov esi, dword [esp]
cmp ecx, 4
jb 0x40c320
jmp 0x40c387
mov edx, ecx
cmp ecx, 4
jb 0x40c320
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esi + ebx*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + ebx*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + ebx*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + ebx*4 - 0xc]
add ebx, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x40c390
jmp 0x40c320
mov ecx, dword [esp + 0x15c4]
mov dword [esp + 0x934], 0
mov eax, dword [esp + 0x15c8]
cmp eax, 2
jl 0x40c44d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x40c3fe
xor eax, eax
mov edx, 2
jmp 0x40c434
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x938], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add edx, 2
cmp ebx, edx
jne 0x40c410
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x40c44d
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x930], eax
test ecx, ecx
jle 0x40c522
xor eax, eax
mov edx, dword [esp + 0x18]
lea edi, [edx + edx*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0xc]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 0x10], edi
jmp 0x40c49c
mov ecx, dword [esp + 0x10]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x40c522
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x40c493
mov ecx, dword [esp + ebx*4 + 0x930]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x930], edi
xor edi, edi
cmp bl, 4
jb 0x40c4ff
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 0x40c4d0
and ebx, 3
je 0x40c480
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 0x40c510
jmp 0x40c480
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 0x40c558
mov edi, dword [esp + ecx*4 + 0x28]
dec ecx
test edi, edi
je 0x40c540
dec edi
mov dword [esp + ecx*4 + 0x2c], edi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x40c52d
jmp 0x40c2b7