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

Disassembly:
push edi
pushfd
push ebp
mov ebp, esp
sub esp, 0x150
mov dword [ebp - 0x140], eax
lea eax, [ebp + 4]
sub eax, 4
mov dword [ebp - 0x144], ecx
mov ecx, 0xfffffff
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x13c], ebx
mov dword [ebp - 0x150], esi
lea esi, [eax + 0xc]
mov dword [ebp - 0x148], edi
mov dword [ebp - 0xe8], eax
mov eax, dword [esi]
mov ebx, dword [eax]
mov dword [ebp - 0x7c], eax
mov eax, dword [eax + 4]
and eax, ecx
and ebx, ecx
mov ecx, dword [0x102543c]
mov dword [ebp - 0x74], ecx
lea ecx, [eax + ecx - 1]
xor edx, edx
mov eax, ecx
div dword [ebp - 0x74]
mov edi, 0x1000000
mov eax, dword [0x102543c]
mov dword [ebp - 0xc8], esi
add ebx, edi
mov dword [ebp - 0xcc], ebx
sub ecx, edx
mov dword [ebp - 0x84], ecx
mov eax, dword [0x101a35c]
mov dword [ebp - 0x80], eax
mov eax, dword [0x102543c]
mov eax, dword [0x101a35c]
test eax, eax
je 0x100ab94
and dword [ebp - 0x70], 0
mov eax, dword [0x101a35c]
dec eax
lea ecx, [eax + 1]
xor eax, eax
mov dword [ebp - 0x60], ecx
test ecx, ecx
je 0x100ab3d
mov edx, dword [0x10410fc]
shr dword [ebp - 0x60], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x10410fc], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x60], 0
jne 0x100ab13
xor edx, edx
div ecx
cmp dword [ebp - 0x80], 0
mov dword [ebp - 0x60], edx
jbe 0x100ab86
lea edx, [edx*4 + 0x1042454]
mov eax, 0xe941
mov ecx, 0xffff16be
inc dword [ebp - 0x70]
lock cmpxchg dword [edx], ecx
cmp eax, 0xe941
je 0x100ad52
mov ecx, dword [0x101a35c]
mov eax, dword [ebp - 0x60]
inc eax
xor edx, edx
div ecx
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x60], edx
cmp eax, dword [ebp - 0x80]
jb 0x100ab4a
and dword [ebp - 0x5c], 0
cmp dword [ebp - 0x5c], 0
jne 0x100ac25
call dword [fcn.0100108c]
and dword [ebp - 0x60], 0
mov dword [ebp - 0x74], eax
inc dword [ebp - 0x60]
push 0x40
push 0x1000
push dword [ebp - 0x84]
push 0
call dword [0x1001064]
test eax, eax
jne 0x100ad69
push eax
call dword [0x100104c]
cmp dword [ebp - 0x60], 0x11
jb 0x100aba1
and dword [ebp - 0x5c], 0
cmp dword [ebp - 0x5c], 0x10000
jb 0x100abe4
test dword [ebp - 0x5c], 3
je 0x100abfe
cmp dword [ebp - 0x5c], 0
je 0x100abfa
push 0x8000
push 0
push dword [ebp - 0x5c]
call dword [0x1001054]
and dword [ebp - 0x5c], 0
push dword [ebp - 0x74]
call dword [0x1001060]
cmp dword [ebp - 0x5c], 0
je 0x100aae3
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x84]
test ecx, ecx
je 0x100ac25
mov byte [eax], 0
inc eax
dec ecx
jne 0x100ac1e
mov eax, 0xe858eec3
mov eax, dword [ebp - 0x7c]
add dword [esi], 8
mov esi, dword [eax + 4]
and esi, 0xfffffff
lea eax, [esi + ebx]
mov dword [ebp - 0x74], eax
mov eax, dword [0x102543c]
mov dword [ebp - 0x70], ebx
sub eax, esi
sub dword [ebp - 0x70], edi
mov dword [ebp - 0x7c], esi
lea ecx, [eax + 1]
mov edx, ecx
xor eax, eax
test ecx, ecx
je 0x100ac81
mov ebx, dword [0x10410fc]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x10410fc], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x100ac5a
xor edx, edx
div ecx
mov eax, dword [ebp - 0x5c]
push esi
push dword [ebp - 0x70]
lea ebx, [edx + eax]
mov eax, ebx
mov dword [ebp - 0x60], ebx
mov eax, 0x7486210a
mov eax, dword [ebp - 0x74]
pop ecx
pop ecx
test esi, esi
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x80], ebx
mov ebx, 0xfffff000
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x84], eax
je 0x100b37d
lea esi, [ebp - 0xf0]
mov eax, 0x669eeb5a
mov ecx, dword [0x1004f44]
mov esi, dword [ebp - 0xec]
mov eax, 0xfffffff
mov edx, dword [ebp - 0xf0]
and dword [ebp - 0x6c], 0
and dword [ebp - 0x68], 0
and edx, eax
and esi, eax
mov eax, edi
add edx, edi
sub eax, ecx
mov dword [ebp - 0xf4], eax
jne 0x100ad71
xor ebx, ebx
test esi, esi
jbe 0x100af88
mov edi, 0x1bbd2d76
movzx ecx, byte [ebx + edx]
sub ecx, edi
add dword [ebp - 0x6c], ecx
add ecx, dword [ebp - 0x68]
mov eax, ecx
imul eax, eax, 0xfb82
rol eax, 0xa
ror ecx, 0xa
xor eax, ecx
imul eax, eax, 0xe442d28a
ror eax, 2
add dword [ebp - 0x6c], eax
inc ebx
cmp ebx, esi
mov dword [ebp - 0x68], eax
jb 0x100ad1d
jmp 0x100af88
mov eax, dword [0x102543c]
imul eax, dword [ebp - 0x60]
lea eax, [eax + 0x1038008]
mov dword [ebp - 0x5c], eax
jmp 0x100ab8a
mov dword [ebp - 0x5c], eax
jmp 0x100abd2
lea eax, [edx + esi]
mov ecx, edx
mov dword [ebp - 0xd0], eax
mov eax, dword [0x100003c]
lea eax, [eax + 0x10000a0]
mov dword [ebp - 0x78], eax
mov eax, dword [eax]
add eax, edi
sub ecx, edi
mov edi, dword [ebp - 0x78]
mov edi, dword [edi + 4]
mov dword [ebp - 0x78], edi
mov edi, ecx
and edi, ebx
mov dword [ebp - 0x64], edi
mov edi, ecx
sub edi, dword [ebp - 0x64]
add ecx, esi
mov esi, ecx
and esi, ebx
sub ecx, esi
mov dword [ebp - 0xe0], ecx
mov ecx, dword [ebp - 0x78]
add ecx, eax
mov dword [ebp - 0xe4], esi
mov esi, eax
mov dword [ebp - 0xdc], ecx
cmp eax, ecx
je 0x100addc
mov eax, dword [ebp - 0x64]
cmp dword [esi], eax
jae 0x100addc
add esi, dword [esi + 4]
cmp esi, dword [ebp - 0xdc]
jne 0x100adca
mov ecx, 0xfff
and dword [ebp - 0xd4], 0
cmp esi, dword [ebp - 0xdc]
je 0x100ae25
mov eax, dword [ebp - 0x64]
cmp dword [esi], eax
jne 0x100ae25
mov eax, dword [esi + 4]
sub eax, 8
shr eax, 1
je 0x100ae25
lea ebx, [esi + 8]
mov dword [ebp - 0x64], ebx
mov ebx, dword [ebp - 0x64]
movzx ebx, word [ebx]
and ebx, ecx
cmp ebx, edi
jae 0x100ae25
inc dword [ebp - 0xd4]
add dword [ebp - 0x64], 2
cmp dword [ebp - 0xd4], eax
jne 0x100ae07
mov edi, 0x1bbd2d76
cmp esi, dword [ebp - 0xdc]
je 0x100af4c
mov eax, dword [esi]
cmp eax, dword [ebp - 0xe4]
ja 0x100af4c
mov ebx, dword [ebp - 0xd4]
mov eax, dword [esi + 4]
add eax, 0xfffffff8
shr eax, 1
cmp ebx, eax
jne 0x100ae77
add esi, dword [esi + 4]
cmp esi, dword [ebp - 0xdc]
je 0x100af4c
mov eax, dword [ebp - 0xe4]
cmp dword [esi], eax
ja 0x100af4c
xor ebx, ebx
jmp 0x100ae4a
mov eax, dword [ebp - 0xe4]
cmp dword [esi], eax
jne 0x100ae94
movzx eax, word [esi + ebx*2 + 8]
and eax, ecx
cmp eax, dword [ebp - 0xe0]
jae 0x100af4c
mov eax, ebx
inc ebx
mov dword [ebp - 0xd4], ebx
mov ebx, 0xf000
test word [esi + eax*2 + 8], bx
je 0x100ae2a
movzx eax, word [esi + eax*2 + 8]
and eax, ecx
mov ecx, dword [esi]
lea eax, [eax + ecx + 0x1000000]
xor ecx, ecx
mov dword [ebp - 0x64], eax
sub dword [ebp - 0x64], edx
mov dword [ebp - 0x78], eax
je 0x100aef7
movzx ebx, byte [ecx + edx]
sub ebx, edi
add dword [ebp - 0x6c], ebx
add ebx, dword [ebp - 0x68]
mov eax, ebx
imul eax, eax, 0xfb82
rol eax, 0xa
ror ebx, 0xa
xor eax, ebx
imul eax, eax, 0xe442d28a
ror eax, 2
add dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
inc ecx
cmp ecx, dword [ebp - 0x64]
jb 0x100aec6
mov ebx, dword [ebp - 0x78]
mov eax, dword [ebx]
sub eax, dword [ebp - 0xf4]
mov dword [ebp - 0xf8], eax
xor ecx, ecx
movzx edx, byte [ebp + ecx - 0xf8]
sub edx, edi
add dword [ebp - 0x6c], edx
add edx, dword [ebp - 0x68]
mov eax, edx
imul eax, eax, 0xfb82
rol eax, 0xa
ror edx, 0xa
xor eax, edx
imul eax, eax, 0xe442d28a
ror eax, 2
add dword [ebp - 0x6c], eax
inc ecx
mov dword [ebp - 0x68], eax
cmp ecx, 4
jb 0x100af0a
mov ecx, 0xfff
lea edx, [ebx + 4]
jmp 0x100ae2a
xor esi, esi
mov ebx, dword [ebp - 0xd0]
sub ebx, edx
je 0x100af88
movzx ecx, byte [esi + edx]
sub ecx, edi
add dword [ebp - 0x6c], ecx
add ecx, dword [ebp - 0x68]
mov eax, ecx
imul eax, eax, 0xfb82
rol eax, 0xa
ror ecx, 0xa
xor eax, ecx
imul eax, eax, 0xe442d28a
ror eax, 2
add dword [ebp - 0x6c], eax
inc esi
mov dword [ebp - 0x68], eax
cmp esi, ebx
jb 0x100af58
xor edi, edi
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x6c]
mov byte [ebp + eax - 0x54], cl
inc eax
cmp eax, 0x10
jb 0x100af8c
mov eax, 0x1fc28214
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x10c], eax
mov eax, dword [0x101be7c]
mov dword [ebp - 0x138], eax
mov eax, dword [0x101be80]
mov dword [ebp - 0x124], eax
mov eax, dword [0x101be84]
mov dword [ebp - 0x110], eax
mov eax, dword [0x101be88]
mov dword [ebp - 0xfc], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x108], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0xcc]
sub eax, dword [ebp - 0x60]
mov dword [ebp - 0x12c], edx
mov dword [ebp - 0x128], esi
mov dword [ebp - 0x104], edx
mov dword [ebp - 0x100], esi
mov dword [ebp - 0x120], edi
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x114], edi
mov dword [ebp - 0xd0], eax
lea edi, [ebp - 0xc4]
push 0x10
pop ecx
lea esi, [ebp - 0x138]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xb4]
mov esi, dword [ebp - 0xc4]
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x64], 2
mov ebx, dword [ebp - 0xb0]
lea edi, [esi + edx]
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 - 0xc0]
add edi, ebx
rol edi, 7
xor dword [ebp - 0xa0], edi
mov edi, 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
mov edi, dword [ebp - 0xbc]
rol ebx, 0xd
xor dword [ebp - 0xac], ebx
mov ebx, dword [ebp - 0xac]
add edi, ebx
ror edi, 0xe
mov ebx, dword [ebp - 0x88]
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
mov edi, dword [ebp - 0xa8]
rol ebx, 0xd
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
rol ebx, 0xd
mov edi, dword [ebp - 0xbc]
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
mov edi, dword [ebp - 0xa8]
rol ebx, 0xd
xor eax, ebx
mov ebx, dword [ebp - 0xa0]
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]
add edi, ecx
rol edi, 0xd
mov ebx, dword [ebp - 0x8c]
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 - 0x64]
jne 0x100b06e
mov dword [ebp - 0x94], edx
push 0x40
xor edx, edx
mov dword [ebp - 0xb4], eax
xor eax, eax
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0xc4], esi
pop ebx
mov ecx, dword [ebp + eax - 0x138]
add dword [ebp + eax - 0xc4], ecx
add eax, 4
cmp eax, ebx
jl 0x100b2e2
lea esi, [ebp - 0xc4]
inc dword [ebp - 0x118]
lea edi, [ebp - 0x44]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x5c], ebx
jbe 0x100b346
mov esi, dword [ebp - 0x78]
mov eax, dword [ebp - 0xd0]
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
cmp edx, ebx
mov byte [ecx + esi], al
jb 0x100b31c
sub dword [ebp - 0x5c], ebx
add dword [ebp - 0x80], ebx
add esi, ebx
add dword [ebp - 0x84], ebx
mov dword [ebp - 0x78], esi
jmp 0x100b03e
cmp dword [ebp - 0x5c], edx
jbe 0x100b370
mov edi, dword [ebp - 0x80]
mov esi, dword [ebp - 0x84]
lea eax, [ebp - 0x44]
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
inc edx
mov byte [ecx + edi], al
cmp edx, dword [ebp - 0x5c]
jb 0x100b35b
mov ebx, 0xfffff000
mov edi, 0x1000000
mov esi, dword [ebp - 0x7c]
movzx ecx, byte [ebp - 0x55]
mov eax, dword [ebp - 0x74]
movzx eax, byte [eax + 8]
sub ecx, eax
je 0x100b422
call fcn.0100cd3b
mov esi, eax
mov eax, dword [ebp - 0xe8]
mov edx, 0xffff
mov edi, dword [ebp - 0xc8]
and edi, 0xfffffffc
mov dword [eax + 8], 0x1023648
lea ecx, [edi + 0xfff]
and esi, ebx
and ecx, ebx
xor eax, eax
mov ebx, dword [0x10410fc]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x10410fc], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x100b3be
mov ebx, 0xffff
div ebx
mov eax, edi
inc edx
mov dword [ebp - 0x14c], esi
mov dword [ebp - 0x144], edx
mov dword [ebp - 0xc8], 0
cmp edi, ecx
jae 0x100b418
mov edx, dword [ebp - 0xc8]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jb 0x100b409
mov eax, 0x1023648
jmp 0x100b4f8
mov ecx, dword [0x1004f44]
mov eax, dword [ebp - 0xcc]
sub eax, dword [ebp - 0x60]
sub edi, ecx
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x74], edi
jne 0x100b443
test eax, eax
je 0x100b4eb
mov edi, dword [ebp - 0x60]
sub edi, dword [ebp - 0xcc]
mov ecx, dword [0x1009298]
mov eax, dword [ebp - 0x70]
add eax, esi
xor esi, esi
mov dword [ebp - 0xc8], eax
dec ecx
js 0x100b48a
lea eax, [ecx + esi]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x100929c]
and edx, 0xfffffff
cmp dword [ebp - 0x70], edx
jae 0x100b481
lea ecx, [eax - 1]
jmp 0x100b486
jbe 0x100b48e
lea esi, [eax + 1]
cmp ecx, esi
jge 0x100b462
mov ebx, esi
jmp 0x100b4e3
mov ebx, eax
jmp 0x100b4e3
mov eax, dword [ebx*4 + 0x100929c]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0xc8]
jae 0x100b4eb
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 0x100b4d6
dec ecx
je 0x100b4d1
dec ecx
jne 0x100b4dc
mov edx, dword [ebp - 0x74]
jmp 0x100b4dc
mov edx, dword [ebp - 0x7c]
jmp 0x100b4dc
mov edx, dword [ebp - 0x74]
sub edx, dword [ebp - 0x7c]
dec eax
dec eax
jne 0x100b4e2
add dword [esi], edx
inc ebx
cmp ebx, dword [0x1009298]
jb 0x100b492
mov eax, dword [0x102543c]
mov eax, 0xd34b572f
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0xe8]
mov dword [ecx + 8], eax
mov esi, dword [ebp - 0x150]
mov edi, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x144]
mov edx, dword [ebp - 0x14c]
mov ebx, dword [ebp - 0x13c]
mov eax, dword [ebp - 0x140]
mov esp, ebp
pop ebp
popfd
ret