Function at 0x4da480
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
push 0x38
mov ebx, edx
mov dword [ebp - 8], esi
push edi
push esi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], edi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebx + 4]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x4da4d3
mov esi, dword [ebx + 8]
mov ebx, eax
mov al, byte [esi + edx]
lea ecx, [edi + 1]
inc edx
test al, al
cmovle ecx, edi
mov edi, ecx
cmp edx, ebx
jl 0x4da4b5
mov esi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
mov dword [esi + 4], eax
mov dword [esi + 8], edi
mov eax, dword [ebx]
mov dword [esi], eax
test edi, edi
jle 0x4daa35
mov edx, dword [ebx + 4]
mov ecx, dword [ebx + 8]
push edi
call fcn.004da0d0
add esp, 4
mov dword [ebp - 0x10], eax
lea eax, [edi*4]
call fcn.004d6be0
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x18], ecx
test eax, eax
jne 0x4da570
mov eax, dword [esi + 0x10]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test eax, eax
je 0x4da522
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4da52f
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4da53c
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4da549
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4da556
push eax
call edi
add esp, 4
push 0x38
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
or eax, 0xffffffff
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jle 0x4da601
sub ecx, eax
mov dword [ebp - 0x1c], edi
mov ebx, eax
mov dword [ebp - 0x20], ecx
mov esi, ecx
mov ecx, dword [ebx]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov dword [ebx], ecx
mov dword [esi + ebx], ebx
add ebx, 4
sub edi, 1
jne 0x4da584
mov esi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push 0x4d9c30
push 4
push edi
push ecx
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
add esp, 0x10
lea eax, [edi*4]
call fcn.004d6be0
lea eax, [edi*4]
mov dword [ebp - 8], esp
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, dword [ebp - 8]
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], eax
test edi, edi
jle 0x4da684
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebx + ecx*4]
sub eax, dword [ebp - 0x10]
sar eax, 2
mov dword [edx + eax*4], ecx
inc ecx
cmp ecx, edi
jl 0x4da642
mov ebx, dword [ebp - 0xc]
test edi, edi
jle 0x4da684
mov eax, dword [ebp - 0x10]
mov ebx, edx
sub eax, edx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
mov edx, dword [ebx]
lea ebx, [ebx + 4]
mov ecx, dword [esi + 0x14]
mov eax, dword [eax + ebx - 4]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x1c]
sub edi, 1
jne 0x4da667
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov edx, edi
mov ecx, ebx
push dword [ebp - 8]
call fcn.004d9cd0
add esp, 4
mov dword [esi + 0x10], eax
lea eax, [edi*4]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
xor edx, edx
mov dword [esi + 0x18], eax
add esp, 4
xor edi, edi
cmp dword [ebx + 4], edx
jle 0x4da6dc
nop
mov eax, dword [ebx + 8]
cmp byte [edx + eax], 0
jle 0x4da6d6
mov eax, dword [ebp - 8]
mov ecx, dword [eax + edi*4]
inc edi
mov eax, dword [esi + 0x18]
mov dword [eax + ecx*4], edx
inc edx
cmp edx, dword [ebx + 4]
jl 0x4da6c0
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
xor edi, edi
mov dword [esi + 0x1c], eax
xor edx, edx
mov dword [esi + 0x28], 0
add esp, 4
mov dword [ebp - 0x14], edi
cmp dword [ebx + 4], edx
jle 0x4da769
nop dword [eax]
mov eax, dword [ebx + 8]
mov al, byte [edx + eax]
mov byte [ebp - 1], al
test al, al
jle 0x4da72f
mov eax, dword [ebp - 8]
mov bl, byte [ebp - 1]
mov ecx, dword [eax + edi*4]
inc edi
mov eax, dword [esi + 0x1c]
mov byte [ecx + eax], bl
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebx + 8]
movsx eax, byte [edx + eax]
cmp eax, dword [esi + 0x28]
jle 0x4da72f
mov dword [esi + 0x28], eax
inc edx
cmp edx, dword [ebx + 4]
jl 0x4da700
mov dword [ebp - 0x14], edi
cmp edi, 1
jne 0x4da769
cmp dword [esi + 0x28], edi
jne 0x4da769
push 4
push 2
mov dword [esi + 0x24], edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov dword [esi + 0x20], eax
add esp, 8
mov dword [eax + 4], edi
mov eax, dword [esi + 0x20]
mov dword [eax], edi
xor eax, eax
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 8]
xor ecx, ecx
test eax, eax
je 0x4da777
inc ecx
shr eax, 1
jne 0x4da772
lea eax, [ecx - 4]
mov ecx, 5
cmp eax, ecx
cmovl eax, ecx
mov dword [esi + 0x24], eax
cmp eax, 8
jle 0x4da793
mov dword [esi + 0x24], 8
mov ecx, dword [esi + 0x24]
mov eax, 1
shl eax, cl
push 4
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov dword [esi + 0x20], eax
xor ebx, ebx
test edi, edi
jle 0x4da892
nop dword [eax]
mov eax, dword [esi + 0x1c]
movsx ecx, byte [eax + ebx]
mov dword [ebp - 0x10], ecx
cmp ecx, dword [esi + 0x24]
jg 0x4da889
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + ebx*4]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor edx, edx
xor ecx, eax
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], ecx
mov eax, 1
mov ecx, dword [esi + 0x24]
sub ecx, dword [ebp - 0x10]
shl eax, cl
test eax, eax
jle 0x4da889
mov eax, dword [esi + 0x1c]
lea edi, [ebx + 1]
mov cl, byte [ebx + eax]
mov eax, dword [esi + 0x20]
shl edx, cl
or edx, dword [ebp - 0xc]
mov dword [eax + edx*4], edi
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x24]
mov edx, dword [ebp - 0x18]
inc edx
movsx eax, byte [eax + ebx]
sub ecx, eax
mov dword [ebp - 0x18], edx
mov eax, 1
shl eax, cl
cmp edx, eax
jl 0x4da854
mov edi, dword [ebp - 0x14]
inc ebx
cmp ebx, edi
jl 0x4da7c0
mov ecx, 0x1f
mov dword [ebp - 0x18], 0
sub ecx, dword [esi + 0x24]
mov eax, 0xfffffffe
shl eax, cl
xor ebx, ebx
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], eax
jle 0x4daa35
nop
mov ecx, 0x20
sub ecx, dword [esi + 0x24]
shl eax, cl
mov ecx, eax
mov dword [ebp - 0xc], eax
rol ecx, 0x10
mov edx, ecx
mov dword [ebp - 0x28], ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
mov eax, ecx
shl eax, 8
and edx, 0xff00ff
xor edx, eax
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov eax, dword [esi + 0x20]
cmp dword [eax + ecx*4], 0
jne 0x4daa25
mov edx, dword [ebp - 0x18]
lea ecx, [edx + 1]
cmp ecx, edi
jge 0x4da973
mov eax, dword [esi + 0x14]
mov ebx, dword [ebp - 0xc]
lea eax, [eax + edx*4]
add eax, 4
nop dword [eax]
cmp dword [eax], ebx
ja 0x4da96d
inc ecx
inc edx
add eax, 4
cmp ecx, edi
jl 0x4da960
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x18], edx
cmp ebx, edi
jge 0x4da995
mov eax, dword [esi + 0x14]
lea ecx, [eax + ebx*4]
nop dword [eax]
mov eax, dword [ecx]
and eax, dword [ebp - 0x24]
cmp dword [ebp - 0xc], eax
jb 0x4da992
inc ebx
add ecx, 4
cmp ebx, edi
jl 0x4da980
mov dword [ebp - 0x10], ebx
mov ecx, dword [ebp - 0x28]
sub edi, ebx
cmp edx, 0x7fff
mov ebx, edx
mov edx, ecx
mov eax, 0x7fff
cmova ebx, eax
cmp edi, eax
cmova edi, eax
mov eax, ecx
shr edx, 8
or ebx, 0xffff0000
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
shl ebx, 0xf
xor edx, ecx
or ebx, edi
mov ecx, edx
mov edi, dword [ebp - 0x14]
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov eax, dword [esi + 0x20]
mov dword [eax + ecx*4], ebx
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x20]
jl 0x4da8c0
xor eax, eax
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret