Function at 0x408bf0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.004095d0
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.00409680
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x10], edi
je 0x408cbe
test esi, esi
mov ecx, esi
jle 0x4093c6
xor eax, eax
cmp ecx, 1
je 0x408c88
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x10]
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 0x408c70
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x4093c6
mov ecx, dword [esp + 0x10]
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 0x4093c6
lea eax, [edi + edi*8]
mov dword [esp + 0x20], eax
mov ebp, eax
shl ebp, 6
test esi, esi
mov dword [esp + 0x1c], ebp
jle 0x408db9
cmp esi, 1
jne 0x409242
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x408d15
mov ecx, dword [esp + 0xc]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408d15
mov word [esp + ebx*4 + 0xb0], cx
mov word [esp + ebx*4 + 0xb2], ax
inc ebx
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.00409680
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xb]
je 0x408dd0
xor eax, eax
cmp ebx, 1
je 0x408d8f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x530]
shr edx, 8
inc dword [esp + edx*4 + 0x930]
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x530]
shr edx, 8
inc dword [esp + edx*4 + 0x930]
add eax, 2
cmp ecx, eax
jne 0x408d50
test bl, 1
je 0x408db0
movzx eax, word [esp + eax*4 + 0xb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x530]
shr eax, 8
inc dword [esp + eax*4 + 0x930]
mov eax, dword [esp + 0x930]
jmp 0x408dd9
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.00409680
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xb], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
setne cl
inc ecx
mov dword [esp + 0x28], ecx
lea eax, [ebx - 1]
mov dword [esp + 0x18], eax
mov dword [esp], ebx
and ebx, 0xfffffffe
mov dword [esp + 4], ebx
lea esi, [esp + 0xb0]
lea eax, [esp + 0x1130]
xor ecx, ecx
xor edx, edx
jmp 0x408e24
mov edx, dword [esp + 0x14]
inc edx
add ecx, 8
mov eax, edi
cmp edx, dword [esp + 0x28]
je 0x408ef8
mov edi, esi
mov esi, eax
mov dword [esp + 0x14], edx
mov eax, edx
shl eax, 0xa
lea ebp, [esp + eax]
add ebp, 0x530
xor edx, edx
xor eax, eax
nop
nop
mov dword [esp + eax*4 + 0xd30], edx
mov ebx, eax
add edx, dword [ebp + eax*4]
xor eax, 1
and ebx, 1
lea ebx, [eax + ebx*2]
mov eax, ebx
cmp ebx, 0x100
jb 0x408e40
cmp byte [esp + 0xb], 0
jne 0x408e10
cmp dword [esp + 0x18], 0
je 0x408ec7
xor ebp, ebp
movzx eax, word [edi + ebp*4]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xd30]
lea ebx, [edx + 1]
mov dword [esp + eax*4 + 0xd30], ebx
mov eax, dword [edi + ebp*4]
mov dword [esi + edx*4], eax
movzx eax, word [edi + ebp*4 + 4]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xd30]
lea ebx, [edx + 1]
mov dword [esp + eax*4 + 0xd30], ebx
mov eax, dword [edi + ebp*4 + 4]
mov dword [esi + edx*4], eax
add ebp, 2
cmp dword [esp + 4], ebp
jne 0x408e70
test byte [esp], 1
je 0x408e10
jmp 0x408ed3
xor ebp, ebp
test byte [esp], 1
je 0x408e10
movzx eax, word [edi + ebp*4]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xd30]
lea ebx, [edx + 1]
mov dword [esp + eax*4 + 0xd30], ebx
mov eax, dword [edi + ebp*4]
mov dword [esi + edx*4], eax
jmp 0x408e10
cmp dword [esp], 0
mov ebx, dword [esp + 0x15c8]
je 0x4092b5
mov ecx, dword [esp]
cmp ecx, 1
jne 0x408f1b
mov word [esi], 1
jmp 0x40912c
movzx eax, word [esi + 4]
add word [esi], ax
mov eax, ecx
not eax
and eax, 1
mov ecx, dword [esp + 4]
sub ecx, eax
mov dword [esp + 4], ecx
cmp ecx, 2
jl 0x408fb9
xor eax, eax
mov ecx, 2
mov edi, 1
jmp 0x408f60
movzx edx, word [esi + ecx*4]
inc ecx
add word [esi + edi*4], dx
inc edi
cmp dword [esp + 4], edi
je 0x408fb9
movzx edx, word [esi + eax*4]
cmp ecx, dword [esp]
jge 0x408f72
movzx ebp, word [esi + ecx*4]
cmp dx, bp
jae 0x408fa0
mov word [esi + edi*4], dx
mov word [esi + eax*4], di
inc eax
cmp ecx, dword [esp]
jge 0x408faa
cmp eax, edi
jge 0x408f50
movzx ebp, word [esi + eax*4]
movzx edx, word [esi + ecx*4]
cmp bp, dx
jae 0x408f54
jmp 0x408fae
inc ecx
mov word [esi + edi*4], bp
cmp ecx, dword [esp]
jl 0x408f80
movzx ebp, word [esi + eax*4]
add word [esi + edi*4], bp
mov word [esi + eax*4], di
inc eax
jmp 0x408f59
mov eax, dword [esp]
mov word [esi + eax*4 - 8], 0
cmp eax, 3
mov edi, dword [esp + 4]
jl 0x409029
mov edx, dword [esp]
lea ecx, [edx - 3]
mov eax, ecx
test dl, 1
je 0x408ff3
mov edx, dword [esp]
movzx eax, word [esi + edx*4 - 0xc]
movzx eax, word [esi + eax*4]
inc eax
mov word [esi + edx*4 - 0xc], ax
lea eax, [ecx + ecx]
sub eax, edx
add eax, 2
test ecx, ecx
je 0x409029
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esi + eax*4]
movzx ecx, word [esi + ecx*4]
inc ecx
mov word [esi + eax*4], cx
mov ecx, eax
not ecx
lea ecx, [ecx + eax*2]
movzx edx, word [esi + ecx*4]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + ecx*4], dx
add ecx, ecx
sub ecx, eax
mov eax, ecx
jns 0x409000
mov eax, dword [esp]
add eax, 0xfffffffe
mov ebp, 1
xor ecx, ecx
mov dword [esp + 0x24], esi
jmp 0x40904c
lea ebp, [edx + edx]
inc ecx
test edx, edx
jle 0x409122
test eax, eax
mov dword [esp + 4], ebp
js 0x409080
mov ebp, esi
mov esi, edi
lea ebx, [eax + 1]
xor edx, edx
nop
nop
nop
movzx edi, word [ebp + eax*4]
cmp ecx, edi
jne 0x409090
inc edx
dec eax
cmp ebx, edx
jne 0x409060
mov eax, 0xffffffff
mov edi, esi
mov esi, ebp
mov edx, ebx
jmp 0x409094
xor edx, edx
sub ebp, edx
jle 0x409040
jmp 0x4090a3
mov edi, esi
mov esi, ebp
mov ebx, dword [esp + 0x15c8]
mov ebp, dword [esp + 4]
sub ebp, edx
jle 0x409040
and ebp, 3
je 0x4090df
mov dword [esp + 0x14], edx
mov edx, esi
mov esi, edi
lea edi, [edx + edi*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], cx
inc edx
add edi, 0xfffffffc
cmp ebp, edx
jne 0x4090c0
mov ebp, dword [esp + 4]
sub ebp, edx
mov edi, esi
sub edi, edx
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
jmp 0x4090e3
mov ebp, dword [esp + 4]
mov ebx, edx
sub edx, dword [esp + 4]
cmp edx, 0xfffffffc
mov edx, ebx
mov ebx, dword [esp + 0x15c8]
ja 0x409040
nop
nop
nop
nop
nop
mov word [esi + edi*4], cx
mov word [esi + edi*4 - 4], cx
mov word [esi + edi*4 - 8], cx
mov word [esi + edi*4 - 0xc], cx
add edi, 0xfffffffc
add ebp, 0xfffffffc
cmp ebp, edx
jg 0x409100
jmp 0x409040
cmp dword [esp], 0
jle 0x4092b5
mov eax, dword [esp]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
jb 0x40917a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [esi + ecx*4]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 4]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 8]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 0xc]
inc dword [esp + edi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x409150
test eax, eax
je 0x40919d
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 + 0x2c]
inc edx
cmp eax, edx
jne 0x409190
cmp dword [esp], 2
jl 0x4092b5
cmp ebx, 0x20
jge 0x409210
mov eax, dword [esp + ebx*4 + 0x2c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x4091cc
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + ebx*4 + 0x2c], eax
dec edx
jne 0x4091c0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x409208
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 0x4091e0
test ebx, ebx
jle 0x4092a5
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + edx*4 + 0x28]
shl edi, cl
add eax, edi
dec edx
inc ecx
cmp edx, 1
ja 0x409220
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x40950d
jmp 0x4092b5
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x40926b
add eax, 2
cmp ecx, eax
je 0x408ce3
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x409286
mov word [esp + ebx*4 + 0xb0], si
mov word [esp + ebx*4 + 0xb2], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x409260
mov word [esp + ebx*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0xb2], si
inc ebx
jmp 0x409260
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x40950d
mov ebp, dword [esp + 0x20]
shl ebp, 5
mov edi, dword [esp + 0xc]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00409680
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, edi
add eax, 0x8852
mov edi, ebp
push 0x240
push 0
push eax
call fcn.00409680
add esp, 0xc
test ebx, ebx
jle 0x4093bf
add esi, 0xfffffffe
mov eax, 1
add edi, dword [esp + 0xc]
jmp 0x409323
mov ebp, dword [esp]
mov dword [esp], ebp
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x4093bf
mov ebp, dword [esp + eax*4 + 0x2c]
test ebp, ebp
jle 0x409310
mov edx, ebp
and edx, 3
je 0x409370
mov dword [esp + 4], ebp
mov ecx, dword [esp]
lea ebp, [esi + ecx*4]
mov ecx, edi
xor edi, edi
movzx ebx, word [ebp]
mov byte [ebx + ecx + 0x8f12], al
inc edi
add ebp, 0xfffffffc
cmp edx, edi
jne 0x409340
sub dword [esp], edi
mov ebp, dword [esp + 4]
mov edx, ebp
sub edx, edi
mov ebx, dword [esp + 0x15c8]
mov edi, ecx
jmp 0x409372
mov edx, ebp
cmp ebp, 4
mov ebp, dword [esp]
jb 0x409313
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [esi + ebp*4]
mov byte [ecx + edi + 0x8f12], al
movzx ecx, word [esi + ebp*4 - 4]
mov byte [ecx + edi + 0x8f12], al
movzx ecx, word [esi + ebp*4 - 8]
mov byte [ecx + edi + 0x8f12], al
movzx ecx, word [esi + ebp*4 - 0xc]
add ebp, 0xfffffffc
mov byte [ecx + edi + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x409380
jmp 0x409313
mov ecx, dword [esp + 0x15c4]
mov dword [esp + 0x534], 0
cmp ebx, 2
jl 0x40942d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x4093e7
xor eax, eax
mov edx, 2
jmp 0x409414
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 + 0x538], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x53c], eax
add edx, 2
cmp ebx, edx
jne 0x4093f0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x40942d
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x530], eax
test ecx, ecx
jle 0x409502
xor eax, eax
mov edx, dword [esp + 0x10]
lea edi, [edx + edx*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0xc]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 4], edi
jmp 0x40947c
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x409502
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x409473
mov ecx, dword [esp + ebx*4 + 0x530]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x530], edi
xor edi, edi
cmp bl, 4
jb 0x4094df
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, ecx
and edi, 2
or edi, esi
mov esi, ecx
shr esi, 2
and esi, 1
or esi, edi
mov edi, ecx
shr edi, 3
and edi, 1
lea edi, [edi + esi*2]
shr ecx, 4
add ebp, 0xfffffffc
jne 0x4094b0
and ebx, 3
je 0x409460
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
lea edi, [esi + edi*2]
shr ecx, 1
dec ebx
jne 0x4094f0
jmp 0x409460
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
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x409538
mov edi, dword [esp + ecx*4 + 0x28]
dec ecx
test edi, edi
je 0x409520
dec edi
mov dword [esp + ecx*4 + 0x2c], edi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x40950d
jmp 0x4092b5