Function at 0x101192b
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
push edi
pushfd
push ebp
mov ebp, esp
sub esp, 0x154
mov dword [ebp - 0x144], eax
lea eax, [ebp + 4]
sub eax, 4
mov dword [ebp - 0x148], ecx
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x154], esi
lea esi, [eax + 0xc]
mov dword [ebp - 0x14c], edi
mov ecx, 0xfffffff
mov dword [ebp - 0xec], eax
mov eax, dword [esi]
mov ebx, dword [eax]
mov dword [ebp - 0x78], eax
shr ebx, 2
mov eax, dword [eax + 4]
and eax, ecx
and ebx, ecx
xor edx, edx
mov ecx, dword [0x10068a4]
mov dword [ebp - 0x74], ecx
lea ecx, [eax + ecx - 1]
mov eax, ecx
div dword [ebp - 0x74]
mov edi, 0x1000000
add ebx, edi
mov eax, dword [0x10068a4]
mov dword [ebp - 0xc8], esi
sub ecx, edx
mov dword [ebp - 0xcc], ebx
mov dword [ebp - 0x7c], ecx
mov eax, dword [0x1050160]
mov dword [ebp - 0x84], eax
mov eax, dword [0x10068a4]
mov eax, dword [0x1050160]
test eax, eax
je 0x1011a68
and dword [ebp - 0x70], 0
mov eax, dword [0x1050160]
dec eax
lea ecx, [eax + 1]
mov dword [ebp - 0x5c], ecx
xor eax, eax
test ecx, ecx
je 0x1011a0b
mov edx, dword [0x107a468]
shr dword [ebp - 0x5c], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x107a468], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x5c], 0
jne 0x10119e1
xor edx, edx
div ecx
cmp dword [ebp - 0x84], 0
mov dword [ebp - 0x5c], edx
jbe 0x1011a5a
mov ecx, 0xffff16be
lea edx, [edx*4 + 0x107a47c]
inc dword [ebp - 0x70]
mov eax, 0xe941
lock cmpxchg dword [edx], ecx
cmp eax, 0xe941
je 0x1011c28
mov eax, dword [ebp - 0x5c]
mov ecx, dword [0x1050160]
inc eax
xor edx, edx
div ecx
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x5c], edx
cmp eax, dword [ebp - 0x84]
jb 0x1011a1b
and dword [ebp - 0x60], 0
cmp dword [ebp - 0x60], 0
jne 0x1011af3
call dword [0x100108c]
and dword [ebp - 0x5c], 0
mov dword [ebp - 0x74], eax
inc dword [ebp - 0x5c]
push 0x40
push 0x1000
push dword [ebp - 0x7c]
push 0
call dword [0x1001064]
test eax, eax
jne 0x1011c3f
push eax
call dword [0x100104c]
cmp dword [ebp - 0x5c], 0x11
jb 0x1011a75
and dword [ebp - 0x60], 0
cmp dword [ebp - 0x60], 0x10000
jb 0x1011ab5
test dword [ebp - 0x60], 3
je 0x1011acf
cmp dword [ebp - 0x60], 0
je 0x1011acb
push 0x8000
push 0
push dword [ebp - 0x60]
call dword [0x1001054]
and dword [ebp - 0x60], 0
push dword [ebp - 0x74]
call dword [0x1001060]
cmp dword [ebp - 0x60], 0
je 0x10119ae
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
mov eax, dword [ebp - 0x60]
je 0x1011af3
mov byte [eax], 0
inc eax
dec ecx
jne 0x1011aec
mov eax, 0xfe969f03
mov eax, dword [ebp - 0x78]
add dword [esi], 8
mov esi, dword [eax + 4]
and esi, 0xfffffff
lea eax, [esi + ebx]
mov dword [ebp - 0x74], eax
mov eax, dword [0x10068a4]
sub eax, esi
mov dword [ebp - 0x80], ebx
sub dword [ebp - 0x80], edi
mov dword [ebp - 0x78], esi
lea ecx, [eax + 1]
xor eax, eax
mov edx, ecx
test ecx, ecx
je 0x1011b4f
mov ebx, dword [0x107a468]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x107a468], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x1011b28
xor edx, edx
div ecx
mov eax, dword [ebp - 0x60]
push esi
push dword [ebp - 0x80]
lea ebx, [edx + eax]
mov dword [ebp - 0x70], ebx
mov eax, ebx
mov eax, 0x91ef6e60
mov eax, dword [ebp - 0x74]
test esi, esi
pop ecx
pop ecx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0xf4], ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x7c], eax
mov ebx, 0xfffff000
je 0x101225c
lea esi, [ebp - 0xf4]
mov eax, 0xbb729c86
mov eax, dword [ebp - 0xf0]
mov ecx, 0xfffffff
mov esi, dword [ebp - 0xf4]
and dword [ebp - 0x68], 0
and dword [ebp - 0x64], 0
and eax, ecx
and esi, ecx
add esi, edi
mov ecx, dword [0x10062b0]
mov dword [ebp - 0x5c], eax
mov eax, edi
sub eax, ecx
mov dword [ebp - 0xfc], eax
jne 0x1011c47
xor edi, edi
cmp dword [ebp - 0x5c], edi
jbe 0x1011e69
mov ecx, 0x637ce67c
movzx edx, byte [edi + esi]
add edx, ecx
add dword [ebp - 0x68], edx
add edx, dword [ebp - 0x64]
mov eax, edx
imul eax, eax, 0x3041
rol eax, 0xc
ror edx, 0xc
xor eax, edx
mov edx, ecx
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
inc edi
cmp edi, dword [ebp - 0x5c]
jb 0x1011bef
jmp 0x1011e69
mov eax, dword [0x10068a4]
imul eax, dword [ebp - 0x5c]
lea eax, [eax + 0x1070008]
mov dword [ebp - 0x60], eax
jmp 0x1011a5e
mov dword [ebp - 0x60], eax
jmp 0x1011aa3
mov ecx, esi
mov edx, dword [0x100003c]
mov eax, dword [ebp - 0x5c]
add eax, esi
mov dword [ebp - 0xd4], eax
lea edx, [edx + 0x10000a0]
mov eax, dword [edx]
add eax, edi
mov edx, dword [edx + 4]
sub ecx, edi
mov edi, ecx
and edi, ebx
mov dword [ebp - 0x6c], edi
mov edi, ecx
sub edi, dword [ebp - 0x6c]
add edx, eax
mov dword [ebp - 0xd0], edi
mov edi, dword [ebp - 0x5c]
add ecx, edi
mov edi, ecx
and edi, ebx
sub ecx, edi
cmp eax, edx
mov dword [ebp - 0xe8], edi
mov dword [ebp - 0xe4], ecx
mov ebx, eax
mov dword [ebp - 0xe0], edx
je 0x1011cb2
mov eax, dword [ebp - 0x6c]
cmp dword [ebx], eax
jae 0x1011cb2
add ebx, dword [ebx + 4]
cmp ebx, dword [ebp - 0xe0]
jne 0x1011ca0
and dword [ebp - 0xd8], 0
mov edx, 0xfff
cmp ebx, dword [ebp - 0xe0]
je 0x1011cf7
mov eax, dword [ebp - 0x6c]
cmp dword [ebx], eax
jne 0x1011cf7
mov eax, dword [ebx + 4]
sub eax, 8
shr eax, 1
je 0x1011cf7
lea ecx, [ebx + 8]
movzx edi, word [ecx]
and edi, edx
cmp edi, dword [ebp - 0xd0]
jae 0x1011cf7
inc dword [ebp - 0xd8]
inc ecx
inc ecx
cmp dword [ebp - 0xd8], eax
jne 0x1011cda
mov ecx, 0x637ce67c
cmp ebx, dword [ebp - 0xe0]
je 0x1011e2a
mov eax, dword [ebx]
cmp eax, dword [ebp - 0xe8]
ja 0x1011e2a
mov edi, dword [ebp - 0xd8]
mov eax, dword [ebx + 4]
add eax, 0xfffffff8
shr eax, 1
cmp edi, eax
jne 0x1011d49
add ebx, dword [ebx + 4]
cmp ebx, dword [ebp - 0xe0]
je 0x1011e2a
mov eax, dword [ebp - 0xe8]
cmp dword [ebx], eax
ja 0x1011e2a
xor edi, edi
jmp 0x1011d1c
mov eax, dword [ebp - 0xe8]
cmp dword [ebx], eax
jne 0x1011d66
movzx eax, word [ebx + edi*2 + 8]
and eax, edx
cmp eax, dword [ebp - 0xe4]
jae 0x1011e2a
mov eax, edi
inc edi
mov dword [ebp - 0xd8], edi
mov edi, 0xf000
test word [ebx + eax*2 + 8], di
je 0x1011cfc
movzx eax, word [ebx + eax*2 + 8]
and eax, edx
xor edi, edi
mov edx, dword [ebx]
lea eax, [eax + edx + 0x1000000]
mov dword [ebp - 0x6c], eax
sub dword [ebp - 0x6c], esi
mov dword [ebp - 0xd0], eax
je 0x1011dcf
movzx edx, byte [edi + esi]
add edx, ecx
add dword [ebp - 0x68], edx
add edx, dword [ebp - 0x64]
mov eax, edx
imul eax, eax, 0x3041
rol eax, 0xc
ror edx, 0xc
xor eax, edx
mov edx, ecx
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x68], eax
inc edi
mov dword [ebp - 0x64], eax
cmp edi, dword [ebp - 0x6c]
jb 0x1011d9b
mov esi, dword [ebp - 0xd0]
mov eax, dword [esi]
sub eax, dword [ebp - 0xfc]
xor edi, edi
mov dword [ebp - 0xf8], eax
movzx edx, byte [ebp + edi - 0xf8]
add edx, ecx
add dword [ebp - 0x68], edx
add edx, dword [ebp - 0x64]
mov eax, edx
imul eax, eax, 0x3041
rol eax, 0xc
ror edx, 0xc
xor eax, edx
mov edx, ecx
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
inc edi
cmp edi, 4
jb 0x1011de5
mov edx, 0xfff
add esi, 4
jmp 0x1011cfc
mov ebx, dword [ebp - 0xd4]
xor edi, edi
sub ebx, esi
je 0x1011e69
movzx edx, byte [edi + esi]
add edx, ecx
add dword [ebp - 0x68], edx
add edx, dword [ebp - 0x64]
mov eax, edx
imul eax, eax, 0x3041
rol eax, 0xc
ror edx, 0xc
xor eax, edx
mov edx, ecx
mul edx
add eax, edx
mov edx, ecx
mul edx
add eax, edx
add dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
inc edi
cmp edi, ebx
jb 0x1011e36
xor edi, edi
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x68]
mov byte [ebp + eax - 0x54], cl
inc eax
cmp eax, 0x10
jb 0x1011e6d
mov eax, 0x545c65ad
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x110], eax
mov eax, dword [0x10064ec]
mov dword [ebp - 0x13c], eax
mov eax, dword [0x10064f0]
mov dword [ebp - 0x128], eax
mov eax, dword [0x10064f4]
mov dword [ebp - 0x114], eax
mov eax, dword [0x10064f8]
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x134], ecx
mov dword [ebp - 0x10c], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0xcc]
sub eax, dword [ebp - 0x70]
mov dword [ebp - 0x130], edx
mov dword [ebp - 0x12c], esi
mov dword [ebp - 0x108], edx
mov dword [ebp - 0x104], esi
mov dword [ebp - 0x124], edi
mov dword [ebp - 0x120], edi
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x118], edi
mov dword [ebp - 0xd4], eax
lea edi, [ebp - 0xc4]
push 0x10
pop ecx
lea esi, [ebp - 0x13c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0xb4]
mov edx, dword [ebp - 0x94]
mov esi, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0x6c], 2
lea edi, [esi + edx]
mov ebx, dword [ebp - 0xc0]
rol edi, 7
xor eax, edi
lea edi, [esi + eax]
rol edi, 9
xor ecx, edi
lea edi, [ecx + eax]
rol edi, 0xd
xor edx, edi
lea edi, [ecx + edx]
ror edi, 0xe
xor esi, edi
mov edi, dword [ebp - 0xb0]
add ebx, edi
rol ebx, 7
xor dword [ebp - 0xa0], ebx
mov ebx, dword [ebp - 0xa0]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x90], edi
mov edi, ebx
mov ebx, dword [ebp - 0x90]
add ebx, edi
mov edi, dword [ebp - 0x90]
rol ebx, 0xd
xor dword [ebp - 0xc0], ebx
mov ebx, dword [ebp - 0xc0]
add edi, ebx
mov ebx, dword [ebp - 0x9c]
ror edi, 0xe
xor dword [ebp - 0xb0], edi
mov edi, dword [ebp - 0xac]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x8c], edi
mov edi, ebx
mov ebx, dword [ebp - 0x8c]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xbc], edi
mov edi, ebx
mov ebx, dword [ebp - 0xbc]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xbc]
xor dword [ebp - 0xac], ebx
mov ebx, dword [ebp - 0xac]
add edi, ebx
mov ebx, dword [ebp - 0x88]
ror edi, 0xe
xor dword [ebp - 0x9c], edi
mov edi, dword [ebp - 0x98]
add edi, ebx
rol edi, 7
xor dword [ebp - 0xb8], edi
mov edi, ebx
mov ebx, dword [ebp - 0xb8]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xa8], edi
mov edi, ebx
mov ebx, dword [ebp - 0xa8]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xa8]
xor dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0x98]
add edi, ebx
ror edi, 0xe
xor dword [ebp - 0x88], edi
mov edi, dword [ebp - 0xb8]
add edi, esi
rol edi, 7
xor dword [ebp - 0xc0], edi
mov edi, dword [ebp - 0xc0]
add edi, esi
rol edi, 9
xor dword [ebp - 0xbc], edi
mov ebx, dword [ebp - 0xbc]
mov edi, dword [ebp - 0xc0]
add ebx, edi
mov edi, dword [ebp - 0xbc]
rol ebx, 0xd
xor dword [ebp - 0xb8], ebx
mov ebx, dword [ebp - 0xb8]
add ebx, edi
mov edi, dword [ebp - 0xb0]
add edi, eax
ror ebx, 0xe
xor esi, ebx
rol edi, 7
xor dword [ebp - 0xac], edi
mov edi, dword [ebp - 0xb0]
mov ebx, dword [ebp - 0xac]
add ebx, edi
rol ebx, 9
mov edi, dword [ebp - 0xac]
xor dword [ebp - 0xa8], ebx
mov ebx, dword [ebp - 0xa8]
add ebx, edi
rol ebx, 0xd
xor eax, ebx
mov ebx, dword [ebp - 0xa0]
mov edi, dword [ebp - 0xa8]
add edi, eax
ror edi, 0xe
xor dword [ebp - 0xb0], edi
mov edi, dword [ebp - 0x9c]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x98], edi
mov ebx, dword [ebp - 0x98]
mov edi, dword [ebp - 0x9c]
add ebx, edi
rol ebx, 9
xor ecx, ebx
mov edi, dword [ebp - 0x98]
mov ebx, dword [ebp - 0x8c]
add edi, ecx
rol edi, 0xd
xor dword [ebp - 0xa0], edi
mov edi, dword [ebp - 0xa0]
add edi, ecx
ror edi, 0xe
xor dword [ebp - 0x9c], edi
mov edi, dword [ebp - 0x88]
add edi, ebx
rol edi, 7
xor edx, edi
mov edi, dword [ebp - 0x88]
add edi, edx
rol edi, 9
xor dword [ebp - 0x90], edi
mov edi, dword [ebp - 0x90]
add edi, edx
rol edi, 0xd
xor dword [ebp - 0x8c], edi
mov ebx, dword [ebp - 0x8c]
mov edi, dword [ebp - 0x90]
add ebx, edi
ror ebx, 0xe
xor dword [ebp - 0x88], ebx
dec dword [ebp - 0x6c]
jne 0x1011f4f
mov dword [ebp - 0x94], edx
push 0x40
mov dword [ebp - 0xb4], eax
xor edx, edx
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0xc4], esi
pop ebx
xor eax, eax
mov ecx, dword [ebp + eax - 0x13c]
add dword [ebp + eax - 0xc4], ecx
add eax, 4
cmp eax, ebx
jl 0x10121c1
lea edi, [ebp - 0x44]
inc dword [ebp - 0x11c]
lea esi, [ebp - 0xc4]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x60], ebx
jbe 0x1012225
mov esi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0xd4]
lea edi, [esi + eax]
lea ecx, [ebp + edx - 0x44]
mov al, byte [ecx + edi]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
inc edx
mov byte [esi + ecx], al
cmp edx, ebx
jb 0x10121fb
sub dword [ebp - 0x60], ebx
add dword [ebp - 0x84], ebx
add esi, ebx
add dword [ebp - 0x7c], ebx
mov dword [ebp - 0x5c], esi
jmp 0x1011f1f
cmp dword [ebp - 0x60], edx
jbe 0x101224f
lea eax, [ebp - 0x44]
mov edi, dword [ebp - 0x84]
mov esi, dword [ebp - 0x7c]
sub esi, eax
sub edi, eax
lea ecx, [ebp + edx - 0x44]
mov al, byte [ecx + esi]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
mov byte [ecx + edi], al
inc edx
cmp edx, dword [ebp - 0x60]
jb 0x101223a
mov edi, 0x1000000
mov esi, dword [ebp - 0x78]
mov ebx, 0xfffff000
movzx ecx, byte [ebp - 0x55]
mov eax, dword [ebp - 0x74]
movzx eax, byte [eax + 8]
sub ecx, eax
je 0x1012301
call 0x106211d
mov esi, eax
mov edx, 0xffff
mov edi, dword [ebp - 0xc8]
and edi, 0xfffffffc
lea ecx, [edi + 0xfff]
mov eax, dword [ebp - 0xec]
and esi, ebx
and ecx, ebx
mov dword [eax + 8], 0x102487c
xor eax, eax
mov ebx, dword [0x107a468]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x107a468], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x101229d
mov ebx, 0xffff
div ebx
inc edx
mov eax, edi
mov dword [ebp - 0x150], esi
mov dword [ebp - 0x148], edx
cmp edi, ecx
mov dword [ebp - 0xc8], 0
jae 0x10122f7
mov edx, dword [ebp - 0xc8]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jb 0x10122e8
mov eax, 0x102487c
jmp 0x10123d7
mov ecx, dword [0x10062b0]
mov eax, dword [ebp - 0xcc]
sub eax, dword [ebp - 0x70]
sub edi, ecx
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], edi
jne 0x1012322
test eax, eax
je 0x10123ca
mov ecx, dword [0x10077c8]
mov edi, dword [ebp - 0x70]
mov eax, dword [ebp - 0x80]
sub edi, dword [ebp - 0xcc]
add eax, esi
xor esi, esi
mov dword [ebp - 0xc8], eax
dec ecx
js 0x1012369
lea eax, [ecx + esi]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x10077cc]
and edx, 0xfffffff
cmp dword [ebp - 0x80], edx
jae 0x1012360
lea ecx, [eax - 1]
jmp 0x1012365
jbe 0x101236d
lea esi, [eax + 1]
cmp ecx, esi
jge 0x1012341
mov ebx, esi
jmp 0x10123c2
mov ebx, eax
jmp 0x10123c2
mov eax, dword [ebx*4 + 0x10077cc]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0xc8]
jae 0x10123ca
lea esi, [ecx + edi + 0x1000000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor edx, edx
dec ecx
je 0x10123b5
dec ecx
je 0x10123b0
dec ecx
jne 0x10123bb
mov edx, dword [ebp - 0x74]
jmp 0x10123bb
mov edx, dword [ebp - 0x78]
jmp 0x10123bb
mov edx, dword [ebp - 0x74]
sub edx, dword [ebp - 0x78]
dec eax
dec eax
jne 0x10123c1
add dword [esi], edx
inc ebx
cmp ebx, dword [0x10077c8]
jb 0x1012371
mov eax, dword [0x10068a4]
mov eax, 0xab0f18d2
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0xec]
mov dword [ecx + 8], eax
mov ecx, dword [ebp - 0x148]
mov esi, dword [ebp - 0x154]
mov edx, dword [ebp - 0x150]
mov edi, dword [ebp - 0x14c]
mov ebx, dword [ebp - 0x140]
mov eax, dword [ebp - 0x144]
mov esp, ebp
pop ebp
popfd
ret