Function at 0x408210
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408bf0
mov esi, edx
mov ebp, ecx
mov ebx, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408e00
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x14], esi
je 0x4082be
test ebx, ebx
jle 0x408aa0
xor eax, eax
cmp ebx, 1
je 0x408298
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + ebp]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
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 0x408280
test bl, 1
je 0x408aa0
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebp
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x30]
jmp 0x408aa0
lea edi, [esi + esi*8]
mov eax, edi
shl eax, 6
test ebx, ebx
mov ecx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], eax
jle 0x4083c9
cmp ebx, 1
jne 0x4088cf
xor ebx, ebx
xor eax, eax
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x40831f
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x40831f
mov word [esp + ebx*4 + 0xb4], cx
mov word [esp + ebx*4 + 0xb6], ax
inc ebx
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408e00
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x4083e0
xor eax, eax
cmp ebx, 1
je 0x40839f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
movzx edx, word [esp + eax*4 + 0xb8]
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 0x408360
test bl, 1
je 0x4083c0
movzx eax, word [esp + eax*4 + 0xb4]
movzx ecx, al
inc dword [esp + ecx*4 + 0x934]
shr eax, 8
inc dword [esp + eax*4 + 0xd34]
mov eax, dword [esp + 0xd34]
jmp 0x4083e9
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408e00
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov edi, 2
sub edi, ecx
lea eax, [ebx - 1]
mov dword [esp + 0x18], eax
mov dword [esp + 8], ebx
and ebx, 0xfffffffe
xor ecx, ecx
lea eax, [esp + 0xb4]
mov dword [esp], eax
lea eax, [esp + 0x1134]
lea esi, [esp + 0x938]
xor edx, edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], ebx
jmp 0x408448
mov edx, dword [esp + 0x2c]
inc edx
add ecx, 8
add esi, 0x400
mov eax, ebp
cmp edx, edi
je 0x40854b
mov dword [esp + 0x2c], edx
mov edx, dword [esp]
mov dword [esp + 0xc], edx
mov dword [esp], eax
xor edx, edx
xor eax, eax
nop
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0x534], edx
mov ebp, dword [esi + eax*4 - 4]
mov ebx, ebp
and ebx, edx
xor ebp, edx
lea edx, [ebx*2]
add edx, ebp
mov dword [esp + eax*4 + 0x538], edx
mov ebx, dword [esi + eax*4]
mov ebp, ebx
and ebp, edx
xor ebx, edx
lea edx, [ebx + ebp*2]
add eax, 2
cmp eax, 0x100
jne 0x408460
cmp byte [esp + 7], 0
mov ebp, dword [esp + 0xc]
jne 0x408430
cmp dword [esp + 0x18], 0
je 0x40850c
xor eax, eax
mov edi, dword [esp]
nop
nop
movzx edx, word [ebp + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0x534]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0x534], ebp
mov edx, dword [esp + 0xc]
mov edx, dword [edx + eax*4]
mov dword [edi + ebx*4], edx
mov edx, dword [esp + 0xc]
movzx edx, word [edx + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0x534]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0x534], ebp
mov ebp, dword [esp + 0xc]
mov edx, dword [ebp + eax*4 + 4]
mov dword [edi + ebx*4], edx
mov ebx, dword [esp + 0x1c]
add eax, 2
cmp ebx, eax
jne 0x4084b0
jmp 0x40850e
xor eax, eax
test byte [esp + 8], 1
mov edi, dword [esp + 0x28]
je 0x408430
movzx edx, word [ebp + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0x534]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0x534], ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [ebp + eax*4]
mov edx, dword [esp]
mov dword [edx + ebx*4], eax
jmp 0x408430
cmp dword [esp + 8], 0
mov ebx, dword [esp + 0x10]
je 0x40897b
mov ebx, dword [esp + 8]
cmp ebx, 1
jne 0x408574
mov eax, dword [esp]
mov word [eax], 1
mov ebx, dword [esp + 0x10]
jmp 0x4087b1
mov edi, dword [esp]
movzx eax, word [edi + 4]
add word [edi], ax
mov ebp, ebx
xor ebp, 0xfffffffe
lea ecx, [ebx + ebx]
and ecx, 0xfffffffc
lea edx, [ecx + ebp]
inc edx
cmp edx, 2
jl 0x40861f
add ebp, ecx
neg ebp
xor ecx, ecx
mov edx, 2
mov esi, 1
jmp 0x4085c6
inc edx
add word [eax + esi*4], di
lea edi, [esi + ebp]
inc edi
inc esi
cmp edi, 1
mov ebx, dword [esp + 8]
mov edi, dword [esp]
je 0x40861f
movzx eax, word [edi + ecx*4]
cmp edx, ebx
jge 0x4085d7
movzx ebx, word [edi + edx*4]
cmp ax, bx
jae 0x4085f0
mov word [edi + esi*4], ax
mov word [edi + ecx*4], si
inc ecx
jmp 0x4085f5
inc edx
mov word [edi + esi*4], bx
mov eax, edi
cmp edx, dword [esp + 8]
jge 0x408610
movzx edi, word [eax + edx*4]
cmp ecx, esi
jge 0x4085b0
movzx ebx, word [eax + ecx*4]
cmp bx, di
jae 0x4085b0
jmp 0x408614
movzx ebx, word [eax + ecx*4]
add word [eax + esi*4], bx
mov word [eax + ecx*4], si
inc ecx
jmp 0x4085b5
mov word [edi + ebx*4 - 8], 0
cmp ebx, 3
jl 0x4086a1
lea ecx, [ebx - 3]
lea edx, [ebx + 2]
mov eax, ecx
and edx, 3
je 0x408651
mov eax, ecx
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 0x408640
cmp ecx, 3
jb 0x4086a1
inc eax
nop
nop
nop
nop
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 0x408660
mov eax, ebx
or eax, 0xfffffffd
mov ecx, ebx
and ecx, 0xfffffffd
lea edx, [eax + ecx]
inc edx
xor ecx, ecx
mov ebx, 1
mov eax, dword [esp + 0x18]
jmp 0x4086e5
mov edi, ebp
mov esi, edi
and esi, 2
mov ebx, edi
or edi, 2
imul edi, esi
xor esi, 2
and ebx, 0xfffffffd
imul ebx, esi
add edi, ebx
inc ecx
mov ebx, edi
test edi, edi
jle 0x4087a2
test edx, edx
js 0x408710
lea ebp, [edx + 1]
xor edi, edi
nop
nop
mov esi, dword [esp]
movzx esi, word [esi + edx*4]
cmp ecx, esi
jne 0x408720
inc edi
dec edx
cmp ebp, edi
jne 0x4086f0
mov edx, 0xffffffff
jmp 0x408722
xor ebp, ebp
jmp 0x408722
mov ebp, edi
mov edi, ebx
sub edi, ebp
jle 0x4086c0
mov dword [esp + 0xc], ebp
not ebp
add ebp, ebx
and edi, 3
je 0x408764
mov dword [esp + 0x1c], ebp
mov esi, dword [esp]
lea ebp, [esi + eax*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], cx
inc esi
add ebp, 0xfffffffc
cmp edi, esi
jne 0x408750
sub ebx, esi
sub eax, esi
mov ebp, dword [esp + 0x1c]
cmp ebp, 3
mov esi, dword [esp]
mov edi, dword [esp + 0xc]
jb 0x4086c2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi + eax*4], cx
mov word [esi + eax*4 - 4], cx
mov word [esi + eax*4 - 8], cx
mov word [esi + eax*4 - 0xc], cx
add eax, 0xfffffffc
add ebx, 0xfffffffc
cmp ebx, edi
jg 0x408780
jmp 0x4086c2
cmp dword [esp + 8], 0
mov ebx, dword [esp + 0x10]
jle 0x40897b
mov eax, dword [esp + 8]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
mov edi, dword [esp]
jb 0x4087fa
mov edx, dword [esp + 8]
and edx, 0xfffffffc
xor ecx, ecx
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 0x4087d0
test eax, eax
je 0x40881d
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 0x408810
cmp dword [esp + 8], 2
jl 0x40897b
mov edx, dword [esp + 0x15cc]
cmp edx, 0x20
jge 0x4088a0
mov eax, dword [esp + edx*4 + 0x30]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x40885c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
inc ecx
mov dword [esp + esi*4 + 0x30], eax
dec edx
jne 0x408850
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408898
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x40]
add ecx, 4
mov dword [esp + edx*4 + 0x30], eax
cmp ecx, 0x20
jne 0x408870
test edx, edx
jle 0x408935
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 + 0x2c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x4088b0
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
jmp 0x408942
mov ecx, ebx
and ecx, 0xfffffffe
mov edx, dword [esp + 0x10]
add edx, eax
add edx, 0x8194
xor ebx, ebx
xor eax, eax
jmp 0x4088fb
add eax, 2
cmp ecx, eax
je 0x4082e9
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408916
mov word [esp + ebx*4 + 0xb4], si
mov word [esp + ebx*4 + 0xb6], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x4088f0
mov word [esp + ebx*4 + 0xb4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0xb6], si
inc ebx
jmp 0x4088f0
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x408946
cmp eax, edx
je 0x40897b
mov ecx, dword [esp + 0x15cc]
dec dword [esp + ecx*4 + 0x30]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408978
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x408960
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
jmp 0x408942
mov esi, dword [esp + 0x24]
shl esi, 5
lea eax, [ebx + esi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408e00
add esp, 0xc
mov eax, dword [esp + 0x20]
mov ebp, ebx
add eax, ebx
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408e00
add esp, 0xc
cmp dword [esp + 0x15cc], 0
jle 0x408a99
add dword [esp], 0xfffffffe
mov eax, 1
jmp 0x4089ee
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0x10]
mov dword [esp + 8], ebx
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
je 0x408a99
mov edi, dword [esp + eax*4 + 0x30]
test edi, edi
jle 0x4089d0
mov edx, edi
and edx, 3
je 0x408a40
mov dword [esp + 0xc], edi
mov ecx, esi
mov esi, dword [esp + 8]
mov edi, dword [esp]
lea edi, [edi + esi*4]
xor esi, esi
nop
movzx ebx, word [edi]
mov ebp, dword [esp + 0x10]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x408a10
sub dword [esp + 8], esi
mov edi, dword [esp + 0xc]
mov edx, edi
sub edx, esi
mov esi, ecx
jmp 0x408a42
mov edx, edi
cmp edi, 4
mov ebx, dword [esp + 8]
mov edi, dword [esp]
jb 0x4089d4
dec edx
nop
movzx ecx, word [edi + ebx*4]
mov ebp, esi
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
mov esi, ebp
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408a50
jmp 0x4089d4
mov ebx, dword [esp + 0x15c8]
mov dword [esp + 0x938], 0
mov eax, dword [esp + 0x15cc]
cmp eax, 2
jl 0x408b1d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408acd
xor eax, eax
mov edx, 2
test cl, 1
jne 0x408b10
jmp 0x408b1d
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add edx, 2
cmp ebx, edx
jne 0x408ae0
add edx, 2
mov ebx, dword [esp + 0x15c8]
test cl, 1
je 0x408b1d
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
test ebx, ebx
jle 0x408be2
xor eax, eax
mov ecx, dword [esp + 0x14]
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 0x408b5c
mov ecx, dword [esp + 0xc]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c8]
inc eax
cmp eax, ebx
je 0x408be2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408b53
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 0x408bbf
and ecx, 0xfffffffc
xor ebx, ebx
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 0x408b90
test edi, edi
je 0x408b40
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 0x408bd0
jmp 0x408b40
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret