Function at 0x4080b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15a0
call fcn.00408a40
mov esi, dword [esp + 0x15bc]
mov ebx, dword [esp + 0x15b8]
mov edi, dword [esp + 0x15b4]
lea eax, [esp + 0x1c]
push 0x84
push 0
push eax
call fcn.00408be0
add esp, 0xc
cmp dword [esp + 0x15c4], 0
je 0x40818f
test esi, esi
mov ecx, esi
mov ebx, dword [esp + 0x15c0]
jle 0x40861d
xor eax, eax
cmp ecx, 1
je 0x408158
mov ecx, dword [esp + 0x15bc]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x15b8]
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
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x1c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x1c]
add eax, 2
cmp ecx, eax
jne 0x408140
mov ecx, dword [esp + 0x15bc]
test cl, 1
je 0x40861d
mov ecx, dword [esp + 0x15b8]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15bc]
inc dword [esp + eax*4 + 0x1c]
jmp 0x40861d
lea ebx, [ebx + ebx*8]
mov ebp, ebx
shl ebp, 6
test esi, esi
mov dword [esp + 0x10], ebx
jle 0x408243
cmp esi, 1
jne 0x408472
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15bc]
test cl, 1
je 0x4081e5
mov ecx, dword [esp + 0x15b4]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4081e5
mov word [esp + edi*4 + 0xa0], cx
mov word [esp + edi*4 + 0xa2], ax
inc edi
lea eax, [esp + 0x520]
push 0x800
push 0
push eax
call fcn.00408be0
add esp, 0xc
test edi, edi
sete byte [esp + 3]
je 0x40825a
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0xa0]
mov edx, ecx
not edx
or edx, 0xff
add edx, ecx
inc dword [esp + edx*4 + 0x524]
shr ecx, 8
inc dword [esp + ecx*4 + 0x920]
inc eax
cmp edi, eax
jne 0x408210
mov eax, dword [esp + 0x920]
jmp 0x408263
lea eax, [esp + 0x520]
push 0x800
push 0
push eax
call fcn.00408be0
add esp, 0xc
xor edi, edi
mov byte [esp + 3], 1
xor eax, eax
mov dword [esp + 0xc], ebp
xor ecx, ecx
mov dword [esp + 8], edi
cmp eax, edi
setne cl
inc ecx
mov dword [esp + 0x14], ecx
lea edi, [esp + 0xa0]
lea eax, [esp + 0x1120]
xor ecx, ecx
xor edx, edx
jmp 0x4082a8
mov edx, dword [esp + 0x18]
inc edx
add ecx, 8
mov eax, edi
cmp edx, dword [esp + 0x14]
mov edi, dword [esp + 4]
je 0x408334
mov dword [esp + 4], eax
mov dword [esp + 0x18], edx
mov eax, edx
shl eax, 0xa
add eax, esp
add eax, 0x520
xor edx, edx
xor ebx, ebx
mov dword [esp + ebx*4 + 0xd20], edx
add edx, dword [eax + ebx*4]
mov ebp, ebx
and ebp, 1
xor ebx, 1
lea ebx, [ebx + ebp*2]
cmp ebx, 0x100
jb 0x4082c0
cmp byte [esp + 3], 0
jne 0x408290
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + eax*4]
shr edx, cl
movzx esi, dl
mov ebx, dword [esp + esi*4 + 0xd20]
mov ebp, dword [edi + eax*4]
mov edx, edi
mov edi, dword [esp + 4]
mov dword [edi + ebx*4], ebp
mov edi, edx
mov ebp, ebx
and ebx, 1
xor ebp, 1
lea ebx, [ebx*2]
add ebx, ebp
mov dword [esp + esi*4 + 0xd20], ebx
mov edx, dword [esp + 8]
inc eax
cmp edx, eax
jne 0x4082f0
jmp 0x408290
mov eax, dword [esp + 8]
push eax
push edi
mov edi, eax
call fcn.004087b0
add esp, 8
test edi, edi
mov ebx, dword [esp + 0x15c0]
mov ebp, dword [esp + 0x10]
jle 0x4084e5
mov eax, edi
and eax, 3
xor ecx, ecx
cmp edi, 4
mov edi, dword [esp + 4]
jb 0x4083aa
mov edx, dword [esp + 8]
and edx, 0x7ffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x1c]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x1c]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x1c]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x1c]
add ecx, 4
cmp edx, ecx
jne 0x408380
test eax, eax
je 0x4083cd
mov edx, dword [esp + 4]
lea ecx, [edx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x1c]
inc edx
cmp eax, edx
jne 0x4083c0
mov edi, dword [esp + 8]
cmp edi, 1
je 0x4084e5
cmp ebx, 0x20
jge 0x408440
mov eax, dword [esp + ebx*4 + 0x1c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x4083fc
nop
nop
add eax, dword [esp + ecx*4 + 0x20]
inc ecx
mov dword [esp + ebx*4 + 0x1c], eax
dec edx
jne 0x4083f0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x408438
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x20]
mov dword [esp + ebx*4 + 0x1c], eax
add eax, dword [esp + ecx*4 + 0x24]
mov dword [esp + ebx*4 + 0x1c], eax
add eax, dword [esp + ecx*4 + 0x28]
mov dword [esp + ebx*4 + 0x1c], eax
add eax, dword [esp + ecx*4 + 0x2c]
add ecx, 4
mov dword [esp + ebx*4 + 0x1c], eax
cmp ecx, 0x20
jne 0x408410
test ebx, ebx
jle 0x4084d5
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x18]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408450
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x40876d
jmp 0x4084e5
mov ecx, esi
and ecx, 0x7ffffffe
lea edx, [edi + ebp]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40849b
add eax, 2
cmp ecx, eax
je 0x4081b0
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4084b6
mov word [esp + edi*4 + 0xa0], si
mov word [esp + edi*4 + 0xa2], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x408490
mov word [esp + edi*4 + 0xa0], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xa2], si
inc edi
jmp 0x408490
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x40876d
dec dword [esp + ebx*4 + 0x1c]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408798
mov esi, dword [esp + ecx*4 + 0x18]
dec ecx
test esi, esi
je 0x408780
dec esi
mov dword [esp + ecx*4 + 0x1c], esi
je 0x40871e
sbb al, 0x83
inc esp
mov word [eax], fs
invalid
dec eax
cmp eax, edx
jne 0x40876d