Function at 0x4082e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.00408c90
mov edi, edx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.00408e40
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x18], edi
je 0x4083ae
test esi, esi
mov ecx, esi
jle 0x408b13
xor eax, eax
cmp ecx, 1
je 0x408378
mov ecx, dword [esp + 0x15c4]
and ecx, 0xfffffffe
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
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 0x408360
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x408b13
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 0x408b13
lea eax, [edi + edi*8]
mov dword [esp + 0x1c], eax
mov ebp, eax
shl ebp, 6
test esi, esi
jle 0x4084ab
cmp esi, 1
jne 0x40870d
xor edi, edi
xor eax, eax
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x408401
mov ecx, dword [esp + 0xc]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408401
mov word [esp + edi*4 + 0x4b0], cx
mov word [esp + edi*4 + 0x4b2], ax
inc edi
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.00408e40
add esp, 0xc
test edi, edi
sete byte [esp + 7]
je 0x4084c2
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x40847f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
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 0x408440
mov edx, edi
test dl, 1
je 0x4084a2
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 0x4084cb
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.00408e40
add esp, 0xc
xor edx, edx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x24], ebp
xor ecx, ecx
cmp eax, edx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x28], eax
lea eax, [edx - 1]
mov dword [esp + 0x20], eax
mov dword [esp], edx
and edx, 0xfffffffe
mov dword [esp + 0x10], edx
xor ecx, ecx
lea esi, [esp + 0x1130]
lea eax, [esp + 0x4b0]
lea edx, [esp + 0x930]
mov dword [esp + 0x14], 0
jmp 0x40853e
mov ebp, dword [esp + 0x14]
inc ebp
add ecx, 8
add edx, 0x400
mov eax, edi
mov dword [esp + 0x14], ebp
cmp ebp, dword [esp + 0x28]
je 0x408640
mov edi, esi
mov esi, eax
mov ebp, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + ebp*4 + 0xa4], eax
add eax, dword [edx + ebp*4 - 0xc]
mov dword [esp + ebp*4 + 0xa8], eax
add eax, dword [edx + ebp*4 - 8]
mov dword [esp + ebp*4 + 0xac], eax
add eax, dword [edx + ebp*4 - 4]
mov dword [esp + ebp*4 + 0xb0], eax
add eax, dword [edx + ebp*4]
add ebp, 4
cmp ebp, 0x103
jne 0x408550
cmp byte [esp + 7], 0
mov dword [esp + 8], edi
jne 0x408520
cmp dword [esp + 0x20], 0
je 0x4085f9
xor ebp, ebp
nop
nop
nop
nop
nop
nop
movzx eax, word [esi + ebp*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb0]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb0], ebx
mov eax, dword [esi + ebp*4]
mov ebx, dword [esp + 8]
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 + 0xb0]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb0], ebx
mov eax, dword [esi + ebp*4 + 4]
mov ebx, dword [esp + 8]
mov dword [ebx + edi*4], eax
mov edi, dword [esp + 8]
add ebp, 2
cmp dword [esp + 0x10], ebp
jne 0x4085a0
jmp 0x4085fb
xor ebp, ebp
test byte [esp], 1
mov ebx, dword [esp + 0x15c8]
je 0x408520
movzx eax, word [esi + ebp*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb0]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb0], ebx
mov eax, dword [esi + ebp*4]
mov ebx, dword [esp + 8]
mov dword [ebx + edi*4], eax
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp + 8]
jmp 0x408520
cmp dword [esp], 0
mov ebp, dword [esp + 0x1c]
je 0x408a32
mov edx, dword [esp]
cmp edx, 1
jne 0x408660
mov word [edi], 1
jmp 0x408913
movzx eax, word [edi + 4]
add word [edi], ax
cmp edx, 3
jl 0x408775
mov eax, 2
mov ecx, 2
sub ecx, edx
xor edx, edx
mov esi, 1
jmp 0x4086b2
movzx ebx, word [ebp + edx*4]
add word [ebp + esi*4], bx
mov word [ebp + edx*4], si
inc edx
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov edi, dword [esp + 8]
je 0x408784
mov ebp, edi
movzx edi, word [edi + edx*4]
cmp eax, dword [esp]
jge 0x4086c7
movzx ebx, word [ebp + eax*4]
cmp di, bx
jae 0x4086e0
mov word [ebp + esi*4], di
mov word [ebp + edx*4], si
inc edx
cmp eax, dword [esp]
jge 0x408690
jmp 0x4086eb
inc eax
mov word [ebp + esi*4], bx
cmp eax, dword [esp]
jge 0x408690
cmp edx, esi
jge 0x408700
movzx ebx, word [ebp + edx*4]
movzx edi, word [ebp + eax*4]
cmp bx, di
jb 0x408695
jmp 0x408705
movzx edi, word [ebp + eax*4]
inc eax
add word [ebp + esi*4], di
jmp 0x4086a0
mov ecx, esi
and ecx, 0xfffffffe
mov eax, dword [esp + 0xc]
lea edx, [eax + ebp]
add edx, 0x8194
xor edi, edi
xor eax, eax
jmp 0x40873b
add eax, 2
cmp ecx, eax
je 0x4083cf
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408756
mov word [esp + edi*4 + 0x4b0], si
mov word [esp + edi*4 + 0x4b2], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x408730
mov word [esp + edi*4 + 0x4b0], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0x4b2], si
inc edi
jmp 0x408730
lea ecx, [edx - 2]
mov word [edi + edx*4 - 8], 0
jmp 0x408801
mov eax, dword [esp]
mov word [edi + eax*4 - 8], 0
lea edx, [eax - 3]
lea ecx, [eax + 2]
mov eax, edx
and ecx, 3
je 0x4087b1
mov eax, edx
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 0x4087a0
mov ecx, dword [esp]
add ecx, 0xfffffffe
cmp edx, 3
jb 0x408801
inc eax
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 0x4087c0
mov ebx, 1
xor edx, edx
mov eax, dword [esp + 0x20]
jmp 0x40883e
mov ebp, dword [esp + 0x1c]
mov esi, edi
mov ebx, edi
and ebx, 0x7ffffffd
and edi, 2
or esi, 2
imul esi, edi
xor edi, 2
imul edi, ebx
add esi, edi
mov edi, dword [esp + 8]
inc edx
mov ebx, esi
test esi, esi
jle 0x408902
test ecx, ecx
js 0x408870
lea edi, [ecx + 1]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 8]
movzx esi, word [esi + ecx*4]
cmp edx, esi
jne 0x408880
inc ebp
dec ecx
cmp edi, ebp
jne 0x408850
mov ecx, 0xffffffff
jmp 0x408882
xor edi, edi
jmp 0x408882
mov edi, ebp
mov ebp, ebx
sub ebp, edi
jle 0x408810
mov esi, edi
not esi
add esi, ebx
mov dword [esp + 0x10], esi
and ebp, 3
je 0x4088c3
mov dword [esp + 0x14], edi
mov esi, dword [esp + 8]
lea esi, [esi + eax*4]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], dx
inc edi
add esi, 0xfffffffc
cmp ebp, edi
jne 0x4088b0
sub ebx, edi
sub eax, edi
mov edi, dword [esp + 0x14]
cmp dword [esp + 0x10], 3
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 8]
jb 0x408814
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi + eax*4], dx
mov word [esi + eax*4 - 4], dx
mov word [esi + eax*4 - 8], dx
mov word [esi + eax*4 - 0xc], dx
add eax, 0xfffffffc
add ebx, 0xfffffffc
cmp ebx, edi
jg 0x4088e0
jmp 0x408814
cmp dword [esp], 0
mov ebx, dword [esp + 0x15c8]
jle 0x408a32
mov eax, dword [esp]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x20], 3
jb 0x40895a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
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 0x408930
test eax, eax
je 0x40897d
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 0x408970
cmp dword [esp], 2
jl 0x408a32
cmp ebx, 0x20
jge 0x4089ee
mov ecx, dword [esp + ebx*4 + 0x2c]
test bl, 1
jne 0x408999
mov eax, ebx
jmp 0x4089ad
lea eax, [ebx + 1]
mov edx, dword [esp + ebx*4 + 0x30]
mov esi, edx
and esi, ecx
xor edx, ecx
lea ecx, [edx + esi*2]
mov dword [esp + ebx*4 + 0x2c], ecx
cmp ebx, 0x1f
je 0x4089ea
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + eax*4 + 0x30]
mov esi, edx
and esi, ecx
xor edx, ecx
lea ecx, [edx + esi*2]
mov dword [esp + ebx*4 + 0x2c], ecx
mov edx, dword [esp + eax*4 + 0x34]
add eax, 2
mov esi, edx
and esi, ecx
xor edx, ecx
lea ecx, [edx + esi*2]
mov dword [esp + ebx*4 + 0x2c], ecx
cmp eax, 0x20
jne 0x4089c0
test ebx, ebx
jle 0x408a22
lea edx, [ebx + 1]
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 0x408a00
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408c57
jmp 0x408a32
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x408c57
shl ebp, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408e40
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408e40
add esp, 0xc
test ebx, ebx
jle 0x408b05
mov eax, 1
add ebp, dword [esp + 0xc]
jmp 0x408a98
mov ebx, edi
mov edi, dword [esp]
mov dword [esp], edi
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c8]
mov eax, ecx
mov edi, ebx
je 0x408b05
mov edx, dword [esp + eax*4 + 0x2c]
test edx, edx
jle 0x408a80
test dl, 1
jne 0x408ab0
mov ecx, edx
jmp 0x408acc
mov esi, dword [esp]
mov ecx, esi
not ecx
lea esi, [ecx + esi*2]
mov dword [esp], esi
movzx ecx, word [edi + esi*4 + 2]
mov byte [ecx + ebp + 0x8f12], al
lea ecx, [edx - 1]
cmp edx, 1
mov edi, dword [esp]
mov ebx, dword [esp + 8]
je 0x408a85
dec ecx
lea edx, [edi + edi]
nop
nop
nop
nop
movzx esi, word [ebx + edi*4 - 2]
mov byte [esi + ebp + 0x8f12], al
movzx esi, word [ebx + edi*4 - 6]
mov byte [esi + ebp + 0x8f12], al
add edi, 0xfffffffe
add edx, 0xfffffffc
add ecx, 0xfffffffe
jb 0x408ae0
jmp 0x408a85
mov ecx, dword [esp + 0x15c4]
mov ebx, dword [esp + 0x15c8]
mov dword [esp + 0x934], 0
cmp ebx, 2
jl 0x408b7d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x408b34
xor eax, eax
mov edx, 2
jmp 0x408b64
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
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 0x408b40
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x408b7d
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x930], eax
test ecx, ecx
jle 0x408c4c
xor eax, eax
mov edx, dword [esp + 0x18]
lea esi, [edx + edx*8]
mov edi, esi
shl edi, 5
mov edx, dword [esp + 0xc]
add edi, edx
mov dword [esp + 8], edi
shl esi, 6
add esi, edx
mov dword [esp + 0x10], esi
jmp 0x408bcc
mov ecx, dword [esp + 0x10]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x408c4c
mov edx, dword [esp + 8]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x408bc3
mov edx, dword [esp + ebx*4 + 0x930]
lea ecx, [edx + 1]
mov dword [esp + ebx*4 + 0x930], ecx
xor edi, edi
cmp bl, 1
je 0x408c30
mov ebp, ebx
and ebp, 0xfffffffe
xor ecx, ecx
nop
nop
nop
nop
nop
mov edi, edx
or edi, 1
mov esi, edx
xor esi, 0x7ffffffe
and esi, edi
mov edi, edx
shr edi, 1
shl ecx, 2
add esi, esi
or esi, ecx
mov ecx, edi
or ecx, 1
xor edi, 0xfffffffe
and edi, ecx
or edi, esi
shr edx, 2
mov ecx, edi
add ebp, 0xfffffffe
jne 0x408c00
test bl, 1
je 0x408bb0
add edi, edi
mov ecx, edx
or ecx, 1
xor edx, 0xfffffffe
and edx, ecx
or edi, edx
jmp 0x408bb0
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x2c]
mov ecx, ebx
nop
nop
nop
cmp ecx, 2
jl 0x408c78
mov esi, dword [esp + ecx*4 + 0x28]
dec ecx
test esi, esi
je 0x408c60
dec esi
mov dword [esp + ecx*4 + 0x2c], esi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x408c57
jmp 0x408a32