Function at 0x502da0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xc
call fcn.0040c2f0
push ebp
mov ebp, dword [esp + 0x20]
xor ecx, ecx
push esi
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0x174]
mov dword [esp + 0xc], eax
mov eax, ebp
add eax, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x502ffd
jb 0x502ddc
cmp eax, 0xffffffe0
ja 0x502ffd
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
je 0x502e05
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00503d20
add esp, 8
mov dword [esi + 0x16c], 0
movzx ecx, byte [esi + 0xc]
movzx eax, byte [esi + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xf]
push ebx
mov ebx, dword [esi + 0x168]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], ecx
push edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x2c], edi
test ebx, ebx
je 0x502e8b
mov edx, dword [esp + 0x28]
mov dword [esp + 0x20], edx
test ebp, ebp
je 0x502e71
mov cl, byte [edi]
dec ebp
mov al, byte [ebx + esi + 0x10]
inc edi
xor al, cl
mov dword [esp + 0x2c], edi
mov byte [edx], al
inc edx
xor byte [ebx + esi + 0x40], cl
inc ebx
and ebx, 0xf
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], ebx
jne 0x502e48
jmp 0x502e79
test ebx, ebx
jne 0x502fed
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00503d20
add esp, 8
jmp 0x502e93
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], eax
cmp ebp, 0xc00
jb 0x502f25
mov ebx, dword [esp + 0x10]
lea ecx, [esi + 0x60]
mov eax, 0xaaaaaaab
mul ebp
shr edx, 0xb
mov dword [esp + 0x2c], edx
push 0xc00
push edi
push ecx
lea eax, [esi + 0x40]
push eax
call fcn.00503ae0
push esi
push dword [esp + 0x28]
push 0xc0
push dword [esp + 0x3c]
push edi
call dword [esp + 0x54]
add dword [esp + 0x44], 0xc00
lea ecx, [esi + 0x60]
add ebx, 0xc0
add esp, 0x24
mov eax, ebx
mov byte [esi + 0xf], bl
shr eax, 0x18
add edi, 0xc00
mov byte [esi + 0xc], al
sub ebp, 0xc00
mov eax, ebx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ebx
shr eax, 8
sub dword [esp + 0x2c], 1
mov byte [esi + 0xe], al
jne 0x502eb4
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x2c], edi
mov eax, ebp
and eax, 0xfffffff0
mov dword [esp + 0x18], eax
je 0x502f91
push eax
push dword [esp + 0x30]
mov edi, eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
shr edi, 4
push eax
call fcn.00503ae0
push esi
push dword [esp + 0x28]
push edi
push dword [esp + 0x3c]
push dword [esp + 0x4c]
call dword [esp + 0x54]
mov ecx, dword [esp + 0x34]
add esp, 0x24
add ecx, edi
mov edi, dword [esp + 0x2c]
mov eax, ecx
mov dword [esp + 0x10], ecx
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [esp + 0x18]
add edi, eax
add dword [esp + 0x20], eax
sub ebp, eax
mov byte [esi + 0xf], cl
test ebp, ebp
je 0x502fed
push dword [esp + 0x14]
lea eax, [esi + 0x10]
push eax
mov eax, dword [esi + 0x170]
push esi
call eax
mov ecx, dword [esp + 0x1c]
add esp, 0xc
inc ecx
mov eax, ecx
mov byte [esi + 0xf], cl
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [esp + 0x20]
sub edi, eax
lea edx, [ebx + eax]
mov cl, byte [edi + edx]
lea eax, [esi + ebx]
xor byte [eax + 0x40], cl
lea edx, [edx + 1]
mov al, byte [esi + ebx + 0x10]
inc ebx
xor al, cl
mov byte [edx - 1], al
sub ebp, 1
jne 0x502fd2
pop edi
mov dword [esi + 0x168], ebx
xor eax, eax
pop ebx
pop esi
pop ebp
add esp, 0xc
ret
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0xc
ret