Function at 0x4083e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408d70
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408f30
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x1c], ebx
je 0x4084a5
test esi, esi
mov ebx, dword [esp + 0x15cc]
jle 0x408c19
xor eax, eax
cmp dword [esp + 0x15c8], 1
je 0x408478
mov ecx, dword [esp + 0x15c8]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x1c]
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
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x408460
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408c19
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x30]
jmp 0x408c19
lea eax, [ebx + ebx*8]
mov dword [esp + 0x14], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], eax
jle 0x408578
cmp esi, 1
jne 0x4085a1
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15cc]
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408509
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408509
mov word [esp + ebp*4 + 0x4b4], cx
mov word [esp + ebp*4 + 0x4b6], ax
inc ebp
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408f30
add esp, 0xc
mov eax, ebp
test ebp, ebp
sete byte [esp + 0xf]
je 0x408605
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b4]
mov edx, ecx
not edx
or edx, 0xff
add edx, ecx
inc dword [esp + edx*4 + 0x938]
mov edx, ebp
shr ecx, 8
inc dword [esp + ecx*4 + 0xd34]
inc eax
cmp edx, eax
jne 0x408540
mov eax, dword [esp + 0xd34]
jmp 0x40860e
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408f30
add esp, 0xc
xor edx, edx
mov byte [esp + 0xf], 1
xor eax, eax
mov ebx, dword [esp + 0x15cc]
jmp 0x40860e
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15cc]
jmp 0x4085cb
add eax, 2
cmp ecx, eax
je 0x4084d3
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4085e6
mov word [esp + ebp*4 + 0x4b4], si
mov word [esp + ebp*4 + 0x4b6], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x4085c0
mov word [esp + ebp*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0x4b6], si
inc ebp
jmp 0x4085c0
xor edx, edx
mov byte [esp + 0xf], 1
xor eax, eax
xor ecx, ecx
cmp eax, edx
sete cl
mov edi, 2
sub edi, ecx
lea eax, [edx - 1]
mov dword [esp + 0x28], eax
mov dword [esp + 8], edx
and edx, 0xfffffffe
mov dword [esp + 0x18], edx
lea eax, [esp + 0x4b4]
mov dword [esp], eax
lea eax, [esp + 0x1134]
xor ecx, ecx
lea esi, [esp + 0x934]
xor edx, edx
mov dword [esp + 0x2c], edi
jmp 0x40866a
mov edx, dword [esp + 0x20]
inc edx
add ecx, 8
add esi, 0x400
mov eax, dword [esp + 4]
cmp edx, edi
je 0x40877c
mov dword [esp + 0x20], edx
mov edx, dword [esp]
mov dword [esp + 4], edx
mov dword [esp], eax
mov edx, 3
xor eax, eax
nop
mov dword [esp + edx*4 + 0xa8], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xb0], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xb4], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x408680
cmp byte [esp + 0xf], 0
jne 0x408650
cmp dword [esp + 0x28], 0
je 0x40872b
xor edx, edx
mov ebp, dword [esp]
mov ebx, dword [esp + 4]
nop
nop
nop
movzx eax, word [ebx + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb4]
lea edi, [ebx + 1]
mov dword [esp + eax*4 + 0xb4], edi
mov eax, dword [esp + 4]
mov eax, dword [eax + edx*4]
mov dword [ebp + ebx*4], eax
mov eax, dword [esp + 4]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp + 4]
mov eax, dword [ebx + edx*4 + 4]
mov dword [ebp + edi*4], eax
add edx, 2
cmp dword [esp + 0x18], edx
jne 0x4086d0
jmp 0x40872d
xor edx, edx
test byte [esp + 8], 1
mov ebx, dword [esp + 0x15cc]
mov edi, dword [esp + 0x2c]
je 0x408650
mov ebp, dword [esp + 4]
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp + 0x15cc]
mov eax, dword [ebp + edx*4]
mov edx, dword [esp]
mov dword [edx + edi*4], eax
mov edi, dword [esp + 0x2c]
jmp 0x408650
cmp dword [esp + 8], 0
mov ebp, dword [esp + 0x14]
je 0x408af2
mov edx, dword [esp + 8]
cmp edx, 1
jne 0x4087a1
mov eax, dword [esp]
mov word [eax], 1
jmp 0x408a0a
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
cmp edx, 3
jl 0x40885e
mov eax, 2
mov ebx, 2
sub ebx, edx
mov esi, 1
xor ebp, ebp
jmp 0x4087ee
mov edi, dword [esp]
movzx ecx, word [edi + ebp*4]
add word [edi + esi*4], cx
mov word [edi + ebp*4], si
inc ebp
lea ecx, [ebx + esi]
inc ecx
inc esi
cmp ecx, 1
mov edx, dword [esp + 8]
je 0x40885e
mov edi, dword [esp]
movzx ecx, word [edi + ebp*4]
cmp eax, edx
jge 0x408802
movzx edx, word [edi + eax*4]
cmp cx, dx
jae 0x408820
mov word [edi + esi*4], cx
mov word [edi + ebp*4], si
inc ebp
cmp eax, dword [esp + 8]
jge 0x4087d0
jmp 0x40882b
inc eax
mov word [edi + esi*4], dx
cmp eax, dword [esp + 8]
jge 0x4087d0
cmp ebp, esi
jge 0x408850
mov edi, dword [esp]
movzx ecx, word [edi + ebp*4]
movzx edx, word [edi + eax*4]
cmp cx, dx
jb 0x4087d7
jmp 0x408857
mov edi, dword [esp]
movzx edx, word [edi + eax*4]
inc eax
add word [edi + esi*4], dx
jmp 0x4087e0
mov edi, dword [esp]
mov word [edi + edx*4 - 8], 0
mov eax, edx
or eax, 0xfffffffc
mov ecx, edx
and ecx, 0xfffffffc
add ecx, eax
inc ecx
js 0x4088f1
add edx, 2
mov eax, ecx
and edx, 3
je 0x4088a1
mov eax, ecx
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 edx
jne 0x408890
cmp ecx, 3
mov edx, dword [esp + 8]
jb 0x4088f1
inc eax
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4 - 4]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 4], cx
movzx ecx, word [edi + eax*4 - 8]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 8], cx
movzx ecx, word [edi + eax*4 - 0xc]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0xc], cx
movzx ecx, word [edi + eax*4 - 0x10]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x4088b0
lea edi, [edx - 2]
mov eax, edx
xor eax, 0xfffffffe
mov ecx, dword [esp + 0x18]
lea eax, [eax + ecx*2]
inc eax
mov esi, 1
mov dword [esp + 4], 0
jmp 0x40892e
mov ebx, ecx
mov esi, ebp
add esi, ebp
inc ebx
mov dword [esp + 4], ebx
test ebp, ebp
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x15cc]
jle 0x408a02
xor ebp, ebp
test edi, edi
js 0x408969
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp]
movzx ecx, word [ecx + edi*4]
mov ebx, dword [esp + 4]
cmp ebx, ecx
jne 0x408970
mov ecx, ebp
and ecx, 1
xor ebp, 1
lea ebp, [ebp + ecx*2]
lea ecx, [edi - 1]
test edi, edi
mov edi, ecx
jg 0x408940
mov edi, 0xffffffff
mov ecx, dword [esp + 4]
jmp 0x408972
mov ecx, ebx
mov ebx, esi
sub ebx, ebp
jle 0x408910
mov edx, ebx
mov ebx, ebp
not ebx
add ebx, esi
and edx, 3
mov dword [esp + 0x18], edx
je 0x4089bf
mov dword [esp + 0x20], ebx
mov dword [esp + 4], ecx
mov ecx, dword [esp]
lea ecx, [ecx + eax*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
mov ebx, dword [esp + 4]
mov word [ecx], bx
inc edx
add ecx, 0xfffffffc
cmp dword [esp + 0x18], edx
jne 0x4089a0
sub eax, edx
sub esi, edx
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0x20]
jmp 0x4089c3
mov edx, dword [esp + 8]
cmp ebx, 3
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
jb 0x408912
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx + eax*4], bx
mov word [ecx + eax*4 - 4], bx
mov word [ecx + eax*4 - 8], bx
mov word [ecx + eax*4 - 0xc], bx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x4089e0
jmp 0x408912
test edx, edx
jle 0x408af2
mov eax, dword [esp + 8]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x28], 3
mov edi, dword [esp]
jb 0x408a5a
mov edx, dword [esp + 8]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x30]
add ecx, 4
cmp edx, ecx
jne 0x408a30
test eax, eax
je 0x408a7d
mov edx, dword [esp]
lea ecx, [edx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x30]
inc edx
cmp eax, edx
jne 0x408a70
cmp dword [esp + 8], 2
jl 0x408af2
lea eax, [ebx + 1]
cmp eax, 0x21
jge 0x408aac
mov ecx, dword [esp + ebx*4 + 0x30]
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + ebx*4 + 0x30], ecx
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
cmp eax, 0x21
jl 0x408a90
test ebx, ebx
jle 0x408ae2
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x2c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408ac0
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408d2d
jmp 0x408af2
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x408d2d
shl ebp, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408f30
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408f30
add esp, 0xc
test ebx, ebx
jle 0x408c15
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x14], ebp
jmp 0x408b6c
mov ebx, dword [esp + 8]
mov dword [esp + 8], ebx
lea ecx, [eax + 1]
mov ebx, dword [esp + 0x15cc]
cmp eax, ebx
mov eax, ecx
je 0x408c15
mov edi, dword [esp + eax*4 + 0x30]
test edi, edi
jle 0x408b50
mov edx, edi
and edx, 3
je 0x408bc0
mov dword [esp + 4], edi
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 8]
mov edi, dword [esp]
lea ebp, [edi + esi*4]
xor esi, esi
nop
movzx edi, word [ebp]
mov ebx, dword [esp + 0x14]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x408b90
sub dword [esp + 8], esi
mov edi, dword [esp + 4]
mov edx, edi
sub edx, esi
mov ebp, dword [esp + 0x14]
jmp 0x408bc2
mov edx, edi
cmp edi, 4
mov ebx, dword [esp + 8]
mov edi, dword [esp]
jb 0x408b54
dec edx
nop
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0x10]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408bd0
jmp 0x408b54
mov edi, dword [esp + 0x10]
mov dword [esp + 0x938], 0
cmp ebx, 2
jl 0x408c4c
xor eax, eax
mov ecx, 2
add eax, dword [esp + ecx*4 + 0x2c]
add eax, eax
mov dword [esp + ecx*4 + 0x934], eax
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
cmp ecx, ebx
jle 0x408c30
cmp dword [esp + 0x15c8], 0
jle 0x408d22
xor eax, eax
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, edi
shl ecx, 6
add ecx, edi
mov dword [esp + 4], ecx
jmp 0x408c9a
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15c8]
je 0x408d22
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408c8c
mov ebp, dword [esp + ecx*4 + 0x934]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x934], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x408cff
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ebp
and esi, 1
shl esi, 2
lea esi, [esi + ebx*8]
mov ebx, ebp
and ebx, 2
or ebx, esi
mov esi, ebp
shr esi, 2
and esi, 1
or esi, ebx
mov ebx, ebp
shr ebx, 3
and ebx, 1
lea ebx, [ebx + esi*2]
shr ebp, 4
add ecx, 0xfffffffc
jne 0x408cd0
test edi, edi
je 0x408c80
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x408d10
jmp 0x408c80
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x30]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408d58
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x408d40
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
cmp eax, edx
jne 0x408d2d
jmp 0x408af2