Function at 0x408210
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408c50
mov edi, edx
mov ebp, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408d90
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x18], edi
je 0x4082c5
test esi, esi
jle 0x408ac5
xor eax, eax
cmp dword [esp + 0x15c8], 1
je 0x408298
mov ecx, dword [esp + 0x15c8]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + ebp]
add edx, 0x8f13
xor eax, eax
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 0x408280
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408ac5
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebp
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x30]
jmp 0x408ac5
lea eax, [edi + edi*8]
mov ebx, eax
shl eax, 6
test esi, esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], eax
jle 0x4083bb
cmp esi, 1
jne 0x408640
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x40831c
mov ecx, dword [esp + 0x20]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40831c
mov word [esp + edi*4 + 0x4b4], cx
mov word [esp + edi*4 + 0x4b6], ax
inc edi
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408d90
add esp, 0xc
test edi, edi
sete byte [esp + 0xb]
je 0x4083d2
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x40838f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
movzx edx, word [esp + eax*4 + 0x4b4]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
movzx edx, word [esp + eax*4 + 0x4b8]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
add eax, 2
cmp ecx, eax
jne 0x408350
mov edx, edi
test dl, 1
je 0x4083b2
movzx eax, word [esp + eax*4 + 0x4b4]
movzx ecx, al
inc dword [esp + ecx*4 + 0x934]
shr eax, 8
inc dword [esp + eax*4 + 0xd34]
mov eax, dword [esp + 0xd34]
jmp 0x4083db
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408d90
add esp, 0xc
xor edx, edx
mov byte [esp + 0xb], 1
xor eax, eax
xor ecx, ecx
cmp eax, edx
sete cl
mov ebp, 2
sub ebp, ecx
lea eax, [edx - 1]
mov dword [esp + 0x1c], eax
mov dword [esp + 4], edx
and edx, 0xfffffffe
lea eax, [esp + 0x1134]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x4b4]
xor edi, edi
lea esi, [esp + 0x934]
xor ecx, ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], ebp
jmp 0x408445
inc edi
add ecx, 8
add esi, 0x400
mov eax, dword [esp]
cmp edi, ebp
je 0x408558
mov edx, dword [esp + 0xc]
mov dword [esp], edx
mov dword [esp + 0xc], eax
mov eax, 3
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0xa8], edx
add edx, dword [esi + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xac], edx
add edx, dword [esi + eax*4 - 8]
mov dword [esp + eax*4 + 0xb0], edx
add edx, dword [esi + eax*4 - 4]
mov dword [esp + eax*4 + 0xb4], edx
add edx, dword [esi + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x408460
cmp byte [esp + 0xb], 0
jne 0x408430
mov dword [esp + 0x14], edi
cmp dword [esp + 0x1c], 0
je 0x40850d
xor eax, eax
mov ebp, dword [esp]
mov ebx, dword [esp + 0xc]
movzx edx, word [ebx + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb4], ebx
mov edx, dword [esp + 0xc]
mov edx, dword [edx + eax*4]
mov dword [ebp + edi*4], edx
mov edx, dword [esp + 0xc]
movzx edx, word [edx + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb4], ebx
mov ebx, dword [esp + 0xc]
mov edx, dword [ebx + eax*4 + 4]
mov dword [ebp + edi*4], edx
mov edx, dword [esp + 0x28]
add eax, 2
cmp edx, eax
jne 0x4084b0
jmp 0x40850f
xor eax, eax
test byte [esp + 4], 1
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x14]
je 0x408430
mov ebp, dword [esp + 0xc]
movzx edx, word [ebp + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb4], ebx
mov eax, dword [ebp + eax*4]
mov ebp, dword [esp + 0x24]
mov edx, dword [esp]
mov dword [edx + edi*4], eax
mov edi, dword [esp + 0x14]
jmp 0x408430
cmp dword [esp + 4], 0
mov ebp, dword [esp + 0x10]
je 0x408982
mov edx, dword [esp + 4]
cmp edx, 1
jne 0x40857d
mov eax, dword [esp]
mov word [eax], 1
jmp 0x408851
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
cmp edx, 3
jl 0x4086a5
mov eax, 2
mov ecx, 2
sub ecx, edx
xor edx, edx
mov esi, 1
jmp 0x4085d1
mov ebp, dword [esp]
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
je 0x4086b6
mov ebp, dword [esp]
movzx edi, word [ebp + edx*4]
cmp eax, dword [esp + 4]
jge 0x4085e9
movzx ebx, word [ebp + eax*4]
cmp di, bx
jae 0x408600
mov word [ebp + esi*4], di
mov word [ebp + edx*4], si
inc edx
cmp eax, dword [esp + 4]
jge 0x4085b0
jmp 0x40860c
inc eax
mov word [ebp + esi*4], bx
cmp eax, dword [esp + 4]
jge 0x4085b0
cmp edx, esi
jge 0x408630
mov ebp, dword [esp]
movzx ebx, word [ebp + edx*4]
movzx edi, word [ebp + eax*4]
cmp bx, di
jb 0x4085b8
jmp 0x408638
mov ebp, dword [esp]
movzx edi, word [ebp + eax*4]
inc eax
add word [ebp + esi*4], di
jmp 0x4085c3
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40866b
add eax, 2
cmp ecx, eax
je 0x4082ea
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408686
mov word [esp + edi*4 + 0x4b4], si
mov word [esp + edi*4 + 0x4b6], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x408660
mov word [esp + edi*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0x4b6], si
inc edi
jmp 0x408660
mov eax, ecx
lea ecx, [edx - 2]
mov word [eax + edx*4 - 8], 0
jmp 0x408751
mov eax, dword [esp + 4]
mov edi, dword [esp]
mov word [edi + eax*4 - 8], 0
lea edx, [eax - 3]
lea ecx, [eax + 2]
mov eax, edx
and ecx, 3
je 0x4086f1
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 0x4086e0
mov ecx, dword [esp + 4]
add ecx, 0xfffffffe
cmp edx, 3
jb 0x408751
inc eax
mov esi, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esi + eax*4 - 4]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 4], dx
movzx edx, word [esi + eax*4 - 8]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 8], dx
movzx edx, word [esi + eax*4 - 0xc]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 0xc], dx
movzx edx, word [esi + eax*4 - 0x10]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x408710
mov ebp, 1
xor edx, edx
mov esi, dword [esp + 0x1c]
jmp 0x408786
mov eax, edi
and eax, 2
mov ebx, edi
or edi, 2
imul edi, eax
xor eax, 2
and ebx, 0x7ffffffd
imul ebx, eax
add edi, ebx
inc edx
mov ebp, edi
test edi, edi
jle 0x408842
test ecx, ecx
js 0x4087b0
lea ebx, [ecx + 1]
xor eax, eax
nop
mov edi, dword [esp]
movzx edi, word [edi + ecx*4]
cmp edx, edi
jne 0x4087c0
inc eax
add ecx, 0xffffffff
jb 0x408790
mov ecx, 0xffffffff
mov edi, ebx
jmp 0x4087c2
xor edi, edi
jmp 0x4087c2
mov edi, eax
mov eax, ebp
sub eax, edi
jle 0x408760
mov ebx, edi
not ebx
add ebx, ebp
and eax, 3
je 0x408807
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], edi
mov edi, dword [esp]
lea edi, [edi + esi*4]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], dx
inc ebx
add edi, 0xfffffffc
cmp eax, ebx
jne 0x4087f0
sub esi, ebx
sub ebp, ebx
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x14]
cmp ebx, 3
mov eax, dword [esp]
jb 0x408760
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax + esi*4], dx
mov word [eax + esi*4 - 4], dx
mov word [eax + esi*4 - 8], dx
mov word [eax + esi*4 - 0xc], dx
add esi, 0xfffffffc
add ebp, 0xfffffffc
cmp ebp, edi
jg 0x408820
jmp 0x408760
cmp dword [esp + 4], 0
mov ebp, dword [esp + 0x10]
jle 0x408982
cmp dword [esp + 0x1c], 0
je 0x40889a
xor eax, eax
mov edi, dword [esp]
nop
nop
nop
movzx ecx, word [edi + eax*4]
mov edx, dword [esp + ecx*4 + 0x30]
mov esi, edx
xor esi, 1
and edx, 1
lea edx, [esi + edx*2]
mov dword [esp + ecx*4 + 0x30], edx
movzx ecx, word [edi + eax*4 + 4]
mov edx, dword [esp + ecx*4 + 0x30]
mov esi, edx
xor esi, 1
and edx, 1
lea edx, [esi + edx*2]
mov dword [esp + ecx*4 + 0x30], edx
add eax, 2
cmp dword [esp + 0x28], eax
jne 0x408860
jmp 0x40889c
xor eax, eax
mov edx, dword [esp + 4]
test dl, 1
je 0x4088c3
mov ecx, dword [esp]
movzx eax, word [ecx + eax*4]
mov ecx, dword [esp + eax*4 + 0x30]
mov edx, ecx
xor edx, 1
and ecx, 1
lea ecx, [edx + ecx*2]
mov edx, dword [esp + 4]
mov dword [esp + eax*4 + 0x30], ecx
cmp edx, 2
jl 0x408982
mov edx, dword [esp + 0x15cc]
lea eax, [edx + 1]
cmp eax, 0x21
jge 0x40893c
mov ecx, dword [esp + edx*4 + 0x30]
neg edx
mov esi, dword [esp + 0x15cc]
and edx, 3
je 0x4088fc
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + esi*4 + 0x30], ecx
inc eax
dec edx
jne 0x4088f0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408938
add eax, 3
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + edx*4 + 0x30], ecx
add eax, 4
cmp eax, 0x24
jne 0x408910
test edx, edx
jle 0x408972
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 + 0x2c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408950
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
jmp 0x408c0d
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x408c15
mov ebx, dword [esp + 0x2c]
shl ebx, 5
mov esi, ebx
lea eax, [ebx + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408d90
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, ebp
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408d90
add esp, 0xc
cmp dword [esp + 0x15cc], 0
jle 0x408ac5
add dword [esp], 0xfffffffe
mov eax, 1
jmp 0x408a02
mov edi, dword [esp + 4]
mov ebp, esi
mov esi, ebp
mov dword [esp + 4], edi
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
mov ebp, dword [esp + 0x10]
je 0x408ac5
mov edi, dword [esp + eax*4 + 0x30]
test edi, edi
jle 0x4089e0
mov edx, edi
and edx, 3
je 0x408a60
mov dword [esp + 0xc], edi
mov ecx, esi
mov esi, dword [esp + 4]
mov edi, dword [esp]
lea ebx, [edi + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebx]
mov ebp, dword [esp + 0x10]
add ebp, ecx
mov byte [edi + ebp + 0x8f12], al
inc esi
add ebx, 0xfffffffc
cmp edx, esi
jne 0x408a30
mov edi, dword [esp + 0xc]
mov edx, edi
sub edx, esi
sub dword [esp + 4], esi
mov esi, ecx
jmp 0x408a62
mov edx, edi
cmp edi, 4
mov edi, dword [esp + 4]
mov ebx, dword [esp]
mov ebp, esi
jb 0x4089e6
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebx + edi*4]
mov esi, dword [esp + 0x10]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add edi, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408a80
jmp 0x4089e6
mov dword [esp + 0x938], 0
mov ecx, dword [esp + 0x15cc]
cmp ecx, 2
jl 0x408b35
lea eax, [ecx - 1]
cmp ecx, 2
jne 0x408af1
mov edx, 2
xor ecx, ecx
test al, 1
jne 0x408b28
jmp 0x408b35
mov ebx, eax
and ebx, 0xfffffffe
xor ecx, ecx
xor edx, edx
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + edx*4 + 0x34]
add ecx, ecx
mov dword [esp + edx*4 + 0x93c], ecx
add ecx, dword [esp + edx*4 + 0x38]
add ecx, ecx
mov dword [esp + edx*4 + 0x940], ecx
add edx, 2
cmp ebx, edx
jne 0x408b00
add edx, 2
test al, 1
je 0x408b35
add ecx, dword [esp + edx*4 + 0x2c]
add ecx, ecx
mov dword [esp + edx*4 + 0x934], ecx
cmp dword [esp + 0x15c8], 0
jle 0x408c02
xor eax, eax
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, ebp
shl ecx, 6
add ecx, ebp
mov dword [esp + 0xc], ecx
jmp 0x408b7a
mov ecx, dword [esp + 0xc]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15c8]
je 0x408c02
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408b6c
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 0x408bdf
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 0x408bb0
test edi, edi
je 0x408b60
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 0x408bf0
jmp 0x408b60
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
cmp eax, edx
je 0x408982
mov ecx, dword [esp + 0x15cc]
dec dword [esp + ecx*4 + 0x30]
cmp ecx, 2
jl 0x408c3e
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x408c20
mov edi, esi
not edi
lea esi, [edi + esi*2]
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
jmp 0x408c0d