Function at 0x48c8bd
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
lea eax, [ebp + 4]
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x13c], esi
mov dword [ebp - 0x140], edi
mov ebx, dword [0x4c7398]
mov edi, 0xfffffff
mov esi, dword [eax + 4]
sub eax, 4
mov dword [ebp - 0xd4], eax
mov eax, dword [esi]
shr eax, 2
and eax, edi
lea ecx, [ebx + eax - 1]
xor edx, edx
mov eax, ecx
div ebx
sub ecx, edx
mov eax, dword [0x4c7398]
mov dword [ebp - 0x78], ecx
mov eax, dword [0x403ef8]
mov dword [ebp - 0x68], eax
mov eax, dword [0x4c7398]
mov eax, dword [0x403ef8]
test eax, eax
je 0x48c9bc
and dword [ebp - 0x6c], 0
mov eax, dword [0x403ef8]
dec eax
lea ecx, [eax + 1]
mov edx, ecx
xor eax, eax
test ecx, ecx
je 0x48c974
mov ebx, dword [0x51b214]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x51b214], ebx
shr ebx, 0x10
shl eax, 0x10
or eax, ebx
shr edx, 0x10
jne 0x48c94f
xor edx, edx
div ecx
cmp dword [ebp - 0x68], 0
jbe 0x48c9b6
inc dword [ebp - 0x6c]
mov eax, 0x3c6f
lea ebx, [edx*4 + 0x529524]
mov ecx, 0xffffc390
lock cmpxchg dword [ebx], ecx
cmp eax, 0x3c6f
je 0x48cb7b
lea eax, [edx + 1]
xor edx, edx
mov ecx, dword [0x403ef8]
div ecx
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp - 0x68]
jb 0x48c97e
xor ebx, ebx
test ebx, ebx
jne 0x48ca35
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x70], eax
xor ebx, ebx
inc ebx
push 0x40
push 0x1000
push dword [ebp - 0x78]
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
test eax, eax
jne 0x48cb8f
push eax
call dword [sym.imp.kernel32.dll_Sleep]
cmp ebx, 0x11
jb 0x48c9c7
xor ebx, ebx
cmp dword [0x51b2c4], ebx
ja 0x48ca00
test ebx, 3
je 0x48ca14
test ebx, ebx
je 0x48ca12
push 0x8000
push 0
push ebx
call dword [sym.imp.kernel32.dll_VirtualFree]
xor ebx, ebx
push dword [ebp - 0x70]
call dword [sym.imp.kernel32.dll_SetLastError]
test ebx, ebx
je 0x48c920
mov eax, ebx
mov ecx, dword [ebp - 0x78]
test ecx, ecx
je 0x48ca35
mov byte [eax], 0
inc eax
dec ecx
jne 0x48ca2e
mov eax, 0x2f0d23a3
mov eax, dword [esi + 4]
and eax, 7
lea eax, [eax + esi + 8]
mov esi, dword [esi]
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x6c], eax
shr esi, 2
and esi, edi
lea ecx, [esi + eax]
mov edi, 0x400000
mov eax, dword [0x4c7398]
mov dword [ebp - 0x70], ecx
sub eax, esi
lea ecx, [eax + 1]
sub dword [ebp - 0x7c], edi
mov dword [ebp - 0xc8], esi
mov dword [ebp - 0x68], ecx
xor eax, eax
test ecx, ecx
je 0x48ca9e
mov edx, dword [0x51b214]
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x51b214], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
shr dword [ebp - 0x68], 0x10
jne 0x48ca78
xor edx, edx
div ecx
add ebx, edx
push ebx
push esi
push dword [ebp - 0x7c]
mov dword [ebp - 0xc0], ebx
mov eax, 0x941fe355
mov eax, dword [ebp - 0x70]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x6c]
add esp, 0xc
test esi, esi
mov dword [ebp - 0x68], ebx
mov ebx, 0xfffff000
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0xc4], esi
mov dword [ebp - 0x78], eax
je 0x48d1a0
lea eax, [ebp - 0xf0]
push eax
mov eax, 0x43859dd7
mov esi, dword [ebp - 0xf0]
and dword [ebp - 0x60], 0
and dword [ebp - 0x5c], 0
pop ecx
mov eax, 0xfffffff
mov ecx, dword [ebp - 0xec]
and ecx, eax
and esi, eax
mov dword [ebp - 0x64], ecx
add esi, edi
mov ecx, dword [0x402600]
mov eax, edi
sub eax, ecx
mov dword [ebp - 0xf4], eax
jne 0x48cb96
xor edx, edx
cmp dword [ebp - 0x64], edx
jbe 0x48cdb1
mov edi, 0x2aa66c86
movzx eax, byte [edx + esi]
add eax, edi
add dword [ebp - 0x60], eax
add eax, dword [ebp - 0x5c]
imul eax, eax, 0x2aa66c86
ror eax, 0x14
imul eax, eax, 0x2aa66c86
ror eax, 0x14
mov ecx, eax
imul eax, eax, 0x2434
rol eax, 6
ror ecx, 6
xor eax, ecx
add dword [ebp - 0x60], eax
inc edx
cmp edx, dword [ebp - 0x64]
mov dword [ebp - 0x5c], eax
jb 0x48cb3c
jmp 0x48cdb1
mov ebx, dword [0x4c7398]
imul ebx, edx
lea ebx, [ebx + section..data]
jmp 0x48c9b8
mov ebx, eax
jmp 0x48c9f0
mov eax, dword [ebp - 0x64]
mov edx, dword [0x40003c]
lea edx, [edx + 0x4000a0]
add eax, esi
mov dword [ebp - 0x74], eax
mov eax, dword [edx]
mov ecx, esi
mov edx, dword [edx + 4]
mov dword [ebp - 0xcc], edx
add eax, edi
sub ecx, edi
mov edi, ecx
and edi, ebx
mov edx, ecx
sub edx, edi
mov dword [ebp - 0xd0], edx
mov edx, dword [ebp - 0x64]
add ecx, edx
mov edx, ecx
and edx, ebx
sub ecx, edx
mov dword [ebp - 0xe4], ecx
mov ecx, dword [ebp - 0xcc]
mov dword [ebp - 0xe8], edx
add ecx, eax
mov dword [ebp - 0xe0], ecx
cmp eax, ecx
je 0x48cc01
cmp dword [eax], edi
jae 0x48cc01
add eax, dword [eax + 4]
cmp eax, dword [ebp - 0xe0]
jne 0x48cbf2
xor edx, edx
cmp eax, dword [ebp - 0xe0]
je 0x48cc31
cmp dword [eax], edi
jne 0x48cc31
mov ecx, dword [eax + 4]
sub ecx, 8
shr ecx, 1
je 0x48cc31
movzx edi, word [eax + edx*2 + 8]
and edi, 0xfff
cmp edi, dword [ebp - 0xd0]
jae 0x48cc31
inc edx
cmp edx, ecx
jne 0x48cc19
mov edi, 0x2aa66c86
cmp eax, dword [ebp - 0xe0]
je 0x48cd6f
mov ecx, dword [ebp - 0xe8]
cmp dword [eax], ecx
ja 0x48cd6f
mov ecx, dword [eax + 4]
lea ebx, [ecx - 8]
shr ebx, 1
cmp edx, ebx
jne 0x48cc7c
add eax, ecx
cmp eax, dword [ebp - 0xe0]
je 0x48cd6f
mov ecx, dword [ebp - 0xe8]
cmp dword [eax], ecx
ja 0x48cd6f
xor edx, edx
jmp 0x48cc50
mov ecx, dword [eax]
cmp ecx, dword [ebp - 0xe8]
jne 0x48cc9d
movzx ecx, word [eax + edx*2 + 8]
and ecx, 0xfff
cmp ecx, dword [ebp - 0xe4]
jae 0x48cd6f
mov ecx, edx
inc edx
test word [eax + ecx*2 + 8], 0xf000
mov dword [ebp - 0xd8], edx
je 0x48cc36
movzx edx, word [eax + ecx*2 + 8]
and edx, 0xfff
xor ebx, ebx
mov ecx, dword [eax]
lea ecx, [ecx + edx + 0x400000]
mov dword [ebp - 0x64], ecx
sub dword [ebp - 0x64], esi
mov dword [ebp - 0xd0], ecx
je 0x48cd13
movzx edx, byte [ebx + esi]
add edx, edi
add dword [ebp - 0x60], edx
add edx, dword [ebp - 0x5c]
imul edx, edx, 0x2aa66c86
ror edx, 0x14
imul edx, edx, 0x2aa66c86
ror edx, 0x14
mov ecx, edx
imul ecx, ecx, 0x2434
rol ecx, 6
ror edx, 6
xor ecx, edx
add dword [ebp - 0x60], ecx
inc ebx
cmp ebx, dword [ebp - 0x64]
mov dword [ebp - 0x5c], ecx
jb 0x48ccd3
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ecx]
sub edx, dword [ebp - 0xf4]
xor ebx, ebx
mov dword [ebp - 0xf8], edx
movzx edx, byte [ebp + ebx - 0xf8]
add edx, edi
add dword [ebp - 0x60], edx
add edx, dword [ebp - 0x5c]
imul edx, edx, 0x2aa66c86
ror edx, 0x14
imul edx, edx, 0x2aa66c86
ror edx, 0x14
mov esi, edx
imul edx, edx, 0x2434
rol edx, 6
ror esi, 6
xor edx, esi
add dword [ebp - 0x60], edx
mov dword [ebp - 0x5c], edx
inc ebx
cmp ebx, 4
jb 0x48cd23
mov edx, dword [ebp - 0xd8]
lea esi, [ecx + 4]
jmp 0x48cc36
mov ebx, dword [ebp - 0x74]
xor edx, edx
sub ebx, esi
je 0x48cdb1
movzx eax, byte [edx + esi]
add eax, edi
add dword [ebp - 0x60], eax
add eax, dword [ebp - 0x5c]
imul eax, eax, 0x2aa66c86
ror eax, 0x14
imul eax, eax, 0x2aa66c86
ror eax, 0x14
mov ecx, eax
imul eax, eax, 0x2434
rol eax, 6
ror ecx, 6
xor eax, ecx
add dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
inc edx
cmp edx, ebx
jb 0x48cd78
xor edi, edi
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x60]
mov byte [ebp + eax - 0x54], cl
inc eax
cmp eax, 0x10
jb 0x48cdb5
mov eax, 0xca1eb43d
mov esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x10c], eax
mov eax, dword [0x5294e0]
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 - 0xc0]
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x6c]
sub eax, dword [ebp - 0xc0]
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 - 0x74], eax
push 0x10
lea edi, [ebp - 0xbc]
lea esi, [ebp - 0x138]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0xac]
mov edx, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0xbc]
mov dword [ebp - 0x64], 2
mov ebx, dword [ebp - 0xb8]
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 - 0xa8]
add ebx, edi
rol ebx, 7
xor dword [ebp - 0x98], 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
mov ebx, dword [ebp - 0x94]
ror edi, 0xe
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
ror edi, 0xe
mov ebx, dword [ebp - 0x80]
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
rol ebx, 0xd
mov edi, dword [ebp - 0xa0]
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
mov edi, dword [ebp - 0xb4]
rol ebx, 0xd
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 edi, dword [ebp - 0xa8]
mov ebx, dword [ebp - 0xa4]
add ebx, edi
mov edi, dword [ebp - 0xa4]
rol ebx, 9
xor dword [ebp - 0xa0], ebx
mov ebx, dword [ebp - 0xa0]
add ebx, edi
mov edi, dword [ebp - 0xa0]
rol ebx, 0xd
xor eax, ebx
mov ebx, dword [ebp - 0x98]
add edi, eax
ror edi, 0xe
xor dword [ebp - 0xa8], edi
mov edi, dword [ebp - 0x94]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x90], edi
mov edi, dword [ebp - 0x94]
mov ebx, dword [ebp - 0x90]
add ebx, edi
rol ebx, 9
xor ecx, ebx
mov edi, dword [ebp - 0x90]
add edi, ecx
mov ebx, dword [ebp - 0x84]
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 - 0x64]
jne 0x48ce96
mov dword [ebp - 0x8c], edx
push 0x40
mov dword [ebp - 0xac], eax
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0xbc], esi
xor edx, edx
xor eax, eax
pop ebx
mov ecx, dword [ebp + eax - 0x138]
add dword [ebp + eax - 0xbc], ecx
add eax, 4
cmp eax, ebx
jl 0x48d0f9
lea edi, [ebp - 0x44]
lea esi, [ebp - 0xbc]
inc dword [ebp - 0x118]
cmp dword [ebp - 0xc4], ebx
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
jbe 0x48d163
mov esi, dword [ebp - 0xcc]
mov eax, dword [ebp - 0x74]
lea edi, [esi + eax]
lea ecx, [ebp + edx - 0x44]
mov al, byte [ecx + edi]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
mov byte [ecx + esi], al
inc edx
cmp edx, ebx
jb 0x48d136
sub dword [ebp - 0xc4], ebx
add dword [ebp - 0x68], ebx
add esi, ebx
add dword [ebp - 0x78], ebx
mov dword [ebp - 0xcc], esi
jmp 0x48ce66
cmp dword [ebp - 0xc4], edx
jbe 0x48d190
lea eax, [ebp - 0x44]
mov esi, dword [ebp - 0x78]
sub esi, eax
mov edi, dword [ebp - 0x68]
sub edi, eax
lea ecx, [ebp + edx - 0x44]
mov al, byte [ecx + esi]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
inc edx
cmp edx, dword [ebp - 0xc4]
mov byte [ecx + edi], al
jb 0x48d178
mov edi, 0x400000
mov ebx, 0xfffff000
mov esi, dword [ebp - 0xc8]
mov eax, dword [ebp - 0x70]
mov al, byte [eax + 8]
xor al, byte [ebp - 0x55]
je 0x48d238
call fcn.004fdc7b
mov edx, 0xffff
mov edi, eax
mov eax, dword [ebp - 0xd4]
mov dword [eax + 8], 0x4b3c5b
lea ecx, [eax + 0xc]
and ecx, 0xfffffffc
lea esi, [ecx + 0xfff]
and edi, ebx
and esi, ebx
xor eax, eax
mov ebx, dword [0x51b214]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x51b214], ebx
shr ebx, 0x10
shl eax, 0x10
or eax, ebx
shr edx, 0x10
jne 0x48d1da
mov ebx, 0xffff
xor edx, edx
div ebx
mov dword [ebp - 0x150], edi
inc edx
mov dword [ebp - 0x144], edx
mov eax, ecx
mov dword [ebp - 0x74], 0
cmp ecx, esi
jae 0x48d22e
mov ecx, dword [ebp - 0x74]
mov dword [eax], ecx
add eax, 4
cmp eax, esi
jb 0x48d222
mov eax, 0x4b3c5b
jmp 0x48d314
mov ecx, dword [0x402600]
mov eax, dword [ebp - 0x6c]
sub eax, dword [ebp - 0xc0]
mov dword [ebp - 0xc8], eax
sub edi, ecx
mov dword [ebp - 0x70], edi
jne 0x48d25c
test eax, eax
je 0x48d304
mov eax, dword [ebp - 0x7c]
mov edi, dword [ebp - 0xc0]
mov ecx, dword [0x4bebb0]
sub edi, dword [ebp - 0x6c]
add eax, esi
xor esi, esi
mov dword [ebp - 0x74], eax
dec ecx
js 0x48d2a0
lea eax, [esi + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x4bebb4]
and edx, 0xfffffff
cmp dword [ebp - 0x7c], edx
jae 0x48d297
lea ecx, [eax - 1]
jmp 0x48d29c
jbe 0x48d2a4
lea esi, [eax + 1]
cmp ecx, esi
jge 0x48d278
mov ebx, esi
jmp 0x48d2fc
mov ebx, eax
jmp 0x48d2fc
mov eax, dword [ebx*4 + 0x4bebb4]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x74]
jae 0x48d304
lea esi, [ecx + edi + 0x400000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor edx, edx
dec ecx
je 0x48d2ec
dec ecx
je 0x48d2e4
dec ecx
jne 0x48d2f5
mov edx, dword [ebp - 0x70]
jmp 0x48d2f5
mov edx, dword [ebp - 0xc8]
jmp 0x48d2f5
mov edx, dword [ebp - 0x70]
sub edx, dword [ebp - 0xc8]
dec eax
dec eax
jne 0x48d2fb
add dword [esi], edx
inc ebx
cmp ebx, dword [0x4bebb0]
jb 0x48d2a8
mov eax, dword [0x4c7398]
mov eax, 0xb731f18b
mov eax, dword [ebp - 0xc0]
mov ecx, dword [ebp - 0xd4]
mov dword [ecx + 8], eax
mov esi, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x144]
mov ebx, dword [ebp - 0x148]
mov edi, dword [ebp - 0x140]
mov eax, dword [ebp - 0x14c]
mov edx, dword [ebp - 0x150]
mov esp, ebp
pop ebp
popfd
ret