Function at 0x408ba0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15c0
call fcn.00409680
mov edi, edx
mov ebx, ecx
mov esi, dword [esp + 0x15d4]
lea eax, [esp + 0x3c]
push 0x84
push 0
push eax
call fcn.00409730
add esp, 0xc
cmp dword [esp + 0x15dc], 0
mov dword [esp + 0x14], edi
je 0x408c65
test esi, esi
jle 0x409403
xor eax, eax
cmp dword [esp + 0x15d4], 1
je 0x408c38
mov ecx, dword [esp + 0x15d4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + ebx]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x3c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x3c]
add eax, 2
cmp ecx, eax
jne 0x408c20
mov ecx, dword [esp + 0x15d4]
test cl, 1
je 0x409403
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebx
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x3c]
jmp 0x409403
lea eax, [edi + edi*8]
mov dword [esp + 0x28], eax
mov ebp, eax
shl ebp, 6
test esi, esi
mov dword [esp + 0x10], ebx
jle 0x408d59
cmp esi, 1
jne 0x408fca
mov edi, ebx
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15d4]
test cl, 1
je 0x408cbb
lea ecx, [edi + ebp]
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408cbb
mov word [esp + ebx*4 + 0x4c0], cx
mov word [esp + ebx*4 + 0x4c2], ax
inc ebx
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.00409730
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x408d70
xor eax, eax
cmp ebx, 1
je 0x408d2f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4c0]
movzx esi, dl
inc dword [esp + esi*4 + 0x940]
shr edx, 8
inc dword [esp + edx*4 + 0xd40]
movzx edx, word [esp + eax*4 + 0x4c4]
movzx esi, dl
inc dword [esp + esi*4 + 0x940]
shr edx, 8
inc dword [esp + edx*4 + 0xd40]
add eax, 2
cmp ecx, eax
jne 0x408cf0
test bl, 1
je 0x408d50
movzx eax, word [esp + eax*4 + 0x4c0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x940]
shr eax, 8
inc dword [esp + eax*4 + 0xd40]
mov eax, dword [esp + 0xd40]
jmp 0x408d79
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.00409730
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x24], ebp
xor ecx, ecx
cmp eax, ebx
setne cl
inc ecx
mov dword [esp + 0x38], ecx
lea eax, [ebx - 1]
mov dword [esp + 0x18], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x20], eax
lea eax, [esp + 0x4c0]
mov dword [esp], eax
lea edx, [esp + 0x1140]
xor ecx, ecx
lea eax, [esp + 0x940]
xor edi, edi
mov dword [esp + 8], ebx
jmp 0x408dd5
inc edi
add ecx, 8
add eax, 0x400
mov edx, esi
cmp edi, dword [esp + 0x38]
je 0x408eff
mov dword [esp + 0x1c], edi
mov esi, dword [esp]
mov dword [esp], edx
mov ebp, 3
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + ebp*4 + 0xb4], edx
add edx, dword [eax + ebp*4 - 0xc]
mov dword [esp + ebp*4 + 0xb8], edx
add edx, dword [eax + ebp*4 - 8]
mov dword [esp + ebp*4 + 0xbc], edx
add edx, dword [eax + ebp*4 - 4]
mov dword [esp + ebp*4 + 0xc0], edx
add edx, dword [eax + ebp*4]
add ebp, 4
cmp ebp, 0x103
jne 0x408df0
cmp byte [esp + 7], 0
mov edi, dword [esp + 0x1c]
jne 0x408dc0
mov dword [esp + 0x34], eax
mov dword [esp + 0xc], esi
cmp dword [esp + 0x18], 0
je 0x408ea4
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0xc]
movzx edx, word [eax + ebp*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xc0]
lea edi, [ebx + 1]
mov dword [esp + edx*4 + 0xc0], edi
mov edx, dword [eax + ebp*4]
mov esi, dword [esp]
mov dword [esi + ebx*4], edx
movzx edx, word [eax + ebp*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xc0]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xc0], ebx
mov edx, dword [eax + ebp*4 + 4]
mov dword [esi + edi*4], edx
add ebp, 2
cmp dword [esp + 0x20], ebp
jne 0x408e50
jmp 0x408ea6
xor ebp, ebp
mov ebx, dword [esp + 8]
test bl, 1
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x34]
je 0x408dc0
movzx edx, word [esi + ebp*4]
shr edx, cl
movzx edx, dl
mov dword [esp + 0x2c], edx
mov edx, dword [esp + edx*4 + 0xc0]
mov dword [esp + 0x30], edx
lea ebx, [edx + 1]
mov edx, dword [esp + 0x2c]
mov dword [esp + edx*4 + 0xc0], ebx
mov ebx, dword [esp + 8]
mov edx, dword [esi + ebp*4]
mov esi, dword [esp]
mov ebp, dword [esp + 0x30]
mov dword [esi + ebp*4], edx
mov esi, dword [esp + 0xc]
jmp 0x408dc0
test ebx, ebx
je 0x4092e5
mov edx, dword [esp + 8]
cmp edx, 1
jne 0x408f1d
mov eax, dword [esp]
mov word [eax], 1
jmp 0x4091bd
mov ebp, dword [esp]
movzx eax, word [ebp + 4]
add word [ebp], ax
cmp edx, 3
jl 0x409035
mov eax, 2
mov ecx, 2
sub ecx, edx
xor edx, edx
mov esi, 1
jmp 0x408f69
movzx ebx, word [edi + eax*4]
inc eax
add word [edi + esi*4], bx
mov ebp, edi
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
je 0x409044
movzx ebx, word [ebp + edx*4]
cmp eax, dword [esp + 8]
mov edi, ebp
jge 0x408f7f
movzx ebp, word [edi + eax*4]
cmp bx, bp
jae 0x408fb0
mov word [edi + esi*4], bx
mov word [edi + edx*4], si
inc edx
cmp eax, dword [esp + 8]
jge 0x408fbb
cmp edx, esi
jge 0x408f50
movzx ebp, word [edi + edx*4]
movzx ebx, word [edi + eax*4]
cmp bp, bx
jae 0x408f54
jmp 0x408fbf
inc eax
mov word [edi + esi*4], bp
cmp eax, dword [esp + 8]
jl 0x408f8e
movzx ebp, word [edi + edx*4]
add word [edi + esi*4], bp
mov word [edi + edx*4], si
inc edx
jmp 0x408f59
mov ecx, esi
and ecx, 0x7ffffffe
mov edi, ebx
lea edx, [ebx + ebp]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x408ffb
add eax, 2
cmp ecx, eax
je 0x408c8c
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x409016
mov word [esp + ebx*4 + 0x4c0], si
mov word [esp + ebx*4 + 0x4c2], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x408ff0
mov word [esp + ebx*4 + 0x4c0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4c2], si
inc ebx
jmp 0x408ff0
lea ecx, [edx - 2]
mov word [ebp + edx*4 - 8], 0
jmp 0x4090c5
mov edi, dword [esp + 8]
mov word [ebp + edi*4 - 8], 0
lea edx, [edi - 3]
mov ecx, edi
and ecx, 3
xor ecx, 2
mov eax, edx
je 0x409074
mov eax, edx
movzx esi, word [ebp + eax*4]
movzx esi, word [ebp + esi*4]
inc esi
mov word [ebp + eax*4], si
dec eax
dec ecx
jne 0x409060
lea ecx, [edi - 2]
cmp edx, 3
jb 0x4090c5
inc eax
nop
nop
nop
movzx edx, word [ebp + eax*4 - 4]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 4], dx
movzx edx, word [ebp + eax*4 - 8]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 8], dx
movzx edx, word [ebp + eax*4 - 0xc]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 0xc], dx
movzx edx, word [ebp + eax*4 - 0x10]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x409080
mov ebx, 1
xor edx, edx
mov esi, dword [esp + 0x18]
jmp 0x409106
mov eax, edi
and eax, 2
mov ebp, edi
or ebp, 2
imul ebp, eax
xor eax, 2
and edi, 0x7ffffffd
imul edi, eax
add ebp, edi
inc edx
mov ebx, ebp
test ebp, ebp
jle 0x4091b2
test ecx, ecx
js 0x409130
lea edi, [ecx + 1]
xor ebp, ebp
nop
mov eax, dword [esp]
movzx eax, word [eax + ecx*4]
cmp edx, eax
jne 0x409140
inc ebp
dec ecx
cmp edi, ebp
jne 0x409110
mov ecx, 0xffffffff
jmp 0x409142
xor edi, edi
jmp 0x409142
mov edi, ebp
mov ebp, ebx
sub ebp, edi
jle 0x4090e0
and ebp, 3
je 0x409179
mov dword [esp + 0xc], ebx
mov eax, dword [esp]
lea eax, [eax + esi*4]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc ebx
add eax, 0xfffffffc
cmp ebp, ebx
jne 0x409160
mov eax, dword [esp + 0xc]
mov ebp, eax
sub ebp, ebx
sub esi, ebx
mov ebx, eax
jmp 0x40917b
mov ebp, ebx
mov eax, edi
sub eax, ebx
cmp eax, 0xfffffffc
mov eax, dword [esp]
ja 0x4090e0
nop
nop
nop
nop
nop
mov word [eax + esi*4], dx
mov word [eax + esi*4 - 4], dx
mov word [eax + esi*4 - 8], dx
mov word [eax + esi*4 - 0xc], dx
add esi, 0xfffffffc
add ebp, 0xfffffffc
cmp ebp, edi
jg 0x409190
jmp 0x4090e0
cmp dword [esp + 8], 0
jle 0x4092e5
cmp dword [esp + 0x18], 0
je 0x40956d
xor eax, eax
mov ebx, dword [esp + 8]
mov edi, dword [esp]
mov ebp, dword [esp + 0x20]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4]
mov edx, dword [esp + ecx*4 + 0x3c]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + ecx*4 + 0x3c], edx
movzx ecx, word [edi + eax*4 + 4]
mov edx, dword [esp + ecx*4 + 0x3c]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + ecx*4 + 0x3c], edx
add eax, 2
cmp ebp, eax
jne 0x4091e0
test bl, 1
je 0x409232
movzx eax, word [edi + eax*4]
mov ecx, dword [esp + eax*4 + 0x3c]
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
mov dword [esp + eax*4 + 0x3c], ecx
cmp ebx, 2
jl 0x4092e5
mov edx, dword [esp + 0x15d8]
cmp edx, 0x20
jge 0x4092b0
mov eax, dword [esp + edx*4 + 0x3c]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x40926c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x40]
inc ecx
mov dword [esp + esi*4 + 0x3c], eax
dec edx
jne 0x409260
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x4092a8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x40]
mov dword [esp + edx*4 + 0x3c], eax
add eax, dword [esp + ecx*4 + 0x44]
mov dword [esp + edx*4 + 0x3c], eax
add eax, dword [esp + ecx*4 + 0x48]
mov dword [esp + edx*4 + 0x3c], eax
add eax, dword [esp + ecx*4 + 0x4c]
add ecx, 4
mov dword [esp + edx*4 + 0x3c], eax
cmp ecx, 0x20
jne 0x409280
test edx, edx
jle 0x409584
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 + 0x38]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x4092c0
mov edx, 1
mov ecx, dword [esp + 0x15d8]
shl edx, cl
cmp eax, edx
jne 0x40958f
mov ebp, dword [esp + 0x28]
shl ebp, 5
mov edi, dword [esp + 0x10]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00409730
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00409730
add esp, 0xc
cmp dword [esp + 0x15d8], 0
mov edi, dword [esp + 8]
mov ebx, dword [esp]
jle 0x4093ff
add ebx, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0x10]
mov dword [esp], ebx
jmp 0x409362
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d8]
mov eax, ecx
je 0x4093ff
mov ecx, dword [esp + eax*4 + 0x3c]
test ecx, ecx
jle 0x409350
mov edx, ecx
and edx, 3
je 0x4093b0
mov dword [esp + 8], edi
lea ebx, [ebx + edi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
movzx edi, word [ebx]
mov byte [edi + ebp + 0x8f12], al
inc esi
add ebx, 0xfffffffc
cmp edx, esi
jne 0x409380
mov edi, dword [esp + 8]
sub edi, esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp]
cmp ecx, 4
jb 0x409350
jmp 0x4093b7
mov edx, ecx
cmp ecx, 4
jb 0x409350
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebx + edi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 0xc]
add edi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x4093c0
jmp 0x409350
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x944], 0
mov eax, dword [esp + 0x15d8]
cmp eax, 2
jl 0x409493
lea edx, [eax - 1]
cmp eax, 2
jne 0x40942b
xor eax, eax
mov ecx, 2
jmp 0x409470
mov esi, edx
and esi, 0xfffffffe
neg esi
xor eax, eax
mov ecx, 2
nop
nop
nop
nop
nop
nop
nop
mov edi, ecx
and edi, 0x3ffffffe
add eax, dword [esp + edi*4 + 0x38]
add eax, eax
mov dword [esp + ecx*4 + 0x940], eax
add eax, dword [esp + edi*4 + 0x3c]
add eax, eax
mov dword [esp + ecx*4 + 0x944], eax
lea edi, [esi + ecx]
add edi, 2
add ecx, 2
cmp edi, 2
jne 0x409440
test dl, 1
je 0x409493
mov edx, ecx
not edx
and edx, 1
mov esi, ecx
and esi, 0x3ffffffe
sub esi, edx
add eax, dword [esp + esi*4 + 0x3c]
add eax, eax
mov dword [esp + ecx*4 + 0x940], eax
mov ecx, dword [esp + 0x15d4]
test ecx, ecx
jle 0x409562
xor eax, eax
mov edx, dword [esp + 0x14]
lea esi, [edx + edx*8]
mov edx, esi
shl edx, 5
add edx, ebx
shl esi, 6
add esi, ebx
mov dword [esp], esi
jmp 0x4094db
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15d4]
inc eax
cmp eax, ecx
je 0x409562
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x4094d2
mov ecx, dword [esp + ebx*4 + 0x940]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x940], edi
xor edi, edi
cmp bl, 4
jb 0x40953f
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
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 0x409510
and ebx, 3
je 0x4094c0
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 0x409550
jmp 0x4094c0
add esp, 0x15c0
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
mov ebx, dword [esp + 8]
mov edi, dword [esp]
test bl, 1
jne 0x40921b
jmp 0x409232
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov ecx, dword [esp + 0x15d8]
lea edi, [ecx - 1]
lea esi, [ecx*2 - 2]
jmp 0x4095c3
dec ecx
mov dword [esp + ebp*2 + 0x3c], ecx
add dword [esp + ebp*2 + 0x40], 2
dec eax
cmp eax, edx
je 0x4092e5
mov ecx, dword [esp + 0x15d8]
dec dword [esp + ecx*4 + 0x3c]
cmp ecx, 2
jl 0x4095ba
mov ebx, edi
mov ebp, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + ebp*2 + 0x3c]
test ecx, ecx
jne 0x4095b0
add ebp, 0xfffffffe
dec ebx
test ebx, ebx
jg 0x4095e0
jmp 0x4095ba