Function at 0x4087b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.00409100
mov edi, edx
mov ebx, ecx
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.004092c0
add esp, 0xc
cmp dword [esp + 0x15cc], 0
je 0x408861
test esi, esi
jle 0x408f4d
xor eax, eax
cmp esi, 1
je 0x408838
mov ecx, dword [esp + 0x15c4]
and ecx, 0xfffffffe
lea eax, [edi + edi*8]
shl eax, 5
lea edx, [eax + ebx]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
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 0x408820
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x408f4d
lea ecx, [edi + edi*8]
shl ecx, 5
add ecx, ebx
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x2c]
jmp 0x408f4d
lea eax, [edi + edi*8]
mov dword [esp + 0x20], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], eax
jle 0x40896b
cmp esi, 1
jne 0x408b4b
xor ebp, ebp
xor eax, eax
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x4088be
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4088be
mov word [esp + ebp*4 + 0xb0], cx
mov word [esp + ebp*4 + 0xb2], ax
inc ebp
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.004092c0
add esp, 0xc
test ebp, ebp
sete byte [esp + 7]
je 0x408982
mov ecx, ebp
xor eax, eax
cmp ebp, 1
je 0x40893f
mov ecx, ebp
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 + 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 0x408900
mov edx, ebp
test dl, 1
je 0x408962
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 0x40898b
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.004092c0
add esp, 0xc
xor edx, edx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x24], edi
xor ecx, ecx
mov dword [esp], edx
cmp eax, edx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x28], eax
lea ebp, [esp + 0x1130]
lea edx, [esp + 0xb0]
xor esi, esi
lea eax, [esp + 0x534]
xor ecx, ecx
jmp 0x4089df
mov esi, dword [esp + 0xc]
inc esi
add ecx, 8
mov eax, dword [esp + 0x14]
add eax, 0x400
mov edx, edi
cmp esi, dword [esp + 0x28]
mov ebp, ebx
je 0x408a80
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebp
mov dword [esp + 0x18], edx
xor edx, edx
xor edi, edi
nop
mov dword [esp + edx*4 + 0xd30], edi
mov esi, dword [eax + edx*4 - 4]
mov ebx, esi
and ebx, edi
xor esi, edi
lea esi, [esi + ebx*2]
mov dword [esp + edx*4 + 0xd34], esi
mov edi, dword [eax + edx*4]
mov ebx, edi
and ebx, esi
xor edi, esi
lea edi, [edi + ebx*2]
add edx, 2
cmp edx, 0x100
jne 0x4089f0
mov dword [esp + 0x14], eax
cmp byte [esp + 7], 0
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0x18]
jne 0x4089c0
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ebx
movzx ebx, word [ebx + edx*4]
shr ebx, cl
movzx esi, bl
mov ebp, edi
mov edi, dword [esp + esi*4 + 0xd30]
lea ebx, [edi + 1]
mov dword [esp + esi*4 + 0xd30], ebx
mov ebx, eax
mov eax, dword [esp]
mov esi, dword [ebx + edx*4]
mov dword [ebp + edi*4], esi
mov edi, ebp
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
cmp edx, eax
jb 0x408a40
jmp 0x4089c0
mov ebx, edi
cmp dword [esp], 0
je 0x408e65
mov edx, dword [esp]
cmp edx, 1
jne 0x408a9e
mov word [ebx], 1
jmp 0x408d3e
movzx eax, word [ebx + 4]
add word [ebx], ax
lea edi, [edx - 1]
cmp edi, 2
jl 0x408ba5
mov ecx, 2
mov eax, edx
mov edx, 2
sub edx, eax
mov dword [esp + 0xc], edx
xor esi, esi
mov ebp, 1
jmp 0x408af0
movzx edi, word [ebx + esi*4]
add word [ebx + ebp*4], di
mov word [ebx + esi*4], bp
inc esi
mov edi, edx
mov eax, dword [esp + 0xc]
add eax, ebp
inc eax
inc ebp
cmp eax, 1
je 0x408bb1
mov edx, edi
movzx eax, word [ebx + esi*4]
cmp ecx, dword [esp]
jge 0x408b04
movzx edi, word [ebx + ecx*4]
cmp ax, di
jae 0x408b20
mov word [ebx + ebp*4], ax
mov word [ebx + esi*4], bp
inc esi
cmp ecx, dword [esp]
jge 0x408ad0
jmp 0x408b2a
inc ecx
mov word [ebx + ebp*4], di
cmp ecx, dword [esp]
jge 0x408ad0
cmp esi, ebp
jge 0x408b40
movzx edi, word [ebx + esi*4]
movzx eax, word [ebx + ecx*4]
cmp di, ax
jb 0x408ad4
jmp 0x408b44
movzx eax, word [ebx + ecx*4]
inc ecx
add word [ebx + ebp*4], ax
jmp 0x408add
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + ebx]
add edx, 0x8194
xor ebp, ebp
xor eax, eax
jmp 0x408b6b
add eax, 2
cmp ecx, eax
je 0x408888
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408b86
mov word [esp + ebp*4 + 0xb0], si
mov word [esp + ebp*4 + 0xb2], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x408b60
mov word [esp + ebp*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0xb2], si
inc ebp
jmp 0x408b60
mov word [ebx + edx*4 - 8], 0
jmp 0x408c41
mov edx, dword [esp]
mov word [ebx + edx*4 - 8], 0
cmp edx, 3
jl 0x408c41
mov eax, edx
add edx, 0xfffffffd
lea esi, [eax + 2]
mov ecx, edx
and esi, 3
je 0x408bf1
mov ecx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebx + ecx*4]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4], ax
dec ecx
dec esi
jne 0x408be0
cmp edx, 3
mov edx, dword [esp]
jb 0x408c41
inc ecx
nop
nop
nop
nop
nop
nop
movzx eax, word [ebx + ecx*4 - 4]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 4], ax
movzx eax, word [ebx + ecx*4 - 8]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 8], ax
movzx eax, word [ebx + ecx*4 - 0xc]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 0xc], ax
movzx eax, word [ebx + ecx*4 - 0x10]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 0x10], ax
add ecx, 0xfffffffc
jne 0x408c00
mov eax, edx
xor eax, 0xfffffffd
mov ecx, edx
and ecx, 0xfffffffd
lea edx, [eax + ecx*2]
inc edx
xor ecx, ecx
mov esi, 1
jmp 0x408c70
mov eax, dword [esp + 8]
lea esi, [ebx + ebx]
inc ecx
test ebx, ebx
jle 0x408d32
test edx, edx
js 0x408ca0
lea ebx, [edx + 1]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 8]
movzx eax, word [eax + edx*4]
cmp ecx, eax
jne 0x408cb0
inc ebp
dec edx
cmp ebx, ebp
jne 0x408c80
mov edx, 0xffffffff
jmp 0x408cb2
xor ebx, ebx
jmp 0x408cb2
mov ebx, ebp
mov ebp, esi
sub ebp, ebx
jle 0x408c60
mov eax, ebx
not eax
add eax, esi
mov dword [esp + 0xc], eax
and ebp, 3
je 0x408cf7
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
mov eax, dword [esp + 8]
lea edi, [eax + edi*4]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], cx
inc eax
add edi, 0xfffffffc
cmp ebp, eax
jne 0x408ce0
mov edi, dword [esp + 0x18]
sub edi, eax
sub esi, eax
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
cmp eax, 3
mov eax, dword [esp + 8]
jb 0x408c64
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax + edi*4], cx
mov word [eax + edi*4 - 4], cx
mov word [eax + edi*4 - 8], cx
mov word [eax + edi*4 - 0xc], cx
add edi, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebx
jg 0x408d10
jmp 0x408c64
mov ebx, eax
cmp dword [esp], 0
jle 0x408e65
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x408d8a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x408d60
test eax, eax
je 0x408dad
lea ecx, [ebx + 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 0x408da0
cmp dword [esp], 2
jl 0x408e65
mov edx, dword [esp + 0x15c8]
cmp edx, 0x20
jge 0x408e30
mov eax, dword [esp + edx*4 + 0x2c]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x408dec
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 0x408de0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408e28
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 0x408e00
test edx, edx
jle 0x40908e
inc edx
xor ecx, ecx
xor eax, eax
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 0x408e40
mov edx, 1
mov ecx, dword [esp + 0x15c8]
shl edx, cl
cmp eax, edx
jne 0x409099
mov ebp, dword [esp + 0x20]
shl ebp, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.004092c0
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.004092c0
add esp, 0xc
cmp dword [esp + 0x15c8], 0
jle 0x408f45
mov eax, 1
add ebp, dword [esp + 0x10]
jmp 0x408ed8
mov edi, ebx
mov ebx, dword [esp]
mov dword [esp], ebx
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c8]
mov eax, ecx
mov ebx, edi
je 0x408f45
mov edx, dword [esp + eax*4 + 0x2c]
test edx, edx
jle 0x408ec0
test dl, 1
jne 0x408ef0
mov ecx, edx
jmp 0x408f0c
mov esi, dword [esp]
mov ecx, esi
not ecx
lea esi, [ecx + esi*2]
mov dword [esp], esi
movzx ecx, word [ebx + esi*4 + 2]
mov byte [ecx + ebp + 0x8f12], al
lea ecx, [edx - 1]
cmp edx, 1
mov ebx, dword [esp]
mov edi, dword [esp + 8]
je 0x408ec5
lea edx, [ebx + ebx]
dec ecx
nop
nop
nop
nop
movzx esi, word [edi + ebx*4 - 2]
mov byte [esi + ebp + 0x8f12], al
movzx esi, word [edi + ebx*4 - 6]
mov byte [esi + ebp + 0x8f12], al
add ebx, 0xfffffffe
add edx, 0xfffffffc
add ecx, 0xfffffffe
jb 0x408f20
jmp 0x408ec5
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x534], 0
mov ecx, dword [esp + 0x15c8]
cmp ecx, 2
jl 0x408fc7
lea eax, [ecx - 1]
cmp ecx, 2
jne 0x408f79
mov edx, 2
xor ecx, ecx
test al, 1
jne 0x408fba
jmp 0x408fc7
mov esi, ebx
mov ebx, eax
and ebx, 0xfffffffe
xor ecx, ecx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + edx*4 + 0x30]
add ecx, ecx
mov dword [esp + edx*4 + 0x538], ecx
add ecx, dword [esp + edx*4 + 0x34]
add ecx, ecx
mov dword [esp + edx*4 + 0x53c], ecx
add edx, 2
cmp ebx, edx
jne 0x408f90
add edx, 2
mov ebx, esi
test al, 1
je 0x408fc7
add ecx, dword [esp + edx*4 + 0x28]
add ecx, ecx
mov dword [esp + edx*4 + 0x530], ecx
mov ecx, dword [esp + 0x15c4]
test ecx, ecx
jle 0x409083
xor eax, eax
lea edx, [edi + edi*8]
mov esi, edx
shl esi, 5
add esi, ebx
mov dword [esp], esi
shl edx, 6
add edx, ebx
mov dword [esp + 8], edx
jmp 0x409008
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x409083
mov edx, dword [esp]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x409003
mov edx, dword [esp + ebx*4 + 0x530]
lea edi, [edx + 1]
mov dword [esp + ebx*4 + 0x530], edi
xor edi, edi
cmp bl, 1
je 0x40906b
mov ebp, ebx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
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
add esi, esi
add esi, 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 0x409040
test bl, 1
je 0x408ff0
add edi, edi
mov ecx, edx
not ecx
or ecx, 1
add ecx, edx
inc ecx
or edi, ecx
jmp 0x408ff0
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov edi, dword [esp + 0x15c8]
mov esi, edi
xor esi, 0xfffffffe
and edi, 0xfffffffe
lea ecx, [esi + edi*2]
inc ecx
lea esi, [esi + edi*2]
add esi, 2
jmp 0x4090d3
dec edi
mov dword [esp + ebp*4 + 0x28], edi
add dword [esp + ebp*4 + 0x2c], 2
dec eax
cmp eax, edx
je 0x408e65
mov edi, dword [esp + 0x15c8]
dec dword [esp + edi*4 + 0x2c]
test ecx, ecx
jle 0x4090ca
mov ebp, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + ebp*4 + 0x28]
test edi, edi
jne 0x4090c0
dec ebp
cmp ebp, 1
jg 0x4090f0
jmp 0x4090ca