Function at 0x5143b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov edx, dword [ebp + 8]
xor ecx, ecx
push ebx
push esi
push edi
mov eax, dword [edx]
xor ebx, ebx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x10], 0
mov esi, dword [eax]
mov ecx, dword [eax + 4]
inc esi
mov edi, dword [eax + 0x10]
push esi
push dword [edx + 0xc]
mov dword [ebp + 0xc], ecx
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x58], edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x54], ecx
call fcn.004e8f10
mov ecx, dword [ebp + 8]
add esp, 8
mov dword [ebp - 8], eax
mov ecx, dword [ecx + 0xc]
push esi
push ecx
test eax, eax
jne 0x514421
call fcn.004e97d0
add esp, 8
sub eax, 5
neg eax
sbb eax, eax
pop edi
pop esi
and eax, 7
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004e90d0
mov ecx, dword [ebp - 0x28]
mov edx, eax
mov dword [ebp - 0x38], edx
mov ecx, dword [ecx + 0x24]
mov eax, dword [ecx]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push edx
push dword [ebp - 8]
push dword [eax + 0x14]
push ecx
call fcn.00542580
add esp, 0x1c
test eax, eax
jne 0x5147bc
lea eax, [ebp - 0x10]
mov dword [ebp - 0x34], 0xffffffff
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x2c]
mov eax, dword [eax + 0x14]
call eax
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x514791
mov ecx, dword [ebp + 0xc]
cmp dword [ebp - 0x10], ecx
jl 0x514455
test ebx, ebx
jne 0x5146c2
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x44], eax
mov eax, edi
or eax, ebx
je 0x514671
mov eax, edi
mov dword [ebp - 0x1c], esi
and eax, 1
or eax, esi
jne 0x514503
nop word [eax + eax]
inc esi
xor edx, edx
xor ecx, ecx
mov eax, esi
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, edi
and ecx, ebx
or edx, ecx
je 0x5144e0
mov dword [ebp - 0x1c], esi
mov edi, dword [ebp + 0x18]
xor edx, edx
dec edi
xor ecx, ecx
mov eax, edi
xor ebx, ebx
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, dword [ebp - 0x18]
and ecx, dword [ebp - 0xc]
or edx, ecx
jne 0x514555
mov esi, dword [ebp - 0x18]
nop dword [eax]
dec edi
xor edx, edx
xor ecx, ecx
mov eax, edi
bts edx, eax
inc ebx
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, esi
and ecx, dword [ebp - 0xc]
or edx, ecx
je 0x514530
mov esi, dword [ebp - 0x1c]
sub esi, ebx
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x48], eax
test eax, eax
jle 0x514671
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov ebx, dword [eax + 0x24]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x3c]
mov edi, dword [ebx]
push dword [ebp - 0x40]
push ebx
mov eax, dword [edi + 0xc]
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x5145c8
mov eax, dword [ebp - 4]
mov dword [eax], ebx
cmp dword [edi], 1
jl 0x5145c8
push dword [ebp - 0x44]
mov eax, dword [edi + 0x18]
push dword [ebp - 4]
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x5145c8
push dword [ebp - 4]
mov eax, dword [edi + 0x10]
call eax
add esp, 4
xor ebx, ebx
mov dword [ebp - 4], ebx
jmp 0x5145cb
mov ebx, dword [ebp - 4]
test esi, esi
je 0x5145d7
mov ecx, dword [ebp + 0xc]
jmp 0x514676
mov eax, dword [ebp - 0x48]
add eax, dword [ebp + 0x18]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x1c], eax
jge 0x514620
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x40], 0
push eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x44], 0
push eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x48], 0
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x50]
push eax
mov eax, dword [edi + 0x14]
push ebx
call eax
mov esi, eax
add esp, 0x18
mov eax, dword [ebp - 0x3c]
test esi, esi
je 0x5145e0
mov eax, dword [edi + 0x10]
push ebx
call eax
add esp, 4
test esi, esi
je 0x514637
cmp esi, 0x65
je 0x514637
mov ecx, dword [ebp + 0xc]
jmp 0x514676
mov ecx, dword [ebp + 0xc]
xor eax, eax
cmp esi, 0x65
sete al
sub eax, dword [ebp + 0x18]
add eax, dword [ebp - 0x1c]
test eax, eax
jle 0x514674
movq xmm1, qword [ebp - 0x58]
add ecx, eax
movd xmm0, eax
psrlq xmm1, xmm0
mov dword [ebp + 0xc], ecx
movq qword [ebp - 0x58], xmm1
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x18], eax
jmp 0x514674
mov ecx, dword [ebp + 0xc]
xor esi, esi
mov ebx, 1
test esi, esi
jne 0x5147ac
test ecx, ecx
jg 0x514699
cmp dword [ebp + 0x10], esi
jg 0x514699
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x5146b3
push ecx
push dword [ebp - 8]
jmp 0x51469e
push 0xffffffffffffffff
push dword [ebp + 0x24]
push dword [ebp + 0x28]
call fcn.00514ff0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x5147ac
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 0x18]
cmp dword [ebp - 0x10], ecx
jl 0x514455
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0x10]
add eax, ecx
cmp edx, eax
jge 0x514784
sub edx, ecx
xor eax, eax
xor ecx, ecx
bts ecx, edx
cmp edx, 0x20
cmovae eax, ecx
xor ecx, eax
cmp edx, 0x40
cmovae eax, ecx
and ecx, edi
and eax, dword [ebp - 0xc]
or ecx, eax
je 0x5146f9
mov edi, 1
jmp 0x5146fb
xor edi, edi
mov ecx, dword [ebp + 0xc]
cmp dword [ebp - 0x10], ecx
jle 0x514722
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x24]
push eax
push dword [ebp + 0x28]
call fcn.00514ff0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x514771
test edi, edi
je 0x51473c
push 0xffffffffffffffff
push dword [ebp + 0x1c]
push dword [ebp + 0x28]
call fcn.00514ff0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x514771
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
push eax
push dword [ebp + 0x28]
call fcn.00514ff0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x514771
test edi, edi
je 0x514771
push 0xffffffffffffffff
push dword [ebp + 0x20]
push dword [ebp + 0x28]
call fcn.00514ff0
add esp, 0xc
mov esi, eax
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
test esi, esi
je 0x514455
jmp 0x5147ac
cmp dword [ebp + 0x14], 0
je 0x5147ac
push 0xffffffffffffffff
push dword [ebp + 0x24]
jmp 0x51479f
cmp esi, 0x65
jne 0x5147ac
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x24]
push 0xffffffffffffffff
push eax
push dword [ebp + 0x28]
call fcn.00514ff0
mov esi, eax
add esp, 0xc
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x2c]
mov eax, dword [eax + 0x10]
call eax
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret