Function at 0x3008250
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.03008bd0
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.03008da0
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x1c], ebx
je 0x3008305
test esi, esi
jle 0x3008a49
xor eax, eax
cmp dword [esp + 0x15c4], 1
je 0x30082d8
mov ecx, dword [esp + 0x15c4]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
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 0x30082c0
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x3008a49
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x2c]
jmp 0x3008a49
lea eax, [ebx + ebx*8]
mov dword [esp + 0x18], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], eax
jle 0x30083b9
cmp esi, 1
jne 0x300861d
xor ebx, ebx
xor eax, eax
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x300835e
mov ecx, dword [esp + 0x24]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x300835e
mov word [esp + ebx*4 + 0x4b0], cx
mov word [esp + ebx*4 + 0x4b2], ax
inc ebx
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.03008da0
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xc]
je 0x30083d0
xor eax, eax
movzx ecx, word [esp + eax*4 + 0x4b0]
mov edx, ecx
xor edx, 0x3fffff00
mov esi, ecx
or esi, 0xff
and esi, edx
inc dword [esp + esi*4 + 0x930]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd30]
inc eax
cmp ebx, eax
jne 0x3008380
mov eax, dword [esp + 0xd30]
jmp 0x30083d9
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.03008da0
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xc], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x28], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x10], eax
lea ebp, [esp + 0x4b0]
lea eax, [esp + 0x1130]
xor ecx, ecx
lea esi, [esp + 0x930]
xor edx, edx
mov dword [esp], ebx
jmp 0x3008446
mov edx, dword [esp + 0x20]
inc edx
mov eax, ecx
and eax, 8
xor ecx, 8
lea ecx, [ecx + eax*2]
add esi, 0x400
mov eax, ebp
cmp edx, dword [esp + 0x28]
mov ebp, dword [esp + 8]
je 0x3008547
mov dword [esp + 0x20], edx
mov dword [esp + 8], eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa4], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xa8], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xb0], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x3008460
cmp byte [esp + 0xc], 0
jne 0x3008420
xor edx, edx
cmp ebx, 1
mov edi, ebp
mov ebp, dword [esp + 8]
je 0x300850b
xor edx, edx
mov dword [esp + 4], ecx
movzx eax, word [edi + edx*4]
mov ecx, dword [esp + 4]
shr eax, cl
movzx eax, al
mov ecx, dword [esp + eax*4 + 0xb0]
lea ebx, [ecx + 1]
mov dword [esp + eax*4 + 0xb0], ebx
mov eax, dword [edi + edx*4]
mov dword [ebp + ecx*4], eax
movzx eax, word [edi + edx*4 + 4]
mov ecx, dword [esp + 4]
shr eax, cl
movzx eax, al
mov ecx, dword [esp + eax*4 + 0xb0]
lea ebx, [ecx + 1]
mov dword [esp + eax*4 + 0xb0], ebx
mov eax, dword [edi + edx*4 + 4]
mov dword [ebp + ecx*4], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 4]
add edx, 2
cmp eax, edx
jne 0x30084b0
mov ebx, dword [esp]
test bl, 1
mov ebp, edi
je 0x3008420
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb0]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb0], ebx
mov ebx, dword [esp]
mov eax, dword [ebp + edx*4]
mov edx, dword [esp + 8]
mov dword [edx + edi*4], eax
jmp 0x3008420
test ebx, ebx
je 0x3008907
mov ecx, dword [esp]
cmp ecx, 1
jne 0x3008562
mov word [ebp], 1
jmp 0x300881d
movzx eax, word [ebp + 4]
add word [ebp], ax
cmp ecx, 3
jl 0x3008685
mov eax, 2
mov edx, 2
sub edx, ecx
mov dword [esp + 4], edx
xor esi, esi
mov edx, 1
jmp 0x30085b2
movzx ecx, word [ebx + esi*4]
mov edi, ebx
add word [edi + edx*4], cx
mov word [edi + esi*4], dx
inc esi
mov ebp, edi
mov ecx, dword [esp + 4]
add ecx, edx
inc ecx
inc edx
cmp ecx, 1
je 0x3008691
movzx ecx, word [ebp + esi*4]
mov edi, dword [esp]
cmp eax, edi
mov ebx, ebp
jge 0x30085c9
movzx ebp, word [ebx + eax*4]
cmp cx, bp
jae 0x30085f0
mov word [ebx + edx*4], cx
mov ecx, esi
mov word [ebx + esi*4], dx
and esi, 1
xor ecx, 1
lea esi, [ecx + esi*2]
cmp eax, edi
jge 0x3008590
jmp 0x30085f9
inc eax
mov word [ebx + edx*4], bp
cmp eax, edi
jge 0x3008590
cmp esi, edx
jge 0x3008610
movzx ecx, word [ebx + esi*4]
mov edi, ebx
movzx ebp, word [ebx + eax*4]
cmp cx, bp
jb 0x3008596
jmp 0x3008616
mov edi, ebx
movzx ebp, word [ebx + eax*4]
inc eax
add word [edi + edx*4], bp
jmp 0x300859f
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor ebx, ebx
xor eax, eax
jmp 0x300864b
add eax, 2
cmp ecx, eax
je 0x300832c
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x3008666
mov word [esp + ebx*4 + 0x4b0], si
mov word [esp + ebx*4 + 0x4b2], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x3008640
mov word [esp + ebx*4 + 0x4b0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b2], si
inc ebx
jmp 0x3008640
lea ebx, [ecx - 2]
mov word [ebp + ecx*4 - 8], 0
jmp 0x3008702
mov edx, dword [esp]
mov word [ebp + edx*4 - 8], 0
lea esi, [edx - 3]
mov ecx, esi
test dl, 1
je 0x30086bd
movzx eax, word [ebp + edx*4 - 0xc]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 0xc], ax
lea ecx, [esi + esi]
sub ecx, edx
add ecx, 2
lea ebx, [edx - 2]
test esi, esi
je 0x30086ff
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + ecx*4]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + ecx*4], ax
mov eax, ecx
not eax
lea eax, [eax + ecx*2]
movzx edx, word [ebp + eax*4]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4], dx
add eax, eax
sub eax, ecx
mov ecx, eax
jns 0x30086d0
mov ecx, dword [esp]
dec ecx
mov edi, 1
xor edx, edx
jmp 0x300872a
mov eax, edx
xor eax, 1
and edx, 1
lea edx, [eax + edx*2]
lea edi, [ebx + ebx]
test ebx, ebx
mov ebx, dword [esp + 4]
jle 0x3008813
test ebx, ebx
js 0x3008770
lea eax, [ebx + 1]
mov dword [esp + 0x10], eax
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 8]
movzx eax, word [eax + ebx*4]
cmp edx, eax
jne 0x3008780
inc ebp
add ebx, 0xffffffff
jb 0x3008740
mov dword [esp + 4], 0xffffffff
mov ebp, dword [esp + 8]
mov ebx, dword [esp + 0x10]
jmp 0x300878a
mov dword [esp + 4], ebx
xor ebx, ebx
jmp 0x300878a
mov dword [esp + 4], ebx
mov ebx, ebp
mov ebp, dword [esp + 8]
mov esi, edi
sub esi, ebx
jle 0x3008710
mov eax, ebx
not eax
add eax, edi
mov dword [esp + 0x20], eax
and esi, 3
mov dword [esp + 0xc], esi
je 0x30087d7
mov dword [esp + 0x10], ebx
lea eax, [ecx*4]
add eax, ebp
xor ebp, ebp
mov ebx, dword [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc ebp
add eax, 0xfffffffc
cmp ebx, ebp
jne 0x30087c0
sub ecx, ebp
sub edi, ebp
mov ebp, dword [esp + 8]
mov ebx, dword [esp + 0x10]
cmp dword [esp + 0x20], 3
jb 0x3008710
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp + ecx*4], dx
mov word [ebp + ecx*4 - 4], dx
mov word [ebp + ecx*4 - 8], dx
mov word [ebp + ecx*4 - 0xc], dx
add ecx, 0xfffffffc
add edi, 0xfffffffc
cmp edi, ebx
jg 0x30087f0
jmp 0x3008710
cmp dword [esp], 0
jle 0x3008907
xor eax, eax
mov edx, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebp + eax*4]
inc dword [esp + ecx*4 + 0x2c]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, edx
jl 0x3008830
cmp edx, 2
jl 0x3008907
mov edx, dword [esp + 0x15c8]
cmp edx, 0x20
jge 0x30088bc
mov eax, dword [esp + edx*4 + 0x2c]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x300887c
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + esi*4 + 0x2c], eax
dec edx
jne 0x3008870
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x30088b8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x3c]
add ecx, 4
mov dword [esp + edx*4 + 0x2c], eax
cmp ecx, 0x20
jne 0x3008890
test edx, edx
jle 0x30088f7
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
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 0x30088d0
mov edx, 1
mov ecx, dword [esp + 0x15c8]
shl edx, cl
cmp eax, edx
jne 0x3008b8d
jmp 0x3008907
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x3008b8d
mov ebx, dword [esp + 0x18]
shl ebx, 5
mov edi, dword [esp + 0x14]
mov esi, ebx
lea eax, [edi + ebx]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.03008da0
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.03008da0
add esp, 0xc
cmp dword [esp + 0x15c8], 0
jle 0x3008a45
add ebp, 0xfffffffe
mov eax, 1
mov dword [esp + 8], ebp
mov dword [esp + 0x18], esi
jmp 0x3008990
mov edi, ebp
mov ebp, dword [esp]
mov ebx, esi
mov esi, ebx
mov dword [esp], ebp
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c8]
mov eax, ecx
mov ebp, edi
je 0x3008a45
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x3008970
mov edx, ecx
and edx, 3
je 0x30089e0
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x14]
mov esi, dword [esp]
lea ebp, [ebp + esi*4]
xor esi, esi
movzx edi, word [ebp]
mov ebx, dword [esp + 0x18]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x30089b0
sub dword [esp], esi
mov ecx, dword [esp + 4]
mov edx, ecx
sub edx, esi
mov esi, dword [esp + 0x18]
jmp 0x30089e2
mov edx, ecx
cmp ecx, 4
mov ebp, dword [esp]
mov edi, dword [esp + 8]
mov ebx, esi
jb 0x3008977
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebp*4]
mov esi, dword [esp + 0x14]
add esi, ebx
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebp, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x3008a00
jmp 0x3008977
mov edi, dword [esp + 0x14]
mov dword [esp + 0x934], 0
mov ecx, dword [esp + 0x15c8]
cmp ecx, 2
jl 0x3008ab5
lea eax, [ecx - 1]
cmp ecx, 2
jne 0x3008a75
mov edx, 2
xor ecx, ecx
test al, 1
jne 0x3008aa8
jmp 0x3008ab5
mov ebx, eax
and ebx, 0xfffffffe
xor ecx, ecx
xor edx, edx
nop
nop
add ecx, dword [esp + edx*4 + 0x30]
add ecx, ecx
mov dword [esp + edx*4 + 0x938], ecx
add ecx, dword [esp + edx*4 + 0x34]
add ecx, ecx
mov dword [esp + edx*4 + 0x93c], ecx
add edx, 2
cmp ebx, edx
jne 0x3008a80
add edx, 2
test al, 1
je 0x3008ab5
add ecx, dword [esp + edx*4 + 0x28]
add ecx, ecx
mov dword [esp + edx*4 + 0x930], ecx
cmp dword [esp + 0x15c4], 0
jle 0x3008b82
xor eax, eax
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, edi
shl ecx, 6
add ecx, edi
mov dword [esp + 4], ecx
jmp 0x3008afa
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15c4]
je 0x3008b82
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x3008aec
mov ebp, dword [esp + ecx*4 + 0x930]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x930], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x3008b5f
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ebp
and esi, 1
shl esi, 2
lea esi, [esi + ebx*8]
mov ebx, ebp
and ebx, 2
or ebx, esi
mov esi, ebp
shr esi, 2
and esi, 1
or esi, ebx
mov ebx, ebp
shr ebx, 3
and ebx, 1
lea ebx, [ebx + esi*2]
shr ebp, 4
add ecx, 0xfffffffc
jne 0x3008b30
test edi, edi
je 0x3008ae0
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x3008b70
jmp 0x3008ae0
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15c8]
dec dword [esp + ecx*4 + 0x2c]
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x3008bb8
mov esi, dword [esp + ecx*4 + 0x28]
dec ecx
test esi, esi
je 0x3008ba0
dec esi
mov dword [esp + ecx*4 + 0x2c], esi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x3008b8d
jmp 0x3008907