Function at 0x408c00
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.004095f0
mov edi, edx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.004096a0
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x14], edi
je 0x408cce
test esi, esi
mov ecx, esi
jle 0x409416
xor eax, eax
cmp ecx, 1
je 0x408c98
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x2c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x2c]
add eax, 2
cmp ecx, eax
jne 0x408c80
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x409416
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x409416
lea eax, [edi + edi*8]
mov dword [esp + 0x18], eax
mov ebx, eax
shl ebx, 6
test esi, esi
jle 0x408d8c
cmp esi, 1
jne 0x409292
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x408d21
mov ecx, dword [esp + 0xc]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408d21
mov word [esp + edi*4 + 0x4b0], cx
mov word [esp + edi*4 + 0x4b2], ax
inc edi
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.004096a0
add esp, 0xc
test edi, edi
sete byte [esp + 0xb]
je 0x408da3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b0]
movzx edx, cl
inc dword [esp + edx*4 + 0x930]
shr ecx, 8
mov edx, dword [esp + ecx*4 + 0xd30]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + ecx*4 + 0xd30], edx
inc eax
cmp edi, eax
jne 0x408d50
mov eax, dword [esp + 0xd30]
jmp 0x408dac
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.004096a0
add esp, 0xc
xor edi, edi
mov byte [esp + 0xb], 1
xor eax, eax
mov dword [esp + 0x24], ebx
xor ecx, ecx
cmp eax, edi
setne cl
inc ecx
mov dword [esp + 0x28], ecx
lea eax, [edi - 1]
mov dword [esp + 0x1c], eax
mov dword [esp + 4], edi
mov esi, edi
and esi, 0xfffffffe
lea eax, [esp + 0x4b0]
mov dword [esp], eax
lea edx, [esp + 0x1130]
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x10], esi
jmp 0x408e0a
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
add ecx, 8
mov edx, edi
cmp eax, dword [esp + 0x28]
jae 0x408f10
mov edi, dword [esp]
mov dword [esp], edx
mov edx, eax
shl edx, 0xa
lea ebp, [esp + edx]
add ebp, 0x930
mov edx, 3
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa4], ebx
add ebx, dword [ebp + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xa8], ebx
add ebx, dword [ebp + edx*4 - 8]
mov dword [esp + edx*4 + 0xac], ebx
add ebx, dword [ebp + edx*4 - 4]
mov dword [esp + edx*4 + 0xb0], ebx
add ebx, dword [ebp + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x408e30
cmp byte [esp + 0xb], 0
jne 0x408df0
mov dword [esp + 0x20], eax
cmp dword [esp + 0x1c], 0
je 0x408ecf
xor ebp, ebp
mov eax, dword [esp]
nop
nop
movzx edx, word [edi + ebp*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb0]
lea esi, [ebx + 1]
mov dword [esp + edx*4 + 0xb0], esi
mov edx, dword [edi + ebp*4]
mov dword [eax + ebx*4], edx
movzx edx, word [edi + ebp*4 + 4]
shr edx, cl
movzx edx, dl
mov esi, dword [esp + edx*4 + 0xb0]
lea ebx, [esi + 1]
mov dword [esp + edx*4 + 0xb0], ebx
mov edx, dword [edi + ebp*4 + 4]
mov dword [eax + esi*4], edx
mov esi, dword [esp + 0x10]
add ebp, 2
cmp esi, ebp
jne 0x408e80
jmp 0x408ed1
xor ebp, ebp
test byte [esp + 4], 1
mov eax, dword [esp + 0x20]
je 0x408df0
movzx edx, word [edi + ebp*4]
shr edx, cl
movzx edx, dl
mov esi, dword [esp + edx*4 + 0xb0]
lea ebx, [esi + 1]
mov dword [esp + edx*4 + 0xb0], ebx
mov edx, dword [edi + ebp*4]
mov eax, dword [esp]
mov dword [eax + esi*4], edx
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
jmp 0x408df0
cmp dword [esp + 4], 0
mov ebx, dword [esp + 0x15c8]
mov ebp, dword [esp + 0x18]
je 0x409305
mov ecx, dword [esp + 4]
cmp ecx, 1
jne 0x408f3c
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40917d
mov edx, dword [esp]
movzx eax, word [edx + 4]
add word [edx], ax
mov eax, ecx
not eax
and eax, 1
sub esi, eax
mov ebp, esi
cmp esi, 2
jl 0x408fed
xor eax, eax
mov ecx, 2
mov edi, 1
jmp 0x408f88
mov esi, dword [esp]
movzx ebx, word [esi + ecx*4]
add word [esi + edi*4], bx
inc ecx
mov ebx, dword [esp + 0x15c8]
inc edi
cmp ebp, edi
je 0x408fed
mov esi, dword [esp]
movzx edx, word [esi + eax*4]
cmp ecx, dword [esp + 4]
jge 0x408f9e
movzx ebx, word [esi + ecx*4]
cmp dx, bx
jae 0x408fd0
mov word [esi + edi*4], dx
mov word [esi + eax*4], di
inc eax
cmp ecx, dword [esp + 4]
jge 0x408fdb
cmp eax, edi
jge 0x408f70
mov esi, dword [esp]
movzx edx, word [esi + eax*4]
movzx ebx, word [esi + ecx*4]
cmp dx, bx
jae 0x408f77
jmp 0x408fe2
inc ecx
mov word [esi + edi*4], bx
cmp ecx, dword [esp + 4]
jl 0x408fad
mov esi, dword [esp]
movzx edx, word [esi + eax*4]
add word [esi + edi*4], dx
mov word [esi + eax*4], di
inc eax
jmp 0x408f7c
mov eax, dword [esp + 4]
mov esi, dword [esp]
mov word [esi + eax*4 - 8], 0
cmp eax, 3
jl 0x409081
mov edi, dword [esp + 4]
lea ecx, [edi - 3]
and edi, 3
xor edi, 2
mov eax, ecx
je 0x409031
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esi + eax*4]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4], dx
dec eax
dec edi
jne 0x409020
cmp ecx, 3
jb 0x409081
mov edx, esi
inc eax
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edx + eax*4 - 4]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 4], cx
movzx ecx, word [edx + eax*4 - 8]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 8], cx
movzx ecx, word [edx + eax*4 - 0xc]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0xc], cx
movzx ecx, word [edx + eax*4 - 0x10]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x409040
mov eax, dword [esp + 4]
add eax, 0xfffffffe
mov edx, 1
xor ecx, ecx
mov esi, ebp
jmp 0x4090b0
lea edx, [edi + edi]
inc ecx
test edi, edi
mov ebp, dword [esp + 0x18]
je 0x409172
test eax, eax
js 0x4090e0
mov ebx, edx
mov ebp, esi
lea edi, [eax + 1]
xor edx, edx
nop
nop
nop
mov esi, dword [esp]
movzx esi, word [esi + eax*4]
cmp ecx, esi
jne 0x4090f0
inc edx
dec eax
cmp edi, edx
jne 0x4090c0
mov eax, 0xffffffff
jmp 0x4090f2
xor edi, edi
jmp 0x4090fd
mov edi, edx
mov esi, ebp
mov edx, ebx
mov ebx, dword [esp + 0x15c8]
mov ebp, edx
sub ebp, edi
jle 0x4090a0
and ebp, 3
mov dword [esp + 0x10], edx
je 0x40913c
mov edx, dword [esp]
lea ebx, [edx + esi*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], cx
inc edx
add ebx, 0xfffffffc
cmp ebp, edx
jne 0x409120
mov ebp, dword [esp + 0x10]
sub ebp, edx
sub esi, edx
mov ebx, dword [esp + 0x15c8]
jmp 0x40913e
mov ebp, edx
mov edx, edi
sub edx, dword [esp + 0x10]
cmp edx, 0xfffffffc
mov edx, dword [esp]
ja 0x4090a0
mov word [edx + esi*4], cx
mov word [edx + esi*4 - 4], cx
mov word [edx + esi*4 - 8], cx
mov word [edx + esi*4 - 0xc], cx
add esi, 0xfffffffc
add ebp, 0xfffffffc
cmp ebp, edi
jg 0x409150
jmp 0x4090a0
cmp dword [esp + 4], 0
jle 0x409305
mov eax, dword [esp + 4]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x1c], 3
mov edi, dword [esp]
jb 0x4091ca
mov edx, dword [esp + 4]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x4091a0
test eax, eax
je 0x4091ed
lea ecx, [edi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x2c]
inc edx
cmp eax, edx
jne 0x4091e0
cmp dword [esp + 4], 2
jl 0x409305
cmp ebx, 0x20
jge 0x409260
mov eax, dword [esp + ebx*4 + 0x2c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x40921c
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + ebx*4 + 0x2c], eax
dec edx
jne 0x409210
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x409258
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x3c]
add ecx, 4
mov dword [esp + ebx*4 + 0x2c], eax
cmp ecx, 0x20
jne 0x409230
test ebx, ebx
jle 0x4092f5
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 + 0x28]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x409270
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x409535
jmp 0x409305
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
lea edx, [ebx + eax]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x4092bb
add eax, 2
cmp ecx, eax
je 0x408cef
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4092d6
mov word [esp + edi*4 + 0x4b0], si
mov word [esp + edi*4 + 0x4b2], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x4092b0
mov word [esp + edi*4 + 0x4b0], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0x4b2], si
inc edi
jmp 0x4092b0
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x409535
shl ebp, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.004096a0
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.004096a0
add esp, 0xc
test ebx, ebx
mov edi, dword [esp]
jle 0x40940f
add edi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0xc]
mov dword [esp], edi
jmp 0x409375
mov esi, dword [esp + 4]
mov dword [esp + 4], esi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x40940f
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x409360
mov edx, ecx
and edx, 3
je 0x4093c0
mov esi, dword [esp + 4]
lea ebx, [edi + esi*4]
xor edi, edi
nop
nop
nop
movzx esi, word [ebx]
mov byte [esi + ebp + 0x8f12], al
inc edi
add ebx, 0xfffffffc
cmp edx, edi
jne 0x409390
sub dword [esp + 4], edi
mov edx, ecx
sub edx, edi
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp]
jmp 0x4093c2
mov edx, ecx
cmp ecx, 4
mov esi, dword [esp + 4]
jb 0x409364
dec edx
nop
nop
nop
nop
movzx ecx, word [edi + esi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 0xc]
add esi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x4093d0
jmp 0x409364
mov ecx, dword [esp + 0x15c4]
mov dword [esp + 0x934], 0
cmp ebx, 2
jl 0x40947d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x409437
xor eax, eax
mov edx, 2
jmp 0x409464
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x938], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add edx, 2
cmp ebx, edx
jne 0x409440
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x40947d
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x930], eax
test ecx, ecx
jle 0x40952a
xor eax, eax
mov edx, dword [esp + 0x14]
lea esi, [edx + edx*8]
mov edi, esi
shl edi, 5
mov edx, dword [esp + 0xc]
add edi, edx
mov dword [esp + 0x10], edi
shl esi, 6
add esi, edx
mov dword [esp], esi
jmp 0x4094c7
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x40952a
mov edx, dword [esp + 0x10]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x4094c2
mov edx, dword [esp + ebx*4 + 0x930]
lea ecx, [edx + 1]
mov dword [esp + ebx*4 + 0x930], ecx
xor edi, edi
cmp ebx, 1
je 0x40951d
mov ebp, ebx
and ebp, 0xfffffffe
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, edx
shr edi, 1
mov esi, edx
and esi, 1
add esi, esi
lea ecx, [esi + ecx*4]
and edi, 1
or edi, ecx
shr edx, 2
mov ecx, edi
add ebp, 0xfffffffe
jne 0x409500
test bl, 1
je 0x4094b0
and edx, 1
lea edi, [edx + edi*2]
jmp 0x4094b0
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x2c]
mov ecx, ebx
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x409558
mov edi, dword [esp + ecx*4 + 0x28]
dec ecx
test edi, edi
je 0x409540
dec edi
mov dword [esp + ecx*4 + 0x2c], edi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x409535
jmp 0x409305