Function at 0x52ae70
Capabilities:
Encode data using xor
Encrypt data using speck

Disassembly:
les ecx, [ecx + ebp]
dec ebp
cld
add eax, ecx
sub dword [esi + 0x40], ecx
mov dword [ebp - 8], eax
cmp dword [esi + 0x40], 0
jne 0x52bd2b
mov dword [esi + 0x40], 0
mov dword [esi], 6
test dword [esi + 0x10], 0x800
je 0x52aee8
cmp dword [ebp - 0x34], 0xffffffcc
int3
lodsd eax, dword [esi]
jge 0x52ae9c
pop ss
jae 0x52ae7f
push ds
stc
stosb byte es:[edi], al
pop esp
or cl, cl
xor ch, bh
cwde
jno 0x52ae2d
xor dword [edi], ebx
fiadd word [ebx]
push 0x3bb327b7
add ebp, dword [eax - 0x49]
daa
mov bl, 0x3b
sahf
lodsb al, byte [esi]
sal byte [esi - 0x26], 0x94
jg 0x52ae4b
ficom dword [edi + edi*2 + 0x43007cb8]
jl 0x52ae95
inc ebx
ret
ret
popfd
in eax, 0x9b
or ch, cl
or bl, byte [ebx + 0x485bf30d]
scasb al, byte es:[edi]
inc ebp
cdq
aaa
sar al, cl
je 0x52ae85
or al, 0x1d
invalid
and eax, edx
scasb al, byte es:[edi]
pushfd
fnsave dword [ecx]
jl 0x52af69
pop es
or ebp, eax
xchg esp, eax
push es
pop es
rol bl, 1
mov byte [0x58dfd4cf], al
jge 0x52af10
jae 0x52ae8f
jl 0x52ae97
lcall 0xf72e, 0x242ed90f
and dword [edx - 0x1f], 0x919984b0
xchg ecx, eax
sub edi, 0x14
jo 0x52af7e
insd dword es:[edi], dx
mov bh, 0xda
arpl word [edi + ebp + 0x7bdcce76], sp
leave
out dx, al
add byte [edi], bl
pop edx
ret
jle 0x52af9d
ret
inc ebx
fistp dword [ebp - 0x6403c3a6]
xor byte [edi - 0x78], bh
jl 0x52af75
pop esi
push ebx
ret
jbe 0x52af55
or byte [ebx + 0xc], dh
loopne 0x52af11
adc byte [esi], 0xa0
sub eax, dword [edi]
mov byte [0x96d5a02], al
adc esi, dword [esi + 0x481782ee]
punpcklbw mm6, dword [ecx + 0x18239327]
push ebx
and al, byte [edx]
pop es
dec si
salc
add dword [eax - 0x3154bbef], 0xffffffab
stosd dword es:[edi], eax
into
stosd dword es:[edi], eax
pop ss
sal dword [ecx - 0x97b67c4], 1
lds ebx, [0xad083ce]
mov esi, 0x5a9b9a47
jp 0x52afa8
popfd
clc
mov al, ch
xchg esp, eax
or cl, dl
pop ebx
xor al, 0xae
into
pop esp
dec ebp
stc
mov ecx, 0xb47308b8
fstp qword [0x2d09fc6]
mov dl, 0xcb
xlatb
imul edx, ecx, 0x30
jl 0x52b039
clc
mov al, ch
xchg esp, eax
add cl, byte [esi - 0x3d]
ret
sub bh, byte [ecx + edx]
pop edx
dec ebp
sbb eax, 0xf6128d13
pop ebp
mov eax, 0x27b7decb
and dword [ebx], 0xffffff9e
xchg esp, eax
int3
enter 0xffffffffffffbb71, 0x31
imul ebx, esi, 0xfffffffb
cmp edi, dword [ebx + 0x6e]
inc ebp
stosb byte es:[edi], al
pop ds
pop edx
jge 0x52b158
pop ecx
adc esp, esi
aas
ljmp 0x8a45:0x4e35d09b
xor eax, 0x1f8a454e
dec esi
inc ebp
mov bl, byte [edi]
pop ds
loop 0x52b157
jbe 0x52b13f
invalid
add byte [ebx + 0x41c7084d], cl
sbb byte [eax - 0x16ff64cf], ah
mov esi, 0x8d000006
xchg byte [eax], dh
add eax, 0x4e8d0000
insb byte es:[edi], dx
mov dword [ecx], eax
mov dword [esi + 0x4c], eax
lea edx, [esi + 0x2f0]
push edx
lea eax, [esi + 0x54]
push eax
push ecx
mov dword [eax], 9
mov eax, dword [esi + 0x60]
push eax
lea ecx, [esi + 0x70]
push ecx
push 1
call fcn.0052ce08
add esp, 0x18
mov dword [ebp - 0x28], eax
test eax, eax
je 0x52bd86
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 8]
mov dword [edx + 0x18], 0x9b3184
jmp 0x52c3f9
mov eax, dword [esi + 0x6c]
lea ecx, [esi + 0x6c]
mov dword [esi + 0x50], eax
lea edx, [esi + 0x2f0]
push edx
mov edx, dword [esi + 0x60]
lea eax, [esi + 0x58]
push eax
push ecx
mov ecx, dword [esi + 0x64]
mov dword [eax], 6
push ecx
lea eax, [esi + edx*2 + 0x70]
push eax
push 2
call fcn.0052ce08
add esp, 0x18
mov dword [ebp - 0x28], eax
test eax, eax
mov eax, dword [ebp - 8]
je 0x52bdd0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x18], 0x9b316c
jmp 0x52c3f9
cmp dword [ebp + 0xc], 6
mov dword [esi], 0x13
je 0x52c456
mov dword [esi], 0x14
cmp dword [ebp - 4], 6
jb 0x52be5c
cmp dword [ebp - 0x10], 0x102
jb 0x52be5c
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0xc], edx
mov edx, dword [ebp - 8]
mov dword [eax], edx
mov edx, dword [ebp - 0x20]
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp - 4]
push edx
mov dword [eax + 4], ecx
push eax
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], edi
call fcn.0052c768
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov ebx, dword [esi + 0x38]
mov edi, dword [esi + 0x3c]
mov dword [ebp - 0x18], ecx
mov ecx, dword [eax]
mov dword [ebp - 0x10], edx
mov edx, dword [eax + 4]
add esp, 8
cmp dword [esi], 0xb
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov eax, ecx
jne 0x52c3ff
mov dword [esi + 0x1bc4], 0xffffffff
jmp 0x52c3ff
mov ecx, dword [esi + 0x54]
mov edx, 1
shl edx, cl
mov ecx, dword [esi + 0x4c]
mov dword [esi + 0x1bc4], 0
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [ebp - 0xc], edx
cmp ecx, edi
jbe 0x52bec7
cmp dword [ebp - 4], 0
je 0x52c456
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, edi
shl edx, cl
mov ecx, dword [esi + 0x54]
inc eax
add edi, 8
add ebx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 8], eax
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [ebp - 0xc], edx
cmp ecx, edi
ja 0x52be88
test dl, dl
je 0x52bf8f
test dl, 0xf0
jne 0x52bf8f
mov ecx, edx
shr ecx, 8
mov dword [ebp - 0x2c], ecx
movzx ecx, cl
mov dword [ebp - 0x1c], ecx
movzx ecx, dl
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], edx
mov edx, 1
shl edx, cl
mov ecx, dword [ebp - 0x1c]
dec edx
and edx, ebx
shr edx, cl
mov ecx, dword [ebp - 0xc]
shr ecx, 0x10
add edx, ecx
mov ecx, dword [esi + 0x4c]
mov ecx, dword [ecx + edx*4]
mov dword [ebp - 0xc], ecx
shr ecx, 8
movzx edx, cl
movzx ecx, byte [ebp - 0x2c]
add edx, ecx
cmp edx, edi
jbe 0x52bf7e
jmp 0x52bf28
cmp dword [ebp - 4], 0
je 0x52c456
movzx edx, byte [eax]
mov ecx, edi
shl edx, cl
mov ecx, dword [ebp - 0x24]
dec dword [ebp - 4]
inc eax
add ebx, edx
movzx edx, ch
movzx ecx, cl
add ecx, edx
mov dword [ebp - 0x1c], edx
mov edx, 1
shl edx, cl
mov ecx, dword [ebp - 0x1c]
add edi, 8
mov dword [ebp - 8], eax
dec edx
and edx, ebx
shr edx, cl
movzx ecx, word [ebp - 0x22]
add edx, ecx
mov ecx, dword [esi + 0x4c]
mov ecx, dword [ecx + edx*4]
mov dword [ebp - 0xc], ecx
shr ecx, 8
movzx edx, cl
add edx, dword [ebp - 0x1c]
cmp edx, edi
ja 0x52bf28
movzx ecx, byte [ebp - 0x23]
mov edx, dword [ebp - 0xc]
shr ebx, cl
sub edi, ecx
mov dword [esi + 0x1bc4], ecx
mov ecx, edx
shr ecx, 8
movzx ecx, cl
add dword [esi + 0x1bc4], ecx
shr ebx, cl
sub edi, ecx
mov dword [ebp - 0x1c], ecx
mov ecx, edx
shr ecx, 0x10
mov dword [esi + 0x40], ecx
test dl, dl
jne 0x52bfbb
mov dword [esi], 0x19
jmp 0x52c3ff
test dl, 0x20
je 0x52bfd5
mov dword [esi + 0x1bc4], 0xffffffff
mov dword [esi], 0xb
jmp 0x52c3ff
test dl, 0x40
je 0x52bfe9
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], 0x9b3150
jmp 0x52c3f9
movzx ecx, dl
and ecx, 0xf
mov dword [esi + 0x48], ecx
mov dword [esi], 0x15
mov ecx, dword [esi + 0x48]
test ecx, ecx
je 0x52c044
cmp edi, ecx
jae 0x52c02a
jmp 0x52c008
cmp dword [ebp - 4], 0
je 0x52c456
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, edi
shl edx, cl
inc eax
add edi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp edi, dword [esi + 0x48]
jb 0x52c008
mov ecx, dword [esi + 0x48]
mov edx, 1
shl edx, cl
sub edi, ecx
dec edx
and edx, ebx
add dword [esi + 0x40], edx
shr ebx, cl
add dword [esi + 0x1bc4], ecx
mov ecx, dword [esi + 0x40]
mov dword [esi + 0x1bc8], ecx
mov dword [esi], 0x16
mov ecx, dword [esi + 0x58]
mov edx, 1
shl edx, cl
mov ecx, dword [esi + 0x50]
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [ebp - 0xc], edx
cmp ecx, edi
jbe 0x52c0b7
lea ecx, [ecx]
cmp dword [ebp - 4], 0
je 0x52c456
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, edi
shl edx, cl
mov ecx, dword [esi + 0x58]
inc eax
add edi, 8
add ebx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [esi + 0x50]
mov dword [ebp - 8], eax
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [ebp - 0xc], edx
cmp ecx, edi
ja 0x52c078
test dl, 0xf0
jne 0x52c16f
mov ecx, edx
shr ecx, 8
mov dword [ebp - 0x2c], ecx
movzx ecx, cl
mov dword [ebp - 0x1c], ecx
movzx ecx, dl
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], edx
mov edx, 1
shl edx, cl
mov ecx, dword [ebp - 0x1c]
dec edx
and edx, ebx
shr edx, cl
mov ecx, dword [ebp - 0xc]
shr ecx, 0x10
add edx, ecx
mov ecx, dword [esi + 0x50]
mov ecx, dword [ecx + edx*4]
mov dword [ebp - 0xc], ecx
shr ecx, 8
movzx edx, cl
movzx ecx, byte [ebp - 0x2c]
add edx, ecx
cmp edx, edi
jbe 0x52c15e
nop
cmp dword [ebp - 4], 0
je 0x52c456
movzx edx, byte [eax]
mov ecx, edi
shl edx, cl
mov ecx, dword [ebp - 0x24]
dec dword [ebp - 4]
inc eax
add ebx, edx
movzx edx, ch
movzx ecx, cl
add ecx, edx
mov dword [ebp - 0x1c], edx
mov edx, 1
shl edx, cl
mov ecx, dword [ebp - 0x1c]
add edi, 8
mov dword [ebp - 8], eax
dec edx
and edx, ebx
shr edx, cl
movzx ecx, word [ebp - 0x22]
add edx, ecx
mov ecx, dword [esi + 0x50]
mov ecx, dword [ecx + edx*4]
mov dword [ebp - 0xc], ecx
shr ecx, 8
movzx edx, cl
add edx, dword [ebp - 0x1c]
cmp edx, edi
ja 0x52c108
movzx ecx, byte [ebp - 0x23]
mov edx, dword [ebp - 0xc]
shr ebx, cl
sub edi, ecx
add dword [esi + 0x1bc4], ecx
mov ecx, edx
shr ecx, 8
movzx ecx, cl
add dword [esi + 0x1bc4], ecx
shr ebx, cl
sub edi, ecx
mov dword [ebp - 0x1c], ecx
test dl, 0x40
je 0x52c198
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], 0x9b3138
jmp 0x52c3f9
mov ecx, edx
movzx edx, dl
shr ecx, 0x10
and edx, 0xf
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi], 0x17
mov ecx, dword [esi + 0x48]
test ecx, ecx
je 0x52c1f6
cmp edi, ecx
jae 0x52c1dc
cmp dword [ebp - 4], 0
je 0x52c456
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, edi
shl edx, cl
inc eax
add edi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp edi, dword [esi + 0x48]
jb 0x52c1ba
mov ecx, dword [esi + 0x48]
mov edx, 1
shl edx, cl
sub edi, ecx
dec edx
and edx, ebx
add dword [esi + 0x44], edx
shr ebx, cl
add dword [esi + 0x1bc4], ecx
mov dword [esi], 0x18
cmp dword [ebp - 0x10], 0
je 0x52c456
mov edx, dword [ebp - 0x20]
sub edx, dword [ebp - 0x10]
mov ecx, dword [esi + 0x44]
cmp ecx, edx
jbe 0x52c267
sub ecx, edx
mov dword [ebp - 0xc], ecx
cmp ecx, dword [esi + 0x2c]
jbe 0x52c235
cmp dword [esi + 0x1bc0], 0
je 0x52c235
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x18], 0x9b3118
jmp 0x52c3f9
mov edx, dword [esi + 0x30]
cmp ecx, edx
jbe 0x52c24b
sub ecx, edx
mov edx, dword [esi + 0x34]
add edx, dword [esi + 0x28]
mov dword [ebp - 0xc], ecx
sub edx, ecx
jmp 0x52c256
mov edx, dword [esi + 0x34]
sub edx, ecx
add edx, dword [esi + 0x30]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x2c], edx
mov edx, dword [esi + 0x40]
mov dword [ebp - 0x24], edx
cmp ecx, edx
jbe 0x52c278
mov ecx, edx
jmp 0x52c275
mov edx, dword [ebp - 0x18]
sub edx, ecx
mov ecx, dword [esi + 0x40]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x10]
cmp ecx, edx
jbe 0x52c284
mov ecx, edx
mov dword [ebp - 0xc], ecx
sub edx, ecx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x24]
sub edx, ecx
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x18]
mov dword [esi + 0x40], edx
mov dword [ebp - 0x2c], ecx
jmp 0x52c29f
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x18]
mov dl, byte [ecx + edx]
mov ecx, dword [ebp - 0x18]
mov byte [ecx], dl
inc ecx
dec dword [ebp - 0xc]
mov dword [ebp - 0x18], ecx
jne 0x52c29c
cmp dword [esi + 0x40], 0
jne 0x52c3ff
mov dword [esi], 0x14
jmp 0x52c3ff
mov dword [esi], 0x1d
mov ecx, dword [esi]
cmp ecx, 0x1e
jbe 0x52b15b
pop edi
pop ebx
mov eax, 0xfffffffe
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0xc], edx
mov edx, dword [ebp - 0x10]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
mov dword [ecx + 0x10], edx
mov dword [ecx + 4], eax
cmp dword [esi + 0x28], 0
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], edi
jne 0x52c493
mov edx, dword [ebp - 0x20]
cmp edx, dword [ecx + 0x10]
je 0x52c4be
mov eax, dword [esi]
cmp eax, 0x1d
jge 0x52c4be
cmp eax, 0x1a
jl 0x52c493
cmp dword [ebp + 0xc], 4
je 0x52c4be
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
mov edx, dword [eax + 0xc]
sub ecx, dword [eax + 0x10]
push edx
call fcn.0052afe8
add esp, 4
test eax, eax
je 0x52c4be
mov dword [esi], 0x1e
pop edi
pop ebx
mov eax, 0xfffffffc
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x30]
sub eax, dword [edi + 4]
mov ebx, dword [ebp - 0x20]
sub ebx, dword [edi + 0x10]
add dword [edi + 8], eax
add dword [edi + 0x14], ebx
add dword [esi + 0x1c], ebx
cmp dword [esi + 8], 0
mov dword [ebp - 0x30], eax
je 0x52c513
test ebx, ebx
je 0x52c513
cmp dword [esi + 0x10], 0
push ebx
je 0x52c4fb
mov eax, dword [edi + 0xc]
mov ecx, dword [esi + 0x18]
sub eax, ebx
push eax
push ecx
call fcn.0052d778
jmp 0x52c50a
mov edx, dword [edi + 0xc]
mov eax, dword [esi + 0x18]
sub edx, ebx
push edx
push eax
call fcn.0052d248
mov dword [esi + 0x18], eax
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [esi]
cmp eax, 0x13
je 0x52c526
mov dword [ebp + 8], 0
cmp eax, 0xe
jne 0x52c52d
mov dword [ebp + 8], 0x100
mov ecx, dword [esi + 4]
neg ecx
sbb ecx, ecx
xor edx, edx
and ecx, 0x40
cmp eax, 0xb
setne dl
add ecx, dword [ebp + 8]
dec edx
and edx, 0x80
add edx, ecx
add edx, dword [esi + 0x3c]
cmp dword [ebp - 0x30], 0
mov dword [edi + 0x2c], edx
jne 0x52c55b
test ebx, ebx
je 0x52c561
cmp dword [ebp + 0xc], 4
jne 0x52c578
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x52b154
pop edi
pop ebx
mov eax, 0xfffffffb
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x28]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret