Function at 0x1033844
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 - 0x140], eax
lea eax, [ebp + 4]
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x13c], ebx
mov dword [ebp - 0x150], esi
mov dword [ebp - 0x148], edi
mov edi, 0xfffffff
mov esi, dword [eax + 4]
sub eax, 4
mov ebx, dword [0x102543c]
mov dword [ebp - 0xe8], eax
mov eax, dword [esi]
and eax, edi
lea ecx, [ebx + eax - 1]
xor edx, edx
mov eax, ecx
div ebx
mov eax, dword [0x102543c]
sub ecx, edx
mov dword [ebp - 0x7c], ecx
mov eax, dword [0x101a35c]
mov dword [ebp - 0x78], eax
mov eax, dword [0x102543c]
mov eax, dword [0x101a35c]
test eax, eax
je 0x1033941
and dword [ebp - 0x6c], 0
mov eax, dword [0x101a35c]
dec eax
lea ecx, [eax + 1]
xor eax, eax
test ecx, ecx
mov edx, ecx
je 0x10338f9
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 0x10338d2
xor edx, edx
div ecx
cmp dword [ebp - 0x78], 0
jbe 0x103393b
inc dword [ebp - 0x6c]
mov eax, 0xe941
lea ebx, [edx*4 + 0x1042454]
mov ecx, 0xffff16be
lock cmpxchg dword [ebx], ecx
cmp eax, 0xe941
je 0x1033af9
mov ecx, dword [0x101a35c]
lea eax, [edx + 1]
xor edx, edx
div ecx
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp - 0x78]
jb 0x1033903
xor ebx, ebx
test ebx, ebx
jne 0x10339ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x70], eax
xor ebx, ebx
push 0x40
push 0x1000
inc ebx
push dword [ebp - 0x7c]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x1033b0d
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, 0x11
jb 0x103394c
xor ebx, ebx
cmp ebx, 0x10000
jb 0x1033985
test ebx, 3
je 0x1033999
test ebx, ebx
je 0x1033997
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 0x10338a3
mov eax, ebx
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
je 0x10339ba
mov byte [eax], 0
inc eax
dec ecx
jne 0x10339b3
mov eax, 0xf038268a
mov eax, dword [esi + 4]
and eax, 7
lea eax, [eax + esi + 8]
mov esi, dword [esi]
and esi, edi
mov edi, 0x1000000
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x6c], eax
lea ecx, [esi + eax]
mov eax, dword [0x102543c]
mov dword [ebp - 0x70], ecx
sub eax, esi
lea ecx, [eax + 1]
sub dword [ebp - 0x80], edi
mov dword [ebp - 0xc8], esi
xor eax, eax
mov dword [ebp - 0x64], ecx
test ecx, ecx
je 0x1033a24
mov edx, dword [0x10410fc]
shr dword [ebp - 0x64], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x10410fc], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x64], 0
jne 0x10339fa
xor edx, edx
div ecx
push esi
push dword [ebp - 0x80]
add ebx, edx
mov dword [ebp - 0xc4], ebx
mov eax, ebx
mov eax, 0xf506d2b8
test esi, esi
mov eax, dword [ebp - 0x70]
pop ecx
pop ecx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x78], ebx
mov ebx, 0xfffff000
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0xcc], esi
mov dword [ebp - 0x7c], eax
je 0x1034129
lea esi, [ebp - 0xf0]
mov eax, 0x42858d45
mov eax, dword [ebp - 0xec]
mov ecx, 0xfffffff
mov esi, dword [ebp - 0xf0]
and dword [ebp - 0x60], 0
and dword [ebp - 0x5c], 0
and eax, ecx
and esi, ecx
add esi, edi
mov ecx, dword [0x1004f44]
mov dword [ebp - 0x64], eax
mov eax, edi
sub eax, ecx
mov dword [ebp - 0xf8], eax
jne 0x1033b14
xor edi, edi
cmp dword [ebp - 0x64], edi
jbe 0x1033d30
mov ecx, 0x637ce67c
movzx edx, byte [edi + esi]
add edx, ecx
add dword [ebp - 0x60], edx
add edx, dword [ebp - 0x5c]
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 - 0x60], eax
mov dword [ebp - 0x5c], eax
inc edi
cmp edi, dword [ebp - 0x64]
jb 0x1033ac0
jmp 0x1033d30
mov ebx, dword [0x102543c]
imul ebx, edx
lea ebx, [ebx + 0x1038008]
jmp 0x103393d
mov ebx, eax
jmp 0x1033975
mov edx, dword [0x100003c]
mov eax, dword [ebp - 0x64]
lea edx, [edx + 0x10000a0]
add eax, esi
mov dword [ebp - 0x74], eax
mov eax, dword [edx]
add eax, edi
mov ecx, esi
mov edx, dword [edx + 4]
sub ecx, edi
mov edi, ecx
and edi, ebx
mov dword [ebp - 0x68], edi
mov edi, ecx
sub edi, dword [ebp - 0x68]
mov dword [ebp - 0xd0], edi
mov edi, dword [ebp - 0x64]
add edx, eax
add ecx, edi
mov edi, ecx
and edi, ebx
mov ebx, eax
sub ecx, edi
mov dword [ebp - 0xe4], edi
mov dword [ebp - 0xe0], ecx
mov dword [ebp - 0xdc], edx
cmp eax, edx
je 0x1033b7c
mov eax, dword [ebp - 0x68]
cmp dword [ebx], eax
jae 0x1033b7c
add ebx, dword [ebx + 4]
cmp ebx, dword [ebp - 0xdc]
jne 0x1033b6a
mov edx, 0xfff
and dword [ebp - 0xd4], 0
cmp ebx, dword [ebp - 0xdc]
je 0x1033bc1
mov eax, dword [ebp - 0x68]
cmp dword [ebx], eax
jne 0x1033bc1
mov ecx, dword [ebx + 4]
sub ecx, 8
shr ecx, 1
je 0x1033bc1
lea eax, [ebx + 8]
movzx edi, word [eax]
and edi, edx
cmp edi, dword [ebp - 0xd0]
jae 0x1033bc1
inc dword [ebp - 0xd4]
inc eax
inc eax
cmp dword [ebp - 0xd4], ecx
jne 0x1033ba4
mov ecx, 0x637ce67c
cmp ebx, dword [ebp - 0xdc]
je 0x1033cf4
mov eax, dword [ebx]
cmp eax, dword [ebp - 0xe4]
ja 0x1033cf4
mov edi, dword [ebp - 0xd4]
mov eax, dword [ebx + 4]
add eax, 0xfffffff8
shr eax, 1
cmp edi, eax
jne 0x1033c13
add ebx, dword [ebx + 4]
cmp ebx, dword [ebp - 0xdc]
je 0x1033cf4
mov eax, dword [ebp - 0xe4]
cmp dword [ebx], eax
ja 0x1033cf4
xor edi, edi
jmp 0x1033be6
mov eax, dword [ebp - 0xe4]
cmp dword [ebx], eax
jne 0x1033c30
movzx eax, word [ebx + edi*2 + 8]
and eax, edx
cmp eax, dword [ebp - 0xe0]
jae 0x1033cf4
mov eax, edi
inc edi
mov dword [ebp - 0xd4], edi
mov edi, 0xf000
test word [ebx + eax*2 + 8], di
je 0x1033bc6
movzx eax, word [ebx + eax*2 + 8]
and eax, edx
mov edx, dword [ebx]
lea eax, [eax + edx + 0x1000000]
xor edi, edi
mov dword [ebp - 0x68], eax
sub dword [ebp - 0x68], esi
mov dword [ebp - 0xd0], eax
je 0x1033c99
movzx edx, byte [edi + esi]
add edx, ecx
add dword [ebp - 0x60], edx
add edx, dword [ebp - 0x5c]
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 - 0x60], eax
mov dword [ebp - 0x5c], eax
inc edi
cmp edi, dword [ebp - 0x68]
jb 0x1033c65
mov esi, dword [ebp - 0xd0]
mov eax, dword [esi]
sub eax, dword [ebp - 0xf8]
mov dword [ebp - 0xf4], eax
xor edi, edi
movzx edx, byte [ebp + edi - 0xf4]
add edx, ecx
add dword [ebp - 0x60], edx
add edx, dword [ebp - 0x5c]
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 - 0x60], eax
inc edi
cmp edi, 4
mov dword [ebp - 0x5c], eax
jb 0x1033caf
add esi, 4
mov edx, 0xfff
jmp 0x1033bc6
xor edi, edi
mov ebx, dword [ebp - 0x74]
sub ebx, esi
je 0x1033d30
movzx edx, byte [edi + esi]
add edx, ecx
add dword [ebp - 0x60], edx
add edx, dword [ebp - 0x5c]
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 - 0x60], eax
inc edi
mov dword [ebp - 0x5c], eax
cmp edi, ebx
jb 0x1033cfd
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 0x1033d34
mov eax, 0xe9aaa7ad
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x54]
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 - 0xc4]
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x108], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x6c]
sub eax, dword [ebp - 0xc4]
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
lea edi, [ebp - 0xc0]
lea esi, [ebp - 0x138]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xb0]
mov edx, dword [ebp - 0x90]
mov esi, dword [ebp - 0xc0]
mov dword [ebp - 0x68], 2
mov ebx, dword [ebp - 0xbc]
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 - 0xac]
add ebx, edi
rol ebx, 7
xor dword [ebp - 0x9c], ebx
mov ebx, dword [ebp - 0x9c]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x8c], edi
mov edi, ebx
mov ebx, dword [ebp - 0x8c]
add ebx, edi
mov edi, dword [ebp - 0x8c]
rol ebx, 0xd
xor dword [ebp - 0xbc], ebx
mov ebx, dword [ebp - 0xbc]
add edi, ebx
mov ebx, dword [ebp - 0x98]
ror edi, 0xe
xor dword [ebp - 0xac], edi
mov edi, dword [ebp - 0xa8]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x88], edi
mov edi, ebx
mov ebx, dword [ebp - 0x88]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xb8], edi
mov edi, ebx
mov ebx, dword [ebp - 0xb8]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xb8]
xor dword [ebp - 0xa8], ebx
mov ebx, dword [ebp - 0xa8]
add edi, ebx
ror edi, 0xe
mov ebx, dword [ebp - 0x84]
xor dword [ebp - 0x98], edi
mov edi, dword [ebp - 0x94]
add edi, ebx
rol edi, 7
xor dword [ebp - 0xb4], edi
mov edi, ebx
mov ebx, dword [ebp - 0xb4]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xa4], edi
mov edi, ebx
mov ebx, dword [ebp - 0xa4]
add ebx, edi
mov edi, dword [ebp - 0xa4]
rol ebx, 0xd
xor dword [ebp - 0x94], ebx
mov ebx, dword [ebp - 0x94]
add edi, ebx
ror edi, 0xe
xor dword [ebp - 0x84], edi
mov edi, dword [ebp - 0xb4]
add edi, esi
rol edi, 7
xor dword [ebp - 0xbc], edi
mov edi, dword [ebp - 0xbc]
add edi, esi
rol edi, 9
xor dword [ebp - 0xb8], edi
mov ebx, dword [ebp - 0xb8]
mov edi, dword [ebp - 0xbc]
add ebx, edi
mov edi, dword [ebp - 0xb8]
rol ebx, 0xd
xor dword [ebp - 0xb4], ebx
mov ebx, dword [ebp - 0xb4]
add ebx, edi
mov edi, dword [ebp - 0xac]
add edi, eax
ror ebx, 0xe
xor esi, ebx
rol edi, 7
xor dword [ebp - 0xa8], edi
mov edi, dword [ebp - 0xac]
mov ebx, dword [ebp - 0xa8]
add ebx, edi
mov edi, dword [ebp - 0xa8]
rol ebx, 9
xor dword [ebp - 0xa4], ebx
mov ebx, dword [ebp - 0xa4]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xa4]
xor eax, ebx
add edi, eax
ror edi, 0xe
mov ebx, dword [ebp - 0x9c]
xor dword [ebp - 0xac], edi
mov edi, dword [ebp - 0x98]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x94], edi
mov ebx, dword [ebp - 0x94]
mov edi, dword [ebp - 0x98]
add ebx, edi
rol ebx, 9
mov edi, dword [ebp - 0x94]
xor ecx, ebx
add edi, ecx
rol edi, 0xd
mov ebx, dword [ebp - 0x88]
xor dword [ebp - 0x9c], edi
mov edi, dword [ebp - 0x9c]
add edi, ecx
ror edi, 0xe
xor dword [ebp - 0x98], edi
mov edi, dword [ebp - 0x84]
add edi, ebx
rol edi, 7
xor edx, edi
mov edi, dword [ebp - 0x84]
add edi, edx
rol edi, 9
xor dword [ebp - 0x8c], edi
mov edi, dword [ebp - 0x8c]
add edi, edx
rol edi, 0xd
xor dword [ebp - 0x88], edi
mov edi, dword [ebp - 0x8c]
mov ebx, dword [ebp - 0x88]
add ebx, edi
ror ebx, 0xe
xor dword [ebp - 0x84], ebx
dec dword [ebp - 0x68]
jne 0x1033e16
mov dword [ebp - 0x90], edx
xor edx, edx
push 0x40
mov dword [ebp - 0xb0], eax
xor eax, eax
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0xc0], esi
pop ebx
mov ecx, dword [ebp + eax - 0x138]
add dword [ebp + eax - 0xc0], ecx
add eax, 4
cmp eax, ebx
jl 0x1034088
lea esi, [ebp - 0xc0]
lea edi, [ebp - 0x44]
inc dword [ebp - 0x118]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0xcc], ebx
jbe 0x10340ec
mov esi, dword [ebp - 0x64]
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
inc edx
mov byte [ecx + esi], al
cmp edx, ebx
jb 0x10340c2
sub dword [ebp - 0xcc], ebx
add dword [ebp - 0x78], ebx
add esi, ebx
add dword [ebp - 0x7c], ebx
mov dword [ebp - 0x64], esi
jmp 0x1033de6
cmp dword [ebp - 0xcc], edx
jbe 0x1034119
lea eax, [ebp - 0x44]
mov edi, dword [ebp - 0x78]
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 - 0xcc]
jb 0x1034101
mov ebx, 0xfffff000
mov esi, dword [ebp - 0xc8]
mov edi, 0x1000000
movzx ecx, byte [ebp - 0x55]
mov eax, dword [ebp - 0x70]
movzx eax, byte [eax + 8]
sub ecx, eax
je 0x10341c5
call fcn.0100cd3b
mov edi, eax
mov eax, dword [ebp - 0xe8]
mov edx, 0xffff
mov dword [eax + 8], 0x1023648
lea ecx, [eax + 0xc]
and ecx, 0xfffffffc
and edi, ebx
lea esi, [ecx + 0xfff]
and esi, 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 0x1034167
mov ebx, 0xffff
div ebx
inc edx
cmp ecx, esi
mov eax, ecx
mov dword [ebp - 0x14c], edi
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x74], 0
jae 0x10341bb
mov ecx, dword [ebp - 0x74]
mov dword [eax], ecx
add eax, 4
cmp eax, esi
jb 0x10341af
mov eax, 0x1023648
jmp 0x10342a1
mov eax, dword [ebp - 0x6c]
sub eax, dword [ebp - 0xc4]
mov ecx, dword [0x1004f44]
sub edi, ecx
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0x70], edi
jne 0x10341e9
test eax, eax
je 0x1034291
mov eax, dword [ebp - 0x80]
mov edi, dword [ebp - 0xc4]
mov ecx, dword [0x1009298]
sub edi, dword [ebp - 0x6c]
add eax, esi
xor esi, esi
dec ecx
mov dword [ebp - 0x74], eax
js 0x103422d
lea eax, [ecx + esi]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x100929c]
and edx, 0xfffffff
cmp dword [ebp - 0x80], edx
jae 0x1034224
lea ecx, [eax - 1]
jmp 0x1034229
jbe 0x1034231
lea esi, [eax + 1]
cmp ecx, esi
jge 0x1034205
mov ebx, esi
jmp 0x1034289
mov ebx, eax
jmp 0x1034289
mov eax, dword [ebx*4 + 0x100929c]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x74]
jae 0x1034291
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 0x1034279
dec ecx
je 0x1034271
dec ecx
jne 0x1034282
mov edx, dword [ebp - 0x70]
jmp 0x1034282
mov edx, dword [ebp - 0xc8]
jmp 0x1034282
mov edx, dword [ebp - 0x70]
sub edx, dword [ebp - 0xc8]
dec eax
dec eax
jne 0x1034288
add dword [esi], edx
inc ebx
cmp ebx, dword [0x1009298]
jb 0x1034235
mov eax, dword [0x102543c]
mov eax, 0xeea99e21
mov eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xe8]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x140]
mov ebx, dword [ebp - 0x13c]
mov edi, dword [ebp - 0x148]
mov edx, dword [ebp - 0x14c]
mov esi, dword [ebp - 0x150]
mov ecx, dword [ebp - 0x144]
mov esp, ebp
pop ebp
popfd
ret