Function at 0x100ae7c4
Capabilities:
Allocate or change rwx memory
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
pushfd
push ebp
mov ebp, esp
sub esp, 0x150
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x144], ecx
lea eax, [ebp + 4]
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x13c], esi
mov dword [ebp - 0x140], edi
mov edi, 0xfffffff
mov ebx, dword [0x1007b9bc]
mov esi, dword [eax + 4]
sub eax, 4
mov dword [ebp - 0xe8], eax
mov eax, dword [esi + 4]
and eax, edi
lea ecx, [ebx + eax - 1]
mov eax, ecx
xor edx, edx
div ebx
mov eax, dword [0x1007b9bc]
sub ecx, edx
mov dword [ebp - 0x7c], ecx
mov eax, dword [0x10012044]
mov dword [ebp - 0x74], eax
mov eax, dword [0x1007b9bc]
mov eax, dword [0x10012044]
test eax, eax
je 0x100ae8c3
and dword [ebp - 0x68], 0
mov eax, dword [0x10012044]
dec eax
lea ecx, [eax + 1]
mov edx, ecx
xor eax, eax
test ecx, ecx
je 0x100ae87b
mov ebx, dword [0x1012ee38]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x1012ee38], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x100ae854
xor edx, edx
div ecx
cmp dword [ebp - 0x74], 0
jbe 0x100ae8bd
lea ebx, [edx*4 + 0x1012ee90]
mov ecx, 0xffffc390
inc dword [ebp - 0x68]
mov eax, 0x3c6f
lock cmpxchg dword [ebx], ecx
cmp eax, 0x3c6f
je 0x100aea82
mov ecx, dword [0x10012044]
lea eax, [edx + 1]
xor edx, edx
div ecx
mov eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x74]
jb 0x100ae885
xor ebx, ebx
test ebx, ebx
jne 0x100ae93c
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor ebx, ebx
push 0x40
push 0x1000
push dword [ebp - 0x7c]
push 0
inc ebx
call dword [sym.imp.kernel32.dll_VirtualAlloc]
test eax, eax
jne 0x100aea96
push eax
call dword [sym.imp.kernel32.dll_Sleep]
cmp ebx, 0x11
jb 0x100ae8ce
xor ebx, ebx
cmp dword [0x1011fbc8], ebx
ja 0x100ae907
test ebx, 3
je 0x100ae91b
test ebx, ebx
je 0x100ae919
push 0x8000
push 0
push ebx
call dword [sym.imp.kernel32.dll_VirtualFree]
xor ebx, ebx
push dword [ebp - 0x6c]
call dword [sym.imp.kernel32.dll_SetLastError]
test ebx, ebx
je 0x100ae825
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
mov eax, ebx
je 0x100ae93c
mov byte [eax], 0
inc eax
dec ecx
jne 0x100ae935
mov eax, 0x7f87c5a1
mov eax, dword [esi]
shr eax, 1
and eax, 7
lea eax, [eax + esi + 8]
mov esi, dword [esi + 4]
and esi, edi
lea ecx, [esi + eax]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x68], eax
mov eax, dword [0x1007b9bc]
mov dword [ebp - 0x6c], ecx
mov edi, 0x10000000
sub eax, esi
lea ecx, [eax + 1]
sub dword [ebp - 0x78], edi
xor eax, eax
test ecx, ecx
mov dword [ebp - 0xc4], esi
mov dword [ebp - 0x5c], ecx
je 0x100ae9a8
mov edx, dword [0x1012ee38]
shr dword [ebp - 0x5c], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x1012ee38], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x5c], 0
jne 0x100ae97e
xor edx, edx
div ecx
add ebx, edx
push ebx
push esi
push dword [ebp - 0x78]
mov dword [ebp - 0xc8], ebx
mov eax, 0x93bfa343
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x68]
add esp, 0xc
test esi, esi
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0x55], 0
mov ebx, 0xfffff000
mov dword [ebp - 0xc0], esi
mov dword [ebp - 0x7c], eax
je 0x100af0b6
lea eax, [ebp - 0xf0]
push eax
mov eax, 0xfc916210
mov esi, dword [ebp - 0xf0]
mov eax, 0xfffffff
and dword [ebp - 0x64], 0
and dword [ebp - 0x60], 0
pop ecx
mov ecx, dword [ebp - 0xec]
and ecx, eax
and esi, eax
mov dword [ebp - 0x5c], ecx
mov eax, edi
add esi, edi
mov ecx, dword [0x1001256c]
sub eax, ecx
mov dword [ebp - 0xf8], eax
jne 0x100aea9d
xor edi, edi
cmp dword [ebp - 0x5c], edi
jbe 0x100aecc5
mov ecx, 0x48863bd6
movzx eax, byte [edi + esi]
add eax, ecx
add dword [ebp - 0x64], eax
add eax, dword [ebp - 0x60]
imul eax, eax, 0x48863bd6
ror eax, 9
mov edx, ecx
mul edx
add eax, edx
mov edx, eax
imul edx, edx, 0xede9
rol edx, 6
ror eax, 6
xor edx, eax
add dword [ebp - 0x64], edx
mov dword [ebp - 0x60], edx
inc edi
cmp edi, dword [ebp - 0x5c]
jb 0x100aea46
jmp 0x100aecc5
mov ebx, dword [0x1007b9bc]
imul ebx, edx
lea ebx, [ebx + section..data]
jmp 0x100ae8bf
mov ebx, eax
jmp 0x100ae8f7
mov eax, dword [ebp - 0x5c]
mov edx, dword [0x1000003c]
add eax, esi
lea edx, [edx + 0x100000a0]
mov dword [ebp - 0x70], eax
mov eax, dword [edx]
mov edx, dword [edx + 4]
add eax, edi
mov dword [ebp - 0xcc], edx
mov ecx, esi
sub ecx, edi
mov edx, ecx
and edx, ebx
mov edi, ecx
sub edi, edx
mov dword [ebp - 0xe4], edi
mov edi, dword [ebp - 0x5c]
add ecx, edi
mov edi, ecx
and edi, ebx
sub ecx, edi
mov dword [ebp - 0xdc], ecx
mov ecx, dword [ebp - 0xcc]
add ecx, eax
mov dword [ebp - 0xe0], edi
mov edi, eax
mov dword [ebp - 0xd8], ecx
cmp eax, ecx
je 0x100aeb0a
cmp dword [edi], edx
jae 0x100aeb0a
add edi, dword [edi + 4]
cmp edi, dword [ebp - 0xd8]
jne 0x100aeafb
and dword [ebp - 0xd0], 0
cmp edi, dword [ebp - 0xd8]
je 0x100aeb4b
cmp dword [edi], edx
jne 0x100aeb4b
mov ecx, dword [edi + 4]
sub ecx, 8
shr ecx, 1
je 0x100aeb4b
lea eax, [edi + 8]
movzx edx, word [eax]
and edx, 0xfff
cmp edx, dword [ebp - 0xe4]
jae 0x100aeb4b
inc dword [ebp - 0xd0]
inc eax
inc eax
cmp dword [ebp - 0xd0], ecx
jne 0x100aeb2a
mov ecx, 0x48863bd6
mov edx, dword [ebp - 0xe0]
cmp edi, dword [ebp - 0xd8]
je 0x100aec86
cmp dword [edi], edx
ja 0x100aec86
mov eax, dword [edi + 4]
lea ebx, [eax - 8]
shr ebx, 1
cmp dword [ebp - 0xd0], ebx
jne 0x100aeb99
add edi, eax
cmp edi, dword [ebp - 0xd8]
je 0x100aec86
cmp dword [edi], edx
ja 0x100aec86
and dword [ebp - 0xd0], 0
jmp 0x100aeb6a
cmp dword [edi], edx
jne 0x100aebb9
mov eax, dword [ebp - 0xd0]
movzx eax, word [edi + eax*2 + 8]
and eax, 0xfff
cmp eax, dword [ebp - 0xdc]
jae 0x100aec86
mov ebx, 0xf000
mov eax, dword [ebp - 0xd0]
inc dword [ebp - 0xd0]
test word [edi + eax*2 + 8], bx
je 0x100aeb56
mov edx, dword [edi]
movzx eax, word [edi + eax*2 + 8]
and eax, 0xfff
xor ebx, ebx
lea eax, [eax + edx + 0x10000000]
mov dword [ebp - 0x5c], eax
sub dword [ebp - 0x5c], esi
mov dword [ebp - 0xe4], eax
je 0x100aec2d
movzx eax, byte [ebx + esi]
add eax, ecx
mov edx, ecx
add dword [ebp - 0x64], eax
add eax, dword [ebp - 0x60]
imul eax, eax, 0x48863bd6
ror eax, 9
mul edx
add eax, edx
mov edx, eax
imul edx, edx, 0xede9
rol edx, 6
ror eax, 6
xor edx, eax
mov eax, edx
add dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
inc ebx
cmp ebx, dword [ebp - 0x5c]
jb 0x100aebf4
mov esi, dword [ebp - 0xe4]
mov eax, dword [esi]
sub eax, dword [ebp - 0xf8]
mov dword [ebp - 0xf4], eax
xor ebx, ebx
movzx eax, byte [ebp + ebx - 0xf4]
add eax, ecx
mov edx, ecx
add dword [ebp - 0x64], eax
add eax, dword [ebp - 0x60]
imul eax, eax, 0x48863bd6
ror eax, 9
mul edx
add eax, edx
mov edx, eax
imul edx, edx, 0xede9
rol edx, 6
ror eax, 6
xor edx, eax
add dword [ebp - 0x64], edx
inc ebx
cmp ebx, 4
mov dword [ebp - 0x60], edx
jb 0x100aec43
add esi, 4
jmp 0x100aeb50
mov ebx, dword [ebp - 0x70]
xor edi, edi
sub ebx, esi
je 0x100aecc5
movzx eax, byte [edi + esi]
add eax, ecx
add dword [ebp - 0x64], eax
mov edx, ecx
add eax, dword [ebp - 0x60]
imul eax, eax, 0x48863bd6
ror eax, 9
mul edx
add eax, edx
mov edx, eax
imul edx, edx, 0xede9
rol edx, 6
ror eax, 6
xor edx, eax
add dword [ebp - 0x64], edx
inc edi
mov dword [ebp - 0x60], edx
cmp edi, ebx
jb 0x100aec8f
xor edi, edi
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x64]
mov byte [ebp + eax - 0x54], cl
inc eax
cmp eax, 0x10
jb 0x100aecc9
mov eax, 0x56b8373b
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x10c], eax
mov eax, dword [0x10120760]
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x108], ecx
mov ecx, dword [eax]
mov dword [ebp - 0x138], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x124], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xfc], eax
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0xc8]
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 - 0x70], eax
lea edi, [ebp - 0xbc]
push 0x10
lea esi, [ebp - 0x138]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0xac]
mov esi, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0x5c], 2
mov ebx, dword [ebp - 0xa8]
lea edi, [edx + esi]
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 - 0xb8]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x98], edi
mov edi, ebx
mov ebx, dword [ebp - 0x98]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x88], edi
mov edi, ebx
mov ebx, dword [ebp - 0x88]
add ebx, edi
mov edi, dword [ebp - 0x88]
rol ebx, 0xd
xor dword [ebp - 0xb8], ebx
mov ebx, dword [ebp - 0xb8]
add edi, ebx
ror edi, 0xe
mov ebx, dword [ebp - 0x94]
xor dword [ebp - 0xa8], edi
mov edi, dword [ebp - 0xa4]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x84], edi
mov edi, ebx
mov ebx, dword [ebp - 0x84]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xb4], edi
mov edi, ebx
mov ebx, dword [ebp - 0xb4]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xb4]
xor dword [ebp - 0xa4], ebx
mov ebx, dword [ebp - 0xa4]
add edi, ebx
mov ebx, dword [ebp - 0x80]
ror edi, 0xe
xor dword [ebp - 0x94], edi
mov edi, dword [ebp - 0x90]
add edi, ebx
rol edi, 7
xor dword [ebp - 0xb0], edi
mov edi, ebx
mov ebx, dword [ebp - 0xb0]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xa0], edi
mov edi, ebx
mov ebx, dword [ebp - 0xa0]
add ebx, edi
mov edi, dword [ebp - 0xa0]
rol ebx, 0xd
xor dword [ebp - 0x90], ebx
mov ebx, dword [ebp - 0x90]
add edi, ebx
ror edi, 0xe
xor dword [ebp - 0x80], edi
mov edi, dword [ebp - 0xb0]
add edi, esi
rol edi, 7
xor dword [ebp - 0xb8], edi
mov edi, dword [ebp - 0xb8]
add edi, esi
rol edi, 9
xor dword [ebp - 0xb4], edi
mov edi, dword [ebp - 0xb8]
mov ebx, dword [ebp - 0xb4]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xb4]
xor dword [ebp - 0xb0], ebx
mov ebx, dword [ebp - 0xb0]
add ebx, edi
mov edi, dword [ebp - 0xa8]
add edi, eax
ror ebx, 0xe
xor esi, ebx
rol edi, 7
xor dword [ebp - 0xa4], edi
mov ebx, dword [ebp - 0xa4]
mov edi, dword [ebp - 0xa8]
add ebx, edi
rol ebx, 9
mov edi, dword [ebp - 0xa4]
xor dword [ebp - 0xa0], ebx
mov ebx, dword [ebp - 0xa0]
add ebx, edi
mov edi, dword [ebp - 0xa0]
rol ebx, 0xd
xor eax, ebx
add edi, eax
ror edi, 0xe
mov ebx, dword [ebp - 0x98]
xor dword [ebp - 0xa8], edi
mov edi, dword [ebp - 0x94]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x90], edi
mov ebx, dword [ebp - 0x90]
mov edi, dword [ebp - 0x94]
add ebx, edi
mov edi, dword [ebp - 0x90]
rol ebx, 9
xor ecx, ebx
mov ebx, dword [ebp - 0x84]
add edi, ecx
rol edi, 0xd
xor dword [ebp - 0x98], edi
mov edi, dword [ebp - 0x98]
add edi, ecx
ror edi, 0xe
xor dword [ebp - 0x94], edi
mov edi, dword [ebp - 0x80]
add edi, ebx
rol edi, 7
xor edx, edi
mov edi, dword [ebp - 0x80]
add edi, edx
rol edi, 9
xor dword [ebp - 0x88], edi
mov edi, dword [ebp - 0x88]
add edi, edx
rol edi, 0xd
xor dword [ebp - 0x84], edi
mov ebx, dword [ebp - 0x84]
mov edi, dword [ebp - 0x88]
add ebx, edi
ror ebx, 0xe
xor dword [ebp - 0x80], ebx
dec dword [ebp - 0x5c]
jne 0x100aedaa
mov dword [ebp - 0x8c], edx
xor edx, edx
push 0x40
mov dword [ebp - 0xac], eax
xor eax, eax
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0xbc], esi
pop ebx
mov ecx, dword [ebp + eax - 0x138]
add dword [ebp + eax - 0xbc], ecx
add eax, 4
cmp eax, ebx
jl 0x100af00f
lea esi, [ebp - 0xbc]
inc dword [ebp - 0x118]
push 0x10
pop ecx
lea edi, [ebp - 0x44]
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0xc0], ebx
jbe 0x100af079
mov esi, dword [ebp - 0xcc]
mov eax, dword [ebp - 0x70]
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 0x100af04c
sub dword [ebp - 0xc0], ebx
add dword [ebp - 0x74], ebx
add esi, ebx
add dword [ebp - 0x7c], ebx
mov dword [ebp - 0xcc], esi
jmp 0x100aed7a
cmp dword [ebp - 0xc0], edx
jbe 0x100af0a6
lea eax, [ebp - 0x44]
mov esi, dword [ebp - 0x7c]
mov edi, dword [ebp - 0x74]
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 - 0xc0]
jb 0x100af08e
mov ebx, 0xfffff000
mov esi, dword [ebp - 0xc4]
mov edi, 0x10000000
mov eax, dword [ebp - 0x6c]
mov al, byte [eax + 8]
xor al, byte [ebp - 0x55]
je 0x100af14e
call fcn.100b7e18
mov edi, eax
mov edx, 0xffff
mov eax, dword [ebp - 0xe8]
lea ecx, [eax + 0xc]
and ecx, 0xfffffffc
mov dword [eax + 8], 0x100f1b6e
and edi, ebx
lea esi, [ecx + 0xfff]
and esi, ebx
xor eax, eax
mov ebx, dword [0x1012ee38]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x1012ee38], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x100af0f0
mov ebx, 0xffff
div ebx
inc edx
cmp ecx, esi
mov dword [ebp - 0x150], edi
mov eax, ecx
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x70], 0
jae 0x100af144
mov ecx, dword [ebp - 0x70]
mov dword [eax], ecx
add eax, 4
cmp eax, esi
jb 0x100af138
mov eax, 0x100f1b6e
jmp 0x100af22a
mov ecx, dword [0x1001256c]
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0xc8]
mov dword [ebp - 0xc4], eax
sub edi, ecx
mov dword [ebp - 0x6c], edi
jne 0x100af172
test eax, eax
je 0x100af21a
mov ecx, dword [0x10103928]
mov eax, dword [ebp - 0x78]
mov edi, dword [ebp - 0xc8]
sub edi, dword [ebp - 0x68]
add eax, esi
xor esi, esi
dec ecx
mov dword [ebp - 0x70], eax
js 0x100af1b6
lea eax, [esi + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x1010392c]
and edx, 0xfffffff
cmp dword [ebp - 0x78], edx
jae 0x100af1ad
lea ecx, [eax - 1]
jmp 0x100af1b2
jbe 0x100af1ba
lea esi, [eax + 1]
cmp ecx, esi
jge 0x100af18e
mov ebx, esi
jmp 0x100af212
mov ebx, eax
jmp 0x100af212
mov eax, dword [ebx*4 + 0x1010392c]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x70]
jae 0x100af21a
lea esi, [ecx + edi + 0x10000000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor edx, edx
dec ecx
je 0x100af202
dec ecx
je 0x100af1fa
dec ecx
jne 0x100af20b
mov edx, dword [ebp - 0x6c]
jmp 0x100af20b
mov edx, dword [ebp - 0xc4]
jmp 0x100af20b
mov edx, dword [ebp - 0x6c]
sub edx, dword [ebp - 0xc4]
dec eax
dec eax
jne 0x100af211
add dword [esi], edx
inc ebx
cmp ebx, dword [0x10103928]
jb 0x100af1be
mov eax, dword [0x1007b9bc]
mov eax, 0x76804797
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0xe8]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x14c]
mov edi, dword [ebp - 0x140]
mov edx, dword [ebp - 0x150]
mov ebx, dword [ebp - 0x148]
mov esi, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x144]
mov esp, ebp
pop ebp
popfd
ret