Function at 0x426643
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 esi, dword [0x4c7398]
mov edi, dword [eax + 4]
sub eax, 4
mov dword [ebp - 0xe8], eax
mov eax, dword [edi]
shr eax, 4
lea ecx, [esi + eax - 1]
mov eax, ecx
xor edx, edx
div esi
sub ecx, edx
mov eax, dword [0x4c7398]
mov dword [ebp - 0x6c], ecx
mov eax, dword [0x403ef8]
mov dword [ebp - 0x7c], eax
mov eax, dword [0x4c7398]
mov eax, dword [0x403ef8]
test eax, eax
je 0x426733
xor esi, esi
mov eax, dword [0x403ef8]
dec eax
lea ecx, [eax + 1]
mov edx, ecx
xor eax, eax
test ecx, ecx
je 0x4266ec
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 0x4266c7
xor edx, edx
div ecx
cmp dword [ebp - 0x7c], 0
jbe 0x426729
inc esi
lea ebx, [edx*4 + 0x529524]
mov eax, 0x3c6f
mov ecx, 0xffffc390
lock cmpxchg dword [ebx], ecx
cmp eax, 0x3c6f
je 0x426922
lea eax, [edx + 1]
mov ecx, dword [0x403ef8]
xor edx, edx
div ecx
cmp esi, dword [ebp - 0x7c]
jb 0x4266f6
and dword [ebp - 0x64], 0
cmp dword [ebp - 0x64], 0
jne 0x4267ad
call dword [sym.imp.kernel32.dll_GetLastError]
xor esi, esi
mov ebx, eax
inc esi
push 0x40
push 0x1000
push dword [ebp - 0x6c]
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
test eax, eax
jne 0x426938
push eax
call dword [sym.imp.kernel32.dll_Sleep]
cmp esi, 0x11
jb 0x42673d
xor esi, esi
mov dword [ebp - 0x64], esi
cmp dword [0x51b2c4], esi
ja 0x426779
test esi, 3
je 0x426790
test esi, esi
je 0x42678b
push 0x8000
push 0
push esi
call dword [sym.imp.kernel32.dll_VirtualFree]
xor esi, esi
mov dword [ebp - 0x64], esi
push ebx
call dword [sym.imp.kernel32.dll_SetLastError]
test esi, esi
je 0x42669e
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x4267ad
mov byte [esi], 0
inc esi
dec eax
jne 0x4267a6
mov eax, 0x4aff766e
mov esi, 0x400000
mov ebx, dword [edi]
mov eax, ebx
shr eax, 1
and eax, 7
shr ebx, 4
lea edi, [eax + edi + 8]
lea eax, [ebx + edi]
mov dword [ebp - 0xc0], eax
mov eax, dword [0x4c7398]
mov dword [ebp - 0xcc], edi
sub eax, ebx
lea ecx, [eax + 1]
sub dword [ebp - 0xcc], esi
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0xc4], ebx
xor eax, eax
test ecx, ecx
mov dword [ebp - 0x6c], ecx
je 0x42681e
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 - 0x6c], 0x10
jne 0x4267f8
xor edx, edx
div ecx
mov eax, dword [ebp - 0x64]
add eax, edx
push eax
push ebx
push dword [ebp - 0xcc]
mov dword [ebp - 0x64], eax
mov eax, 0xd03ff77f
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x64]
add esp, 0xc
test ebx, ebx
mov dword [ebp - 0xd0], edi
mov edi, 0xfffff000
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0xc8], ebx
mov dword [ebp - 0x6c], eax
je 0x426fac
lea eax, [ebp - 0xf0]
push eax
mov eax, 0x24e12787
mov ebx, dword [ebp - 0xf0]
mov eax, dword [ebp - 0xec]
and dword [ebp - 0x60], 0
and dword [ebp - 0x5c], 0
pop ecx
mov ecx, 0xfffffff
and eax, ecx
and ebx, ecx
mov ecx, dword [0x402600]
add ebx, esi
mov dword [ebp - 0x74], eax
mov eax, esi
sub eax, ecx
mov dword [ebp - 0xf4], eax
jne 0x426942
xor edi, edi
cmp dword [ebp - 0x74], edi
jbe 0x426bc4
mov esi, 0x35592d4d
mov ecx, 0x7fffffff
movzx eax, byte [edi + ebx]
mov edx, 0xcaa6d2b3
sub eax, esi
add dword [ebp - 0x60], eax
add eax, dword [ebp - 0x5c]
imul eax, eax, 0xcaa6d2b3
ror eax, 0x1d
mul edx
lea edx, [eax + edx*2 - 0x7fffffff]
sar eax, 0x1f
and eax, ecx
sub edx, eax
mov eax, edx
sar eax, 0x1f
and eax, ecx
add eax, edx
mov edx, eax
imul edx, edx, 0xd63d
rol edx, 3
ror eax, 3
xor edx, eax
add dword [ebp - 0x60], edx
inc edi
cmp edi, dword [ebp - 0x74]
mov dword [ebp - 0x5c], edx
jb 0x4268ce
jmp 0x426bc4
mov eax, dword [0x4c7398]
imul eax, edx
lea eax, [eax + section..data]
mov dword [ebp - 0x64], eax
jmp 0x42672d
mov dword [ebp - 0x64], eax
mov esi, eax
jmp 0x426769
mov eax, dword [ebp - 0x74]
mov edx, dword [0x40003c]
mov ecx, ebx
add eax, ebx
lea edx, [edx + 0x4000a0]
mov dword [ebp - 0x70], eax
mov eax, dword [edx]
add eax, esi
mov edx, dword [edx + 4]
sub ecx, esi
mov dword [ebp - 0x78], edx
mov esi, ecx
and esi, edi
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x68], esi
mov esi, ecx
sub esi, dword [ebp - 0x68]
add ecx, edx
mov edx, ecx
and edx, edi
mov edi, eax
sub ecx, edx
mov dword [ebp - 0xe0], ecx
mov ecx, dword [ebp - 0x78]
add ecx, eax
mov dword [ebp - 0xe4], edx
mov dword [ebp - 0xdc], ecx
cmp eax, ecx
je 0x4269a6
mov eax, dword [edi]
cmp eax, dword [ebp - 0x68]
jae 0x4269a6
add edi, dword [edi + 4]
cmp edi, ecx
jne 0x426998
and dword [ebp - 0xd4], 0
cmp edi, ecx
je 0x4269e5
mov eax, dword [ebp - 0x68]
cmp dword [edi], eax
jne 0x4269e5
mov eax, dword [edi + 4]
sub eax, 8
shr eax, 1
je 0x4269e5
mov ecx, dword [ebp - 0xd4]
movzx ecx, word [edi + ecx*2 + 8]
and ecx, 0xfff
cmp ecx, esi
jae 0x4269e5
inc dword [ebp - 0xd4]
cmp dword [ebp - 0xd4], eax
jne 0x4269c2
mov esi, 0x35592d4d
mov ecx, 0x7fffffff
cmp edi, dword [ebp - 0xdc]
je 0x426b69
cmp dword [edi], edx
ja 0x426b69
mov eax, dword [edi + 4]
lea edx, [eax - 8]
shr edx, 1
mov eax, dword [ebp - 0xd4]
cmp eax, edx
jne 0x426a3b
add edi, dword [edi + 4]
cmp edi, dword [ebp - 0xdc]
je 0x426b69
mov eax, dword [ebp - 0xe4]
cmp dword [edi], eax
ja 0x426b69
and dword [ebp - 0xd4], 0
jmp 0x426a03
mov edx, dword [ebp - 0xe4]
cmp dword [edi], edx
jne 0x426a61
movzx eax, word [edi + eax*2 + 8]
and eax, 0xfff
cmp eax, dword [ebp - 0xe0]
jae 0x426b69
mov eax, dword [ebp - 0xd4]
inc dword [ebp - 0xd4]
test word [edi + eax*2 + 8], 0xf000
mov dword [ebp - 0x78], eax
je 0x4269ef
movzx eax, word [edi + eax*2 + 8]
mov edx, dword [edi]
and dword [ebp - 0x74], 0
and eax, 0xfff
lea eax, [eax + edx + 0x400000]
mov dword [ebp - 0x68], eax
sub dword [ebp - 0x68], ebx
mov dword [ebp - 0x78], eax
je 0x426af2
mov edx, 0xcaa6d2b3
mov eax, dword [ebp - 0x74]
movzx eax, byte [eax + ebx]
sub eax, esi
add dword [ebp - 0x60], eax
add eax, dword [ebp - 0x5c]
imul eax, eax, 0xcaa6d2b3
ror eax, 0x1d
mul edx
lea edx, [eax + edx*2 - 0x7fffffff]
sar eax, 0x1f
and eax, ecx
sub edx, eax
mov eax, edx
sar eax, 0x1f
and eax, ecx
add eax, edx
mov edx, eax
imul edx, edx, 0xd63d
rol edx, 3
ror eax, 3
xor edx, eax
mov eax, edx
add dword [ebp - 0x60], eax
inc dword [ebp - 0x74]
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x68]
mov dword [ebp - 0x5c], edx
jb 0x426a99
mov eax, dword [ebp - 0x78]
mov eax, dword [eax]
sub eax, dword [ebp - 0xf4]
mov dword [ebp - 0xf8], eax
xor ebx, ebx
mov edx, 0xcaa6d2b3
movzx eax, byte [ebp + ebx - 0xf8]
sub eax, esi
add dword [ebp - 0x60], eax
add eax, dword [ebp - 0x5c]
imul eax, eax, 0xcaa6d2b3
ror eax, 0x1d
mul edx
lea edx, [eax + edx*2 - 0x7fffffff]
sar eax, 0x1f
and eax, ecx
sub edx, eax
mov eax, edx
sar eax, 0x1f
and eax, ecx
add eax, edx
mov edx, eax
imul edx, edx, 0xd63d
rol edx, 3
ror eax, 3
xor edx, eax
add dword [ebp - 0x60], edx
inc ebx
mov dword [ebp - 0x5c], edx
cmp ebx, 4
jb 0x426b05
mov edx, dword [ebp - 0xe4]
mov ebx, dword [ebp - 0x78]
add ebx, 4
jmp 0x4269ef
xor edi, edi
mov eax, dword [ebp - 0x70]
sub eax, ebx
mov dword [ebp - 0x70], eax
je 0x426bc4
mov edx, 0xcaa6d2b3
movzx eax, byte [edi + ebx]
sub eax, esi
add dword [ebp - 0x60], eax
add eax, dword [ebp - 0x5c]
imul eax, eax, 0xcaa6d2b3
ror eax, 0x1d
mul edx
lea edx, [eax + edx*2 - 0x7fffffff]
sar eax, 0x1f
and eax, ecx
sub edx, eax
mov eax, edx
sar eax, 0x1f
and eax, ecx
add eax, edx
mov edx, eax
imul edx, edx, 0xd63d
rol edx, 3
ror eax, 3
xor edx, eax
add dword [ebp - 0x60], edx
inc edi
cmp edi, dword [ebp - 0x70]
mov dword [ebp - 0x5c], edx
jb 0x426b75
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 0x426bc8
mov eax, 0xa42be389
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x48]
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 - 0x64]
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x7c]
sub eax, dword [ebp - 0x64]
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 esi, [ebp - 0x138]
lea edi, [ebp - 0xbc]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0xac]
mov ecx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0xbc]
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0x78], 3
lea edi, [edx + esi]
mov ebx, dword [ebp - 0xa8]
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
rol ebx, 0xd
mov edi, dword [ebp - 0x88]
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
mov edi, dword [ebp - 0xb4]
rol ebx, 0xd
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 ebx, dword [ebp - 0xb4]
mov edi, dword [ebp - 0xb8]
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 edi, dword [ebp - 0xa8]
mov ebx, dword [ebp - 0xa4]
add ebx, edi
rol ebx, 9
mov edi, dword [ebp - 0xa4]
xor dword [ebp - 0xa0], ebx
mov ebx, dword [ebp - 0xa0]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xa0]
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 ebx, dword [ebp - 0x90]
mov edi, dword [ebp - 0x94]
add ebx, edi
mov edi, dword [ebp - 0x90]
rol ebx, 9
xor ecx, ebx
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 - 0x78]
jne 0x426ca0
mov dword [ebp - 0x8c], edx
push 0x40
mov dword [ebp - 0xac], eax
xor edx, edx
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 0x426f05
lea esi, [ebp - 0xbc]
lea edi, [ebp - 0x44]
inc dword [ebp - 0x118]
cmp dword [ebp - 0xc8], ebx
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
jbe 0x426f6c
mov esi, dword [ebp - 0x68]
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
mov byte [ecx + esi], al
cmp edx, ebx
jb 0x426f3f
sub dword [ebp - 0xc8], ebx
add dword [ebp - 0x6c], ebx
add esi, ebx
add dword [ebp - 0xd0], ebx
mov dword [ebp - 0x68], esi
jmp 0x426c70
cmp dword [ebp - 0xc8], edx
jbe 0x426f9c
mov esi, dword [ebp - 0xd0]
mov edi, dword [ebp - 0x6c]
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
cmp edx, dword [ebp - 0xc8]
mov byte [ecx + edi], al
jb 0x426f84
mov ebx, dword [ebp - 0xc4]
mov esi, 0x400000
mov edi, 0xfffff000
mov eax, dword [ebp - 0xc0]
mov al, byte [eax + 8]
xor al, byte [ebp - 0x55]
je 0x427043
call fcn.004a46e1
mov edx, 0xffff
mov ebx, eax
mov eax, dword [ebp - 0xe8]
mov dword [eax + 8], 0x4b3c5b
lea ecx, [eax + 0xc]
and ecx, 0xfffffffc
and ebx, edi
lea esi, [ecx + 0xfff]
and esi, edi
xor eax, eax
mov edi, dword [0x51b214]
imul edi, edi, 0x343fd
add edi, 0x269ec3
mov dword [0x51b214], edi
shr edi, 0x10
shl eax, 0x10
or eax, edi
shr edx, 0x10
jne 0x426fe9
mov edi, 0xffff
xor edx, edx
div edi
inc edx
mov dword [ebp - 0x150], ebx
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x70], 0
jmp 0x427035
mov eax, dword [ebp - 0x70]
mov dword [ecx], eax
add ecx, 4
cmp ecx, esi
jb 0x42702d
mov eax, 0x4b3c5b
jmp 0x427122
mov eax, dword [ebp - 0x7c]
mov ecx, dword [0x402600]
sub eax, dword [ebp - 0x64]
sub esi, ecx
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xc0], esi
jne 0x427067
test eax, eax
je 0x427115
mov ecx, dword [0x4bebb0]
mov esi, dword [ebp - 0x64]
mov edi, dword [ebp - 0xcc]
lea eax, [ebx + edi]
sub esi, dword [ebp - 0x7c]
mov dword [ebp - 0x70], eax
xor ebx, ebx
dec ecx
js 0x4270ab
lea eax, [ebx + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x4bebb4]
and edx, 0xfffffff
cmp edi, edx
jae 0x4270a2
lea ecx, [eax - 1]
jmp 0x4270a7
jbe 0x4270af
lea ebx, [eax + 1]
cmp ecx, ebx
jge 0x427084
mov edi, ebx
jmp 0x42710d
mov edi, eax
jmp 0x42710d
mov eax, dword [edi*4 + 0x4bebb4]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x70]
jae 0x427115
lea ebx, [ecx + esi + 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 0x4270fa
dec ecx
je 0x4270f2
dec ecx
jne 0x427106
mov edx, dword [ebp - 0xc0]
jmp 0x427106
mov edx, dword [ebp - 0xc4]
jmp 0x427106
mov edx, dword [ebp - 0xc0]
sub edx, dword [ebp - 0xc4]
dec eax
dec eax
jne 0x42710c
add dword [ebx], edx
inc edi
cmp edi, dword [0x4bebb0]
jb 0x4270b3
mov eax, dword [0x4c7398]
mov eax, 0x5969890c
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0xe8]
mov dword [ecx + 8], eax
mov ecx, dword [ebp - 0x144]
mov ebx, dword [ebp - 0x148]
mov esi, dword [ebp - 0x13c]
mov edi, dword [ebp - 0x140]
mov eax, dword [ebp - 0x14c]
mov edx, dword [ebp - 0x150]
mov esp, ebp
pop ebp
popfd
ret