Function at 0x408090
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x1590
call fcn.00408ab0
mov esi, dword [esp + 0x15ac]
mov ebx, dword [esp + 0x15a8]
mov edi, dword [esp + 0x15a4]
lea eax, [esp + 0xc]
push 0x84
push 0
push eax
call fcn.00408d60
add esp, 0xc
cmp dword [esp + 0x15b4], 0
je 0x408148
test esi, esi
mov ecx, esi
jle 0x408694
xor eax, eax
cmp ecx, 1
je 0x408118
mov ecx, dword [esp + 0x15ac]
and ecx, 0x7ffffffe
lea eax, [ebx + ebx*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0xc]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0xc]
add eax, 2
cmp ecx, eax
jne 0x408100
mov ecx, dword [esp + 0x15ac]
test cl, 1
je 0x408694
lea ecx, [ebx + ebx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15ac]
inc dword [esp + eax*4 + 0xc]
jmp 0x408694
lea eax, [ebx + ebx*8]
mov edx, eax
shl edx, 6
test esi, esi
mov dword [esp + 8], eax
mov dword [esp], edx
jle 0x40824e
cmp esi, 1
jne 0x4084f7
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15ac]
test cl, 1
je 0x4081a4
mov ecx, dword [esp]
mov edx, dword [esp + 0x15a4]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4081a4
mov word [esp + ebx*4 + 0x490], cx
mov word [esp + ebx*4 + 0x492], ax
inc ebx
lea eax, [esp + 0x910]
push 0x800
push 0
push eax
call fcn.00408d60
add esp, 0xc
test ebx, ebx
sete al
je 0x408265
mov byte [esp + 4], al
xor ecx, ecx
cmp ebx, 1
je 0x40821f
mov edx, ebx
and edx, 0xfffffffe
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [esp + ecx*4 + 0x490]
movzx esi, al
inc dword [esp + esi*4 + 0x910]
shr eax, 8
inc dword [esp + eax*4 + 0xd10]
movzx eax, word [esp + ecx*4 + 0x494]
movzx esi, al
inc dword [esp + esi*4 + 0x910]
shr eax, 8
inc dword [esp + eax*4 + 0xd10]
add ecx, 2
cmp edx, ecx
jne 0x4081e0
test bl, 1
je 0x408240
movzx ecx, word [esp + ecx*4 + 0x490]
movzx edx, cl
inc dword [esp + edx*4 + 0x910]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd10]
mov ebp, dword [esp + 0xd10]
movzx eax, byte [esp + 4]
jmp 0x40826b
lea eax, [esp + 0x910]
push 0x800
push 0
push eax
call fcn.00408d60
add esp, 0xc
xor ebx, ebx
mov al, 1
xor ebp, ebp
xor edx, edx
mov esi, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + esi*4 + 0x84], edx
add edx, dword [esp + esi*4 + 0x904]
mov dword [esp + esi*4 + 0x88], edx
add edx, dword [esp + esi*4 + 0x908]
mov dword [esp + esi*4 + 0x8c], edx
add edx, dword [esp + esi*4 + 0x90c]
mov dword [esp + esi*4 + 0x90], edx
add edx, dword [esp + esi*4 + 0x910]
add esi, 4
cmp esi, 0x103
jne 0x408280
mov byte [esp + 4], al
test al, al
jne 0x40830e
xor edx, edx
nop
nop
nop
movzx eax, byte [esp + edx*4 + 0x490]
mov esi, dword [esp + eax*4 + 0x90]
mov edi, esi
mov ecx, dword [esp + edx*4 + 0x490]
mov dword [esp + esi*4 + 0x1110], ecx
and esi, 1
xor edi, 1
lea ecx, [edi + esi*2]
mov dword [esp + eax*4 + 0x90], ecx
mov eax, edx
xor eax, 1
and edx, 1
lea edx, [eax + edx*2]
cmp edx, ebx
jb 0x4082d0
cmp ebp, ebx
jne 0x40831e
lea esi, [esp + 0x1110]
jmp 0x4083c8
xor ecx, ecx
mov edx, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0x84], ecx
add ecx, dword [esp + edx*4 + 0xd04]
mov dword [esp + edx*4 + 0x88], ecx
add ecx, dword [esp + edx*4 + 0xd08]
mov dword [esp + edx*4 + 0x8c], ecx
add ecx, dword [esp + edx*4 + 0xd0c]
mov dword [esp + edx*4 + 0x90], ecx
add ecx, dword [esp + edx*4 + 0xd10]
add edx, 4
cmp edx, 0x103
jne 0x408330
cmp byte [esp + 4], 0
jne 0x4083c1
xor eax, eax
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x1110]
movzx ecx, ch
mov edx, dword [esp + ecx*4 + 0x90]
mov esi, edx
mov edi, dword [esp + eax*4 + 0x1110]
mov dword [esp + edx*4 + 0x490], edi
and edx, 1
xor esi, 1
lea edx, [esi + edx*2]
mov dword [esp + ecx*4 + 0x90], edx
mov ecx, eax
xor ecx, 1
and eax, 1
lea eax, [ecx + eax*2]
cmp eax, ebx
jb 0x408380
lea esi, [esp + 0x490]
push ebx
push esi
call fcn.00408820
add esp, 8
test ebx, ebx
jle 0x408565
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp ebx, 4
jb 0x40841a
mov edx, ebx
and edx, 0x7ffffffc
xor ecx, ecx
movzx edi, word [esi + ecx*4]
inc dword [esp + edi*4 + 0xc]
movzx edi, word [esi + ecx*4 + 4]
inc dword [esp + edi*4 + 0xc]
movzx edi, word [esi + ecx*4 + 8]
inc dword [esp + edi*4 + 0xc]
movzx edi, word [esi + ecx*4 + 0xc]
inc dword [esp + edi*4 + 0xc]
add ecx, 4
cmp edx, ecx
jne 0x4083f0
test eax, eax
je 0x40843d
lea ecx, [esi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ecx + edx*4]
inc dword [esp + edi*4 + 0xc]
inc edx
cmp eax, edx
jne 0x408430
cmp ebx, 1
je 0x408565
mov edx, dword [esp + 0x15b0]
cmp edx, 0x20
jge 0x4084c0
mov eax, dword [esp + edx*4 + 0xc]
mov edi, edx
neg edx
mov ecx, edi
and edx, 3
je 0x40847c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x10]
inc ecx
mov dword [esp + edi*4 + 0xc], eax
dec edx
jne 0x408470
lea edx, [edi - 0x1d]
cmp edx, 3
mov edx, edi
jb 0x4084b8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x10]
mov dword [esp + edx*4 + 0xc], eax
add eax, dword [esp + ecx*4 + 0x14]
mov dword [esp + edx*4 + 0xc], eax
add eax, dword [esp + ecx*4 + 0x18]
mov dword [esp + edx*4 + 0xc], eax
add eax, dword [esp + ecx*4 + 0x1c]
add ecx, 4
mov dword [esp + edx*4 + 0xc], eax
cmp ecx, 0x20
jne 0x408490
test edx, edx
jle 0x408555
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + edx*4 + 8]
shl edi, cl
add eax, edi
dec edx
inc ecx
cmp edx, 1
ja 0x4084d0
mov edx, 1
mov ecx, dword [esp + 0x15b0]
shl edx, cl
cmp eax, edx
jne 0x4087dd
jmp 0x408565
mov ecx, esi
and ecx, 0x7ffffffe
add edx, edi
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x40851b
add eax, 2
cmp ecx, eax
je 0x40816c
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408536
mov word [esp + ebx*4 + 0x490], si
mov word [esp + ebx*4 + 0x492], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x408510
mov word [esp + ebx*4 + 0x490], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x492], si
inc ebx
jmp 0x408510
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x4087dd
mov ecx, dword [esp + 0x15b0]
dec dword [esp + ecx*4 + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408808
mov edi, dword [esp + ecx*4 + 8]
dec ecx
test edi, edi
je 0x4087f0
dec edi
mov dword [esp + ecx*4 + 0xc], edi
jl 0x40878e
or al, 0x83
inc esp
mov word [eax], ss
invalid
dec eax
cmp eax, edx
jne 0x4087dd